Add "Polymer" material and disable custom getConvergence().

This commit is contained in:
Atgeirr Flø Rasmussen 2015-09-30 14:49:15 +02:00
parent 6ef6dbcf5a
commit b885c8e454
2 changed files with 16 additions and 14 deletions

View File

@ -119,7 +119,7 @@ namespace Opm {
/// residual mass balance (tol_cnv).
/// \param[in] dt timestep length
/// \param[in] iteration current iteration number
bool getConvergence(const double dt, const int iteration);
// bool getConvergence(const double dt, const int iteration);
/// Assemble the residual and Jacobian of the nonlinear system.
/// \param[in] reservoir_state reservoir state variables
@ -275,16 +275,16 @@ namespace Opm {
/// of B for the phase i.
/// \param[in] nc The number of cells of the local grid.
/// \return The total pore volume over all cells.
double
convergenceReduction(const Eigen::Array<double, Eigen::Dynamic, MaxNumPhases+1>& B,
const Eigen::Array<double, Eigen::Dynamic, MaxNumPhases+1>& tempV,
const Eigen::Array<double, Eigen::Dynamic, MaxNumPhases+1>& R,
std::array<double,MaxNumPhases+1>& R_sum,
std::array<double,MaxNumPhases+1>& maxCoeff,
std::array<double,MaxNumPhases+1>& B_avg,
std::vector<double>& maxNormWell,
int nc,
int nw) const;
// double
// convergenceReduction(const Eigen::Array<double, Eigen::Dynamic, MaxNumPhases+1>& B,
// const Eigen::Array<double, Eigen::Dynamic, MaxNumPhases+1>& tempV,
// const Eigen::Array<double, Eigen::Dynamic, MaxNumPhases+1>& R,
// std::array<double,MaxNumPhases+1>& R_sum,
// std::array<double,MaxNumPhases+1>& maxCoeff,
// std::array<double,MaxNumPhases+1>& B_avg,
// std::vector<double>& maxNormWell,
// int nc,
// int nw) const;
/// Computing the water velocity without shear-thinning for the cell faces.
/// The water velocity will be used for shear-thinning calculation.

View File

@ -110,6 +110,7 @@ namespace Opm {
// If deck has polymer, residual_ should contain polymer equation.
rq_.resize(fluid_.numPhases() + 1);
residual_.material_balance_eq.resize(fluid_.numPhases() + 1, ADB::null());
Base::material_name_.push_back("Polymer");
assert(poly_pos_ == fluid_.numPhases());
}
}
@ -454,7 +455,7 @@ namespace Opm {
/*
template <class Grid>
double
BlackoilPolymerModel<Grid>::convergenceReduction(const Eigen::Array<double, Eigen::Dynamic, MaxNumPhases+1>& B,
@ -537,7 +538,7 @@ namespace Opm {
return geo_.poreVolume().sum();
}
}
*/
template <class Grid>
void
@ -629,7 +630,7 @@ namespace Opm {
/*
template <class Grid>
bool
BlackoilPolymerModel<Grid>::getConvergence(const double dt, const int iteration)
@ -742,6 +743,7 @@ namespace Opm {
}
return converged;
}
*/
template <class Grid>
ADB