PLUTO  4.4-patch2
Functions
cooling_source.c File Reference

Integrate cooling and reaction source terms. More...

#include "pluto.h"

Functions

void CoolingSource (const Data *d, double dt, timeStep *Dts, Grid *grid)
 
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@t.nosp@m.o.inf.nosp@m.n.it)
O. Tesileanu B. Vaidya
Date
April 09, 2019

Function Documentation

◆ CoolingSource()

void CoolingSource ( const Data d,
double  dt,
timeStep Dts,
Grid grid 
)

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]gridpointer to an array of Grid structures

◆ Numerical_Jacobian()

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.