Simulation of the thermal field during the scattering of ultrasonic acoustic vibrations in a viscous medium
This example demonstrates the simulation of the propagation of ultrasonic radiation in a viscous medium. The attenuation of acoustic vibrations and the heating of the medium are modeled due to distributed heat sources.
The energy carried by the ultrasonic beam decays as it passes through a viscous medium. If at the origin at the intensity of a plane traveling wave is , then at a distance of x it decreases to :
where (k) is the intensity attenuation coefficient. Thus, the energy loss of the initial ultrasonic beam during its propagation over a single distance, $\frac{dI}{dx}$, are equal to . Attenuation coefficient, , consists of two components, one due to absorption and the other due to scattering. The energy scattered from the main beam can be absorbed in other areas of the viscous medium.
Using simple heat propagation equations, the expected heating can be calculated. The temperature distribution of a viscous medium is described by the equation:
where – temperature, – exposure time, – the coordinate along the axis of radiation propagation, - the initial value of the power of volumetric heat sources, – heat capacity of the medium, - the density of the medium. The power of volumetric sources depends on the coordinate:
Calculation of the temperature field
Connecting the necessary libraries:
using .DifferentialEquations, Plots
plotly()
Determination of radiation and viscous medium parameters:
α = 0.5 # коэффициент теплопроводности Вт / (м*К)
c = 3360.0 # теплоёмкость, Дж/кг*К
γ = 1050.0 # плотность, кг/м3
L = 0.1 # глубина рассматриваемого участка, м
k = 0.35 # Нп/м
I0 = 10000.0 # интенсивность излучения Вт / м2
F = 0.0001 #м2
m = 0.001; #кг
Implementation of the temperature calculation function by time and coordinate:
function heat_equation!(du, u, p, t)
α, I0, c, γ, k, x = p
dx = x[2] - x[1]
N = length(x)
# Первый участок
du[1] = α * F * (1 / (c * m)) * (u[2] - 2u[1] + 320) / dx^2 + I0 / (c * γ) * exp(-k*x[1])
# Промежуточные участки
for i in 2:(N-1)
du[i] = α * F * (1 / (c * m)) * (u[i+1] - 2u[i] + u[i-1]) / dx^2 + I0 / (c * γ) * exp(-k*x[i])
end
# Конечный участок
du[N] = α * F * (1 / (c * m)) * (u[N-1] - u[N]) / dx^2 + I0 / (c * γ) * exp(-k*x[N])
end
Determination of calculation parameters:
x = range(0, stop=1, length=100) # задаем координаты
tspan = (0.0, 2000.0) # временной интервал
u0 = 310.0 .* ones(length(x)) # начальные условия
p = (0.5, I0, 3360.0, 1050.0, k, x) # параметры (α, I0, c, γ, k, L, x)
Implementation of the heat flow calculation function depending on the coordinate:
function teplo(x)
return I0 / (c * γ) * exp.(-k*x)
end
Visualization of the heat flow value depending on the coordinate, taking into account the attenuation coefficient:
plot(teplo(x))
Solving the problem using the DifferentialEquations library methods:
prob = ODEProblem(heat_equation!, u0, tspan, p)
sol = solve(prob);
Determination of the temperature field at the final calculation step:
t = 2000.0
idx = argmin(abs.(sol.t .- t))
u_at_t = sol.u[idx];
Visualization of the temperature field at the final calculation step:
plot(u_at_t)
Conclusions
In this example, the simulation of the propagation of acoustic vibrations in a viscous medium, as well as their attenuation and conversion of energy into heat, was demonstrated. A temperature field of a semi-infinite plate was constructed, and the methods of the DifferentialEquations library for solving systems of differential equations were demonstrated.