MFC: Post-Process
High-fidelity multiphase flow simulation
Loading...
Searching...
No Matches
m_derived_variables Module Reference

This module features subroutines that allow for the derivation of numerous flow variables from the conservative and primitive ones. Currently, the available derived variables include the unadvected volume fraction, specific heat ratio, liquid stiffness, speed of sound, vorticity and the numerical Schlieren function. More...

Functions/Subroutines

subroutine, public s_initialize_derived_variables_module ()
 Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the module.
 
subroutine, public s_derive_specific_heat_ratio (q_sf)
 This subroutine receives as input the specific heat ratio function, gamma_sf, and derives from it the specific heat ratio. The latter is stored in the derived flow quantity storage variable, q_sf.
 
subroutine, public s_derive_liquid_stiffness (q_sf)
 This subroutine admits as inputs the specific heat ratio function and the liquid stiffness function, gamma_sf and pi_inf_sf, respectively. These are used to calculate the values of the liquid stiffness, which are stored in the derived flow quantity storage variable, q_sf.
 
subroutine, public s_derive_sound_speed (q_prim_vf, q_sf)
 This subroutine admits as inputs the primitive variables, the density, the specific heat ratio function and liquid stiffness function. It then computes from those variables the values of the speed of sound, which are stored in the derived flow quantity storage variable, q_sf.
 
subroutine, public s_derive_flux_limiter (i, q_prim_vf, q_sf)
 This subroutine derives the flux_limiter at cell boundary i+1/2. This is an approximation because the velocity used to determine the upwind direction is the velocity at the cell center i instead of the contact velocity at the cell boundary from the Riemann solver.
 
subroutine s_solve_linear_system (a, b, sol, ndim)
 Computes the solution to the linear system Ax=b w/ sol = x.
 
subroutine, public s_derive_vorticity_component (i, q_prim_vf, q_sf)
 This subroutine receives as inputs the indicator of the component of the vorticity that should be outputted and the primitive variables. From those inputs, it proceeds to calculate values of the desired vorticity component, which are subsequently stored in derived flow quantity storage variable, q_sf.
 
subroutine, public s_derive_qm (q_prim_vf, q_sf)
 This subroutine gets as inputs the primitive variables. From those inputs, it proceeds to calculate the value of the Q_M function, which are subsequently stored in the derived flow quantity storage variable, q_sf.
 
subroutine, public s_compute_speed_of_sound (pres, rho, gamma, pi_inf, h, adv, vel_sum, c)
 
subroutine, public s_derive_numerical_schlieren_function (q_cons_vf, q_sf)
 This subroutine gets as inputs the conservative variables and density. From those inputs, it proceeds to calculate the values of the numerical Schlieren function, which are subsequently stored in the derived flow quantity storage variable, q_sf.
 
subroutine, public s_finalize_derived_variables_module ()
 Deallocation procedures for the module.
 

Variables

real(kind(0d0)), dimension(:, :, :), allocatable gm_rho_sf
 Gradient magnitude (gm) of the density for each cell of the computational sub-domain. This variable is employed in the calculation of the numerical Schlieren function.
 
integer, private flg
 Flagging (flg) variable used to annotate the dimensionality of the dataset that is undergoing the post-process. A flag value of 1 indicates that the dataset is 3D, while a flag value of 0 indicates that it is not. This flg variable is necessary to avoid cycling through the third dimension of the flow variable(s) when the simulation is not 3D and the size of the buffer is non-zero. Note that a similar procedure does not have to be applied to the second dimension since in 1D, the buffer size is always zero.
 
Finite-difference (fd) coefficients in x-, y- and z-coordinate directions.

Note that because sufficient boundary information is available for all the active coordinate directions, the centered family of the finite-difference schemes is used.

real(kind(0d0)), dimension(:, :), allocatable, public fd_coeff_x
 
real(kind(0d0)), dimension(:, :), allocatable, public fd_coeff_y
 
real(kind(0d0)), dimension(:, :), allocatable, public fd_coeff_z
 

Detailed Description

This module features subroutines that allow for the derivation of numerous flow variables from the conservative and primitive ones. Currently, the available derived variables include the unadvected volume fraction, specific heat ratio, liquid stiffness, speed of sound, vorticity and the numerical Schlieren function.

Function/Subroutine Documentation

◆ s_compute_speed_of_sound()

subroutine, public m_derived_variables::s_compute_speed_of_sound ( real(kind(0d0)), intent(in) pres,
real(kind(0d0)), intent(in) rho,
real(kind(0d0)), intent(in) gamma,
real(kind(0d0)), intent(in) pi_inf,
real(kind(0d0)), intent(in) h,
real(kind(0d0)), dimension(num_fluids), intent(in) adv,
real(kind(0d0)), intent(in) vel_sum,
real(kind(0d0)), intent(out) c )
Here is the caller graph for this function:

◆ s_derive_flux_limiter()

subroutine, public m_derived_variables::s_derive_flux_limiter ( integer, intent(in) i,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
real(kind(0d0)), dimension(-offset_x%beg:m + offset_x%end, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end), intent(inout) q_sf )

This subroutine derives the flux_limiter at cell boundary i+1/2. This is an approximation because the velocity used to determine the upwind direction is the velocity at the cell center i instead of the contact velocity at the cell boundary from the Riemann solver.

Parameters
iComponent indicator
q_prim_vfPrimitive variables
q_sfFlux limiter
Here is the caller graph for this function:

◆ s_derive_liquid_stiffness()

subroutine, public m_derived_variables::s_derive_liquid_stiffness ( real(kind(0d0)), dimension(-offset_x%beg:m + offset_x%end, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end), intent(inout) q_sf)

This subroutine admits as inputs the specific heat ratio function and the liquid stiffness function, gamma_sf and pi_inf_sf, respectively. These are used to calculate the values of the liquid stiffness, which are stored in the derived flow quantity storage variable, q_sf.

Parameters
q_sfLiquid stiffness
Here is the caller graph for this function:

◆ s_derive_numerical_schlieren_function()

subroutine, public m_derived_variables::s_derive_numerical_schlieren_function ( type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
real(kind(0d0)), dimension(-offset_x%beg:m + offset_x%end, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end), intent(inout) q_sf )

This subroutine gets as inputs the conservative variables and density. From those inputs, it proceeds to calculate the values of the numerical Schlieren function, which are subsequently stored in the derived flow quantity storage variable, q_sf.

Parameters
q_cons_vfConservative variables
q_sfNumerical Schlieren function
Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_derive_qm()

subroutine, public m_derived_variables::s_derive_qm ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
real(kind(0d0)), dimension(-offset_x%beg:m + offset_x%end, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end), intent(inout) q_sf )

This subroutine gets as inputs the primitive variables. From those inputs, it proceeds to calculate the value of the Q_M function, which are subsequently stored in the derived flow quantity storage variable, q_sf.

Parameters
q_prim_vfPrimitive variables
q_sfQ_M
Here is the caller graph for this function:

◆ s_derive_sound_speed()

subroutine, public m_derived_variables::s_derive_sound_speed ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
real(kind(0d0)), dimension(-offset_x%beg:m + offset_x%end, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end), intent(inout) q_sf )

This subroutine admits as inputs the primitive variables, the density, the specific heat ratio function and liquid stiffness function. It then computes from those variables the values of the speed of sound, which are stored in the derived flow quantity storage variable, q_sf.

Parameters
q_prim_vfPrimitive variables
q_sfSpeed of sound

◆ s_derive_specific_heat_ratio()

subroutine, public m_derived_variables::s_derive_specific_heat_ratio ( real(kind(0d0)), dimension(-offset_x%beg:m + offset_x%end, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end), intent(inout) q_sf)

This subroutine receives as input the specific heat ratio function, gamma_sf, and derives from it the specific heat ratio. The latter is stored in the derived flow quantity storage variable, q_sf.

Parameters
q_sfSpecific heat ratio
Here is the caller graph for this function:

◆ s_derive_vorticity_component()

subroutine, public m_derived_variables::s_derive_vorticity_component ( integer, intent(in) i,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
real(kind(0d0)), dimension(-offset_x%beg:m + offset_x%end, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end), intent(inout) q_sf )

This subroutine receives as inputs the indicator of the component of the vorticity that should be outputted and the primitive variables. From those inputs, it proceeds to calculate values of the desired vorticity component, which are subsequently stored in derived flow quantity storage variable, q_sf.

Parameters
iVorticity component indicator
q_prim_vfPrimitive variables
q_sfVorticity component
Here is the caller graph for this function:

◆ s_finalize_derived_variables_module()

subroutine, public m_derived_variables::s_finalize_derived_variables_module

Deallocation procedures for the module.

Here is the caller graph for this function:

◆ s_initialize_derived_variables_module()

subroutine, public m_derived_variables::s_initialize_derived_variables_module

Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the module.

Here is the caller graph for this function:

◆ s_solve_linear_system()

subroutine m_derived_variables::s_solve_linear_system ( real(kind(0d0)), dimension(ndim, ndim), intent(inout) a,
real(kind(0d0)), dimension(ndim), intent(inout) b,
real(kind(0d0)), dimension(ndim), intent(out) sol,
integer, intent(in) ndim )

Computes the solution to the linear system Ax=b w/ sol = x.

Parameters
AInput matrix
bright-hand-side
solSolution
ndimProblem size

Variable Documentation

◆ fd_coeff_x

real(kind(0d0)), dimension(:, :), allocatable, public m_derived_variables::fd_coeff_x

◆ fd_coeff_y

real(kind(0d0)), dimension(:, :), allocatable, public m_derived_variables::fd_coeff_y

◆ fd_coeff_z

real(kind(0d0)), dimension(:, :), allocatable, public m_derived_variables::fd_coeff_z

◆ flg

integer, private m_derived_variables::flg
private

Flagging (flg) variable used to annotate the dimensionality of the dataset that is undergoing the post-process. A flag value of 1 indicates that the dataset is 3D, while a flag value of 0 indicates that it is not. This flg variable is necessary to avoid cycling through the third dimension of the flow variable(s) when the simulation is not 3D and the size of the buffer is non-zero. Note that a similar procedure does not have to be applied to the second dimension since in 1D, the buffer size is always zero.

◆ gm_rho_sf

real(kind(0d0)), dimension(:, :, :), allocatable m_derived_variables::gm_rho_sf

Gradient magnitude (gm) of the density for each cell of the computational sub-domain. This variable is employed in the calculation of the numerical Schlieren function.