MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
mod_cak_force Module Reference

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, public cak_init (phys_gamma)
 Initialize the module.
subroutine, public set_cak_force_norm (rstar_cgs, twind_cgs)
 Compute some (unitless) variables for CAK force normalisation.
subroutine, public 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
subroutine, public cak_get_dt (wprim, ixil, ixol, dtnew, dxd, x)
 Check time step for total radiation contribution.

Variables

real(8), public cak_alpha
 Line-ensemble parameters in the Gayley (1995) formalism.
real(8), public gayley_qbar
real(8), public gayley_q0
real(8), public kappae_cgs = 0.0d0
 Free-electron scattering opacity.
integer, public gcak1_
 Extra slots to store quantities in w-array.
integer, public gcak2_
integer, public gcak3_
integer, public fdf_
integer, public alpha_
integer, public qbar_
integer, public q0_
integer, public kappae_

Detailed Description

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:

  1. Include a cak_list in the .par file and activate (m)hd_cak_force in the (m)hd_list
  2. Create a mod_usr.t file for the problem with appropriate initial and boundary conditions
  3. In the mod_usr.t header call the mod_cak_force module to have access to global variables from mod_cak_force, which may be handy for printing or the computation of other variables inside mod_usr.t
  4. In usr_init of mod_usr.t call the set_cak_force_norm routine and pass along the stellar radius and wind temperature—this is needed to correctly compute the (initial) force normalisation inside mod_cak_force
  5. Always ensure that the set_cak_force_norm routine is called in mod_usr.t Developed by Florian Driessen (2022, 2026)

Function/Subroutine Documentation

◆ cak_add_source()

subroutine, public 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 258 of file mod_cak_force.t.

Here is the call graph for this function:

◆ cak_get_dt()

subroutine, public mod_cak_force::cak_get_dt ( real(8), dimension(ixi^s,1:nw), intent(in) wprim,
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 614 of file mod_cak_force.t.

◆ cak_init()

subroutine, public mod_cak_force::cak_init ( real(8), intent(in) phys_gamma)

Initialize the module.

Definition at line 154 of file mod_cak_force.t.

Here is the call graph for this function:

◆ set_cak_force_norm()

subroutine, public mod_cak_force::set_cak_force_norm ( real(8), intent(in) rstar_cgs,
real(8), intent(in) twind_cgs )

Compute some (unitless) variables for CAK force normalisation.

Definition at line 240 of file mod_cak_force.t.

Variable Documentation

◆ alpha_

integer, public mod_cak_force::alpha_

Definition at line 72 of file mod_cak_force.t.

◆ cak_alpha

real(8), public mod_cak_force::cak_alpha

Line-ensemble parameters in the Gayley (1995) formalism.

Definition at line 35 of file mod_cak_force.t.

◆ fdf_

integer, public mod_cak_force::fdf_

Definition at line 71 of file mod_cak_force.t.

◆ gayley_q0

real(8), public mod_cak_force::gayley_q0

Definition at line 35 of file mod_cak_force.t.

◆ gayley_qbar

real(8), public mod_cak_force::gayley_qbar

Definition at line 35 of file mod_cak_force.t.

◆ gcak1_

integer, public mod_cak_force::gcak1_

Extra slots to store quantities in w-array.

Definition at line 71 of file mod_cak_force.t.

◆ gcak2_

integer, public mod_cak_force::gcak2_

Definition at line 71 of file mod_cak_force.t.

◆ gcak3_

integer, public mod_cak_force::gcak3_

Definition at line 71 of file mod_cak_force.t.

◆ kappae_

integer, public mod_cak_force::kappae_

Definition at line 72 of file mod_cak_force.t.

◆ kappae_cgs

real(8), public mod_cak_force::kappae_cgs = 0.0d0

Free-electron scattering opacity.

Definition at line 38 of file mod_cak_force.t.

◆ q0_

integer, public mod_cak_force::q0_

Definition at line 72 of file mod_cak_force.t.

◆ qbar_

integer, public mod_cak_force::qbar_

Definition at line 72 of file mod_cak_force.t.