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

Main class for accessing Equation of State data. More...

#include <EOS.h>

Public Member Functions

 EOS (const std::string &filename, EOSFormat format=EOSFormat::HELM)
 Constructs an EOS object by loading data from a file.
 
 EOS (const EOSio &reader)
 Constructs an EOS object from an existing EOSio reader.
 
 ~EOS ()=default
 Default destructor.
 
EOSOutput get (const EOSInput &in)
 Retrieves thermodynamic properties for the given input conditions.
 
EOSFormat getFormat () const
 Gets the format of the loaded EOS data.
 
const EOSiogetReader () const
 Gets a constant reference to the internal EOSio reader.
 

Private Attributes

EOSio m_reader
 The EOS I/O handler responsible for reading and storing EOS table data.
 

Detailed Description

Main class for accessing Equation of State data.

This class provides an interface to an underlying EOS table (e.g., Helmholtz EOS). It handles loading the EOS data and provides a method to retrieve thermodynamic properties for given physical conditions.

Examples
/Users/tboudreaux/Programming/SERiF/src/eos/public/EOS.h.

Definition at line 216 of file EOS.h.

Constructor & Destructor Documentation

◆ EOS() [1/2]

EOS::EOS ( const std::string & filename,
EOSFormat format = EOSFormat::HELM )
explicit

Constructs an EOS object by loading data from a file.

Parameters
filenameThe path to the EOS data file.
formatThe format of the EOS data file (e.g., EOSFormat::HELM).
Exceptions
std::runtime_errorIf the file cannot be opened or read, or if the format is unsupported.
Examples
/Users/tboudreaux/Programming/SERiF/src/eos/public/EOS.h.

Definition at line 8 of file EOS.cpp.

◆ EOS() [2/2]

EOS::EOS ( const EOSio & reader)
explicit

Constructs an EOS object from an existing EOSio reader.

Parameters
readerAn EOSio object that has already loaded the EOS data.

Definition at line 7 of file EOS.cpp.

◆ ~EOS()

serif::eos::EOS::~EOS ( )
default

Member Function Documentation

◆ get()

EOSOutput EOS::get ( const EOSInput & in)
nodiscard

Retrieves thermodynamic properties for the given input conditions.

Parameters
inAn EOSInput struct containing the density, temperature, and composition.
Returns
An EOSOutput struct containing the calculated thermodynamic properties.
Exceptions
std::runtime_errorIf the underlying EOS calculation fails (e.g., out of table bounds for Helmholtz).

This method queries the loaded EOS table (e.g., Helmholtz) using the provided density, temperature, and composition (mean atomic mass Abar, mean atomic number Zbar). It populates and returns an EOSOutput struct with various thermodynamic quantities such as pressure, energy, entropy, their derivatives, electron fraction, etc.

Examples
/Users/tboudreaux/Programming/SERiF/src/eos/public/EOS.h.

Definition at line 10 of file EOS.cpp.

◆ getFormat()

EOSFormat EOS::getFormat ( ) const
nodiscard

Gets the format of the loaded EOS data.

Returns
The EOSFormat enum value.
Examples
/Users/tboudreaux/Programming/SERiF/src/eos/public/EOS.h.

Definition at line 57 of file EOS.cpp.

◆ getReader()

const EOSio & EOS::getReader ( ) const
nodiscard

Gets a constant reference to the internal EOSio reader.

Returns
A const reference to the EOSio object.
Examples
/Users/tboudreaux/Programming/SERiF/src/eos/public/EOS.h.

Definition at line 61 of file EOS.cpp.

Member Data Documentation

◆ m_reader

EOSio serif::eos::EOS::m_reader
private

The EOS I/O handler responsible for reading and storing EOS table data.

Examples
/Users/tboudreaux/Programming/SERiF/src/eos/public/EOS.h.

Definition at line 258 of file EOS.h.


The documentation for this class was generated from the following files: