eos_idealgas
Module
Description
$Id$
Equation of state for an ideal gas without ionization.
** 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., leos_ionization=.false., leos_fixed_ionization=.false., leos_temperature_ionization=.false. CPARAM logical, parameter :: leos_idealgas = .true., leos_chemistry = .false.
MVAR CONTRIBUTION 0
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; glnmumol(3); ppvap; csvap2 PENCILS PROVIDED TTb; rho_anel; eth; geth(3); del2eth; heth(3,3) PENCILS PROVIDED eths; geths(3); rho1gpp(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
cdata: $Id$general(keep_compiler_quiet()): $Id$messages: $Id$densitymethods(getlnrho(),getrho(),getrho_s()): 11-mar-15/MR: Created to avoid circular dependencies with EquationOfState.sharedvariables(get_shared_variable()): $Id$
Variables
- equationofstate/calc_pencils_eos [public]
- equationofstate/calc_pencils_eos_pencpar [private]
- equationofstate/calc_pencils_eos_std [private]
- equationofstate/cp [real,private/optional/default=impossible]
- equationofstate/cp1 [real,private/optional/default=impossible]
- equationofstate/cp_const [real,public/optional/default=impossible]
- equationofstate/cs0 [real,public/optional/default=impossible]
- equationofstate/cs20 [real,public/optional/default=1.0]
- equationofstate/cs20_tdep_rate [real,private/optional/default=1.0]
- equationofstate/cs2_tdep_ascale_power [real,private/optional/default=0.0]
- equationofstate/cs2bot [real,public/optional/default=impossible]
- equationofstate/cs2top [real,public/optional/default=impossible]
- equationofstate/cs_t [real,private/optional/default=1.0]
- equationofstate/cv [real,private/optional/default=impossible]
- equationofstate/cv1 [real,private/optional/default=impossible]
- equationofstate/enum_tdep_cs2_type [integer,private/optional/default=0]
- equationofstate/eos_before_boundary [public]
- equationofstate/eoscalc [public]
- equationofstate/eoscalc_farray [private]
- equationofstate/eoscalc_pencil [private]
- equationofstate/eoscalc_point [private]
- equationofstate/eoscalc_point_f [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/get_cp [private]
- equationofstate/get_cv [private]
- equationofstate/gz_coeff [real,private/optional/default=0.0]
- equationofstate/gztype [character,private/optional/default='zero']
- 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/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=0]
- equationofstate/init_eos [public]
- equationofstate/ioncalc [public]
- 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/lanelastic_lin [logical,private/optional/default=.false.]
- equationofstate/lcs2_tdep [logical,private/optional/default=.false.]
- equationofstate/lcs_as_aux [logical,private/optional/default=.false.]
- equationofstate/lcs_as_comaux [logical,private/optional/default=.false.]
- 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/lhubble_eos [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/lrelativistic_eos [logical,private/pointer]
- equationofstate/lstratset [logical,private/optional/default=.false.]
- equationofstate/mpoly [real,private/pointer]
- equationofstate/mu [real,private/optional/default=1.0]
- equationofstate/pp0 [real,private/optional/default=1.0]
- equationofstate/pr_number [real,public/optional/default=0.7]
- equationofstate/pres_corr [real,private/optional/default=0.1]
- 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/rho0 [real,public/optional/default=1.0]
- equationofstate/rho01 [real,private/optional/default=1.0]
- equationofstate/set_stratz [private]
- equationofstate/sigmasbt [real,private/optional/default=1.0]
- equationofstate/tdep_cs2_type [character,private/optional/default='exponential']
- equationofstate/tt0 [real,private/optional/default=impossible]
- equationofstate/xbot [integer,private/parameter/optional/default=1]
- equationofstate/xhe [real,private/optional/default=0.0]
- equationofstate/xtop [integer,private/parameter/optional/default=nx]
Subroutines and functions
- subroutine equationofstate/register_eos()
Register variables from the EquationOfState module.
14-jun-03/axel: adapted from register_eos
- subroutine equationofstate/units_eos()
This routine calculates things related to units and must be called before the rest of the units are being calculated.
- 22-jun-06/axel: adapted from initialize_eos
4-aug-09/axel: added possibility of vertical profile function
- subroutine equationofstate/initialize_eos(f)
- Parameters:
f (,,*,*) [real,contiguous]
- Use :
farraymanager,sharedvariables(get_shared_variable()),sub(register_report_aux())- Call to:
register_report_aux(),not_implemented(),fatal_error(),g2ij(),del6(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/select_eos_variable(variable, findex)
Select eos variable.
02-apr-06/tony: implemented
- Parameters:
variable [character,in]
findex [integer,in]
- Use :
- Call to:
fatal_error(),not_implemented(),g2ij(),del6(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/getmu([f[, mu_tmp]])
Calculate average particle mass in the gas relative to
12-aug-03/tony: implemented
- Parameters:
f (,,*,*) [real,contiguous]
mu_tmp [real,out,]
- Call to:
not_implemented(),fatal_error(),g2ij(),del6(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/rprint_eos(lreset[, lwrite])
- Parameters:
lreset [logical]
lwrite [logical]
- Call to:
not_implemented(),fatal_error(),g2ij(),del6(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/get_slices_eos(f, slices)
- Parameters:
f (,,*,*) [real,contiguous]
slices [slice_data]
- Use :
- Call to:
not_implemented(),fatal_error(),g2ij(),del6(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/pencil_criteria_eos()
All pencils that the EquationOfState module depends on are specified here.
02-apr-06/tony: coded
- subroutine equationofstate/pencil_interdep_eos(lpencil_in)
Interdependency among pencils from the EquationOfState module is specified here.
20-nov-04/anders: coded 15-jul-10/axel: added gTT calculation for ilnrho_ss,irho_ss case
- Parameters:
lpencil_in (npencils) [logical]
- Call to:
not_implemented(),fatal_error(),g2ij(),del6(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/getdensity(ee, tt, yh, rho)
- Parameters:
ee [real,in]
tt [real,in]
yh [real,in]
rho [real,inout]
- Call to:
fatal_error(),not_implemented(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- 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:
fatal_error(),not_implemented(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/temperature_gradient(f, glnrho, gss, glntt)
Calculate thermodynamical quantities and optionally glnPP and glnTT gP/rho=cs2*(glnrho+cp1*gss)
17-nov-03/tobi: adapted from subroutine eoscalc
- subroutine equationofstate/temperature_laplacian(f, p)
Calculate thermodynamical quantities and optionally glnPP and glnTT gP/rho=cs2*(glnrho+cp1*gss)
17-nov-03/tobi: adapted from subroutine eoscalc
- Parameters:
f (,,*,*) [real,in,contiguous]
p [pencil_case]
- Use :
- Call to:
fatal_error(),not_implemented(),get_soundspeed(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/temperature_hessian(f, hlnrho, hss, hlntt)
Calculate thermodynamical quantities, cs2 and cp1 and optionally hlnPP and hlnTT hP/rho=cs2*(hlnrho+cp1*hss)
17-nov-03/tobi: adapted from subroutine eoscalc
- subroutine equationofstate/get_soundspeed(tt, cs2)
- Parameters:
tt [real,in]
cs2 [real,out]
- subroutine equationofstate/read_eos_init_pars(iomsg)
- Parameters:
iomsg [character,out]
- Use :
- Call to:
fatal_error(),get_soundspeed(),not_implemented(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/write_eos_init_pars(unit)
- Parameters:
unit [integer,in]
- Call to:
fatal_error(),get_soundspeed(),not_implemented(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/read_eos_run_pars(iomsg)
- Parameters:
iomsg [character,out]
- Use :
- Call to:
fatal_error(),get_soundspeed(),not_implemented(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/write_eos_run_pars(unit)
- Parameters:
unit [integer,in]
- Call to:
fatal_error(),get_soundspeed(),not_implemented(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/isothermal_entropy(lnrho_arr, t0, ss_arr)
Isothermal stratification (for lnrho and ss) This routine should be independent of the gravity module used. When entropy is present, this module also initializes entropy.
Sound speed (and hence Temperature), is initialised to the reference value:
sound speed: cs^2_0 from start.in density: rho0 = exp(lnrho0)
- 11-jun-03/tony: extracted from isothermal routine in Density module
to allow isothermal condition for arbitrary density
17-oct-03/nils: works also with leos_ionization=T 18-oct-03/tobi: distributed across ionization modules 20-jan-15/MR: changes for use of reference state
- subroutine equationofstate/get_average_pressure(init_average_density, average_density, average_pressure)
01-dec-2009/piyali+dhruba: coded
- Parameters:
init_average_density [real,in]
average_density [real,in]
average_pressure [real,inout]
- Call to:
not_implemented(),fatal_error(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_flux_turb(f, topbot)
Black body boundary condition for entropy (called when bcz=’Fgs’) setting F = sigmaSBt*T^4 where sigmaSBt is related to the Stefan-Boltzmann constant.
04-may-2009/axel: adapted from bc_ss_flux 31-may-2010/pete: replaced sigmaSB by a `turbulent’ sigmaSBt
- 4-jun-2015/MR: corrected sign of dsdz_xy for bottom boundary;
added branches for Kramers heat conductivity (using sigmaSBt!)
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),not_implemented(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_flux_turb_x(f, topbot)
Black body boundary condition for entropy (called when bcx=’Fgs’) setting F = sigmaSBt*T^4 where sigmaSBt is related to the Stefan-Boltzmann constant.
31-may-2010/pete: adapted from bc_ss_flux_turb 20-jul-2010/pete: expanded to take into account hcond/=0 21-jan-2015/MR: changes for reference state. 22-jan-2015/MR: corrected bug in branches for pretend_lnTT=T
6-jun-2015/MR: added branches for Kramers heat conductivity (using sigmaSBt!)
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),not_implemented(),getdlnrho_x(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_flux_condturb_x(f, topbot)
Constant conductive + turbulent flux through the surface
08-apr-2014/pete: coded 21-jan-2015/MR: changes for reference state.
- 4-jun-2015/MR: added missing factor cp in RB;
added branches for Kramers heat conductivity
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
not_implemented(),getdlnrho_x(),fatal_error(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_flux_condturb_mean_x(f, topbot)
Constant conductive + turbulent flux through the surface applied on the spherically symmetric part, zero gradient for the fluctuation at the boundary.
18-dec-2014/pete: coded
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
not_implemented(),fatal_error(),getdlnrho_z(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_x(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_flux_condturb_z(f, topbot)
Constant conductive + turbulent flux through the surface
- 15-jul-2014/pete: adapted from bc_ss_flux_condturb_x
- 4-jun-2015/MR: added missing factor cp in RB
added branches for Kramers heat conductivity
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
not_implemented(),getdlnrho_z(),fatal_error(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_x(),getdlnrho_y(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_temp_old(f, topbot)
boundary condition for entropy: constant temperature
23-jan-2002/wolf: coded 11-jun-2002/axel: moved into the entropy module
8-jul-2002/axel: split old bc_ss into two
23-jun-2003/tony: implemented for leos_fixed_ionization 26-aug-2003/tony: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_temp_x(f, topbot)
boundary condition for entropy: constant temperature
3-aug-2002/wolf: coded
26-aug-2003/tony: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_temp_y(f, topbot)
boundary condition for entropy: constant temperature
3-aug-2002/wolf: coded
26-aug-2003/tony: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_temp_z(f, topbot[, lone_sided])
boundary condition for entropy: constant temperature
3-aug-2002/wolf: coded
26-aug-2003/tony: distributed across ionization modules 11-oct-2016/MR: changes for use of one-sided BC formulation (chosen by setting new optional switch lone_sided) 07-dec-2024/Kishore: remove l2nd=T from the set_ghosts_for_onesided_ders calls;
verified that fradz_Kprof is now constant in the steady state of a 1D thermal conduction problem.
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
lone_sided [logical]
- Use :
- Call to:
fatal_error(),set_ghosts_for_onesided_ders(),warning(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- 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
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
fatal_error(),warning(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_lnrho_pressure_z(f, topbot)
boundary condition for lnrho: constant pressure
4-apr-2003/axel: coded 1-may-2003/axel: added the same for top boundary
19-aug-2005/tobi: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
fatal_error(),warning(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_temp2_z(f, topbot)
boundary condition for entropy: constant temperature
3-aug-2002/wolf: coded
26-aug-2003/tony: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),warning(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_temp3_z(f, topbot)
boundary condition for entropy: constant temperature
22-jan-2013/axel: coded to impose cs2bot and dcs2bot at bottom
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
warning(),fatal_error(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_stemp_x(f, topbot)
boundary condition for entropy: symmetric temperature
3-aug-2002/wolf: coded
26-aug-2003/tony: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
getdlnrho_x(),fatal_error(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_stemp_y(f, topbot)
boundary condition for entropy: symmetric temperature
3-aug-2002/wolf: coded
26-aug-2003/tony: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
fatal_error(),getdlnrho_y(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_stemp_z(f, topbot)
boundary condition for entropy: symmetric temperature
3-aug-2002/wolf: coded
26-aug-2003/tony: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Use :
- Call to:
fatal_error(),getdlnrho_z(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_a2stemp_x(f, topbot)
Boundary condition for entropy: adopt boundary value for temperature in the ghost zone to handle shock profiles in interstellar with steep +ve 1st derivative in cooled remnant shells, followed by steep -ve 1st derivative inside remnant. s or a2 for temperature both unstable and unphysical as the unshocked exterior ISM will be comparatively homogeneous, hence allowing the ghost zone to fluctuate matching the boundary values is a reasonable approx of the physical flow, whilst avoiding unphysical spikes to wreck the calculation.
25-2010/fred: adapted from bc_ss_stemp_z
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_a2stemp_y(f, topbot)
Boundary condition for entropy: adopt boundary value for temperature in the ghost zone to handle shock profiles in interstellar with steep +ve 1st derivative in cooled remnant shells, followed by steep -ve 1st derivative inside remnant. s or a2 for temperature both unstable and unphysical as the unshocked exterior ISM will be comparatively homogeneous, hence allowing the ghost zone to fluctuate matching the boundary values is a reasonable approx of the physical flow, whilst avoiding unphysical spikes to wreck the calculation.
25-2010/fred: adapted from bc_ss_stemp_z
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_a2stemp_z(f, topbot)
Boundary condition for entropy: adopt boundary value for temperature in the ghost zone to handle shock profiles in interstellar with steep +ve 1st derivative in cooled remnant shells, followed by steep -ve 1st derivative inside remnant. s or a2 for temperature both unstable and unphysical as the unshocked exterior ISM will be comparatively homogeneous, hence allowing the ghost zone to fluctuate matching the boundary values is a reasonable approx of the physical flow, whilst avoiding unphysical spikes to wreck the calculation.
25-2010/fred: adapted from bc_ss_stemp_z
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_ss_energy(f, topbot)
boundary condition for entropy
may-2002/nils: coded 11-jul-2002/nils: moved into the entropy module 26-aug-2003/tony: distributed across ionization modules
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
fatal_error(),not_implemented(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_stellar_surface(f, topbot)
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
- Call to:
not_implemented(),fatal_error(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_lnrho_cfb_r_iso(f, topbot)
Boundary condition for radial centrifugal balance
- This sets
partial_{r} lnrho
- such that
(partial_{r} p)/rho = cs^2 partial_{r} lnrho} = uphi**2/rad - partial_{r} Phi
where Phi is the gravitational potential
i.e. it enforces centrifugal balance at the boundary.
As it is, works only for isobaric, isothermal and cylindrical coordinates
21-aug-2006/wlad: coded
- Parameters:
f (,,*,*) [real,inout,contiguous]
topbot [integer,in]
- Use :
gravity(potential()),sub(div())- Call to:
not_implemented(),fatal_error(),getrho_s(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_lnrho_hds_z_iso(f, topbot)
Boundary condition for density and entropy.
- This sets
partial_{z} lnrho
- such that
partial_{z} p = rho g_{z},
i.e. it enforces hydrostatic equlibrium at the boundary.
- Currently this is only correct if
partial_{z} lnT = 0
at the boundary.
12-Juil-2006/dintrans: coded
- Parameters:
f (,,*,*) [real,inout,contiguous]
topbot [integer,in]
- Use :
gravity(potential(),gravz()),sub(div())- Call to:
fatal_error(),getrho_s(),not_implemented(),div(),fourier_transform_xy_xy(),get_stratz()
- subroutine equationofstate/bc_lnrho_hdss_z_iso(f, topbot)
Smooth out density perturbations with respect to hydrostatic stratification in Fourier space.
Note: Since boundconds_x and boundconds_y are called first, this doesn’t set the corners properly. However, this is not a problem since cross derivatives of density are never needed.
05-jul-07/tobi: Adapted from bc_aa_pot3
- Parameters:
f (,,*,*) [real,inout,contiguous]
topbot [integer,in]
- Use :
fourier(fourier_transform_xy_xy(),fourier_transform_other(),kx_fft(),ky_fft()),gravity(potential())- Call to:
- subroutine equationofstate/bc_ism(f, topbot, j)
30-nov-15/fred: Replaced bc_ctz and bc_cdz. Apply observed scale height locally from Reynolds 1991, Manchester & Taylor 1981 for warm ionized gas - dominant scale height above 500 parsecs. Apply constant local temperature across boundary for entropy. Motivation to prevent numerical spikes in shock fronts, which cannot be absorbed in only three ghost cells, but boundary thermodynamics still responsive to interior dynamics. 06-jun-22/fred update to allow setting scale height in start.in or run.in default is density_scale_factor=impossible so that scale_factor is 0.9, assuming unit_length = 1 kpc and scale is 400 pc. To change scale height add to start_pars or run_pars density_scale_factor=… in dimensionless units
- Parameters:
f (,,*,*) [real,contiguous]
topbot [integer,in]
j [integer]
- Call to:
- subroutine equationofstate/get_stratz(z[, rho0z[, dlnrho0dz[, eth0z]]])
Get background stratification in z direction.
13-oct-14/ccyang: coded.
- Parameters:
z (*) [real,in]
rho0z (*) [real,out,]
dlnrho0dz (*) [real,out,]
eth0z (*) [real,out,]
- Call to:
- subroutine equationofstate/pushpars2c(p_par)
- Parameters:
p_par (200) [integer]
- Use :
syscalls(copy_addr()),general(string_to_enum())