From 10c7ba2ac10f7ff32bce1cb3e5dc41a8acbc29ab Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Mon, 20 Apr 2026 15:00:56 -0400 Subject: [PATCH] feat(cubics): add Chebyshev superancillaries for SRK and Peng-Robinson EOS (#2744) * feat(cubics): add Chebyshev superancillaries for SRK and Peng-Robinson EOS (#2739) Port piecewise Chebyshev superancillary expansions from teqp for SRK and PR cubic EOS, providing fast and accurate saturation properties without iterative flash. Adds `calc_saturation_ancillary`, `update_QT_pure_superanc`, and `calc_superanc_Tmax` on `AbstractCubicBackend`; vdW data omitted as CoolProp does not expose a vdW backend. Co-Authored-By: Claude Sonnet 4.6 * refactor(cubics): address review feedback on cubic superancillary - Fix stale comment on calc_superanc_Tmax (no Newton steps; closed-form) - Move SRK_CODE/PR_CODE/P_CODE/RHOL_CODE/RHOV_CODE constants before supercubic() so switch cases use named constants instead of magic ints - Add T > Tmax guard in calc_saturation_ancillary and update_QT_pure_superanc to throw CoolProp ValueError instead of propagating std::invalid_argument - Add is_pure_or_pseudopure guard in calc_superanc_Tmax - Near-Tc test now derives pc from the superancillary itself rather than AS->p_critical() (which reflects the real fluid, not the cubic model) Co-Authored-By: Claude Sonnet 4.6 * docs(cubics): document SRK/PR superancillary APIs with timing and citation Add a Superancillaries for SRK and PR subsection to the Cubic EoS docs covering update_QT_pure_superanc and saturation_ancillary, their constraints (pure-only, PR/SRK-only, T-input, T <= Tc, not used by PropsSI), a %timeit comparison against the full cubic flash, and a citation to Bell and Deiters, IECR 2021 (added to the bib library). Co-Authored-By: Claude Opus 4.7 (1M context) --------- Co-authored-by: Claude Sonnet 4.6 --- CoolPropBibTeXLibrary.bib | 11 + Web/coolprop/Cubics.rst | 29 + include/superancillary/cubicsuperancillary.h | 2607 ++++++++++++++++++ src/Backends/Cubics/CubicBackend.cpp | 93 + src/Backends/Cubics/CubicBackend.h | 21 + src/Tests/CoolProp-Tests.cpp | 275 +- 6 files changed, 2838 insertions(+), 198 deletions(-) create mode 100644 include/superancillary/cubicsuperancillary.h diff --git a/CoolPropBibTeXLibrary.bib b/CoolPropBibTeXLibrary.bib index 5c66524e..b31b8dd6 100644 --- a/CoolPropBibTeXLibrary.bib +++ b/CoolPropBibTeXLibrary.bib @@ -412,6 +412,17 @@ Eprint = {http://pubs.acs.org/doi/pdf/10.1021/ie4033999} } +@Article{Bell-IECR-2021, + Title = {{Superancillary Equations for Cubic Equations of State}}, + Author = {Bell, Ian H. and Deiters, Ulrich K.}, + Journal = {Ind. Eng. Chem. Res.}, + Year = {2021}, + Number = {27}, + Pages = {9983-9991}, + Volume = {60}, + Doi = {10.1021/acs.iecr.1c00847} +} + @Conference{Bender-1970, Title = {{Equations of state exactly representing the phase behavior of pure substances}}, Author = {E. Bender}, diff --git a/Web/coolprop/Cubics.rst b/Web/coolprop/Cubics.rst index 671c9875..de4c60be 100644 --- a/Web/coolprop/Cubics.rst +++ b/Web/coolprop/Cubics.rst @@ -107,6 +107,35 @@ And here, we run the PT flash As you can see, the speed difference is quite significant +Superancillaries for SRK and PR +------------------------------- + +For an additional speedup on saturation calculations, piecewise Chebyshev *superancillary* expansions (Bell and Deiters :cite:`Bell-IECR-2021`, ported from teqp) are available for pure fluids with the SRK and PR backends. They return :math:`p^{\mathrm{sat}}(T)`, :math:`\rho'(T)`, and :math:`\rho''(T)` directly from closed-form polynomials — no iterative flash — at an accuracy better than 10\ :sup:`-3` relative to the cubic EOS result over the full saturation dome up to :math:`T_c`. + +Two entry points are provided on the :cpapi:`AbstractState ` (low-level interface only): + +* :cpapi:`update_QT_pure_superanc(Q, T) ` — populates the full two-phase state (same fields as ``update(QT_INPUTS, Q, T)``) using the superancillary instead of a full VLE flash. +* :cpapi:`saturation_ancillary(param, Q, iT, T) ` — returns a single saturation property (``iP`` or ``iDmolar``) without updating state. + +.. warning:: Superancillaries are only available for **pure** fluids with the **SRK** and **PR** backends, and only with **T** as the independent variable (``T`` must satisfy :math:`T \le T_c`). They are *not* used transparently by ``PropsSI`` — you must use the low-level interface explicitly. + +.. ipython:: + + In [0]: import CoolProp.CoolProp as CP + + In [0]: AS = CP.AbstractState("PR", "Propane") + + # Full VLE flash through the cubic EOS + In [0]: %timeit AS.update(CP.QT_INPUTS, 1, 300) + + # Same state populated from the superancillary + In [0]: %timeit AS.update_QT_pure_superanc(1, 300) + + # Single saturation property (no state update) + In [0]: %timeit AS.saturation_ancillary(CP.iP, 0, CP.iT, 300) + +On a typical modern laptop this corresponds to roughly a 5--6x speedup for ``update_QT_pure_superanc`` relative to the full cubic flash, and roughly 9--10x for ``saturation_ancillary`` on a single property; exact numbers are hardware-dependent. + Mixtures ======== diff --git a/include/superancillary/cubicsuperancillary.h b/include/superancillary/cubicsuperancillary.h new file mode 100644 index 00000000..f1cd9626 --- /dev/null +++ b/include/superancillary/cubicsuperancillary.h @@ -0,0 +1,2607 @@ +#pragma once +#include +#include +#include + +namespace CoolProp { +namespace CubicSuperAncillary { + +struct Chebyshev{ +public: + const std::vector coeff; + const double xmin, xmax; + // Evaluate the expansion with Clenshaw's method + double y(double x) const{ + // Scale to (-1, 1) + double xscaled = (2*x - (xmax + xmin)) / (xmax - xmin); + int Norder = static_cast(coeff.size()) - 1; + double u_k = 0, u_kp1 = coeff[Norder], u_kp2 = 0; + for (int k = Norder-1; k > 0; k--){ // k must be signed! + // Do the recurrent calculation + u_k = 2.0*xscaled*u_kp1 - u_kp2 + coeff[k]; + // Update the values + u_kp2 = u_kp1; u_kp1 = u_k; + } + return coeff[0] + xscaled*u_kp1 - u_kp2; + }; +}; + +// https://proquest.safaribooksonline.com/9780321637413 +// https://web.stanford.edu/class/archive/cs/cs107/cs107.1202/lab1/ +static int midpoint_Knuth(int x, int y) { + return (x & y) + ((x ^ y) >> 1); +}; + +struct SuperAncillary{ +public: + + const std::vector exps; + + int get_index(double x) const{ + int iL = 0, iR = static_cast(exps.size()) - 1, iM; + while (iR - iL > 1) { + iM = midpoint_Knuth(iL, iR); + if (x >= exps[iM].xmin) { + iL = iM; + } + else { + iR = iM; + } + } + return (x < exps[iL].xmax) ? iL : iR; + }; + + /// Evaluate the SuperAncillary + double y(double x) const{ + // First check whether the input is possible + if (x < exps[0].xmin) { + throw std::invalid_argument("Ttilde (" + std::to_string(x) + ") is below the minimum of " + std::to_string(exps[0].xmin)); + } + if (x > exps.back().xmax) { + throw std::invalid_argument("Ttilde (" + std::to_string(x) + ") is above the maximum of " + std::to_string(exps.back().xmax)); + } + // Bisection to find the expansion + // we need + auto i = get_index(x); + // Evaluate the expansion + return exps[i].y(x); + } +}; +const auto SRK_p = SuperAncillary{ +{ + { + { + 2.9225473692726744e-13, + 4.846211782171669e-13, + 2.824570002653489e-13, + 1.1955110559200177e-13, + 3.771710795961595e-14, + 9.009392578047045e-15, + 1.6354246747926244e-15, + 2.2297564454973646e-16, + 2.1977303354380907e-17, + 1.4079420760456038e-18, + 3.645901247485968e-20, + -2.3224668904548756e-21, + -2.1119277731077838e-22, + 1.3269831236005753e-24, + 7.111685153229056e-25, + 2.0749322108366765e-27, + -2.355803670950289e-27, + 1.89511506527704e-29, + -1.203321029253145e-29 + }, + 0.020267685653535945, + 0.02596797224359293 + }, + { + { + 4.42411833611544e-11, + 6.486786260066829e-11, + 2.8834316573742172e-11, + 8.49036232570771e-12, + 1.7382606171711586e-12, + 2.519225194793423e-13, + 2.5510836572731127e-14, + 1.688802065855514e-15, + 5.658115744876586e-17, + -7.526264008617426e-19, + -1.3472892665001768e-19, + -9.922698129701787e-22, + 2.6795301476514526e-22, + 2.2940832430296035e-24, + -5.789860391087721e-25, + 1.1649897848303902e-26, + 2.589988124021626e-26, + 5.472801416061292e-26, + 2.268132874691453e-26 + }, + 0.02596797224359293, + 0.03166825883364991 + }, + { + { + 1.3403609277725988e-08, + 2.0613817317201788e-08, + 9.908855672700315e-09, + 3.1242347660239074e-09, + 6.566525761190694e-10, + 8.934527720041564e-11, + 6.864947922093292e-12, + 1.0961157691701013e-13, + -2.552558822185046e-14, + -1.0755067059569204e-15, + 1.1595758568473605e-16, + 4.364935105515505e-18, + -6.518267188981206e-19, + -2.420947626615306e-21, + 3.3222352209999887e-21, + -1.4160136552428753e-22, + -1.0359144702519558e-23, + 3.0017608947725106e-24, + -1.1502980393315541e-24 + }, + 0.03166825883364991, + 0.04306883201376388 + }, + { + { + 3.6266120105336493e-06, + 5.40530078063072e-06, + 2.3535707621866956e-06, + 6.09797026711632e-07, + 8.755959081374292e-08, + 4.4744907993962915e-09, + -4.067655714209484e-10, + -3.591728379118743e-11, + 4.465366516258063e-12, + 1.6493814952480902e-13, + -5.3226243319885286e-14, + 1.7922687946152793e-15, + 4.005718486965302e-16, + -4.988684915276682e-17, + 4.789814152406683e-19, + 4.147268524381617e-19, + -4.591183271914325e-20, + 4.350970022028926e-22, + -1.0629270871306406e-21 + }, + 0.04306883201376388, + 0.06586997837399182 + }, + { + { + 0.0003094297409003984, + 0.0004117661948641284, + 0.0001333784156235523, + 1.953127675250332e-05, + 4.4650824621707415e-07, + -1.245752753612688e-07, + 6.1713045177982556e-09, + 8.457787641085228e-10, + -2.019178315130611e-10, + 1.671511339141844e-11, + 7.461694230598466e-13, + -4.260132318823111e-13, + 6.171897036311516e-14, + -3.212145765269425e-15, + -5.836180885150665e-16, + 1.719715110942645e-16, + -2.147440279526465e-17, + 8.273394312306379e-19, + 2.34734005507848e-19 + }, + 0.06586997837399182, + 0.1114722710944477 + }, + { + { + 0.0074771598568592074, + 0.008244590094104293, + 0.0017465545422224592, + 9.786738241774412e-05, + -6.516977077872878e-06, + 3.2958650511163794e-07, + 1.5363696321735632e-08, + -7.20353161771562e-09, + 1.2861343701874766e-09, + -1.6587511786082245e-10, + 1.5108394000934097e-11, + -3.6747905743763146e-13, + -2.33340277167645e-13, + 7.039936125372015e-14, + -1.3651690997269761e-14, + 2.071300487897776e-15, + -2.45029690981724e-16, + 2.15485181781494e-17, + 1.4026865606531214e-18 + }, + 0.1114722710944477, + 0.20267685653535944 + } +} +}; +const auto SRK_rhoL = SuperAncillary{ +{ + { + { + 0.9087646203247287, + -0.050607640245558645, + -0.0008181930140446145, + -3.676466126572436e-05, + -1.8153449552124612e-06, + -4.2148973304623194e-08, + 8.967883102783958e-09, + 5.813281384048352e-10, + -3.659740635542086e-10, + -4.441783746367278e-11, + 1.5951594212193498e-11, + 1.7195689316906737e-12, + -9.141229440068344e-13, + -1.4432899320127035e-14, + 5.0730253331465747e-14, + -6.987466161234579e-15, + -1.8318679906315083e-15, + 1.5126788710517758e-15, + -1.734723475976807e-17 + }, + 0.020267685653535945, + 0.06586997837399182 + }, + { + { + 0.7992363370107459, + -0.059445681918569984, + -0.0014502328603496623, + -7.138164945971748e-05, + -3.2189087307149533e-06, + -2.486464586864967e-07, + -2.4319133658246006e-08, + -1.044768556390796e-09, + -1.3343107174712543e-10, + -1.679712618996021e-11, + 2.2661039711380226e-13, + -1.6726897644758765e-13, + -1.0783041126671833e-14, + 1.4363510381087963e-15, + -4.0245584642661925e-16, + -7.28583859910259e-16, + -4.85722573273506e-17, + 7.632783294297951e-16, + 1.734723475976807e-17 + }, + 0.06586997837399182, + 0.1114722710944477 + }, + { + { + 0.6649628598972782, + -0.0760521559973085, + -0.002952854145734922, + -0.0002237665443423284, + -2.2837440018151633e-05, + -2.7674939431024392e-06, + -3.5249351108129767e-07, + -4.743986068561634e-08, + -6.602545343792343e-09, + -9.417646246179245e-10, + -1.37257025190074e-10, + -2.031076695718781e-11, + -3.0466879019641624e-12, + -4.624911564832246e-13, + -7.074202335033419e-14, + -1.1532441668293814e-14, + -1.7277845820728999e-15, + 3.885780586188048e-16, + -2.42861286636753e-17 + }, + 0.1114722710944477, + 0.15707456381490356 + }, + { + { + 0.5358548459176075, + -0.051616853474821534, + -0.0019014483430589563, + -0.0001522452155350712, + -1.6138121186740073e-05, + -1.9310179919518333e-06, + -2.4780931559553743e-07, + -3.3348723178783235e-08, + -4.64304821673478e-09, + -6.632207977252946e-10, + -9.664995193059411e-11, + -1.4312308282971031e-11, + -2.1472545963518996e-12, + -3.260794412263124e-13, + -4.987676938128516e-14, + -8.229528170033973e-15, + -1.2004286453759505e-15, + 3.469446951953614e-16, + -2.0816681711721685e-17 + }, + 0.15707456381490356, + 0.1798757101751315 + }, + { + { + 0.4485732937583308, + -0.03477837295500611, + -0.00128197185101675, + -0.00010638749439246392, + -1.1344133512683485e-05, + -1.3588779068512968e-06, + -1.7457610832632975e-07, + -2.350823218033593e-08, + -3.2744967258524493e-09, + -4.678942372438044e-10, + -6.820332146273422e-11, + -1.0101888076041732e-11, + -1.5157701482859665e-12, + -2.302880108828731e-13, + -3.522182545623309e-14, + -5.863365348801608e-15, + -8.500145032286355e-16, + 3.0878077872387166e-16, + -1.9081958235744878e-17 + }, + 0.1798757101751315, + 0.19127628335524546 + }, + { + { + 0.3896887959074917, + -0.02352363480040463, + -0.0008864377996999455, + -7.48085471366268e-05, + -7.994798847377887e-06, + -9.585173595394458e-07, + -1.2320694868853121e-07, + -1.6596597669088498e-08, + -2.312318735792074e-09, + -3.3046667832770105e-10, + -4.817745855034694e-11, + -7.136409518881948e-12, + -1.0708690878491467e-12, + -1.627031842588167e-13, + -2.490022077417109e-14, + -4.173744683200198e-15, + -5.93275428784068e-16, + 3.0184188481996443e-16, + -1.214306433183765e-17 + }, + 0.19127628335524546, + 0.19697656994530244 + }, + { + { + 0.3497350745917645, + -0.016032294782450524, + -0.0006202549276113981, + -5.274770800074019e-05, + -5.643402364315098e-06, + -6.769284142359167e-07, + -8.70356488269497e-08, + -1.17262048994482e-08, + -1.6339517863728226e-09, + -2.3353845593487854e-10, + -3.404898932246603e-11, + -5.04390973432578e-12, + -7.568771998034407e-13, + -1.1509196373715724e-13, + -1.7600504387260685e-14, + -3.084338340286763e-15, + -4.440892098500626e-16, + 2.8449465006019636e-16, + -3.469446951953614e-18 + }, + 0.19697656994530244, + 0.19982671324033094 + }, + { + { + 0.3224124351709759, + -0.011013634884520482, + -0.00043639529901024973, + -3.724427437728703e-05, + -3.986980578418037e-06, + -4.783591501592022e-07, + -6.151332742135307e-08, + -8.288353604141152e-09, + -1.1549863634940927e-09, + -1.6508804739912009e-10, + -2.4069971710227733e-11, + -3.5656928798477594e-12, + -5.350303533546708e-13, + -8.137934770502397e-14, + -1.2437967322753707e-14, + -2.203098814490545e-15, + -3.157196726277789e-16, + 2.5673907444456745e-16, + 0.0 + }, + 0.19982671324033094, + 0.20125178488784518 + }, + { + { + 0.30358578390142943, + -0.0076188736955520135, + -0.0003078315487315582, + -2.6316343990171603e-05, + -2.8179719795684566e-06, + -3.381439433146338e-07, + -4.348579207141823e-08, + -5.8595724626575585e-09, + -8.165597746578879e-10, + -1.1671785066225127e-10, + -1.701778301610446e-11, + -2.5209348497590156e-12, + -3.7829808730016623e-13, + -5.745404152435185e-14, + -8.739536871971154e-15, + -1.5508427875232655e-15, + -1.9081958235744878e-16, + 2.671474153004283e-16, + -3.642919299551295e-17 + }, + 0.20125178488784518, + 0.2019643207116023 + }, + { + { + 0.29052982685479933, + -0.005300319842511697, + -0.00021741216965811758, + -1.8601576619783206e-05, + -1.99216392636134e-06, + -2.390659452899957e-07, + -3.0745310054813846e-08, + -4.142926245120915e-09, + -5.773458308655499e-10, + -8.252584726697876e-11, + -1.2032597140887447e-11, + -1.7825428633155838e-12, + -2.674006849279209e-13, + -4.087702398791748e-14, + -6.238065619612598e-15, + -1.2177758801357186e-15, + -1.457167719820518e-16, + 3.5735303605122226e-16, + 1.214306433183765e-17 + }, + 0.2019643207116023, + 0.20232058862348087 + }, + { + { + 0.281429493928621, + -0.00370348431999927, + -0.00015364397898540855, + -1.3150855018025098e-05, + -1.408515659318682e-06, + -1.6903172642135367e-07, + -2.1738876799376472e-08, + -2.929343496937964e-09, + -4.0822773633708564e-10, + -5.835245481256024e-11, + -8.508027615761193e-12, + -1.2602800747441023e-12, + -1.8902587828328876e-13, + -2.898029038966854e-14, + -4.3923198411732756e-15, + -6.83481049534862e-16, + -7.28583859910259e-17, + 6.210310043996969e-16, + 3.642919299551295e-17 + }, + 0.20232058862348087, + 0.20249872257942014 + }, + { + { + 0.27506157036291856, + -0.0025962448144549836, + -0.00010861133767400138, + -9.298192002037131e-06, + -9.959154303774975e-07, + -1.1951873122098555e-07, + -1.5371233163044562e-08, + -2.0713067025446286e-09, + -2.886544493013732e-10, + -4.1260670227694085e-11, + -6.015958564642432e-12, + -8.912228594004645e-13, + -1.3355809513893036e-13, + -1.9872992140790302e-14, + -3.0531133177191805e-15, + -7.181755190543981e-16, + -8.500145032286355e-17, + 2.96637714392034e-16, + 2.6020852139652106e-18 + }, + 0.20249872257942014, + 0.2025877895573898 + }, + { + { + 0.2705926697847878, + -0.0018244565862979688, + -7.678880274703502e-05, + -6.574507803324206e-06, + -7.04198907909917e-07, + -8.451082581135971e-08, + -1.0868935571006766e-08, + -1.4646166258958093e-09, + -2.0410736989440181e-10, + -2.9175961993588295e-11, + -4.253862886938187e-12, + -6.296716620335374e-13, + -9.435334458185451e-14, + -1.411544492402328e-14, + -2.1076890233118206e-15, + 1.1622647289044608e-16, + -1.3877787807814457e-17, + 2.0816681711721685e-16, + -6.071532165918825e-18 + }, + 0.2025877895573898, + 0.20263232304637463 + }, + { + { + 0.26744977424244143, + -0.0012843645575066134, + -5.4294008668638594e-05, + -4.6487705078930575e-06, + -4.979368752669466e-07, + -5.97575837875397e-08, + -7.685439108034986e-09, + -1.035633939716618e-09, + -1.4432471884262554e-10, + -2.0630074037963908e-11, + -3.0077728502275747e-12, + -4.461934294264225e-13, + -6.715808464896611e-14, + -1.0720591081536668e-14, + -1.4190038033490282e-15, + -4.440892098500626e-16, + 1.8735013540549517e-16, + 8.378714388967978e-16, + -1.214306433183765e-16 + }, + 0.20263232304637463, + 0.20265458979086703 + }, + { + { + 0.2652360092057196, + -0.0009053089022688643, + -3.839029629034568e-05, + -3.2871387625962867e-06, + -3.5209208477243736e-07, + -4.2254784272249823e-08, + -5.434404972901041e-09, + -7.32300850167511e-10, + -1.0205274299235345e-10, + -1.458767828754759e-11, + -2.126882003850028e-12, + -3.151055805172831e-13, + -4.713764101271778e-14, + -7.455841499748317e-15, + -1.1188966420050406e-15, + -4.2500725161431774e-16, + -1.9081958235744878e-17, + 4.0072112295064244e-16, + 1.734723475976807e-17 + }, + 0.20265458979086703, + 0.20266572316311324 + }, + { + { + 0.2636749575957985, + -0.0006387083278175353, + -2.7145557162256556e-05, + -2.324344536088624e-06, + -2.4896583217942636e-07, + -2.9878569729469007e-08, + -3.8426970945526495e-09, + -5.178131846916845e-10, + -7.21618736987395e-11, + -1.0313611076284701e-11, + -1.5037519840443991e-12, + -2.2252685805135286e-13, + -3.314015728506092e-14, + -3.944761184371259e-15, + -7.4593109467002705e-16, + -1.061650767297806e-15, + -7.28583859910259e-17, + 3.1051550219984847e-16, + -8.673617379884035e-19 + }, + 0.20266572316311324, + 0.20267128984923632 + }, + { + { + 0.26257329202514273, + -0.0004509124480249222, + -1.9194637512940163e-05, + -1.6435549859191573e-06, + -1.7604512139550443e-07, + -2.11273140666296e-08, + -2.7171948059623308e-09, + -3.6615067228185083e-10, + -5.1026160727274394e-11, + -7.291847681223373e-12, + -1.0631721197862376e-12, + -1.570323732158485e-13, + -2.3507237822961713e-14, + -4.498137973207861e-15, + -5.672545766444159e-16, + 3.8163916471489756e-16, + -1.1622647289044608e-16, + -1.5334955527634975e-15, + -1.6046192152785466e-16 + }, + 0.20267128984923632, + 0.20267407319229788 + }, + { + { + 0.261795381349911, + -0.00031848138784485065, + -1.3572598294689722e-05, + -1.1621671743376055e-06, + -1.2448259038670695e-07, + -1.493926039992932e-08, + -1.921346123867629e-09, + -2.5890705378228684e-10, + -3.6080990625797504e-11, + -5.1575497345135446e-12, + -7.518204808709683e-13, + -1.1052617154838629e-13, + -1.6753959330984003e-14, + -5.920611223508843e-15, + -8.795048023202412e-16, + -2.8033131371785203e-15, + -1.5265566588595902e-16, + 1.177877240188252e-15, + 8.153200337090993e-17 + }, + 0.20267407319229788, + 0.20267546486382865 + }, + { + { + 0.2612458584790565, + -0.00022501920934304802, + -9.597255076118291e-06, + -8.217756914414426e-07, + -8.802244447041196e-08, + -1.0563647579939217e-08, + -1.358598145442813e-09, + -1.83071792100864e-10, + -2.551181141341452e-11, + -3.646784263455771e-12, + -5.306519113013053e-13, + -7.894206122127656e-14, + -1.3612375115990005e-14, + -1.3461454173580023e-15, + 7.650130529057719e-16, + -1.474514954580286e-16, + 6.262351748276274e-16, + -3.9517000782751666e-15, + -1.343543332144037e-15 + }, + 0.20267546486382865, + 0.20267616069959404 + }, + { + { + 0.26061394134803445, + -0.0004632477727018712, + -9.327071115945024e-05, + -4.048564047778869e-05, + -2.2898027861414927e-05, + -1.4911944355367607e-05, + -1.0620804294449865e-05, + -8.055933548379093e-06, + -6.4069163156280085e-06, + -5.290117203090791e-06, + -4.504867114365346e-06, + -3.938072224525177e-06, + -3.5222599736994126e-06, + -3.2154018167716847e-06, + -2.990505978434088e-06, + -2.8299483429503752e-06, + -2.7222590090695414e-06, + -2.660262590837778e-06, + -1.3200081928170515e-06 + }, + 0.20267616069959404, + 0.20267685653535944 + } +} +}; +const auto SRK_rhoV = SuperAncillary{ +{ + { + { + 1.147791769634607e-11, + 1.8883400952870644e-11, + 1.0781377594967363e-11, + 4.424169417038083e-12, + 1.340057930622405e-12, + 3.0392837657011474e-13, + 5.1611350145284516e-14, + 6.429591419258869e-15, + 5.526656713208219e-16, + 2.6838869757647005e-17, + -7.144055741834159e-20, + -9.585729650435423e-20, + -3.2421103573493004e-21, + 2.5635377164771786e-22, + 1.5013435876237105e-23, + -8.328903877850174e-25, + -5.167748904012326e-26, + 3.2366962941218114e-27, + -1.163964265653603e-27 + }, + 0.020267685653535945, + 0.02596797224359293 + }, + { + { + 1.4330520293934438e-09, + 2.0653900997266785e-09, + 8.861422337329386e-10, + 2.484390807063457e-10, + 4.771871094962088e-11, + 6.3539423424235915e-12, + 5.695290133656733e-13, + 3.041636735038608e-14, + 4.618066754497384e-16, + -4.882537910833838e-17, + -2.2626929302787274e-18, + 7.735800358738017e-20, + 5.494308515884454e-21, + -1.9098299796206625e-22, + -1.0551803468236254e-23, + 9.358288473073072e-25, + 8.243533350687156e-25, + 1.8130926610110065e-24, + 6.625926732877158e-25 + }, + 0.02596797224359293, + 0.03166825883364991 + }, + { + { + 3.216589566610815e-07, + 4.855615137205529e-07, + 2.2313237230527845e-07, + 6.564126429055284e-08, + 1.2457975717948848e-08, + 1.4356027589196413e-09, + 7.456366737354983e-11, + -2.6879017209951425e-12, + -4.739337426481451e-13, + 7.722229482544613e-15, + 2.5616030504147617e-15, + -7.662739526444225e-17, + -1.1817890172164798e-17, + 8.184648689324978e-19, + 2.707129500338779e-20, + -5.7904193842360474e-21, + 1.4315394475995835e-22, + 8.504450672810816e-23, + -2.4996364135586805e-23 + }, + 0.03166825883364991, + 0.04306883201376388 + }, + { + { + 5.7939913777071644e-05, + 8.379335832127809e-05, + 3.377936608738917e-05, + 7.637987852998414e-06, + 8.302628510075688e-07, + 1.4927574593586637e-09, + -6.691320992196064e-09, + 1.2878253547929106e-10, + 7.094465860674562e-11, + -5.0660797908678295e-12, + -4.994533593074178e-13, + 9.317691594005963e-14, + -1.768263545468354e-15, + -8.453117101310306e-16, + 9.273541699666695e-17, + -5.0145673966434665e-19, + -7.953374676921863e-19, + 8.536503921547246e-20, + -1.495542547495874e-20 + }, + 0.04306883201376388, + 0.06586997837399182 + }, + { + { + 0.0031631846269420103, + 0.003982211787182989, + 0.0011297528144810199, + 0.00012650572507611033, + -5.2717473574936e-07, + -1.4260061216196563e-07, + 1.3326423389224526e-07, + -8.09481292393274e-09, + -4.78981067790718e-10, + 3.091240719345703e-10, + -4.0682128710022676e-11, + 1.5201595949913826e-12, + 6.298290797186528e-13, + -1.5266145620318645e-13, + 1.6769319426449512e-14, + 2.1858532236844475e-17, + -3.670075175840268e-16, + 7.421194464073827e-17, + -6.8516495103400354e-18 + }, + 0.06586997837399182, + 0.1114722710944477 + }, + { + { + 0.02527054526018694, + 0.01958885465789757, + 0.0029253705571776014, + 0.00022445447854577003, + 2.1127284490167714e-05, + 2.925789705565077e-06, + 3.436409961475248e-07, + 4.7523257336800576e-08, + 6.65800338960857e-09, + 9.32793360239846e-10, + 1.3817232769183438e-10, + 2.024545819618445e-11, + 3.049514308607615e-12, + 4.623933614472664e-13, + 7.069220426050848e-14, + 1.0914066959216706e-14, + 1.6929274822274909e-15, + 2.8888566885876266e-16, + 4.003416521902725e-17 + }, + 0.1114722710944477, + 0.15707456381490356 + }, + { + { + 0.06954212908713689, + 0.023253617876107757, + 0.0018817558019952863, + 0.00015099612130791773, + 1.6119981407421245e-05, + 1.9323965214038813e-06, + 2.477548253195308e-07, + 3.3350354563480705e-08, + 4.6430122303299515e-09, + 6.632208966045328e-10, + 9.665026374713892e-11, + 1.4312801378119078e-11, + 2.1476913129869768e-12, + 3.25807089640584e-13, + 4.9888478764748e-14, + 7.651431571664702e-15, + 1.1947907940790259e-15, + 2.40692882291782e-16, + 2.3635607360183997e-17 + }, + 0.15707456381490356, + 0.1798757101751315 + }, + { + { + 0.11419041805449423, + 0.020521580327712844, + 0.0012740772212567466, + 0.0001062161198180098, + 1.1343925939054193e-05, + 1.3588982222490983e-06, + 1.7457566693114546e-07, + 2.3508239255405627e-08, + 3.274496806517091e-09, + 4.678940377506047e-10, + 6.82035469767861e-11, + 1.0102339971507224e-11, + 1.5161908187288908e-12, + 2.3003040444669054e-13, + 3.523483588230292e-14, + 5.3507545616504615e-15, + 8.448103328007051e-16, + 2.393918396847994e-16, + 2.0816681711721685e-17 + }, + 0.1798757101751315, + 0.19127628335524546 + }, + { + { + 0.15165818890499952, + 0.016369427376503674, + 0.0008840770152282037, + 7.478700795372859e-05, + 7.99480167670754e-06, + 9.58517782677533e-07, + 1.2320694370814012e-07, + 1.659659774975314e-08, + 2.3123189231422092e-09, + 3.3046648403867174e-10, + 4.817769534010141e-11, + 7.1368752921352474e-12, + 1.0712420533964817e-12, + 1.6248200701562965e-13, + 2.4886342986363275e-14, + 3.694961003830599e-15, + 5.924080670460796e-16, + 2.1337098754514727e-16, + 1.7780915628762273e-17 + }, + 0.19127628335524546, + 0.19697656994530244 + }, + { + { + 0.1808715039787546, + 0.0124478423701576, + 0.0006196163285778558, + 5.2745024120972456e-05, + 5.643402899935257e-06, + 6.769284248055868e-07, + 8.703564869511071e-08, + 1.1726204920264882e-08, + 1.6339519685187875e-09, + 2.335382477680614e-10, + 3.40492009587301e-11, + 5.044305251278303e-12, + 7.572241444986361e-13, + 1.1483695938618865e-13, + 1.7590096046404824e-14, + 2.5847379792054426e-15, + 4.198030811863873e-16, + 2.3765711620882257e-16, + 3.469446951953614e-18 + }, + 0.19697656994530244, + 0.19982671324033094 + }, + { + { + 0.202815039861727, + 0.00921945969494375, + 0.00043622961797678585, + 3.7243939807177565e-05, + 3.986980621388872e-06, + 4.783591503864509e-07, + 6.151332734329051e-08, + 8.28835361281477e-09, + 1.154986554313675e-09, + 1.6508787566149596e-10, + 2.4070209367343942e-11, + 3.5661248259932776e-12, + 5.35387706390722e-13, + 8.11677114409548e-14, + 1.2444906216657614e-14, + 1.7468665403086447e-15, + 2.8102520310824275e-16, + 2.3071822230491534e-16, + 6.938893903907228e-18 + }, + 0.19982671324033094, + 0.20125178488784518 + }, + { + { + 0.2189498032807097, + 0.006721284919406446, + 0.0003077893762559753, + 2.6316302236593578e-05, + 2.817971982508813e-06, + 3.381439431966726e-07, + 4.3485791989886224e-08, + 5.859572497352028e-09, + 8.165599741510876e-10, + 1.16717652903775e-10, + 1.701801546905024e-11, + 2.5213789389688657e-12, + 3.7863462365450573e-13, + 5.725107887766256e-14, + 8.748210489351038e-15, + 1.0911410663894117e-15, + 1.682681771697503e-16, + 2.237793284010081e-16, + 3.209238430557093e-17 + }, + 0.20125178488784518, + 0.2019643207116023 + }, + { + { + 0.23065921854671798, + 0.004851398420450417, + 0.00021740153263174328, + 1.8601571405155864e-05, + 1.9921639265139957e-06, + 2.3906594516856505e-07, + 3.074531000103742e-08, + 4.142926290223725e-09, + 5.773459800517688e-10, + 8.252565471267292e-11, + 1.2032836532727131e-11, + 1.7829522580559143e-12, + 2.677597726874481e-13, + 4.066538772384831e-14, + 6.241535066564552e-15, + 7.580741590018647e-16, + 1.3530843112619095e-16, + 1.5612511283791264e-16, + -9.540979117872439e-18 + }, + 0.2019643207116023, + 0.20232058862348087 + }, + { + { + 0.23908612939229767, + 0.0034789916333673055, + 0.00015364130799821497, + 1.3150854366506329e-05, + 1.4085156592926612e-06, + 1.6903172630859664e-07, + 2.173887675774311e-08, + 2.9293435507143917e-09, + 4.0822789593164543e-10, + 5.835226572770136e-11, + 8.508240986748739e-12, + 1.2606964083783367e-12, + 1.8938843548976791e-13, + 2.8749572167363624e-14, + 4.397524011601206e-15, + 2.5847379792054426e-16, + 4.5102810375396984e-17, + -9.540979117872439e-17, + -2.862293735361732e-17 + }, + 0.20232058862348087, + 0.20249872257942014 + }, + { + { + 0.24511730390452105, + 0.002483990450115506, + 0.0001086106684613404, + 9.298191920630028e-06, + 9.959154303011697e-07, + 1.1951873112384104e-07, + 1.537123309712507e-08, + 2.0713067459127155e-09, + 2.8865461930427383e-10, + 4.126050022479344e-11, + 6.016184078694309e-12, + 8.916461319286029e-13, + 1.339206523454095e-13, + 1.9670029494101016e-14, + 3.0687258290029718e-15, + 2.6020852139652106e-16, + 7.112366251504909e-17, + 2.0296264668928643e-16, + -8.673617379884035e-19 + }, + 0.20249872257942014, + 0.2025877895573898 + }, + { + { + 0.24941782042567914, + 0.0017683273954829087, + 7.678863526062486e-05, + 6.57450779313444e-06, + 7.041989078648142e-07, + 8.45108257072763e-08, + 1.086893550855672e-08, + 1.4646166571208319e-09, + 2.0410752775423813e-10, + 2.9175781582346794e-11, + 4.254084931543112e-12, + 6.301330984781472e-13, + 9.470722817095378e-14, + 1.391421700080997e-14, + 2.114627917215728e-15, + -5.585809592645319e-16, + -1.214306433183765e-17, + 2.8622937353617317e-16, + 3.469446951953614e-18 + }, + 0.2025877895573898, + 0.20263232304637463 + }, + { + { + 0.2524765215536145, + 0.0012562994595141843, + 5.429396677408306e-05, + 4.648770506642322e-06, + 4.979368752443952e-07, + 5.975758369559936e-08, + 7.685439031707153e-09, + 1.0356339657374702e-09, + 1.4432488711080271e-10, + 2.0629898830892834e-11, + 3.0079948948324997e-12, + 4.4662190612498875e-13, + 6.752064185544526e-14, + 1.0500281200087613e-14, + 1.4103301859691442e-15, + -1.734723475976807e-17, + -1.8908485888147197e-16, + -3.4867941867133823e-16, + 1.2663481374630692e-16 + }, + 0.20263232304637463, + 0.20265458979086703 + }, + { + { + 0.2546481887862289, + 0.0008912762275735033, + 3.839028581376948e-05, + 3.287138762469652e-06, + 3.5209208471866094e-07, + 4.225478415602335e-08, + 5.434404913920443e-09, + 7.32300886596704e-10, + 1.02052919934148e-10, + 1.4587508284646944e-11, + 2.1270849664967173e-12, + 3.1551150581066167e-13, + 4.750713711310084e-14, + 7.212980213111564e-15, + 1.1084883011491797e-15, + -6.591949208711867e-17, + 1.734723475976807e-18, + 9.367506770274758e-17, + -9.540979117872439e-18 + }, + 0.20265458979086703, + 0.20266572316311324 + }, + { + { + 0.2561881913448183, + 0.0006316919590384738, + 2.7145554542667982e-05, + 2.3243445360920933e-06, + 2.4896583211350687e-07, + 2.9878569618446704e-08, + 3.842697030367881e-09, + 5.178132280597714e-10, + 7.216204023219319e-11, + 1.0313451481724911e-11, + 1.5039688244788962e-12, + 2.2294839585601522e-13, + 3.350444921501605e-14, + 3.740063814205996e-15, + 7.407269242420966e-16, + 5.967448757360216e-16, + 6.591949208711867e-17, + 1.8908485888147197e-16, + -7.806255641895632e-18 + }, + 0.20266572316311324, + 0.20267128984923632 + }, + { + { + 0.2572793323524821, + 0.00044740425577668823, + 1.919463685796409e-05, + 1.6435549859573212e-06, + 1.7604512135387107e-07, + 2.1127313966015637e-08, + 2.717194729634498e-09, + 3.661506878943621e-10, + 5.1026320321834184e-11, + 7.29169849500444e-12, + 1.0634045727320185e-12, + 1.5748687076655443e-13, + 2.3859386688585005e-14, + 4.270889197854899e-15, + 5.672545766444159e-16, + -8.448103328007051e-16, + 9.71445146547012e-17, + 2.0105445086571194e-15, + 1.448494102440634e-16 + }, + 0.20267128984923632, + 0.20267407319229788 + }, + { + { + 0.2580519807368856, + 0.0003167272897560327, + 1.3572598130872846e-05, + 1.1621671743965861e-06, + 1.2448259037282916e-07, + 1.4939260268090337e-08, + 1.921346066621754e-09, + 2.589070850073094e-10, + 3.6081145016186866e-11, + 5.157388405230279e-12, + 7.520546685402252e-13, + 1.1097546492866428e-13, + 1.7126924878319016e-14, + 5.67774993687209e-15, + 8.673617379884035e-16, + 2.3071822230491534e-15, + 1.43982048506075e-16, + -6.661338147750939e-16, + -7.892991815694472e-17 + }, + 0.20267407319229788, + 0.20267546486382865 + }, + { + { + 0.2585988724599927, + 0.00022414215980744862, + 9.597255035097285e-06, + 8.217756915021579e-07, + 8.802244440969664e-08, + 1.0563647474121085e-08, + 1.358598076053874e-09, + 1.8307183026478047e-10, + 2.5511984885762118e-11, + 3.646605586937746e-12, + 5.308739559062303e-13, + 7.936012957898697e-14, + 1.395758508770939e-14, + 1.1587952819525071e-15, + -7.546047120499111e-16, + -3.0704605524789486e-16, + -6.401129626354418e-16, + 4.4374226515486725e-15, + 1.3426759704060487e-15 + }, + 0.20267546486382865, + 0.20267616069959404 + }, + { + { + 0.2592290354916159, + 0.00046237072283881325, + 9.327071111846566e-05, + 4.04856404778442e-05, + 2.2898027861355946e-05, + 1.4911944355256584e-05, + 1.0620804294380476e-05, + 8.055933548441543e-06, + 6.4069163158222975e-06, + 5.29011720291038e-06, + 4.504867114601269e-06, + 3.9380722249553884e-06, + 3.522259974053296e-06, + 3.215401816561783e-06, + 2.9905059784306187e-06, + 2.829948342482e-06, + 2.7222590090452553e-06, + 2.66026259132697e-06, + 1.3200081928118473e-06 + }, + 0.20267616069959404, + 0.20267685653535944 + } +} +}; + +const auto PR_p = SuperAncillary{ +{ + { + { + 4.2115936784941e-14, + 7.082139279778615e-14, + 4.281441668412217e-14, + 1.9123012372347713e-14, + 6.460328562307523e-15, + 1.6765603431288853e-15, + 3.36292637163962e-16, + 5.1860921648633566e-17, + 6.0107675456840275e-18, + 4.93726813515645e-19, + 2.4083621285564296e-20, + 9.47616424537102e-23, + -7.1051225501406e-23, + -3.0677436333050444e-24, + 1.4628333292452202e-25, + 1.2639227645878215e-26, + -3.8533659659909825e-28, + -3.5261080979808146e-29, + 3.32550323497344e-30 + }, + 0.01701444200703503, + 0.021799753821513633 + }, + { + { + 8.938956773181632e-12, + 1.3439327305351806e-11, + 6.288329039800055e-12, + 1.9826748553822934e-12, + 4.414511850216345e-13, + 7.088859014953733e-14, + 8.181698505611952e-15, + 6.527653757029151e-16, + 3.162152136162365e-17, + 4.279990806191533e-19, + -4.6206272928403434e-20, + -2.0797341030133568e-21, + 6.177896652744867e-23, + 4.7788231227984526e-24, + -1.3861706054362575e-25, + -1.4215273512082633e-26, + -1.669229675447661e-27, + 4.487040828897115e-27, + 7.7150596530614955e-28 + }, + 0.021799753821513633, + 0.026585065635992236 + }, + { + { + 4.085507279084059e-09, + 6.410401559266648e-09, + 3.231824978266208e-09, + 1.0923069013593605e-09, + 2.52024445187971e-10, + 3.905509723141962e-11, + 3.73471874979177e-12, + 1.5022634999916855e-13, + -8.12601770161866e-15, + -9.644616840775853e-16, + 2.3559108130823366e-17, + 4.723565049544365e-18, + -1.6713754821230258e-19, + -1.9677138009092646e-20, + 1.4426017766021298e-21, + 3.847561149043651e-23, + -1.0404785039052024e-23, + 1.3764802380765226e-24, + 4.620579202932928e-25 + }, + 0.026585065635992236, + 0.03615568926494944 + }, + { + { + 1.6349625391332918e-06, + 2.489669257624972e-06, + 1.1427314989998866e-06, + 3.2189532774728283e-07, + 5.2973211090187104e-08, + 3.881322341579814e-09, + -1.402363237723129e-10, + -3.26068965484856e-11, + 1.5764214067874998e-12, + 2.669115963311214e-13, + -2.6973487736840458e-14, + -1.1725895938982276e-15, + 3.409623244140794e-16, + -1.3374770488526952e-17, + -2.1340688015269687e-18, + 3.0499875924358835e-19, + -9.006032316747658e-21, + 5.945360652724886e-23, + 7.708806321111372e-22 + }, + 0.03615568926494944, + 0.05529693652286385 + }, + { + { + 0.00018641763706717313, + 0.0002549265195801485, + 8.796517801636943e-05, + 1.4493063101704085e-05, + 5.93659937733161e-07, + -8.865727397666071e-08, + 1.5453090824947498e-09, + 1.0034143700587606e-09, + -1.473603817532662e-10, + 4.333381441536222e-12, + 1.903659250210749e-12, + -3.854457196096114e-13, + 2.9156300395036635e-14, + 2.2880752244019054e-15, + -9.628463327642823e-16, + 1.2770440460045229e-16, + -4.453540417985501e-18, + -1.6186270226437646e-18, + 3.6149778002037437e-19 + }, + 0.05529693652286385, + 0.09357943103869266 + }, + { + { + 0.005448712641404622, + 0.0062362159058999755, + 0.001443947803998351, + 0.00010960884095892343, + -2.254571049831034e-06, + 3.108042103893788e-07, + 3.183233642737454e-08, + -6.3983755658182065e-09, + 1.1291747205506315e-09, + -1.183401464725808e-10, + 7.412891426996499e-12, + 7.92415429334923e-13, + -3.6369037393225306e-13, + 7.890138331101762e-14, + -1.258085161656014e-14, + 1.5166023276634577e-15, + -1.0518116325825e-16, + -6.600080725005508e-18, + 5.5294310796760726e-18 + }, + 0.09357943103869266, + 0.1701444200703503 + } +} +}; +const auto PR_rhoL = SuperAncillary{ +{ + { + { + 0.9207205305399191, + -0.045064618991104796, + -0.0010750229061558397, + -4.150471723450566e-05, + -2.0449656082804912e-06, + -8.411570305566496e-08, + 2.630701059769258e-09, + 7.618859571012493e-10, + -1.2385135972348138e-10, + -4.380963647410141e-11, + 3.6138314563061158e-12, + 2.0083795737591004e-12, + -2.442004931602071e-13, + -8.769374115757955e-14, + 2.0539125955565396e-14, + 1.4155343563970746e-15, + -1.4502288259166107e-15, + 9.645062526431047e-16, + 4.85722573273506e-17 + }, + 0.01701444200703503, + 0.05529693652286385 + }, + { + { + 0.8199443180127295, + -0.056330799734005496, + -0.0018219491199177318, + -8.821642822268161e-05, + -4.3808005871781575e-06, + -2.7804292488525784e-07, + -2.5617864357618814e-08, + -1.4936050521385802e-09, + -1.1656688808647786e-10, + -1.80864212495635e-11, + -3.4572344986827375e-13, + -7.897849041427207e-14, + -1.9761969838327786e-14, + 1.0269562977782698e-15, + -1.5265566588595902e-16, + -7.91033905045424e-16, + -2.7755575615628914e-17, + 8.049116928532385e-16, + 2.0816681711721685e-17 + }, + 0.05529693652286385, + 0.09357943103869266 + }, + { + { + 0.6880146598953387, + -0.07711229066058617, + -0.0036751053290779087, + -0.00027023163542316125, + -2.612667202559621e-05, + -3.0579327836427472e-06, + -3.869841956188891e-07, + -5.180305783641925e-08, + -7.196452149471622e-09, + -1.0250969587066727e-09, + -1.492256387902735e-10, + -2.2068007143882795e-11, + -3.3078817462950383e-12, + -5.018416238122825e-13, + -7.670947210769441e-14, + -1.2490009027033011e-14, + -1.887379141862766e-15, + 3.5388358909926865e-16, + -2.7755575615628914e-17 + }, + 0.09357943103869266, + 0.13186192555452148 + }, + { + { + 0.5539049274549523, + -0.05513150079759916, + -0.00226486529446273, + -0.00017169038790523783, + -1.771968913242411e-05, + -2.1044071880221837e-06, + -2.6937613983174513e-07, + -3.620174487267702e-08, + -5.035860249635871e-09, + -7.188804967972473e-10, + -1.0471176703497065e-10, + -1.5500455086137066e-11, + -2.3248417080345973e-12, + -3.5293989952833726e-13, + -5.399847236020605e-14, + -8.854028621385623e-15, + -1.2975731600306517e-15, + 2.8449465006019636e-16, + -4.5102810375396984e-17 + }, + 0.13186192555452148, + 0.1510031728124359 + }, + { + { + 0.459674826377972, + -0.03799561202969537, + -0.0014593552334729865, + -0.00011667442436243125, + -1.2328894690105674e-05, + -1.4734787574105512e-06, + -1.89107481913392e-07, + -2.5449463390836424e-08, + -3.5434242970366903e-09, + -5.061691760177567e-10, + -7.376567759398434e-11, + -1.0923841692322966e-11, + -1.6389077595047041e-12, + -2.489328188026718e-13, + -3.807371085073896e-14, + -6.283168429987995e-15, + -9.055256544598933e-16, + 3.0531133177191805e-16, + -2.2551405187698492e-17 + }, + 0.1510031728124359, + 0.16057379644139308 + }, + { + { + 0.39512265522451157, + -0.025874636107352526, + -0.000981657847521144, + -8.126867623134762e-05, + -8.658142312312905e-06, + -1.0370940123176353e-06, + -1.3324415930673905e-07, + -1.794336704219468e-08, + -2.4994516144294376e-09, + -3.5715819884929445e-10, + -5.20629060696276e-11, + -7.711369737206653e-12, + -1.157088314052146e-12, + -1.7580381594939354e-13, + -2.6891683324592464e-14, + -4.472117121068209e-15, + -6.314393452555578e-16, + 2.636779683484747e-16, + -1.734723475976807e-17 + }, + 0.16057379644139308, + 0.1653591082558717 + }, + { + { + 0.3511712698170222, + -0.01762984199424723, + -0.0006775212105428925, + -5.710620124233304e-05, + -6.102283057512342e-06, + -7.316593272181648e-07, + -9.405098579107207e-08, + -1.2669533731163307e-08, + -1.7652206779628088e-09, + -2.5228212227612623e-10, + -3.67796765265993e-11, + -5.448200918189983e-12, + -8.175543575461575e-13, + -1.2424436479641088e-13, + -1.8981344274138223e-14, + -3.202299536653186e-15, + -4.440892098500626e-16, + 3.191891195797325e-16, + -3.122502256758253e-17 + }, + 0.1653591082558717, + 0.167751764163111 + }, + { + { + 0.3211597705559426, + -0.012077354670507117, + -0.00047368246685701096, + -4.0264768868699535e-05, + -4.308027496135319e-06, + -5.167712383395695e-07, + -6.644526837421005e-08, + -8.952242693677226e-09, + -1.247437774604121e-09, + -1.7829611051456418e-10, + -2.5995025576541764e-11, + -3.8507357025263644e-12, + -5.778121037192108e-13, + -8.784639682346551e-14, + -1.3433698597964394e-14, + -2.373101715136272e-15, + -3.365363543395006e-16, + 1.2836953722228372e-16, + -2.2551405187698492e-17 + }, + 0.167751764163111, + 0.16894809211673065 + }, + { + { + 0.30054357607263954, + -0.008327461617588218, + -0.00033318306039584883, + -2.8432365464115678e-05, + -3.043795371863306e-06, + -3.652042762300467e-07, + -4.696313324337176e-08, + -6.3279062684218346e-09, + -8.818025996892853e-10, + -1.260411150449947e-10, + -1.8376970084554856e-11, + -2.7223640008955385e-12, + -4.0846839799435486e-13, + -6.197126145579546e-14, + -9.492406860545088e-15, + -1.7208456881689926e-15, + -2.393918396847994e-16, + 2.5673907444456745e-16, + -8.673617379884035e-18 + }, + 0.16894809211673065, + 0.16954625609354046 + }, + { + { + 0.2862916733850893, + -0.005776207912322414, + -0.00023501417597186075, + -2.0091122712718318e-05, + -2.151427414113366e-06, + -2.581648955793381e-07, + -3.320061314066036e-08, + -4.473697898244033e-09, + -6.234334853916224e-10, + -8.9112786594292e-11, + -1.2992894954377832e-11, + -1.9243946713931592e-12, + -2.8871002810682e-13, + -4.3874626154405405e-14, + -6.7133798520302435e-15, + -1.2906342661267445e-15, + -1.5612511283791264e-16, + 3.0878077872387166e-16, + 1.734723475976807e-18 + }, + 0.16954625609354046, + 0.16984533808194538 + }, + { + { + 0.2763847311775531, + -0.004026323535076086, + -0.00016598517183828362, + -1.4201795987777571e-05, + -1.520984803850961e-06, + -1.8252416650321734e-07, + -2.3473785675659498e-08, + -3.1630968764378986e-09, + -4.408004100620033e-10, + -6.300811088155722e-11, + -9.186814503570062e-12, + -1.3607726057074387e-12, + -2.0409195167214733e-13, + -3.113134749987978e-14, + -4.758346494604382e-15, + -9.957312752106873e-16, + -1.682681771697503e-16, + -2.445960101127298e-16, + -4.2500725161431774e-17 + }, + 0.16984533808194538, + 0.16999487907614785 + }, + { + { + 0.2694673741877153, + -0.0028173393805495644, + -0.00011730308752334363, + -1.004050356021198e-05, + -1.0753911961810386e-06, + -1.290548921391993e-07, + -1.6597556396977242e-08, + -2.236546208650436e-09, + -3.1168101606582344e-10, + -4.4551562092265407e-11, + -6.495835119801896e-12, + -9.626032609899582e-13, + -1.4432725847779437e-13, + -2.216109240560371e-14, + -3.3948538424866115e-15, + -1.0026701691145945e-15, + -1.5092094240998222e-16, + -2.7582103268031233e-16, + -4.7704895589362195e-17 + }, + 0.16999487907614785, + 0.17006964957324908 + }, + { + { + 0.264620888720384, + -0.001977082335539313, + -8.2923124407136e-05, + -7.099113954002478e-06, + -7.603784178723816e-07, + -9.125234246010194e-08, + -1.1735920570424274e-08, + -1.581440811637691e-09, + -2.2038751899822184e-10, + -3.1502528016758014e-11, + -4.593121022411495e-12, + -6.799057844508738e-13, + -1.0198439315267649e-13, + -1.6341095143701523e-14, + -2.426878142891553e-15, + -6.210310043996969e-16, + -5.898059818321144e-17, + 4.527628272299467e-16, + 1.3010426069826053e-17 + }, + 0.17006964957324908, + 0.17010703482179967 + }, + { + { + 0.2612166158875983, + -0.001390391541082515, + -5.862766135761137e-05, + -5.019621645544273e-06, + -5.376553057923755e-07, + -6.452400296876049e-08, + -8.298434496858964e-09, + -1.1182347825489103e-09, + -1.558359847414481e-10, + -2.227549741884438e-11, + -3.247855109855813e-12, + -4.816719939571001e-13, + -7.213847574849552e-14, + -1.1423154089307275e-14, + -1.7156415177410622e-15, + -5.048045315092509e-16, + -7.632783294297951e-17, + -9.367506770274758e-17, + -3.209238430557093e-17 + }, + 0.17010703482179967, + 0.170125727446075 + }, + { + { + 0.2588208891336881, + -0.0009793198302267478, + -4.145328900037257e-05, + -3.5493342854138465e-06, + -3.8017496464121114e-07, + -4.562495321824844e-08, + -5.867838735740261e-09, + -7.907071299800839e-10, + -1.1019215748198086e-10, + -1.5751122628415715e-11, + -2.296527551459704e-12, + -3.4033192930493783e-13, + -5.1030360492809734e-14, + -9.162809400109495e-15, + -1.2975731600306517e-15, + -4.354155924701786e-16, + -1.3010426069826053e-16, + -8.690964614643804e-16, + -9.107298248878237e-17 + }, + 0.170125727446075, + 0.17013507375821263 + }, + { + { + 0.25713261899860995, + -0.0006905565301747237, + -2.931094851913764e-05, + -2.509732105073978e-06, + -2.688226164813262e-07, + -3.226156955644932e-08, + -4.149175109394165e-09, + -5.591129538518036e-10, + -7.791681362612213e-11, + -1.1135805819129097e-11, + -1.6232518801340134e-12, + -2.40765740677773e-13, + -3.687848637579094e-14, + -5.707240235963695e-15, + -4.597017211338539e-16, + -1.2160411566597418e-15, + 2.203098814490545e-16, + -1.2923689896027213e-15, + -5.828670879282072e-16 + }, + 0.17013507375821263, + 0.17013974691428146 + }, + { + { + 0.2559417264393482, + -0.0004873303221206906, + -2.0725636255014904e-05, + -1.7746393138461797e-06, + -1.900857017015506e-07, + -2.2812321970669402e-08, + -2.933903902810342e-09, + -3.9535087530129243e-10, + -5.5095764756041277e-11, + -7.875578661442617e-12, + -1.1483054090932754e-12, + -1.7132302521094545e-13, + -2.5521251778570786e-14, + -4.4114017994090204e-15, + -6.29704621779581e-16, + -3.0184188481996443e-16, + 1.8561541192951836e-16, + 2.534430998402115e-15, + 1.951563910473908e-16 + }, + 0.17013974691428146, + 0.17014208349231588 + }, + { + { + 0.2551010899484165, + -0.0003441099749644915, + -1.465512048574695e-05, + -1.254856211765562e-06, + -1.3441067886650615e-07, + -1.613073148838684e-08, + -2.0745819472034466e-09, + -2.7955775715182707e-10, + -3.895907554896105e-11, + -5.572540692777572e-12, + -8.118037492232943e-13, + -1.156644224842296e-13, + -1.7319479184152442e-14, + -6.123573870198129e-16, + -6.765421556309548e-17, + 1.5838025335668249e-15, + 2.5326962749261384e-16, + 1.56472057533108e-15, + 1.1622647289044608e-16 + }, + 0.17014208349231588, + 0.1701432517813331 + }, + { + { + 0.25450739757424595, + -0.0002430797888991077, + -1.0362693722733643e-05, + -8.873161782604194e-07, + -9.50426266178167e-08, + -1.1406137241307124e-08, + -1.4669526513660935e-09, + -1.976803373771041e-10, + -2.754695430096099e-11, + -3.937652287566706e-12, + -5.726478319312278e-13, + -8.348009783443189e-14, + -1.5083420623618338e-14, + -2.8484159475539172e-15, + 9.280770596475918e-16, + -8.326672684688674e-17, + 1.0928757898653885e-15, + -1.9723805921856297e-15, + -1.4632392519864368e-15 + }, + 0.1701432517813331, + 0.1701438359258417 + }, + { + { + 0.25382485353286033, + -0.0005003082472470298, + -0.00010070946646463866, + -4.371453981542178e-05, + -2.472424034292986e-05, + -1.6101233343186055e-05, + -1.1467857101349344e-05, + -8.698427342242881e-06, + -6.917894183581727e-06, + -5.7120257463023905e-06, + -4.864148734601281e-06, + -4.252149622345491e-06, + -3.803174641357071e-06, + -3.471843289028567e-06, + -3.2290110822119633e-06, + -3.0556483156078673e-06, + -2.9393703138338306e-06, + -2.8724294233051922e-06, + -1.425284251615512e-06 + }, + 0.1701438359258417, + 0.1701444200703503 + } +} +}; +const auto PR_rhoV = SuperAncillary{ +{ + { + { + 1.967544593078315e-12, + 3.286395018856467e-12, + 1.951259019068106e-12, + 8.480414006053818e-13, + 2.7638255525455143e-13, + 6.855112175816157e-14, + 1.2987941190221208e-14, + 1.8596645822713178e-15, + 1.9425469025161906e-16, + 1.3440422453482796e-17, + 4.1371292677837237e-19, + -2.0472087922962698e-20, + -2.3984414514408427e-21, + -1.0726839771583605e-23, + 8.190099610752978e-24, + 1.4834694490433158e-25, + -2.890640271333655e-26, + -1.2318556073091862e-28, + 2.6437933681383566e-28 + }, + 0.01701444200703503, + 0.021799753821513633 + }, + { + { + 3.4427283919277603e-10, + 5.10033605480091e-10, + 2.3125713682061785e-10, + 6.97923116109859e-11, + 1.468781950176213e-11, + 2.192555878654968e-12, + 2.289969778559488e-13, + 1.563184655125417e-14, + 5.345224322369889e-16, + -8.665670712890633e-18, + -1.4805111905363385e-18, + -1.2881526260516941e-20, + 3.1913825586258806e-21, + 4.0303951255023627e-23, + -7.672322324660242e-24, + -2.068961273341252e-25, + -4.90734591919887e-26, + 1.348005514841665e-25, + 2.4183319910455338e-26 + }, + 0.021799753821513633, + 0.026585065635992236 + }, + { + { + 1.1651253109754791e-07, + 1.799247246805057e-07, + 8.718524363492525e-08, + 2.7723805947266338e-08, + 5.859084478366607e-09, + 7.937371730144063e-10, + 5.851825200412916e-11, + 3.5459917618408365e-13, + -2.840460099622861e-13, + -9.001110583611441e-15, + 1.453688138264624e-15, + 4.153752300772462e-17, + -8.493292717205814e-18, + 1.0460073661948098e-20, + 4.4932489647971677e-20, + -2.1592128174018962e-21, + -1.6723265540349414e-22, + 6.45330124762073e-23, + 1.344814730252227e-23 + }, + 0.026585065635992236, + 0.03615568926494944 + }, + { + { + 3.098979961669226e-05, + 4.5977523083262384e-05, + 1.9714735728750365e-05, + 4.9340743435473964e-06, + 6.495334627828851e-07, + 2.0013065084957464e-08, + -4.62369606718499e-09, + -1.6742776075828521e-10, + 5.6102600385966035e-11, + -2.1810195956609656e-13, + -6.246733592709029e-13, + 4.045717710917202e-14, + 3.97102187587516e-15, + -7.21043417103846e-16, + 1.9805582453051167e-17, + 4.946315069940491e-18, + -6.192935810062008e-19, + 5.64732747802203e-20, + 1.2579762755706445e-20 + }, + 0.03615568926494944, + 0.05529693652286385 + }, + { + { + 0.0005902854802776641, + 0.0006119857879876187, + 0.000137226493734894, + 1.3534511317666194e-05, + 2.5757985750152563e-07, + -3.0381140235968494e-08, + 1.4660600077037917e-09, + 1.4064389556322658e-10, + -1.7247649444289924e-11, + 4.829482286631236e-13, + 7.904912957394129e-14, + -9.965950794102972e-15, + 3.496086138144762e-16, + 3.581424707580633e-17, + -5.7462715141731735e-18, + 5.929230630780102e-20, + 6.776263578034403e-21, + 5.166900978251232e-19, + 1.1858461261560205e-20 + }, + 0.05529693652286385, + 0.07443818378077825 + }, + { + { + 0.0034551514866857118, + 0.002398865145025046, + 0.0003121082643740536, + 1.5218984619397858e-05, + 9.690936261096291e-08, + 1.2913919961681083e-08, + 1.4096536882115922e-09, + -3.3114702454217944e-11, + 2.594155481248396e-12, + 1.6231949866250123e-13, + -1.3332379904945624e-14, + 1.0818033751788803e-15, + -1.3362791775883842e-17, + -2.2497195079074217e-18, + -9.486769009248164e-20, + -1.2197274440461925e-18, + -2.303929616531697e-19, + 3.6591823321385775e-18, + 3.9979955110402976e-19 + }, + 0.07443818378077825, + 0.09357943103869266 + }, + { + { + 0.020288628115803765, + 0.016610099415744563, + 0.00272192651625002, + 0.0002394799179501481, + 2.3315294231581688e-05, + 3.169727025417485e-06, + 3.793923939678003e-07, + 5.156601162595916e-08, + 7.275292876224738e-09, + 1.0148922060279446e-09, + 1.5007760583319457e-10, + 2.202715483970441e-11, + 3.3070396464676688e-12, + 5.021763712330374e-13, + 7.666279720416891e-14, + 1.1847890290378471e-14, + 1.843794214528849e-15, + 3.1604493327952454e-16, + 4.651227319962814e-17 + }, + 0.09357943103869266, + 0.13186192555452148 + }, + { + { + 0.059633242372117805, + 0.021523786193835045, + 0.001926244019335927, + 0.00016436263238290855, + 1.7587241022322224e-05, + 2.103887459802955e-06, + 2.692872191701126e-07, + 3.6202589339100893e-08, + 5.035822049290206e-09, + 7.188798449749012e-10, + 1.0471208969353718e-10, + 1.5500948181285112e-11, + 2.3252866646061854e-12, + 3.5267275211303684e-13, + 5.3994569232385103e-14, + 8.295447662121092e-15, + 1.2962721174236691e-15, + 2.658463726934457e-16, + 3.230922474006803e-17 + }, + 0.13186192555452148, + 0.1510031728124359 + }, + { + { + 0.10209461339960167, + 0.020078909930632285, + 0.0013564703941337276, + 0.00011554892995170075, + 1.2319437775788929e-05, + 1.4734155808103153e-06, + 1.8910621422518065e-07, + 2.5449462346532892e-08, + 3.5434243221901807e-09, + 5.06168969585663e-10, + 7.376593953722921e-11, + 1.0924287516256292e-11, + 1.6393041438189648e-12, + 2.4869169223951104e-13, + 3.807978238290488e-14, + 5.776629175002768e-15, + 9.063930161978817e-16, + 2.411265631607762e-16, + 2.0383000842727483e-17 + }, + 0.1510031728124359, + 0.16057379644139308 + }, + { + { + 0.1393729010835231, + 0.016593251298797226, + 0.0009532795808090732, + 8.111304465426971e-05, + 8.657481578122454e-06, + 1.037091311451195e-06, + 1.332441384432198e-07, + 1.794336703699051e-08, + 2.4994517905038705e-09, + 3.571580193054147e-10, + 5.2063129848956e-11, + 7.711812959054765e-12, + 1.157456075429053e-12, + 1.7556355674797075e-13, + 2.688300970721258e-14, + 3.9968028886505635e-15, + 6.323067069935462e-16, + 2.2985086056692694e-16, + 1.5178830414797062e-17 + }, + 0.16057379644139308, + 0.1653591082558717 + }, + { + { + 0.1692940156782449, + 0.012902057653797903, + 0.0006700678810102369, + 5.7085725788112024e-05, + 6.102239057614867e-06, + 7.316592307484576e-07, + 9.405098538861623e-08, + 1.266953380749114e-08, + 1.7652208635782207e-09, + 2.5228192451764997e-10, + 3.677991071426856e-11, + 5.448613782377265e-12, + 8.179099758587327e-13, + 1.240327285323417e-13, + 1.8984813721090177e-14, + 2.7564756033271465e-15, + 4.215378046623641e-16, + 2.0122792321330962e-16, + 2.688821387764051e-17 + }, + 0.1653591082558717, + 0.167751764163111 + }, + { + { + 0.1921856564900402, + 0.00969084706538421, + 0.0004717724978338892, + 4.026214237729843e-05, + 4.308024652975584e-06, + 5.167712350106352e-07, + 6.644526831522946e-08, + 8.952242742249483e-09, + 1.2474379341986808e-09, + 1.7829594398111048e-10, + 2.599524762114669e-11, + 3.851164179224931e-12, + 5.781538442439782e-13, + 8.762435221854048e-14, + 1.3431963874488417e-14, + 1.915134717478395e-15, + 3.2612801348363973e-16, + 3.2439329000766293e-16, + 2.3418766925686896e-17 + }, + 0.167751764163111, + 0.16894809211673065 + }, + { + { + 0.2092148975305195, + 0.007128445272373621, + 0.0003326996220906972, + 2.8432032853142192e-05, + 3.043795191084303e-06, + 3.652042760392271e-07, + 4.6963133177452265e-08, + 6.327906323932986e-09, + 8.818027766310799e-10, + 1.2604095198098797e-10, + 1.8377181720818925e-11, + 2.7227942123175808e-12, + 4.087806482200307e-13, + 6.178738076734192e-14, + 9.485467966641181e-15, + 1.2732870313669764e-15, + 2.237793284010081e-16, + 2.3418766925686896e-16, + 7.806255641895632e-18 + }, + 0.16894809211673065, + 0.16954625609354046 + }, + { + { + 0.22166645905817658, + 0.005175245300316345, + 0.0002348925657099949, + 2.0091080864132957e-05, + 2.1514274026867425e-06, + 2.581648954613769e-07, + 3.3200613073006147e-08, + 4.473697952020461e-09, + 6.234336501903526e-10, + 8.911260965249745e-11, + 1.299311526425928e-11, + 1.9248335564325814e-12, + 2.8905870752549134e-13, + 4.368554129552393e-14, + 6.711645128554267e-15, + 8.378714388967978e-16, + 1.5265566588595902e-16, + 1.8214596497756474e-16, + -2.6020852139652106e-18 + }, + 0.16954625609354046, + 0.16984533808194538 + }, + { + { + 0.23067150083801227, + 0.003725476879880729, + 0.00016595467496789695, + 1.4201790739628434e-05, + 1.5209848030911521e-06, + 1.8252416639913394e-07, + 2.3473785595862218e-08, + 3.1630968937851334e-09, + 4.4080058700379787e-10, + 6.3007946082827e-11, + 9.187020935663703e-12, + 1.3611941435121011e-12, + 2.0445450887862648e-13, + 3.09127723419067e-14, + 4.751407600700475e-15, + 5.238864897449957e-16, + 1.491862189340054e-16, + 7.042977312465837e-16, + 4.163336342344337e-17 + }, + 0.16984533808194538, + 0.16999487907614785 + }, + { + { + 0.237137473422725, + 0.0026668244973612407, + 0.00011729545148811069, + 1.004050290311434e-05, + 1.0753911961168539e-06, + 1.290548920437895e-07, + 1.659755634146609e-08, + 2.2365462572226935e-09, + 3.116811773951067e-10, + 4.455141290604647e-11, + 6.496051960236393e-12, + 9.630022473894329e-13, + 1.446689990025618e-13, + 2.1937313077202703e-14, + 3.3931191190106347e-15, + 5.412337245047638e-16, + 1.3357370765021415e-16, + 7.268491364342822e-16, + 4.597017211338539e-17 + }, + 0.16999487907614785, + 0.17006964957324908 + }, + { + { + 0.24175815792274802, + 0.0019018019777060826, + 8.292121391923792e-05, + 7.0991138717956676e-06, + 7.603784178359524e-07, + 9.125234237510049e-08, + 1.17359205131784e-08, + 1.5814408688835657e-09, + 2.2038768553167554e-10, + 3.150234934023999e-11, + 4.593327454505136e-12, + 6.803307917024881e-13, + 1.023348072948238e-13, + 1.6110376921396607e-14, + 2.4338170367954604e-15, + 1.5265566588595902e-16, + 3.122502256758253e-17, + 3.642919299551295e-17, + -1.3877787807814457e-17 + }, + 0.17006964957324908, + 0.17010703482179967 + }, + { + { + 0.24504950305352938, + 0.001352745629684961, + 5.862718355055703e-05, + 5.019621635323282e-06, + 5.376553057160477e-07, + 6.452400284732984e-08, + 8.298434437878366e-09, + 1.118234846733679e-09, + 1.5583615474434875e-10, + 2.227533782428459e-11, + 3.248068480843358e-12, + 4.820623067391949e-13, + 7.248195099673893e-14, + 1.1211517825238104e-14, + 1.7034984534092246e-15, + 6.418476861114186e-17, + 6.591949208711867e-17, + 5.533767888366015e-16, + 2.949029909160572e-17 + }, + 0.17010703482179967, + 0.170125727446075 + }, + { + { + 0.2473887591484516, + 0.0009604954409799197, + 4.1453169525423536e-05, + 3.5493342841735193e-06, + 3.8017496460478195e-07, + 4.5624953119369205e-08, + 5.867838671555492e-09, + 7.907071629398299e-10, + 1.1019232575015803e-10, + 1.5750949156068117e-11, + 2.296747861341153e-12, + 3.407586712800281e-13, + 5.137903991148107e-14, + 8.93209117780458e-15, + 1.2923689896027213e-15, + -6.938893903907228e-18, + 1.1796119636642288e-16, + 1.3270634591222574e-15, + 9.627715291671279e-17 + }, + 0.170125727446075, + 0.17013507375821263 + }, + { + { + 0.2490487922516141, + 0.0006811439771107868, + 2.9310918647461326e-05, + 2.509732104961221e-06, + 2.6882261645530536e-07, + 3.226156947144787e-08, + 4.149175027862162e-09, + 5.591129972198905e-10, + 7.791697148595844e-11, + 1.113566183708059e-11, + 1.6234808636328424e-12, + 2.411647270772477e-13, + 3.721675745360642e-14, + 5.479991460610734e-15, + 4.753142324176451e-16, + 7.563394355258879e-16, + -2.2724877535296173e-16, + 1.7572748811645056e-15, + 5.733261088103347e-16 + }, + 0.17013507375821263, + 0.17013974691428146 + }, + { + { + 0.2502255658692596, + 0.0004826239559720131, + 2.0725628786679925e-05, + 1.774639313863527e-06, + 1.9008570164603944e-07, + 2.2812321890872123e-08, + 2.933903833421403e-09, + 3.953508978526976e-10, + 5.5095907003366307e-11, + 7.875412127988923e-12, + 1.1485309231451524e-12, + 1.7173241995127597e-13, + 2.5854318685958333e-14, + 4.182418300580082e-15, + 6.245004513516506e-16, + -1.4224732503009818e-16, + -1.9255430583342559e-16, + -2.048708425128609e-15, + -2.0036056147532122e-16 + }, + 0.17013974691428146, + 0.17014208349231588 + }, + { + { + 0.25105914278296176, + 0.00034175676948506976, + 1.4655118618528765e-05, + 1.2548562118210732e-06, + 1.3441067884568947e-07, + 1.6130731377364538e-08, + 2.0745818743450606e-09, + 2.7955778143795573e-10, + 3.895922473517999e-11, + 5.572348138471739e-12, + 8.120119160404116e-13, + 1.1612238948188747e-13, + 1.7666423879347803e-14, + 4.0072112295064244e-16, + 5.724587470723463e-17, + -2.0209528495129803e-15, + -2.723515857283587e-16, + -1.0651202142497596e-15, + -1.1188966420050406e-16 + }, + 0.17014208349231588, + 0.1701432517813331 + }, + { + { + 0.25164930534191154, + 0.0002419031805581083, + 1.0362693255834554e-05, + 8.87316178307257e-07, + 9.50426266022042e-08, + 1.140613715977512e-08, + 1.4669525750382606e-09, + 1.976803529896154e-10, + 2.7547124303861636e-11, + 3.937477080495633e-12, + 5.728750807065808e-13, + 8.391204397995011e-14, + 1.5444243106621514e-14, + 2.6229018956769323e-15, + -9.194034422677078e-16, + -3.5735303605122226e-16, + -1.0928757898653885e-15, + 2.4494295480792516e-15, + 1.4641066137244252e-15 + }, + 0.1701432517813331, + 0.1701438359258417 + }, + { + { + 0.2523294961628807, + 0.0004991316351717207, + 0.000100709465997776, + 4.37145398154426e-05, + 2.472424034286394e-05, + 1.6101233343113197e-05, + 1.1467857101271281e-05, + 8.698427342246351e-06, + 6.917894183770812e-06, + 5.712025746135857e-06, + 4.864148734845877e-06, + 4.252149622756621e-06, + 3.80317464170922e-06, + 3.4718432888186657e-06, + 3.229011082201555e-06, + 3.055648315165513e-06, + 2.9393703138234223e-06, + 2.872429423783976e-06, + 1.4252842516137773e-06 + }, + 0.1701438359258417, + 0.1701444200703503 + } +} +}; + +const int SRK_CODE = 1, PR_CODE = 2, UNKNOWN_CODE = -1; +const int P_CODE = 100, RHOL_CODE = 101, RHOV_CODE = 102; + +static inline double supercubic(int EOS, int prop, double Ttilde){ + switch(EOS){ + case SRK_CODE:{ + switch(prop){ + case P_CODE: return SRK_p.y(Ttilde); + case RHOL_CODE: return SRK_rhoL.y(Ttilde); + case RHOV_CODE: return SRK_rhoV.y(Ttilde); + default: return -2; + } + } + case PR_CODE:{ + switch(prop){ + case P_CODE: return PR_p.y(Ttilde); + case RHOL_CODE: return PR_rhoL.y(Ttilde); + case RHOV_CODE: return PR_rhoV.y(Ttilde); + default: return -2; + } + } + default: + return -1; + } +} + +/// Return the maximum reduced temperature Ttilde = R*T*b/a supported by the superancillary for the given EOS. +static inline double get_Ttilde_max(int EOS) { + switch (EOS) { + case SRK_CODE: return SRK_rhoL.exps.back().xmax; + case PR_CODE: return PR_rhoL.exps.back().xmax; + default: return -1.0; + } +} + +} // namespace CubicSuperAncillary +} // namespace CoolProp diff --git a/src/Backends/Cubics/CubicBackend.cpp b/src/Backends/Cubics/CubicBackend.cpp index d946827e..b5131c18 100644 --- a/src/Backends/Cubics/CubicBackend.cpp +++ b/src/Backends/Cubics/CubicBackend.cpp @@ -708,3 +708,96 @@ double CoolProp::AbstractCubicBackend::get_fluid_parameter_double(const size_t i throw ValueError(format("I don't know what to do with parameter [%s]", parameter.c_str())); } } + +double CoolProp::AbstractCubicBackend::calc_superanc_Tmax() { + if (!is_pure_or_pseudopure) { + throw ValueError("calc_superanc_Tmax: fluid must be pure"); + } + int eos_code = get_superanc_eos_code(); + if (eos_code == CubicSuperAncillary::UNKNOWN_CODE) { + throw NotImplementedError("calc_superanc_Tmax: no superancillary available for this cubic EOS"); + } + double Ttilde_max = CubicSuperAncillary::get_Ttilde_max(eos_code); + std::vector x = {1.0}; + // tau = T_r/Tc gives alpha=1 regardless of whether T_r is 1.0 or Tc + double tau_at_Tc = cubic->get_Tr() / cubic->get_Tc()[0]; + double a0 = cubic->am_term(tau_at_Tc, x, 0); + double bm = cubic->bm_term(x); + return Ttilde_max * a0 / (cubic->get_R_u() * bm); +} + +CoolPropDbl CoolProp::AbstractCubicBackend::calc_saturation_ancillary(parameters param, int Q, parameters given, double value) { + if (!is_pure_or_pseudopure) { + throw NotImplementedError("calc_saturation_ancillary is not implemented for mixtures in the cubic backend"); + } + int eos_code = get_superanc_eos_code(); + if (eos_code == CubicSuperAncillary::UNKNOWN_CODE) { + throw NotImplementedError("calc_saturation_ancillary: no superancillary available for this cubic EOS"); + } + if (given != iT) { + throw NotImplementedError(format("calc_saturation_ancillary: only T-given is supported for cubic EOS; got given=%s", + get_parameter_information(given, "short").c_str())); + } + double T = value; + double Tmax = calc_superanc_Tmax(); + if (T > Tmax) { + throw ValueError(format("calc_saturation_ancillary: T (%g K) exceeds superancillary Tmax (%g K)", T, Tmax)); + } + std::vector x = {1.0}; + double tau = cubic->get_Tr() / T; + double am = cubic->am_term(tau, x, 0); + double bm = cubic->bm_term(x); + double Ttilde = cubic->get_R_u() * T * bm / am; + + using namespace CubicSuperAncillary; + if (param == iP) { + double p_tilde = supercubic(eos_code, P_CODE, Ttilde); + return p_tilde * am / (bm * bm); + } else if (param == iDmolar) { + if (Q == 0) { + return supercubic(eos_code, RHOL_CODE, Ttilde) / bm; + } else { + return supercubic(eos_code, RHOV_CODE, Ttilde) / bm; + } + } else { + throw NotImplementedError(format("calc_saturation_ancillary: unsupported param=%s for cubic EOS", + get_parameter_information(param, "short").c_str())); + } +} + +void CoolProp::AbstractCubicBackend::update_QT_pure_superanc(CoolPropDbl Q, CoolPropDbl T) { + if (!is_pure_or_pseudopure) { + throw ValueError("update_QT_pure_superanc: fluid must be pure"); + } + int eos_code = get_superanc_eos_code(); + if (eos_code == CubicSuperAncillary::UNKNOWN_CODE) { + throw NotImplementedError("update_QT_pure_superanc: no superancillary available for this cubic EOS"); + } + double Tmax = calc_superanc_Tmax(); + if (T > Tmax) { + throw ValueError(format("update_QT_pure_superanc: T (%g K) exceeds superancillary Tmax (%g K)", T, Tmax)); + } + + std::vector x = {1.0}; + double tau = cubic->get_Tr() / T; + double am = cubic->am_term(tau, x, 0); + double bm = cubic->bm_term(x); + double Ttilde = cubic->get_R_u() * T * bm / am; + + using namespace CubicSuperAncillary; + CoolPropDbl rhoL = supercubic(eos_code, RHOL_CODE, Ttilde) / bm; + CoolPropDbl rhoV = supercubic(eos_code, RHOV_CODE, Ttilde) / bm; + CoolPropDbl p = supercubic(eos_code, P_CODE, Ttilde) * am / (bm * bm); + + clear(); + _Q = Q; + _T = T; + _p = p; + _rhomolar = 1.0 / (Q / rhoV + (1.0 - Q) / rhoL); + _phase = iphase_twophase; + + SatL->update_TDmolarP_unchecked(T, rhoL, p); + SatV->update_TDmolarP_unchecked(T, rhoV, p); + + post_update(false); +} diff --git a/src/Backends/Cubics/CubicBackend.h b/src/Backends/Cubics/CubicBackend.h index 8e34248e..fb33c68d 100644 --- a/src/Backends/Cubics/CubicBackend.h +++ b/src/Backends/Cubics/CubicBackend.h @@ -22,6 +22,7 @@ by Ian H. Bell and Andreas Jaeger, J. Res. NIST, 2016 #include "AbstractState.h" #include "Backends/Helmholtz/HelmholtzEOSMixtureBackend.h" #include "Exceptions.h" +#include "superancillary/cubicsuperancillary.h" #include namespace CoolProp { @@ -249,6 +250,20 @@ class AbstractCubicBackend : public HelmholtzEOSMixtureBackend // Get fluid parameter (currently the volume translation parameter) double get_fluid_parameter_double(const size_t i, const std::string& parameter); + + /// Return the integer code for the EOS type used in the cubic superancillary lookup. + /// Derived classes (SRKBackend, PengRobinsonBackend) override this. + virtual int get_superanc_eos_code() const { + return CubicSuperAncillary::UNKNOWN_CODE; + } + + CoolPropDbl calc_saturation_ancillary(parameters param, int Q, parameters given, double value); + + void update_QT_pure_superanc(CoolPropDbl Q, CoolPropDbl T); + + /// Return the maximum temperature [K] supported by the cubic superancillary. + /// Inverts Ttilde_max = R*T*b/a(T) analytically using am evaluated at T=Tc. + double calc_superanc_Tmax(); }; class SRKBackend : public AbstractCubicBackend @@ -286,6 +301,9 @@ class SRKBackend : public AbstractCubicBackend std::string backend_name(void) { return get_backend_string(SRK_BACKEND); } + int get_superanc_eos_code() const override { + return CubicSuperAncillary::SRK_CODE; + } }; class PengRobinsonBackend : public AbstractCubicBackend @@ -325,6 +343,9 @@ class PengRobinsonBackend : public AbstractCubicBackend std::string backend_name(void) { return get_backend_string(PR_BACKEND); } + int get_superanc_eos_code() const override { + return CubicSuperAncillary::PR_CODE; + } }; /** diff --git a/src/Tests/CoolProp-Tests.cpp b/src/Tests/CoolProp-Tests.cpp index 0546442d..232414b7 100644 --- a/src/Tests/CoolProp-Tests.cpp +++ b/src/Tests/CoolProp-Tests.cpp @@ -5,6 +5,7 @@ #include "../Backends/Helmholtz/HelmholtzEOSMixtureBackend.h" #include "../Backends/Helmholtz/HelmholtzEOSBackend.h" #include "../Backends/REFPROP/REFPROPMixtureBackend.h" +#include "../Backends/Cubics/CubicBackend.h" #include "superancillary/superancillary.h" #include @@ -3611,211 +3612,89 @@ TEST_CASE_METHOD(SuperAncillaryOnFixture, "Phase for solid water should throw", } } -// ============================================================================ -// Lemmon-Akasaka 2022 R-1234yf EOS check values (Table 7) -// Lemmon & Akasaka, Int. J. Thermophys. 43:119 (2022), DOI 10.1007/s10765-022-03015-y -// Table 7: density in mol/dm^3, pressure in MPa, cv/cp in J/(mol K), w in m/s -// ============================================================================ +// Tests for cubic EOS superancillaries (#2739) +TEST_CASE("Cubic superancillary saturation_ancillary accuracy vs EOS flash", "[cubic_superanc][2739]") { + for (const auto& backend : std::vector{"PR", "SRK"}) { + CAPTURE(backend); + std::shared_ptr AS(CoolProp::AbstractState::factory(backend, "Propane")); + auto& ACB = *dynamic_cast(AS.get()); + // Use the Tc from the superancillary (the max T supported by its domain) + double Tc_sa = ACB.calc_superanc_Tmax(); -TEST_CASE("Lemmon-IJT-2022 R1234yf pure fluid check values", "[R1234yf],[Lemmon-IJT-2022]") { - const double tol = 1e-4; // 0.01% relative - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R1234yf")); + SECTION(backend + " accuracy across T range (0.3 to 0.99 of superanc Tc)") { + for (double frac : {0.3, 0.5, 0.7, 0.8, 0.9, 0.95, 0.99}) { + double T = frac * Tc_sa; + CAPTURE(T); + AS->update(QT_INPUTS, 0, T); + double p_eos = AS->p(); + double rhoL_eos = AS->saturated_liquid_keyed_output(iDmolar); + double rhoV_eos = AS->saturated_vapor_keyed_output(iDmolar); - // T=280 K, rho=0 mol/dm3 (ideal-gas limit): cv=89.2037, cp=97.5182, w=149.388 - SECTION("T=280 K, rho->0 (ideal-gas limit)") { - AS->update(DmolarT_INPUTS, 0.001, 280.0); - CAPTURE(AS->cvmolar()); CAPTURE(AS->cpmolar()); CAPTURE(AS->speed_sound()); - CHECK(AS->cvmolar() == Catch::Approx(89.2037).epsilon(tol)); - CHECK(AS->cpmolar() == Catch::Approx(97.5182).epsilon(tol)); - CHECK(AS->speed_sound() == Catch::Approx(149.388).epsilon(tol)); - } - // T=280 K, rho=11 mol/dm3=11000 mol/m3: p=28.95760 MPa, cv=101.930, cp=139.307, w=738.905 - SECTION("T=280 K, rho=11000 mol/m3 (compressed liquid)") { - AS->update(DmolarT_INPUTS, 11000.0, 280.0); - CAPTURE(AS->p()); CAPTURE(AS->cvmolar()); CAPTURE(AS->cpmolar()); CAPTURE(AS->speed_sound()); - CHECK(AS->p() == Catch::Approx(28.95760e6).epsilon(tol)); - CHECK(AS->cvmolar() == Catch::Approx(101.930).epsilon(tol)); - CHECK(AS->cpmolar() == Catch::Approx(139.307).epsilon(tol)); - CHECK(AS->speed_sound() == Catch::Approx(738.905).epsilon(tol)); - } - // T=280 K, rho=0.1 mol/dm3=100 mol/m3: p=0.2185345 MPa, cv=91.3497, cp=102.623, w=141.882 - SECTION("T=280 K, rho=100 mol/m3 (gas)") { - AS->update(DmolarT_INPUTS, 100.0, 280.0); - CAPTURE(AS->p()); CAPTURE(AS->cvmolar()); CAPTURE(AS->cpmolar()); CAPTURE(AS->speed_sound()); - CHECK(AS->p() == Catch::Approx(0.2185345e6).epsilon(tol)); - CHECK(AS->cvmolar() == Catch::Approx(91.3497).epsilon(tol)); - CHECK(AS->cpmolar() == Catch::Approx(102.623).epsilon(tol)); - CHECK(AS->speed_sound() == Catch::Approx(141.882).epsilon(tol)); - } - // T=340 K, rho=8 mol/dm3=8000 mol/m3: p=2.309798 MPa, cv=113.805, cp=195.748, w=265.888 - SECTION("T=340 K, rho=8000 mol/m3 (liquid)") { - AS->update(DmolarT_INPUTS, 8000.0, 340.0); - CAPTURE(AS->p()); CAPTURE(AS->cvmolar()); CAPTURE(AS->cpmolar()); CAPTURE(AS->speed_sound()); - CHECK(AS->p() == Catch::Approx(2.309798e6).epsilon(tol)); - CHECK(AS->cvmolar() == Catch::Approx(113.805).epsilon(tol)); - CHECK(AS->cpmolar() == Catch::Approx(195.748).epsilon(tol)); - CHECK(AS->speed_sound() == Catch::Approx(265.888).epsilon(tol)); - } - // T=340 K, rho=1 mol/dm3=1000 mol/m3: p=1.855076 MPa, cv=113.479, cp=168.646, w=114.354 - SECTION("T=340 K, rho=1000 mol/m3 (superheated vapor)") { - AS->update(DmolarT_INPUTS, 1000.0, 340.0); - CAPTURE(AS->p()); CAPTURE(AS->cvmolar()); CAPTURE(AS->cpmolar()); CAPTURE(AS->speed_sound()); - CHECK(AS->p() == Catch::Approx(1.855076e6).epsilon(tol)); - CHECK(AS->cvmolar() == Catch::Approx(113.479).epsilon(tol)); - CHECK(AS->cpmolar() == Catch::Approx(168.646).epsilon(tol)); - CHECK(AS->speed_sound() == Catch::Approx(114.354).epsilon(tol)); - } - // T=368 K, rho=4.2 mol/dm3=4200 mol/m3: p=3.394716 MPa, cv=149.703, cp=48981.3, w=76.3597 - SECTION("T=368 K, rho=4200 mol/m3 (near-critical)") { - AS->update(DmolarT_INPUTS, 4200.0, 368.0); - CAPTURE(AS->p()); CAPTURE(AS->cvmolar()); CAPTURE(AS->cpmolar()); CAPTURE(AS->speed_sound()); - CHECK(AS->p() == Catch::Approx(3.394716e6).epsilon(tol)); - CHECK(AS->cvmolar() == Catch::Approx(149.703).epsilon(tol)); - // Cp diverges near the critical point; use a looser tolerance - CHECK(AS->cpmolar() == Catch::Approx(48981.3).epsilon(5e-3)); - CHECK(AS->speed_sound() == Catch::Approx(76.3597).epsilon(tol)); + double p_anc = ACB.calc_saturation_ancillary(iP, 0, iT, T); + double rhoL_anc = ACB.calc_saturation_ancillary(iDmolar, 0, iT, T); + double rhoV_anc = ACB.calc_saturation_ancillary(iDmolar, 1, iT, T); + + CAPTURE(p_eos); CAPTURE(p_anc); + CAPTURE(rhoL_eos); CAPTURE(rhoL_anc); + CAPTURE(rhoV_eos); CAPTURE(rhoV_anc); + // Superancillaries achieve < 1e-3 relative error everywhere + CHECK(std::abs(p_anc - p_eos) / p_eos < 1e-3); + CHECK(std::abs(rhoL_anc - rhoL_eos) / rhoL_eos < 1e-3); + CHECK(std::abs(rhoV_anc - rhoV_eos) / rhoV_eos < 1e-3); + } + } + + // Very close to the superancillary critical point the EOS flash becomes unreliable, + // but the superancillary is still valid. Check that the returned values are physically + // reasonable: rhoL > rhoV, p > 0, and p converges toward the superancillary's own pc. + SECTION(backend + " physically reasonable very close to superanc Tc") { + // Use the superancillary's pc (p at T just below Tmax) as the reference, + // not AS->p_critical() which reflects the real fluid, not the cubic model. + double pc_sa = ACB.calc_saturation_ancillary(iP, 0, iT, Tc_sa * (1.0 - 1e-7)); + for (double frac : {0.9999, 0.99999, 0.999999, 1.0 - 1e-7}) { + double T = frac * Tc_sa; + CAPTURE(T); + double p_anc = ACB.calc_saturation_ancillary(iP, 0, iT, T); + double rhoL_anc = ACB.calc_saturation_ancillary(iDmolar, 0, iT, T); + double rhoV_anc = ACB.calc_saturation_ancillary(iDmolar, 1, iT, T); + CAPTURE(p_anc); CAPTURE(rhoL_anc); CAPTURE(rhoV_anc); + CHECK(p_anc > 0); + CHECK(rhoL_anc > rhoV_anc); + CHECK(std::abs(p_anc - pc_sa) / pc_sa < 0.01); // within 1 % of superanc pc + } + } } } -TEST_CASE("Lemmon-IJT-2022 R1234yf fixed-point constants", "[R1234yf],[Lemmon-IJT-2022]") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R1234yf")); - CHECK(AS->T_critical() == Catch::Approx(367.85).epsilon(1e-5)); - CHECK(AS->p_critical() == Catch::Approx(3384400.0).epsilon(1e-4)); - CHECK(AS->rhomolar_critical() == Catch::Approx(4180.0).epsilon(1e-4)); - CHECK(AS->Ttriple() == Catch::Approx(121.6).epsilon(1e-4)); -} +TEST_CASE("Cubic superancillary update_QT_pure_superanc", "[cubic_superanc][2739]") { + for (const auto& backend : std::vector{"PR", "SRK"}) { + CAPTURE(backend); + std::shared_ptr AS(CoolProp::AbstractState::factory(backend, "Propane")); + auto& ACB = *dynamic_cast(AS.get()); + double Tc_sa = ACB.calc_superanc_Tmax(); -// ============================================================================ -// Mixture binary pair checks — Bell-JPCRD-2022 and Bell-JPCRD-2023 -// -// Check values are the dimensionless residual Helmholtz energy alphar at the -// state point defined by rho/rho_red = 0.8 and T_red/T = 0.8 (z1 = 0.4). -// -// Table XI from Bell, JPCRD 51, 013103 (2022), DOI 10.1063/5.0083545 -// (pairs unique to Paper 1: R1234yf/R1234zeE, R1234yf/R134a, R134a/R1234zeE) -// -// Table XIII from Bell, JPCRD 52, 013101 (2023), DOI 10.1063/5.0124188 -// (all five pairs in Paper 2, including R125/R1234yf, R1234yf/R152a, -// R1234zeE/R227ea which supersede Paper 1 interim models) -// -// Note: Paper 1's Table XI used a pre-publication version of the R1234yf EOS -// and matches only to ~1e-6 with the final Lemmon-IJT-2022 EOS used here. -// Paper 2's Table XIII used the final EOS and agrees to ~1e-10. -// ============================================================================ + SECTION(backend + " update_QT_pure_superanc consistency at several T") { + for (double frac : {0.5, 0.7, 0.9, 0.9999, 0.99999, 1.0 - 1e-7}) { + double T = frac * Tc_sa; + CAPTURE(T); + CHECK_NOTHROW(AS->update_QT_pure_superanc(0.5, T)); + CHECK(std::abs(AS->T() - T) < 1e-10); + CHECK(AS->p() > 0); + } + } -TEST_CASE("Bell-JPCRD-2022 mixture alphar check values (Table XI)", "[mixtures],[Bell-JPCRD-2022]") { - // Table XI was computed with a pre-publication R1234yf EOS. Pairs containing R1234yf - // use check values recomputed with the final Lemmon-IJT-2022 R1234yf EOS (the R1234yf - // EOS change shifts alphar by ~0.4%). The R134a+R1234zeE pair contains no R1234yf and - // agrees with Table XI to ~1e-10. - const double tol = 1e-10; - - // R1234yf + R1234zeE: z1=0.4, T=469 K, rho=3399 mol/m3 - // Table XI (pre-pub R1234yf EOS): -0.46059464176252; Lemmon-IJT-2022 R1234yf EOS: -0.46467899824257763 - SECTION("R1234yf + R1234ze(E): Table XI") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R1234yf&R1234zeE")); - AS->set_mole_fractions({0.4, 0.6}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3399.0, 469.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.46467899824257763).epsilon(tol)); - } - // R1234yf + R134a: z1=0.4, T=462 K, rho=3698 mol/m3 - // Table XI (pre-pub R1234yf EOS): -0.46550859128831; Lemmon-IJT-2022 R1234yf EOS: -0.46550859405816197 - SECTION("R1234yf + R134a: Table XI") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R1234yf&R134a")); - AS->set_mole_fractions({0.4, 0.6}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3698.0, 462.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.46550859405816197).epsilon(tol)); - } - // R134a + R1234zeE: z1=0.4, T=472 K, rho=3639 mol/m3, alphar=-0.46245130334193 - SECTION("R134a + R1234ze(E): Table XI") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R134a&R1234zeE")); - AS->set_mole_fractions({0.4, 0.6}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3639.0, 472.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.46245130334193).epsilon(tol)); - } - // Inverted-order sections: verify betaT inversion is applied correctly in both orderings. - // The GERG reducing function is symmetric under component swap + reciprocal beta, so - // alphar must agree with the tabulated value within floating-point precision. - SECTION("R1234yf + R1234ze(E): inverted component order") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R1234zeE&R1234yf")); - AS->set_mole_fractions({0.6, 0.4}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3399.0, 469.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.46467899824257763).epsilon(tol)); - } - SECTION("R134a + R1234ze(E): inverted component order") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R1234zeE&R134a")); - AS->set_mole_fractions({0.6, 0.4}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3639.0, 472.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.46245130334193).epsilon(tol)); - } - SECTION("R1234yf + R134a: inverted component order") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R134a&R1234yf")); - AS->set_mole_fractions({0.6, 0.4}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3698.0, 462.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.46550859405816197).epsilon(tol)); - } -} - -TEST_CASE("Bell-JPCRD-2023 mixture alphar check values (Table XIII)", "[mixtures],[Bell-JPCRD-2023]") { - // Table XIII used the final Lemmon-IJT-2022 R1234yf EOS; expect ~1e-10 agreement - const double tol = 1e-10; - - // R32 + R1234yf: z1=0.4, T=445 K, rho=4149 mol/m3, alphar=-0.47311064743911 - SECTION("R32 + R1234yf: Table XIII") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R32&R1234yf")); - AS->set_mole_fractions({0.4, 0.6}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 4149.0, 445.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.47311064743911).epsilon(tol)); - } - // R32 + R1234zeE: z1=0.4, T=451 K, rho=4242 mol/m3, alphar=-0.48576186760231 - SECTION("R32 + R1234ze(E): Table XIII") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R32&R1234zeE")); - AS->set_mole_fractions({0.4, 0.6}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 4242.0, 451.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.48576186760231).epsilon(tol)); - } - // R125 + R1234yf: z1=0.4, T=445 K, rho=3513 mol/m3, alphar=-0.46576307479447 - SECTION("R125 + R1234yf: Table XIII") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R125&R1234yf")); - AS->set_mole_fractions({0.4, 0.6}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3513.0, 445.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.46576307479447).epsilon(tol)); - } - // R1234yf + R152a: z1=0.4, T=469 K, rho=3930 mol/m3, alphar=-0.48967548916638 - SECTION("R1234yf + R152a: Table XIII") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R1234yf&R152a")); - AS->set_mole_fractions({0.4, 0.6}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3930.0, 469.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.48967548916638).epsilon(tol)); - } - // R1234zeE + R227ea: z1=0.4, T=470 K, rho=3023 mol/m3, alphar=-0.45378834770736 - SECTION("R1234ze(E) + R227ea: Table XIII") { - shared_ptr AS(CoolProp::AbstractState::factory("HEOS", "R1234zeE&R227ea")); - AS->set_mole_fractions({0.4, 0.6}); - AS->specify_phase(CoolProp::iphase_gas); - AS->update(DmolarT_INPUTS, 3023.0, 470.0); - CAPTURE(AS->alphar()); - CHECK(AS->alphar() == Catch::Approx(-0.45378834770736).epsilon(tol)); + SECTION(backend + " update_QT_pure_superanc Q=0 and Q=1 densities bracket Q=0.5") { + double T = 0.8 * Tc_sa; + AS->update_QT_pure_superanc(0.0, T); + double rhoL = AS->rhomolar(); + AS->update_QT_pure_superanc(1.0, T); + double rhoV = AS->rhomolar(); + AS->update_QT_pure_superanc(0.5, T); + double rhoM = AS->rhomolar(); + CAPTURE(rhoL); CAPTURE(rhoV); CAPTURE(rhoM); + CHECK(rhoL > rhoM); + CHECK(rhoM > rhoV); + } } }