46 integer,
intent(in) :: n
47 real(kind=
rp),
intent(in) :: gamma
48 real(kind=
rp),
dimension(n),
intent(in) :: u, v, w, p, rho
49 real(kind=
rp),
dimension(n),
intent(inout) :: max_wave_speed
51 real(kind=
rp) :: vel_mag, sound_speed
54 do concurrent(i = 1:n)
55 vel_mag = sqrt(u(i)*u(i) + v(i)*v(i) + w(i)*w(i))
56 sound_speed = sqrt(gamma * p(i) / rho(i))
57 max_wave_speed(i) = vel_mag + sound_speed
64 integer,
intent(in) :: n
65 real(kind=
rp),
intent(in) :: gamma
66 real(kind=
rp),
dimension(n),
intent(in) :: p, rho
67 real(kind=
rp),
dimension(n),
intent(inout) :: s
71 do concurrent(i = 1:n)
72 s(i) = (1.0_rp / (gamma - 1.0_rp)) * rho(i) * &
73 (log(p(i)) - gamma * log(rho(i)))
CPU implementation of compressible flow operations.
subroutine, public compressible_ops_cpu_compute_entropy(s, p, rho, gamma, n)
Compute entropy field S = 1/(gamma-1) * rho * (log(p) - gamma * log(rho)) on CPU.
subroutine, public compressible_ops_cpu_compute_max_wave_speed(max_wave_speed, u, v, w, gamma, p, rho, n)
Compute maximum wave speed for compressible flows on CPU.
integer, parameter, public rp
Global precision used in computations.