Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
pressure_total.cpp File Reference
#include "cddefines.h"
#include "taulines.h"
#include "opacity.h"
#include "hydrogenic.h"
#include "conv.h"
#include "iso.h"
#include "wind.h"
#include "magnetic.h"
#include "phycon.h"
#include "thermal.h"
#include "h2.h"
#include "dense.h"
#include "dynamics.h"
#include "trace.h"
#include "rt.h"
#include "pressure.h"
#include "radius.h"
#include "rfield.h"
#include "doppvel.h"
#include "rt_escprob.h"
Include dependency graph for pressure_total.cpp:

Functions

void PresTotCurrent ()
 Evaluates the current total pressure and related physical quantities in the simulation zone.

Function Documentation

◆ PresTotCurrent()

void PresTotCurrent ( void )

Evaluates the current total pressure and related physical quantities in the simulation zone.

This function computes the total pressure at the current zone, including contributions from gas, ram, turbulent, magnetic, and radiation (line and continuum) pressures. It also updates related quantities such as radiative acceleration, enthalpy density, and tracks the dominant contributors to the radiation pressure. The function manages evaluation frequency based on simulation state and flags, and ensures physical consistency of the results.

The function is central to the equation of state calculations in the simulation and is called once per zone.

Todo
2 this is the total binding energy of the molecules, and is negative, the energy need to get back to free atoms never set and only appears in print statements
Todo
0 add this press term due to cosmic rays - hextra.cr_energydensity
Todo
0 code has variable magnetic energydensity and pressure, which are equal, as they must be - del one or the other

References ASSERT, broken(), cdEXIT, chLineLbl(), conv, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, dense, diatoms, DoppVel, DynaFlux(), dynamics, EXIT_FAILURE, fixit, fnzone, fprintf(), GetDopplerWidth(), t_ADfA::getEthresh(), Heavy, HFLines, hydro, Singleton< t_ADfA >::Inst(), ioQQQ, ipH1s, ipH2p, ipH_LIKE, ipHE_LIKE, ipHYDROGEN, iso_ctrl, iso_sp, iteration, lgElemsConserved(), LIMELM, magnetic, Magnetic_evaluate(), MAX2, MIN2, NISO, nSpecies, nWindLine, nzone, opac, phycon, POW2, pressure, PressureRadiationLine(), radius, rfield, RT_line_driving(), RT_LineWidth(), SDIV(), ShowMe(), SMALLFLOAT, SumDensities(), TauLine2, TempChange(), TorF(), trace, and wind.

Referenced by ConvBase(), ConvInitSolution(), ConvPresTempEdenIoniz(), ConvTempEdenIoniz(), CoolHeatError(), IterStart(), map_do(), and PressureChange().

Here is the call graph for this function: