Home > Legacy archive > Specific versions > FARGO-AD > Energy equation solver
The numerical integration is done in function
. This is done in
superscript the gas quantities at a given time
:
(a) calculation of the sound speed with function
. This is necesary to calculate the timestep
.
(b) calculation of the pressure with function
. This is necesary to solve Navier-Stokes equation.
(c)
and
are updated with the source terms of the Navier-Stokes equation. This yields
and
.
(d)
,
and
are updated with some artificial viscosity. This yields
,
and
.
(e)
is updated with the source term of the energy equation. This is done by a predictor-corrector scheme [[Stone, J. M., & Norman, M. L. 1992, ApJS, 80, 753]]:
. Then:
.
{{2 - Advective transport}}
The advective transport step is described in Stone & Norman (1992). We plot in the following figure the result of the 1D Sod test.
AlgoGas
, in SourceEuler.c. All functions or routines mentioned in this section are part of SourceEuler.c, unless otherwise stated.
{{Source terms}}
First, FARGO solves 
substep3
. We briefly describe how this new substep is incorporated in AlgoGas
. We denote with a 

ComputeSoundSpeed
: 

ComputePressureField
: 
substep1
: the radial and azimuthal velocities 



substep2
: 





substep3
: 

