SERiF 0.0.1a
3+1D Stellar Structure and Evolution
Loading...
Searching...
No Matches
serif::eos::helmholtz Namespace Reference

Classes

struct  HELMEOSInput
 Structure to hold the input parameters for the EOS calculation. More...
 
struct  HELMEOSOutput
 
struct  HELMTable
 Structure to hold the Helmholtz EOS table data. More...
 

Typedefs

template<typename T, std::size_t J, std::size_t I>
using array2D = std::array<std::array<T, J>, I>
 2D array template alias.
 

Functions

double ** heap_allocate_contiguous_2D_memory (const int rows, const int cols)
 
void heap_deallocate_contiguous_2D_memory (double **array)
 
double psi0 (double z)
 Interpolating polynomial function psi0.
 
double dpsi0 (double z)
 Derivative of the interpolating polynomial function psi0.
 
double ddpsi0 (double z)
 Second derivative of the interpolating polynomial function psi0.
 
double psi1 (double z)
 Interpolating polynomial function psi1.
 
double dpsi1 (double z)
 Derivative of the interpolating polynomial function psi1.
 
double ddpsi1 (double z)
 Second derivative of the interpolating polynomial function psi1.
 
double psi2 (double z)
 Interpolating polynomial function psi2.
 
double dpsi2 (double z)
 Derivative of the interpolating polynomial function psi2.
 
double ddpsi2 (double z)
 Second derivative of the interpolating polynomial function psi2.
 
double xpsi0 (double z)
 Interpolating polynomial function xpsi0.
 
double xdpsi0 (double z)
 Derivative of the interpolating polynomial function xpsi0.
 
double xpsi1 (double z)
 Interpolating polynomial function xpsi1.
 
double xdpsi1 (double z)
 Derivative of the interpolating polynomial function xpsi1.
 
double h3 (const std::array< double, 36 > &fi, const double w0t, const double w1t, const double w0mt, const double w1mt, const double w0d, const double w1d, const double w0md, const double w1md)
 Interpolating polynomial function h3.
 
double h5 (const std::array< double, 36 > &fi, const double w0t, const double w1t, const double w2t, const double w0mt, const double w1mt, const double w2mt, const double w0d, const double w1d, const double w2d, const double w0md, const double w1md, const double w2md)
 Interpolating polynomial function h5.
 
std::unique_ptr< HELMTableread_helm_table (const std::string &filename)
 Read the Helmholtz EOS table from a file.
 
serif::eos::helmholtz::HELMEOSOutput get_helm_EOS (HELMEOSInput &q, const HELMTable &table)
 Calculate the Helmholtz EOS components.
 

Variables

static constexpr int IMAX = 541
 
static constexpr int JMAX = 201
 
const double tlo = 3.0
 
const double thi = 13.0
 
const double dlo = -12.0
 
const double dhi = 15.0
 
const double tstp = (thi - tlo) / (JMAX - 1)
 
const double tstpi = 1 / tstp
 
const double dstp = (dhi - dlo) / (IMAX - 1)
 
const double dstpi = 1 / dstp
 

Typedef Documentation

◆ array2D

template<typename T, std::size_t J, std::size_t I>
using serif::eos::helmholtz::array2D = std::array<std::array<T, J>, I>

2D array template alias.

Template Parameters
TType of the array elements.
JNumber of columns.
INumber of rows.

Definition at line 47 of file helm.h.

Function Documentation

◆ ddpsi0()

double serif::eos::helmholtz::ddpsi0 ( double z)

Second derivative of the interpolating polynomial function psi0.

Parameters
zInput value.
Returns
Second derivative of the polynomial.

Definition at line 74 of file helm.cpp.

◆ ddpsi1()

double serif::eos::helmholtz::ddpsi1 ( double z)

Second derivative of the interpolating polynomial function psi1.

Parameters
zInput value.
Returns
Second derivative of the polynomial.

Definition at line 80 of file helm.cpp.

◆ ddpsi2()

double serif::eos::helmholtz::ddpsi2 ( double z)

Second derivative of the interpolating polynomial function psi2.

Parameters
zInput value.
Returns
Second derivative of the polynomial.

Definition at line 86 of file helm.cpp.

◆ dpsi0()

double serif::eos::helmholtz::dpsi0 ( double z)

Derivative of the interpolating polynomial function psi0.

Parameters
zInput value.
Returns
Derivative of the polynomial.

Definition at line 72 of file helm.cpp.

◆ dpsi1()

double serif::eos::helmholtz::dpsi1 ( double z)

Derivative of the interpolating polynomial function psi1.

Parameters
zInput value.
Returns
Derivative of the polynomial.

Definition at line 78 of file helm.cpp.

◆ dpsi2()

double serif::eos::helmholtz::dpsi2 ( double z)

Derivative of the interpolating polynomial function psi2.

Parameters
zInput value.
Returns
Derivative of the polynomial.

Definition at line 84 of file helm.cpp.

◆ get_helm_EOS()

HELMEOSOutput serif::eos::helmholtz::get_helm_EOS ( HELMEOSInput & q,
const HELMTable & table )

Calculate the Helmholtz EOS components.

Parameters
qEOSInput parameters for the EOS calculation.
tableHELMTable structure containing the table data.
Returns
EOS structure containing the calculated quantities.

Definition at line 243 of file helm.cpp.

◆ h3()

double serif::eos::helmholtz::h3 ( const std::array< double, 36 > & fi,
const double w0t,
const double w1t,
const double w0mt,
const double w1mt,
const double w0d,
const double w1d,
const double w0md,
const double w1md )

Interpolating polynomial function h3.

Parameters
fiArray of coefficients.
w0tWeight 0 for temperature.
w1tWeight 1 for temperature.
w0mtWeight 0 for temperature (minus).
w1mtWeight 1 for temperature (minus).
w0dWeight 0 for density.
w1dWeight 1 for density.
w0mdWeight 0 for density (minus).
w1mdWeight 1 for density (minus).
Returns
Result of the polynomial.

Definition at line 96 of file helm.cpp.

◆ h5()

double serif::eos::helmholtz::h5 ( const std::array< double, 36 > & fi,
const double w0t,
const double w1t,
const double w2t,
const double w0mt,
const double w1mt,
const double w2mt,
const double w0d,
const double w1d,
const double w2d,
const double w0md,
const double w1md,
const double w2md )

Interpolating polynomial function h5.

Parameters
fiArray of coefficients.
w0tWeight 0 for temperature.
w1tWeight 1 for temperature.
w2tWeight 2 for temperature.
w0mtWeight 0 for temperature (minus).
w1mtWeight 1 for temperature (minus).
w2mtWeight 2 for temperature (minus).
w0dWeight 0 for density.
w1dWeight 1 for density.
w2dWeight 2 for density.
w0mdWeight 0 for density (minus).
w1mdWeight 1 for density (minus).
w2mdWeight 2 for density (minus).
Returns
Result of the polynomial.

Definition at line 108 of file helm.cpp.

◆ heap_allocate_contiguous_2D_memory()

double ** serif::eos::helmholtz::heap_allocate_contiguous_2D_memory ( const int rows,
const int cols )

Definition at line 52 of file helm.cpp.

◆ heap_deallocate_contiguous_2D_memory()

void serif::eos::helmholtz::heap_deallocate_contiguous_2D_memory ( double ** array)

Definition at line 66 of file helm.cpp.

◆ psi0()

double serif::eos::helmholtz::psi0 ( double z)

Interpolating polynomial function psi0.

Parameters
zInput value.
Returns
Result of the polynomial.

Definition at line 70 of file helm.cpp.

◆ psi1()

double serif::eos::helmholtz::psi1 ( double z)

Interpolating polynomial function psi1.

Parameters
zInput value.
Returns
Result of the polynomial.

Definition at line 76 of file helm.cpp.

◆ psi2()

double serif::eos::helmholtz::psi2 ( double z)

Interpolating polynomial function psi2.

Parameters
zInput value.
Returns
Result of the polynomial.

Definition at line 82 of file helm.cpp.

◆ read_helm_table()

std::unique_ptr< HELMTable > serif::eos::helmholtz::read_helm_table ( const std::string & filename)

Read the Helmholtz EOS table from a file.

Parameters
filenamePath to the file containing the table.
Returns
HELMTable structure containing the table data.

Definition at line 132 of file helm.cpp.

◆ xdpsi0()

double serif::eos::helmholtz::xdpsi0 ( double z)

Derivative of the interpolating polynomial function xpsi0.

Parameters
zInput value.
Returns
Derivative of the polynomial.

Definition at line 90 of file helm.cpp.

◆ xdpsi1()

double serif::eos::helmholtz::xdpsi1 ( double z)

Derivative of the interpolating polynomial function xpsi1.

Parameters
zInput value.
Returns
Derivative of the polynomial.

Definition at line 94 of file helm.cpp.

◆ xpsi0()

double serif::eos::helmholtz::xpsi0 ( double z)

Interpolating polynomial function xpsi0.

Parameters
zInput value.
Returns
Result of the polynomial.

Definition at line 88 of file helm.cpp.

◆ xpsi1()

double serif::eos::helmholtz::xpsi1 ( double z)

Interpolating polynomial function xpsi1.

Parameters
zInput value.
Returns
Result of the polynomial.

Definition at line 92 of file helm.cpp.

Variable Documentation

◆ dhi

const double serif::eos::helmholtz::dhi = 15.0

Definition at line 54 of file helm.h.

◆ dlo

const double serif::eos::helmholtz::dlo = -12.0

Definition at line 54 of file helm.h.

◆ dstp

const double serif::eos::helmholtz::dstp = (dhi - dlo) / (IMAX - 1)

Definition at line 56 of file helm.h.

◆ dstpi

const double serif::eos::helmholtz::dstpi = 1 / dstp

Definition at line 56 of file helm.h.

◆ IMAX

int serif::eos::helmholtz::IMAX = 541
staticconstexpr

Definition at line 38 of file helm.h.

◆ JMAX

int serif::eos::helmholtz::JMAX = 201
staticconstexpr

Definition at line 39 of file helm.h.

◆ thi

const double serif::eos::helmholtz::thi = 13.0

Definition at line 53 of file helm.h.

◆ tlo

const double serif::eos::helmholtz::tlo = 3.0

Definition at line 53 of file helm.h.

◆ tstp

const double serif::eos::helmholtz::tstp = (thi - tlo) / (JMAX - 1)

Definition at line 55 of file helm.h.

◆ tstpi

const double serif::eos::helmholtz::tstpi = 1 / tstp

Definition at line 55 of file helm.h.