mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixing some compilation error after rebase.
while a lot of new stuff have not entered, since many of the essential parts are in different files now. Rebasing will not incoporate the new stuff automatically.
This commit is contained in:
@@ -48,6 +48,7 @@ namespace Opm
|
||||
using FluidSystem = typename WellInterface<TypeTag>::FluidSystem;
|
||||
using MaterialLaw = typename WellInterface<TypeTag>::MaterialLaw;
|
||||
using ModelParameters = typename WellInterface<TypeTag>::ModelParameters;
|
||||
using BlackoilIndices = typename WellInterface<TypeTag>::BlackoilIndices;
|
||||
|
||||
// the positions of the primary variables for StandardWell
|
||||
// there are three primary variables, the second and the third ones are F_w and F_g
|
||||
@@ -61,9 +62,11 @@ namespace Opm
|
||||
|
||||
typedef double Scalar;
|
||||
// static const int numEq = BlackoilIndices::numEq;
|
||||
static const int numEq = 3;
|
||||
static const int numWellEq = numEq; //number of wellEq is the same as numEq in the model
|
||||
static const int solventCompIdx = 3; //TODO get this from ebos
|
||||
static const int numEq = BlackoilIndices::numEq;
|
||||
static const int numWellEq = GET_PROP_VALUE(TypeTag, EnablePolymer)? 3:numEq; // //numEq; //number of wellEq is only for 3 for polymer
|
||||
static const int contiSolventEqIdx = BlackoilIndices::contiSolventEqIdx;
|
||||
static const int contiPolymerEqIdx = BlackoilIndices::contiPolymerEqIdx;
|
||||
|
||||
typedef Dune::FieldVector<Scalar, numEq > VectorBlockType;
|
||||
typedef Dune::FieldMatrix<Scalar, numEq, numEq > MatrixBlockType;
|
||||
typedef Dune::BCRSMatrix <MatrixBlockType> Mat;
|
||||
@@ -71,24 +74,6 @@ namespace Opm
|
||||
typedef DenseAd::Evaluation<double, /*size=*/numEq + numWellEq> EvalWell;
|
||||
typedef DenseAd::Evaluation<double, /*size=*/numEq> Eval;
|
||||
|
||||
// for now, using the matrix and block version in StandardWellsDense.
|
||||
// TODO: for bettern generality, it should contain blocksize_field and blocksize_well.
|
||||
// They are allowed to be different and it will create four types of matrix blocks and two types of
|
||||
// vector blocks.
|
||||
|
||||
/* const static int blocksize = 3;
|
||||
typedef double Scalar;
|
||||
typedef Dune::FieldVector<Scalar, blocksize > VectorBlockType;
|
||||
typedef Dune::FieldMatrix<Scalar, blocksize, blocksize > MatrixBlockType;
|
||||
typedef Dune::BCRSMatrix <MatrixBlockType> Mat;
|
||||
typedef Dune::BlockVector<VectorBlockType> BVector;
|
||||
typedef DenseAd::Evaluation<double, blocksize + blocksize> EvalWell; */
|
||||
/* using WellInterface::EvalWell;
|
||||
using WellInterface::BVector;
|
||||
using WellInterface::Mat;
|
||||
using WellInterface::MatrixBlockType;
|
||||
using WellInterface::VectorBlockType; */
|
||||
|
||||
StandardWell(const Well* well, const int time_step, const Wells* wells);
|
||||
|
||||
/// the densities of the fluid in each perforation
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace Opm
|
||||
/* if (has_solvent_ ) {
|
||||
// TODO: investigate whether the use of the comp_frac is justified.
|
||||
double comp_frac = 0.0;
|
||||
if (compIdx == solventCompIdx) { // solvent
|
||||
if (compIdx == contiSolventEqIdx) { // solvent
|
||||
comp_frac = wells().comp_frac[np*wellIdx + pu.phase_pos[ Gas ]] * wsolvent(wellIdx);
|
||||
} else if (compIdx == pu.phase_pos[ Gas ]) {
|
||||
comp_frac = wells().comp_frac[np*wellIdx + compIdx] * (1.0 - wsolvent(wellIdx));
|
||||
@@ -306,7 +306,7 @@ namespace Opm
|
||||
// TODO: handling solvent related later
|
||||
/* if (has_solvent_ && phase_under_control == Gas) {
|
||||
// for GRAT controlled wells solvent is included in the target
|
||||
wellVolumeFractionScaledPhaseUnderControl += wellVolumeFractionScaled(solventCompIdx);
|
||||
wellVolumeFractionScaledPhaseUnderControl += wellVolumeFractionScaled(contiSolventEqIdx);
|
||||
} */
|
||||
|
||||
if (phase == phase_under_control) {
|
||||
@@ -368,7 +368,7 @@ namespace Opm
|
||||
const WellControls* wc = wellControls();
|
||||
if (well_controls_get_current_type(wc) == RESERVOIR_RATE) {
|
||||
|
||||
if (has_solvent && compIdx == solventCompIdx) {
|
||||
if (has_solvent && compIdx == contiSolventEqIdx) {
|
||||
return wellVolumeFraction(compIdx);
|
||||
}
|
||||
const double* distr = well_controls_get_current_distr(wc);
|
||||
@@ -403,7 +403,7 @@ namespace Opm
|
||||
return well_variables_[GFrac];
|
||||
}
|
||||
|
||||
if (compIdx == solventCompIdx) {
|
||||
if (compIdx == contiSolventEqIdx) {
|
||||
return well_variables_[SFrac];
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ namespace Opm
|
||||
b_perfcells_dense[phase] = extendEval(fs.invB(ebosPhaseIdx));
|
||||
}
|
||||
if (has_solvent) {
|
||||
b_perfcells_dense[solventCompIdx] = extendEval(intQuants.solventInverseFormationVolumeFactor());
|
||||
b_perfcells_dense[contiSolventEqIdx] = extendEval(intQuants.solventInverseFormationVolumeFactor());
|
||||
}
|
||||
|
||||
// Pressure drawdown (also used to determine direction of flow)
|
||||
@@ -541,7 +541,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
if (has_solvent) {
|
||||
volumeRatio += cmix_s[solventCompIdx] / b_perfcells_dense[solventCompIdx];
|
||||
volumeRatio += cmix_s[contiSolventEqIdx] / b_perfcells_dense[contiSolventEqIdx];
|
||||
}
|
||||
|
||||
if (active()[Oil] && active()[Gas]) {
|
||||
@@ -657,7 +657,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
// Store the perforation phase flux for later usage.
|
||||
if (componentIdx == solventCompIdx) {// if (flowPhaseToEbosCompIdx(componentIdx) == Solvent)
|
||||
if (componentIdx == contiSolventEqIdx) {// if (flowPhaseToEbosCompIdx(componentIdx) == Solvent)
|
||||
well_state.perfRateSolvent()[perf] = cq_s[componentIdx].value();
|
||||
} else {
|
||||
well_state.perfPhaseRates()[perf*np + componentIdx] = cq_s[componentIdx].value();
|
||||
@@ -750,7 +750,7 @@ namespace Opm
|
||||
mob[phase] = extendEval(intQuants.mobility(ebosPhaseIdx));
|
||||
}
|
||||
if (has_solvent) {
|
||||
mob[solventCompIdx] = extendEval(intQuants.solventMobility());
|
||||
mob[contiSolventEqIdx] = extendEval(intQuants.solventMobility());
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1518,8 +1518,8 @@ namespace Opm
|
||||
|
||||
// We use cell values for solvent injector
|
||||
if (has_solvent) {
|
||||
b_perf[numComp*perf + solventCompIdx] = intQuants.solventInverseFormationVolumeFactor().value();
|
||||
surf_dens_perf[numComp*perf + solventCompIdx] = intQuants.solventRefDensity();
|
||||
b_perf[numComp*perf + contiSolventEqIdx] = intQuants.solventInverseFormationVolumeFactor().value();
|
||||
surf_dens_perf[numComp*perf + contiSolventEqIdx] = intQuants.solventRefDensity();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1764,7 +1764,7 @@ namespace Opm
|
||||
perfRates[perf*numComponent + phase] = xw.perfPhaseRates()[(first_perf_ + perf) * np + phase];
|
||||
}
|
||||
if(has_solvent) {
|
||||
perfRates[perf*numComponent + solventCompIdx] = xw.perfRateSolvent()[perf + first_perf_];
|
||||
perfRates[perf*numComponent + contiSolventEqIdx] = xw.perfRateSolvent()[perf + first_perf_];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1044,7 +1044,7 @@ namespace Opm {
|
||||
|
||||
std::vector< Scalar > maxNormWell(numComp, Scalar() );
|
||||
|
||||
auto& grid = ebosSimulator.gridManager().grid();
|
||||
const auto& grid = ebosSimulator.gridManager().grid();
|
||||
const auto& gridView = grid.leafGridView();
|
||||
ElementContext elemCtx(ebosSimulator);
|
||||
const auto& elemEndIt = gridView.template end</*codim=*/0, Dune::Interior_Partition>();
|
||||
@@ -1088,7 +1088,6 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
|
||||
const auto& grid = ebosSimulator.gridManager().grid();
|
||||
grid.comm().max(maxNormWell.data(), maxNormWell.size());
|
||||
|
||||
Vector well_flux_residual(numComp);
|
||||
@@ -3122,7 +3121,7 @@ namespace Opm {
|
||||
B += 1 / fs.invB(ebosPhaseIdx).value();
|
||||
}
|
||||
if (has_solvent_) {
|
||||
auto& B = B_avg[ solventCompIdx ];
|
||||
auto& B = B_avg[solventSaturationIdx];
|
||||
B += 1 / intQuants.solventInverseFormationVolumeFactor().value();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user