Under Development#

The following features are large undertakings that are being incrementally improved. They are provided here with no guarantee of functionality or accuracy. After testing and further development they will become supported features and this documentation will be moved to the main section. Currently this page is primarily intended as a reference for the Rayleigh developers.

Arbitrary Scalar Fields#

Rayleigh can solve for additional active, \(\chi_{a_i}\), (coupled to the momentum equation through buoyancy) or passive, \(\chi_{p_i}\), scalar fields (where \(i\) can range up to 50 for each type of scalar).

Scalar Equations#

Both types of scalar fields are evolved using:

(1)#\[\frac{\partial \chi_{p_i}}{\partial t} + \boldsymbol{v}\cdot\boldsymbol{\nabla}\chi_{p_i} + d_{1_i}\,\mathrm{g}_{1_i}(r)v_r =\ d_{2_i}\,\boldsymbol{\nabla}\cdot\left[\mathrm{g}_{2_i}(r)\,\boldsymbol{\nabla}\chi_{p_i} \right] + d_{3_i}\,\mathrm{g}_{3_i},\ \quad 1 \leq i \leq 50\]

for the passive scalars, and:

(2)#\[\frac{\partial \chi_{a_i}}{\partial t} + \boldsymbol{v}\cdot\boldsymbol{\nabla}\chi_{a_i} + d_{4_i}\,\mathrm{g}_{4_i}(r)v_r =\ d_{5_i}\,\boldsymbol{\nabla}\cdot\left[\mathrm{g}_{5_i}(r)\,\boldsymbol{\nabla}\chi_{a_i} \right] + d_{6_i}\,\mathrm{g}_{6_i},\ \quad 1 \leq i \leq 50\]

for the active scalars.

In addition the momentum equation is modified to include a buoyancy coupling to the active scalars through a \(\sum_i d_{7_i}\,\mathrm{g}_{7_i}(r)\chi_{a_i}\) term:

(3)#\[\begin{split} \mathrm{f}_1(r)\left[\frac{\partial \boldsymbol{v}}{\partial t} + \boldsymbol{v}\cdot\boldsymbol{\nabla}\boldsymbol{v} %advection + c_1\boldsymbol{\hat{z}}\times\boldsymbol{v} \right] =\ % Coriolis &\left[c_2\,\mathrm{f}_2(r)\Theta - \sum_i d_{7_i}\,\mathrm{g}_{7_i}(r)\chi_{a_i} \right]\,\boldsymbol{\hat{r}} % buoyancy - c_3\,\mathrm{f}_1(r)\boldsymbol{\nabla}\left(\frac{P}{\mathrm{f}_1(r)}\right) % pressure \\ &+ c_4\left(\boldsymbol{\nabla}\times\boldsymbol{B}\right)\times\boldsymbol{B} % Lorentz Force + c_5\boldsymbol{\nabla}\cdot\boldsymbol{\mathcal{D}}\end{split}\]

where all other terms are as defined in The System of Equations Solved in Rayleigh.

Limitations#

While under development several of the functions \(\mathrm{g}_{j_i}\) and constants \(d_{j_i}\) are hard-coded to be 0:

\[\begin{split}\begin{aligned} \mathrm{g}_{1_i}(r) &\rightarrow 0\; &d_{1_i} &\rightarrow 0 \\ \mathrm{g}_{3_i}(r) &\rightarrow 0\; &d_{3_i} &\rightarrow 0 \\ \mathrm{g}_{4_i}(r) &\rightarrow 0\; &d_{4_i} &\rightarrow 0 \\ \mathrm{g}_{6_i}(r) &\rightarrow 0\; &d_{6_i} &\rightarrow 0 \\ \end{aligned}\end{split}\]

which reduces (1) and (2) to simple advection-diffusion equations. The remaining non-zero coefficients are set according to the reference type selected. Currently only reference_type=1 is tested but development is continuing on supporting other reference types, including custom forms for the functions \(\mathrm{g}_{j_i}\) and the constants \(d_{j_i}\).

Nondimensional Boussinesq Formulation#

Rayleigh can be run using a nondimensional, Boussinesq formulation of the MHD equations (reference_type=1). Adopting this nondimensionalization is equivalent to assigning the following to the functions \(\mathrm{g}_{j_i}\) and the constants \(d_{j_i}\):

\[\begin{split}\begin{aligned} \mathrm{g}_{2_i}(r) &\rightarrow \tilde{\kappa}(r)\; &d_{2_i} &\rightarrow \frac{1}{Pr_{\chi_{p_i}}} \\ \mathrm{g}_{5_i}(r) &\rightarrow \tilde{\kappa}(r)\; &d_{5_i} &\rightarrow \frac{1}{Pr_{\chi_{a_i}}} \\ \mathrm{g}_{7_i}(r) &\rightarrow \left(\frac{r}{r_o}\right)^n \; &d_{7_i} &\rightarrow \frac{Ra_{\chi_{a_i}}}{Pr_{\chi_{a_i}}} \\ \end{aligned}\end{split}\]

When these substitutions, along with those in Nondimensional Boussinesq Formulation of the MHD Equations, are made, (1)-(3) transform to:

(4)#\[\begin{split}\frac{\partial \chi_{p_i}}{\partial t} + \boldsymbol{v}\cdot\boldsymbol{\nabla}\chi_{p_i} &=\ \frac{1}{Pr_{\chi_{p_i}}}\,\boldsymbol{\nabla}\cdot\left[\tilde{\kappa}(r)\,\boldsymbol{\nabla}\chi_{p_i} \right],\ \quad 1 \leq i \leq 50 \\ \frac{\partial \chi_{a_i}}{\partial t} + \boldsymbol{v}\cdot\boldsymbol{\nabla}\chi_{a_i} &=\ \frac{1}{Pr_{\chi_{a_i}}}\,\boldsymbol{\nabla}\cdot\left[\tilde{\kappa}(r)\,\boldsymbol{\nabla}\chi_{a_i} \right],\ \quad 1 \leq i \leq 50 \\ \left[\frac{\partial \boldsymbol{v}}{\partial t} + \boldsymbol{v}\cdot\boldsymbol{\nabla}\boldsymbol{v} %advection + \frac{2}{E}\boldsymbol{\hat{z}}\times\boldsymbol{v} \right] &= % Coriolis \left[\frac{Ra}{Pr}\Theta - \sum_i\frac{Ra_{\chi_{a_i}}}{Pr_{\chi_{a_i}}}\chi_{a_i}\right]\left(\frac{r}{r_o}\right)^n\,\boldsymbol{\hat{r}} % buoyancy - \frac{1}{E}\boldsymbol{\nabla}P % pressure + \frac{1}{E\,Pm}\left(\boldsymbol{\nabla}\times\boldsymbol{B}\right)\times\boldsymbol{B} % Lorentz Force + \boldsymbol{\nabla}\cdot\boldsymbol{\mathcal{D}}\end{split}\]

Dimensional Anelastic Formulation#

Dimensional, anelastic mode (cgs units; reference_type=2 ), is currently untested with arbitrary scalar fields and requires further development.

Nondimensional Anelastic Formulation#

Non-dimensional, anelastic mode (cgs units; reference_type=3 ), is currently untested with arbitrary scalar fields and requires further development. In addition to the functions set in Nondimensional Anelastic MHD Equations, the following substitutions are made for \(\mathrm{g}_{j_i}\) and \(d_{j_i}\):

\[\begin{split}\begin{aligned} \mathrm{g}_{2_i}(r) &\rightarrow \tilde{\kappa}(r)\; &d_{2_i} &\rightarrow \frac{E}{Pr_{\chi_{p_i}}} \\ \mathrm{g}_{5_i}(r) &\rightarrow \tilde{\kappa}(r)\; &d_{5_i} &\rightarrow \frac{E}{Pr_{\chi_{a_i}}} \\ \mathrm{g}_{7_i}(r) &\rightarrow \tilde{\rho}(r)\frac{r_\mathrm{max}^2}{r^2}\; &c_{7_i} &\rightarrow \mathrm{Ra}_{\chi_{a_i}}^* \\ \end{aligned}\end{split}\]

Setup#

Physical controls#

n_active_scalars

Set the number of active scalar fields. Up to 50 allowed. Default 0.

n_passive_scalars

Set the number of passive scalar fields. Up to 50 allowed. Default 0.

Boundary conditions#

Model parameters for the scalar fields follow the same convention as temperature but using the prefix chi_a or chi_p for active and passive scalars respectively.

fix_chivar_a_top(i)

Logical flag indicating whether active scalar i should be fixed on the upper boundary. Default = .false.

fix_chivar_a_bottom(i)

Logical flag indicating whether active scalar i should be fixed on the lower boundary. Default = .false.

fix_dchidr_a_top(i)

Logical flag indicating whether the radial derivative of active scalar i should be fixed on the upper boundary. Default = .false.

fix_dchidr_a_bottom(i)

Logical flag indicating whether the radial derivative of active scalar i should be fixed on the lower boundary. Default = .false.

chi_a_top(i)

Value of active scalar i at the upper boundary. Default = 0.

chi_a_bottom(i)

Value of active scalar i at the lower boundary. Default = 0.

dchidr_a_top(i)

Value of active scalar i at the upper boundary. Default = 0.

dchidr_a_bottom(i)

Value of active scalar i at the lower boundary. Default = 0.

chi_a_top_file(i)

Generic-input file containing a custom, fixed upper boundary condition for active scalar i.

chi_a_bottom_file(i)

Generic-input file containing a custom, fixed lower boundary condition for active scalar i.

dchidr_a_top_file(i)

Generic-input file containing a custom, fixed upper boundary condition for the radial derivative of active scalar i.

dchidr_a_bottom_file(i)

Generic-input file containing a custom, fixed lower boundary condition for the radial derivative of active scalar i.

fix_chivar_p_top(i)

Logical flag indicating whether passive scalar i should be fixed on the upper boundary. Default = .false.

fix_chivar_p_bottom(i)

Logical flag indicating whether passive scalar i should be fixed on the lower boundary. Default = .false.

fix_dchidr_p_top(i)

Logical flag indicating whether the radial derivative of passive scalar i should be fixed on the upper boundary. Default = .false.

fix_dchidr_p_bottom(i)

Logical flag indicating whether the radial derivative of passive scalar i should be fixed on the lower boundary. Default = .false.

chi_p_top(i)

Value of passive scalar i at the upper boundary. Default = 0.

chi_p_bottom(i)

Value of passive scalar i at the lower boundary. Default = 0.

dchidr_p_top(i)

Value of passive scalar i at the upper boundary. Default = 0.

dchidr_p_bottom(i)

Value of passive scalar i at the lower boundary. Default = 0.

chi_p_top_file(i)

Generic-input file containing a custom, fixed upper boundary condition for passive scalar i.

chi_p_bottom_file(i)

Generic-input file containing a custom, fixed lower boundary condition for passive scalar i.

dchidr_p_top_file(i)

Generic-input file containing a custom, fixed upper boundary condition for the radial derivative of passive scalar i.

dchidr_p_bottom_file(i)

Generic-input file containing a custom, fixed lower boundary condition for the radial derivative of passive scalar i.

Initial conditions#

Initial conditions for the scalar fields must be set using generic input files (there are no hard-coded initial conditions for the scalar fields), which require init_type to be set to 8.

chi_a_init_file(i)

Name of generic input file that, if `init_type`=8, will be used to initialize active scalar i.

chi_p_init_file(i)

Name of generic input file that, if `init_type`=8, will be used to initialize passive scalar i.

Physical controls#

chi_a_prandtl_number(i)

Sets the value of the Prandtl number, \(Pr_{\chi_{a_i}}\), for active scalar i using reference types 1 and 3.

chi_a_rayleigh_number(i)

Sets the value of the Rayleigh number, \(Ra_{\chi_{a_i}}\) for active scalar i using reference type 1.

chi_a_modified_rayleigh_number(i)

Sets the value of the modified Rayleigh number, \(Ra^*_{\chi_{a_i}}\), for active scalar i using reference type 3.

chi_a_convective_rossby_number(i)

Sets the value of the convective Rossby number, \(Ro_{\chi_{a_i}}\), for active scalar i using reference type 5.

chi_p_prandtl_number(i)

Sets the value of the Prandtl number, \(Pr_{\chi_{p_i}}\), for passive scalar i.

kappa_chi_a_type(i)
Determines the radial profile of the diffusivity for active scalar i.
  • type 1 : no radial variation

  • type 2 : diffusivity profile varies as \(\rho^{n}\) for some real number n.

  • type 3 : diffusivity profile is read from a custom-reference-state file (under development)

kappa_chi_a_top(i)
Specifies the value of the diffusivity coefficient at the upper boundary for active scalar i. This is primarily used for dimensional models or those employing a custom nondimensionalization via Rayleigh’s custom-reference interface. For Rayleigh’s intrinsic nondimensional reference states, the following values are assumed:
  • reference_type 1: \(\kappa_\mathrm{top}=1/\mathrm{Pr_{\chi_{a_i}}}\)

  • reference_type 3: \(\kappa_\mathrm{top}=\mathrm{Ek}/\mathrm{Pr_{\chi_{a_i}}}\)

kappa_chi_a_power(i)

Denotes the value of the exponent n in the \(\rho^{n}\) variation associated with diffusion type 2 for active scalar i.

kappa_chi_p_type(i)
Determines the radial profile of the diffusivity for passive scalar i.
  • type 1 : no radial variation

  • type 2 : diffusivity profile varies as \(\rho^{n}\) for some real number n.

  • type 3 : diffusivity profile is read from a custom-reference-state file (under development)

kappa_chi_p_top(i)
Specifies the value of the diffusivity coefficient at the upper boundary for passive scalar i. This is primarily used for dimensional models or those employing a custom nondimensionalization via Rayleigh’s custom-reference interface. For Rayleigh’s intrinsic nondimensional reference states, the following values are assumed:
  • reference_type 1: \(\kappa_\mathrm{top}=1/\mathrm{Pr_{\chi_{p_i}}}\)

  • reference_type 3: \(\kappa_\mathrm{top}=\mathrm{Ek}/\mathrm{Pr_{\chi_{p_i}}}\)

kappa_chi_p_power(i)

Denotes the value of the exponent n in the \(\rho^{n}\) variation associated with diffusion type 2 for passive scalar i.

Output Quantity Codes#

A limited number of quantity codes are currently available for the scalar fields. These follow a slightly modified scheme to the other outputs, incrementing based on the index of the scalar field.

Active scalar fields#

\(\chi_{a_i}\)

10001+200*(i-1)

active scalar field i

\(\chi_{a_i}^\prime\)

10002+200*(i-1)

active scalar field i perturbation

\(\overline{\chi_{a_i}}\)

10003+200*(i-1)

active scalar field i mean

\(\frac{\partial\chi_{a_i}}{\partial r}\)

10004+200*(i-1)

radial derivative of active scalar field i

\(\frac{\partial\chi_{a_i}^\prime}{\partial r}\)

10005+200*(i-1)

radial derivative of the active scalar field i perturbation

\(\frac{\partial\overline{\chi_{a_i}}}{\partial r}\)

10006+200*(i-1)

radial derivative of the active scalar field i mean

\(\frac{\partial\chi_{a_i}}{\partial \theta}\)

10007+200*(i-1)

latitudinal derivative of active scalar field i

\(\frac{\partial\chi_{a_i}^\prime}{\partial \theta}\)

10008+200*(i-1)

latitudinal derivative of the active scalar field i perturbation

\(\frac{\partial\overline{\chi_{a_i}}}{\partial \theta}\)

10009+200*(i-1)

latitudinal derivative of the active scalar field i mean

\(\frac{\partial\chi_{a_i}}{\partial \phi}\)

10010+200*(i-1)

longitudinal derivative of active scalar field i

\(\frac{\partial\chi_{a_i}^\prime}{\partial \phi}\)

10011+200*(i-1)

longitudinal derivative of the active scalar field i perturbation

\(\frac{\partial\overline{\chi_{a_i}}}{\partial \phi}\)

10012+200*(i-1)

longitudinal derivative of the active scalar field i mean

Passive scalar fields#

\(\chi_{p_i}\)

20001+200*(i-1)

passive scalar field i

\(\chi_{p_i}^\prime\)

20002+200*(i-1)

passive scalar field i perturbation

\(\overline{\chi_{p_i}}\)

20003+200*(i-1)

passive scalar field i mean

\(\frac{\partial\chi_{p_i}}{\partial r}\)

20004+200*(i-1)

radial derivative of passive scalar field i

\(\frac{\partial\chi_{p_i}^\prime}{\partial r}\)

20005+200*(i-1)

radial derivative of the passive scalar field i perturbation

\(\frac{\partial\overline{\chi_{p_i}}}{\partial r}\)

20006+200*(i-1)

radial derivative of the passive scalar field i mean

\(\frac{\partial\chi_{p_i}}{\partial \theta}\)

20007+200*(i-1)

latitudinal derivative of passive scalar field i

\(\frac{\partial\chi_{p_i}^\prime}{\partial \theta}\)

20008+200*(i-1)

latitudinal derivative of the passive scalar field i perturbation

\(\frac{\partial\overline{\chi_{p_i}}}{\partial \theta}\)

20009+200*(i-1)

latitudinal derivative of the passive scalar field i mean

\(\frac{\partial\chi_{p_i}}{\partial \phi}\)

20010+200*(i-1)

longitudinal derivative of passive scalar field i

\(\frac{\partial\chi_{p_i}^\prime}{\partial \phi}\)

20011+200*(i-1)

longitudinal derivative of the passive scalar field i perturbation

\(\frac{\partial\overline{\chi_{p_i}}}{\partial \phi}\)

20012+200*(i-1)

longitudinal derivative of the passive scalar field i mean

Further Information#

See tests/chi_scalar for example input files.

Newtonian Cooling#

We have added an initial implementation of Newtonian cooling to the code that adds a term to the thermal energy equation of the form

(5)#\[\frac{\partial \Theta}{\partial t} = \frac{\Delta\Theta_{\mathrm{eq}}-\Theta}{\tau_\mathrm{eq}}.\]

Here, \(\Delta\Theta_\mathrm{eq}\) is a target temperature/entropy variation about the background state and \(\tau_\mathrm{eq}\) is the cooling timescale. Newtonian cooling can be turned on by setting newtonian_cooling=.true. in the physical_controls_namelist, and the cooling time is similarly controlled by specifying the value of newtonian_cooling_time.

At present, \(\Delta\Theta_\mathrm{eq}\) is allowed to take one of two forms. These are controlled by setting the newtonian_cooling_type variable in physical_controls_namelist. A value of 1 yields

(6)#\[\Delta\Theta_\mathrm{eq} = A\,f_\mathrm{c}(r),\]

and a value of 2 yields

(7)#\[\Delta\Theta_\mathrm{eq} = A\,f_\mathrm{c}(r)\mathrm{sin}(\theta)\mathrm{sin}(\phi),\]

where \(f_\mathrm{c}(r)\) is the radial cooling profile. It is 1 by default, but the user can specify a file from which to read a custom profile by setting the newtonian_cooling_profile_file variable in the physical_controls_namelist. The amplitude \(A\) is controlled by setting the variable newtonian_cooling_tvar_amp. As an example, to use Newtonian cooling, one can and and modify the following lines in the physical_controls_namelist.

&physical_controls_namelist
 newtonian_cooling = .true.
 newtonian_cooling_type = 1
 newtonian_cooling_time = 1.0d0
 newtonian_cooling_tvar_amp = 1.0d0
 newtonian_cooling_profile_file = 'my_cooling_profile.dat'
/

Coupled Boundary Conditions#

Rayleigh can couple the values and gradients of scalar fields (including the temperature/entropy, \(\Theta\), and active, \(\chi_{a_i}\), scalar fields) at the boundaries through this initial implementation of coupled boundary conditions.

These boundary conditions take the form:

(8)#\[\Theta = b_{\Theta,\Theta} + b_{\Theta,\frac{\partial \Theta}{\partial r}}\frac{\partial \Theta}{\partial r} \ + \sum_{j} b_{\Theta,\chi_{a_j}} \chi_{a_j} \ + \sum_{j} b_{\Theta,\frac{\partial\chi_{a_j}}{\partial r}} \frac{\partial\chi_{a_j}}{\partial r}\]

for coupling temperature/entropy to its gradient and/or to other scalar fields,

(9)#\[\frac{\partial \Theta}{\partial r} = b_{\frac{\partial \Theta}{\partial r},\frac{\partial \Theta}{\partial r}} + b_{\frac{\partial \Theta}{\partial r},\Theta}\Theta \ + \sum_{j} b_{\frac{\partial \Theta}{\partial r},\chi_{a_j}} \chi_{a_j} \ + \sum_{j} b_{\frac{\partial \Theta}{\partial r},\frac{\partial\chi_{a_j}}{\partial r}} \frac{\partial\chi_{a_j}}{\partial r}\]

for coupling the derivative of temperature/entropy to its value and/or to other scalar fields,

(10)#\[\chi_{a_i} = b_{\chi_{a_i},\chi_{a_i}} \ + b_{\chi_{a_i},\Theta}\Theta \ + b_{\chi_{a_i},\frac{\partial \Theta}{\partial r}}\frac{\partial \Theta}{\partial r} \ + \sum_{j (j \ne i)} b_{\chi_{a_i},\chi_{a_j}} \chi_{a_j} \ + \sum_{j} b_{\chi_{a_i},\frac{\partial\chi_{a_j}}{\partial r}} \frac{\partial\chi_{a_j}}{\partial r}\]

for coupling active scalar i to its gradient and/or to other scalar fields including temperature/entropy, and finally

(11)#\[\frac{\partial \chi_{a_i}}{\partial r} = b_{\frac{\partial \chi_{a_i}}{\partial r},\frac{\partial \chi_{a_i}}{\partial r}} \ + b_{\frac{\partial\chi_{a_i}}{\partial r},\Theta}\Theta \ + b_{\frac{\partial\chi_{a_i}}{\partial r},\frac{\partial \Theta}{\partial r}}\frac{\partial \Theta}{\partial r} \ + \sum_{j} b_{\frac{\partial\chi_{a_i}}{\partial r},\chi_{a_j}} \chi_{a_j} \ + \sum_{j (j \ne i)} b_{\frac{\partial\chi_{a_i}}{\partial r},\frac{\partial\chi_{a_j}}{\partial r}} \frac{\partial\chi_{a_j}}{\partial r}\]

for coupling the gradient of active scalar i to its value and/or to other scalar fields including temperature/entropy.

The values of the \(b_{i,i}\) terms can be constant or spatially varying. The values of the \(b_{i,j}\) coefficients are constant. All values can be set using options in the boundary conditions namespace.

Setup#

Boundary conditions#

Model parameters for the scalar fields follow the same convention as temperature but using the prefix chi_a or chi_p for active and passive scalars respectively.

couple_tvar_top

Logical flag indicating whether thermal variable (T,S) should be coupled to other scalar fields or their gradients on the upper boundary. Default = .false.

couple_tvar_bottom

Logical flag indicating whether thermal variable (T,S) should be coupled to other scalar fields or their gradients on the lower boundary. Default = .false.

couple_dtdr_top

Logical flag indicating whether radial gradient of thermal variable (T,S) should be coupled to other scalar fields or their gradients on the upper boundary. Default = .false.

couple_dtdr_bottom

Logical flag indicating whether radial gradient of thermal variable (T,S) should be coupled to other scalar fields or their gradients on the lower boundary. Default = .false.

couple_chivar_a_top

Logical flag indicating whether active scalar i should be coupled to other scalar fields or their gradients on the upper boundary. Default = .false.

couple_chivar_a_bottom

Logical flag indicating whether active scalar i should be coupled to other scalar fields or their gradients on the lower boundary. Default = .false.

couple_dchidr_a_top

Logical flag indicating whether radial gradient of active scalar i should be coupled to other scalar fields or their gradients on the upper boundary. Default = .false.

couple_dchidr_a_bottom

Logical flag indicating whether radial gradient of active scalar i should be coupled to other scalar fields or their gradients on the lower boundary. Default = .false.

T_top

Set the thermal variable, \(b_{\Theta,\Theta}\), at the top of the domain (overloaded)

T_top_file

Set a spatially varying thermal variable, \(b_{\Theta,\Theta}\), at the top of the domain by specifying a generic input filename (overloaded, untested)

T_dTdr_coeff_top

Set the coupling coefficient between the thermal variable and the radial derivative of the thermal variable, \(b_{\Theta,\frac{\partial \Theta}{\partial r}}\), at the top of the domain

T_chi_a_coeff_top(i)

Set the coupling coefficient between the thermal variable and active scalar field i, \(b_{\Theta,\chi_{a_i}}\), at the top of the domain

T_dchidr_a_coeff_top(i)

Set the coupling coefficient between the thermal variable and the radial derivative of active scalar field i, \(b_{\Theta,\frac{\partial \chi_{a_i}}{\partial r}}\), at the top of the domain

T_bottom

Set the thermal variable, \(b_{\Theta,\Theta}\), at the base of the domain (overloaded)

T_bottom_file

Set a spatially varying thermal variable, \(b_{\Theta,\Theta}\), at the base of the domain by specifying a generic input filename (overloaded, untested)

T_dTdr_coeff_bottom

Set the coupling coefficient between the thermal variable and the radial derivative of the thermal variable, \(b_{\Theta,\frac{\partial \Theta}{\partial r}}\), at the base of the domain

T_chi_a_coeff_bottom(i)

Set the coupling coefficient between the thermal variable and active scalar field i, \(b_{\Theta,\chi_{a_i}}\), at the base of the domain

T_dchidr_a_coeff_bottom(i)

Set the coupling coefficient between the thermal variable and the radial derivative of active scalar field i, \(b_{\Theta,\frac{\partial \chi_{a_i}}{\partial r}}\), at the base of the domain

dTdr_top

Set the radial derivative of the thermal variable, \(b_{\frac{\partial\Theta}{\partial r},\frac{\partial\Theta}{\partial r}}\), at the top of the domain (overloaded)

dTdr_top_file

Set a spatially varying radial derivative of the thermal variable, \(b_{\frac{\partial\Theta}{\partial r},\frac{\partial\Theta}{\partial r}}\), at the top of the domain by specifying a generic input filename (overloaded, untested)

dTdr_T_coeff_top

Set the coupling coefficient between the radial derivative of the thermal variable and the thermal variable, \(b_{\frac{\partial\Theta}{\partial r},\Theta}\), at the top of the domain

dTdr_chi_a_coeff_top(i)

Set the coupling coefficient between the radial derivative of the thermal variable and the radial derivative of active scalar field i, \(b_{\frac{\partial\Theta}{\partial r},\frac{\partial \chi_{a_i}}{\partial r}}\), at the top of the domain

dTdr_dchidr_a_coeff_top(i)

Set the coupling coefficient between the radial derivative of the thermal variable and the radial derivative of active scalar field i, \(b_{\frac{\partial\Theta}{\partial r},\frac{\partial \chi_{a_i}}{\partial r}}\), at the top of the domain

dTdr_bottom

Set the radial derivative of the thermal variable, \(b_{\frac{\partial\Theta}{\partial r},\frac{\partial\Theta}{\partial r}}\), at the base of the domain (overloaded)

dTdr_bottom_file

Set a spatially varying radial derivative of the thermal variable, \(b_{\frac{\partial\Theta}{\partial r},\frac{\partial\Theta}{\partial r}}\), at the base of the domain by specifying a generic input filename (overloaded, untested)

dTdr_T_coeff_bottom

Set the coupling coefficient between the radial derivative of the thermal variable and the thermal variable, \(b_{\frac{\partial\Theta}{\partial r},\Theta}\), at the base of the domain

dTdr_chi_a_coeff_bottom(i)

Set the coupling coefficient between the radial derivative of the thermal variable and the radial derivative of active scalar field i, \(b_{\frac{\partial\Theta}{\partial r},\frac{\partial \chi_{a_i}}{\partial r}}\), at the base of the domain

dTdr_dchidr_a_coeff_bottom(i)

Set the coupling coefficient between the radial derivative of the thermal variable and the radial derivative of active scalar field i, \(b_{\frac{\partial\Theta}{\partial r},\frac{\partial \chi_{a_i}}{\partial r}}\), at the base of the domain

chi_a_top(i)

Set active scalar field i, \(b_{\chi_{a_i},\chi_{a_i}}\), at the top of the domain (overloaded)

chi_a_top_file(i)

Set a spatially varying active scalar field i, \(b_{\chi_{a_i},\chi_{a_i}}\), at the top of the domain by specifying a generic input filename (overloaded, untested)

chi_a_T_coeff_top(i)

Set the coupling coefficient between active scalar field i and the thermal variable, \(b_{\chi_{a_i},\Theta}\), at the top of the domain

chi_a_dTdr_coeff_top(i)

Set the coupling coefficient between active scalar field i and the radial derivative of the thermal variable, \(b_{\chi_{a_i},\frac{\partial\Theta}{\partial r}}\), at the top of the domain

chi_a_chi_a_coeff_top(i,j)

Set the coupling coefficient between active scalar field i and active scalar field j, \(b_{\chi_{a_i},\chi_{a_j}}\), at the top of the domain. \(b_{\chi_{a_i},\chi_{a_i}}\) is ignored

chi_a_dchidr_a_coeff_top(i,j)

Set the coupling coefficient between active scalar field i and the radial derivative of active scalar field j, \(b_{\chi_{a_i},\frac{\partial \chi_{a_j}}{\partial r}}\), at the top of the domain

chi_a_bottom(i)

Set active scalar field i, \(b_{\chi_{a_i},\chi_{a_i}}\), at the base of the domain (overloaded)

chi_a_bottom_file(i)

Set a spatially varying active scalar field i, \(b_{\chi_{a_i},\chi_{a_i}}\), at the base of the domain by specifying a generic input filename (overloaded, untested)

chi_a_T_coeff_bottom(i)

Set the coupling coefficient between active scalar field i and the thermal variable, \(b_{\chi_{a_i},\Theta}\), at the base of the domain

chi_a_dTdr_coeff_bottom(i)

Set the coupling coefficient between active scalar field i and the radial derivative of the thermal variable, \(b_{\chi_{a_i},\frac{\partial\Theta}{\partial r}}\), at the base of the domain

chi_a_chi_a_coeff_bottom(i,j)

Set the coupling coefficient between active scalar field i and active scalar field j, \(b_{\chi_{a_i},\chi_{a_j}}\), at the base of the domain. \(b_{\chi_{a_i},\chi_{a_i}}\) is ignored

chi_a_dchidr_a_coeff_bottom(i,j)

Set the coupling coefficient between active scalar field i and the radial derivative of active scalar field j, \(b_{\chi_{a_i},\frac{\partial \chi_{a_j}}{\partial r}}\), at the base of the domain

dchidr_a_top(i)

Set the radial derivative of active scalar field i, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\frac{\partial \chi_{a_i}}{\partial r}}\), at the top of the domain (overloaded)

dchidr_a_top_file(i)

Set a spatially varying radial derivative of active scalar field i, \(b_{\frac{\partial\chi_{a_i}}{\partial r},\frac{\partial\chi_{a_i}}{\partial r}}\), at the top of the domain by specifying a generic input filename (overloaded, untested)

dchidr_a_T_coeff_top(i)

Set the coupling coefficient between the radial derivative of active scalar field i and the thermal variable, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\Theta}\), at the top of the domain

dchidr_a_dTdr_coeff_top(i)

Set the coupling coefficient between the radial derivative of active scalar field i and the radial derivative of the thermal variable, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\frac{\partial\Theta}{\partial r}}\), at the top of the domain

dchidr_a_chi_a_coeff_top(i,j)

Set the coupling coefficient between the radial derivative of active scalar field i and active scalar field j, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\chi_{a_j}}\), at the top of the domain

dchidr_a_dchidr_a_coeff_top(i,j)

Set the coupling coefficient between the radial derivative of active scalar field i and the radial derivative of active scalar field j, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\frac{\partial \chi_{a_j}}{\partial r}}\), at the top of the domain. \(b_{\frac{\partial\chi_{a_i}}{\partial r},\frac{\partial\chi_{a_i}}{\partial r}}\) is ignored

dchidr_a_bottom(i)

Set the radial derivative of active scalar field i, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\frac{\partial \chi_{a_i}}{\partial r}}\), at the base of the domain (overloaded)

dchidr_a_bottom_file(i)

Set a spatially varying radial derivative of active scalar field i, \(b_{\frac{\partial\chi_{a_i}}{\partial r},\frac{\partial\chi_{a_i}}{\partial r}}\), at the base of the domain by specifying a generic input filename (overloaded, untested)

dchidr_a_T_coeff_bottom(i)

Set the coupling coefficient between the radial derivative of active scalar field i and the thermal variable, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\Theta}\), at the base of the domain

dchidr_a_dTdr_coeff_bottom(i)

Set the coupling coefficient between the radial derivative of active scalar field i and the radial derivative of the thermal variable, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\frac{\partial\Theta}{\partial r}}\), at the base of the domain

dchidr_a_chi_a_coeff_bottom(i,j)

Set the coupling coefficient between the radial derivative of active scalar field i and active scalar field j, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\chi_{a_j}}\), at the base of the domain

dchidr_a_dchidr_a_coeff_bottom(i,j)

Set the coupling coefficient between the radial derivative of active scalar field i and the radial derivative of active scalar field j, \(b_{\frac{\partial \chi_{a_i}}{\partial r},\frac{\partial \chi_{a_j}}{\partial r}}\), at the base of the domain. \(b_{\frac{\partial\chi_{a_i}}{\partial r},\frac{\partial\chi_{a_i}}{\partial r}}\) is ignored

Further Information#

See tests/coupled_bcs for example input files.

Pseudo-Incompressibility#

Rayleigh can solve the fluid equations under a simple form of the pseudo-incompressible approximation. The equation set is identical to the anelastic equations except for the momentum and continuity equations,

\[\begin{split}\begin{aligned} \hat{\rho}(r) \left[\frac{\partial\boldsymbol{v}}{\partial t} + \boldsymbol{v \cdot \nabla v} % Advection + 2\Omega_0\hat{\boldsymbol{z}}\times\boldsymbol{v} \right] =\; % Coriolis & \frac{\hat{\rho}(r)}{c_P} \left[g(r)\Theta + \frac{d\hat{S}}{dr} \frac{P}{\hat{\rho}(r)}\right] \, \hat{\boldsymbol{r}} % Buoyancy - \hat{\rho}(r)\boldsymbol{\nabla}\left(\frac{P}{\hat{\rho}(r)}\right) % Pressure Forces \\ &+ \frac{1}{4\pi}\left(\boldsymbol{\nabla}\times\boldsymbol{B}\right)\times\boldsymbol{B} % Lorentz Force + \boldsymbol{\nabla}\cdot\boldsymbol{\mathcal{D}} % Viscous Forces \\ \boldsymbol{\nabla}\cdot\left[\hat{\rho}_*(r)\boldsymbol{v}\right] =\; &0. % Continuity \end{aligned}\end{split}\]

The momentum equation solved in anelastic mode is augmented by a buoyancy term that is normally ignored under the LBR (Lantz-Braginsky-Roberts) formulation of the anelastic approximation. This new term is proportional to the background entropy gradient. Hence, in a convection zone, this term is quite small and its exclusion is well justified. However, in a stable layer, this term is not small and should be considered.

The continuity equation is still a solenoidal constraint, but instead of the mass flux being divergenceless, a “pseudo-mass” flux is divergenceless. In the solenoidal constraint above, the quantity \(\hat{\rho}_*\) is the pseudo-density of the background atmosphere. This pseudo-density is a thermodynamic state variable that depends on the mass density and the specific entropy density,

(12)#\[\hat{\rho}_*(r) \equiv \hat{\rho}(r) \, e^{\hat{S}(r)/c_P}\]