mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Silence multiple warnings.
This commit is contained in:
@@ -354,7 +354,7 @@ namespace Opm {
|
||||
const ADB mu = fluidViscosity(canonicalPhaseIdx, phasePressure, state.temperature, state.rs, state.rv, cond, cells_);
|
||||
const ADB cmax = ADB::constant(cmax_, state.concentration.blockPattern());
|
||||
const ADB mc = computeMc(state);
|
||||
const ADB krw_eff = polymer_props_ad_.effectiveRelPerm(state.concentration, cmax, kr, state.saturation[actph]);
|
||||
const ADB krw_eff = polymer_props_ad_.effectiveRelPerm(state.concentration, cmax, kr);
|
||||
const ADB inv_wat_eff_visc = polymer_props_ad_.effectiveInvWaterVisc(state.concentration, mu.value().data());
|
||||
// Reduce mobility of water phase by relperm reduction and effective viscosity increase.
|
||||
rq_[actph].mob = tr_mult * krw_eff * inv_wat_eff_visc;
|
||||
@@ -404,7 +404,7 @@ namespace Opm {
|
||||
|
||||
for ( int idx=0; idx<MaxNumPhases+1; ++idx )
|
||||
{
|
||||
if (idx == MaxNumPhases || active_[idx]) { // Dealing with polymer *or* an active phase.
|
||||
if ((idx == MaxNumPhases && has_polymer_) || active_[idx]) { // Dealing with polymer *or* an active phase.
|
||||
auto values = std::tuple<double,double,double>(0.0 ,0.0 ,0.0);
|
||||
auto containers = std::make_tuple(B.col(idx),
|
||||
tempV.col(idx),
|
||||
@@ -430,7 +430,6 @@ namespace Opm {
|
||||
}
|
||||
info.communicator().max(&maxNormWell[0], MaxNumPhases+1);
|
||||
// Compute pore volume
|
||||
#warning Missing polymer code for MPI version
|
||||
return std::get<1>(nc_and_pv);
|
||||
}
|
||||
else
|
||||
@@ -438,9 +437,9 @@ namespace Opm {
|
||||
{
|
||||
for ( int idx=0; idx<MaxNumPhases+1; ++idx )
|
||||
{
|
||||
if (idx == MaxNumPhases || active_[idx]) { // Dealing with polymer *or* an active phase.
|
||||
if ((idx == MaxNumPhases && has_polymer_) || active_[idx]) { // Dealing with polymer *or* an active phase.
|
||||
B_avg[idx] = B.col(idx).sum()/nc;
|
||||
maxCoeff[idx]=tempV.col(idx).maxCoeff();
|
||||
maxCoeff[idx] = tempV.col(idx).maxCoeff();
|
||||
R_sum[idx] = R.col(idx).sum();
|
||||
}
|
||||
else
|
||||
@@ -454,11 +453,6 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (has_polymer_) {
|
||||
B_avg[MaxNumPhases] = B.col(MaxNumPhases).sum()/nc;
|
||||
maxCoeff[MaxNumPhases]=tempV.col(MaxNumPhases).maxCoeff();
|
||||
R_sum[MaxNumPhases] = R.col(MaxNumPhases).sum();
|
||||
}
|
||||
// Compute total pore volume
|
||||
return geo_.poreVolume().sum();
|
||||
}
|
||||
|
||||
@@ -407,8 +407,8 @@ namespace {
|
||||
// Initial saturation.
|
||||
assert (not x.saturation().empty());
|
||||
const DataBlock s = Eigen::Map<const DataBlock>(& x.saturation()[0], nc, np);
|
||||
const V sw = s.col(0);
|
||||
vars0.push_back(sw);
|
||||
const V sw0 = s.col(0);
|
||||
vars0.push_back(sw0);
|
||||
|
||||
// Initial concentration.
|
||||
assert (not x.concentration().empty());
|
||||
@@ -542,7 +542,7 @@ namespace {
|
||||
const V trans = subset(geo_.transmissibility(), ops_.internal_faces);
|
||||
const std::vector<ADB> kr = computeRelPerm(state);
|
||||
const ADB cmax = ADB::constant(cmax_, state.concentration.blockPattern());
|
||||
const ADB krw_eff = polymer_props_ad_.effectiveRelPerm(state.concentration, cmax, kr[0], state.saturation[0]);
|
||||
const ADB krw_eff = polymer_props_ad_.effectiveRelPerm(state.concentration, cmax, kr[0]);
|
||||
const ADB mc = computeMc(state);
|
||||
computeMassFlux(trans, mc, kr[1], krw_eff, state);
|
||||
residual_.material_balance_eq[0] = pvdt*(rq_[0].accum[1] - rq_[0].accum[0])
|
||||
@@ -803,27 +803,6 @@ namespace {
|
||||
|
||||
|
||||
|
||||
std::vector<ADB>
|
||||
FullyImplicitCompressiblePolymerSolver::computeRelPermWells(const SolutionState& state,
|
||||
const DataBlock& well_s,
|
||||
const std::vector<int>& well_cells) const
|
||||
{
|
||||
const int nw = wells_.number_of_wells;
|
||||
const int nperf = wells_.well_connpos[nw];
|
||||
const std::vector<int>& bpat = state.pressure.blockPattern();
|
||||
|
||||
const ADB null = ADB::constant(V::Zero(nperf), bpat);
|
||||
|
||||
const ADB sw = state.saturation[0];
|
||||
const ADB so = state.saturation[1];
|
||||
const ADB sg = null;
|
||||
return fluid_.relperm(sw, so, sg, well_cells);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::vector<ADB>
|
||||
FullyImplicitCompressiblePolymerSolver::
|
||||
computePressures(const SolutionState& state) const
|
||||
|
||||
@@ -178,11 +178,7 @@ namespace Opm {
|
||||
computeRelPerm(const SolutionState& state) const;
|
||||
|
||||
std::vector<ADB>
|
||||
computeRelPermWells(const SolutionState& state,
|
||||
const DataBlock& well_s,
|
||||
const std::vector<int>& well_cells) const;
|
||||
std::vector<ADB>
|
||||
computePressures(const SolutionState& state) const;
|
||||
computePressures(const SolutionState& state) const;
|
||||
|
||||
void
|
||||
computeMassFlux(const int actph ,
|
||||
|
||||
@@ -244,8 +244,7 @@ namespace Opm {
|
||||
ADB
|
||||
PolymerPropsAd::effectiveRelPerm(const ADB& c,
|
||||
const ADB& cmax_cells,
|
||||
const ADB& krw,
|
||||
const ADB& sw) const
|
||||
const ADB& krw) const
|
||||
{
|
||||
const int nc = c.value().size();
|
||||
V one = V::Ones(nc);
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Opm {
|
||||
/// \param[in] relperm Array of n relative water relperm values.
|
||||
/// \return Array of n adsorption values.
|
||||
ADB
|
||||
effectiveRelPerm(const ADB& c, const ADB& cmax_cells, const ADB& krw, const ADB& sw) const;
|
||||
effectiveRelPerm(const ADB& c, const ADB& cmax_cells, const ADB& krw) const;
|
||||
|
||||
private:
|
||||
const PolymerProperties& polymer_props_;
|
||||
|
||||
@@ -93,18 +93,18 @@ namespace Opm
|
||||
public:
|
||||
/// Initialise from parameters and objects to observe.
|
||||
SimulatorFullyImplicitCompressiblePolymer(const parameter::ParameterGroup& param,
|
||||
const GridT& grid,
|
||||
const GridT& grid,
|
||||
const DerivedGeology& geo,
|
||||
BlackoilPropsAdInterface& props,
|
||||
const PolymerPropsAd& polymer_props,
|
||||
const RockCompressibility* rock_comp_props,
|
||||
BlackoilPropsAdInterface& props,
|
||||
const PolymerPropsAd& polymer_props,
|
||||
const RockCompressibility* rock_comp_props,
|
||||
std::shared_ptr<EclipseState> eclipse_state,
|
||||
BlackoilOutputWriter& output_writer,
|
||||
Opm::DeckConstPtr& deck,
|
||||
NewtonIterationBlackoilInterface& linsolver,
|
||||
const double* gravity);
|
||||
NewtonIterationBlackoilInterface& linsolver,
|
||||
const double* gravity);
|
||||
|
||||
Solver* createSolver(const Wells* wells);
|
||||
std::unique_ptr<Solver> createSolver(const Wells* wells);
|
||||
|
||||
void handleAdditionalWellInflow(SimulatorTimer& timer,
|
||||
WellsManager& wells_manager,
|
||||
|
||||
@@ -58,15 +58,15 @@ SimulatorFullyImplicitCompressiblePolymer(const parameter::ParameterGroup& param
|
||||
template <class GridT>
|
||||
auto SimulatorFullyImplicitCompressiblePolymer<GridT>::
|
||||
createSolver(const Wells* wells)
|
||||
-> Solver*
|
||||
-> std::unique_ptr<Solver>
|
||||
{
|
||||
return new Solver(BaseType::grid_,
|
||||
BaseType::props_,
|
||||
BaseType::geo_,
|
||||
BaseType::rock_comp_props_,
|
||||
polymer_props_,
|
||||
*wells,
|
||||
BaseType::solver_);
|
||||
return std::unique_ptr<Solver>(new Solver(BaseType::grid_,
|
||||
BaseType::props_,
|
||||
BaseType::geo_,
|
||||
BaseType::rock_comp_props_,
|
||||
polymer_props_,
|
||||
*wells,
|
||||
BaseType::solver_));
|
||||
}
|
||||
|
||||
template <class GridT>
|
||||
|
||||
Reference in New Issue
Block a user