mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
clean-up based on review
This commit is contained in:
parent
d930cc8ad4
commit
c2c009ecb6
@ -59,15 +59,15 @@ namespace Opm
|
||||
// TODO: we need to have order for the primary variables and also the order for the well equations.
|
||||
// sometimes, they are similar, while sometimes, they can have very different forms.
|
||||
|
||||
// TODO: the following system looks not rather flexible. Looking into all kinds of possibilities
|
||||
static const bool gasoil = numEq == 2 && (Indices::compositionSwitchIdx >= 0);
|
||||
static const int GTotal = 0;
|
||||
static const int WFrac = gasoil? -1000: 1;
|
||||
//For oilwater system the GFrac is set to 2 (the same as SPres) but it is never used
|
||||
static const int GFrac = gasoil? 1 : 2;
|
||||
static const int SPres = numEq;
|
||||
static const bool has_gas = (Indices::compositionSwitchIdx >= 0);
|
||||
static const bool has_water = (Indices::waterSaturationIdx >= 0);
|
||||
|
||||
/// the number of well equations // TODO: it should have a more general strategy for it
|
||||
static const int GTotal = 0;
|
||||
static const int WFrac = has_water? 1: -1000;
|
||||
static const int GFrac = has_gas? has_water + 1 : -1000;
|
||||
static const int SPres = has_gas + has_water + 1;
|
||||
|
||||
// the number of well equations TODO: it should have a more general strategy for it
|
||||
static const int numWellEq = getPropValue<TypeTag, Properties::EnablePolymer>() ? numEq : numEq + 1;
|
||||
|
||||
using typename Base::Scalar;
|
||||
|
@ -2180,7 +2180,7 @@ namespace Opm
|
||||
resWell_[seg][SPres] -= accelerationPressureLoss.value();
|
||||
duneD_[seg][seg][SPres][SPres] -= accelerationPressureLoss.derivative(SPres + numEq);
|
||||
duneD_[seg][seg][SPres][GTotal] -= accelerationPressureLoss.derivative(GTotal + numEq);
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||
duneD_[seg][seg_upwind][SPres][WFrac] -= accelerationPressureLoss.derivative(WFrac + numEq);
|
||||
}
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||
|
Loading…
Reference in New Issue
Block a user