expansion_module Module Reference

Subroutines to handle parametric evolution of hydrodynamic quantities after the final timestep of the trajectory. More...

Functions/Subroutines

subroutine expansion_init ()
 Initialize the expansion module and open files for debugging. More...
 
subroutine residual_expansion
 Calculates the velocity for trajectory extrapolation by linear regression on a few last points; the number of points is controlled by the parameter parameter_class::extrapolation_width. More...
 
subroutine expansion (t, dt, ye, dens, rad_in, temp, entropy, vel_in, abar)
 Returns temperature, radius, density, and entropy after the trajectory has ended. More...
 
subroutine expansion_finalize ()
 Close debug files of the module. More...
 

Variables

real(r_kindmdot
 1/4pi*dM/dr = rho*r^2 = const More...
 
real(r_kindrho_0
 Density [g/ccm] at the end of the trajectory. More...
 
real(r_kindrad_0
 Radius [km] at the end of the trajectory. More...
 
real(r_kindt9_0
 Temperature [GK] at the end of the trajectory. More...
 
real(r_kindt_0
 Time at the end of the trajectory. More...
 
real(r_kindtau
 
real(r_kinds_0
 Entropy at the end of the trajectory (deprecated) More...
 
type(timmes_eos_statestate
 EOS state. More...
 
real(r_kindvel
 velocity [km/s] More...
 
real(r_kindrad
 radial distance [km] More...
 
logical expand
 flag if expansion will be present More...
 
integer expand_count
 1 for the first timestep 2 for following steps, 0 for no expansion yet More...
 
integer, private debug_exp
 file ID for debugging expansion More...
 

Detailed Description

Subroutines to handle parametric evolution of hydrodynamic quantities after the final timestep of the trajectory.

Edited:

  • 01.11.16
  • M.R. 26.12.20 - Got rid of expansion parameter

Function/Subroutine Documentation

◆ expansion()

subroutine expansion_module::expansion ( real(r_kind), intent(in)  t,
real(r_kind), intent(in)  dt,
real(r_kind), intent(in)  ye,
real(r_kind), intent(inout)  dens,
real(r_kind), intent(inout)  rad_in,
real(r_kind), intent(inout)  temp,
real(r_kind), intent(in)  entropy,
real(r_kind), intent(inout)  vel_in,
real(r_kind), intent(in)  abar 
)

Returns temperature, radius, density, and entropy after the trajectory has ended.

This depends on the parameter_class::expansiontype parameter. Possible values are:

Expansiontype parameter
Value Expansion Literature
1 Adiabatic expansion Korobkin et al. 2012
2 Exponential expansion -
3 Expansion with const. velocity -
4 Expansion with const. velocity Fujimoto et al. 2008

Edited:

  • 26.01.21 - MR
  • 17.02.21 - MR: Cleaned up the routine and removed some expansion types

Definition at line 239 of file expansion_module.f90.

Here is the call graph for this function:

◆ expansion_finalize()

subroutine expansion_module::expansion_finalize

Close debug files of the module.

Author
: Moritz Reichert

Edited:

  • 28.02.17

Definition at line 360 of file expansion_module.f90.

Here is the call graph for this function:

◆ expansion_init()

subroutine expansion_module::expansion_init

Initialize the expansion module and open files for debugging.

This subroutine also determines if the simulation has to use the expansion routine or not (depending on parameter_class::termination_criterion).

Author
: Moritz Reichert

Edited:

  • 28.02.17
  • MR 22.12.20
  • MR 22.01.21

Definition at line 59 of file expansion_module.f90.

Here is the call graph for this function:

◆ residual_expansion()

subroutine expansion_module::residual_expansion

Calculates the velocity for trajectory extrapolation by linear regression on a few last points; the number of points is controlled by the parameter parameter_class::extrapolation_width.

Remarks
At verbose Level >2 this creates a file called "debug_vel.dat" which lists extrapolated points and the computed value of velocity.

Edited:

  • 09.03.17
  • OK 13.01.2014
  • OK 17.06.2017 - cleanup, renamed: variance -> residual_expansion
  • MR 22.01.2021 - Changed entropy calculation

Definition at line 118 of file expansion_module.f90.

Here is the call graph for this function:

Variable Documentation

◆ debug_exp

integer, private expansion_module::debug_exp
private

file ID for debugging expansion

Definition at line 37 of file expansion_module.f90.

◆ expand

logical expansion_module::expand

flag if expansion will be present

Definition at line 34 of file expansion_module.f90.

◆ expand_count

integer expansion_module::expand_count

1 for the first timestep 2 for following steps, 0 for no expansion yet

Definition at line 35 of file expansion_module.f90.

◆ mdot

real(r_kind) expansion_module::mdot

1/4pi*dM/dr = rho*r^2 = const

Definition at line 24 of file expansion_module.f90.

◆ rad

real(r_kind) expansion_module::rad

radial distance [km]

Definition at line 33 of file expansion_module.f90.

◆ rad_0

real(r_kind) expansion_module::rad_0

Radius [km] at the end of the trajectory.

Definition at line 26 of file expansion_module.f90.

◆ rho_0

real(r_kind) expansion_module::rho_0

Density [g/ccm] at the end of the trajectory.

Definition at line 25 of file expansion_module.f90.

◆ s_0

real(r_kind) expansion_module::s_0

Entropy at the end of the trajectory (deprecated)

Definition at line 30 of file expansion_module.f90.

◆ state

type(timmes_eos_state) expansion_module::state

EOS state.

Definition at line 31 of file expansion_module.f90.

◆ t9_0

real(r_kind) expansion_module::t9_0

Temperature [GK] at the end of the trajectory.

Definition at line 27 of file expansion_module.f90.

◆ t_0

real(r_kind) expansion_module::t_0

Time at the end of the trajectory.

Definition at line 28 of file expansion_module.f90.

◆ tau

real(r_kind) expansion_module::tau

Definition at line 29 of file expansion_module.f90.

◆ vel

real(r_kind) expansion_module::vel

velocity [km/s]

Definition at line 32 of file expansion_module.f90.