MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_body_forces Module Reference

Computes gravitational and body force source terms for the momentum equations. More...

Functions/Subroutines

impure subroutine, public s_initialize_body_forces_module
 Initialize the body forces module. When synthetic_turbulence is enabled, generates random wave vectors for each energy shell on rank 0, then broadcasts to all MPI ranks and copies to GPU.
impure subroutine s_initialize_body_force_with_spatial_support
 Initialize a body force with spatial support presented in Wei & Freund (JFM, 2005).
subroutine s_compute_acceleration (t)
 Compute the acceleration at time t.
subroutine s_compute_body_force_with_spatial_support (t, bounds)
 Apply the body force of Wei & Freund (JFM, 2005).
subroutine s_compute_mixture_density (q_cons_vf, bounds)
 Compute the mixture density at each cell center.
subroutine, public s_compute_body_forces_rhs (q_prim_vf, q_cons_vf, rhs_vf, bounds)
 Compute the body force source terms for momentum and energy equations.
subroutine, public s_compute_synthetic_forces_rhs (q_prim_vf, q_cons_vf, rhs_vf)
 Compute the synthetic turbulence RHS contribution.
impure subroutine, public s_finalize_body_forces_module
 Finalize the body forces module.

Variables

integer, parameter spbf_num_freq = 8
real(wpspbf_amp
real(wpspbf_xc
real(wpspbf_yc
real(wpspbf_conv_vel
real(wpspbf_sigma
real(wp), dimension(:), allocatable freq
real(wp), dimension(:), allocatable phase
real(wp), dimension(:,:,:), allocatable rhom
integer num_synthetic_wave_numbers
real(wp), dimension(:), allocatable synthetic_k_x
real(wp), dimension(:), allocatable synthetic_k_y
real(wp), dimension(:), allocatable synthetic_k_z
real(wp), dimension(:), allocatable synthetic_phase
real(wp), dimension(:), allocatable synthetic_amp
real(wp), dimension(:), allocatable synthetic_ex
real(wp), dimension(:), allocatable synthetic_ey
real(wp), dimension(:), allocatable synthetic_ez

Detailed Description

Computes gravitational and body force source terms for the momentum equations.

Function/Subroutine Documentation

◆ s_compute_acceleration()

subroutine m_body_forces::s_compute_acceleration ( real(wp), intent(in) t)
private

Compute the acceleration at time t.

Definition at line 1133 of file m_body_forces.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_body_force_with_spatial_support()

subroutine m_body_forces::s_compute_body_force_with_spatial_support ( real(wp), intent(in) t,
type(int_bounds_info), dimension(1:3), intent(in) bounds )
private

Apply the body force of Wei & Freund (JFM, 2005).

Definition at line 1166 of file m_body_forces.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_body_forces_rhs()

subroutine, public m_body_forces::s_compute_body_forces_rhs ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
type(scalar_field), dimension(sys_size), intent(inout) rhs_vf,
type(int_bounds_info), dimension(1:3), intent(in) bounds )

Compute the body force source terms for momentum and energy equations.

Definition at line 1335 of file m_body_forces.fpp.f90.

Here is the call graph for this function:

◆ s_compute_mixture_density()

subroutine m_body_forces::s_compute_mixture_density ( type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
type(int_bounds_info), dimension(1:3), intent(in) bounds )
private

Compute the mixture density at each cell center.

Definition at line 1281 of file m_body_forces.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_synthetic_forces_rhs()

subroutine, public m_body_forces::s_compute_synthetic_forces_rhs ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
type(scalar_field), dimension(sys_size), intent(inout) rhs_vf )

Compute the synthetic turbulence RHS contribution.

Each Fourier mode m has wave vector k_m and a pre-computed solenoidal (divergence-free) direction e_m perpendicular to k_m. The force field is F = rho * (sum_m A_m * cos(k_m.(x-U*t*xhat) + phi_m) * e_m) * (U/Lx) * G. This excites all velocity components correctly and is zero outside the bounding box of the Gaussian window.

Definition at line 1595 of file m_body_forces.fpp.f90.

◆ s_finalize_body_forces_module()

impure subroutine, public m_body_forces::s_finalize_body_forces_module

Finalize the body forces module.

Definition at line 1769 of file m_body_forces.fpp.f90.

◆ s_initialize_body_force_with_spatial_support()

impure subroutine m_body_forces::s_initialize_body_force_with_spatial_support
private

Initialize a body force with spatial support presented in Wei & Freund (JFM, 2005).

Definition at line 931 of file m_body_forces.fpp.f90.

Here is the caller graph for this function:

◆ s_initialize_body_forces_module()

impure subroutine, public m_body_forces::s_initialize_body_forces_module

Initialize the body forces module. When synthetic_turbulence is enabled, generates random wave vectors for each energy shell on rank 0, then broadcasts to all MPI ranks and copies to GPU.

Definition at line 408 of file m_body_forces.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ freq

real(wp), dimension(:), allocatable m_body_forces::freq
private

Definition at line 346 of file m_body_forces.fpp.f90.

◆ num_synthetic_wave_numbers

integer m_body_forces::num_synthetic_wave_numbers
private

Definition at line 360 of file m_body_forces.fpp.f90.

◆ phase

real(wp), dimension(:), allocatable m_body_forces::phase
private

Definition at line 346 of file m_body_forces.fpp.f90.

◆ rhom

real(wp), dimension(:,:,:), allocatable m_body_forces::rhom
private

Definition at line 347 of file m_body_forces.fpp.f90.

◆ spbf_amp

real(wp) m_body_forces::spbf_amp
private

Definition at line 341 of file m_body_forces.fpp.f90.

◆ spbf_conv_vel

real(wp) m_body_forces::spbf_conv_vel
private

Definition at line 344 of file m_body_forces.fpp.f90.

◆ spbf_num_freq

integer, parameter m_body_forces::spbf_num_freq = 8
private

Definition at line 340 of file m_body_forces.fpp.f90.

◆ spbf_sigma

real(wp) m_body_forces::spbf_sigma
private

Definition at line 345 of file m_body_forces.fpp.f90.

◆ spbf_xc

real(wp) m_body_forces::spbf_xc
private

Definition at line 342 of file m_body_forces.fpp.f90.

◆ spbf_yc

real(wp) m_body_forces::spbf_yc
private

Definition at line 343 of file m_body_forces.fpp.f90.

◆ synthetic_amp

real(wp), dimension(:), allocatable m_body_forces::synthetic_amp
private

Definition at line 374 of file m_body_forces.fpp.f90.

◆ synthetic_ex

real(wp), dimension(:), allocatable m_body_forces::synthetic_ex
private

Definition at line 379 of file m_body_forces.fpp.f90.

◆ synthetic_ey

real(wp), dimension(:), allocatable m_body_forces::synthetic_ey
private

Definition at line 379 of file m_body_forces.fpp.f90.

◆ synthetic_ez

real(wp), dimension(:), allocatable m_body_forces::synthetic_ez
private

Definition at line 379 of file m_body_forces.fpp.f90.

◆ synthetic_k_x

real(wp), dimension(:), allocatable m_body_forces::synthetic_k_x
private

Definition at line 373 of file m_body_forces.fpp.f90.

◆ synthetic_k_y

real(wp), dimension(:), allocatable m_body_forces::synthetic_k_y
private

Definition at line 373 of file m_body_forces.fpp.f90.

◆ synthetic_k_z

real(wp), dimension(:), allocatable m_body_forces::synthetic_k_z
private

Definition at line 373 of file m_body_forces.fpp.f90.

◆ synthetic_phase

real(wp), dimension(:), allocatable m_body_forces::synthetic_phase
private

Definition at line 374 of file m_body_forces.fpp.f90.