mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add polymer to phase usage.
This commit is contained in:
@@ -39,6 +39,7 @@ namespace Opm
|
|||||||
int phase_used[MaxNumPhases];
|
int phase_used[MaxNumPhases];
|
||||||
int phase_pos[MaxNumPhases];
|
int phase_pos[MaxNumPhases];
|
||||||
bool has_solvent;
|
bool has_solvent;
|
||||||
|
bool has_polymer;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Check or assign presence of a formed, free phase. Limited to
|
/// Check or assign presence of a formed, free phase. Limited to
|
||||||
|
@@ -72,6 +72,12 @@ namespace Opm
|
|||||||
pu.has_solvent = true;
|
pu.has_solvent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add polyme info
|
||||||
|
pu.has_polymer = false;
|
||||||
|
if (phase.active(Phase::POLYMER)) {
|
||||||
|
pu.has_polymer = true;
|
||||||
|
}
|
||||||
|
|
||||||
return pu;
|
return pu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,6 +130,12 @@ namespace Opm
|
|||||||
pu.has_solvent = true;
|
pu.has_solvent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add polyme info
|
||||||
|
pu.has_polymer = false;
|
||||||
|
if (phase.active(Phase::POLYMER)) {
|
||||||
|
pu.has_polymer = true;
|
||||||
|
}
|
||||||
|
|
||||||
return pu;
|
return pu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1481,6 +1481,8 @@ namespace Opm
|
|||||||
case Phase::WATER: return InjectionSpecification::WATER;
|
case Phase::WATER: return InjectionSpecification::WATER;
|
||||||
case Phase::GAS: return InjectionSpecification::GAS;
|
case Phase::GAS: return InjectionSpecification::GAS;
|
||||||
case Phase::SOLVENT: OPM_THROW(std::invalid_argument, "Solvent injector is not supported.");
|
case Phase::SOLVENT: OPM_THROW(std::invalid_argument, "Solvent injector is not supported.");
|
||||||
|
case Phase::POLYMER: OPM_THROW(std::invalid_argument, "Polymer injector is not supported.");
|
||||||
|
|
||||||
}
|
}
|
||||||
OPM_THROW(std::logic_error, "Invalid state." );
|
OPM_THROW(std::logic_error, "Invalid state." );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user