applySrc_electricMSLiquid_2ndOrd_WTDF Subroutine

public subroutine applySrc_electricMSLiquid_2ndOrd_WTDF(fun, inState, outState, neigh, auxField, nPdfSize, iLevel, varSys, time, phyConvFac, derVarPos)

Update state with source variable "electric_field" with 2nd order integration of force term in LBE with thermodynamic factor Refer to Appendix in PhD Thesis of K. Masilamani "Coupled Simulation Framework to Simulate Electrodialysis Process for Seawater Desalination"

This subroutine's interface must match the abstract interface definition proc_apply_source in derived/mus_source_var_module.f90 in order to be callable via applySrc function pointer.

Arguments

TypeIntentOptionalAttributesName
class(mus_source_op_type), intent(in) :: fun

Description of method to apply source terms

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

input pdf vector

real(kind=rk), intent(inout) :: outState(:)

output pdf vector

integer, intent(in) :: neigh(:)

connectivity Array corresponding to state vector

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

auxField array

integer, intent(in) :: nPdfSize

number of elements in state Array

integer, intent(in) :: iLevel

current level

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

variable system

type(tem_time_type), intent(in) :: time

Point in time at which to evaluate the variable.

type(mus_convertFac_type), intent(in) :: phyConvFac

Physics conversion factor for current level

type(mus_derVarPos_type), intent(in) :: derVarPos(:)

position of derived quantities in varsys


Calls

proc~~applysrc_electricmsliquid_2ndord_wtdf~~CallsGraph proc~applysrc_electricmsliquid_2ndord_wtdf applySrc_electricMSLiquid_2ndOrd_WTDF proc~invert_matrix invert_matrix proc~applysrc_electricmsliquid_2ndord_wtdf->proc~invert_matrix interface~mus_calc_thermfactor mus_calc_thermFactor proc~applysrc_electricmsliquid_2ndord_wtdf->interface~mus_calc_thermfactor species species proc~applysrc_electricmsliquid_2ndord_wtdf->species proc~mus_calc_thermfactor_single mus_calc_thermFactor_single interface~mus_calc_thermfactor->proc~mus_calc_thermfactor_single interface~calc_therm_factor_loc calc_therm_factor_loc proc~mus_calc_thermfactor_single->interface~calc_therm_factor_loc

Contents


Variables

TypeVisibilityAttributesNameInitial
type(mus_varSys_data_type), private, pointer:: fPtr
real(kind=rk), private :: electricField(fun%elemLvl(iLevel)%nElems*3)
real(kind=rk), private :: EF_elem(3)
integer, private :: iElem
integer, private :: nElems
integer, private :: iDir
integer, private :: posInTotal
integer, private :: iField
integer, private :: iField_2
integer, private :: depField
integer, private :: nScalars
integer, private :: QQ
integer, private :: nInputStates
real(kind=rk), private :: mass_dens(varSys%nStateVars)
real(kind=rk), private :: massFrac(varSys%nStateVars)
real(kind=rk), private :: num_dens(varSys%nStateVars)
real(kind=rk), private :: moleFrac(varSys%nStateVars)
real(kind=rk), private :: charge_dens
real(kind=rk), private :: diffForce_cs2inv
real(kind=rk), private :: diffForce_cs2inv_sqr
real(kind=rk), private :: omegaTerm
real(kind=rk), private :: mixVel(3)
real(kind=rk), private :: inv_rho
real(kind=rk), private :: ucx
real(kind=rk), private :: uMinusCX(3)
real(kind=rk), private, dimension(varSys%nStateVars):: chargeTerm
real(kind=rk), private :: minMolWeight
real(kind=rk), private :: forceTerm
real(kind=rk), private, dimension(3, varSys%nStateVars ):: spcForce
real(kind=rk), private, dimension(3, varSys%nStateVars ):: vel
real(kind=rk), private, dimension(3, varSys%nStateVars ):: spcForce_WTDF
real(kind=rk), private, dimension(varSys%nStateVars, varSys%nStateVars):: thermodynamic_fac
real(kind=rk), private, dimension(varSys%nStateVars, varSys%nStateVars):: inv_thermodyn_fac
integer, private :: statePos
integer, private :: dens_pos
integer, private :: mom_pos(3)
integer, private :: elemOff