initStandardTextbook Module Subroutine

module subroutine initStandardTextbook(textbookObj, gridObj, geometryObj, partObj, vSpaceObj, normObj, speciesListObj, varList, jsonCont, mpiCont)

Initialize standard textbook object based on grid, geometry, partition, species, and normalization data as well as a JSON file. Assumes that the velocity grid is normalized to electron thermal speed. The textbook includes (passed variables are in appearance order unless otherwise specified):

"flowSpeedFromFlux" = flux/density (normalized to n_0 * u_0) "sonicSpeed" for each ion species (negative IDs) = sqrt((poly_e * T_e + poly_i * T_i)/m_i) where i is the index of the ion species (normalized to u_0) "tempFromEnergy" for each species specified in config file as requiring temperature derivation = 2/3 * energy/density - mass * flux2/(3*density2) "leftElectronGamma" = sheath heat transmission coeffiecient for electrons at the left boundary using T_e and T_i "rightElectronGamma" = sheath heat transmission coefficient for electrons at the right boundary using T_e and T_i "densityMoment" = zeroth moment of f_0 "energyMoment" = second order of f_0 "cclDragCoeff" = Chang-Cooper-Langdon drag coefficient - assumes passed variable is the single harmonic f_0 "cclDiffusionCoeff" = Chang-Cooper-Langdon diffusion coefficient - assumes passed variables are the single harmonic f_0 and cclWeight "cclWeight" = Chang-Cooper-Langdon interpolation weight - assumes passed variables are the single harmonic cclDragCoeff and cclDiffusionCoeff if l=1 is resolved: "fluxMoment" = first moment of f_1/3 (normalized to n_0u_0) "heatFluxMoment" = third moment of f_1/3 (normalized to m_e * n_0 * v_th3 / 2) if l=2 is resolved: "viscosityTensorxxMoment" = second moment of 2f_2/15 (normalized to n_0 * e * T_0) Interpolation for staggered grids:
"gridToDual" = interpolates one variable from regular to staggered(dual) grid "dualToGrid" = interpolates one variable from staggered(dual) to regular grid "distributionInterp" = interpolates one distribution function (even harmonics to dual, odd to regular grid) Other useful derivations: "gradDeriv" = calculates gradient of variable on regular grid, interpolating on cell faces and extrapolating at boundaries "logLei" = calculates electron-ion Coulomb log taking in electron temperature and density (derivations added for each ion species) "logLee" = calculates electron self collision Coulomb log taking in electron temperature and density "logLii" = calculates ion-ion collision frequency for each ion collision combination taking in the two species temperatures and densities (used as"logLiis_S" where s and S are the first and second ion species name) "maxwellianDistribution" = calculates distribution function with Maxwellian l=0 harmonic and all other harmonics 0. Takes in temperature and density Also automatically includes all defined custom derivations

Arguments

Type IntentOptional Attributes Name
type(Textbook), intent(inout) :: textbookObj
type(Grid), intent(in) :: gridObj
type(Geometry), intent(in) :: geometryObj
type(Partition), intent(in) :: partObj
type(VSpace), intent(in) :: vSpaceObj
class(Normalization), intent(in) :: normObj
type(SpeciesList), intent(in) :: speciesListObj
type(VariableList), intent(in) :: varList
type(JSONController), intent(inout) :: jsonCont

JSONController used to get parameters from ./config.json

type(MPIController), intent(inout) :: mpiCont

MPIController used with JSONController