mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding polymer molecular weight to BlackoilPhases and phaseUsageFromDeck
This commit is contained in:
parent
93fb5a2c52
commit
e1ede3c9d5
@ -33,11 +33,11 @@ namespace Opm
|
|||||||
// sense that they can be active or not and canonical indices can be translated
|
// sense that they can be active or not and canonical indices can be translated
|
||||||
// to and from active ones. That said, they are not considered by num_phases or
|
// to and from active ones. That said, they are not considered by num_phases or
|
||||||
// MaxNumPhases. The crypto phases which are currently implemented are solvent,
|
// MaxNumPhases. The crypto phases which are currently implemented are solvent,
|
||||||
// polymer and energy.
|
// polymer, energy and polymer molecular weight.
|
||||||
static const int NumCryptoPhases = 3;
|
static const int NumCryptoPhases = 4;
|
||||||
|
|
||||||
// enum ComponentIndex { Water = 0, Oil = 1, Gas = 2 };
|
// enum ComponentIndex { Water = 0, Oil = 1, Gas = 2 };
|
||||||
enum PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2, Solvent = 3, Polymer = 4, Energy = 5 };
|
enum PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2, Solvent = 3, Polymer = 4, Energy = 5, PolymerMW = 6 };
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PhaseUsage : public BlackoilPhases
|
struct PhaseUsage : public BlackoilPhases
|
||||||
@ -48,6 +48,8 @@ namespace Opm
|
|||||||
bool has_solvent;
|
bool has_solvent;
|
||||||
bool has_polymer;
|
bool has_polymer;
|
||||||
bool has_energy;
|
bool has_energy;
|
||||||
|
// polymer molecular weight
|
||||||
|
bool has_polymermw;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Check or assign presence of a formed, free phase. Limited to
|
/// Check or assign presence of a formed, free phase. Limited to
|
||||||
|
@ -107,6 +107,18 @@ namespace Opm
|
|||||||
else
|
else
|
||||||
pu.phase_pos[BlackoilPhases::Energy] = -1;
|
pu.phase_pos[BlackoilPhases::Energy] = -1;
|
||||||
|
|
||||||
|
// Add polymer molecular weight related
|
||||||
|
pu.has_polymermw = phase.active(Phase::POLYMW);
|
||||||
|
if (pu.has_polymermw) {
|
||||||
|
if (!pu.has_polymer) {
|
||||||
|
OPM_THROW(std::runtime_error, "pu.has_polymermw is true while pu.has_polymer is false");
|
||||||
|
}
|
||||||
|
pu.phase_pos[BlackoilPhases::PolymerMW] = numActivePhases;
|
||||||
|
++ numActivePhases;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pu.phase_pos[BlackoilPhases::PolymerMW] = -1;
|
||||||
|
|
||||||
return pu;
|
return pu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user