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>
62template <
class Scalar,
template <
class>
class Storage>
68 template <
class ScalarT>
69 BrineCo2Pvt<ScalarT, GpuView>
70 make_view(BrineCo2Pvt<ScalarT, GpuBuffer>&);
78template <
class Scalar,
template <
class>
class Storage = Opm::VectorWithDefaultAllocator>
82 using ContainerT = Storage<Scalar>;
83 static constexpr bool extrapolate =
true;
101 BrineCo2Pvt() =
default;
103 explicit BrineCo2Pvt(
const ContainerT& salinity,
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{
205 template <
class Evaluation>
207 const Evaluation& temperature,
208 const Evaluation& pressure,
209 const Evaluation& Rs,
210 const Evaluation& saltConcentration)
const
212 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
213 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
214 const Evaluation xlCO2 = convertRsToXoG_(Rs,regionIdx);
215 return (liquidEnthalpyBrineCO2_(temperature,
219 - pressure / density(regionIdx, temperature, pressure, Rs, salinity ));
224 template <
class Evaluation>
226 const Evaluation& temperature,
227 const Evaluation& pressure,
228 const Evaluation& Rs)
const
230 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
231 const Evaluation xlCO2 = convertRsToXoG_(Rs,regionIdx);
232 return (liquidEnthalpyBrineCO2_(temperature,
234 Evaluation(salinity_[regionIdx]),
236 - pressure / density(regionIdx, temperature, pressure, Rs, Evaluation(salinity_[regionIdx])));
242 template <
class Evaluation>
243 OPM_HOST_DEVICE Evaluation
viscosity(
unsigned regionIdx,
244 const Evaluation& temperature,
245 const Evaluation& pressure,
246 const Evaluation& )
const
255 template <
class Evaluation>
257 const Evaluation& temperature,
258 const Evaluation& pressure,
259 const Evaluation& saltConcentration)
const
261 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
262 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
263 if (enableEzrokhiViscosity_) {
265 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature, ezrokhiViscNaClCoeff_);
266 return mu_pure * pow(10.0, nacl_exponent * salinity);
276 template <
class Evaluation>
277 OPM_HOST_DEVICE Evaluation
viscosity(
unsigned regionIdx,
278 const Evaluation& temperature,
279 const Evaluation& pressure,
281 const Evaluation& saltConcentration)
const
283 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
291 template <
class Evaluation>
293 const Evaluation& temperature,
294 const Evaluation& pressure)
const
296 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
297 if (enableEzrokhiViscosity_) {
299 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature, ezrokhiViscNaClCoeff_);
300 return mu_pure * pow(10.0, nacl_exponent * Evaluation(salinity_[regionIdx]));
312 template <
class Evaluation>
314 const Evaluation& temperature,
315 const Evaluation& pressure,
316 const Evaluation& saltconcentration)
const
318 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
319 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
320 pressure, saltconcentration);
321 Evaluation rs_sat = rsSat(regionIdx, temperature, pressure, salinity);
322 return (1.0 - convertRsToXoG_(rs_sat,regionIdx)) * density(regionIdx, temperature,
323 pressure, rs_sat, salinity)
324 / brineReferenceDensity_[regionIdx];
329 template <
class Evaluation>
331 const Evaluation& temperature,
332 const Evaluation& pressure,
333 const Evaluation& Rs,
334 const Evaluation& saltConcentration)
const
336 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
337 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
338 pressure, saltConcentration);
339 return (1.0 - convertRsToXoG_(Rs,regionIdx)) * density(regionIdx, temperature,
340 pressure, Rs, salinity)
341 / brineReferenceDensity_[regionIdx];
346 template <
class Evaluation>
348 const Evaluation& temperature,
349 const Evaluation& pressure,
350 const Evaluation& Rs)
const
352 return (1.0 - convertRsToXoG_(Rs,regionIdx)) * density(regionIdx, temperature, pressure,
353 Rs, Evaluation(salinity_[regionIdx]))
354 / brineReferenceDensity_[regionIdx];
360 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::ValueType>
361 std::pair<LhsEval, LhsEval>
365 const bool waterIsActive = fluidState.phaseIsActive(FluidState::waterPhaseIdx);
366 const int myPhaseIdx = waterIsActive ? FluidState::waterPhaseIdx : FluidState::oilPhaseIdx;
367 const LhsEval& Rsw = waterIsActive ? decay<LhsEval>(fluidState.Rsw()) : decay<LhsEval>(fluidState.Rs());
369 const LhsEval& T = decay<LhsEval>(fluidState.temperature(myPhaseIdx));
370 const LhsEval& p = decay<LhsEval>(fluidState.pressure(myPhaseIdx));
371 const LhsEval& saltConcentration
372 = BlackOil::template getSaltConcentration_<FluidState, LhsEval>(fluidState, regionIdx);
381 template <
class Evaluation>
383 const Evaluation& temperature,
384 const Evaluation& pressure)
const
386 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
387 Evaluation rs_sat = rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
388 return (1.0 - convertRsToXoG_(rs_sat,regionIdx)) * density(regionIdx, temperature, pressure,
389 rs_sat, Evaluation(salinity_[regionIdx]))
390 / brineReferenceDensity_[regionIdx];
399 template <
class Evaluation>
402 const Evaluation& )
const
404#if OPM_IS_INSIDE_DEVICE_FUNCTION
405 assert(
false &&
"Requested the saturation pressure for the brine-co2 pvt module. Not yet implemented.");
407 throw std::runtime_error(
"Requested the saturation pressure for the brine-co2 pvt module. "
408 "Not yet implemented.");
418 template <
class Evaluation>
422 const Evaluation& )
const
424#if OPM_IS_INSIDE_DEVICE_FUNCTION
425 assert(
false &&
"Requested the saturation pressure for the brine-co2 pvt module. Not yet implemented.");
427 throw std::runtime_error(
"Requested the saturation pressure for the brine-co2 pvt module. "
428 "Not yet implemented.");
435 template <
class Evaluation>
437 const Evaluation& temperature,
438 const Evaluation& pressure,
440 const Evaluation& )
const
443 return rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
449 template <
class Evaluation>
451 const Evaluation& temperature,
452 const Evaluation& pressure,
453 const Evaluation& saltConcentration)
const
455 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature,
456 pressure, saltConcentration);
457 return rsSat(regionIdx, temperature, pressure, salinity);
463 template <
class Evaluation>
465 const Evaluation& temperature,
466 const Evaluation& pressure)
const
468 return rsSat(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
471 OPM_HOST_DEVICE Scalar oilReferenceDensity(
unsigned regionIdx)
const
472 {
return brineReferenceDensity_[regionIdx]; }
474 OPM_HOST_DEVICE Scalar waterReferenceDensity(
unsigned regionIdx)
const
475 {
return brineReferenceDensity_[regionIdx]; }
477 OPM_HOST_DEVICE Scalar gasReferenceDensity(
unsigned regionIdx)
const
478 {
return co2ReferenceDensity_[regionIdx]; }
480 OPM_HOST_DEVICE Scalar
salinity(
unsigned regionIdx)
const
481 {
return salinity_[regionIdx]; }
483 OPM_HOST_DEVICE
const ContainerT& getBrineReferenceDensity()
const
484 {
return brineReferenceDensity_; }
486 OPM_HOST_DEVICE
const ContainerT& getCo2ReferenceDensity()
const
487 {
return co2ReferenceDensity_; }
489 OPM_HOST_DEVICE
const ContainerT& getSalinity()
const
490 {
return salinity_; }
492 OPM_HOST_DEVICE
const Params& getParams()
const
493 {
return co2Tables_; }
495 OPM_HOST_DEVICE Co2StoreConfig::SaltMixingType getThermalMixingModelSalt()
const
496 {
return saltMixType_; }
498 OPM_HOST_DEVICE Co2StoreConfig::LiquidMixingType getThermalMixingModelLiquid()
const
499 {
return liquidMixType_; }
501 OPM_HOST_DEVICE
int getActivityModel()
const
502 {
return activityModel_; }
504 template <
class Evaluation>
505 OPM_HOST_DEVICE Evaluation diffusionCoefficient(
const Evaluation& temperature,
506 const Evaluation& pressure,
508 unsigned regionIdx = 0)
const
510 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
513 const Evaluation log_D_H20 = -4.1764 + 712.52 / temperature
514 -2.5907e5 / (temperature * temperature);
522 if (enableEzrokhiViscosity_) {
523 const Evaluation& nacl_exponent = ezrokhiExponent_(temperature,
524 ezrokhiViscNaClCoeff_);
525 mu_Brine = mu_H20 * pow(10.0, nacl_exponent * Evaluation(salinity_[regionIdx]));
531 const Evaluation log_D_Brine = log_D_H20 - 0.87*log10(mu_Brine / mu_H20);
533 return pow(Evaluation(10), log_D_Brine) * 1e-4;
536 template <
class Evaluation>
537 OPM_HOST_DEVICE Evaluation density(
unsigned regionIdx,
538 const Evaluation& temperature,
539 const Evaluation& pressure,
540 const Evaluation& Rs,
541 const Evaluation& salinity)
const
543 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
544 Evaluation xlCO2 = convertXoGToxoG_(convertRsToXoG_(Rs,regionIdx), salinity);
545 Evaluation result = liquidDensity_(temperature,
550 Valgrind::CheckDefined(result);
554 template <
class Evaluation>
555 OPM_HOST_DEVICE Evaluation rsSat(
unsigned regionIdx,
556 const Evaluation& temperature,
557 const Evaluation& pressure,
558 const Evaluation& salinity)
const
560 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
561 if (!enableDissolution_) {
580 xlCO2 = max(0.0, min(1.0, xlCO2));
582 return convertXoGToRs(convertxoGToXoG(xlCO2, salinity), regionIdx);
586 template <
class LhsEval>
587 OPM_HOST_DEVICE LhsEval ezrokhiExponent_(
const LhsEval& temperature,
588 const ContainerT& ezrokhiCoeff)
const
590 const LhsEval& tempC = temperature - 273.15;
591 return ezrokhiCoeff[0] + tempC * (ezrokhiCoeff[1] + ezrokhiCoeff[2] * tempC);
594 template <
class LhsEval>
595 OPM_HOST_DEVICE LhsEval liquidDensity_(
const LhsEval& T,
597 const LhsEval& xlCO2,
598 const LhsEval& salinity)
const
600 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
601 Valgrind::CheckDefined(T);
602 Valgrind::CheckDefined(pl);
603 Valgrind::CheckDefined(xlCO2);
605 if (!extrapolate && T < 273.15) {
606#if OPM_IS_INSIDE_DEVICE_FUNCTION
607 assert(
false &&
"Liquid density for Brine and CO2 is only defined above 273.15K");
609 const std::string msg =
610 "Liquid density for Brine and CO2 is only "
611 "defined above 273.15K (is " +
612 std::to_string(getValue(T)) +
"K)";
613 throw NumericalProblem(msg);
616 if (!extrapolate && pl >= 2.5e8) {
617#if OPM_IS_INSIDE_DEVICE_FUNCTION
618 assert(
false &&
"Liquid density for Brine and CO2 is only defined below 250MPa");
620 const std::string msg =
621 "Liquid density for Brine and CO2 is only "
622 "defined below 250MPa (is " +
623 std::to_string(getValue(pl)) +
"Pa)";
624 throw NumericalProblem(msg);
629 if (enableEzrokhiDensity_) {
630 const LhsEval& nacl_exponent = ezrokhiExponent_(T, ezrokhiDenNaClCoeff_);
631 const LhsEval& co2_exponent = ezrokhiExponent_(T, ezrokhiDenCo2Coeff_);
632 const LhsEval& XCO2 = convertxoGToXoG(xlCO2, salinity);
633 return rho_pure * pow(10.0, nacl_exponent * salinity + co2_exponent * XCO2);
637 const LhsEval& rho_lCO2 = liquidDensityWaterCO2_(T, xlCO2, rho_pure);
638 const LhsEval& contribCO2 = rho_lCO2 - rho_pure;
639 return rho_brine + contribCO2;
643 template <
class LhsEval>
644 OPM_HOST_DEVICE LhsEval liquidDensityWaterCO2_(
const LhsEval& temperature,
645 const LhsEval& xlCO2,
646 const LhsEval& rho_pure)
const
648 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
652 const LhsEval& tempC = temperature - 273.15;
656 const LhsEval xlH2O = 1.0 - xlCO2;
657 const LhsEval& M_T = M_H2O * xlH2O + M_CO2 * xlCO2;
658 const LhsEval& V_phi =
662 tempC*5.044e-7))) / 1.0e6;
663 return 1 / (xlCO2 * V_phi/M_T + M_H2O * xlH2O / (rho_pure * M_T));
670 template <
class LhsEval>
671 OPM_HOST_DEVICE LhsEval convertRsToXoG_(
const LhsEval& Rs,
unsigned regionIdx)
const
673 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
674 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
675 Scalar rho_gRef = co2ReferenceDensity_[regionIdx];
677 const LhsEval& rho_oG = Rs*rho_gRef;
678 return rho_oG/(rho_oRef + rho_oG);
684 template <
class LhsEval>
685 OPM_HOST_DEVICE LhsEval convertXoGToxoG_(
const LhsEval& XoG,
const LhsEval& salinity)
const
687 OPM_TIMEFUNCTION_LOCAL(Subsystem::PvtProps);
690 return XoG*M_Brine / (M_CO2*(1 - XoG) + XoG*M_Brine);
696 template <
class LhsEval>
697 OPM_HOST_DEVICE LhsEval convertxoGToXoG(
const LhsEval& xoG,
const LhsEval& salinity)
const
699 OPM_TIMEBLOCK_LOCAL(convertxoGToXoG, Subsystem::PvtProps);
703 return xoG*M_CO2 / (xoG*(M_CO2 - M_Brine) + M_Brine);
710 template <
class LhsEval>
711 OPM_HOST_DEVICE LhsEval convertXoGToRs(
const LhsEval& XoG,
unsigned regionIdx)
const
713 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
714 Scalar rho_gRef = co2ReferenceDensity_[regionIdx];
716 return XoG/(1.0 - XoG)*(rho_oRef/rho_gRef);
719 template <
class LhsEval>
720 OPM_HOST_DEVICE LhsEval liquidEnthalpyBrineCO2_(
const LhsEval& T,
722 const LhsEval& salinity,
723 const LhsEval& X_CO2_w)
const
725 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::NONE
726 && saltMixType_ == Co2StoreConfig::SaltMixingType::NONE)
734 if (saltMixType_ == Co2StoreConfig::SaltMixingType::MICHAELIDES) {
741 static constexpr Scalar f[] = {
742 2.63500E-1, 7.48368E-6, 1.44611E-6, -3.80860E-10
746 static constexpr Scalar a[4][3] = {
747 { 9633.6, -4080.0, +286.49 },
748 { +166.58, +68.577, -4.6856 },
749 { -0.90963, -0.36524, +0.249667E-1 },
750 { +0.17965E-2, +0.71924E-3, -0.4900E-4 }
753 LhsEval theta, h_NaCl;
754 LhsEval d_h, delta_h;
759 Scalar scalarTheta = scalarValue(theta);
760 Scalar S_lSAT = f[0] + scalarTheta*(f[1] + scalarTheta*(f[2] + scalarTheta*f[3]));
762 LhsEval S = salinity;
767 h_NaCl = (3.6710E4*T + 0.5*(6.2770E1)*T*T - ((6.6670E-2)/3)*T*T*T
768 +((2.8000E-5)/4)*(T*T*T*T))/(58.44E3)- 2.045698e+02;
770 LhsEval m = 1E3 / 58.44 * S / (1 - S);
773 for (
int i = 0; i <=3; ++i) {
774 for (
int j = 0; j <= 2; ++j) {
775 d_h += a[i][j] * pow(theta,
static_cast<Scalar
>(i)) * pow(m, j);
779 delta_h = (4.184/(1E3 + (58.44 * m)))*d_h;
782 h_ls1 =(1-S)*hw + S*h_NaCl + S*delta_h;
785 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::NONE) {
790 LhsEval delta_hCO2, hg;
794 if (liquidMixType_ == Co2StoreConfig::LiquidMixingType::DUANSUN) {
795 delta_hCO2 = (-57.4375 + T * 0.1325) * 1000/44;
805 return (h_ls1 - X_CO2_w*hw + hg*X_CO2_w)*1E3;
808 template <
class LhsEval>
809 OPM_HOST_DEVICE
const LhsEval salinityFromConcentration(
unsigned regionIdx,
812 const LhsEval& saltConcentration)
const
814 if (enableSaltConcentration_) {
818 const LhsEval S_approx = saltConcentration / rho_w;
821 return saltConcentration / rho_brine;
828 template <
class ScalarT>
829 friend BrineCo2Pvt<ScalarT, gpuistl::GpuView>
830 gpuistl::make_view(BrineCo2Pvt<ScalarT, gpuistl::GpuBuffer>&);
833 ContainerT brineReferenceDensity_{};
834 ContainerT co2ReferenceDensity_{};
835 ContainerT salinity_{};
836 ContainerT ezrokhiDenNaClCoeff_{};
837 ContainerT ezrokhiDenCo2Coeff_{};
838 ContainerT ezrokhiViscNaClCoeff_{};
839 bool enableEzrokhiDensity_ =
false;
840 bool enableEzrokhiViscosity_ =
false;
841 bool enableDissolution_ =
true;
842 bool enableSaltConcentration_ =
false;
843 int activityModel_{};
844 Co2StoreConfig::LiquidMixingType liquidMixType_{};
845 Co2StoreConfig::SaltMixingType saltMixType_{};
852namespace Opm::gpuistl
855 template<
class ScalarT>
856 BrineCo2Pvt<ScalarT, GpuBuffer>
857 copy_to_gpu(
const BrineCo2Pvt<ScalarT>& cpuBrineCo2)
859 return BrineCo2Pvt<ScalarT, GpuBuffer>(
860 GpuBuffer<ScalarT>(cpuBrineCo2.getBrineReferenceDensity()),
861 GpuBuffer<ScalarT>(cpuBrineCo2.getCo2ReferenceDensity()),
862 GpuBuffer<ScalarT>(cpuBrineCo2.getSalinity()),
863 cpuBrineCo2.getActivityModel(),
864 cpuBrineCo2.getThermalMixingModelSalt(),
865 cpuBrineCo2.getThermalMixingModelLiquid(),
870 template <
class ScalarT>
871 BrineCo2Pvt<ScalarT, GpuView>
872 make_view(BrineCo2Pvt<ScalarT, GpuBuffer>& brineCo2Pvt)
875 using ContainedType = ScalarT;
881 return BrineCo2Pvt<ScalarT, GpuView>(
882 newBrineReferenceDensity,
883 newGasReferenceDensity,
885 brineCo2Pvt.getActivityModel(),
886 brineCo2Pvt.getThermalMixingModelSalt(),
887 brineCo2Pvt.getThermalMixingModelLiquid(),
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.
PiecewiseLinearTwoPhaseMaterialParams< TraitsT, GPUContainerType > copy_to_gpu(const PiecewiseLinearTwoPhaseMaterialParams< TraitsT > ¶ms)
Move a PiecewiseLinearTwoPhaseMaterialParams-object to the GPU.
Definition PiecewiseLinearTwoPhaseMaterialParams.hpp:285
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 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:48
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
This class represents the Pressure-Volume-Temperature relations of the liquid phase for a CO2-Brine s...
Definition BrineCo2Pvt.hpp:80
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:436
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:382
void initFromState(const EclipseState &eclState, const Schedule &)
Initialize the parameters for Brine-CO2 system using an ECL deck.
Definition BrineCo2Pvt.cpp:67
void setActivityModelSalt(int activityModel)
Set activity coefficient model for salt in solubility model.
Definition BrineCo2Pvt.cpp:171
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:256
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 initEnd()
Finish initializing the oil phase PVT properties.
Definition BrineCo2Pvt.hpp:156
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:313
void setThermalMixingModel(int thermalMixingModelSalt, int thermalMixingModelLiquid)
Set thermal mixing model for co2 in brine.
Definition BrineCo2Pvt.cpp:183
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 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:330
BinaryCoeff::Brine_CO2< Scalar, H2O, CO2 > BinaryCoeffBrineCO2
The binary coefficients for brine and CO2 used by this fluid system.
Definition BrineCo2Pvt.hpp:99
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:225
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:347
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:277
std::pair< LhsEval, LhsEval > inverseFormationVolumeFactorAndViscosity(const FluidState &fluidState, unsigned regionIdx)
Returns the formation volume factor [-] and viscosity [Pa s] of the fluid phase.
Definition BrineCo2Pvt.hpp:362
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:206
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:243
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:419
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition BrineCo2Pvt.hpp:195
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
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:450
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:400
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:292
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:464
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 liquid viscosity of the pure component.
Definition BrineDynamic.hpp:385
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
Definition CO2Tables.hpp:63
A class for the CO2 fluid properties.
Definition CO2.hpp:58
static OPM_HOST_DEVICE Scalar molarMass()
Definition CO2.hpp:73
static OPM_HOST_DEVICE Evaluation gasEnthalpy(const Params ¶ms, const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
Definition CO2.hpp:171
Definition Co2StoreConfig.hpp:33
static Scalar molarMass()
Definition Component.hpp:93
Definition EclipseState.hpp:66
Definition EzrokhiTable.hpp:57
Definition Schedule.hpp:101
A simple version of pure water with density from Hu et al.
Definition SimpleHuDuanH2O.hpp:66
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
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 Scalar molarMass()
The molar mass in of water.
Definition SimpleHuDuanH2O.hpp:103
static OPM_HOST_DEVICE Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &)
Specific enthalpy of liquid water .
Definition SimpleHuDuanH2O.hpp:202
Convience header to include the gpuistl headers if HAVE_CUDA is defined.
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Scalar Brine< Scalar, H2O >::salinity
Default value for the salinity of the brine (dimensionless).
Definition Brine.hpp:391