Merge pull request #4791 from svenn-t/aquifer_h2store

Enable aquifers with H2STORE
This commit is contained in:
Bård Skaflestad
2023-08-12 13:42:16 +02:00
committed by GitHub
6 changed files with 23 additions and 22 deletions

View File

@@ -246,7 +246,7 @@ protected:
int compIdx_() const
{
if (this->co2store_())
if (this->co2store_or_h2store_())
return FluidSystem::oilCompIdx;
return FluidSystem::waterCompIdx;

View File

@@ -104,7 +104,7 @@ public:
aquCT->dimensionless_pressure = this->dimensionless_pressure_;
aquCT->influxConstant = this->aquct_data_.influxConstant();
if (!this->co2store_()) {
if (!this->co2store_or_h2store_()) {
aquCT->timeConstant = this->aquct_data_.timeConstant();
aquCT->waterDensity = this->aquct_data_.waterDensity();
aquCT->waterViscosity = this->aquct_data_.waterViscosity();
@@ -217,7 +217,7 @@ protected:
void calculateAquiferConstants() override
{
this->Tc_ = this->co2store_()
this->Tc_ = this->co2store_or_h2store_()
? this->timeConstantCO2Store()
: this->aquct_data_.timeConstant();
@@ -245,7 +245,7 @@ protected:
this->Ta0_ = this->aquct_data_.initial_temperature.value();
}
this->rhow_ = this->co2store_()
this->rhow_ = this->co2store_or_h2store_()
? this->waterDensityCO2Store()
: this->aquct_data_.waterDensity();
}

View File

@@ -214,7 +214,7 @@ private:
// TODO: this is a function from AquiferAnalytical
int compIdx_() const
{
if (this->co2store_())
if (this->co2store_or_h2store_())
return FluidSystem::oilCompIdx;
return FluidSystem::waterCompIdx;

View File

@@ -78,15 +78,16 @@ public:
int aquiferID() const { return this->aquiferID_; }
protected:
bool co2store_() const
bool co2store_or_h2store_() const
{
return ebos_simulator_.vanguard().eclState().runspec().co2Storage();
const auto& rspec = ebos_simulator_.vanguard().eclState().runspec();
return rspec.co2Storage() || rspec.h2Storage();
}
int phaseIdx_() const
{
// If OIL is used to model brine the aquifer should do the same
if (co2store_() && FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx))
if (co2store_or_h2store_() && FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx))
return FluidSystem::oilPhaseIdx;
return FluidSystem::waterPhaseIdx;