MPI-AMRVAC  3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Modules | Functions/Subroutines | Variables
mod_afld.t File Reference

Go to the source code of this file.

Modules

module  mod_afld
 Module for including anisotropic flux limited diffusion (AFLD)-approximation in Radiation-hydrodynamics simulations using mod_rhd Based on Turner and stone 2001. See [1]Moens, N., Sundqvist, J. O., El Mellah, I., Poniatowski, L., Teunissen, J., and Keppens, R., “Radiation-hydrodynamics with MPI-AMRVAC . Flux-limited diffusion”, Astronomy and Astrophysics, vol. 657, 2022. doi:10.1051/0004-6361/202141023. For more information.
 

Functions/Subroutines

subroutine mod_afld::afld_params_read (files)
 public methods these are called in mod_rhd_phys More...
 
subroutine, public mod_afld::afld_init (He_abundance, rhd_radiation_diffusion, afld_gamma)
 Initialising FLD-module: Read opacities Initialise Multigrid adimensionalise kappa Add extra variables to w-array, flux, kappa, eddington Tensor Lambda and R ... More...
 
subroutine, public mod_afld::get_afld_rad_force (qdt, ixIL, ixOL, wCT, w, x, energy, qsourcesplit, active)
 w[iw]=w[iw]+qdt*S[wCT,qtC,x] where S is the source based on wCT within ixO This subroutine handles the radiation force More...
 
subroutine, public mod_afld::afld_radforce_get_dt (w, ixIL, ixOL, dtnew, dxD, x)
 
subroutine, public mod_afld::get_afld_energy_interact (qdt, ixIL, ixOL, wCT, w, x, energy, qsourcesplit, active)
 w[iw]=w[iw]+qdt*S[wCT,qtC,x] where S is the source based on wCT within ixO This subroutine handles the energy exchange between gas and radiation More...
 
subroutine, public mod_afld::afld_get_opacity (w, x, ixIL, ixOL, fld_kappa)
 Sets the opacity in the w-array by calling mod_opal_opacity. More...
 
subroutine, public mod_afld::afld_get_fluxlimiter (w, x, ixIL, ixOL, fld_lambda, fld_R)
 Calculate fld flux limiter This subroutine calculates flux limiter lambda using the prescription stored in fld_fluxlimiter. It also calculates the ratio of radiation scaleheight and mean free path. More...
 
subroutine, public mod_afld::afld_get_radflux (w, x, ixIL, ixOL, rad_flux)
 Calculate Radiation Flux stores radiation flux in w-array. More...
 
subroutine mod_afld::afld_get_eddington (w, x, ixIL, ixOL, eddington_tensor)
 Calculate Eddington-tensor Stores Eddington-tensor in w-array. More...
 
subroutine, public mod_afld::afld_get_radpress (w, x, ixIL, ixOL, rad_pressure)
 Calculate Radiation Pressure Returns Radiation Pressure as tensor. More...
 
subroutine mod_afld::diffuse_e_rad_mg (dtfactor, qdt, qtC, psa, psb)
 Calling all subroutines to perform the multigrid method Communicates rad_e and diff_coeff to multigrid library. More...
 
subroutine mod_afld::evaluate_e_rad_mg (qtC, psa)
 inplace update of psa==>F_im(psa) More...
 
subroutine mod_afld::put_diffterm_onegrid (ixIL, ixOL, w)
 inplace update of psa==>F_im(psa) More...
 
subroutine mod_afld::afld_get_diffcoef_central (w, wCT, x, ixIL, ixOL)
 Calculates cell-centered diffusion coefficient to be used in multigrid. More...
 
subroutine mod_afld::update_diffcoeff (psa)
 
subroutine mod_afld::afld_smooth_diffcoef (w, ixIL, ixOL, idim)
 Use running average on Diffusion coefficient. More...
 
subroutine mod_afld::energy_interaction (w, wCT, x, ixIL, ixOL)
 This subroutine calculates the radiation heating, radiation cooling and photon tiring using an implicit scheme. These sourceterms are applied using the root-finding of a 4th order polynomial This routine loops over every cell in the domain and computes the coefficients of the polynomials in every cell. More...
 
subroutine mod_afld::bisection_method (e_gas, E_rad, c0, c1)
 Find the root of the 4th degree polynomial using the bisection method. More...
 
subroutine mod_afld::newton_method (e_gas, E_rad, c0, c1)
 Find the root of the 4th degree polynomial using the Newton-Ralphson method. More...
 
subroutine mod_afld::halley_method (e_gas, E_rad, c0, c1)
 Find the root of the 4th degree polynomial using the Halley method. More...
 
double precision function mod_afld::polynomial_bisection (e_gas, c0, c1)
 Evaluate polynomial at argument e_gas. More...
 
double precision function mod_afld::dpolynomial_bisection (e_gas, c0, c1)
 Evaluate first derivative of polynomial at argument e_gas. More...
 
double precision function mod_afld::ddpolynomial_bisection (e_gas, c0, c1)
 Evaluate second derivative of polynomial at argument e_gas. More...
 
subroutine mod_afld::gradiento (q, x, ixIL, ixOL, idir, gradq, n)
 Calculate gradient of a scalar q within ixL in direction idir difference with gradient is gradq(ixO^S), NOT gradq(ixI^S) More...
 

Variables

logical mod_afld::fld_eint_split = .false.
 source split for energy interact and radforce: More...
 
logical mod_afld::fld_radforce_split = .false.
 
double precision, public mod_afld::fld_kappa0 = 0.34d0
 Opacity per unit of unit_density. More...
 
double precision, public mod_afld::afld_mu = 0.6d0
 mean particle mass More...
 
double precision, public mod_afld::fld_bisect_tol = 1.d-4
 Tolerance for bisection method for Energy sourceterms This is a percentage of the minimum of gas- and radiation energy. More...
 
double precision, public mod_afld::fld_diff_tol = 1.d-4
 Tolerance for adi method for radiative Energy diffusion. More...
 
double precision, public mod_afld::diff_crit
 Number for splitting the diffusion module. More...
 
integer, public mod_afld::i_test
 Index for testvariable. More...
 
character(len=8), dimension(:), allocatable mod_afld::fld_opacity_law
 Use constant Opacity? More...
 
character(len=50) mod_afld::fld_opal_table = 'Y09800'
 
character(len=16) mod_afld::fld_fluxlimiter = 'Pomraning'
 Diffusion limit lambda = 0.33. More...
 
integer, dimension(:), allocatable, public mod_afld::i_diff_mg
 Index for Diffusion coeficients. More...
 
character(len=8) mod_afld::afld_diff_scheme = 'mg'
 Which method to solve diffusion part. More...
 
character(len=8) mod_afld::fld_interaction_method = 'Halley'
 Which method to find the root for the energy interaction polynomial. More...
 
logical mod_afld::fld_diff_testcase = .false.
 Set Diffusion coefficient to unity. More...
 
logical mod_afld::diff_coef_filter = .false.
 Take running average for Diffusion coefficient. More...
 
integer mod_afld::size_d_filter = 1
 
logical mod_afld::flux_lim_filter = .false.
 Take a running average over the fluxlimiter. More...
 
integer mod_afld::size_l_filter = 1
 
logical mod_afld::lineforce_opacities = .false.
 Use or dont use lineforce opacities. More...
 
logical mod_afld::diffcrash_resume = .true.
 Resume run when multigrid returns error. More...
 
double precision mod_afld::dt_diff = 0.d0
 running timestep for diffusion solver, initialised as zero More...