density_bcs

Module

Quick access

Routines:

bc_ism_dens(), bc_lnrho_cfb_r_iso(), bc_lnrho_hds_z_iso_dens(), bc_lnrho_hdss_z_iso(), initialize_density_bcs()

Needed modules

Variables

  • densitybcs/reference_state (*,*) [real,private/pointer]
  • densitybcs/xbot [integer,private/parameter/optional/default=1]
  • densitybcs/xtop [integer,private/parameter/optional/default=nx]

Subroutines and functions

subroutine  densitybcs/initialize_density_bcs()
Use :

sharedvariables (get_shared_variable())

Call to:

fourier_transform_xy_xy(), fatal_error(), div()

subroutine  densitybcs/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]

  • topbot [integer,in]

Use :

densitymethods (getrho()), gravity (potential()), sub (div())

Call to:

fourier_transform_xy_xy(), fatal_error(), div()

subroutine  densitybcs/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]

  • topbot [integer,in]

Use :

fourier (fourier_transform_xy_xy(), fourier_transform_other(), kx_fft(), ky_fft()), gravity (potential())

Call to:

fourier_transform_xy_xy(), fatal_error(), div()

subroutine  densitybcs/bc_lnrho_hds_z_iso_dens(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 :

general (itoa()), gravity (potential(), gravz()), sub (div())

Call to:

fatal_error(), div()

subroutine  densitybcs/bc_ism_dens(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]

Call to:

fatal_error()