adding shear calculation to the polymer simulation.

This commit is contained in:
Kai Bao 2017-07-31 17:11:44 +02:00
parent d4fa8c06f1
commit c1ee941195
2 changed files with 10 additions and 4 deletions

View File

@ -57,6 +57,7 @@ namespace Opm
SFrac = 3 SFrac = 3
}; };
using typename WellInterface<TypeTag>::Scalar;
using typename WellInterface<TypeTag>::VectorBlockType; using typename WellInterface<TypeTag>::VectorBlockType;
using typename WellInterface<TypeTag>::MatrixBlockType; using typename WellInterface<TypeTag>::MatrixBlockType;
using typename WellInterface<TypeTag>::Mat; using typename WellInterface<TypeTag>::Mat;
@ -196,6 +197,10 @@ namespace Opm
using WellInterface<TypeTag>::perf_depth_; using WellInterface<TypeTag>::perf_depth_;
using WellInterface<TypeTag>::allow_cf_; using WellInterface<TypeTag>::allow_cf_;
using WellInterface<TypeTag>::perf_rep_radius_;
using WellInterface<TypeTag>::perf_length_;
using WellInterface<TypeTag>::bore_diameters_;
// densities of the fluid in each perforation // densities of the fluid in each perforation
std::vector<double> perf_densities_; std::vector<double> perf_densities_;
// pressure drop between different perforations // pressure drop between different perforations

View File

@ -808,14 +808,15 @@ namespace Opm
mob[ Water ] /= (extendEval(intQuants.waterViscosityCorrection()) * viscosityMultiplier.eval(polymerConcentration, /*extrapolate=*/true) ); mob[ Water ] /= (extendEval(intQuants.waterViscosityCorrection()) * viscosityMultiplier.eval(polymerConcentration, /*extrapolate=*/true) );
} }
/* if (PolymerModule::hasPlyshlog()) { if (PolymerModule::hasPlyshlog()) {
// compute the well water velocity with out shear effects. // compute the well water velocity with out shear effects.
const int numComp = numComponents(); const int numComp = numComponents();
const bool allow_cf = crossFlowAllowed(ebosSimulator); const bool allow_cf = crossFlowAllowed(ebosSimulator);
const EvalWell& bhp = getBhp(); const EvalWell& bhp = getBhp();
std::vector<EvalWell> cq_s(numComp,0.0); std::vector<EvalWell> cq_s(numComp,0.0);
computePerfRate(intQuants, mob, wellIndex()[perf], bhp, perfPressureDiffs()[perf], allow_cf, cq_s); computePerfRate(intQuants, mob, wellIndex()[perf], bhp, perfPressureDiffs()[perf], allow_cf, cq_s);
double area = 2 * M_PI * wells_rep_radius_[perf] * wells_perf_length_[perf]; // TODO: make area a member
double area = 2 * M_PI * perf_rep_radius_[perf] * perf_length_[perf];
const auto& materialLawManager = ebosSimulator.problem().materialLawManager(); const auto& materialLawManager = ebosSimulator.problem().materialLawManager();
const auto& scaledDrainageInfo = const auto& scaledDrainageInfo =
materialLawManager->oilWaterScaledEpsInfoDrainage(cell_idx); materialLawManager->oilWaterScaledEpsInfoDrainage(cell_idx);
@ -830,7 +831,7 @@ namespace Opm
// TODO Use the same conversion as for the reservoar equations. // TODO Use the same conversion as for the reservoar equations.
// Need the "permeability" of the well? // Need the "permeability" of the well?
// For now use the same formula as in legacy. // For now use the same formula as in legacy.
waterVelocity *= PolymerModule::shrate( intQuants.pvtRegionIndex() ) / wells_bore_diameter_[perf]; waterVelocity *= PolymerModule::shrate( intQuants.pvtRegionIndex() ) / bore_diameters_[perf];
} }
EvalWell polymerConcentration = extendEval(intQuants.polymerConcentration()); EvalWell polymerConcentration = extendEval(intQuants.polymerConcentration());
EvalWell shearFactor = PolymerModule::computeShearFactor(polymerConcentration, EvalWell shearFactor = PolymerModule::computeShearFactor(polymerConcentration,
@ -839,7 +840,7 @@ namespace Opm
// modify the mobility with the shear factor and recompute the well fluxes. // modify the mobility with the shear factor and recompute the well fluxes.
mob[ Water ] /= shearFactor; mob[ Water ] /= shearFactor;
} */ }
} }
} }