The hydrodynamics equations are expressed as conservation relations
plus source terms for

(2) |

The 3D hydrodynamics equations,
including source terms due to gravity, are
the *mass conservation equation*

and the

The pressure is computed from density and internal energy via a (tabulated)

(6) |

(7) |

(8) |

Here, is the mass of the star to be modeled; and are free smoothing parameters.

In addition, there are equations for the non-local radiation transport.
If grey opacity tables are used, the opacities are a simple function
of e.g. temperature and pressure

The change in optical depth along a path with length is than

The variation of the intensity with optical depth along a ray with orientation can be described by the simple differential equation

The radiative energy flux is given by

The energy change can than be computed from the flux divergence with