entropy_bcs
Module
Quick access
- Variables:
bc_stellar_surface,cp,density_scale,density_scale1,hcondxbot,hcondxtop,hcondzbot,hcondztop,ilnrho_cs2,ilnrho_ee,ilnrho_eth,ilnrho_lntt,ilnrho_pp,ilnrho_ss,ilnrho_tt,ipp_cs2,ipp_ss,irho_cs2,irho_ee,irho_eth,irho_lntt,irho_pp,irho_ss,irho_tt,reference_state,ttbot,tttop- Routines:
bc_ism_energ(),bc_lnrho_hds_z_iso_energ(),bdry_magnetic(),initialize_energy_bcs()
Needed modules
cdata: $Id$densitymethods: 11-mar-15/MR: Created to avoid circular dependencies with EquationOfState.equationofstate(get_gamma_etc(),cs20(),lnrho0(),cs2bot(),cs2top()): $Id$messages: $Id$
Variables
- energybcs/b_ext (*) [real,private/pointer]
- energybcs/bc_stellar_surface [real,public]
- energybcs/chi [real,private/pointer]
- energybcs/chi_t [real,private/pointer]
- energybcs/chit_prof1 [real,private/pointer]
- energybcs/chit_prof2 [real,private/pointer]
- energybcs/chit_quenching [real,private/pointer]
- energybcs/cp [real,private]
- energybcs/cp1 [real,private]
- energybcs/cv [real,private]
- energybcs/cv1 [real,private]
- energybcs/fbot [real,private/pointer]
- energybcs/fbotkbot [real,private/pointer]
- energybcs/ftop [real,private/pointer]
- energybcs/ftopktop [real,private/pointer]
- energybcs/gamma [real,private]
- energybcs/gamma1 [real,private]
- energybcs/gamma_m1 [real,private]
- energybcs/hcond0_kramers [real,private/pointer]
- energybcs/hcondxbot [real,private/pointer]
- energybcs/hcondxtop [real,private/pointer]
- energybcs/hcondzbot [real,private/pointer]
- energybcs/hcondztop [real,private/pointer]
- energybcs/ilnrho_cs2 [integer,private/parameter/optional/default=5]
- energybcs/ilnrho_ee [integer,private/parameter/optional/default=2]
- energybcs/ilnrho_eth [integer,private/parameter/optional/default=14]
- energybcs/ilnrho_lntt [integer,private/parameter/optional/default=4]
- energybcs/ilnrho_pp [integer,private/parameter/optional/default=3]
- energybcs/ilnrho_ss [integer,private/parameter/optional/default=1]
- energybcs/ilnrho_tt [integer,private/parameter/optional/default=9]
- energybcs/ipp_cs2 [integer,private/parameter/optional/default=12]
- energybcs/ipp_ss [integer,private/parameter/optional/default=11]
- energybcs/irho_cs2 [integer,private/parameter/optional/default=6]
- energybcs/irho_ee [integer,private/parameter/optional/default=15]
- energybcs/irho_eth [integer,private/parameter/optional/default=13]
- energybcs/irho_lntt [integer,private/parameter/optional/default=8]
- energybcs/irho_pp [integer,private/parameter/optional/default=16]
- energybcs/irho_ss [integer,private/parameter/optional/default=7]
- energybcs/irho_tt [integer,private/parameter/optional/default=10]
- energybcs/lheatc_chiconst [logical,private/pointer]
- energybcs/lheatc_kramers [logical,private/pointer]
- energybcs/meanfield_beq [real,private/pointer]
- energybcs/meanfield_beq_profile [character,private]
- energybcs/meanfield_chitb [integer,private]
- energybcs/mpoly [real,private/pointer]
- energybcs/nkramers [real,private/pointer]
- energybcs/reference_state (*,*) [real,private/pointer]
- energybcs/sigmasbt [real,private/pointer]
- energybcs/uturb [real,private/pointer]
- energybcs/xbot [integer,private/parameter/optional/default=1]
- energybcs/xtop [integer,private/parameter/optional/default=nx]
Subroutines and functions
- subroutine energybcs/initialize_energy_bcs()
- subroutine energybcs/bc_ss_flux(f, topbot[, lone_sided])
constant flux boundary condition for entropy (called when bcz=’c1’)
23-jan-2002/wolf: coded 11-jun-2002/axel: moved into the entropy module
8-jul-2002/axel: split old bc_ss into two
26-aug-2003/tony: distributed across ionization modules 13-mar-2011/pete: c1 condition for z-boundaries with Kramers’ opacity
4-jun-2015/MR: factor cp added in front of tmp_xy
30-sep-2016/MR: changes for use of one-sided BC formulation (chosen by setting new optional switch lone_sided)
- Parameters:
f (,,*,*) [real]
topbot [integer,in]
lone_sided [logical]
- Use :
densitymethods(getdlnrho_z(),getderlnrho_z()),deriv(bval_from_neumann(),set_ghosts_for_onesided_ders()),general(loptest())- Call to:
not_implemented(),getderlnrho_z(),set_ghosts_for_onesided_ders(),getdlnrho_z(),fatal_error(),curl(),getdlnrho_x(),getrho_s(),getdlnrho_y()
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
fatal_error(),curl(),not_implemented(),getdlnrho_x(),getdlnrho_z(),getrho_s(),set_ghosts_for_onesided_ders(),getdlnrho_y()
- subroutine energybcs/bdry_magnetic(f, quench, task)
Calculate magnetic properties needed for z boundary conditions. This routine contains calls to more specialized routines.
8-jun-13/axel: coded, originally in magnetic, but cyclic dependence
21-jan-15/MR : changes for use of reference state.
- Parameters:
f (,,*,*) [real,in]
quench (*) [real,out]
task [character,in]
- Use :
- Call to:
curl(),fatal_error(),not_implemented(),getdlnrho_x(),getdlnrho_z(),getrho_s(),set_ghosts_for_onesided_ders(),getdlnrho_y()
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
fatal_error(),not_implemented(),getdlnrho_x(),getdlnrho_z(),getrho_s(),set_ghosts_for_onesided_ders(),getdlnrho_y()
- subroutine energybcs/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:
- Use :
- Call to:
not_implemented(),getdlnrho_x(),fatal_error(),getdlnrho_z(),getrho_s(),set_ghosts_for_onesided_ders(),getdlnrho_y()
- subroutine energybcs/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:
- Use :
- Call to:
not_implemented(),fatal_error(),getdlnrho_z(),getrho_s(),set_ghosts_for_onesided_ders(),getdlnrho_x(),getdlnrho_y()
- subroutine energybcs/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:
- Use :
- Call to:
not_implemented(),getdlnrho_z(),fatal_error(),getrho_s(),set_ghosts_for_onesided_ders(),getdlnrho_x(),getdlnrho_y()
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
fatal_error(),getrho_s(),not_implemented(),set_ghosts_for_onesided_ders(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z()
- subroutine energybcs/bc_lnrho_hds_z_iso_energ(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]
topbot [integer,in]
- Use :
equationofstate(eoscalc()),gravity(potential(),gravz()),sub(div())- Call to:
fatal_error(),getrho_s(),not_implemented(),set_ghosts_for_onesided_ders(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z()
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
fatal_error(),set_ghosts_for_onesided_ders(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z()
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
fatal_error(),set_ghosts_for_onesided_ders(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z()
- subroutine energybcs/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)
- Parameters:
f (,,*,*) [real]
topbot [integer,in]
lone_sided [logical]
- Use :
- Call to:
fatal_error(),set_ghosts_for_onesided_ders(),getdlnrho_x(),getdlnrho_y(),getdlnrho_z()
- subroutine energybcs/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]
topbot [integer,in]
- Use :
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Use :
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Use :
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Use :
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Use :
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Use :
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
- subroutine energybcs/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]
topbot [integer,in]
- Call to:
- subroutine energybcs/bc_ism_energ(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.
- Parameters:
f (,,*,*) [real]
topbot [integer,in]
j [integer]
- Use :
equationofstate(get_cp_cv())- Call to: