teqp 0.19.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
teqp::iteration::NRIterator Class Reference

#include <iteration.hpp>

Public Member Functions

 NRIterator (const AbstractModel *ar, const AbstractModel *aig, const std::vector< char > &vars, const Eigen::Ref< const Eigen::ArrayXd > &vals, double T, double rho, const Eigen::Ref< const Eigen::ArrayXd > &z)
 
std::vector< char > get_vars () const
 Return the variables that are being used in the iteration.
 
Eigen::ArrayXd get_vals () const
 Return the target values to be obtained.
 
auto get_T () const
 Return the current temperature.
 
auto get_rho () const
 Return the current molar density.
 
Eigen::ArrayXd get_molefrac () const
 Return the current mole fractions.
 
auto calc_step (double T, double rho)
 
auto take_step ()
 Take one step, return the residuals.
 
auto take_steps (int N)
 

Detailed Description

A class for doing Newton-Raphson steps to solve for two unknown thermodynamic variables

Definition at line 14 of file iteration.hpp.

Constructor & Destructor Documentation

◆ NRIterator()

teqp::iteration::NRIterator::NRIterator ( const AbstractModel * ar,
const AbstractModel * aig,
const std::vector< char > & vars,
const Eigen::Ref< const Eigen::ArrayXd > & vals,
double T,
double rho,
const Eigen::Ref< const Eigen::ArrayXd > & z )
inline

Definition at line 23 of file iteration.hpp.

Member Function Documentation

◆ calc_step()

auto teqp::iteration::NRIterator::calc_step ( double T,
double rho )
inline

Do the calculations needed for the step and return the step and the other data In C++, the copy will be elided (the return value will be moved)

Parameters
TTemperature
rhoMolar density

Definition at line 41 of file iteration.hpp.

◆ get_molefrac()

Eigen::ArrayXd teqp::iteration::NRIterator::get_molefrac ( ) const
inline

Return the current mole fractions.

Definition at line 34 of file iteration.hpp.

◆ get_rho()

auto teqp::iteration::NRIterator::get_rho ( ) const
inline

Return the current molar density.

Definition at line 32 of file iteration.hpp.

◆ get_T()

auto teqp::iteration::NRIterator::get_T ( ) const
inline

Return the current temperature.

Definition at line 30 of file iteration.hpp.

◆ get_vals()

Eigen::ArrayXd teqp::iteration::NRIterator::get_vals ( ) const
inline

Return the target values to be obtained.

Definition at line 28 of file iteration.hpp.

◆ get_vars()

std::vector< char > teqp::iteration::NRIterator::get_vars ( ) const
inline

Return the variables that are being used in the iteration.

Definition at line 26 of file iteration.hpp.

◆ take_step()

auto teqp::iteration::NRIterator::take_step ( )
inline

Take one step, return the residuals.

Definition at line 50 of file iteration.hpp.

◆ take_steps()

auto teqp::iteration::NRIterator::take_steps ( int N)
inline

Take a given number of steps

Parameters
NThe number of steps to take

Definition at line 60 of file iteration.hpp.


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