mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Bugfix in calculation of adsorbed polymer for balance reports.
This commit is contained in:
@@ -189,19 +189,22 @@ namespace Opm
|
||||
|
||||
|
||||
/// @brief Computes total absorbed polymer mass over all grid cells.
|
||||
/// @param[in] props fluid and rock properties.
|
||||
/// @param[in] polyprops polymer properties
|
||||
/// @param[in] pv the pore volume by cell.
|
||||
/// @param[in] cmax max polymer concentration for cell
|
||||
/// @return total absorbed polymer mass.
|
||||
double computePolymerAdsorbed(const Opm::PolymerProperties& polyprops,
|
||||
double computePolymerAdsorbed(const IncompPropertiesInterface& props,
|
||||
const Opm::PolymerProperties& polyprops,
|
||||
const std::vector<double>& pv,
|
||||
const std::vector<double>& cmax)
|
||||
{
|
||||
const int num_cells = pv.size();
|
||||
const double rhor = polyprops.rockDensity();
|
||||
const double* poro = props.porosity();
|
||||
double abs_mass = 0.0;
|
||||
for (int cell = 0; cell < num_cells; ++cell) {
|
||||
abs_mass += polyprops.adsorbtion(cmax[cell])*pv[cell]*rhor;
|
||||
abs_mass += polyprops.adsorbtion(cmax[cell])*pv[cell]*((1.0 - poro[cell])/poro[cell])*rhor;
|
||||
}
|
||||
return abs_mass;
|
||||
}
|
||||
|
||||
@@ -103,11 +103,13 @@ namespace Opm
|
||||
const double dps);
|
||||
|
||||
/// @brief Computes total absorbed polymer mass over all grid cells.
|
||||
/// @param[in] props fluid and rock properties.
|
||||
/// @param[in] polyprops polymer properties
|
||||
/// @param[in] pv the pore volume by cell.
|
||||
/// @param[in] cmax max polymer concentration for cell
|
||||
/// @return total absorbed polymer mass.
|
||||
double computePolymerAdsorbed(const Opm::PolymerProperties& polyprops,
|
||||
double computePolymerAdsorbed(const IncompPropertiesInterface& props,
|
||||
const Opm::PolymerProperties& polyprops,
|
||||
const std::vector<double>& pv,
|
||||
const std::vector<double>& cmax);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user