electron_fluid_equations

moment_kinetics.electron_fluid_equations.calculate_Epar_from_electron_force_balance!Method

solve the electron force balance (parallel momentum) equation for the parallel electric field, Epar: Epar = -dphi/dz = (2/ne) * (-dppare/dz + frictionforce + ne * me * nn * Ren * (un - ue)) NB: in 1D only Epar is needed for update of ion pdf, so boundary phi is irrelevant inputs: dense = electron density dppardz = zed derivative of electron parallel pressure nuei = electron-ion collision frequency friction = electron-ion parallel friction force nneutralspecies = number of evolved neutral species chargeexchange = electron-neutral charge exchange frequency meovermi = electron-ion mass ratio densn = neutral density uparn = neutral parallel flow upare = electron parallel flow output: Epar = parallel electric field

source
moment_kinetics.electron_fluid_equations.calculate_electron_density!Method

use quasineutrality to obtain the electron density from the initial densities of the various ion species: sumi densi = dense inputs: dense = electron density at previous time level updated = flag indicating if the electron density is updated densi = updated ion density output: dense = updated electron density updated = flag indicating that the electron density has been updated

source
moment_kinetics.electron_fluid_equations.calculate_electron_qpar!Method

calculate the parallel component of the electron heat flux. there are currently two supported options for the parallel heat flux: Braginskii collisional closure - qpare = -3.16*ppare/(me*nuei)dT/dz - 0.71ppare*(upari-upare) collisionless closure - d(qpare)/dz = 0 ==> qpare = constant inputs: qpare = parallel electron heat flux at the previous time level qparupdated = flag indicating whether qpar is updated already pdf = electron pdf ppare = electron parallel pressure upare = electron parallel flow vthe = electron thermal speed dTedz = zed derivative of electron temperature upari = ion parallel flow nuei = electron-ion collision frequency meovermi = electron-to-ion mass ratio electronmodel = choice of model for electron physics vpa = struct containing information about the vpa coordinate output: qpare = updated parallel electron heat flux qparupdated = flag indicating that the parallel electron heat flux is updated

source
moment_kinetics.electron_fluid_equations.calculate_electron_upar_from_charge_conservation!Method

use charge conservation equation to solve for the electron parallel flow density: d/dz(sumi ni upari - ne upare) = 0 ==> {sumi ni upari}(z) - {sumi ni upari}(zbound) = {ne upare}(z) - {ne upare}(zbound) inputs: upare = should contain updated electron parallel flow at boundaries in zed updated = flag indicating whether the electron parallel flow is already updated dense = electron particle density upari = ion parallel flow density densi = ion particle density output: upare = contains the updated electron parallel flow

source
moment_kinetics.electron_fluid_equations.electron_energy_residual!Method
electron_energy_residual!(residual, electron_ppar_out, electron_ppar, in,
                          fvec_in, moments, collisions, composition,
                          external_source_settings, num_diss_params, z, dt, ir)

The residual is a function whose input is electron_ppar, so that when it's output residual is zero, electronppar is the result of a backward-Euler timestep: (fout - fin) / dt = RHS(fout) ⇒ (fout - fin) - dt*RHS(f_out) = 0

This function assumes any needed moment derivatives are already calculated using electron_ppar_out and stored in moments.electron.

Note that this function operates on a single point in r, given by ir, and residual, electron_ppar_out, and electron_ppar_in should have no r-dimension.

source