MPI-AMRVAC
3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code
|
Module to include CAK radiation line force in (magneto)hydrodynamic models Computes both the force from free electrons and the force from an ensemble of lines (various possibilities for the latter). There is an option to only simulate the pure radial CAK force (with various corrections applied) as well as the full vector CAK force. Depending on the chosen option additional output are the CAK line force component(s) and, when doing a 1-D radial force, the finite disc factor. More...
Functions/Subroutines | |
subroutine | cak_params_read (files) |
Public method. More... | |
subroutine | cak_init (phys_gamma) |
Initialize the module. More... | |
subroutine, public | set_cak_force_norm (rstar, twind) |
Compute some (unitless) variables for CAK force normalisation. More... | |
subroutine | cak_add_source (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 More... | |
subroutine | get_cak_force_radial (ixIL, ixOL, wCT, w, x, gcak) |
1-D CAK line force in the Gayley line-ensemble distribution parametrisation More... | |
subroutine | get_cak_force_vector (ixIL, ixOL, wCT, w, x, gcak) |
Vector CAK line force in the Gayley line-ensemble distribution parametrisation. More... | |
subroutine | get_gelectron (ixIL, ixOL, w, x, ge) |
Compute continuum radiation force from Thomson scattering. More... | |
subroutine | cak_get_dt (w, ixIL, ixOL, dtnew, dxD, x) |
Check time step for total radiation contribution. More... | |
subroutine | get_velocity_gradient (ixIL, ixOL, vfield, x, idir, grad_vn) |
Compute velocity gradient in direction 'idir' on a non-uniform grid. More... | |
subroutine | rays_init (ntheta_point, nphi_point) |
Initialise (theta',phi') radiation angles coming from stellar disc. More... | |
subroutine | gauss_legendre_quadrature (xlow, xhi, n, x, w) |
Fast Gauss-Legendre N-point quadrature algorithm by G. Rybicki. More... | |
Variables | |
real(8), public | cak_alpha |
Line-ensemble parameters in the Gayley (1995) formalism. More... | |
real(8), public | gayley_qbar |
real(8), public | gayley_q0 |
integer | cak_1d_opt |
Switch to choose between the 1-D CAK line force options. More... | |
logical | cak_split =.false. |
To treat source term in split or unsplit (default) fashion. More... | |
logical | cak_1d_force =.false. |
To activate the original CAK 1-D line force computation. More... | |
logical | cak_vector_force =.false. |
To activate the vector CAK line force computation. More... | |
logical | fix_vector_force_1d =.false. |
To activate the pure radial vector CAK line force computation. More... | |
integer | nthetaray |
Amount of rays in radiation polar and radiation azimuthal direction. More... | |
integer | nphiray |
integer | gcak1_ |
Extra slots to store quantities in w-array. More... | |
integer | gcak2_ |
integer | gcak3_ |
integer | fdf_ |
Module to include CAK radiation line force in (magneto)hydrodynamic models Computes both the force from free electrons and the force from an ensemble of lines (various possibilities for the latter). There is an option to only simulate the pure radial CAK force (with various corrections applied) as well as the full vector CAK force. Depending on the chosen option additional output are the CAK line force component(s) and, when doing a 1-D radial force, the finite disc factor.
USAGE:
Developed by Florian Driessen (2022)
subroutine mod_cak_force::cak_add_source | ( | real(8), intent(in) | qdt, |
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
real(8), dimension(ixi^s,1:nw), intent(in) | wCT, | ||
real(8), dimension(ixi^s,1:nw), intent(inout) | w, | ||
real(8), dimension(ixi^s,1:ndim), intent(in) | x, | ||
logical, intent(in) | energy, | ||
logical, intent(in) | qsourcesplit, | ||
logical, intent(inout) | active | ||
) |
w[iw]=w[iw]+qdt*S[wCT,qtC,x] where S is the source based on wCT within ixO
Definition at line 159 of file mod_cak_force.t.
subroutine mod_cak_force::cak_get_dt | ( | real(8), dimension(ixi^s,1:nw), intent(in) | w, |
integer, intent(in) | ixI, | ||
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
real(8), intent(inout) | dtnew, | ||
real(8), intent(in) | dx, | ||
real(8), intent(in) | D, | ||
real(8), dimension(ixi^s,1:ndim), intent(in) | x | ||
) |
Check time step for total radiation contribution.
Definition at line 441 of file mod_cak_force.t.
subroutine mod_cak_force::cak_init | ( | real(8), intent(in) | phys_gamma | ) |
Initialize the module.
Definition at line 97 of file mod_cak_force.t.
subroutine mod_cak_force::cak_params_read | ( | character(len=*), dimension(:), intent(in) | files | ) |
Public method.
Read this module's parameters from a file
Definition at line 76 of file mod_cak_force.t.
subroutine mod_cak_force::gauss_legendre_quadrature | ( | real(8), intent(in) | xlow, |
real(8), intent(in) | xhi, | ||
integer, intent(in) | n, | ||
real(8), dimension(n), intent(out) | x, | ||
real(8), dimension(n), intent(out) | w | ||
) |
Fast Gauss-Legendre N-point quadrature algorithm by G. Rybicki.
Definition at line 633 of file mod_cak_force.t.
subroutine mod_cak_force::get_cak_force_radial | ( | integer, intent(in) | ixI, |
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
real(8), dimension(ixi^s,1:nw), intent(in) | wCT, | ||
real(8), dimension(ixi^s,1:nw), intent(inout) | w, | ||
real(8), dimension(ixi^s,1:ndim), intent(in) | x, | ||
real(8), dimension(ixo^s,1:3), intent(inout) | gcak | ||
) |
1-D CAK line force in the Gayley line-ensemble distribution parametrisation
Definition at line 216 of file mod_cak_force.t.
subroutine mod_cak_force::get_cak_force_vector | ( | integer, intent(in) | ixI, |
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
real(8), dimension(ixi^s,1:nw), intent(in) | wCT, | ||
real(8), dimension(ixi^s,1:nw), intent(inout) | w, | ||
real(8), dimension(ixi^s,1:ndim), intent(in) | x, | ||
real(8), dimension(ixo^s,1:3), intent(inout) | gcak | ||
) |
Vector CAK line force in the Gayley line-ensemble distribution parametrisation.
Definition at line 292 of file mod_cak_force.t.
subroutine mod_cak_force::get_gelectron | ( | integer, intent(in) | ixI, |
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
real(8), dimension(ixi^s,1:nw), intent(in) | w, | ||
real(8), dimension(ixi^s,1:ndim), intent(in) | x, | ||
real(8), dimension(ixo^s), intent(out) | ge | ||
) |
Compute continuum radiation force from Thomson scattering.
Definition at line 429 of file mod_cak_force.t.
subroutine mod_cak_force::get_velocity_gradient | ( | integer, intent(in) | ixI, |
integer, intent(in) | L, | ||
integer, intent(in) | ixO, | ||
L, | |||
real(8), dimension(ixi^s), intent(in) | vfield, | ||
real(8), dimension(ixi^s,1:ndim), intent(in) | x, | ||
integer, intent(in) | idir, | ||
real(8), dimension(ixo^s), intent(out) | grad_vn | ||
) |
Compute velocity gradient in direction 'idir' on a non-uniform grid.
Definition at line 478 of file mod_cak_force.t.
subroutine mod_cak_force::rays_init | ( | integer, intent(in) | ntheta_point, |
integer, intent(in) | nphi_point | ||
) |
Initialise (theta',phi') radiation angles coming from stellar disc.
Definition at line 546 of file mod_cak_force.t.
subroutine, public mod_cak_force::set_cak_force_norm | ( | real(8), intent(in) | rstar, |
real(8), intent(in) | twind | ||
) |
Compute some (unitless) variables for CAK force normalisation.
Definition at line 143 of file mod_cak_force.t.
logical mod_cak_force::cak_1d_force =.false. |
To activate the original CAK 1-D line force computation.
Definition at line 44 of file mod_cak_force.t.
integer mod_cak_force::cak_1d_opt |
Switch to choose between the 1-D CAK line force options.
Definition at line 35 of file mod_cak_force.t.
real(8), public mod_cak_force::cak_alpha |
Line-ensemble parameters in the Gayley (1995) formalism.
Definition at line 32 of file mod_cak_force.t.
logical mod_cak_force::cak_split =.false. |
To treat source term in split or unsplit (default) fashion.
Definition at line 41 of file mod_cak_force.t.
logical mod_cak_force::cak_vector_force =.false. |
To activate the vector CAK line force computation.
Definition at line 47 of file mod_cak_force.t.
integer mod_cak_force::fdf_ |
Definition at line 68 of file mod_cak_force.t.
logical mod_cak_force::fix_vector_force_1d =.false. |
To activate the pure radial vector CAK line force computation.
Definition at line 50 of file mod_cak_force.t.
real(8), public mod_cak_force::gayley_q0 |
Definition at line 32 of file mod_cak_force.t.
real(8), public mod_cak_force::gayley_qbar |
Definition at line 32 of file mod_cak_force.t.
integer mod_cak_force::gcak1_ |
Extra slots to store quantities in w-array.
Definition at line 68 of file mod_cak_force.t.
integer mod_cak_force::gcak2_ |
Definition at line 68 of file mod_cak_force.t.
integer mod_cak_force::gcak3_ |
Definition at line 68 of file mod_cak_force.t.
integer mod_cak_force::nphiray |
Definition at line 53 of file mod_cak_force.t.
integer mod_cak_force::nthetaray |
Amount of rays in radiation polar and radiation azimuthal direction.
Definition at line 53 of file mod_cak_force.t.