5.4.4 Boundary Conditions

The boundary conditions at the six sides of the computational box cannot be specified independently. For the naming convention of the boundaries a gravitational acceleration in -x3 direction is assumed. Accordingly, there is a bottom and a top boundary, and four side boundaries.

All boundary conditions of the hydrodynamic case are available in the MHD module.

`character side_bound`

:

The boundary condition at all four sides is given by e.g.`character side_bound f=A80 b=80 n='side boundary conditions' &`

c0='closed, transmitting, periodic'

transmitting`reflective`

: closed wall, no gravity, no radiation. The velocity vector is mirrored at the boundary.`constant`

: open boundary with constant extrapolation of all values, no gravity, no radiation`closed`

,`closedtop`

: closed wall, can handle gravity, open for outward radiation.`closedbottom`

: closed wall, handles gravity, radiation in diffusion approximation.`periodic`

: periodic boundaries for hydrodynamics, radiation.`transmitting`

: transmitting boundary for hydro and outward radiation.

`MSrad`

radiation transport module the side boundaries*have*to be`periodic`

. In simulations of a red supergiant all boundaries (including the sides) will typically be`transmitting`

. As an alternative,`closed`

boundaries can be chosen in this case.`character top_bound`

:

The boundary condition at the top of the model is given by for instance`character top_bound f=A80 b=80 n='top boundary conditions'`

transmitting`reflective`

: closed wall, no gravity, no radiation. The velocity vector is mirrored at the boundary.`constant`

: open boundary with constant extrapolation of all values, no gravity, no radiation`closed`

,`closedtop`

: closed wall, can handle gravity, open for outward radiation.`periodic`

: periodic boundaries for hydrodynamics, radiation.`transmitting`

: transmitting boundary for hydro and outward radiation: exponential decrease of density (standard open boundary condition).`transmitting2`

: transmitting boundary for hydro and outward radiation: exponential decrease of density and extra velocity treatment.`transmitting3`

: transmitting boundary for hydro and outward radiation: constant density extrapolation.

`transmitting`

top boundary will be selected, the`closed`

one is an alternative. The`periodic`

condition is only recognized by the hydrodynamics routines and not by any radiation transport routine.`character bottom_bound`

:

The boundary condition at the bottom of the model is given for instance by`character bottom_bound f=A80 b=80 n='bottom boundary conditions' &`

c0=closedbottom

transmitting`reflective`

: closed wall, no gravity, no radiation. The velocity vector is mirrored at the boundary.`constant`

: open boundary with constant extrapolation of all values, no gravity, no radiation.`closed`

,`closedtop`

: closed wall, can handle gravity, open for outward radiation.`closedbottom`

: closed wall, handles gravity, radiation in diffusion approximation.`closedbottom2`

: closed wall, handles gravity, radiation in diffusion approximation. In this version, the extrapolation of quantities should be smoother than for`closedbottom`

.`periodic`

: periodic boundaries for hydrodynamics, radiation.`transmitting`

: transmitting boundary for hydro and outward radiation. The parameters`real c_tchange`

,`real c_tsurf`

, and`real c_hptopfactor`

have to be specified.`inoutflow`

: "classical" open lower boundary for deep convection, gravity and radiation possible. The parameters`real s_inflow`

,`real c_schange`

, and`real c_pchange`

have to be specified.`inoutflow2`

: variant of the open lower boundary condition. The parameters`real s_inflow`

,`real c_schange`

,`real c_pchange`

have to be specified. In this version, the extrapolation of quantities should be smoother than for`inoutflow`

.

`MSrad`

radiation transport module the bottom boundary is typically of type ```inoutflow`

''. A supergiant simulation will have a`transmitting`

lower boundary.`character heat_mode`

:

The mode in which energy is supplied can be adjusted with this parameter. The classical choice is to leave it empty, in which case the mode is chosen from`s_inflow`

(see Sect. 5.4.4) and`luminositypervolume`

(see Sect. 5.4.4). Example:`character heat_mode f=A80 b=80 n='Heating mode' &`

c0='-/bottom_entropy1/bottom_energy1'

bottom_entropy1`closedbottom`

) or by convection + radiation (for an open bottom boundary`inoutflow`

).`bottom_entropy1`

: The entropy in the bottom layers (defined as being less than`r0_grav`

above the bottom of the model) is adjusted towards`s_inflow`

on a rate given by`c_schange`

.`bottom_energy1`

: Energy in the bottom layers is added according to`luminositypervolume`

.

`real luminositypervolume`

:

The luminosity of a ``Star-in-a-Box'' or a local model with the appropriate`heat_mode`

can be set with this parameter. To avoid numbers that do not fit into a 4 Byte real the luminosity per volume has to be specified as e.g. in`real luminositypervolume f=E15.8 b=4 n='Luminosity per core volume' &`

u='erg/cm^3/s'

4.5E-02`0.0`

or below the entropy of the material within the core (defined by as all cells within radius`r0_grav`

) is adjusted instead.`real s_inflow`

:

The entropy of the material streaming through an open boundary of type ```inoutflow`

'' into the model can be specified e.g. with`real s_inflow f=E15.8 b=4 n='Entropy of core material' &`

u=erg/K/g

3.25E+09`central`

potential the entropy in a sphere with radius`r0_grav`

is adjusted towards this entropy value. In both geometry (supergiant as well as solar) this value is very important as it finally (but indirectly) determines the luminosity and effective temperature of the star. A value of`0.0`

(default) or below disables this energy input.`real c_schange`

:

The entropy`s_inflow`

of the material in the bottom layer (solar case,`inoutflow`

boundary condition) or the central region of the model (supergiant case) is not just set to the specified but adjusted towards it. The adjustment rate can be controlled with e.g.`real c_schange f=E15.8 b=4 &`

n='Rate of entropy change for open lower boundary' u=1

0.3`1.0`

: fast adjustment`0.3`

: typical value`0.1`

: slow adjustment`<=0.0`

: not allowed

`real c_pchange`

:

The`inoutflow`

boundary condition not only controls entropy and velocity but also the pressure in the bottom layers: It is locally adjusted towards the global average to damp out possible instabilities. The adjustment rate can be specified e.g. with`real c_pchange f=E15.8 b=4 &`

n='Rate of pressure change for open lower boundary' u=1

1.0`real c_rhochangetop`

:

The`transmitting`

upper boundary condition can smooth density fluctuations with this parameter. It is locally adjusted towards the global average to damp out possible instabilities. It appears to be useful for the HLLMHD solver. For simulations without magnetic fields, there is no need to set this parameter, so far. The adjustment rate can be specified e.g. with`real c_rhochangetop f=E15.8 b=4 &`

n='Rate of density change for open upper boundary' u=1

0.2`real c_tchange`

:

In the case of a`transmitting`

upper or outer boundary the temperature of the material streaming into the model is adjusted with a rate given e.g. by`real c_tchange f=E15.8 b=4 &`

n='Rate of temperature change for open upper boundary' u=1

0.3`real c_tsurf`

:

In the case of a`transmitting`

upper or outer boundary the temperature of the material streaming into the model is adjusted towards a temperature`teff`

*`c_tsurf`

. This temperature can be specified as fraction of the effective temperature e.g. with`real c_tsurf f=E15.8 b=4 n='Temperature factor for open upper boundary' u=1`

0.62`real c_hptopfactor`

:

In the case of a`transmitting`

upper or outer boundary the density stratification outside the model has to be extrapolated properly. Assumptions about this density affects the amount of mass flowing into the model. For the extrapolation it is assumed that the density scale scales with the pressure scale height as =/`c_hptopfactor`

.`real c_hptopfactor f=E15.8 b=4 &`

n='Correction factor for surface pressure scale height' u=1

0.8- C
`0.0`

: No effect (actually, a value of`1.0`

is chosen). `0.0`

C`1.0`

: The density scale height is enlarged to account for possible effects of turbulent pressure on the scale height: The density decays less rapidly with height than in an (isothermal) hydrostatic stratification.- C
`1.0`

: Density scale height is pressure scale height. - C
`1.0`

: Density scale height is smaller than pressure scale height. Not really useful.

- C
`real c_radhtautop`

:

The`MSrad`

radiation transport module needs the specification of the scale height of the optical depth at the upper boundary, e.g. with`real c_radhtautop f=E15.8 b=4 n='Scale height of optical depth at top' u=cm`

60.0E+05`real rho_min`

:

During long periods of matter infall the density at an open outer boundary can become very low. To limit the decrease of the density a lower limit in the extrapolated ghost cells can be set e.g. with`real rho_min f=E15.8 b=4 n='Minimum boundary density' u=g/cm^3`

1.0E-25`0.0`

(default) or below deactivates this feature.`real c_coredrag`

:

To damp the flow in the core of models with central potential a drag force restricted to the inner part of the model (`r0_grav`

) can be applied. It is controlled e.g. with`real c_coredrag f=E15.8 b=4 n='Core drag force parameter' u=1`

1.0`0.0`

(default) or below deactivates this feature.

The following parameters are specific to MHD simulations. For MHD calculations they must be set additional to the hydrodynamic boundary parameters.

`character side_bound_mag_x1`

and`character side_bound_mag_x2`

:

The boundary condition at the sides perpendicular to the x1 direction and perpendicular to the x2 direction, respectively. They are given by e.g.`character side_bound_mag_x1 f=A80 b=80 n='side boundary conditions magnetic x1'`

fixed

character side_bound_mag_x2 f=A80 b=80 n='side boundary conditions magnetic x2'

periodic`constant`

: constant extrapolation of all magnetic field components into the ghost cells.`periodic`

: periodic continuation of all magnetic field components into the ghost cells.`fixed`

: the component normal to the boundary is kept fixed at its inital value. Constant extrapolation applies for the transversal components.`vertical`

: constant extrapolation for the vertical component. The transversal cell-centered field is mirrored, with the opposite sign. That should result in transversal components of the boundary-centered field being zero at the boundary.`vertical2`

: constant extrapolation for the vertical component. The transversal cell-centered field is set to zero.`reflective`

: The magnetic field is mirrored at the boundary. This boundary condition is unphysical, because the magnetic field is an axial vector and because it violates the divergence free property of the magnetic field. Therefore, this boundary condition should be used with caution.

`fixed`

conditions are realized by setting the electric field at those cell edges that coincide with the physical boundary zero. This is done in the constrained transport module.`character top_bound_mag`

:

The boundary condition at the top of the model is given by for instance`character top_bound_mag f=A80 b=80 n='bottom boundary conditions magnetic'`

vertical`constant`

: constant extrapolation of all magnetic field components into the ghost cells.`periodic`

: periodic continuation of all magnetic field components into the ghost cells.`fixed`

: the component normal to the boundary is kept fixed at its inital value. Constant extrapolation applies for the transversal components.`vertical`

: constant extrapolation for the vertical component. The transversal cell-centered field is mirrored, with the opposite sign. That should result in transversal components of the boundary-centered field being zero at the boundary.`vertical2`

: constant extrapolation for the vertical component. The transversal cell-centered field is set to zero.`oblique`

: magnetic fields with a given inclination at the boundary. The inclination is specified through parameters`C_magthetaB`

and`C_magphiB`

.

`character bottom_bound_mag`

:

The boundary condition at the bottom of the model is given by for instance`character bottom_bound_mag f=A80 b=80 n='bottom boundary conditions magnetic'`

inoutflow`constant`

: constant extrapolation of all magnetic field components into the ghost cells.`periodic`

: periodic continuation of all magnetic field components into the ghost cells.`fixed`

: the component normal to the boundary is kept fixed at its inital value. Constant extrapolation applies for the transversal components.`vertical`

: constant extrapolation for the vertical component. The transversal cell-centered field is mirrored, with the opposite sign. That should result in transversal components of the boundary-centered field being zero at the boundary.`vertical2`

: constant extrapolation for the vertical component. The transversal cell-centered field is set to zero.`oblique`

: magnetic fields with a given inclination at the boundary. The inclination is specified through parameters`C_magthetaB`

and`C_magphiB`

.`inoutflow`

: magnetic field can be advected into the computational domain by ascending material flow. Its strength can be specified with the parameter`b1_inflow`

. The boundary condition for the hydrodynamic variables must be set to`inoutflow`

too, otherwise this boundary condition is the same like constant.

`inoutflow`

the magnetic field, which is advected into the computational domain has a unique component which is in the x1 direction and it is only present where a velocity in the positive x3 direction exists. In all other places, the magnetic field components are constantly extrapolated into the ghost cells.`real b1_inflow`

:

This parameter controls the strength of the inflowing horizontal magnetic field at the lower boundary in connection with`bottom_bound_mag=inoutflow`

. The default value is`0.0`

. Example:`real b1_inflow f=E15.8 b=4 &`

n='Strength of inflowing horizontal magnetic field' u=G

10.0`real C_magthetaB`

:

This parameter specifies the angle between the magnetic field vector and the x3-axis (in radians) in the case of`oblique`

boundary conditions. The default value is`0.0`

. Example:`real c_magthetab f=E15.8 b=4 &`

n='angle magnetic field w.r. to the vertical direction' &

u=rad c0='used in combination with oblique conditions'

0.523598775598299`real C_magphiB`

:

This parameter specifies the angle between the horizontal component of the magnetic field vector and the x1-axis (in radians) in the case of`oblique`

boundary conditions. The default value is`0.0`

. Example:`real c_magphib f=E15.8 b=4 n='angle magnetic field w.r. to the x-axis' &`

u=rad c0='used in combination with oblique conditions'

0.0