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

Type IntentOptional Attributes Name
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