PLUTO  4.4-patch2
Data Structures | Functions
radiation.h File Reference

Header file for the radiation module. More...

Go to the source code of this file.

Data Structures

struct  Rad_data
 

Functions

int GaussianSolve (double **, double *, double *, int)
 
double Blackbody (double)
 
double GetTemperature (double, double)
 
void RadSourceFunction (double *, double *)
 
void AddRadSource1 (Data_Arr, Data_Arr, RBox *, double)
 
void AddRadSource2 (Data_Arr, Data_Arr, Data_Arr, RBox *, double, double)
 
void RadFPMatrices (Rad_data *, double *, double **)
 
Riemann_Solver * Rad_SetSolver (const char *)
 

Detailed Description

Set labels, indexes and basic prototyping for the radiation module.

Authors
J. D. Melon Fuksman (fuksm.nosp@m.an@m.nosp@m.pia.d.nosp@m.e)
Date
Dec 02, 2020

Function Documentation

◆ AddRadSource1()

void AddRadSource1 ( Data_Arr  consv,
Data_Arr  source,
RBox box,
double  dt 
)

Update the conserved fields using a single source function (used for IMEX schemes). Conserved fields are updated as U = U + dt*source .

Parameters
[in,out]consvCell-centered conserved fields.
[in]sourceCell-centered source terms.
[in,out]RBoxPointer to RBox structure.
[in]dtTime step.

◆ AddRadSource2()

void AddRadSource2 ( Data_Arr  consv,
Data_Arr  source1,
Data_Arr  source2,
RBox box,
double  dt1,
double  dt2 
)

Update the conserved fields using two different source functions (used for IMEX schemes). Conserved fields are updated as U = U + dt1*source1 + dt2*source2.

Parameters
[in,out]consvCell-centered conserved fields.
[in]source1Cell-centered source terms.
[in]source2Cell-centered source terms.
[in,out]RBoxPointer to RBox structure.
[in]dt1First time step (used with source1).
[in]dt2Second time step (used with source2).

◆ Blackbody()

double Blackbody ( double  temperature)

Return the blackbody intensity corresponding to the input temperature.

Parameters
[in]temperatureInput temperature.
Returns
Return (4*PI)B(T)=radiationConst*T^4.

◆ GaussianSolve()

int GaussianSolve ( double **  C,
double *  b,
double *  x,
int  N 
)

Solve the system of linear equations given by C.x=b, using gaussian elimination with scaled partial pivoting (see e.g. Burden R. L. and Faires J. D., Numerical Analysis).

Parameters
[in]Cmatrix of coefficients.
[in]bvector of constant terms.
[in]Ndimension of the system.
[out]xvector of solutions.
Returns
Returns 1 if the system is solved, and 0 if no unique solution exists.

◆ GetTemperature()

double GetTemperature ( double  rho,
double  prs 
)

Return the (ideal) gas temperature corresponding to given gas pressure and density.

Parameters
[in]rhoInput mass density.
[in]prsInput (gas) pressure.
Returns
Return T = g_idealGasConst*prs/rho, where g_idealGasConst is the equilibrium ratio prs/(T*rho) for the considered ideal gas.

◆ Rad_SetSolver()

Riemann_Solver* Rad_SetSolver ( const char *  solver)

Depending on the choice of the Riemann solver specified in pluto.ini, return a pointer to the corresponding Riemann solver function

◆ RadFPMatrices()

void RadFPMatrices ( Rad_data rad_data,
double *  b,
double **  C 
)

Compute the components of the matrix C and the column vector in eq. (52) of Takahashi et al. 2013, ApJ 772(2):127. Used if RADIATION_IMPL == RADIATION_FIXEDPOINT_RAD.

Parameters
[in]rad_datapointer to rad_data structure
[out]bcolumn vector
[out]Cmatrix C

◆ RadSourceFunction()

void RadSourceFunction ( double *  primvar,
double *  G 
)

Compute the Eulerian frame components of the source function G^, that accounts for the interaction between radiation and matter.

Parameters
[in]primvarvector of primitive fields
[out]Gvector that stores the value of G^