mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-14 09:52:01 -05:00
Add support for TLMIXPAR
Add support for Todd-Longstaff mixing paramters
This commit is contained in:
1 parent
38c8cd981e
commit
17554b4921
2 files changed
+43
No files matched your search
@@ -247,6 +247,31 @@ SolventPropsAdFromDeck::SolventPropsAdFromDeck(DeckConstPtr deck,
|
||||
}
|
||||
}
|
||||
|
||||
if (deck->hasKeyword("TLMIXPAR")) {
|
||||
const auto tlmixparRecord = deck->getKeyword("TLMIXPAR")->getRecord(0);
|
||||
std::vector<double> mix_params_viscosity = tlmixparRecord->getItem("TL_VISCOSITY_PARAMETER")->getSIDoubleData();
|
||||
const int numRegions = mix_params_viscosity.size();
|
||||
if (numRegions > 1) {
|
||||
OPM_THROW(std::runtime_error, "Only singel miscibility region is supported for TLMIXPAR.");
|
||||
}
|
||||
mix_param_viscosity_ = mix_params_viscosity[0];
|
||||
|
||||
std::vector<double> mix_params_density = tlmixparRecord->getItem("TL_DENSITY_PARAMETER")->getSIDoubleData();
|
||||
const int numDensityItems = mix_params_density.size();
|
||||
if (numDensityItems == 0) {
|
||||
mix_param_density_ = mix_param_viscosity_;
|
||||
} else if (numDensityItems == 1) {
|
||||
mix_param_density_ = mix_params_density[0];
|
||||
} else {
|
||||
OPM_THROW(std::runtime_error, "Only singel miscibility region is supported for TLMIXPAR.");
|
||||
}
|
||||
} else {
|
||||
mix_param_viscosity_ = 0.0;
|
||||
mix_param_density_ = 0.0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,4 +410,13 @@ V SolventPropsAdFromDeck::solventSurfaceDensity(const Cells& cells) const {
|
||||
return density;
|
||||
}
|
||||
|
||||
double SolventPropsAdFromDeck::mixingParamterViscosity() const {
|
||||
return mix_param_viscosity_;
|
||||
}
|
||||
|
||||
double SolventPropsAdFromDeck::mixingParamterDensity() const {
|
||||
return mix_param_density_;
|
||||
}
|
||||
|
||||
|
||||
} //namespace OPM
|
||||
@@ -127,6 +127,13 @@ public:
|
||||
/// \return Array of n solvent density values.
|
||||
V solventSurfaceDensity(const Cells& cells) const;
|
||||
|
||||
/// Todd-Longstaff mixing paramter for viscosity calculation
|
||||
double mixingParamterViscosity() const;
|
||||
|
||||
/// Todd-Longstaff mixing paramter for density calculation
|
||||
double mixingParamterDensity() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
ADB makeAD(const ADB& X, const Cells& cells, std::vector<NonuniformTableLinear<double> > table) const;
|
||||
@@ -145,6 +152,8 @@ private:
|
||||
std::vector<NonuniformTableLinear<double> > misc_;
|
||||
std::vector<NonuniformTableLinear<double> > sorwmis_;
|
||||
std::vector<NonuniformTableLinear<double> > sgcwmis_;
|
||||
double mix_param_viscosity_;
|
||||
double mix_param_density_;
|
||||
};
|
||||
|
||||
} // namespace OPM
|
||||
|
||||
Reference in new issue
Block a user