Skip to content

Commit

Permalink
-add blockoutput of stress
Browse files Browse the repository at this point in the history
  • Loading branch information
hnil authored and bska committed Dec 17, 2024
1 parent 79dbed4 commit 2ec3650
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion opm/simulators/flow/OutputBlackoilModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class OutputBlackOilModule : public GenericOutputBlackoilModule<GetPropType<Type
this->forceDisableFipresvOutput_ =
Parameters::Get<Parameters::ForceDisableResvFluidInPlaceOutput>();

if (! Parameters::Get<Parameters::OwnerCellsFirst>()) {
if (!Parameters::Get<Parameters::OwnerCellsFirst>()){// && !Parameters::Get<Parameters::EnableEclOutput>()) {
const std::string msg = "The output code does not support --owner-cells-first=false.";
if (collectToIORank.isIORank()) {
OpmLog::error(msg);
Expand Down Expand Up @@ -882,6 +882,42 @@ class OutputBlackOilModule : public GenericOutputBlackoilModule<GetPropType<Type
else if (FluidSystem::phaseIsActive(waterPhaseIdx))
val.second = getValue(fs.temperature(waterPhaseIdx));
}
else if (key.first == "BSTRSSXX")
{
const auto& model = problem.geoMechModel();
auto stress = model.stress(globalDofIdx,/*include_fracture*/true);
val.second = stress[0];
}
else if (key.first == "BSTRSSYY")
{
const auto& model = problem.geoMechModel();
auto stress = model.stress(globalDofIdx,/*include_fracture*/true);
val.second = stress[1];
}
else if (key.first == "BSTRSSZZ")
{
const auto& model = problem.geoMechModel();
auto stress = model.stress(globalDofIdx,/*include_fracture*/true);
val.second = stress[2];
}
else if (key.first == "BSTRSSXY")
{
const auto& model = problem.geoMechModel();
auto stress = model.stress(globalDofIdx,/*include_fracture*/true);
val.second = stress[5];
}
else if (key.first == "BSTRSSXZ")
{
const auto& model = problem.geoMechModel();
auto stress = model.stress(globalDofIdx,/*include_fracture*/true);
val.second = stress[4];
}
else if (key.first == "BSTRSSYZ")
{
const auto& model = problem.geoMechModel();
auto stress = model.stress(globalDofIdx,/*include_fracture*/true);
val.second = stress[3];
}
else if (key.first == "BWKR" || key.first == "BKRW")
val.second = getValue(intQuants.relativePermeability(waterPhaseIdx));
else if (key.first == "BGKR" || key.first == "BKRG")
Expand Down

0 comments on commit 2ec3650

Please sign in to comment.