mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Hysteresis.
SimulatorFullyImplicitBlackoil reports saturation values at each completed time-step, allowing detection of hysteris behavior.
This commit is contained in:
@@ -905,6 +905,15 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
return adbCapPressures;
|
return adbCapPressures;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Saturation update for hysteresis behavior.
|
||||||
|
/// \param[in] cells Array of n cell indices to be associated with the saturation values.
|
||||||
|
void BlackoilPropsAdFromDeck::updateSatHyst(const std::vector<double>& saturation,
|
||||||
|
const std::vector<int>& cells)
|
||||||
|
{
|
||||||
|
const int n = cells.size();
|
||||||
|
satprops_->updateSatHyst(n, cells.data(), saturation.data());
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|
||||||
|
@@ -314,6 +314,11 @@ namespace Opm
|
|||||||
const ADB& so,
|
const ADB& so,
|
||||||
const ADB& sg,
|
const ADB& sg,
|
||||||
const Cells& cells) const;
|
const Cells& cells) const;
|
||||||
|
|
||||||
|
/// Saturation update for hysteresis behavior.
|
||||||
|
/// \param[in] cells Array of n cell indices to be associated with the saturation values.
|
||||||
|
void updateSatHyst(const std::vector<double>& saturation,
|
||||||
|
const std::vector<int>& cells);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RockFromDeck rock_;
|
RockFromDeck rock_;
|
||||||
|
@@ -315,6 +315,12 @@ namespace Opm
|
|||||||
const ADB& so,
|
const ADB& so,
|
||||||
const ADB& sg,
|
const ADB& sg,
|
||||||
const Cells& cells) const = 0;
|
const Cells& cells) const = 0;
|
||||||
|
|
||||||
|
/// Saturation update for hysteresis behavior.
|
||||||
|
/// \param[in] cells Array of n cell indices to be associated with the saturation values.
|
||||||
|
virtual
|
||||||
|
void updateSatHyst(const std::vector<double>& saturation,
|
||||||
|
const std::vector<int>& cells) {assert(false); } // Please implement me ...
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@@ -68,7 +68,7 @@ namespace Opm
|
|||||||
public:
|
public:
|
||||||
Impl(const parameter::ParameterGroup& param,
|
Impl(const parameter::ParameterGroup& param,
|
||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
const BlackoilPropsAdInterface& props,
|
BlackoilPropsAdInterface& props,
|
||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
WellsManager& wells_manager,
|
WellsManager& wells_manager,
|
||||||
LinearSolverInterface& linsolver,
|
LinearSolverInterface& linsolver,
|
||||||
@@ -92,7 +92,7 @@ namespace Opm
|
|||||||
int max_well_control_iterations_;
|
int max_well_control_iterations_;
|
||||||
// Observed objects.
|
// Observed objects.
|
||||||
const UnstructuredGrid& grid_;
|
const UnstructuredGrid& grid_;
|
||||||
const BlackoilPropsAdInterface& props_;
|
BlackoilPropsAdInterface& props_;
|
||||||
const RockCompressibility* rock_comp_props_;
|
const RockCompressibility* rock_comp_props_;
|
||||||
WellsManager& wells_manager_;
|
WellsManager& wells_manager_;
|
||||||
const Wells* wells_;
|
const Wells* wells_;
|
||||||
@@ -110,7 +110,7 @@ namespace Opm
|
|||||||
|
|
||||||
SimulatorFullyImplicitBlackoil::SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
|
SimulatorFullyImplicitBlackoil::SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
|
||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
const BlackoilPropsAdInterface& props,
|
BlackoilPropsAdInterface& props,
|
||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
WellsManager& wells_manager,
|
WellsManager& wells_manager,
|
||||||
LinearSolverInterface& linsolver,
|
LinearSolverInterface& linsolver,
|
||||||
@@ -258,7 +258,7 @@ namespace Opm
|
|||||||
// \TODO: Treat bcs.
|
// \TODO: Treat bcs.
|
||||||
SimulatorFullyImplicitBlackoil::Impl::Impl(const parameter::ParameterGroup& param,
|
SimulatorFullyImplicitBlackoil::Impl::Impl(const parameter::ParameterGroup& param,
|
||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
const BlackoilPropsAdInterface& props,
|
BlackoilPropsAdInterface& props,
|
||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
WellsManager& wells_manager,
|
WellsManager& wells_manager,
|
||||||
LinearSolverInterface& linsolver,
|
LinearSolverInterface& linsolver,
|
||||||
@@ -408,6 +408,9 @@ namespace Opm
|
|||||||
computePorevolume(grid_, props_.porosity(), *rock_comp_props_, state.pressure(), porevol);
|
computePorevolume(grid_, props_.porosity(), *rock_comp_props_, state.pressure(), porevol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hysteresis
|
||||||
|
props_.updateSatHyst(state.saturation(), allcells_);
|
||||||
|
|
||||||
sreport.total_time = step_timer.secsSinceStart();
|
sreport.total_time = step_timer.secsSinceStart();
|
||||||
if (output_) {
|
if (output_) {
|
||||||
sreport.reportParam(tstep_os);
|
sreport.reportParam(tstep_os);
|
||||||
|
@@ -68,7 +68,7 @@ namespace Opm
|
|||||||
/// \param[in] gravity if non-null, gravity vector
|
/// \param[in] gravity if non-null, gravity vector
|
||||||
SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
|
SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
|
||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
const BlackoilPropsAdInterface& props,
|
BlackoilPropsAdInterface& props,
|
||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
WellsManager& wells_manager,
|
WellsManager& wells_manager,
|
||||||
LinearSolverInterface& linsolver,
|
LinearSolverInterface& linsolver,
|
||||||
|
Reference in New Issue
Block a user