to be able to determine the threshold pressure from the initial
condition it needs to be able to access the initial condition, i.e.,
the initial simulator state, material properties object and gravity
constant need to be passed to the thresholdPressure() function.
to be able to determine the threshold pressure from the initial
condition it needs to be able to access the initial condition, i.e.,
the initial simulator state, material properties object and gravity
constant need to be passed to the thresholdPressure() function.
Since the refactoring to using opm-material a material law manager for
the global grid was used. This meant that the properties used for
elements of the local grid were wrong. With this commit we set up a
manager that is based on the local grid only.
1. Added new parameter group string: "solver_approach" which can take
the values {direct, cpr, interleaved}.
2. Hierarchy:
i If a value is set in the parameter group that takes absolute
presedence.
ii If the Eclipse input deck asks for CPR - you get CPR.
iii You get the flow default - currently interleaved.
Function Opm::thresholdPressures() gained a new ParseMode parameter
in commit OPM/opm-core@09aa2b7 (PR OPM/opm-core#857). Chase updated
call interface.
assumes:
- solvent is immiscible in the oil phase
- gas pvt and relperms are used for the solvent
- no initial solvent in the model
Solvent is injected using the WSOLVENT keyword
TODO: Make it possible to change WSOLVENT
these are mostly stylistic: the function bodies of most new methods
have been moved to the _impl.hpp file and the Simulator classes are
now templated on the grid type, so it should be not too hard to switch
them to Dune::CpGrid.
since SimulatorFullyImplicitCompressiblePolymer is now a template, the
opaque pointer stuff is also removed and the contents of the .cpp file
basically became _impl.hpp. for SimulatorFullyImplicitBlackoilPolymer,
the opaque pointer stuff was removed for the same reasons as for
SimulatorFullyImplicitBlackoil.
the actual unification of code is not yet done, but this patch points
out the direction of where this will go.
Also note that some synchronization with the ordinary blackoil
simulator (FLOW) was necessary to make it compile.
Finnally, the parser currently likes to throw an exception (also for
the opm-polymer master) when eating the opm-data polymer test
case. This prevented me from properly testing this patch:
```
and@heuristix:~/src/opm-polymer|simplify_simulator > ./bin/flow_polymer deck_filename=/home/and/src/opm-data/polymer_test_suit/simple2D/2D_THREEPHASE_POLY_HETER.DATA
================ Test program for fully implicit three-phase black-oil flow ===============
--------------- Reading parameters ---------------
deck_filename found at /, value is /home/and/src/opm-data/polymer_test_suit/simple2D/2D_THREEPHASE_POLY_HETER.DATA
output not found. Using default value 'true'.
output_dir not found. Using default value 'output'.
Program threw an exception: IOConfig: Reading GRIDFILE keyword from GRID section: Output of GRID file is not supported
terminate called after throwing an instance of 'std::runtime_error'
what(): IOConfig: Reading GRIDFILE keyword from GRID section: Output of GRID file is not supported
Aborted
```
As it turns out initializing the Geology on a distributed grid
result in wrong values for e.g. saturation. Therefore with this
commit we resort to initializing the global geology and distribute
it using communication.
Previously we used the size of the communicator within the CpGrid to check
whether we are running in parallel and need to redistribute the grid.
Unfortunately, this is MPI_COMM_SELF until we actually loadbalance and redistribute.
Therefore we now use the size of the MPI_Helper (i.e. MPI_COMM_WORLD) which
gives us the number of all available processes.
Note that the wrong behaviour was provoked with 656e5de331. Before that we
redistributed in any case which luckily included runs with more than 1 process.
Any argument that is not handled by the parameter parser will
be assumed to be a deck filename. Only one is accepted, and if
given, it will override any deck_filename=<something> on the
command line or in parameter files.
FYI:
The parameter parser handles arguments of the following types:
key=value (note no space around = or in strings)
parameterfile.xml
parameterfile.param
This makes some API changes to AutoDiffBlock.
- Add overload for the constant() constructor taking rvalue ref.
- Add overload for the variable() constructor taking rvalue ref.
- Make the function() constructor *require* rvalue refs.
- Add a swap() function.
The remaining changes in this commit are follow-ups especially
to the third change (adding std::move in many places), and
some removal of unnecessary block pattern arguments from calls to
the constant() static method.
With now generic implementation of the initStateEquil in opm-core
we added the necessary grid helper functionlality for CpGrid and activated
the processing if the EQUIL keyword is there.
Previously BlackoilPropsDataHandle did hold a grid for sending
and receiving that were either not used or we could prevent their
usage. Therefore this commit removes them from the class and queries
all needed information from the property objects.
1) swatinit() is changed to setSwatInitScaling() to make it obvious that
we are modifying the props.
2) the descriptions of saturation and pc now makes more sense
3) the method is removed from the sibling class and the interface and
the type of new_props is changed from BlackoilPropsAdInterface to
BlackoilPropsAdFromDeck
5) The same modification is added to sim_fibo_ad_cp
The capillary pressure function in new_props is scaled to match the
capillary pressure function in props.
This is a temporary workaround while the simulator uses two different
property object.
Previously, we had to use two layers of overlap cells such the
innermost layer contains the rightvalues automatically (as it is
surrounded by internal edges). No we use communication to get
the correct values in the whole overlap region and one layer
suffices as it should.
With this commit we add the possibility to start with a global representation
of a simulator that is read on each process and afterwards this presentation
is redistributed among the processors together with the properties and
state data needed to initialize the simulation.
There still is no parallel well handling and no parallel output. But with the
equilibrium example of @dr-robertk and deactivated output we can already
perform parallel runs.
As with opm-core we use boost::any to provide additional
information about a parallel run. It is used to set a
ParallelISTLInformation object and and fill it with the
information obtained from a parallel Cpgrid.
Note that the simulator currently compiles sucessfully. Still,
we have to test the runs and do debugging.
1) Add the possibility for the user to chose between local and global
coordinate permeability in the transmissibility calculations.
2) Trow for CpGrid
3) Add default for switch
GCC 4.8 provides 'nullptr' in C++11 mode. That capability is
detected at configuration time and stored in <config.h> and we need
it when targeting Dune 2.2.1 to avoid diagnostics of the form
[...]/dune/common/nullptr.hh:27:1:
error: expected ‘;’ after class definition
} nullptr = {}; // and whose name is nullptr
^
[...]/dune/common/nullptr.hh:27:1:
error: qualifiers can only be specified for objects and functions
[...]/dune/common/nullptr.hh:27:3:
error: expected unqualified-id before ‘nullptr’
} nullptr = {}; // and whose name is nullptr
missing: the simulator using dune-cornerpoint. Once again, this is
because there is no good way to convert an intersection to a unique
global index (yet).
The porv is computed if needed and the Eclipsestate will return false on
this test before it is called.
This commit applies the change to the sim_fibo_ad_cp.cpp
Currently, there are two abstract interface for the grids. One that
usually returns pods and arrays of them that also can be used by C
and is used also in opm-core, and one that returns Eigen datastructures
needed within opm-autodiff.
This commit adds a postfix ToEigen to those functions (faceCells, and
cellCentroidsZ) one could imagine to also return pods and arrays of them.
This should at least resolve the confusion about the two faceCells functions.
The next step will be issue #192Fixes#176
Also add some other features that have been added to sim_fibo_ad
but not to sim_fibo_ad_cp:
- (Un)Strict parsing parameter.
- EQUIL init (currently throws, since initEquil not yet made generic).
Total time will be written to walltime.txt, and single step times to
step_timing.txt (changed suffix from param to txt). This did not work
properly before this fix (step_timing file was overwritten each step).
This commit changes the API of class SimulatorFullyImplicitBlackoil<>
in order to support wells controlled by (total) reservoir voidage
volume rates. Specifically, we switch to holding a mutable Wells
object (backed by a std::shared_ptr<>) in class Impl rather than a
reference to a WellsManager. This allows dynamically updating rate
distributions and targets of individual well controls. That, in
turn, is a prerequisite to supporting ECL-style "RESV" control
modes--be it in prediction or history matching capacity.
While in the process of API changes, also prepare for the second
stage of "WCONHIST/RESV" support: Accept a ScheduleConstPtr that
holds the input deck's notion of the history matching vs. prediction
controls. We need to distinguish the two in order to support the
exact semantics of "WCONHIST/RESV".
Update SimFIBO<> clients accordingly.
The refactorisation of class FullyImplicitBlackoilSolver<Grid> to
defer transmissibility and pore-volume calculation to the client in
order to support multipliers (net-to-gross &c) accidentally ended up
removing all effects of gravity. This commit restores those effects.
this is required to implement pore volume and permeability multipliers
as discussed with [at]bska and [at]joakim-hove.
Note that this implies that the DerivedGeology class can't be
instantiated anymore if there is no EclipseState object. Thus all code
paths and tests that don't load a deck are removed by this patch. If
this is undesireable, there are two options: First, don't require
EclipseState for DerivedGeology which would imply to make the about 10
required multiplier functions part of the
BlackoilPropertiesAdInterface, or second, one can copy-and-paste the
DerivedGeology class as it was before this patch, derive from a newly
introduced DerivedGeologyInterface and pass DerivedGeologyInterface
objects to the simulator. IMHO, the second solution would be a bit
better but it would involve substantial overhead to implement and to
maintain it.
Anyway, in the mean time simulators cannot be instantiated without
decks.
this basically means using Opm::EclipseState instead of the raw deck
for these keywords.
with this, property modifiers like ADD, MULT, COPY and friends are
supported for at least the PERM* keywords. If additional keywords are
required these can be added relatively easily as well.
no ctest regressions have been observed with this patch on my machine.
this basically means using Opm::EclipseState instead of the raw deck
for these keywords.
with this, property modifiers like ADD, MULT, COPY and friends are
supported for at least the PERM* keywords. If additional keywords are
required these can be added relatively easily as well.
no ctest regressions have been observed with this patch on my machine.
this basically means using Opm::EclipseState instead of the raw deck
for these keywords.
with this, property modifiers like ADD, MULT, COPY and friends are
supported for at least the PERM* keywords. If additional keywords are
required these can be added relatively easily as well.
no ctest regressions have been observed with this patch on my machine.
i.e. reading the grid properties from EclipseState instead of from the
raw deck. This requires that all deck files exhibit a GRID and a
SCHEDULE section or else EclipseState will throw in the constructor.
The following is changed in this commit:
- The constructor for NewtonIterationBlackoilSimple now takes
a parameter object instead of a linear solver.
- The fully implicit black-oil simulators can now use the CPR
preconditioning strategy (by passing use_cpr=true) or the
simple strategy (the default).
Note that as of this commit, the CPR preconditioning still has
not been implemented properly, and behaves just like the simple
strategy.
Function GridManager::createGrdecl() generally allocates memory
(using std::malloc()) for the MAPAXES keyword data output of the
'grdecl' structure. Release those resources before leaving the
scope to prevent memory leak introduced in commit fdca540.
This commit switches to using the convenience method
GridManager::createGrdecl()
to construct a "struct grdecl" that can be passed directly into
CpGrid::processEclipseFormat(). The practical benefit is that we
get to leverage the opm-parser that's in active development rather
than the calcifying "EclipseGridParser" that will only become less
relevant in the future. We also don't parse the data twice.
Note: This is mostly compile tested. In the few actual tests I ran,
I got into trouble with internal assertions in processEclipseFormat.
That problem is not yet analysed.
Conflicts:
examples/sim_fibo_ad.cpp
opm/autodiff/FullyImplicitBlackoilSolver_impl.hpp
This brings the "CpGrid support" branch up to date with respect to
recent changes in opm-autodiff master.
this makes the simulator quite a bit more maintainable: setting
USE_NEW_PARSER to 0 did not even compile after the the constructor for
the wells manager which took the old deck was removed last
week. Since, according to Atgeirr, SPE-1 is now producing exactly the
same results as before, it also does no longer make too much sense to
keep that code on life support...
i.e., the simulator does not deal with any output operations
anymore. This makes sense because report steps are handled by
Opm::TimeMap and the constructor for the simulator already needs more
arguments than appropriate even without this...
Manually resolved conficts in the following files
examples/sim_fibo_ad.cpp
opm/autodiff/FullyImplicitBlackoilSolver_impl.hpp
opm/autodiff/SimulatorFullyImplicitBlackoil_impl.hpp
In additions examples/sim_fibo_ad_cp.cpp was adapted to compile again.