Evolution
The Evolution module of Jems contains the basic tools needed to combine all other modules to perform stellar evolution. It allows a fully customizable definition of the equations that are solved together with their boundary conditions.
Equations.jl
Jems.Evolution.equationContinuity — Method
equationContinuity(sm::StellarModel, k::Int,
varm1::Matrix{TT}, var00::Matrix{TT}, varp1::Matrix{TT},
eosm1::EOSResults{TT}, eos00::EOSResults{TT}, eosp1::EOSResults{TT},
rates::Matrix{TT},
κm1::TT, κ00::TT, κp1::TT)::TT where {TT<:Real}Default equation of mass continuity, evaluated for cell k of StellarModel sm.
Arguments
Identical to equationHSE for compatibility with StellarModels.TypeStableEquation
Returns
Residual of comparing dr^3/dm with 3/(4πρ)
Jems.Evolution.equationHSE — Method
equationHSE(sm::StellarModel, k::Int,
# varm1::Matrix{TT}, var00::Matrix{TT}, varp1::Matrix{TT},
# eosm1::EOSResults{TT}, eos00::EOSResults{TT}, eosp1::EOSResults{TT},
# rates::Matrix{TT},
# κm1::TT, κ00::TT, κp1::TT)::TT where {TT<:Real}Default equation of hydrostatic equilibrium. Evaluates for cell k of StellarModel sm to what degree hydrostatic equilibrium is satisfied.
Arguments
sm: Stellar Modelk: cell number to consider
- varm1: Matrix holding the dual numbers of the previous cell (k-1)
- var00: Matrix holding the dual numbers of this cell (k)
- varp1: Matrix holding the dual numbers of the next cell (k+1)
- eosm1: EOSResults object holding the results of the EOS evaluation of the previous cell (k-1)
- eos00: EOSResults object holding the results of the EOS evaluation of the current cell (k)
- eosp1: EOSResults object holding the results of the EOS evaluation of the next cell (k+1)
- κm1: Opacity evaluated at the previous cell (k-1)
- κ00: Opacity evaluated at the current cell (k)
- κp1: Opacity evaluated at the next cell (k+1)
Returns
Residual of comparing dlnP/dm with -GM/4πr^4, where the latter is evaluated at the face of cell k and k+1.
Jems.Evolution.equationLuminosity — Method
equationLuminosity(sm::StellarModel, k::Int,
varm1::Matrix{TT}, var00::Matrix{TT}, varp1::Matrix{TT},
eosm1::EOSResults{TT}, eos00::EOSResults{TT}, eosp1::EOSResults{TT},
rates::Matrix{TT},
κm1::TT, κ00::TT, κp1::TT)::TT where {TT<:Real}Default equation of energy generation, evaluated for cell k of StellarModel sm.
Arguments
Identical to equationHSE for compatibility with StellarModels.TypeStableEquation
Returns
Residual of comparing dL/dm with ϵnuc - cₚ * dT/dt - (δ / ρ) * dP/dt
Jems.Evolution.equationT — Method
equationT(sm::StellarModel, k::Int,
varm1::Matrix{TT}, var00::Matrix{TT}, varp1::Matrix{TT},
eosm1::EOSResults{TT}, eos00::EOSResults{TT}, eosp1::EOSResults{TT},
rates::Matrix{TT},
κm1::TT, κ00::TT, κp1::TT)::TT where {TT<:Real}Default equation of energy transport, evaluated for cell k of StellarModel sm.
Arguments
Identical to equationHSE for compatibility with StellarModels.TypeStableEquation
Returns
Residual of comparing dlnT/dm with -∇*GMT/4πr^4P, where the latter is evaluated at the face of cell k and k+1.
Jems.Evolution.equation_composition — Method
equation_composition(sm::StellarModel, k::Int, iso_name::Symbol,
varm1::Matrix{TT}, var00::Matrix{TT}, varp1::Matrix{TT},
eosm1::EOSResults{TT}, eos00::EOSResults{TT}, eosp1::EOSResults{TT},
rates::Matrix{TT},
κm1::TT, κ00::TT, κp1::TT)::TT where {TT<:Real}Default equation for composition evolution for isotope iso_name, evaluated for cell k of StellarModel sm.
Arguments
Identical to equationHSE for compatibility with StellarModels.TypeStableEquation
Returns
Residual of comparing dX_i/dt with its computed reaction rate
Evaluation.jl
Jems.Evolution.eval_cell_eqs! — Method
eval_cell_eqs(m::StellarModel, k::Int, ind_vars_view::Vector{<:TT}) where{TT<:Real}Evaluates the stellar structure equations of the model, m, at cell k, given the view of the independent variables, ind_vars_view.
Jems.Evolution.eval_jacobian_eqs! — Method
eval_jacobian_eqs!(m::StellarModel)Evaluates the whole Jacobian matrix and equations of the given StellarModel m.
Jems.Evolution.eval_jacobian_eqs_row! — Method
eval_jacobian_eqs_row!(m::AbstractModel, k::int)Evaluates row k of the Jacobian matrix of the given Model m.