mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-12 07:05:37 -06:00
flash model: enable volume variable caching and thermodynamic hints in the generic code
These used to be needed to be enabled by the problem, but doing it in the generic code is more fool proof and thus better. On my laptop, volume variable caching caused the linearization time for first time step of the isothermal vertex-centered CO2 injection problem using the flash model go from 33.7 to 15.7 seconds, and enabling thermodynamic hints in addition yielded a linearization time of "only" 9.5 seconds. (that is for a debug build compiled with clang 3.3.)
This commit is contained in:
parent
6e3f6834ef
commit
9b5a5d7d6c
@ -39,11 +39,6 @@ namespace Properties {
|
||||
NEW_TYPE_TAG(Co2InjectionFlashEcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionFlashEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
|
||||
// for the flash model we want to use thermodynamic hints or it will
|
||||
// get _very_ slow.
|
||||
SET_BOOL_PROP(Co2InjectionFlashEcfvProblem, EnableVolumeVariablesCache, true);
|
||||
SET_BOOL_PROP(Co2InjectionFlashEcfvProblem, EnableThermodynamicHints, true);
|
||||
|
||||
// use the flash solver adapted to the CO2 injection problem
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashEcfvProblem, FlashSolver,
|
||||
|
@ -38,11 +38,6 @@ SET_TAG_PROP(Co2InjectionFlashNiEcfvProblem, SpatialDiscretizationSplice, EcfvDi
|
||||
|
||||
SET_BOOL_PROP(Co2InjectionFlashNiEcfvProblem, EnableEnergy, true);
|
||||
|
||||
// for the flash model we want to use thermodynamic hints or it will
|
||||
// get _very_ slow.
|
||||
SET_BOOL_PROP(Co2InjectionFlashNiEcfvProblem, EnableVolumeVariablesCache, true);
|
||||
SET_BOOL_PROP(Co2InjectionFlashNiEcfvProblem, EnableThermodynamicHints, true);
|
||||
|
||||
// use the CO2 injection problem adapted flash solver
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashNiEcfvProblem, FlashSolver,
|
||||
|
@ -38,11 +38,6 @@ SET_TAG_PROP(Co2InjectionFlashNiVcfvProblem, SpatialDiscretizationSplice, VcfvDi
|
||||
|
||||
SET_BOOL_PROP(Co2InjectionFlashNiVcfvProblem, EnableEnergy, true);
|
||||
|
||||
// for the flash model we want to use thermodynamic hints or it will
|
||||
// get _very_ slow.
|
||||
SET_BOOL_PROP(Co2InjectionFlashNiVcfvProblem, EnableVolumeVariablesCache, true);
|
||||
SET_BOOL_PROP(Co2InjectionFlashNiVcfvProblem, EnableThermodynamicHints, true);
|
||||
|
||||
// use the CO2 injection problem adapted flash solver
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashNiVcfvProblem, FlashSolver,
|
||||
|
@ -39,11 +39,6 @@ namespace Properties {
|
||||
NEW_TYPE_TAG(Co2InjectionFlashVcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
|
||||
SET_TAG_PROP(Co2InjectionFlashVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
|
||||
// for the flash model we want to use thermodynamic hints or it will
|
||||
// get _very_ slow.
|
||||
SET_BOOL_PROP(Co2InjectionFlashVcfvProblem, EnableVolumeVariablesCache, true);
|
||||
SET_BOOL_PROP(Co2InjectionFlashVcfvProblem, EnableThermodynamicHints, true);
|
||||
|
||||
// use the flash solver adapted to the CO2 injection problem
|
||||
SET_TYPE_PROP(
|
||||
Co2InjectionFlashVcfvProblem, FlashSolver,
|
||||
|
@ -30,8 +30,7 @@
|
||||
namespace Opm {
|
||||
namespace Properties {
|
||||
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(FlashModel, DiffusionBaseProblem));
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
@ -303,3 +303,4 @@ private:
|
||||
} // namespace Ewoms
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user