26 std::vector<double>
c;
29 virtual double term(
double tau, std::size_t itau) = 0;
45 double term(
double tau, std::size_t itau);
58 double term(
double tau, std::size_t itau);
71 double term(
double tau, std::size_t itau);
80 std::vector<double>
Tc,
87 std::vector<std::vector<double>>
k;
89 std::vector<shared_ptr<AbstractCubicAlphaFunction>>
alpha;
101 std::vector<double> C1 = std::vector<double>(), std::vector<double> C2 = std::vector<double>(),
102 std::vector<double> C3 = std::vector<double>());
105 void set_alpha(
const std::vector<double>& C1,
const std::vector<double>& C2,
const std::vector<double>& C3);
124 const std::vector<std::vector<double>>&
get_kmat() {
128 void set_kmat(
const std::vector<std::vector<double>>&
k) {
132 void set_kij(std::size_t i, std::size_t j,
double val) {
137 double get_kij(std::size_t i, std::size_t j) {
167 for (std::size_t i = 0; i <
alpha.size(); ++i) {
185 void set_C_MC(std::size_t i,
double c1,
double c2,
double c3) {
189 void set_C_Twu(std::size_t i,
double L,
double M,
double N) {
194 virtual double a0_ii(std::size_t i) = 0;
197 virtual double b0_ii(std::size_t i) = 0;
199 virtual double m_ii(std::size_t i) = 0;
202 virtual double alphar(
double tau,
double delta,
const std::vector<double>& x, std::size_t itau, std::size_t idelta);
204 virtual double d_alphar_dxi(
double tau,
double delta,
const std::vector<double>& x, std::size_t itau, std::size_t idelta, std::size_t i,
205 bool xN_independent);
207 virtual double d2_alphar_dxidxj(
double tau,
double delta,
const std::vector<double>& x, std::size_t itau, std::size_t idelta, std::size_t i,
208 std::size_t j,
bool xN_independent);
210 virtual double d3_alphar_dxidxjdxk(
double tau,
double delta,
const std::vector<double>& x, std::size_t itau, std::size_t idelta, std::size_t i,
211 std::size_t j, std::size_t
k,
bool xN_independent);
219 virtual double am_term(
double tau,
const std::vector<double>& x, std::size_t itau);
228 virtual double d_am_term_dxi(
double tau,
const std::vector<double>& x, std::size_t itau, std::size_t i,
bool xN_independent);
238 virtual double d2_am_term_dxidxj(
double tau,
const std::vector<double>& x, std::size_t itau, std::size_t i, std::size_t j,
bool xN_independent);
249 virtual double d3_am_term_dxidxjdxk(
double tau,
const std::vector<double>& x, std::size_t itau, std::size_t i, std::size_t j, std::size_t
k,
250 bool xN_independent);
256 virtual double bm_term(
const std::vector<double>& x);
262 virtual double d_bm_term_dxi(
const std::vector<double>& x, std::size_t i,
bool xN_independent);
269 virtual double d2_bm_term_dxidxj(
const std::vector<double>& x, std::size_t i, std::size_t j,
bool xN_independent);
277 virtual double d3_bm_term_dxidxjdxk(
const std::vector<double>& x, std::size_t i, std::size_t j, std::size_t
k,
bool xN_independent);
292 virtual void set_Q_k(
const size_t sgi,
const double value) {
296 virtual double get_Q_k(
const size_t sgi)
const {
307 double aij_term(
double tau, std::size_t i, std::size_t j, std::size_t itau);
314 double u_term(
double tau, std::size_t i, std::size_t j, std::size_t itau);
320 double aii_term(
double tau, std::size_t i, std::size_t itau);
329 double psi_minus(
double delta,
const std::vector<double>& x, std::size_t itau, std::size_t idelta);
339 double d_psi_minus_dxi(
double delta,
const std::vector<double>& x, std::size_t itau, std::size_t idelta, std::size_t i,
bool xN_independent);
350 double d2_psi_minus_dxidxj(
double delta,
const std::vector<double>& x, std::size_t itau, std::size_t idelta, std::size_t i, std::size_t j,
351 bool xN_independent);
363 double d3_psi_minus_dxidxjdxk(
double delta,
const std::vector<double>& x, std::size_t itau, std::size_t idelta, std::size_t i, std::size_t j,
364 std::size_t
k,
bool xN_independent);
374 double PI_12(
double delta,
const std::vector<double>& x, std::size_t idelta);
383 double d_PI_12_dxi(
double delta,
const std::vector<double>& x, std::size_t idelta, std::size_t i,
bool xN_independent);
393 double d2_PI_12_dxidxj(
double delta,
const std::vector<double>& x, std::size_t idelta, std::size_t i, std::size_t j,
bool xN_independent);
404 double d3_PI_12_dxidxjdxk(
double delta,
const std::vector<double>& x, std::size_t idelta, std::size_t i, std::size_t j, std::size_t
k,
405 bool xN_independent);
413 double tau_times_a(
double tau,
const std::vector<double>& x, std::size_t itau);
422 double d_tau_times_a_dxi(
double tau,
const std::vector<double>& x, std::size_t itau, std::size_t i,
bool xN_independent);
432 double d2_tau_times_a_dxidxj(
double tau,
const std::vector<double>& x, std::size_t itau, std::size_t i, std::size_t j,
bool xN_independent);
443 double d3_tau_times_a_dxidxjdxk(
double tau,
const std::vector<double>& x, std::size_t itau, std::size_t i, std::size_t j, std::size_t
k,
444 bool xN_independent);
454 double psi_plus(
double delta,
const std::vector<double>& x, std::size_t idelta);
463 double d_psi_plus_dxi(
double delta,
const std::vector<double>& x, std::size_t idelta, std::size_t i,
bool xN_independent);
473 double d2_psi_plus_dxidxj(
double delta,
const std::vector<double>& x, std::size_t idelta, std::size_t i, std::size_t j,
bool xN_independent);
484 double d3_psi_plus_dxidxjdxk(
double delta,
const std::vector<double>& x, std::size_t idelta, std::size_t i, std::size_t j, std::size_t
k,
485 bool xN_independent);
495 double c_term(
const std::vector<double>& x) {
504 double d_c_term_dxi(
const std::vector<double>& x, std::size_t i,
bool xN_independent) {
514 double d2_c_term_dxidxj(
const std::vector<double>& x, std::size_t i, std::size_t j,
bool xN_independent) {
527 double d3_c_term_dxidxjdxk(
const std::vector<double>& x, std::size_t i, std::size_t j, std::size_t
k,
bool xN_independent) {
529 return 1 / pow(bm, 4)
548 double A_term(
double delta,
const std::vector<double>& x) {
560 double d_A_term_dxi(
double delta,
const std::vector<double>& x, std::size_t i,
bool xN_independent) {
561 std::size_t idelta = 0;
572 double d2_A_term_dxidxj(
double delta,
const std::vector<double>& x, std::size_t i, std::size_t j,
bool xN_independent) {
573 std::size_t idelta = 0;
574 double PI12 =
PI_12(delta, x, idelta);
588 double d3_A_term_dxidxjdxk(
double delta,
const std::vector<double>& x, std::size_t i, std::size_t j, std::size_t
k,
bool xN_independent) {
589 std::size_t idelta = 0;
590 double PI12 =
PI_12(delta, x, idelta);
603 virtual void set_interaction_parameter(
const std::size_t mgi1,
const std::size_t mgi2,
const std::string& parameter,
const double value) {
616 std::vector<double> C1 = std::vector<double>(), std::vector<double> C2 = std::vector<double>(),
617 std::vector<double> C3 = std::vector<double>())
623 :
AbstractCubic(std::vector<double>(1,
Tc), std::vector<double>(1,
pc), std::vector<double>(1,
acentric),
R_u, 1 + sqrt(2.0), 1 - sqrt(2.0)) {
624 set_alpha(std::vector<double>(), std::vector<double>(), std::vector<double>());
627 double a0_ii(std::size_t i);
628 double b0_ii(std::size_t i);
629 double m_ii(std::size_t i);
635 SRK(std::vector<double>
Tc, std::vector<double>
pc, std::vector<double>
acentric,
double R_u, std::vector<double> C1 = std::vector<double>(),
636 std::vector<double> C2 = std::vector<double>(), std::vector<double> C3 = std::vector<double>())
642 set_alpha(std::vector<double>(), std::vector<double>(), std::vector<double>());
645 double a0_ii(std::size_t i);
646 double b0_ii(std::size_t i);
647 double m_ii(std::size_t i);