eos_idealgas_vapor

Module

Description

$Id$

Equation of state for an ideal gas with variable water vapour.

** AUTOMATIC CPARAM.INC GENERATION ************************ Declare (for generation of cparam.inc) the number of f array variables and auxiliary variables added by this module

CPARAM logical, parameter :: leos = .true. CPARAM logical, parameter :: leos_ionization = .false., leos_temperature_ionization=.false. CPARAM logical, parameter :: leos_idealgas = .false., leos_chemistry = .false.

MVAR CONTRIBUTION 0 MAUX CONTRIBUTION 3

PENCILS PROVIDED ss; gss(3); ee; pp; lnTT; cs2; cp; cp1; cp1tilde PENCILS PROVIDED glnTT(3); TT; TT1; gTT(3); yH; hss(3,3); hlnTT(3,3) PENCILS PROVIDED del2ss; del6ss; del2lnTT; cv; cv1; del6lnTT; gamma PENCILS PROVIDED del2TT; del6TT; mumol; mumol1; glnmumol(3) PENCILS PROVIDED rho_anel; ppvap; csvap2; fvap; gfvap(3)


Quick access

Variables:

b_ext_eos, bc_lnrho_hdss_z_liso, calc_pencils_eos, calc_pencils_eos_pencpar, calc_pencils_eos_std, chih_ev, chihminus_ev, cp_const, cpdry, cpdry1, cs0, cs20, cs20_tdep_rate, cs2_tdep_ascale_power, cs2bot, cs2top, cvdry, cvdry1, dlnrho0dz, ee_ion, enum_tdep_cs2_type, eos_before_boundary, eos_update_aux, eoscalc, eoscalc_elem, eoscalc_farray, eoscalc_farray_range, eoscalc_pencil, eoscalc_point, eoscalc_point_f, eosperturb, error_cp, fac_cs, find_mass, get_average_pressure, get_cp, get_cv, get_soundspeed, get_ss, get_ss_pencil, get_stratz, getmu, gz_coeff, gztype, ics, icv, idelta, ieosvar1, ieosvar2, ieosvar_count, ieosvars, ifvap, iglobal_cs2, iglobal_glntt, imumol1, inabad, init_eos, input_file, ioncalc, ioninit, isothermal_lnrho_ss, isothmid, ivars_mod, kappa0, kappa_cst, l_cp, l_gamma, l_gamma_m1, lcalc_cp, lcalc_cp_full, lcheminp_eos, lconst_yh, lcp_as_aux, lcs2_tdep, lcs_as_aux, lcs_as_comaux, lcv_as_aux, ldelta_as_aux, leos_isentropic, leos_isobaric, leos_isochoric, leos_isothermal, leos_localisothermal, lgamma_as_aux, lhminus_opacity_correction, lhubble_eos, linterp_pressure, ll1, ll2, lnabad_as_aux, lnpp_bot, lnrho0, lnrho_e, lnrho_e_, lnrho_h, lnrho_he, lnrho_p, lntt_ion, lntt_ion_, lnttlnrho, lnttss, lpp_as_aux, lpres_grad, lrevise_chih_ev, lrevise_chihminus_ev, lss_as_aux, lstratset, mm1, mm2, mu1_0, mu1_full, mu1yhxhe, mudry, mudry1, muvap, muvap1, nabla_ad, nn1, nn2, one_yh_term, opacity_type, pp0, pp_ion, pr_number, pres_corr, pressure_gradient, pressure_gradient_farray, pressure_gradient_point, read_species, read_thermodyn, rgas_cgs, rho0, rho02, rho_e, rho_e_, rho_h, rho_he, rtsafe, rtsafe_pencil, saha, scale_rgas, set_stratz, sigmasbt, srad0, ss_ion, ss_ion1, tau_relax, tdep_cs2_type, temperature_gradient, temperature_hessian, temperature_laplacian, tt_ion, tt_ion_, va2max_eos, va2power_eos, write_thermodyn, xh2, xhe, xhe_term, xtop, yh0, yh_const, yh_term, yhacc, yhmax, yhmin, ymetals

Routines:

bc_ism(), bc_lnrho_hds_z_iso(), bc_lnrho_pressure_z(), bc_lnrho_temp_z(), bc_ss_a2stemp_x(), bc_ss_a2stemp_y(), bc_ss_a2stemp_z(), bc_ss_energy(), bc_ss_flux(), bc_ss_flux_condturb_mean_x(), bc_ss_flux_condturb_x(), bc_ss_flux_condturb_z(), bc_ss_flux_turb(), bc_ss_flux_turb_x(), bc_ss_stemp_x(), bc_ss_stemp_y(), bc_ss_stemp_z(), bc_ss_temp2_z(), bc_ss_temp3_z(), bc_ss_temp_old(), bc_ss_temp_x(), bc_ss_temp_y(), bc_ss_temp_z(), bc_stellar_surface(), eos_before_boundary(), get_average_pressure(), get_gamma_etc(), get_slices_eos(), get_soundspeed(), get_stratz(), getdensity(), getmu(), getpressure(), gettemperature(), init_eos(), initialize_eos(), ioncalc(), isothermal_entropy(), isothermal_lnrho_ss(), pencil_criteria_eos(), pencil_interdep_eos(), read_eos_init_pars(), read_eos_run_pars(), register_eos(), rprint_eos(), select_eos_variable(), temperature_gradient(), temperature_hessian(), temperature_laplacian(), units_eos(), write_eos_init_pars(), write_eos_run_pars()

Needed modules

Variables

  • equationofstate/bc_lnrho_hdss_z_liso [private]
  • equationofstate/calc_pencils_eos [public]
  • equationofstate/calc_pencils_eos_pencpar [private]
  • equationofstate/calc_pencils_eos_std [private]
  • equationofstate/cp_const [real,public/optional/default=impossible]
  • equationofstate/cpdry [real,private/optional/default=impossible]
  • equationofstate/cpdry1 [real,private/optional/default=impossible]
  • equationofstate/cs0 [real,public/optional/default=1.0]
  • equationofstate/cs20 [real,public/optional/default=1.0]
  • equationofstate/cs2bot [real,public/optional/default=1.0]
  • equationofstate/cs2top [real,public/optional/default=1.0]
  • equationofstate/cvdry [real,private/optional/default=impossible]
  • equationofstate/cvdry1 [real,private/optional/default=impossible]
  • equationofstate/eos_update_aux [private]
  • equationofstate/eoscalc [public]
  • equationofstate/eoscalc_farray [private]
  • equationofstate/eoscalc_pencil [private]
  • equationofstate/eoscalc_point [private]
  • equationofstate/eoscalc_point_f [private]
  • equationofstate/eosperturb [private]
  • equationofstate/error_cp [real,private/optional/default=1e-06]
  • equationofstate/fac_cs [real,private/optional/default=1.0]
  • equationofstate/gamma [real,private/optional/default=1.6666666666666667]
  • equationofstate/gamma1 [real,private]
  • equationofstate/gamma_m1 [real,private]
  • equationofstate/getmu_array [private]
  • equationofstate/ieosvar1 [integer,private/optional/default=-1]
  • equationofstate/ieosvar2 [integer,private/optional/default=-1]
  • equationofstate/ieosvar_count [integer,private/optional/default=0]
  • equationofstate/ieosvars [integer,private/optional/default=-1]
  • equationofstate/ifvap [integer,private/optional/default=0]
  • equationofstate/iglobal_cs2 [integer,private]
  • equationofstate/iglobal_glntt [integer,private]
  • equationofstate/ilnrho_cs2 [integer,parameter=5]
  • equationofstate/ilnrho_ee [integer,parameter=2]
  • equationofstate/ilnrho_eth [integer,parameter=14]
  • equationofstate/ilnrho_lntt [integer,parameter=4]
  • equationofstate/ilnrho_pp [integer,parameter=3]
  • equationofstate/ilnrho_ss [integer,parameter=1]
  • equationofstate/ilnrho_tt [integer,parameter=9]
  • equationofstate/imass [integer,public/optional/default=1]
  • equationofstate/imumol1 [integer,private/optional/default=0]
  • equationofstate/ioninit [private]
  • equationofstate/ipp_cs2 [integer,parameter=12]
  • equationofstate/ipp_ss [integer,parameter=11]
  • equationofstate/irho_cs2 [integer,parameter=6]
  • equationofstate/irho_ee [integer,parameter=15]
  • equationofstate/irho_eth [integer,parameter=13]
  • equationofstate/irho_lntt [integer,parameter=8]
  • equationofstate/irho_pp [integer,parameter=16]
  • equationofstate/irho_ss [integer,parameter=7]
  • equationofstate/irho_tt [integer,parameter=10]
  • equationofstate/isothmid [integer,private/optional/default=0]
  • equationofstate/leos_isentropic [logical,private/optional/default=.false.]
  • equationofstate/leos_isobaric [logical,private/optional/default=.false.]
  • equationofstate/leos_isochoric [logical,private/optional/default=.false.]
  • equationofstate/leos_isothermal [logical,private/optional/default=.false.]
  • equationofstate/leos_localisothermal [logical,private/optional/default=.false.]
  • equationofstate/lnrho0 [real,public/optional/default=0.0]
  • equationofstate/lntt0 [real,public/optional/default=impossible]
  • equationofstate/lpres_grad [logical,public/optional/default=.false.]
  • equationofstate/mudry [real,private/optional/default=1.0]
  • equationofstate/mudry1 [real,private/optional/default=1.0]
  • equationofstate/muvap [real,private/optional/default=1.0]
  • equationofstate/muvap1 [real,private/optional/default=1.0]
  • equationofstate/pp0 [real,private/optional/default=1.0]
  • equationofstate/pr_number [real,public/optional/default=0.7]
  • equationofstate/pressure_gradient [public]
  • equationofstate/pressure_gradient_farray [private]
  • equationofstate/pressure_gradient_point [private]
  • equationofstate/reference_state (*,*) [real,private/pointer]
  • equationofstate/rgas [real,private]
  • equationofstate/rgas_cgs [real,private/optional/default=0.0]
  • equationofstate/rgas_unit_sys [real,private/optional/default=1.0]
  • equationofstate/rho0 [real,public/optional/default=1.0]
  • equationofstate/species_constants (nchemspec,18) [real,private]

Subroutines and functions

subroutine  equationofstate/register_eos()

Register variables from the EquationOfState module.

06-jan-10/anders: adapted from eos_idealgas 04-dec-2024/Kishore: added shared variables (copied from eos_idealgas)

Use :

sharedvariables (put_shared_variable()), sub (register_report_aux())

Call to:

svn_id(), register_report_aux(), fatal_error(), warning(), g2ij(), del6(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/units_eos()

This routine calculates things related to units and must be called before the rest of the units are being calculated.

06-jan-10/anders: adapted from eos_idealgas

Call to:

fatal_error(), warning(), g2ij(), del6(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/initialize_eos(f)

Perform any post-parameter-read initialization

06-jan-10/anders: adapted from eos_idealgas

Parameters:

f (mx,my,mz,mfarray) [real,inout]

Use :

sharedvariables (get_shared_variable())

Call to:

warning(), fatal_error(), g2ij(), del6(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/select_eos_variable(variable, findex)

Select eos variable.

06-jan-10/anders: adapted from eos_idealgas

Parameters:
  • variable [character,in]

  • findex [integer,in]

Use :

farraymanager

Call to:

fatal_error(), g2ij(), del6(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/getmu([f, mu_tmp])

Calculate average particle mass in the gas relative to

06-jan-10/anders: adapted from eos_idealgas

Parameters:
Call to:

fatal_error(), g2ij(), del6(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/rprint_eos(lreset[, lwrite])
Parameters:
  • lreset [logical]

  • lwrite [logical]

Call to:

fatal_error(), g2ij(), del6(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/get_slices_eos(f, slices)

06-jan-10/anders: adapted from eos_idealgas

Parameters:
Call to:

fatal_error(), g2ij(), del6(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/pencil_interdep_eos(lpencil_in)

Interdependency among pencils from the EquationOfState module is specified here.

06-jan-10/anders: adapted from eos_idealgas

Parameters:

lpencil_in (npencils) [logical]

Call to:

fatal_error(), g2ij(), del6(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/ioncalc(f)
Parameters:

f (mx,my,mz,mfarray) [real]

Call to:

fatal_error(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/getdensity(ee, tt, yh, rho)
Parameters:
  • ee [real]

  • tt [real]

  • yh [real]

  • rho [real]

Call to:

fatal_error(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/gettemperature([f, tt_tmp])
Parameters:
Call to:

fatal_error(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/getpressure(pp_tmp)
Parameters:

pp_tmp (mx,my,mz) [real,out]

Call to:

fatal_error(), warning(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/get_gamma_etc([gamma_[, cp[, cv[, f]]]])
Parameters:
  • gamma [real,out,]

  • cp [real,out,]

  • cv [real,out,]

  • f (mfarray) [real,in,]

Call to:

warning(), fatal_error(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/temperature_gradient(f, glnrho, gss, glntt)
Parameters:
Call to:

fatal_error(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/temperature_laplacian(f, p)
Parameters:
Call to:

fatal_error(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/temperature_hessian(f, hlnrho, hss, hlntt)
Parameters:
Call to:

fatal_error(), not_implemented(), get_gamma_etc(), set_ghosts_for_onesided_ders()

subroutine  equationofstate/get_soundspeed(lntt, cs2)
Parameters:
  • lntt [real]

  • cs2 [real]

Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/read_eos_init_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/write_eos_init_pars(unit)
Parameters:

unit [integer,in]

Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/read_eos_run_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/write_eos_run_pars(unit)
Parameters:

unit [integer,in]

Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/isothermal_entropy(lnrho, t0, ss)
Parameters:
  • lnrho (mx,my,mz) [real,in]

  • t0 [real,in]

  • ss (mx,my,mz) [real,out]

Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/bc_ss_temp_old(f, topbot)
Parameters:
Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/bc_ss_temp_x(f, topbot)
Parameters:
Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/bc_ss_temp_y(f, topbot)
Parameters:
Call to:

fatal_error(), get_gamma_etc(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/bc_ss_temp_z(f, topbot[, lone_sided])

boundary condition for entropy: constant temperature. If lone_sided=T, it uses one-sided derivatives for the energy variable. Otherwise (default), it makes the energy variable antisymmetric about the boundary.

7-dec-2024/Kishore: copied from eos_idealgas and modified

Parameters:
  • f (mx,my,mz,mfarray) [real,inout]

  • topbot [integer,in]

  • lone_sided [logical,in,]

Use :

general (loptest()), densitymethods (getlnrho()), deriv (set_ghosts_for_onesided_ders())

Call to:

get_gamma_etc(), fatal_error(), set_ghosts_for_onesided_ders(), not_implemented()

subroutine  equationofstate/bc_lnrho_temp_z(f, topbot)

boundary condition for lnrho and ss: constant temperature

27-sep-2002/axel: coded 19-aug-2005/tobi: distributed across ionization modules 04-dec-2024/Kishore: implemented for eos_idealgas_vapor

Parameters:
Use :

gravity (gravz()), densitymethods (getlnrho())

Call to:

get_gamma_etc(), fatal_error(), not_implemented()

subroutine  equationofstate/bc_lnrho_pressure_z(f, topbot)
Parameters:
Call to:

fatal_error()

subroutine  equationofstate/bc_ss_temp2_z(f, topbot)
Parameters:
Call to:

fatal_error()

subroutine  equationofstate/bc_ss_stemp_x(f, topbot)
Parameters:
Call to:

fatal_error()

subroutine  equationofstate/bc_ss_stemp_y(f, topbot)
Parameters:
Call to:

fatal_error()

subroutine  equationofstate/bc_ss_stemp_z(f, topbot)
Parameters:
Call to:

fatal_error()

subroutine  equationofstate/bc_ss_energy(f, topbot)
Parameters:
Call to:

fatal_error()

subroutine  equationofstate/bc_ss_a2stemp_x(f, topbot)

11-mar-2012/anders: dummmy

Parameters:
Call to:

fatal_error()

subroutine  equationofstate/bc_ss_a2stemp_y(f, topbot)

11-mar-2012/anders: dummmy

Parameters:
Call to:

fatal_error()

subroutine  equationofstate/bc_ss_a2stemp_z(f, topbot)

11-mar-2012/anders: dummmy

Parameters:
Call to:

fatal_error()

subroutine  equationofstate/eos_before_boundary(f)

Put cp in the f-array so that get_gamma_etc can be used by boundary conditions.

05-dec-2024/kishore: added 07-dec-2024/Kishore: outsourced to eos_update_aux

Parameters:

f (mx,my,mz,mfarray) [real,inout]

subroutine  equationofstate/init_eos(f)

Put cp in the f-array so that get_gamma_etc can be used by initial conditions. Currently only works as intended with init_loops>1.

07-dec-2024/Kishore: added

Parameters:

f (mx,my,mz,mfarray) [real,inout]