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>
42#include <opm/material/components/CO2Tables.hpp>
46#include <opm/input/eclipse/EclipseState/Co2StoreConfig.hpp>
59template <
class Scalar,
class Params,
class ContainerT>
64 template <
class ViewType,
class OutputParams,
class InputParams,
class ContainerType,
class ScalarT>
65 BrineCo2Pvt<ScalarT, OutputParams, ViewType>
66 make_view(BrineCo2Pvt<ScalarT, InputParams, ContainerType>&);
73template <
class Scalar,
class Params = Opm::CO2Tables<
double, std::vector<
double>>,
class ContainerT = std::vector<Scalar>>
76 static constexpr bool extrapolate =
true;
97 int activityModel = 3,
98 int thermalMixingModelSalt = 1,
99 int thermalMixingModelLiquid = 2,
100 Scalar T_ref = 288.71,
101 Scalar P_ref = 101325);
103 BrineCo2Pvt(
const ContainerT& brineReferenceDensity,
104 const ContainerT& co2ReferenceDensity,
105 const ContainerT& salinity,
107 Co2StoreConfig::SaltMixingType thermalMixingModelSalt,
108 Co2StoreConfig::LiquidMixingType thermalMixingModelLiquid,
110 : brineReferenceDensity_(brineReferenceDensity)
111 , co2ReferenceDensity_(co2ReferenceDensity)
112 , salinity_(salinity)
113 , activityModel_(activityModel)
114 , liquidMixType_(thermalMixingModelLiquid)
115 , saltMixType_(thermalMixingModelSalt)
130 void setVapPars(
const Scalar,
const Scalar)
156 { enableDissolution_ = yesno; }
165 { enableSaltConcentration_ = yesno; }
177 void setEzrokhiDenCoeff(
const std::vector<EzrokhiTable>& denaqa);
179 void setEzrokhiViscCoeff(
const std::vector<EzrokhiTable>& viscaqa);
185 {
return brineReferenceDensity_.size(); }
187 OPM_HOST_DEVICE Scalar hVap(
unsigned )
const{
194 template <
class Evaluation>
196 const Evaluation& temperature,
197 const Evaluation& pressure,
198 const Evaluation& Rs,
199 const Evaluation& saltConcentration)
const
201 OPM_TIMEFUNCTION_LOCAL();
202 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
203 const Evaluation xlCO2 = convertRsToXoG_(Rs,regionIdx);
204 return (liquidEnthalpyBrineCO2_(temperature,
208 - pressure / density(regionIdx, temperature, pressure, Rs, salinity ));
213 template <
class Evaluation>
215 const Evaluation& temperature,
216 const Evaluation& pressure,
217 const Evaluation& Rs)
const
219 OPM_TIMEFUNCTION_LOCAL();
220 const Evaluation xlCO2 = convertRsToXoG_(Rs,regionIdx);
221 return (liquidEnthalpyBrineCO2_(temperature,
223 Evaluation(salinity_[regionIdx]),
225 - pressure / density(regionIdx, temperature, pressure, Rs, Evaluation(salinity_[regionIdx])));
231 template <
class Evaluation>
232 OPM_HOST_DEVICE Evaluation
viscosity(
unsigned regionIdx,
233 const Evaluation& temperature,
234 const Evaluation& pressure,
235 const Evaluation& )
const
244 template <
class Evaluation>
246 const Evaluation& temperature,
247 const Evaluation& pressure,
248 const Evaluation& saltConcentration)
const
250 OPM_TIMEFUNCTION_LOCAL();
251 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
252 if (enableEzrokhiViscosity_) {
254 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature, ezrokhiViscNaClCoeff_);
255 return mu_pure * pow(10.0, nacl_exponent * salinity);
265 template <
class Evaluation>
266 OPM_HOST_DEVICE Evaluation
viscosity(
unsigned regionIdx,
267 const Evaluation& temperature,
268 const Evaluation& pressure,
270 const Evaluation& saltConcentration)
const
272 OPM_TIMEFUNCTION_LOCAL();
280 template <
class Evaluation>
282 const Evaluation& temperature,
283 const Evaluation& pressure)
const
285 OPM_TIMEFUNCTION_LOCAL();
286 if (enableEzrokhiViscosity_) {
288 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature, ezrokhiViscNaClCoeff_);
289 return mu_pure * pow(10.0, nacl_exponent * Evaluation(salinity_[regionIdx]));
301 template <
class Evaluation>
303 const Evaluation& temperature,
304 const Evaluation& pressure,
305 const Evaluation& saltconcentration)
const
307 OPM_TIMEFUNCTION_LOCAL();
308 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
309 pressure, saltconcentration);
310 Evaluation rs_sat = rsSat(regionIdx, temperature, pressure, salinity);
311 return (1.0 - convertRsToXoG_(rs_sat,regionIdx)) * density(regionIdx, temperature,
312 pressure, rs_sat, salinity)
313 / brineReferenceDensity_[regionIdx];
318 template <
class Evaluation>
320 const Evaluation& temperature,
321 const Evaluation& pressure,
322 const Evaluation& Rs,
323 const Evaluation& saltConcentration)
const
325 OPM_TIMEFUNCTION_LOCAL();
326 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
327 pressure, saltConcentration);
328 return (1.0 - convertRsToXoG_(Rs,regionIdx)) * density(regionIdx, temperature,
329 pressure, Rs, salinity)
330 / brineReferenceDensity_[regionIdx];
335 template <
class Evaluation>
337 const Evaluation& temperature,
338 const Evaluation& pressure,
339 const Evaluation& Rs)
const
341 return (1.0 - convertRsToXoG_(Rs,regionIdx)) * density(regionIdx, temperature, pressure,
342 Rs, Evaluation(salinity_[regionIdx]))
343 / brineReferenceDensity_[regionIdx];
349 template <
class Evaluation>
351 const Evaluation& temperature,
352 const Evaluation& pressure)
const
354 OPM_TIMEFUNCTION_LOCAL();
355 Evaluation rs_sat = rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
356 return (1.0 - convertRsToXoG_(rs_sat,regionIdx)) * density(regionIdx, temperature, pressure,
357 rs_sat, Evaluation(salinity_[regionIdx]))
358 / brineReferenceDensity_[regionIdx];
367 template <
class Evaluation>
370 const Evaluation& )
const
372#if OPM_IS_INSIDE_DEVICE_FUNCTION
373 assert(
false &&
"Requested the saturation pressure for the brine-co2 pvt module. Not yet implemented.");
375 throw std::runtime_error(
"Requested the saturation pressure for the brine-co2 pvt module. "
376 "Not yet implemented.");
386 template <
class Evaluation>
390 const Evaluation& )
const
392#if OPM_IS_INSIDE_DEVICE_FUNCTION
393 assert(
false &&
"Requested the saturation pressure for the brine-co2 pvt module. Not yet implemented.");
395 throw std::runtime_error(
"Requested the saturation pressure for the brine-co2 pvt module. "
396 "Not yet implemented.");
403 template <
class Evaluation>
405 const Evaluation& temperature,
406 const Evaluation& pressure,
408 const Evaluation& )
const
411 return rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
417 template <
class Evaluation>
419 const Evaluation& temperature,
420 const Evaluation& pressure,
421 const Evaluation& saltConcentration)
const
423 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
424 pressure, saltConcentration);
425 return rsSat(regionIdx, temperature, pressure, salinity);
431 template <
class Evaluation>
433 const Evaluation& temperature,
434 const Evaluation& pressure)
const
436 return rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
439 OPM_HOST_DEVICE Scalar oilReferenceDensity(
unsigned regionIdx)
const
440 {
return brineReferenceDensity_[regionIdx]; }
442 OPM_HOST_DEVICE Scalar waterReferenceDensity(
unsigned regionIdx)
const
443 {
return brineReferenceDensity_[regionIdx]; }
445 OPM_HOST_DEVICE Scalar gasReferenceDensity(
unsigned regionIdx)
const
446 {
return co2ReferenceDensity_[regionIdx]; }
448 OPM_HOST_DEVICE Scalar salinity(
unsigned regionIdx)
const
449 {
return salinity_[regionIdx]; }
451 OPM_HOST_DEVICE
const ContainerT& getBrineReferenceDensity()
const
452 {
return brineReferenceDensity_; }
454 OPM_HOST_DEVICE
const ContainerT& getCo2ReferenceDensity()
const
455 {
return co2ReferenceDensity_; }
457 OPM_HOST_DEVICE
const ContainerT& getSalinity()
const
458 {
return salinity_; }
460 OPM_HOST_DEVICE
const Params& getParams()
const
461 {
return co2Tables_; }
463 OPM_HOST_DEVICE Co2StoreConfig::SaltMixingType getThermalMixingModelSalt()
const
464 {
return saltMixType_; }
466 OPM_HOST_DEVICE Co2StoreConfig::LiquidMixingType getThermalMixingModelLiquid()
const
467 {
return liquidMixType_; }
469 OPM_HOST_DEVICE
int getActivityModel()
const
470 {
return activityModel_; }
472 template <
class Evaluation>
473 OPM_HOST_DEVICE Evaluation diffusionCoefficient(
const Evaluation& temperature,
474 const Evaluation& pressure,
477 OPM_TIMEFUNCTION_LOCAL();
480 const Evaluation log_D_H20 = -4.1764 + 712.52 / temperature
481 -2.5907e5 / (temperature * temperature);
489 if (enableEzrokhiViscosity_) {
490 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature,
491 ezrokhiViscNaClCoeff_);
492 mu_Brine = mu_H20 * pow(10.0, nacl_exponent * Evaluation(salinity_[0]));
498 const Evaluation log_D_Brine = log_D_H20 - 0.87*log10(mu_Brine / mu_H20);
500 return pow(Evaluation(10), log_D_Brine) * 1e-4;
503 template <
class Evaluation>
504 OPM_HOST_DEVICE Evaluation density(
unsigned regionIdx,
505 const Evaluation& temperature,
506 const Evaluation& pressure,
507 const Evaluation& Rs,
508 const Evaluation& salinity)
const
510 OPM_TIMEFUNCTION_LOCAL();
511 Evaluation xlCO2 = convertXoGToxoG_(convertRsToXoG_(Rs,regionIdx), salinity);
512 Evaluation result = liquidDensity_(temperature,
517 Valgrind::CheckDefined(result);
521 template <
class Evaluation>
522 OPM_HOST_DEVICE Evaluation rsSat(
unsigned regionIdx,
523 const Evaluation& temperature,
524 const Evaluation& pressure,
525 const Evaluation& salinity)
const
527 OPM_TIMEFUNCTION_LOCAL();
528 if (!enableDissolution_) {
547 xlCO2 = max(0.0, min(1.0, xlCO2));
549 return convertXoGToRs(convertxoGToXoG(xlCO2, salinity), regionIdx);
553 template <
class LhsEval>
554 OPM_HOST_DEVICE LhsEval ezrokhiExponent_(
const LhsEval& temperature,
555 const ContainerT& ezrokhiCoeff)
const
557 const LhsEval& tempC = temperature - 273.15;
558 return ezrokhiCoeff[0] + tempC * (ezrokhiCoeff[1] + ezrokhiCoeff[2] * tempC);
561 template <
class LhsEval>
562 OPM_HOST_DEVICE LhsEval liquidDensity_(
const LhsEval& T,
564 const LhsEval& xlCO2,
565 const LhsEval& salinity)
const
567 OPM_TIMEFUNCTION_LOCAL();
568 Valgrind::CheckDefined(T);
569 Valgrind::CheckDefined(pl);
570 Valgrind::CheckDefined(xlCO2);
572 if (!extrapolate && T < 273.15) {
573#if OPM_IS_INSIDE_DEVICE_FUNCTION
574 assert(
false &&
"Liquid density for Brine and CO2 is only defined above 273.15K");
576 const std::string msg =
577 "Liquid density for Brine and CO2 is only "
578 "defined above 273.15K (is " +
579 std::to_string(getValue(T)) +
"K)";
580 throw NumericalProblem(msg);
583 if (!extrapolate && pl >= 2.5e8) {
584#if OPM_IS_INSIDE_DEVICE_FUNCTION
585 assert(
false &&
"Liquid density for Brine and CO2 is only defined below 250MPa");
587 const std::string msg =
588 "Liquid density for Brine and CO2 is only "
589 "defined below 250MPa (is " +
590 std::to_string(getValue(pl)) +
"Pa)";
591 throw NumericalProblem(msg);
596 if (enableEzrokhiDensity_) {
597 const LhsEval& nacl_exponent = ezrokhiExponent_(T, ezrokhiDenNaClCoeff_);
598 const LhsEval& co2_exponent = ezrokhiExponent_(T, ezrokhiDenCo2Coeff_);
599 const LhsEval& XCO2 = convertxoGToXoG(xlCO2, salinity);
600 return rho_pure * pow(10.0, nacl_exponent * salinity + co2_exponent * XCO2);
604 const LhsEval& rho_lCO2 = liquidDensityWaterCO2_(T, pl, xlCO2);
605 const LhsEval& contribCO2 = rho_lCO2 - rho_pure;
606 return rho_brine + contribCO2;
610 template <
class LhsEval>
611 OPM_HOST_DEVICE LhsEval liquidDensityWaterCO2_(
const LhsEval& temperature,
613 const LhsEval& xlCO2)
const
615 OPM_TIMEFUNCTION_LOCAL();
619 const LhsEval& tempC = temperature - 273.15;
624 const LhsEval xlH2O = 1.0 - xlCO2;
625 const LhsEval& M_T = M_H2O * xlH2O + M_CO2 * xlCO2;
626 const LhsEval& V_phi =
630 tempC*5.044e-7))) / 1.0e6;
631 return 1 / (xlCO2 * V_phi/M_T + M_H2O * xlH2O / (rho_pure * M_T));
638 template <
class LhsEval>
639 OPM_HOST_DEVICE LhsEval convertRsToXoG_(
const LhsEval& Rs,
unsigned regionIdx)
const
641 OPM_TIMEFUNCTION_LOCAL();
642 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
643 Scalar rho_gRef = co2ReferenceDensity_[regionIdx];
645 const LhsEval& rho_oG = Rs*rho_gRef;
646 return rho_oG/(rho_oRef + rho_oG);
652 template <
class LhsEval>
653 OPM_HOST_DEVICE LhsEval convertXoGToxoG_(
const LhsEval& XoG,
const LhsEval& salinity)
const
655 OPM_TIMEFUNCTION_LOCAL();
658 return XoG*M_Brine / (M_CO2*(1 - XoG) + XoG*M_Brine);
664 template <
class LhsEval>
665 OPM_HOST_DEVICE LhsEval convertxoGToXoG(
const LhsEval& xoG,
const LhsEval& salinity)
const
667 OPM_TIMEBLOCK_LOCAL(convertxoGToXoG);
671 return xoG*M_CO2 / (xoG*(M_CO2 - M_Brine) + M_Brine);
678 template <
class LhsEval>
679 OPM_HOST_DEVICE LhsEval convertXoGToRs(
const LhsEval& XoG,
unsigned regionIdx)
const
681 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
682 Scalar rho_gRef = co2ReferenceDensity_[regionIdx];
684 return XoG/(1.0 - XoG)*(rho_oRef/rho_gRef);
687 template <
class LhsEval>
688 OPM_HOST_DEVICE LhsEval liquidEnthalpyBrineCO2_(
const LhsEval& T,
690 const LhsEval& salinity,
691 const LhsEval& X_CO2_w)
const
693 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::NONE
694 && saltMixType_ == Co2StoreConfig::SaltMixingType::NONE)
702 if (saltMixType_ == Co2StoreConfig::SaltMixingType::MICHAELIDES) {
709 static constexpr Scalar f[] = {
710 2.63500E-1, 7.48368E-6, 1.44611E-6, -3.80860E-10
714 static constexpr Scalar a[4][3] = {
715 { 9633.6, -4080.0, +286.49 },
716 { +166.58, +68.577, -4.6856 },
717 { -0.90963, -0.36524, +0.249667E-1 },
718 { +0.17965E-2, +0.71924E-3, -0.4900E-4 }
721 LhsEval theta, h_NaCl;
722 LhsEval d_h, delta_h;
727 Scalar scalarTheta = scalarValue(theta);
728 Scalar S_lSAT = f[0] + scalarTheta*(f[1] + scalarTheta*(f[2] + scalarTheta*f[3]));
730 LhsEval S = salinity;
735 h_NaCl = (3.6710E4*T + 0.5*(6.2770E1)*T*T - ((6.6670E-2)/3)*T*T*T
736 +((2.8000E-5)/4)*(T*T*T*T))/(58.44E3)- 2.045698e+02;
738 LhsEval m = 1E3 / 58.44 * S / (1 - S);
741 for (
int i = 0; i <=3; ++i) {
742 for (
int j = 0; j <= 2; ++j) {
743 d_h += a[i][j] * pow(theta,
static_cast<Scalar
>(i)) * pow(m, j);
747 delta_h = (4.184/(1E3 + (58.44 * m)))*d_h;
750 h_ls1 =(1-S)*hw + S*h_NaCl + S*delta_h;
753 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::NONE) {
758 LhsEval delta_hCO2, hg;
762 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::DUANSUN) {
763 delta_hCO2 = (-57.4375 + T * 0.1325) * 1000/44;
773 return (h_ls1 - X_CO2_w*hw + hg*X_CO2_w)*1E3;
776 template <
class LhsEval>
777 OPM_HOST_DEVICE
const LhsEval salinityFromConcentration(
unsigned regionIdx,
780 const LhsEval& saltConcentration)
const
782 if (enableSaltConcentration_) {
786 return salinity(regionIdx);
789 template <
class ViewType,
class OutputParams,
class InputParams,
class ContainerType,
class ScalarT>
790 friend BrineCo2Pvt<ScalarT, OutputParams, ViewType>
791 gpuistl::make_view(BrineCo2Pvt<ScalarT, InputParams, ContainerType>&);
793 ContainerT brineReferenceDensity_{};
794 ContainerT co2ReferenceDensity_{};
795 ContainerT salinity_{};
796 ContainerT ezrokhiDenNaClCoeff_{};
797 ContainerT ezrokhiDenCo2Coeff_{};
798 ContainerT ezrokhiViscNaClCoeff_{};
799 bool enableEzrokhiDensity_ =
false;
800 bool enableEzrokhiViscosity_ =
false;
801 bool enableDissolution_ =
true;
802 bool enableSaltConcentration_ =
false;
803 int activityModel_{};
804 Co2StoreConfig::LiquidMixingType liquidMixType_{};
805 Co2StoreConfig::SaltMixingType saltMixType_{};
811namespace Opm::gpuistl
814 template<
class Params,
class GPUContainer,
class ScalarT>
815 BrineCo2Pvt<ScalarT, Params, GPUContainer>
816 copy_to_gpu(
const BrineCo2Pvt<ScalarT>& cpuBrineCo2)
818 return BrineCo2Pvt<ScalarT, Params, GPUContainer>(
819 GPUContainer(cpuBrineCo2.getBrineReferenceDensity()),
820 GPUContainer(cpuBrineCo2.getCo2ReferenceDensity()),
821 GPUContainer(cpuBrineCo2.getSalinity()),
822 cpuBrineCo2.getActivityModel(),
823 cpuBrineCo2.getThermalMixingModelSalt(),
824 cpuBrineCo2.getThermalMixingModelLiquid(),
825 copy_to_gpu<GPUContainer>(cpuBrineCo2.getParams())
829 template <
class ViewType,
class OutputParams,
class InputParams,
class ContainerType,
class ScalarT>
830 BrineCo2Pvt<ScalarT, OutputParams, ViewType>
831 make_view(BrineCo2Pvt<ScalarT, InputParams, ContainerType>& brineCo2Pvt)
834 using ContainedType =
typename ViewType::value_type;
836 ViewType newBrineReferenceDensity = make_view<ContainedType>(brineCo2Pvt.brineReferenceDensity_);
837 ViewType newGasReferenceDensity = make_view<ContainedType>(brineCo2Pvt.co2ReferenceDensity_);
838 ViewType newSalinity = make_view<ContainedType>(brineCo2Pvt.salinity_);
840 return BrineCo2Pvt<ScalarT, OutputParams, ViewType>(
841 newBrineReferenceDensity,
842 newGasReferenceDensity,
844 brineCo2Pvt.getActivityModel(),
845 brineCo2Pvt.getThermalMixingModelSalt(),
846 brineCo2Pvt.getThermalMixingModelLiquid(),
847 make_view<ViewType>(brineCo2Pvt.co2Tables_)
A class for the brine fluid properties.
Binary coefficients for brine and CO2.
A class for the CO2 fluid properties.
Provides the OPM specific exception classes.
Binary coefficients for water and CO2.
A simple version of pure water with density from Hu et al.
A generic class which tabulates all thermodynamic properties of a given component.
Binary coefficients for brine and CO2.
Definition Brine_CO2.hpp:46
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:101
This class represents the Pressure-Volume-Temperature relations of the liquid phase for a CO2-Brine s...
Definition BrineCo2Pvt.hpp:75
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:432
void setThermalMixingModel(int thermalMixingModelSalt, int thermalMixingModelLiquid)
Set thermal mixing model for co2 in brine.
Definition BrineCo2Pvt.cpp:185
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:350
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:195
void initEnd()
Finish initializing the oil phase PVT properties.
Definition BrineCo2Pvt.hpp:145
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:404
void setEnableDissolvedGas(bool yesno)
Specify whether the PVT model should consider that the CO2 component can dissolve in the brine phase.
Definition BrineCo2Pvt.hpp:155
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition BrineCo2Pvt.hpp:184
void setEnableSaltConcentration(bool yesno)
Specify whether the PVT model should consider salt concentration from the fluidstate or a fixed salin...
Definition BrineCo2Pvt.hpp:164
void setReferenceDensities(unsigned regionIdx, Scalar rhoRefBrine, Scalar rhoRefCO2, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition BrineCo2Pvt.cpp:162
void setActivityModelSalt(int activityModel)
Set activity coefficient model for salt in solubility model.
Definition BrineCo2Pvt.cpp:173
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:266
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: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:387
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:281
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:302
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:245
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:214
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:368
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:336
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:232
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:418
A class for the brine fluid properties.
Definition BrineDynamic.hpp:49
static OPM_HOST_DEVICE Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &, const Evaluation &salinity)
The dynamic viscosity of pure water.
Definition BrineDynamic.hpp:341
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:264
A class for the CO2 fluid properties.
Definition CO2.hpp:58
static OPM_HOST_DEVICE Scalar molarMass()
The mass in [kg] of one mole of CO2.
Definition CO2.hpp:73
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
static Scalar molarMass()
The molar mass in of the component.
Definition Component.hpp:93
Definition EclipseState.hpp:62
Definition Schedule.hpp:101
A simple version of pure water with density from Hu et al.
Definition SimpleHuDuanH2O.hpp:65
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:313
static OPM_HOST_DEVICE Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate)
The dynamic viscosity of pure water.
Definition SimpleHuDuanH2O.hpp:358
static OPM_HOST_DEVICE Scalar molarMass()
The molar mass in of water.
Definition SimpleHuDuanH2O.hpp:102
static OPM_HOST_DEVICE Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &)
Specific enthalpy of liquid water .
Definition SimpleHuDuanH2O.hpp:201
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30