deriveVelMSLiquid_FromState Subroutine

public subroutine deriveVelMSLiquid_FromState(state, iField, nElems, varSys, layout, res)

This routine computes velocity from state array

This subroutine's interface must match the abstract interface definition derive_FromState in derived/mus_derVarPos_module.f90 in order to be callable via velFromState, equilFromState, momFromState, velocitiesFromState, and momentaFromState function pointers.


real(kind=rk), intent(in) :: state(:)

Array of state n * layout%fStencil%QQ * nFields

integer, intent(in) :: iField

Current field

integer, intent(in) :: nElems

number of elements

type(tem_varSys_type), intent(in) :: varSys

variable system which is required to access fieldProp information via variable method data c_ptr

type(mus_scheme_layout_type), intent(in) :: layout

scheme layout contains stencil definition and lattice weights

real(kind=rk), intent(out) :: res(:)

Output of this routine Dimension: n * nComponents of res


proc~~derivevelmsliquid_fromstate~~CallsGraph proc~derivevelmsliquid_fromstate deriveVelMSLiquid_FromState proc~momentumfrommacrolse momentumFromMacroLSE proc~derivevelmsliquid_fromstate->proc~momentumfrommacrolse proc~invert_matrix invert_matrix proc~momentumfrommacrolse->proc~invert_matrix



integer, private :: iElem
integer, private :: iComp
integer, private :: iFld
type(mus_varSys_data_type), private, pointer:: fPtr
type(mus_scheme_type), private, pointer:: scheme
integer, private :: varPos
integer, private :: QQ
integer, private :: nFields
real(kind=rk), private :: tmpPDF(layout%fStencil%QQ)
real(kind=rk), private :: vel(3)
real(kind=rk), private :: mass_dens(varSys%nStateVars)
real(kind=rk), private :: num_dens(varSys%nStateVars)
real(kind=rk), private :: moleFraction(varSys%nStateVars)
real(kind=rk), private :: totNum_densInv
real(kind=rk), private :: first_moments(3,varSys%nStateVars)
real(kind=rk), private :: momentum(3,varSys%nStateVars)
real(kind=rk), private, dimension(varSys%nStateVars):: phi
real(kind=rk), private :: resi_coeff(varSys%nStateVars,varSys%nStateVars)
real(kind=rk), private :: omega_diff
real(kind=rk), private :: omega_fac
real(kind=rk), private :: paramBInv
integer, private :: stateVarMap(varSys%nStateVars)