applySrc_electricFieldNP Subroutine

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

Update state with source variable "electric field"

Where \S is the source term S = (Dw/cs^2)(z_iF/(RT))*n_i.E Simuilar to derive routine but it updates the state whereas derive is used for tracking.

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.


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


proc~~applysrc_electricfieldnp~~CallsGraph proc~applysrc_electricfieldnp applySrc_electricFieldNP species species proc~applysrc_electricfieldnp->species



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 :: elemOff
integer, private :: iField
integer, private :: nFields
integer, private :: depField
integer, private :: nScalars
integer, private :: QQ
integer, private :: nInputStates
real(kind=rk), private :: num_dens(varSys%nStateVars)
real(kind=rk), private :: gasConstLB
real(kind=rk), private, dimension(3, varSys%nStateVars ):: electricTerm
real(kind=rk), private, dimension(varSys%nStateVars):: omega_fac
real(kind=rk), private :: force_fac
real(kind=rk), private :: faradayLB
real(kind=rk), private :: forceTerm