calcDensAndVelsFromPDF Subroutine

private subroutine calcDensAndVelsFromPDF(nFields, iField, mass_dens, num_dens, velAvg, eqVel, varSys, pdf, stencil, species, resi_coeff, omega_fac, paramBInv)

This routine returns mass density of all species and mass averaged mixture velocity from given pdf of all species for single element. It is used in Nonequilbrium extrapolation based boundary conditions.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: nFields

Number of fields

integer, intent(in) :: iField

current field to compute eqVel

real(kind=rk), intent(out) :: mass_dens(nFields)

Mass density of all species

real(kind=rk), intent(out) :: num_dens(nFields)

Number density of all species

real(kind=rk), intent(out) :: velAvg(3)

Mass averaged velocity

real(kind=rk), intent(out) :: eqVel(3)
type(tem_varSys_type), intent(in) :: varSys

Variable system

real(kind=rk), intent(in) :: pdf(varSys%nScalars)

State array of single element for all species

type(tem_stencilHeader_type), intent(in) :: stencil

Stencil header

type(mus_species_type), intent(in) :: species(nFields)

Species information

real(kind=rk), intent(in) :: resi_coeff(nFields,nFields)

Resisitivity coefficient matrix

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

relaxation parameter, omega_diff*0.5_rk

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

inverse of free parameter B


Calls

proc~~calcdensandvelsfrompdf~~CallsGraph proc~calcdensandvelsfrompdf calcDensAndVelsFromPDF proc~momentumfrommacrolse momentumFromMacroLSE proc~calcdensandvelsfrompdf->proc~momentumfrommacrolse proc~invert_matrix invert_matrix proc~momentumfrommacrolse->proc~invert_matrix

Called by

proc~~calcdensandvelsfrompdf~~CalledByGraph proc~calcdensandvelsfrompdf calcDensAndVelsFromPDF proc~spc_solvent_inflow spc_solvent_inflow proc~spc_solvent_inflow->proc~calcdensandvelsfrompdf proc~spc_outflow spc_outflow proc~spc_outflow->proc~calcdensandvelsfrompdf proc~spc_velocity_noneq_expol spc_velocity_noneq_expol proc~spc_velocity_noneq_expol->proc~calcdensandvelsfrompdf proc~spc_mole_fraction_noneq_expol spc_mole_fraction_noneq_expol proc~spc_mole_fraction_noneq_expol->proc~calcdensandvelsfrompdf proc~spc_solvent_outflow spc_solvent_outflow proc~spc_solvent_outflow->proc~calcdensandvelsfrompdf

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: iFld
integer, private :: iDir
real(kind=rk), private :: fTmp(stencil%QQ)
real(kind=rk), private :: tot_numDensInv
real(kind=rk), private :: tot_massDensInv
real(kind=rk), private :: momentum(3,nFields)
real(kind=rk), private :: first_moments(3,nFields)
real(kind=rk), private :: moleFrac(nFields)
real(kind=rk), private :: massFrac(nFields)
real(kind=rk), private :: velocity(nFields,nFields)