18 std::vector<Real>
x = {0.7};
20 const Real
v = 1.38490747936373;
21 const Real
rho = 0.7220698962933115;
22 const Real e = 1.995566878921797e+06;
23 const Real s = 3129.64317643634;
24 const Real
c = 442.127817187648;
25 const Real cp = 1187.64406714542;
26 const Real cv = 841.417197304492;
27 const Real
mu = 1.863687329029527e-05;
28 const Real k = 0.0304142253602899;
30 REL_TEST(_fp_mix->p_from_v_e(
v, e,
x),
p, REL_TOL_SAVED_VALUE);
31 REL_TEST(_fp_mix->T_from_v_e(
v, e,
x),
T, REL_TOL_SAVED_VALUE);
32 REL_TEST(_fp_mix->v_from_p_T(
p,
T,
x),
v, REL_TOL_SAVED_VALUE);
33 REL_TEST(_fp_mix->rho_from_p_T(
p,
T,
x),
rho, REL_TOL_SAVED_VALUE);
34 REL_TEST(_fp_mix->e_from_p_T(
p,
T,
x), e, REL_TOL_SAVED_VALUE);
35 REL_TEST(_fp_mix->e_from_p_rho(
p,
rho,
x), e, REL_TOL_SAVED_VALUE);
36 REL_TEST(_fp_mix->s_from_p_T(
p,
T,
x), s, REL_TOL_SAVED_VALUE);
37 REL_TEST(_fp_mix->c_from_p_T(
p,
T,
x),
c, REL_TOL_SAVED_VALUE);
38 REL_TEST(_fp_mix->cp_from_p_T(
p,
T,
x), cp, REL_TOL_SAVED_VALUE);
39 REL_TEST(_fp_mix->cv_from_p_T(
p,
T,
x), cv, REL_TOL_SAVED_VALUE);
40 REL_TEST(_fp_mix->mu_from_p_T(
p,
T,
x),
mu, REL_TOL_SAVED_VALUE);
41 REL_TEST(_fp_mix->k_from_p_T(
p,
T,
x), k, REL_TOL_SAVED_VALUE);
47 const Real rel_pert = REL_PERTURBATION;
48 const Real fpert1 = 1 + rel_pert;
49 const Real fpert2 = 1 - rel_pert;
51 (_fp_mix->v_from_p_T(
p * fpert1,
T,
x) - _fp_mix->v_from_p_T(
p * fpert2,
T,
x)) /
54 (_fp_mix->v_from_p_T(
p,
T * fpert1,
x) - _fp_mix->v_from_p_T(
p,
T * fpert2,
x)) /
57 (_fp_mix->s_from_p_T(
p * fpert1,
T,
x) - _fp_mix->s_from_p_T(
p * fpert2,
T,
x)) /
60 (_fp_mix->s_from_p_T(
p,
T * fpert1,
x) - _fp_mix->s_from_p_T(
p,
T * fpert2,
x)) /
62 const Real dpdv_s = 1.0 / (dvdp_T - dvdT_p * dsdp_T / dsdT_p);
63 const Real c_gold =
v * std::sqrt(-dpdv_s);
64 REL_TEST(_fp_mix->c_from_p_T(
p,
T,
x), c_gold, REL_TOL_DERIVATIVE);
66 const Real x_steam = 0.3;
67 const Real x_nitrogen = 0.7;
69 const Real M_steam = 0.01801488;
70 const Real M_nitrogen = 0.028012734746133888;
71 const Real
M = 1.0 / (x_steam / M_steam + x_nitrogen / M_nitrogen);
74 REL_TEST(
v, v_gold, REL_TOL_SAVED_VALUE);