Merge pull request #87 from osae/hysteresis

Hysteresis.
This commit is contained in:
Atgeirr Flø Rasmussen 2014-03-04 10:30:07 +01:00
commit 3de050b19f
5 changed files with 28 additions and 5 deletions

View File

@ -1004,6 +1004,15 @@ namespace Opm
}
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

View File

@ -322,6 +322,11 @@ namespace Opm
const ADB& so,
const ADB& sg,
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:
RockFromDeck rock_;

View File

@ -315,6 +315,12 @@ namespace Opm
const ADB& so,
const ADB& sg,
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

View File

@ -68,7 +68,7 @@ namespace Opm
public:
Impl(const parameter::ParameterGroup& param,
const UnstructuredGrid& grid,
const BlackoilPropsAdInterface& props,
BlackoilPropsAdInterface& props,
const RockCompressibility* rock_comp_props,
WellsManager& wells_manager,
LinearSolverInterface& linsolver,
@ -92,7 +92,7 @@ namespace Opm
int max_well_control_iterations_;
// Observed objects.
const UnstructuredGrid& grid_;
const BlackoilPropsAdInterface& props_;
BlackoilPropsAdInterface& props_;
const RockCompressibility* rock_comp_props_;
WellsManager& wells_manager_;
const Wells* wells_;
@ -110,7 +110,7 @@ namespace Opm
SimulatorFullyImplicitBlackoil::SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
const UnstructuredGrid& grid,
const BlackoilPropsAdInterface& props,
BlackoilPropsAdInterface& props,
const RockCompressibility* rock_comp_props,
WellsManager& wells_manager,
LinearSolverInterface& linsolver,
@ -258,7 +258,7 @@ namespace Opm
// \TODO: Treat bcs.
SimulatorFullyImplicitBlackoil::Impl::Impl(const parameter::ParameterGroup& param,
const UnstructuredGrid& grid,
const BlackoilPropsAdInterface& props,
BlackoilPropsAdInterface& props,
const RockCompressibility* rock_comp_props,
WellsManager& wells_manager,
LinearSolverInterface& linsolver,
@ -409,6 +409,9 @@ namespace Opm
computePorevolume(grid_, props_.porosity(), *rock_comp_props_, state.pressure(), porevol);
}
// Hysteresis
props_.updateSatHyst(state.saturation(), allcells_);
sreport.total_time = step_timer.secsSinceStart();
if (output_) {
sreport.reportParam(tstep_os);

View File

@ -68,7 +68,7 @@ namespace Opm
/// \param[in] gravity if non-null, gravity vector
SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
const UnstructuredGrid& grid,
const BlackoilPropsAdInterface& props,
BlackoilPropsAdInterface& props,
const RockCompressibility* rock_comp_props,
WellsManager& wells_manager,
LinearSolverInterface& linsolver,