Header file for the radiation module.
More...
Go to the source code of this file.
|
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 *) |
|
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
◆ 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] | consv | Cell-centered conserved fields. |
[in] | source | Cell-centered source terms. |
[in,out] | RBox | Pointer to RBox structure. |
[in] | dt | Time 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] | consv | Cell-centered conserved fields. |
[in] | source1 | Cell-centered source terms. |
[in] | source2 | Cell-centered source terms. |
[in,out] | RBox | Pointer to RBox structure. |
[in] | dt1 | First time step (used with source1). |
[in] | dt2 | Second time step (used with source2). |
◆ Blackbody()
double Blackbody |
( |
double |
temperature | ) |
|
Return the blackbody intensity corresponding to the input temperature.
- Parameters
-
[in] | temperature | Input 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] | C | matrix of coefficients. |
[in] | b | vector of constant terms. |
[in] | N | dimension of the system. |
[out] | x | vector 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] | rho | Input mass density. |
[in] | prs | Input (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_data | pointer to rad_data structure |
[out] | b | column vector |
[out] | C | matrix 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] | primvar | vector of primitive fields |
[out] | G | vector that stores the value of G^ |