Functions | |
| template<typename T , typename Functor > | |
| std::pair< T, T > | NewtonSolve (const T &x, const T &y, const Real z_initial_guess, const Real tolerance, const Functor &y_from_x_z, const std::string &caller_name, const unsigned int max_its=100, const bool verbose=false) |
| NewtonSolve does a 1D Newton Solve to solve the equation y = f(x, z) for variable z. More... | |
| template<typename T , typename Functor1 , typename Functor2 > | |
| void | NewtonSolve2D (const T &f, const T &g, const Real x0, const Real y0, T &x_final, T &y_final, const Real f_tol, const Real g_tol, const Functor1 &f_from_x_y, const Functor2 &g_from_x_y, const std::string &caller_name="", const unsigned int max_its=100, bool debug=false) |
| NewtonSolve2D does a 2D Newton Solve to solve for the x and y such that: f = f_from_x_y(x, y) and g = g_from_x_y(x, y). More... | |
| std::pair<T, T> FluidPropertiesUtils::NewtonSolve | ( | const T & | x, |
| const T & | y, | ||
| const Real | z_initial_guess, | ||
| const Real | tolerance, | ||
| const Functor & | y_from_x_z, | ||
| const std::string & | caller_name, | ||
| const unsigned int | max_its = 100, |
||
| const bool | verbose = false |
||
| ) |
NewtonSolve does a 1D Newton Solve to solve the equation y = f(x, z) for variable z.
| [in] | x | constant first argument of the f(x, z) term |
| [in] | y | constant which should be equal to f(x, z) with a converged z |
| [in] | z_initial_guess | initial guess for return variables |
| [in] | tolerance | criterion for relative or absolute (if y is sufficiently close to zero) convergence checking |
| [in] | y_from_x_z | two-variable function returning both values and derivatives as references |
| [in] | caller_name | name of the fluid properties appended to name of the routine calling the method |
| [in] | max_its | the maximum number of iterations for Newton's method |
| [in] | verbose | whether to output Newton iteration data |
Definition at line 44 of file NewtonInversion.h.
Referenced by TabulatedFluidProperties::e_from_p_rho(), TabulatedFluidProperties::e_from_p_T(), TabulatedFluidProperties::e_from_v_h(), TemperaturePressureFunctionFluidProperties::p_from_v_e(), Water97FluidProperties::p_from_v_e_template(), Water97FluidProperties::T_drhodT_from_p_rho(), HelmholtzFluidProperties::T_from_p_h(), TemperaturePressureFunctionFluidProperties::T_from_p_h(), SimpleFluidProperties::T_from_p_h(), TabulatedFluidProperties::T_from_p_h(), NaKFluidProperties::T_from_p_rho(), TemperaturePressureFunctionFluidProperties::T_from_p_rho(), TabulatedFluidProperties::T_from_p_rho(), TabulatedFluidProperties::T_from_p_s(), and TEST().
| void FluidPropertiesUtils::NewtonSolve2D | ( | const T & | f, |
| const T & | g, | ||
| const Real | x0, | ||
| const Real | y0, | ||
| T & | x_final, | ||
| T & | y_final, | ||
| const Real | f_tol, | ||
| const Real | g_tol, | ||
| const Functor1 & | f_from_x_y, | ||
| const Functor2 & | g_from_x_y, | ||
| const std::string & | caller_name = "", |
||
| const unsigned int | max_its = 100, |
||
| bool | debug = false |
||
| ) |
NewtonSolve2D does a 2D Newton Solve to solve for the x and y such that: f = f_from_x_y(x, y) and g = g_from_x_y(x, y).
This is done for example in the constant of (v, e) to (p, T) variable set conversion.
| [in] | f | target value for f_from_x_y |
| [in] | g | target value for g_from_x_y |
| [in] | x0 | initial guess for first output variable |
| [in] | y0 | initial guess for second output variable |
| [out] | x_final | output for first variable |
| [out] | y_final | output for second variable |
| [in] | f_tol | criterion for relative or absolute (if f is sufficently close to zero) convergence checking |
| [in] | g_tol | criterion for relative or absolute (if g is sufficently close to zero) convergence checking |
| [in] | f_from_x_y | two-variable function returning both values and derivatives as references |
| [in] | g_from_x_y | two-variable function returning both values and derivatives as references |
| [in] | caller_name | routine calling this solve |
| [in] | max_its | the maximum number of iterations for Newton's method |
| [in] | debug | whether to output the solution, residual and Jacobian on every iteration |
Definition at line 144 of file NewtonInversion.h.
Referenced by SinglePhaseFluidProperties::p_T_from_h_s(), SinglePhaseFluidProperties::p_T_from_v_e(), SinglePhaseFluidProperties::p_T_from_v_h(), TEST(), and TabulatedFluidProperties::v_from_p_T().
1.8.14