PLUTO  4.0
 All Data Structures Files Functions Variables Enumerations Macros Pages
Functions
cooling_source.c File Reference

Integrate cooling and reaction source terms. More...

#include "pluto.h"

Functions

void CoolingSource (const Data *d, double dt, Time_Step *Dts, Grid *GXYZ)
 
void Numerical_Jacobian (double *v, double **J)
 

Detailed Description

Solve the system of ordinary differential equations describing optically thin cooling and ionization network (if any). We use an adaptive step size integration method and follow the strategy outlined in section 5.1 of Tesileanu et al. (2008) for handling stiff cells.

On output, a time-step estimate for the next time level is computed using the relative or absolute variation obtained during the integration of the ODE (from t(n) –> t(n+1))

\[ \Delta t_c = \min_{ijk}\left[\frac{\Delta t^n M_R}{\epsilon}\right] \,\quad\rm{where}\quad \epsilon = \max\left(\left|\frac{p^{n+1}}{p^n} - 1\right|,\, |X^{n+1}-X^n|\right) \]

where $ M_R $ is the maximum cooling rate (defined by the global variable g_maxCoolingRate) and X are the chemical species.

References

Authors
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
O. Tesileanu
Date
Oct, 29 2012

Function Documentation

void CoolingSource ( const Data d,
double  dt,
Time_Step Dts,
Grid GXYZ 
)

Integrate cooling and reaction source terms.

Parameters
[in,out]dpointer to Data structure
[in]dtthe time step to be taken
[out]Dtspointer to the Time_Step structure
[in]GXYZpointer to an array of Grid structures

< Zone is covered by a finer level (AMR only).

< Atomic mass unit.

< Boltzmann constant.

< Atomic mass unit.

< Boltzmann constant.

< Atomic mass unit.

< Boltzmann constant.

void Numerical_Jacobian ( double *  v,
double **  J 
)

Compute Jacobian matrix numerically and get eigenvector and eigenvalue decomposition

The purpose of this function is to detect stiffness.

Note: This function is EXTREMELY time consuming.