module mod_physics_vars_mhd use mod_global_parameters, only: name_len, ndim implicit none public double precision :: phys_gamma=5.d0/3.d0 !> String describing the physics type of the simulation character(len=name_len) :: physics_type = "mhd" !> To use wider stencils in flux calculations. A value of 1 will extend it by !> one cell in both directions, in any dimension integer :: phys_wider_stencil = 0 !> Array per direction per variable, which can be used to specify that certain !> fluxes have to be treated differently integer, allocatable :: flux_type(:, :) !> Indicates a normal flux integer, parameter :: flux_default = 0 !> Indicates the flux should be treated with tvdlf integer, parameter :: flux_tvdlf = 1 !> Whether the physics routines require diagonal ghost cells, for example for !> computing a curl. logical :: phys_req_diagonal = .true. !> Solve energy equation or not logical :: phys_energy=.false. !> Solve total energy equation or not logical :: phys_total_energy=.false. !> Solve internal energy instead of total energy logical :: phys_internal_e=.false. !> Solve partially ionized one-fluid plasma logical :: phys_partial_ionization=.false. !> if equilibrium pressure is splitted logical :: phys_equi_pe=.false. integer, parameter :: dp = kind(0.0d0) integer, parameter, public :: nw_phys=2+2*ndim+1+1 & + ndim integer, parameter, public :: nw_flux=2+2*ndim+1+1 & + ndim !> Whether an energy equation is used logical, public :: mhd_energy = .true. !> Index of the density (in the w array) integer, public :: rho_ !> Indices of the momentum density integer, allocatable, public :: mom(:) !> Indices of the tracers integer, public :: tracer(1) !> Index of the energy density (-1 if not present) integer, public :: e_ !> Indices of the magnetic field integer, allocatable, public :: mag(:) !> Index of the gas pressure (-1 if not present) should equal e_ integer, public :: p_ !> Indices of the GLM psi integer, public :: psi_ !> Number of tracer species integer, public :: mhd_n_tracer = 0 !> The adiabatic index double precision, public :: mhd_gamma = 5.d0/3.0d0 double precision, public :: gamma_1, inv_gamma_1 !> Helium abundance over Hydrogen double precision, public :: He_abundance=0.1d0 !> Ionization fraction of H !> H_ion_fr = H+/(H+ + H) double precision, public :: H_ion_fr=1d0 !> Ionization fraction of He !> He_ion_fr = (He2+ + He+)/(He2+ + He+ + He) double precision, public :: He_ion_fr=1d0 !> Ratio of number He2+ / number He+ + He2+ !> He_ion_fr2 = He2+/(He2+ + He+) double precision, public :: He_ion_fr2=1d0 ! used for eq of state when it is not defined by units, ! the units do not contain terms related to ionization fraction ! and it is p = RR * rho * T double precision, public :: RR=1d0 !> Switch for hyperbolic thermal conduction logical, public :: mhd_hyperbolic_thermal_conduction = .false. !> Compile-time selector for anisotropic HTC logical, public :: mhd_hyperbolic_thermal_conduction_anisotropic = .false. !> Freeze rho/v/B and evolve only the energy equation (compile-time MHD_ENERGY_ONLY flag) logical, public :: mhd_energy_only = .false. !> sig_par = tc_kappa_par (constant, no T^2.5); takes precedence over tc_kappa0_par when > 0 double precision, public :: tc_kappa_par = -1.0d0 !> sig_perp = tc_kappa_perp (constant, no T^2.5); takes precedence over the Braginskii closure when > 0 double precision, public :: tc_kappa_perp = -1.0d0 ! HYPERTC_ANISO implies HYPERTC (enforced in config_schema.toml) !> sig_par = tc_kappa0_par * Te^2.5; if <= 0 and tc_kappa_par <= 0, set from Spitzer in phys_units() double precision, public :: tc_kappa0_par = -1.0d0 !> Indices of the heat-flux vector components q_(1:ndir); this is the full Cartesian heat-flux vector integer, allocatable, public :: q_(:) !> Magnetisation chi prefactor: chi = htc_Cchi * B * Te^1.5 / n double precision, public :: htc_Cchi = 0.0d0 !> GLM-MHD parameter: ratio of the diffusive and advective time scales for div b !> taking values within [0, 1] double precision, public :: mhd_glm_alpha = 0.5d0 !> Whether to use gravity logical, public :: mhd_gravity = .false. !> The resistivity double precision, public :: mhd_eta = 0.0d0 !> switch for adding resistive terms logical, public :: mhd_resistivity = .false. !> Whether plasma is partially ionized logical, public :: mhd_partial_ionization = .false. !> switch for radiative cooling logical, public :: mhd_radiative_cooling = .false. !> Whether particles module is added logical, public :: mhd_particles = .false. !> switch for source user logical, public :: mhd_source_usr = .false. end module mod_physics_vars_mhd