27 #ifndef OPM_BRINE_CO2_PVT_HPP 28 #define OPM_BRINE_CO2_PVT_HPP 31 #include <opm/common/TimingMacros.hpp> 32 #include <opm/common/ErrorMacros.hpp> 33 #include <opm/common/utility/gpuDecorators.hpp> 35 #include <opm/common/utility/VectorWithDefaultAllocator.hpp> 44 #include <opm/material/components/CO2Tables.hpp> 49 #include <opm/input/eclipse/EclipseState/Co2StoreConfig.hpp> 62 template <
class Scalar,
template <
class>
class Storage>
68 template <
class ScalarT>
78 template <
class Scalar,
template <
class>
class Storage = Opm::VectorWithDefaultAllocator>
82 using ContainerT = Storage<Scalar>;
83 static constexpr
bool extrapolate =
true;
104 int activityModel = 3,
105 int thermalMixingModelSalt = 1,
106 int thermalMixingModelLiquid = 2,
107 Scalar T_ref = 288.71,
108 Scalar P_ref = 101325);
110 BrineCo2Pvt(
const ContainerT& brineReferenceDensity,
111 const ContainerT& co2ReferenceDensity,
112 const ContainerT& salinity,
114 Co2StoreConfig::SaltMixingType thermalMixingModelSalt,
115 Co2StoreConfig::LiquidMixingType thermalMixingModelLiquid,
117 : brineReferenceDensity_(brineReferenceDensity)
118 , co2ReferenceDensity_(co2ReferenceDensity)
119 , salinity_(salinity)
120 , activityModel_(activityModel)
121 , liquidMixType_(thermalMixingModelLiquid)
122 , saltMixType_(thermalMixingModelSalt)
135 void setVapPars(
const Scalar,
const Scalar)
140 OPM_HOST_DEVICE
static constexpr
bool isActive()
167 { enableDissolution_ = yesno; }
176 { enableSaltConcentration_ = yesno; }
188 void setEzrokhiDenCoeff(
const std::vector<EzrokhiTable>& denaqa);
190 void setEzrokhiViscCoeff(
const std::vector<EzrokhiTable>& viscaqa);
196 {
return brineReferenceDensity_.size(); }
198 OPM_HOST_DEVICE Scalar hVap(
unsigned )
const{
211 template <
class Evaluation>
213 const Evaluation& temperature,
214 const Evaluation& pressure,
215 const Evaluation& Rs,
216 const Evaluation& saltConcentration)
const 218 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
219 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
220 const Evaluation xlCO2 = convertRsToXoG_(Rs,regionIdx);
221 return (liquidEnthalpyBrineCO2_(temperature,
225 - pressure / density(regionIdx, temperature, pressure, Rs, salinity ));
230 template <
class Evaluation>
232 const Evaluation& temperature,
233 const Evaluation& pressure,
234 const Evaluation& Rs)
const 236 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
237 const Evaluation xlCO2 = convertRsToXoG_(Rs,regionIdx);
238 return (liquidEnthalpyBrineCO2_(temperature,
240 Evaluation(salinity_[regionIdx]),
242 - pressure / density(regionIdx, temperature, pressure, Rs, Evaluation(salinity_[regionIdx])));
248 template <
class Evaluation>
249 OPM_HOST_DEVICE Evaluation
viscosity(
unsigned regionIdx,
250 const Evaluation& temperature,
251 const Evaluation& pressure,
252 const Evaluation& )
const 261 template <
class Evaluation>
263 const Evaluation& temperature,
264 const Evaluation& pressure,
265 const Evaluation& saltConcentration)
const 267 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
268 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
269 if (enableEzrokhiViscosity_) {
271 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature, ezrokhiViscNaClCoeff_);
272 return mu_pure * pow(10.0, nacl_exponent * salinity);
282 template <
class Evaluation>
283 OPM_HOST_DEVICE Evaluation
viscosity(
unsigned regionIdx,
284 const Evaluation& temperature,
285 const Evaluation& pressure,
287 const Evaluation& saltConcentration)
const 289 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
297 template <
class Evaluation>
299 const Evaluation& temperature,
300 const Evaluation& pressure)
const 302 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
303 if (enableEzrokhiViscosity_) {
305 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature, ezrokhiViscNaClCoeff_);
306 return mu_pure * pow(10.0, nacl_exponent * Evaluation(salinity_[regionIdx]));
318 template <
class Evaluation>
320 const Evaluation& temperature,
321 const Evaluation& pressure,
322 const Evaluation& saltconcentration)
const 324 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
325 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
326 pressure, saltconcentration);
327 Evaluation rs_sat = rsSat(regionIdx, temperature, pressure, salinity);
328 return (1.0 - convertRsToXoG_(rs_sat,regionIdx)) * density(regionIdx, temperature,
329 pressure, rs_sat, salinity)
330 / brineReferenceDensity_[regionIdx];
335 template <
class Evaluation>
337 const Evaluation& temperature,
338 const Evaluation& pressure,
339 const Evaluation& Rs,
340 const Evaluation& saltConcentration)
const 342 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
343 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
344 pressure, saltConcentration);
345 return (1.0 - convertRsToXoG_(Rs,regionIdx)) * density(regionIdx, temperature,
346 pressure, Rs, salinity)
347 / brineReferenceDensity_[regionIdx];
352 template <
class Evaluation>
354 const Evaluation& temperature,
355 const Evaluation& pressure,
356 const Evaluation& Rs)
const 358 return (1.0 - convertRsToXoG_(Rs,regionIdx)) * density(regionIdx, temperature, pressure,
359 Rs, Evaluation(salinity_[regionIdx]))
360 / brineReferenceDensity_[regionIdx];
366 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::ValueType>
367 std::pair<LhsEval, LhsEval>
371 const bool waterIsActive = fluidState.phaseIsActive(FluidState::waterPhaseIdx);
372 const int myPhaseIdx = waterIsActive ? FluidState::waterPhaseIdx : FluidState::oilPhaseIdx;
373 const LhsEval& Rsw = waterIsActive ? decay<LhsEval>(fluidState.Rsw()) : decay<LhsEval>(fluidState.Rs());
375 const LhsEval& T = decay<LhsEval>(fluidState.temperature(myPhaseIdx));
376 const LhsEval& p = decay<LhsEval>(fluidState.pressure(myPhaseIdx));
377 const LhsEval& saltConcentration
378 = BlackOil::template getSaltConcentration_<FluidState, LhsEval>(fluidState, regionIdx);
387 template <
class Evaluation>
389 const Evaluation& temperature,
390 const Evaluation& pressure)
const 392 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
393 Evaluation rs_sat = rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
394 return (1.0 - convertRsToXoG_(rs_sat,regionIdx)) * density(regionIdx, temperature, pressure,
395 rs_sat, Evaluation(salinity_[regionIdx]))
396 / brineReferenceDensity_[regionIdx];
405 template <
class Evaluation>
408 const Evaluation& )
const 410 #if OPM_IS_INSIDE_DEVICE_FUNCTION 411 assert(
false &&
"Requested the saturation pressure for the brine-co2 pvt module. Not yet implemented.");
414 throw std::runtime_error(
"Requested the saturation pressure for the brine-co2 pvt module. " 415 "Not yet implemented.");
425 template <
class Evaluation>
429 const Evaluation& )
const 431 #if OPM_IS_INSIDE_DEVICE_FUNCTION 432 assert(
false &&
"Requested the saturation pressure for the brine-co2 pvt module. Not yet implemented.");
435 throw std::runtime_error(
"Requested the saturation pressure for the brine-co2 pvt module. " 436 "Not yet implemented.");
443 template <
class Evaluation>
445 const Evaluation& temperature,
446 const Evaluation& pressure,
448 const Evaluation& )
const 451 return rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
457 template <
class Evaluation>
459 const Evaluation& temperature,
460 const Evaluation& pressure,
461 const Evaluation& saltConcentration)
const 463 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
464 pressure, saltConcentration);
465 return rsSat(regionIdx, temperature, pressure, salinity);
471 template <
class Evaluation>
473 const Evaluation& temperature,
474 const Evaluation& pressure)
const 476 return rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
479 OPM_HOST_DEVICE Scalar oilReferenceDensity(
unsigned regionIdx)
const 480 {
return brineReferenceDensity_[regionIdx]; }
482 OPM_HOST_DEVICE Scalar waterReferenceDensity(
unsigned regionIdx)
const 483 {
return brineReferenceDensity_[regionIdx]; }
485 OPM_HOST_DEVICE Scalar gasReferenceDensity(
unsigned regionIdx)
const 486 {
return co2ReferenceDensity_[regionIdx]; }
488 OPM_HOST_DEVICE Scalar salinity(
unsigned regionIdx)
const 489 {
return salinity_[regionIdx]; }
491 OPM_HOST_DEVICE
const ContainerT& getBrineReferenceDensity()
const 492 {
return brineReferenceDensity_; }
494 OPM_HOST_DEVICE
const ContainerT& getCo2ReferenceDensity()
const 495 {
return co2ReferenceDensity_; }
497 OPM_HOST_DEVICE
const ContainerT& getSalinity()
const 498 {
return salinity_; }
500 OPM_HOST_DEVICE
const Params& getParams()
const 501 {
return co2Tables_; }
503 OPM_HOST_DEVICE Co2StoreConfig::SaltMixingType getThermalMixingModelSalt()
const 504 {
return saltMixType_; }
506 OPM_HOST_DEVICE Co2StoreConfig::LiquidMixingType getThermalMixingModelLiquid()
const 507 {
return liquidMixType_; }
509 OPM_HOST_DEVICE
int getActivityModel()
const 510 {
return activityModel_; }
512 template <
class Evaluation>
513 OPM_HOST_DEVICE Evaluation diffusionCoefficient(
const Evaluation& temperature,
514 const Evaluation& pressure,
516 unsigned regionIdx = 0)
const 518 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
521 const Evaluation log_D_H20 = -4.1764 + 712.52 / temperature
522 -2.5907e5 / (temperature * temperature);
530 if (enableEzrokhiViscosity_) {
531 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature,
532 ezrokhiViscNaClCoeff_);
533 mu_Brine = mu_H20 * pow(10.0, nacl_exponent * Evaluation(salinity_[regionIdx]));
539 const Evaluation log_D_Brine = log_D_H20 - 0.87*log10(mu_Brine / mu_H20);
541 return pow(Evaluation(10), log_D_Brine) * 1e-4;
544 template <
class Evaluation>
545 OPM_HOST_DEVICE Evaluation density(
unsigned regionIdx,
546 const Evaluation& temperature,
547 const Evaluation& pressure,
548 const Evaluation& Rs,
549 const Evaluation& salinity)
const 551 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
552 Evaluation xlCO2 = convertXoGToxoG_(convertRsToXoG_(Rs,regionIdx), salinity);
553 Evaluation result = liquidDensity_(temperature,
558 Valgrind::CheckDefined(result);
562 template <
class Evaluation>
563 OPM_HOST_DEVICE Evaluation rsSat(
unsigned regionIdx,
564 const Evaluation& temperature,
565 const Evaluation& pressure,
566 const Evaluation& salinity)
const 568 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
569 if (!enableDissolution_) {
588 xlCO2 = max(0.0, min(1.0, xlCO2));
590 return convertXoGToRs(convertxoGToXoG(xlCO2, salinity), regionIdx);
594 template <
class LhsEval>
595 OPM_HOST_DEVICE LhsEval ezrokhiExponent_(
const LhsEval& temperature,
596 const ContainerT& ezrokhiCoeff)
const 598 const LhsEval& tempC = temperature - 273.15;
599 return ezrokhiCoeff[0] + tempC * (ezrokhiCoeff[1] + ezrokhiCoeff[2] * tempC);
602 template <
class LhsEval>
603 OPM_HOST_DEVICE LhsEval liquidDensity_(
const LhsEval& T,
605 const LhsEval& xlCO2,
606 const LhsEval& salinity)
const 608 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
609 Valgrind::CheckDefined(T);
610 Valgrind::CheckDefined(pl);
611 Valgrind::CheckDefined(xlCO2);
613 if (!extrapolate && T < 273.15) {
614 #if OPM_IS_INSIDE_DEVICE_FUNCTION 615 assert(
false &&
"Liquid density for Brine and CO2 is only defined above 273.15K");
617 const std::string msg =
618 "Liquid density for Brine and CO2 is only " 619 "defined above 273.15K (is " +
620 std::to_string(getValue(T)) +
"K)";
621 throw NumericalProblem(msg);
624 if (!extrapolate && pl >= 2.5e8) {
625 #if OPM_IS_INSIDE_DEVICE_FUNCTION 626 assert(
false &&
"Liquid density for Brine and CO2 is only defined below 250MPa");
628 const std::string msg =
629 "Liquid density for Brine and CO2 is only " 630 "defined below 250MPa (is " +
631 std::to_string(getValue(pl)) +
"Pa)";
632 throw NumericalProblem(msg);
637 if (enableEzrokhiDensity_) {
638 const LhsEval& nacl_exponent = ezrokhiExponent_(T, ezrokhiDenNaClCoeff_);
639 const LhsEval& co2_exponent = ezrokhiExponent_(T, ezrokhiDenCo2Coeff_);
640 const LhsEval& XCO2 = convertxoGToXoG(xlCO2, salinity);
641 return rho_pure * pow(10.0, nacl_exponent * salinity + co2_exponent * XCO2);
645 const LhsEval& rho_lCO2 = liquidDensityWaterCO2_(T, xlCO2, rho_pure);
646 const LhsEval& contribCO2 = rho_lCO2 - rho_pure;
647 return rho_brine + contribCO2;
651 template <
class LhsEval>
652 OPM_HOST_DEVICE LhsEval liquidDensityWaterCO2_(
const LhsEval& temperature,
653 const LhsEval& xlCO2,
654 const LhsEval& rho_pure)
const 656 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
660 const LhsEval& tempC = temperature - 273.15;
664 const LhsEval xlH2O = 1.0 - xlCO2;
665 const LhsEval& M_T = M_H2O * xlH2O + M_CO2 * xlCO2;
666 const LhsEval& V_phi =
670 tempC*5.044e-7))) / 1.0e6;
671 return 1 / (xlCO2 * V_phi/M_T + M_H2O * xlH2O / (rho_pure * M_T));
678 template <
class LhsEval>
679 OPM_HOST_DEVICE LhsEval convertRsToXoG_(
const LhsEval& Rs,
unsigned regionIdx)
const 681 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
682 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
683 Scalar rho_gRef = co2ReferenceDensity_[regionIdx];
685 const LhsEval& rho_oG = Rs*rho_gRef;
686 return rho_oG/(rho_oRef + rho_oG);
692 template <
class LhsEval>
693 OPM_HOST_DEVICE LhsEval convertXoGToxoG_(
const LhsEval& XoG,
const LhsEval& salinity)
const 695 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
698 return XoG*M_Brine / (M_CO2*(1 - XoG) + XoG*M_Brine);
704 template <
class LhsEval>
705 OPM_HOST_DEVICE LhsEval convertxoGToXoG(
const LhsEval& xoG,
const LhsEval& salinity)
const 707 OPM_TIMEBLOCK_LOCAL(convertxoGToXoG, Subsystem::PvtProps);
711 return xoG*M_CO2 / (xoG*(M_CO2 - M_Brine) + M_Brine);
718 template <
class LhsEval>
719 OPM_HOST_DEVICE LhsEval convertXoGToRs(
const LhsEval& XoG,
unsigned regionIdx)
const 721 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
722 Scalar rho_gRef = co2ReferenceDensity_[regionIdx];
724 return XoG/(1.0 - XoG)*(rho_oRef/rho_gRef);
727 template <
class LhsEval>
728 OPM_HOST_DEVICE LhsEval liquidEnthalpyBrineCO2_(
const LhsEval& T,
730 const LhsEval& salinity,
731 const LhsEval& X_CO2_w)
const 733 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::NONE
734 && saltMixType_ == Co2StoreConfig::SaltMixingType::NONE)
742 if (saltMixType_ == Co2StoreConfig::SaltMixingType::MICHAELIDES) {
749 static constexpr Scalar f[] = {
750 2.63500E-1, 7.48368E-6, 1.44611E-6, -3.80860E-10
754 static constexpr Scalar a[4][3] = {
755 { 9633.6, -4080.0, +286.49 },
756 { +166.58, +68.577, -4.6856 },
757 { -0.90963, -0.36524, +0.249667E-1 },
758 { +0.17965E-2, +0.71924E-3, -0.4900E-4 }
761 LhsEval theta, h_NaCl;
762 LhsEval d_h, delta_h;
767 Scalar scalarTheta = scalarValue(theta);
768 Scalar S_lSAT = f[0] + scalarTheta*(f[1] + scalarTheta*(f[2] + scalarTheta*f[3]));
770 LhsEval S = salinity;
775 h_NaCl = (3.6710E4*T + 0.5*(6.2770E1)*T*T - ((6.6670E-2)/3)*T*T*T
776 +((2.8000E-5)/4)*(T*T*T*T))/(58.44E3)- 2.045698e+02;
778 LhsEval m = 1E3 / 58.44 * S / (1 - S);
781 for (
int i = 0; i <=3; ++i) {
782 for (
int j = 0; j <= 2; ++j) {
783 d_h += a[i][j] * pow(theta, static_cast<Scalar>(i)) * pow(m, j);
787 delta_h = (4.184/(1E3 + (58.44 * m)))*d_h;
790 h_ls1 =(1-S)*hw + S*h_NaCl + S*delta_h;
793 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::NONE) {
798 LhsEval delta_hCO2, hg;
802 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::DUANSUN) {
803 delta_hCO2 = (-57.4375 + T * 0.1325) * 1000/44;
813 return (h_ls1 - X_CO2_w*hw + hg*X_CO2_w)*1E3;
816 template <
class LhsEval>
817 OPM_HOST_DEVICE
const LhsEval salinityFromConcentration(
unsigned regionIdx,
820 const LhsEval& saltConcentration)
const 822 if (enableSaltConcentration_) {
826 const LhsEval S_approx = saltConcentration / rho_w;
829 return saltConcentration / rho_brine;
832 return salinity(regionIdx);
836 template <
class ScalarT>
837 friend BrineCo2Pvt<ScalarT, gpuistl::GpuView>
838 gpuistl::make_view(BrineCo2Pvt<ScalarT, gpuistl::GpuBuffer>&);
841 ContainerT brineReferenceDensity_{};
842 ContainerT co2ReferenceDensity_{};
843 ContainerT salinity_{};
844 ContainerT ezrokhiDenNaClCoeff_{};
845 ContainerT ezrokhiDenCo2Coeff_{};
846 ContainerT ezrokhiViscNaClCoeff_{};
847 bool enableEzrokhiDensity_ =
false;
848 bool enableEzrokhiViscosity_ =
false;
849 bool enableDissolution_ =
true;
850 bool enableSaltConcentration_ =
false;
851 int activityModel_{};
852 Co2StoreConfig::LiquidMixingType liquidMixType_{};
853 Co2StoreConfig::SaltMixingType saltMixType_{};
863 template<
class ScalarT>
864 BrineCo2Pvt<ScalarT, GpuBuffer>
865 copy_to_gpu(
const BrineCo2Pvt<ScalarT>& cpuBrineCo2)
867 return BrineCo2Pvt<ScalarT, GpuBuffer>(
868 GpuBuffer<ScalarT>(cpuBrineCo2.getBrineReferenceDensity()),
869 GpuBuffer<ScalarT>(cpuBrineCo2.getCo2ReferenceDensity()),
870 GpuBuffer<ScalarT>(cpuBrineCo2.getSalinity()),
871 cpuBrineCo2.getActivityModel(),
872 cpuBrineCo2.getThermalMixingModelSalt(),
873 cpuBrineCo2.getThermalMixingModelLiquid(),
878 template <
class ScalarT>
879 BrineCo2Pvt<ScalarT, GpuView>
880 make_view(BrineCo2Pvt<ScalarT, GpuBuffer>& brineCo2Pvt)
883 using ContainedType = ScalarT;
885 auto newBrineReferenceDensity = make_view<ContainedType>(brineCo2Pvt.brineReferenceDensity_);
886 auto newGasReferenceDensity = make_view<ContainedType>(brineCo2Pvt.co2ReferenceDensity_);
887 auto newSalinity = make_view<ContainedType>(brineCo2Pvt.salinity_);
889 return BrineCo2Pvt<ScalarT, GpuView>(
890 newBrineReferenceDensity,
891 newGasReferenceDensity,
893 brineCo2Pvt.getActivityModel(),
894 brineCo2Pvt.getThermalMixingModelSalt(),
895 brineCo2Pvt.getThermalMixingModelLiquid(),
Material properties of pure water .
Definition: H2O.hpp:64
This class represents the Pressure-Volume-Temperature relations of the liquid phase for a CO2-Brine s...
Definition: BrineCo2Pvt.hpp:63
static OPM_HOST_DEVICE Scalar molarMass()
The mass in [kg] of one mole of CO2.
Definition: CO2.hpp:73
OPM_HOST_DEVICE Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: BrineCo2Pvt.hpp:249
A class for the brine fluid properties.
Definition: BrineDynamic.hpp:48
void initFromState(const EclipseState &eclState, const Schedule &)
Initialize the parameters for Brine-CO2 system using an ECL deck.
Definition: BrineCo2Pvt.cpp:67
A class for the CO2 fluid properties.
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition: BrineCo2Pvt.hpp:195
OPM_HOST_DEVICE Evaluation saturationPressure(unsigned, const Evaluation &, const Evaluation &) const
Returns the saturation pressure of the brine phase [Pa] depending on its mass fraction of the gas com...
Definition: BrineCo2Pvt.hpp:406
std::pair< LhsEval, LhsEval > OPM_HOST_DEVICE inverseFormationVolumeFactorAndViscosity(const FluidState &fluidState, unsigned regionIdx) const
Returns the formation volume factor [-] and viscosity [Pa s] of the fluid phase.
Definition: BrineCo2Pvt.hpp:368
static OPM_HOST_DEVICE constexpr bool mixingEnergy()
Indicates whether this PVT object computes the water internal energy via a thermal mixing model...
Definition: BrineCo2Pvt.hpp:205
static OPM_HOST_DEVICE Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate)
The dynamic viscosity of pure water.
Definition: SimpleHuDuanH2O.hpp:361
static OPM_HOST_DEVICE Evaluation gasEnthalpy(const Params ¶ms, const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
Specific enthalpy of gaseous CO2 [J/kg].
Definition: CO2.hpp:171
Definition: Schedule.hpp:102
static OPM_HOST_DEVICE Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &)
Specific enthalpy of liquid water .
Definition: SimpleHuDuanH2O.hpp:202
static OPM_HOST_DEVICE Scalar molarMass()
The molar mass in of water.
Definition: SimpleHuDuanH2O.hpp:103
OPM_HOST_DEVICE Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs, const Evaluation &saltConcentration) const
Returns the formation volume factor [-] of the fluid phase.
Definition: BrineCo2Pvt.hpp:336
Provides the OPM specific exception classes.
static OPM_HOST_DEVICE Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &, const Evaluation &salinity)
The dynamic liquid viscosity of the pure component.
Definition: BrineDynamic.hpp:385
void setThermalMixingModel(int thermalMixingModelSalt, int thermalMixingModelLiquid)
Set thermal mixing model for co2 in brine.
Definition: BrineCo2Pvt.cpp:183
static OPM_HOST_DEVICE Evaluation liquidDensity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate)
The density of pure water at a given pressure and temperature .
Definition: SimpleHuDuanH2O.hpp:316
PiecewiseLinearTwoPhaseMaterialParams< TraitsT, ViewType > make_view(PiecewiseLinearTwoPhaseMaterialParams< TraitsT, ContainerType > ¶ms)
this function is intented to make a GPU friendly view of the PiecewiseLinearTwoPhaseMaterialParams ...
Definition: PiecewiseLinearTwoPhaseMaterialParams.hpp:312
A class for the brine fluid properties.
Definition: Brine.hpp:47
OPM_HOST_DEVICE Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the dynamic viscosity [Pa s] of oil saturated gas at given pressure.
Definition: BrineCo2Pvt.hpp:298
OPM_HOST_DEVICE Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &saltConcentration) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: BrineCo2Pvt.hpp:262
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Convience header to include the gpuistl headers if HAVE_CUDA is defined.
void setEnableSaltConcentration(bool yesno)
Specify whether the PVT model should consider salt concentration from the fluidstate or a fixed salin...
Definition: BrineCo2Pvt.hpp:175
OPM_HOST_DEVICE Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &saltConcentration) const
Returns the gas dissoluiton factor [m^3/m^3] of the liquid phase.
Definition: BrineCo2Pvt.hpp:458
Binary coefficients for water and CO2.
Binary coefficients for brine and CO2.
Definition: Brine_CO2.hpp:48
OPM_HOST_DEVICE Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the formation volume factor [-] of the fluid phase.
Definition: BrineCo2Pvt.hpp:353
OPM_HOST_DEVICE Evaluation internalEnergy(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the specific enthalpy [J/kg] of gas given a set of parameters.
Definition: BrineCo2Pvt.hpp:231
Definition: EclipseState.hpp:66
OPM_HOST_DEVICE Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns thegas dissoluiton factor [m^3/m^3] of the liquid phase.
Definition: BrineCo2Pvt.hpp:472
void setReferenceDensities(unsigned regionIdx, Scalar rhoRefBrine, Scalar rhoRefCO2, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition: BrineCo2Pvt.cpp:160
A class for the CO2 fluid properties.
Definition: CO2.hpp:57
OPM_HOST_DEVICE Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &, const Evaluation &) const
Returns the gas dissoluiton factor [m^3/m^3] of the liquid phase.
Definition: BrineCo2Pvt.hpp:444
A simple version of pure water with density from Hu et al.
A simple version of pure water with density from Hu et al.
Definition: SimpleHuDuanH2O.hpp:65
A class for the brine fluid properties.
static OPM_HOST_DEVICE void calculateMoleFractions(const CO2Params ¶ms, const Evaluation &temperature, const Evaluation &pg, const Evaluation &salinity, const int knownPhaseIdx, Evaluation &xlCO2, Evaluation &ygH2O, const int &activityModel, bool extrapolate=false)
Returns the mol (!) fraction of CO2 in the liquid phase and the mol_ (!) fraction of H2O in the gas p...
Definition: Brine_CO2.hpp:113
A generic class which tabulates all thermodynamic properties of a given component.
static OPM_HOST_DEVICE Evaluation liquidDensity(const Evaluation &temperature, const Evaluation &pressure, const Evaluation &salinity, bool extrapolate=false)
The density of the liquid component at a given pressure in and temperature in . ...
Definition: BrineDynamic.hpp:283
void initEnd()
Finish initializing the oil phase PVT properties.
Definition: BrineCo2Pvt.hpp:156
PiecewiseLinearTwoPhaseMaterialParams< TraitsT, GPUContainerType > copy_to_gpu(const PiecewiseLinearTwoPhaseMaterialParams< TraitsT > ¶ms)
Move a PiecewiseLinearTwoPhaseMaterialParams-object to the GPU.
Definition: PiecewiseLinearTwoPhaseMaterialParams.hpp:285
Definition: PiecewiseLinearTwoPhaseMaterialParams.hpp:47
OPM_HOST_DEVICE Evaluation internalEnergy(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs, const Evaluation &saltConcentration) const
Returns the specific enthalpy [J/kg] of gas given a set of parameters.
Definition: BrineCo2Pvt.hpp:212
Binary coefficients for brine and CO2.
static Scalar molarMass()
The molar mass in of the component.
Definition: Component.hpp:93
OPM_HOST_DEVICE Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &saltconcentration) const
Returns the formation volume factor [-] of the fluid phase.
Definition: BrineCo2Pvt.hpp:319
OPM_HOST_DEVICE Evaluation saturationPressure(unsigned, const Evaluation &, const Evaluation &, const Evaluation &) const
Returns the saturation pressure of the brine phase [Pa] depending on its mass fraction of the gas com...
Definition: BrineCo2Pvt.hpp:426
OPM_HOST_DEVICE Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the formation volume factor [-] of brine saturated with CO2 at a given pressure.
Definition: BrineCo2Pvt.hpp:388
OPM_HOST_DEVICE Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &, const Evaluation &saltConcentration) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: BrineCo2Pvt.hpp:283
void setEnableDissolvedGas(bool yesno)
Specify whether the PVT model should consider that the CO2 component can dissolve in the brine phase...
Definition: BrineCo2Pvt.hpp:166
void setActivityModelSalt(int activityModel)
Set activity coefficient model for salt in solubility model.
Definition: BrineCo2Pvt.cpp:171