radiation_fld

Module

Description

$Id$

Radiation in the fluxlimited-diffusion approximation. Doesn’t work convincingly (and maybe never will). Look at the (still experimental) module radiation_ray.f90 for a more sophisticated approach.

** 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 :: lradiation = .true.

MVAR CONTRIBUTION 1 MAUX CONTRIBUTION 4


Quick access

Types:

qbound

Variables:

a_sb, ampl_pert, c_gam, dff_new, flim, idiag_egas_max, idiag_egas_rms, idiag_erad_max, idiag_erad_rms, idiag_fmax, idiag_frms, inflow, initrad, k_b_radiation, kappa_es_radiation, opas, pertee, qbound

Routines:

bc_ee_inflow_x(), bc_ee_outflow_x(), calc_diagnostics_radiation(), calc_pencils_radiation(), de_dt(), dradiation_dt(), flux_limiter(), get_slices_radiation(), init_equil(), init_rad(), initialize_radiation(), pencil_criteria_radiation(), pencil_interdep_radiation(), radiative_cooling(), radiative_pressure(), radtransfer(), read_radiation_init_pars(), read_radiation_run_pars(), register_radiation(), rprint_radiation(), write_radiation_init_pars(), write_radiation_run_pars()

Needed modules

Variables

  • radiation/a_sb [real,optional/default=1.0]
  • radiation/ampl_pert [real,optional/default=0]
  • radiation/amplee [real,optional/default=0]
  • radiation/c_gam [real,optional/default=100]
  • radiation/dff_new (mx,my,mz) [real,optional/default=0.]
  • radiation/flim [character,optional/default='lp']
  • radiation/idiag_egas_max [integer,optional/default=0]
  • radiation/idiag_egas_rms [integer,optional/default=0]
  • radiation/idiag_erad_max [integer,optional/default=0]
  • radiation/idiag_erad_rms [integer,optional/default=0]
  • radiation/idiag_fmax [integer,optional/default=0]
  • radiation/idiag_frms [integer,optional/default=0]
  • radiation/inflow [real,optional/default=2]
  • radiation/initrad [character,optional/default='equil']
  • radiation/k_b_radiation [real,optional/default=1.0]
  • radiation/kappa_es_radiation [real,optional/default=0]
  • radiation/mbar [real,optional/default=1.0]
  • radiation/opas [real,optional/default=1e-08]
  • radiation/pertee [character,optional/default='none']

Subroutines and functions

subroutine  radiation/register_radiation()

Initialise variables which should know that we solve for the vector potential: iaa, etc; increase nvar accordingly

15-jul-02/nils: coded

Use :

cdata, mpicomm, sub, farraymanager

Called from:

register_modules()

Call to:

stop_it(), svn_id(), init_equil(), dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/radtransfer(f)

Integration radioation transfer equation along rays

24-mar-03/axel+tobi: coded

Parameters:

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

Use :

cdata, sub

Called from:

pde(), write_diagnostics(), calc_all_module_diagnostic_auxiliaries(), perform_diagnostics(), finalize_diagnostics(), start

Call to:

init_equil(), stop_it(), dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/initialize_radiation()

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

24-nov-02/tony: coded

do nothing

Called from:

register_modules(), initialize_modules()

Call to:

init_equil(), stop_it(), dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/radiative_cooling(f, df, p)

dummy routine

25-mar-03/axel+tobi: coded

Parameters:
Use :

cdata

Call to:

init_equil(), stop_it(), dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/radiative_pressure(f, df, p)

dummy routine

25-mar-03/axel+tobi: coded

Parameters:
Use :

cdata

Call to:

init_equil(), stop_it(), dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/init_rad(f)

initialise radiation; called from start.f90 We have an init parameter (initrad) to stear radiation i.c. independently.

15-jul-2002/nils: coded

Parameters:

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

Use :

cdata, mpicomm, sub, initcond

Called from:

start

Call to:

init_equil(), stop_it(), dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/pencil_criteria_radiation()

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

21-11-04/anders: coded

Called from:

register_modules(), initialize_modules(), finalize_modules(), choose_pencils()

Call to:

dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/pencil_interdep_radiation(lpencil_in)

Interdependency among pencils provided by the Radiation module is specified here.

21-11-04/anders: coded

Parameters:

lpencil_in (npencils) [logical]

Called from:

register_modules(), initialize_modules(), finalize_modules(), choose_pencils()

Call to:

dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/calc_pencils_radiation(f, p)

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

21-11-04/anders: coded

Parameters:
Called from:

pde(), write_diagnostics(), calc_all_module_diagnostic_auxiliaries(), perform_diagnostics(), finalize_diagnostics()

Call to:

dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/de_dt(f, df, p, gamma)

13-Dec-01/nils: coded 15-Jul-02/nils: adapted from pencil_mpi 30-Jul-02/nils: moved calculation of 1. and 2. moment to other routine

Parameters:
Use :

sub, cdata, mpicomm, diagnostics, deriv

Call to:

dot_mn(), div(), flux_limiter(), max_mn_name()

subroutine  radiation/read_radiation_init_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

dot2_mn(), dot_mn()

subroutine  radiation/write_radiation_init_pars(unit)
Parameters:

unit [integer,in]

Called from:

get_datadir(), get_snapdir(), read_all_init_pars(), read_all_run_pars(), get_downpars()

Call to:

dot2_mn(), dot_mn()

subroutine  radiation/read_radiation_run_pars(iomsg)
Parameters:

iomsg [character,out]

Use :

file_io (parallel_unit())

Call to:

dot2_mn(), dot_mn()

subroutine  radiation/write_radiation_run_pars(unit)
Parameters:

unit [integer,in]

Called from:

get_datadir(), get_snapdir(), read_all_init_pars(), read_all_run_pars(), get_downpars()

Call to:

dot2_mn(), dot_mn()

subroutine  radiation/rprint_radiation(lreset[, lwrite])

reads and registers print parameters relevant for radiative part

16-jul-02/nils: adapted from rprint_hydro

Parameters:
  • lreset [logical]

  • lwrite [logical]

Use :

cdata, diagnostics, farraymanager (farray_index_append()), sub

Called from:

register_modules(), initialize_modules(), finalize_modules(), choose_pencils(), rprint_list()

Call to:

dot2_mn(), dot_mn()

subroutine  radiation/get_slices_radiation(f, slices)

Write slices for animation of radiation variables.

26-jun-06/tony: dummy

Parameters:
Called from:

wvid_prepare(), wvid()

Call to:

dot2_mn(), dot_mn()

subroutine  radiation/flux_limiter(f, df, rho1, kappa, grade, e_rad, p_tens, divf)

This subroutine uses the flux limited diffusion approximation and calculates the flux limiter and P_tens

30-jul-02/nils: coded

Parameters:
  • f (mx,my,mz,mfarray) [real]

  • df (mx,my,mz,mvar) [real]

  • rho1 (nx) [real]

  • kappa (nx) [real]

  • grade (nx,3) [real]

  • e_rad (nx) [real]

  • p_tens (nx,3,3) [real]

  • divf (nx) [real]

Use :

sub, cdata

Called from:

register_radiation(), radtransfer(), initialize_radiation(), init_rad(), pencil_criteria_radiation(), pencil_interdep_radiation(), calc_pencils_radiation(), radiative_cooling(), radiative_pressure(), de_dt()

Call to:

dot2_mn(), dot_mn()

subroutine  radiation/init_equil(f)

Routine for calculating equilibrium solution of radiation This routine is now outdated and doen’t include cp /= 1.

18-jul-02/nils: coded

Parameters:

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

Use :

cdata, equationofstate (cs20(), lnrho0(), gamma())

Called from:

register_radiation(), radtransfer(), initialize_radiation(), init_rad(), radiative_cooling(), radiative_pressure()

subroutine  radiation/bc_ee_inflow_x(f, topbot)

The inflow boundary condition must be improved, it do not work correctly in this simple form

8-aug-02/nils: coded

Parameters:
Use :

cdata

subroutine  radiation/bc_ee_outflow_x(f, topbot)

The outflow boundary condition must be improved, it do not work correctly in this simple form

8-aug-02/nils: coded

Parameters:
Use :

cdata