00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028 #ifndef OPM_TABULATED_COMPONENT_HPP
00029 #define OPM_TABULATED_COMPONENT_HPP
00030
00031 #include <cmath>
00032 #include <limits>
00033 #include <cassert>
00034 #include <iostream>
00035
00036 #include <opm/common/Exceptions.hpp>
00037 #include <opm/common/ErrorMacros.hpp>
00038
00039 #include <opm/material/common/MathToolbox.hpp>
00040
00041 namespace Opm {
00057 template <class ScalarT, class RawComponent, bool useVaporPressure=true>
00058 class TabulatedComponent
00059 {
00060 public:
00061 typedef ScalarT Scalar;
00062
00063 static const bool isTabulated = true;
00064
00075 static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp,
00076 Scalar pressMin, Scalar pressMax, unsigned nPress)
00077 {
00078 tempMin_ = tempMin;
00079 tempMax_ = tempMax;
00080 nTemp_ = nTemp;
00081 pressMin_ = pressMin;
00082 pressMax_ = pressMax;
00083 nPress_ = nPress;
00084 nDensity_ = nPress_;
00085
00086
00087 vaporPressure_ = new Scalar[nTemp_];
00088 minGasDensity__ = new Scalar[nTemp_];
00089 maxGasDensity__ = new Scalar[nTemp_];
00090 minLiquidDensity__ = new Scalar[nTemp_];
00091 maxLiquidDensity__ = new Scalar[nTemp_];
00092
00093 gasEnthalpy_ = new Scalar[nTemp_*nPress_];
00094 liquidEnthalpy_ = new Scalar[nTemp_*nPress_];
00095 gasHeatCapacity_ = new Scalar[nTemp_*nPress_];
00096 liquidHeatCapacity_ = new Scalar[nTemp_*nPress_];
00097 gasDensity_ = new Scalar[nTemp_*nPress_];
00098 liquidDensity_ = new Scalar[nTemp_*nPress_];
00099 gasViscosity_ = new Scalar[nTemp_*nPress_];
00100 liquidViscosity_ = new Scalar[nTemp_*nPress_];
00101 gasThermalConductivity_ = new Scalar[nTemp_*nPress_];
00102 liquidThermalConductivity_ = new Scalar[nTemp_*nPress_];
00103 gasPressure_ = new Scalar[nTemp_*nDensity_];
00104 liquidPressure_ = new Scalar[nTemp_*nDensity_];
00105
00106 assert(std::numeric_limits<Scalar>::has_quiet_NaN);
00107 Scalar NaN = std::numeric_limits<Scalar>::quiet_NaN();
00108
00109
00110 for (unsigned iT = 0; iT < nTemp_; ++ iT) {
00111 Scalar temperature = iT * (tempMax_ - tempMin_)/(nTemp_ - 1) + tempMin_;
00112
00113 try { vaporPressure_[iT] = RawComponent::vaporPressure(temperature); }
00114 catch (const std::exception&) { vaporPressure_[iT] = NaN; }
00115
00116 Scalar pgMax = maxGasPressure_(iT);
00117 Scalar pgMin = minGasPressure_(iT);
00118
00119
00120 for (unsigned iP = 0; iP < nPress_; ++ iP) {
00121 Scalar pressure = iP * (pgMax - pgMin)/(nPress_ - 1) + pgMin;
00122
00123 unsigned i = iT + iP*nTemp_;
00124
00125 try { gasEnthalpy_[i] = RawComponent::gasEnthalpy(temperature, pressure); }
00126 catch (const std::exception&) { gasEnthalpy_[i] = NaN; }
00127
00128 try { gasHeatCapacity_[i] = RawComponent::gasHeatCapacity(temperature, pressure); }
00129 catch (const std::exception&) { gasHeatCapacity_[i] = NaN; }
00130
00131 try { gasDensity_[i] = RawComponent::gasDensity(temperature, pressure); }
00132 catch (const std::exception&) { gasDensity_[i] = NaN; }
00133
00134 try { gasViscosity_[i] = RawComponent::gasViscosity(temperature, pressure); }
00135 catch (const std::exception&) { gasViscosity_[i] = NaN; }
00136
00137 try { gasThermalConductivity_[i] = RawComponent::gasThermalConductivity(temperature, pressure); }
00138 catch (const std::exception&) { gasThermalConductivity_[i] = NaN; }
00139 };
00140
00141 Scalar plMin = minLiquidPressure_(iT);
00142 Scalar plMax = maxLiquidPressure_(iT);
00143 for (unsigned iP = 0; iP < nPress_; ++ iP) {
00144 Scalar pressure = iP * (plMax - plMin)/(nPress_ - 1) + plMin;
00145
00146 unsigned i = iT + iP*nTemp_;
00147
00148 try { liquidEnthalpy_[i] = RawComponent::liquidEnthalpy(temperature, pressure); }
00149 catch (const std::exception&) { liquidEnthalpy_[i] = NaN; }
00150
00151 try { liquidHeatCapacity_[i] = RawComponent::liquidHeatCapacity(temperature, pressure); }
00152 catch (const std::exception&) { liquidHeatCapacity_[i] = NaN; }
00153
00154 try { liquidDensity_[i] = RawComponent::liquidDensity(temperature, pressure); }
00155 catch (const std::exception&) { liquidDensity_[i] = NaN; }
00156
00157 try { liquidViscosity_[i] = RawComponent::liquidViscosity(temperature, pressure); }
00158 catch (const std::exception&) { liquidViscosity_[i] = NaN; }
00159
00160 try { liquidThermalConductivity_[i] = RawComponent::liquidThermalConductivity(temperature, pressure); }
00161 catch (const std::exception&) { liquidThermalConductivity_[i] = NaN; }
00162 }
00163 }
00164
00165
00166 for (unsigned iT = 0; iT < nTemp_; ++ iT) {
00167 Scalar temperature = iT * (tempMax_ - tempMin_)/(nTemp_ - 1) + tempMin_;
00168
00169
00170
00171 minGasDensity__[iT] = RawComponent::gasDensity(temperature, minGasPressure_(iT));
00172 if (iT < nTemp_ - 1)
00173 maxGasDensity__[iT] = RawComponent::gasDensity(temperature, maxGasPressure_(iT + 1));
00174 else
00175 maxGasDensity__[iT] = RawComponent::gasDensity(temperature, maxGasPressure_(iT));
00176
00177
00178 for (unsigned iRho = 0; iRho < nDensity_; ++ iRho) {
00179 Scalar density =
00180 Scalar(iRho)/(nDensity_ - 1) *
00181 (maxGasDensity__[iT] - minGasDensity__[iT])
00182 +
00183 minGasDensity__[iT];
00184
00185 unsigned i = iT + iRho*nTemp_;
00186
00187 try { gasPressure_[i] = RawComponent::gasPressure(temperature, density); }
00188 catch (const std::exception&) { gasPressure_[i] = NaN; };
00189 };
00190
00191
00192
00193 minLiquidDensity__[iT] = RawComponent::liquidDensity(temperature, minLiquidPressure_(iT));
00194 if (iT < nTemp_ - 1)
00195 maxLiquidDensity__[iT] = RawComponent::liquidDensity(temperature, maxLiquidPressure_(iT + 1));
00196 else
00197 maxLiquidDensity__[iT] = RawComponent::liquidDensity(temperature, maxLiquidPressure_(iT));
00198
00199
00200 for (unsigned iRho = 0; iRho < nDensity_; ++ iRho) {
00201 Scalar density =
00202 Scalar(iRho)/(nDensity_ - 1) *
00203 (maxLiquidDensity__[iT] - minLiquidDensity__[iT])
00204 +
00205 minLiquidDensity__[iT];
00206
00207 unsigned i = iT + iRho*nTemp_;
00208
00209 try { liquidPressure_[i] = RawComponent::liquidPressure(temperature, density); }
00210 catch (const std::exception&) { liquidPressure_[i] = NaN; };
00211 };
00212 }
00213 }
00214
00218 static const char* name()
00219 { return RawComponent::name(); }
00220
00224 static Scalar molarMass()
00225 { return RawComponent::molarMass(); }
00226
00230 static Scalar criticalTemperature()
00231 { return RawComponent::criticalTemperature(); }
00232
00236 static Scalar criticalPressure()
00237 { return RawComponent::criticalPressure(); }
00238
00242 static Scalar tripleTemperature()
00243 { return RawComponent::tripleTemperature(); }
00244
00248 static Scalar triplePressure()
00249 { return RawComponent::triplePressure(); }
00250
00257 template <class Evaluation>
00258 static Evaluation vaporPressure(const Evaluation& temperature)
00259 {
00260 const Evaluation& result = interpolateT_(vaporPressure_, temperature);
00261 if (std::isnan(Opm::scalarValue(result)))
00262 return RawComponent::vaporPressure(temperature);
00263 return result;
00264 }
00265
00272 template <class Evaluation>
00273 static Evaluation gasEnthalpy(const Evaluation& temperature, const Evaluation& pressure)
00274 {
00275 const Evaluation& result = interpolateGasTP_(gasEnthalpy_,
00276 temperature,
00277 pressure);
00278 if (std::isnan(Opm::scalarValue(result)))
00279 return RawComponent::gasEnthalpy(temperature, pressure);
00280 return result;
00281 }
00282
00289 template <class Evaluation>
00290 static Evaluation liquidEnthalpy(const Evaluation& temperature, const Evaluation& pressure)
00291 {
00292 const Evaluation& result = interpolateLiquidTP_(liquidEnthalpy_,
00293 temperature,
00294 pressure);
00295 if (std::isnan(Opm::scalarValue(result)))
00296 return RawComponent::liquidEnthalpy(temperature, pressure);
00297 return result;
00298 }
00299
00306 template <class Evaluation>
00307 static Evaluation gasHeatCapacity(const Evaluation& temperature, const Evaluation& pressure)
00308 {
00309 const Evaluation& result = interpolateGasTP_(gasHeatCapacity_,
00310 temperature,
00311 pressure);
00312 if (std::isnan(Opm::scalarValue(result)))
00313 return RawComponent::gasHeatCapacity(temperature, pressure);
00314 return result;
00315 }
00316
00323 template <class Evaluation>
00324 static Evaluation liquidHeatCapacity(const Evaluation& temperature, const Evaluation& pressure)
00325 {
00326 const Evaluation& result = interpolateLiquidTP_(liquidHeatCapacity_,
00327 temperature,
00328 pressure);
00329 if (std::isnan(Opm::scalarValue(result)))
00330 return RawComponent::liquidHeatCapacity(temperature, pressure);
00331 return result;
00332 }
00333
00340 template <class Evaluation>
00341 static Evaluation gasInternalEnergy(const Evaluation& temperature, const Evaluation& pressure)
00342 { return gasEnthalpy(temperature, pressure) - pressure/gasDensity(temperature, pressure); }
00343
00350 template <class Evaluation>
00351 static Evaluation liquidInternalEnergy(const Evaluation& temperature, const Evaluation& pressure)
00352 { return liquidEnthalpy(temperature, pressure) - pressure/liquidDensity(temperature, pressure); }
00353
00360 template <class Evaluation>
00361 static Evaluation gasPressure(const Evaluation& temperature, Scalar density)
00362 {
00363 const Evaluation& result = interpolateGasTRho_(gasPressure_,
00364 temperature,
00365 density);
00366 if (std::isnan(Opm::scalarValue(result)))
00367 return RawComponent::gasPressure(temperature,
00368 density);
00369 return result;
00370 }
00371
00378 template <class Evaluation>
00379 static Evaluation liquidPressure(const Evaluation& temperature, Scalar density)
00380 {
00381 const Evaluation& result = interpolateLiquidTRho_(liquidPressure_,
00382 temperature,
00383 density);
00384 if (std::isnan(Opm::scalarValue(result)))
00385 return RawComponent::liquidPressure(temperature,
00386 density);
00387 return result;
00388 }
00389
00393 static bool gasIsCompressible()
00394 { return RawComponent::gasIsCompressible(); }
00395
00399 static bool liquidIsCompressible()
00400 { return RawComponent::liquidIsCompressible(); }
00401
00405 static bool gasIsIdeal()
00406 { return RawComponent::gasIsIdeal(); }
00407
00408
00416 template <class Evaluation>
00417 static Evaluation gasDensity(const Evaluation& temperature, const Evaluation& pressure)
00418 {
00419 const Evaluation& result = interpolateGasTP_(gasDensity_,
00420 temperature,
00421 pressure);
00422 if (std::isnan(Opm::scalarValue(result)))
00423 return RawComponent::gasDensity(temperature, pressure);
00424 return result;
00425 }
00426
00434 template <class Evaluation>
00435 static Evaluation liquidDensity(const Evaluation& temperature, const Evaluation& pressure)
00436 {
00437 const Evaluation& result = interpolateLiquidTP_(liquidDensity_,
00438 temperature,
00439 pressure);
00440 if (std::isnan(Opm::scalarValue(result)))
00441 return RawComponent::liquidDensity(temperature, pressure);
00442 return result;
00443 }
00444
00451 template <class Evaluation>
00452 static Evaluation gasViscosity(const Evaluation& temperature, const Evaluation& pressure)
00453 {
00454 const Evaluation& result = interpolateGasTP_(gasViscosity_,
00455 temperature,
00456 pressure);
00457 if (std::isnan(Opm::scalarValue(result)))
00458 return RawComponent::gasViscosity(temperature, pressure);
00459 return result;
00460 }
00461
00468 template <class Evaluation>
00469 static Evaluation liquidViscosity(const Evaluation& temperature, const Evaluation& pressure)
00470 {
00471 const Evaluation& result = interpolateLiquidTP_(liquidViscosity_,
00472 temperature,
00473 pressure);
00474 if (std::isnan(Opm::scalarValue(result)))
00475 return RawComponent::liquidViscosity(temperature, pressure);
00476 return result;
00477 }
00478
00485 template <class Evaluation>
00486 static Evaluation gasThermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
00487 {
00488 const Evaluation& result = interpolateGasTP_(gasThermalConductivity_,
00489 temperature,
00490 pressure);
00491 if (std::isnan(Opm::scalarValue(result)))
00492 return RawComponent::gasThermalConductivity(temperature, pressure);
00493 return result;
00494 }
00495
00502 template <class Evaluation>
00503 static Evaluation liquidThermalConductivity(const Evaluation& temperature, const Evaluation& pressure)
00504 {
00505 const Evaluation& result = interpolateLiquidTP_(liquidThermalConductivity_,
00506 temperature,
00507 pressure);
00508 if (std::isnan(Opm::scalarValue(result)))
00509 return RawComponent::liquidThermalConductivity(temperature, pressure);
00510 return result;
00511 }
00512
00513 private:
00514
00515 template <class Evaluation>
00516 static Evaluation interpolateT_(const Scalar* values, const Evaluation& T)
00517 {
00518 Evaluation alphaT = tempIdx_(T);
00519 if (alphaT < 0 || alphaT >= nTemp_ - 1)
00520 return std::numeric_limits<Scalar>::quiet_NaN();
00521
00522 size_t iT = static_cast<size_t>(Opm::scalarValue(alphaT));
00523 alphaT -= iT;
00524
00525 return
00526 values[iT ]*(1 - alphaT) +
00527 values[iT + 1]*( alphaT);
00528 }
00529
00530
00531
00532 template <class Evaluation>
00533 static Evaluation interpolateLiquidTP_(const Scalar* values, const Evaluation& T, const Evaluation& p)
00534 {
00535 Evaluation alphaT = tempIdx_(T);
00536 if (alphaT < 0 || alphaT >= nTemp_ - 1)
00537 return std::numeric_limits<Scalar>::quiet_NaN();
00538
00539 size_t iT = static_cast<size_t>(Opm::scalarValue(alphaT));
00540 alphaT -= iT;
00541
00542 Evaluation alphaP1 = pressLiquidIdx_(p, iT);
00543 Evaluation alphaP2 = pressLiquidIdx_(p, iT + 1);
00544
00545 size_t iP1 =
00546 static_cast<size_t>(
00547 std::max<int>(0, std::min(static_cast<int>(nPress_) - 2,
00548 static_cast<int>(Opm::scalarValue(alphaP1)))));
00549 size_t iP2 =
00550 static_cast<size_t>(
00551 std::max(0, std::min(static_cast<int>(nPress_) - 2,
00552 static_cast<int>(Opm::scalarValue(alphaP2)))));
00553 alphaP1 -= iP1;
00554 alphaP2 -= iP2;
00555
00556 return
00557 values[(iT ) + (iP1 )*nTemp_]*(1 - alphaT)*(1 - alphaP1) +
00558 values[(iT ) + (iP1 + 1)*nTemp_]*(1 - alphaT)*( alphaP1) +
00559 values[(iT + 1) + (iP2 )*nTemp_]*( alphaT)*(1 - alphaP2) +
00560 values[(iT + 1) + (iP2 + 1)*nTemp_]*( alphaT)*( alphaP2);
00561 }
00562
00563
00564
00565 template <class Evaluation>
00566 static Evaluation interpolateGasTP_(const Scalar* values, const Evaluation& T, const Evaluation& p)
00567 {
00568 Evaluation alphaT = tempIdx_(T);
00569 if (alphaT < 0 || alphaT >= nTemp_ - 1)
00570 return std::numeric_limits<Scalar>::quiet_NaN();
00571
00572 size_t iT =
00573 static_cast<size_t>(
00574 std::max(0, std::min(static_cast<int>(nTemp_) - 2,
00575 static_cast<int>(Opm::scalarValue(alphaT)))));
00576 alphaT -= iT;
00577
00578 Evaluation alphaP1 = pressGasIdx_(p, iT);
00579 Evaluation alphaP2 = pressGasIdx_(p, iT + 1);
00580 size_t iP1 =
00581 static_cast<size_t>(
00582 std::max(0, std::min(static_cast<int>(nPress_) - 2,
00583 static_cast<int>(Opm::scalarValue(alphaP1)))));
00584 size_t iP2 =
00585 static_cast<size_t>(
00586 std::max(0, std::min(static_cast<int>(nPress_) - 2,
00587 static_cast<int>(Opm::scalarValue(alphaP2)))));
00588 alphaP1 -= iP1;
00589 alphaP2 -= iP2;
00590
00591 return
00592 values[(iT ) + (iP1 )*nTemp_]*(1 - alphaT)*(1 - alphaP1) +
00593 values[(iT ) + (iP1 + 1)*nTemp_]*(1 - alphaT)*( alphaP1) +
00594 values[(iT + 1) + (iP2 )*nTemp_]*( alphaT)*(1 - alphaP2) +
00595 values[(iT + 1) + (iP2 + 1)*nTemp_]*( alphaT)*( alphaP2);
00596 }
00597
00598
00599
00600 template <class Evaluation>
00601 static Evaluation interpolateGasTRho_(const Scalar* values, const Evaluation& T, const Evaluation& rho)
00602 {
00603 Evaluation alphaT = tempIdx_(T);
00604 unsigned iT = std::max(0,
00605 std::min(static_cast<int>(nTemp_ - 2),
00606 static_cast<int>(alphaT)));
00607 alphaT -= iT;
00608
00609 Evaluation alphaP1 = densityGasIdx_(rho, iT);
00610 Evaluation alphaP2 = densityGasIdx_(rho, iT + 1);
00611 unsigned iP1 =
00612 std::max(0,
00613 std::min(static_cast<int>(nDensity_ - 2),
00614 static_cast<int>(alphaP1)));
00615 unsigned iP2 =
00616 std::max(0,
00617 std::min(static_cast<int>(nDensity_ - 2),
00618 static_cast<int>(alphaP2)));
00619 alphaP1 -= iP1;
00620 alphaP2 -= iP2;
00621
00622 return
00623 values[(iT ) + (iP1 )*nTemp_]*(1 - alphaT)*(1 - alphaP1) +
00624 values[(iT ) + (iP1 + 1)*nTemp_]*(1 - alphaT)*( alphaP1) +
00625 values[(iT + 1) + (iP2 )*nTemp_]*( alphaT)*(1 - alphaP2) +
00626 values[(iT + 1) + (iP2 + 1)*nTemp_]*( alphaT)*( alphaP2);
00627 }
00628
00629
00630
00631 template <class Evaluation>
00632 static Evaluation interpolateLiquidTRho_(const Scalar* values, const Evaluation& T, const Evaluation& rho)
00633 {
00634 Evaluation alphaT = tempIdx_(T);
00635 unsigned iT = std::max<int>(0, std::min<int>(nTemp_ - 2, static_cast<int>(alphaT)));
00636 alphaT -= iT;
00637
00638 Evaluation alphaP1 = densityLiquidIdx_(rho, iT);
00639 Evaluation alphaP2 = densityLiquidIdx_(rho, iT + 1);
00640 unsigned iP1 = std::max<int>(0, std::min<int>(nDensity_ - 2, static_cast<int>(alphaP1)));
00641 unsigned iP2 = std::max<int>(0, std::min<int>(nDensity_ - 2, static_cast<int>(alphaP2)));
00642 alphaP1 -= iP1;
00643 alphaP2 -= iP2;
00644
00645 return
00646 values[(iT ) + (iP1 )*nTemp_]*(1 - alphaT)*(1 - alphaP1) +
00647 values[(iT ) + (iP1 + 1)*nTemp_]*(1 - alphaT)*( alphaP1) +
00648 values[(iT + 1) + (iP2 )*nTemp_]*( alphaT)*(1 - alphaP2) +
00649 values[(iT + 1) + (iP2 + 1)*nTemp_]*( alphaT)*( alphaP2);
00650 }
00651
00652
00653
00654 template <class Evaluation>
00655 static Evaluation tempIdx_(const Evaluation& temperature)
00656 {
00657 return (nTemp_ - 1)*(temperature - tempMin_)/(tempMax_ - tempMin_);
00658 }
00659
00660
00661 template <class Evaluation>
00662 static Evaluation pressLiquidIdx_(const Evaluation& pressure, size_t tempIdx)
00663 {
00664 Scalar plMin = minLiquidPressure_(tempIdx);
00665 Scalar plMax = maxLiquidPressure_(tempIdx);
00666
00667 return (nPress_ - 1)*(pressure - plMin)/(plMax - plMin);
00668 }
00669
00670
00671 template <class Evaluation>
00672 static Evaluation pressGasIdx_(const Evaluation& pressure, size_t tempIdx)
00673 {
00674 Scalar pgMin = minGasPressure_(tempIdx);
00675 Scalar pgMax = maxGasPressure_(tempIdx);
00676
00677 return (nPress_ - 1)*(pressure - pgMin)/(pgMax - pgMin);
00678 }
00679
00680
00681 template <class Evaluation>
00682 static Evaluation densityLiquidIdx_(const Evaluation& density, size_t tempIdx)
00683 {
00684 Scalar densityMin = minLiquidDensity_(tempIdx);
00685 Scalar densityMax = maxLiquidDensity_(tempIdx);
00686 return (nDensity_ - 1) * (density - densityMin)/(densityMax - densityMin);
00687 }
00688
00689
00690 template <class Evaluation>
00691 static Evaluation densityGasIdx_(const Evaluation& density, size_t tempIdx)
00692 {
00693 Scalar densityMin = minGasDensity_(tempIdx);
00694 Scalar densityMax = maxGasDensity_(tempIdx);
00695 return (nDensity_ - 1) * (density - densityMin)/(densityMax - densityMin);
00696 }
00697
00698
00699
00700 static Scalar minLiquidPressure_(size_t tempIdx)
00701 {
00702 if (!useVaporPressure)
00703 return pressMin_;
00704 else
00705 return std::max<Scalar>(pressMin_, vaporPressure_[tempIdx] / 1.1);
00706 }
00707
00708
00709
00710 static Scalar maxLiquidPressure_(size_t tempIdx)
00711 {
00712 if (!useVaporPressure)
00713 return pressMax_;
00714 else
00715 return std::max<Scalar>(pressMax_, vaporPressure_[tempIdx] * 1.1);
00716 }
00717
00718
00719
00720 static Scalar minGasPressure_(size_t tempIdx)
00721 {
00722 if (!useVaporPressure)
00723 return pressMin_;
00724 else
00725 return std::min<Scalar>(pressMin_, vaporPressure_[tempIdx] / 1.1 );
00726 }
00727
00728
00729
00730 static Scalar maxGasPressure_(size_t tempIdx)
00731 {
00732 if (!useVaporPressure)
00733 return pressMax_;
00734 else
00735 return std::min<Scalar>(pressMax_, vaporPressure_[tempIdx] * 1.1);
00736 }
00737
00738
00739
00740
00741 static Scalar minLiquidDensity_(size_t tempIdx)
00742 { return minLiquidDensity__[tempIdx]; }
00743
00744
00745
00746 static Scalar maxLiquidDensity_(size_t tempIdx)
00747 { return maxLiquidDensity__[tempIdx]; }
00748
00749
00750
00751 static Scalar minGasDensity_(size_t tempIdx)
00752 { return minGasDensity__[tempIdx]; }
00753
00754
00755
00756 static Scalar maxGasDensity_(size_t tempIdx)
00757 { return maxGasDensity__[tempIdx]; }
00758
00759
00760 static Scalar* vaporPressure_;
00761
00762 static Scalar* minLiquidDensity__;
00763 static Scalar* maxLiquidDensity__;
00764
00765 static Scalar* minGasDensity__;
00766 static Scalar* maxGasDensity__;
00767
00768
00769
00770 static Scalar* gasEnthalpy_;
00771 static Scalar* liquidEnthalpy_;
00772
00773 static Scalar* gasHeatCapacity_;
00774 static Scalar* liquidHeatCapacity_;
00775
00776 static Scalar* gasDensity_;
00777 static Scalar* liquidDensity_;
00778
00779 static Scalar* gasViscosity_;
00780 static Scalar* liquidViscosity_;
00781
00782 static Scalar* gasThermalConductivity_;
00783 static Scalar* liquidThermalConductivity_;
00784
00785
00786
00787 static Scalar* gasPressure_;
00788 static Scalar* liquidPressure_;
00789
00790
00791 static Scalar tempMin_;
00792 static Scalar tempMax_;
00793 static unsigned nTemp_;
00794
00795 static Scalar pressMin_;
00796 static Scalar pressMax_;
00797 static unsigned nPress_;
00798
00799 static Scalar densityMin_;
00800 static Scalar densityMax_;
00801 static unsigned nDensity_;
00802 };
00803
00804 template <class Scalar, class RawComponent, bool useVaporPressure>
00805 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::vaporPressure_;
00806 template <class Scalar, class RawComponent, bool useVaporPressure>
00807 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::minLiquidDensity__;
00808 template <class Scalar, class RawComponent, bool useVaporPressure>
00809 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::maxLiquidDensity__;
00810 template <class Scalar, class RawComponent, bool useVaporPressure>
00811 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::minGasDensity__;
00812 template <class Scalar, class RawComponent, bool useVaporPressure>
00813 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::maxGasDensity__;
00814 template <class Scalar, class RawComponent, bool useVaporPressure>
00815 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasEnthalpy_;
00816 template <class Scalar, class RawComponent, bool useVaporPressure>
00817 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidEnthalpy_;
00818 template <class Scalar, class RawComponent, bool useVaporPressure>
00819 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasHeatCapacity_;
00820 template <class Scalar, class RawComponent, bool useVaporPressure>
00821 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidHeatCapacity_;
00822 template <class Scalar, class RawComponent, bool useVaporPressure>
00823 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasDensity_;
00824 template <class Scalar, class RawComponent, bool useVaporPressure>
00825 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidDensity_;
00826 template <class Scalar, class RawComponent, bool useVaporPressure>
00827 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasViscosity_;
00828 template <class Scalar, class RawComponent, bool useVaporPressure>
00829 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidViscosity_;
00830 template <class Scalar, class RawComponent, bool useVaporPressure>
00831 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasThermalConductivity_;
00832 template <class Scalar, class RawComponent, bool useVaporPressure>
00833 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidThermalConductivity_;
00834 template <class Scalar, class RawComponent, bool useVaporPressure>
00835 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::gasPressure_;
00836 template <class Scalar, class RawComponent, bool useVaporPressure>
00837 Scalar* TabulatedComponent<Scalar, RawComponent, useVaporPressure>::liquidPressure_;
00838 template <class Scalar, class RawComponent, bool useVaporPressure>
00839 Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::tempMin_;
00840 template <class Scalar, class RawComponent, bool useVaporPressure>
00841 Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::tempMax_;
00842 template <class Scalar, class RawComponent, bool useVaporPressure>
00843 unsigned TabulatedComponent<Scalar, RawComponent, useVaporPressure>::nTemp_;
00844 template <class Scalar, class RawComponent, bool useVaporPressure>
00845 Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::pressMin_;
00846 template <class Scalar, class RawComponent, bool useVaporPressure>
00847 Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::pressMax_;
00848 template <class Scalar, class RawComponent, bool useVaporPressure>
00849 unsigned TabulatedComponent<Scalar, RawComponent, useVaporPressure>::nPress_;
00850 template <class Scalar, class RawComponent, bool useVaporPressure>
00851 Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::densityMin_;
00852 template <class Scalar, class RawComponent, bool useVaporPressure>
00853 Scalar TabulatedComponent<Scalar, RawComponent, useVaporPressure>::densityMax_;
00854 template <class Scalar, class RawComponent, bool useVaporPressure>
00855 unsigned TabulatedComponent<Scalar, RawComponent, useVaporPressure>::nDensity_;
00856
00857
00858 }
00859
00860 #endif