boussinesq

Module

Description

$Id$

23-mar-2012/dintrans: coded

Solve the Poisson equation for pressure when using the Boussinesq approximation (the so-called ``projection method’’).

** AUTOMATIC CPARAM.INC GENERATION ************************ Declare (for generation of cparam.inc) the number of f array variables and auxiliary variables added by this module

CPARAM logical, parameter :: ldensity = .false. CPARAM logical, parameter :: lanelastic = .false. CPARAM logical, parameter :: lboussinesq = .true.

MVAR CONTRIBUTION 0 MAUX CONTRIBUTION 1 COMMUNICATED AUXILIARIES 1

PENCILS PROVIDED rho; lnrho; rho1; glnrho(3); del2rho; del2lnrho PENCILS PROVIDED hlnrho(3,3); grho(3); glnrho2 PENCILS PROVIDED del6lnrho; uij5glnrho(3); uglnrho; ugrho; sglnrho(3) PENCILS PROVIDED ekin; transprho

PENCILS PROVIDED glnrhos(3) PENCILS PROVIDED totenergy_rel


Quick access

Variables:

accumulate_schur_averages, ampllnrho, amplrho, borderlnrho, calc_0d_diagnostics_density, calc_1d_diagnostics_density, calc_2d_diagnostics_density, calc_advec_hypermesh, calc_pencils_density, calc_pencils_density_pnc, calc_pencils_density_std, calc_pencils_linear_density, calc_pencils_linear_density_pnc, calc_pencils_log_density_pnc, calc_sld_fdiff, cdiffrho, cloud_mode, co1_ss, co2_ss, coeflnrho, correct_for_selfgravity, correct_pressure_gradient, cutoff_lnrho, damplnrho_ext, damplnrho_int, datafile, del2lnrho_glnrho2_init_z, del2lnrho_init_z, dens_coeff, density_ceiling, density_ceiling_log, density_floor, density_floor_exp, density_floor_log, density_floor_profile, density_xaver_range, density_zaver_range, diff_cspeed, diffrho, diffrho_hyper3_aniso, diffrho_hyper3_mesh, diffrho_shock, diffus_diffrho, diffus_diffrho3, div_sld_dens, dlnrhodz_init_z, dprofx_ffree, dprofy_ffree, dprofz_eos, dprofz_ffree, enum_borderlnrho, enum_density_floor_profile, enum_div_sld_dens, enum_ieos_profile, enum_mass_source_profile, eps_planet, exponential_fall, ffree_profile, fnorm, fprofile_x, fprofile_z, ggamma, glnrho2_init_z, h_sld_dens, hh0, hrho, idiag_divrhoum, idiag_divrhoumax, idiag_divrhourms, idiag_drho2m, idiag_drho2mx, idiag_drho2mxy, idiag_drho2mxz, idiag_drho2my, idiag_drho2mz, idiag_drhom, idiag_drhomax, idiag_drhomx, idiag_drhomxy, idiag_drhomxz, idiag_drhomy, idiag_drhomz, idiag_drhorms, idiag_dtd, idiag_dtd3, idiag_grhomax, idiag_gzlnrhomz, idiag_inertiaxx, idiag_inertiaxx_car, idiag_inertiayy, idiag_inertiayy_car, idiag_inertiazz, idiag_inertiazz_car, idiag_kap_tdep, idiag_lnrho2m, idiag_lnrhomax, idiag_lnrhomin, idiag_lnrhomphi, idiag_lnrhorms, idiag_mass, idiag_rho12m, idiag_rho2downmz, idiag_rho2m, idiag_rho2mx, idiag_rho2mxy, idiag_rho2mz, idiag_rho2ph1mz, idiag_rho2ph2mz, idiag_rho2ph3mz, idiag_rho2upmz, idiag_rho4m, idiag_rho6m, idiag_rho8m, idiag_rhodownmz, idiag_rhof2downmz, idiag_rhof2m, idiag_rhof2mz, idiag_rhof2upmz, idiag_rhom, idiag_rhomax, idiag_rhomaxloc, idiag_rhomin, idiag_rhominloc, idiag_rhomphi, idiag_rhomr, idiag_rhomx, idiag_rhomxmask, idiag_rhomxy, idiag_rhomxz, idiag_rhomy, idiag_rhomz, idiag_rhomzmask, idiag_rhoph1mz, idiag_rhoph2mz, idiag_rhoph3mz, idiag_rhorms, idiag_rhoupmz, idiag_sphmass, idiag_totmass, idiag_uglnrhom, idiag_uglnrhomz, idiag_ugrhom, idiag_ugrhomz, idiag_uygzlnrhomz, idiag_uzgylnrhomz, idiag_vol, idiff, ieos_profile, iglobal_gg, implicit_diffusion, implicit_diffusion_mpi, init_average_density, init_hydrostatic_r, init_sph_isoth, initlnrho, initpower_lnrho, initrho, inverse_laplacian_z, inverse_laplacian_z_2nd, invgrav_ampl, iorder_z, ireference_state, isothermal_density, kap_tdep, kgaussian_lnrho, kpeak_lnrho, kx_lnrho, kxx_lnrho, ky_lnrho, kyy_lnrho, kz_lnrho, kzz_lnrho, ladvection_density, lanelastic_lin, lanti_shockdiffusion, lcalc_glnrhomean, lcalc_lnrhomean, lcheck_negative_density, lconserve_mass, lconserve_total_mass, lcontinuity_gas, ldensity_profile_masscons, ldensity_slope_limited, ldiff_cspeed, ldiff_hyper3, ldiff_hyper3_aniso, ldiff_hyper3_mesh, ldiff_hyper3_polar, ldiff_hyper3_strict, ldiff_hyper3lnrho, ldiff_hyper3lnrho_strict, ldiff_kap_tdep, ldiff_normal, ldiff_shock, ldiffusion_nolog, lexponential_smooth, lfreeze_lnrhoext, lfreeze_lnrhoint, lfreeze_lnrhosqu, lgamma_is_1, lhubble_density, lisothermal_fixed_hrho, lmass_source, lmass_source_random, lmassdiff_fix, lmassdiff_fixkin, lmassdiff_fixmom, lnrho_const, lnrho_ext, lnrho_init_z_nz, lnrho_int, lnrho_z_shift, lnrhomz, local_isothermal_density, lpositive_total_mass, lpress_equil_uu, lreinitialize_lnrho, lreinitialize_rho, lrelativistic_eos_term1, lrelativistic_eos_term2, lremove_mean_temperature, lrho_as_aux, lrho_flucz_as_aux, lscale_tobox_lnrho, lschur_3d3d1d, lshare_plaw, lsubtract_init_stratification, lupdate_mass_source, lupw_lnrho, lupw_rho, lwrite_debug, lwrite_stratification, mass0, mass_cloud, mass_source, mass_source_mdot, mass_source_offset, mass_source_omega, mass_source_profile, mass_source_sigma, mass_source_tau1, ndiff_max, niter, nlf_sld_dens, numerical_equilibrium, phase_lnrho, plaw, polytropic_lnrho_disc, polytropic_lnrho_z, polytropic_simple, power_law_disk, power_law_gaussian_disk, profz_eos, q_ell, r0_rho, radial_percent_smooth, radius_lnrho, read_reference_state, reduce_cs2_profx, reduce_cs2_profz, reference_state_mass, reference_state_padded, rescale_rho, rho_bottom, rho_const, rho_left, rho_right, rhobar, rhobar_file, rmax_mass_source, rshift, rss_coef1, rss_coef2, rzero_ffree, sc, schur_dlnrho_rhs_xyaver_z, schur_dlnrho_rhs_xyzaver, schur_dlnrho_rhs_zaver_xy, set_border_density, shell_lnrho, sigma1, strati_type, stratification_tsallis, t_cloud, t_cloud_out_rel, tdep_kap_type, temp_coeff, temp_coeff_out, temp_trans, total_mass, tstart_mass_source, tstop_mass_source, wdamp, wdamp_rho, wffree, width_eos_prof, widthlnrho, xblob, xi_coeff, xmask_den, yblob, zblob, zmask_den

Routines:

anelastic_after_mn(), boussinesq(), calc_diagnostics_density(), calc_pencils_density(), density_after_boundary(), density_after_mn(), density_before_boundary(), density_before_boundary_diagnostics(), dlnrho_dt(), dynamical_diffusion(), get_init_average_density(), get_slices_density(), get_slices_pressure(), impose_density_ceiling(), impose_density_floor(), init_lnrho(), initialize_density(), mean_density(), pencil_criteria_density(), pencil_interdep_density(), read_density_init_pars(), read_density_run_pars(), register_density(), rprint_density(), split_update_density(), update_char_vel_density(), write_density_init_pars(), write_density_run_pars(), write_z_stratification()

Needed modules

Variables

  • density/beta_glnrho_global (3) [real,private/optional/default=0.]
  • density/beta_glnrho_scaled (3) [real,private/optional/default=0.]
  • density/chi [real,private/pointer]
  • density/dx_2 [real,private]
  • density/dz_2 [real,private]
  • density/glnrhomz (nz) [real,private]
  • density/implicit_diffusion [private]
  • density/implicit_diffusion_mpi [private]
  • density/inverse_laplacian_z [private]
  • density/inverse_laplacian_z_2nd [private]
  • density/iorder_z [integer,private/optional/default=4]
  • density/lcalc_glnrhomean [logical,private/optional/default=.false.]
  • density/lcalc_lnrhomean [logical,public/optional/default=.false.]
  • density/lnrhomz (mz) [real,private]
  • density/load_variables_to_gpu_hydro [private]
  • density/lremove_mean_temperature [logical,private/optional/default=.false.]
  • density/lupw_lnrho [logical,public/optional/default=.false.]
  • density/lwrite_debug [logical,private/optional/default=.false.]
  • density/pr [real,private/pointer]

Subroutines and functions

subroutine  density/register_density()
Use :

farraymanager (farray_register_auxiliary()), sharedvariables (put_shared_variable())

Call to:

svn_id(), not_implemented(), select_eos_variable(), initialize_density_methods(), remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/initialize_density(f)

Perform any post-parameter-read initialization i.e. calculate derived parameters.

24-nov-02/tony: coded

Parameters:

f (mx,my,mz,mfarray) [real]

Use :

equationofstate (select_eos_variable()), densitymethods (initialize_density_methods()), sharedvariables (get_shared_variable())

Call to:

not_implemented(), select_eos_variable(), initialize_density_methods(), remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/init_lnrho(f)
Parameters:

f (mx,my,mz,mfarray) [real]

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/read_density_run_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/read_density_init_pars(iomsg)
Parameters:

iomsg [character,out]

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/write_density_init_pars(unit)
Parameters:

unit [integer,in]

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/write_density_run_pars(unit)
Parameters:

unit [integer,in]

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/density_after_boundary(f)
Parameters:

f (mx,my,mz,mfarray) [real]

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/pencil_criteria_density()

All pencils that the Density module depends on are specified here.

20-11-04/anders: coded

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/pencil_interdep_density(lpencil_in)

Interdependency among pencils from the Density module is specified here.

20-11-04/anders: coded

Parameters:

lpencil_in (npencils) [logical]

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/calc_pencils_density(f, p)

Calculate Density pencils. Most basic pencils should come first, as others may depend on them.

20-11-04/anders: coded

Parameters:
Use :

equationofstate (lnrho0(), rho0())

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/density_before_boundary(f)
Parameters:

f (mx,my,mz,mfarray) [real,inout]

Use :

sub (remove_mean())

Call to:

remove_mean(), update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/dlnrho_dt(f, df, p)
Parameters:
Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/split_update_density(f)
Parameters:

f (mx,my,mz,mfarray) [real,in]

Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/impose_density_floor(f)
Parameters:

f (mx,my,mz,mfarray) [real,in]

Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/rprint_density(lreset[, lwrite])
Parameters:
  • lreset [logical]

  • lwrite [logical]

Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/get_slices_density(f, slices)
Parameters:
Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/get_slices_pressure(f, slices)
Parameters:
Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/get_init_average_density(f, init_average_density)

10-dec-09/piyali: added to pass initial average density

Parameters:
Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/density_after_mn(f, df, mass_per_proc)

14-dec-09/dintrans: coded

Parameters:
Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/dynamical_diffusion(uc)

dummy routine

Parameters:

uc [real,in]

Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

subroutine  density/boussinesq(f)
12-may-12/MR: factors dt removed; updating of ghosts zones

for non-periodicity in z direction added

15-may-12/dintrans: the updating of ghost zones before inverting the laplacian

is not needed as vertical BCs are hard-coded in the linear solver

Parameters:

f (mx,my,mz,mfarray) [real]

Use :

poisson (inverse_laplacian()), sub (div(), grad()), boundcond (update_ghosts()), sharedvariables (get_shared_variable())

Call to:

update_ghosts(), div(), inverse_laplacian(), fourier_transform_xy(), transp_xz(), transp_zx(), tridag(), cyclic(), mean_density()

function  density/mean_density(f)

Return mean density as rho0 from eos

1-mar-15/MR: derived from mean_density in density

Parameters:

f (mx,my,mz,mfarray) [real,in]

Return:

mean_density [real]

Use :

equationofstate (rho0())

subroutine  density/update_char_vel_density(f)

Updates characteristic veelocity for slope-limited diffusion. Most likely not yet a good method.

21-oct-15/MR: coded

Parameters:

f (mx,my,mz,mfarray) [real,inout]

Use :

equationofstate (rho0())

subroutine  density/impose_density_ceiling(f)

Dummy routine.

Parameters:

f (mx,my,mz,mfarray) [real,inout]

subroutine  density/calc_diagnostics_density(f, p)
Parameters:
subroutine  density/density_before_boundary_diagnostics(f)
Parameters:

f (mx,my,mz,mfarray) [real]

subroutine  density/write_z_stratification(f)
Parameters:

f (mx,my,mz,mfarray) [real]

subroutine  density/pushpars2c(p_par)
Parameters:

p_par (*) [integer]