8 namespace cppinterface{
11 return -3.0*(this->
get_Ar01(T, rho, molefracs) - this->
get_Ar11(T, rho, molefracs) )/this->
get_Ar20(T,rho,molefracs);
32 std::tuple<VLLE::VLLE_return_code,EArrayd,EArrayd,EArrayd>
AbstractModel::mix_VLLE_T(
const double T,
const REArrayd& rhovecVinit,
const REArrayd& rhovecL1init,
const REArrayd& rhovecL2init,
const double atol,
const double reltol,
const double axtol,
const double relxtol,
const int maxiter)
const{
34 return VLLE::mix_VLLE_T(*
this, T, rhovecVinit, rhovecL1init, rhovecL2init, atol, reltol, axtol, relxtol, maxiter);
48 std::tuple<VLE_return_code,EArrayd,EArrayd>
AbstractModel::mix_VLE_Tx(
const double T,
const REArrayd& rhovecL0,
const REArrayd& rhovecV0,
const REArrayd& xspec,
const double atol,
const double reltol,
const double axtol,
const double relxtol,
const int maxiter)
const{
49 return teqp::mix_VLE_Tx(*
this, T, rhovecL0, rhovecV0, xspec, atol, reltol, axtol, relxtol, maxiter);
77 return crit::trace_critical_arclength_binary(*
this, T0, rhovec0, filename , options);
81 return crit::get_drhovec_dT_crit(*
this, T, rhovec);
85 return crit::get_dp_dT_crit(*
this, T, rhovec);
89 return crit::get_criticality_conditions(*
this, T, rhovec);
93 return crit::eigen_problem(*
this, T, rhovec, alignment_v0.value_or(Eigen::ArrayXd()));
97 return crit::get_minimum_eigenvalue_Psi_Hessian(*
this, T, rhovec);
virtual double get_Ar01(const double T, const double rho, const REArrayd &molefrac) const =0
std::vector< nlohmann::json > find_VLLE_T_binary(const std::vector< nlohmann::json > &traces, const std::optional< VLLE::VLLEFinderOptions > options=std::nullopt) const
std::tuple< VLLE::VLLE_return_code, EArrayd, EArrayd, EArrayd > mix_VLLE_T(const double T, const REArrayd &rhovecVinit, const REArrayd &rhovecL1init, const REArrayd &rhovecL2init, const double atol, const double reltol, const double axtol, const double relxtol, const int maxiter) const
virtual double get_Ar20(const double T, const double rho, const REArrayd &molefrac) const =0
double dpsatdT_pure(const double T, const double rhoL, const double rhoV) const
virtual std::tuple< VLE_return_code, double, EArrayd, EArrayd > mixture_VLE_px(const double p_spec, const REArrayd &xmolar_spec, const double T0, const REArrayd &rhovecL0, const REArrayd &rhovecV0, const std::optional< MixVLEpxFlags > &flags=std::nullopt) const
virtual nlohmann::json trace_VLE_isobar_binary(const double p, const double T0, const EArrayd &rhovecL0, const EArrayd &rhovecV0, const std::optional< PVLEOptions > &=std::nullopt) const
virtual double get_dpsat_dTsat_isopleth(const double T, const REArrayd &rhovecL, const REArrayd &rhovecV) const
double get_neff(const double, const double, const EArrayd &) const
nlohmann::json trace_VLLE_binary(const double T, const REArrayd &rhovecV, const REArrayd &rhovecL1, const REArrayd &rhovecL2, const std::optional< VLLE::VLLETracerOptions > options) const
virtual EArrayd get_drhovec_dT_crit(const double T, const REArrayd &rhovec) const
virtual double get_minimum_eigenvalue_Psi_Hessian(const double T, const REArrayd &rhovec) const
virtual EArray2 get_criticality_conditions(const double T, const REArrayd &rhovec) const
EArray2 extrapolate_from_critical(const double Tc, const double rhoc, const double Tgiven, const std::optional< Eigen::ArrayXd > &molefracs=std::nullopt) const
virtual MixVLEReturn mix_VLE_Tp(const double T, const double pgiven, const REArrayd &rhovecL0, const REArrayd &rhovecV0, const std::optional< MixVLETpFlags > &flags=std::nullopt) const
virtual nlohmann::json trace_VLE_isotherm_binary(const double T0, const EArrayd &rhovec0, const EArrayd &rhovecV0, const std::optional< TVLEOptions > &=std::nullopt) const
virtual std::tuple< VLE_return_code, EArrayd, EArrayd > mix_VLE_Tx(const double T, const REArrayd &rhovecL0, const REArrayd &rhovecV0, const REArrayd &xspec, const double atol, const double reltol, const double axtol, const double relxtol, const int maxiter) const
virtual EigenData eigen_problem(const double T, const REArrayd &rhovec, const std::optional< REArrayd > &=std::nullopt) const
EArray2 pure_VLE_T(const double T, const double rhoL, const double rhoV, int maxiter, const std::optional< Eigen::ArrayXd > &molefracs=std::nullopt) const
std::tuple< double, double > solve_pure_critical(const double T, const double rho, const std::optional< nlohmann::json > &=std::nullopt) const
virtual double get_dp_dT_crit(const double T, const REArrayd &rhovec) const
virtual double get_Ar11(const double T, const double rho, const REArrayd &molefrac) const =0
virtual std::tuple< EArrayd, EArrayd > get_drhovecdp_Tsat(const double T, const REArrayd &rhovecL, const REArrayd &rhovecV) const
std::tuple< EArrayd, EMatrixd > get_pure_critical_conditions_Jacobian(const double T, const double rho, const std::optional< std::size_t > &alternative_pure_index, const std::optional< std::size_t > &alternative_length) const
std::vector< nlohmann::json > find_VLLE_p_binary(const std::vector< nlohmann::json > &traces, const std::optional< VLLE::VLLEFinderOptions > options=std::nullopt) const
virtual nlohmann::json trace_critical_arclength_binary(const double T0, const EArrayd &rhovec0, const std::optional< std::string > &=std::nullopt, const std::optional< TCABOptions > &=std::nullopt) const
virtual std::tuple< EArrayd, EArrayd > get_drhovecdT_psat(const double T, const REArrayd &rhovecL, const REArrayd &rhovecV) const
auto find_VLLE_p_binary(const AbstractModel &model, const std::vector< nlohmann::json > &traces, const std::optional< VLLEFinderOptions > &options=std::nullopt)
Given an isobaric VLE trace(s) for a binary mixture, obtain the VLLE solution.
auto find_VLLE_T_binary(const AbstractModel &model, const std::vector< nlohmann::json > &traces, const std::optional< VLLEFinderOptions > &options=std::nullopt)
Given an isothermal VLE trace(s) for a binary mixture, obtain the VLLE solution.
auto trace_VLLE_binary(const teqp::VLLE::AbstractModel &model, const double Tinit, const EArrayd &rhovecVinit, const EArrayd &rhovecL1init, const EArrayd &rhovecL2init, const std::optional< VLLETracerOptions > &options_=std::nullopt)
Given an initial VLLE solution, trace the VLLE curve. We know the VLLE curve is a function of only on...
auto mix_VLLE_T(const AbstractModel &model, double T, const EArrayd &rhovecVinit, const EArrayd &rhovecL1init, const EArrayd &rhovecL2init, double atol, double reltol, double axtol, double relxtol, int maxiter)
auto get_dpsat_dTsat_isopleth(const Model &model, const double &T, const Eigen::ArrayXd &rhovecL, const Eigen::ArrayXd &rhovecV)
Derivative of pressure w.r.t. temperature along the isopleth of a phase envelope (at constant composi...
auto trace_VLE_isotherm_binary(const AbstractModel &model, double T, const Eigen::ArrayXd &rhovecL0, const Eigen::ArrayXd &rhovecV0, const std::optional< TVLEOptions > &options=std::nullopt)
auto mix_VLE_Tx(const AbstractModel &model, double T, const Eigen::ArrayXd &rhovecL0, const Eigen::ArrayXd &rhovecV0, const Eigen::ArrayXd &xspec, double atol, double reltol, double axtol, double relxtol, int maxiter)
auto solve_pure_critical(const Model &model, const Scalar T0, const Scalar rho0, const std::optional< nlohmann::json > &flags=std::nullopt)
Eigen::Array< double, 2, 1 > extrapolate_from_critical(const Model &model, const Scalar &Tc, const Scalar &rhoc, const Scalar &T, const std::optional< Eigen::ArrayXd > &z=std::nullopt)
auto dpsatdT_pure(const teqp::cppinterface::AbstractModel &model, double T, double rhoL, double rhoV, const std::optional< Eigen::ArrayXd > &molefracs=std::nullopt)
auto get_pure_critical_conditions_Jacobian(const AbstractModel &model, const double T, const double rho, const std::optional< std::size_t > &alternative_pure_index=std::nullopt, const std::optional< std::size_t > &alternative_length=std::nullopt)
auto pure_VLE_T(const teqp::cppinterface::AbstractModel &model, double T, double rhoL, double rhoV, int maxiter, const std::optional< Eigen::ArrayXd > &molefracs=std::nullopt)
auto mixture_VLE_px(const AbstractModel &model, double p_spec, const Eigen::ArrayXd &xmolar_spec, double T0, const Eigen::ArrayXd &rhovecL0, const Eigen::ArrayXd &rhovecV0, const std::optional< MixVLEpxFlags > &flags_=std::nullopt)
auto mix_VLE_Tp(const AbstractModel &model, double T, double pgiven, const Eigen::ArrayXd &rhovecL0, const Eigen::ArrayXd &rhovecV0, const std::optional< MixVLETpFlags > &flags_=std::nullopt)
auto get_drhovecdp_Tsat(const AbstractModel &model, const double &T, const Eigen::ArrayXd &rhovecL, const Eigen::ArrayXd &rhovecV)
auto trace_VLE_isobar_binary(const Model &model, double p, double T0, const Eigen::ArrayXd &rhovecL0, const Eigen::ArrayXd &rhovecV0, const std::optional< PVLEOptions > &options=std::nullopt)
auto get_drhovecdT_psat(const AbstractModel &model, const double &T, const Eigen::ArrayXd &rhovecL, const Eigen::ArrayXd &rhovecV)
Eigen::Ref< const EArrayd > REArrayd
Eigen::Array< double, 2, 1 > EArray2
Eigen::ArrayX< double > EArrayd