Next: 7.1.5 Boundary conditions (MHD Up: 7.1 Parameter file: rhd.par Previous: 7.1.3 Fundamental model parameters   Contents   Index

Subsections

## 7.1.4 Boundary conditions (general)

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.

### 7.1.4.1 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
Possible values are:
• 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.
Any of these values can be specified. But in fact, not all of them are recognized by all modules. Therefore some parameters are for test purposes (e.g. shock calculations) only. In simulations of a solar-like star with the 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.

### 7.1.4.2 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
Possible values are:
• 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.
• 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.
In almost every simulation of stellar convection a 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.

### 7.1.4.3 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
Possible values are:
• 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.
• 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.
In simulations of a solar-like star with the MSrad radiation transport module the bottom boundary is typically of type inoutflow''. A supergiant simulation will have a transmitting lower boundary.

### 7.1.4.4 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.7.1.4.7) and luminositypervolume (see Sect.7.1.4.6). Example:
character heat_mode  f=A80 b=80  n='Heating mode' &
c0='-/bottom_entropy1/bottom_energy1' &
c1='core_entropy1/core_energyentropy1/core_energy1/core_energy2'
bottom_entropy1
Possible values, so far:
• : (empty). The classical value. For local models the energy comes through the lower boundary, either by radiation (for a closed bottom boundary 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 (defined as being less than r0_grav above the bottom of the model) is added according to teff.
• core_entropy1: The entropy in the core is adjusted towards s_inflow on a rate given by c_schange.
• core_energyentropy1: The entropy in the core is adjusted towards the mean core entropy (i.e., smoothed) on a rate given by c_schange. However, the total energy input is added according to luminositypervolume. This avoids a local pile up of energy in case of a strong core drag force (Sect.7.1.4.22) or just slow flows.
• core_energy1: Energy in the core is added according to luminositypervolume.
• core_energy2: Energy in the core is added according to luminositypervolume with a Gaussian distribution of the energy source.

### 7.1.4.5 character hdcoreheatprofile

This parameter allows to choose between various radial profiles for the core heating. It may be called by
character hdcoreheatprofile   f=A80 b=80 n='Core heat profile'
Constant
Possible values are:
• Constant, Constantdei: Apply the same change of in all core volume elements, (old) default. This gives a larger change of than Constantdrhoei in the central part of the core where the density is higher.
• Constantdrhoei: Apply the same change of in all core volume elements.

### 7.1.4.6 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
The reference volume is or . If this parameter is set to a value of 0.0 or below the entropy of the material within the core (defined by as all cells within radius r0_grav) is adjusted instead.

### 7.1.4.7 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
In the case of a central potential, the entropy in a sphere with radius r0_grav is adjusted towards this entropy value. In both geometries (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.

In the case of a central potential, one can decrease the entropy in the very center of the core to generate some extra braking buoyancy, e.g. with
u=erg/K/g
1.0E+06
While the value of the core entropy s_inflow is typically of the order of 1.0E+09, this parameter is typically of the order of 1.0E+06. A value of 0.0 (default) causes a zero gradient.

In the case of a central potential, one can enforce a meridional flow (the axis is the axis) by enforcing a lateral entropy gradient in the core, e.g. with
u=erg/K/g
1.0E+06
This might come useful in the case of rotating models. While the value of the core entropy s_inflow is typically of the order of 1.0E+09, this parameter is typically of the order of 1.0E+06. A value of 0.0 (default) causes a zero gradient.

### 7.1.4.10 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 (global) model 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
Guide values are
• 0.3: typical value
• <=0.0: not allowed

### 7.1.4.11 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

### 7.1.4.12 real c_v3changelinbottom

For the open lower boundary condition (inoutflow and inoutflow2), a damping of the vertical velocity at the open boundary can be specified, e.g., with
real c_v3changelinbottom f=E15.8 b=4 &
n='Linear velocity reduction rate at bottom' u=1
0.0025
The open lower boundary condition tends to produce a slight reduction of the horizontal velocities at the very bottom. As the HD solver does not apply any extra viscosity at the bottom layers (the MHD solver has this option), there is a tendency to produce a slight predominance of vertical velocities in the regions where matter enters the computational box through the lower boundary. By introducing a little bit of damping of the vertical velocity component, this tendency can be significantly reduced. Guide values are
• 0.0: off: no linear damping
• 0.002: small reasonable value
• 0.005: large, possible useful value

### 7.1.4.13 real c_v3changesqrbottom

For the open lower boundary condition (inoutflow and inoutflow2), an additional damping of the vertical velocity at the open boundary can be specified, e.g., with
real c_v3changesqrbottom f=E15.8 b=4 &
n='Quadratic velocity reduction rate at bottom' u=1
0.002
This damping is stronger for velocities that exceed the rms value of the velocities averaged over the entire bottom layers.

### 7.1.4.14 real c_visbound

An additional drag force can be added locally in inflow cells in the outer layer when the transmitting boundary condition is chosen. The value can be set e.g. with
real c_visbound f=E15.8 b=4 &
n='Boundary drag viscosity parameter' u=1
0.001
This extra drag force is usually not necessary and should be switched off (with c_visbound=0.0).

### 7.1.4.15 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
1.0
Obs.: So far, this parameter only switches the density damping on or off. All positive values have the same effect as a value of 1.0.

### 7.1.4.16 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

### 7.1.4.17 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
The value depends on where the outer boundary is located relative to the photosphere: If the boundary lies at a point where the solar photospheric minimum temperature is located, it can be fairly small. If the boundary is far away from the photosphere of a red supergiant, the value can be even smaller. On the other hand, if the boundary lies somewhere within the solar chromosphere even values above 1.0 might be reasonable.

### 7.1.4.18 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
Possible values are
• 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.

Boundary conditions open for (essentially) emergent radiation need the specification of the scale height of the optical depth to allow for small amounts of irradiation. The parameter can be set e.g. with
real c_radhtautop f=E15.8 b=4 n='Scale height of optical depth at top' u='1'
60.0E+05
Possible values are
• C 0.0: New version: . In this case, a value of C_radHtautop=-1.0 might be a good choice (MSrad only).

For a star-in-a-box'' and particularly when only simple'' ray directions are allowed in the radiation transport step the temperature in the outer corners of the box tends to become very small. To artificially increase the effect of radiative heating the parameter r1_rad can specify a radius beyond which only positive contributions of the radiative energy transport to the energy budget are taken into account. This ruins the conservativity of the code in these layers and should be applied only in very remote corners which are then considered only as sort of extended boundary region but not as part of the real'' model. The parameter can be specified e.g. with
c0='0.0: Not used'
8.00000e+13
A value of 0.0 (default) or below deactivates this feature.

### 7.1.4.21 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
The density within the model will typically not fall much below this value. A value of 0.0 (default) or below deactivates this feature.

### 7.1.4.22 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
A value of 0.0 (default) or below deactivates this feature.

### 7.1.4.23 character hdcoredragprofile

This parameter allows to choose between various radial profiles for the core drag force used to damp motions in the core of global models. It may be called by
character hdcoredragprofile   f=A80 b=80 n='Core drag profile'
Linear
Possible values are:
• Constant: Use a local drag force that depends on core radius r0_grav, local sound speed, and real c_coredrag (default). The overlaid radial profile is a constant.
• Linear: Use a local drag force that employs as overlay a linear decay from center to r0_grav.
• Cosine: Use a local drag force that employs as overlay a cosine function from center to r0_grav.
• CosSqr: Use a local drag force that employs as overlay a (cosine) function from center to r0_grav.
• Constant-Radial: Use the same radial profile as Constant but apply the drag force to the radial velocity component only.
• Linear-Radial: Use the same radial profile as Linear but apply the drag force to the radial velocity component only.
• Cosine-Radial: Use the same radial profile as Cosine but apply the drag force to the radial velocity component only.
• CosSqr-Radial: Use the same radial profile as CosSqr but apply the drag force to the radial velocity component only.
• Constant-Meridional: Use the same radial profile as Constant but apply the drag force to the meridional velocity components only ( is the axis).
• Linear-Meridional: Use the same radial profile as Linear but apply the drag force to the meridional velocity components only.
• Cosine-Meridional: Use the same radial profile as Cosine but apply the drag force to the meridional velocity components only.
• CosSqr-Meridional: Use the same radial profile as CosSqr but apply the drag force to the meridional velocity components only.

Next: 7.1.5 Boundary conditions (MHD Up: 7.1 Parameter file: rhd.par Previous: 7.1.3 Fundamental model parameters   Contents   Index