Commit Graph

195 Commits

Author SHA1 Message Date
Robert K
207f4bfd30 EclipseWriter: support reordering of compressed cells, e.g. space filling curves. 2014-12-05 15:44:39 +01:00
Tor Harald Sandve
75749c3dab Do not include shut wells in the well name to index map
The name to index map is used to make sure the correct wellstate values
are associated with the corresponding well. Shut wells should be
excluded from this mapping as no date is for shut wells are found in the
wellstates, instead 0 is outputed for the shut wells.
2014-11-07 12:22:19 +01:00
Tor Harald Sandve
2ff42c327b SHUT wells returns 0
Shut wells returns 0 for bhp and rates in the EclipseWriter
2014-10-24 07:01:36 +02:00
Andreas Lauser
7ce561095c EclipseWriter: don't convert the unit inside the rate() function
because if that is done, the integration for the production total is
wrong because the time step length is days and not seconds.

Note that the conversion now uses Opm::unit::convert::to(<>,
1/conversionFactor) instead of simply multiplying with the conversion
factor. I still think this obfuscates things more than it helps, but
[at] bska will hopefully want it this way...
2014-09-22 14:16:41 +02:00
Andreas Lauser
6659070eac EclipseWriter: clarify a comment 2014-09-22 14:15:57 +02:00
Andreas Lauser
38eed1875a EclipseWriter: replace /= by unit::convert::to()
as insisted on by [at] bska
2014-09-10 11:41:26 +02:00
Andreas Lauser
5dd00f93c3 use the same units for pressure output as for pressure input from the deck
before, the output was always metric, regardless of whether the deck
used metric or field units...
2014-09-09 18:58:34 +02:00
Atgeirr Flø Rasmussen
5059f66bad Squash warnings by removing or commenting out unused parameters. 2014-08-28 14:14:22 +02:00
Bård Skaflestad
492b64faac CornerpointChopper::writeGrdecl(): Increase vector precision
This commit increases the precision of the (floating-point) vector
output (e.g., permeabilities) from method writeGrdecl().  This
reduces the impact of rounding errors when the sub-set sample is
output to disk for subsequent processing (e.g., property upscaling).
2014-08-25 14:01:03 +02:00
Bård Skaflestad
71596fe8a3 CornerpointChopper::writeGrdecl(): Write fewer items per line
This is in preparation of increasing the vector output precision to
reduce the impact of rounding errors in subsequent upscaling.  The
change impacts floating-point vectors only.

Background: The ECL simulator stipulates an upper bound on the
number of characters in a record (i.e., one line) and while we don't
have such limits, there's no reason to emit lines that can't be
input by other tools.
2014-08-25 14:01:03 +02:00
Andreas Lauser
6e1bf4b3ab EclipseWriter: attempt to fix the well summary output for activeWells != totalWells
The summary files now always features all wells which ever appear in
the deck in every timestep (even if they are not specified for the
time step). This _should_ fix the crashes when writing Eclipse output
in the Norne deck, but I have no idea if the resulting summary file is
correct. More testing would be thus highly appreciated...
2014-08-14 13:35:44 +02:00
Andreas Lauser
493650d2b1 EclipseWriter: Don't use the deck directly anymore
instead, use Opm::EclipseState. This requires to pass the PhaseUsage
object to the EclipseWriter, as this one cannot be recovered from
EclipseState (yet?).
2014-07-18 11:20:28 +02:00
Andreas Lauser
597735b7d0 output the cells which the simulator classes consider active
copying the EclipseGrid object is required as the final set of active
cells requires knowledge of the grid used by the simulator which is
not available in opm-parser. In turn, this requires to call
EclipseGrid::resetACTNUM() which is non-const.
2014-07-17 21:47:11 +02:00
Andreas Lauser
dc5fc64e98 EclipseWriter: pass an EclipseState to it and use it where possible 2014-07-16 14:34:24 +02:00
Andreas Lauser
65a1bd6722 EclipseWriter: Use opm-parser's Opm::EclipseGrid class to write the EGRID file
this simplifies things quite a bit and allows us to get rid of the
Opm::EclipseWriterDetails::Grid class...
2014-07-16 12:35:31 +02:00
Andreas Lauser
bbd05ec67f EclipseWriter: some minor white space changes 2014-07-16 10:41:25 +02:00
Andreas Lauser
c6d3994722 EclipseWriter: make it not crash if no wells are present 2014-07-16 10:41:25 +02:00
Andreas Lauser
89cbfac621 EclipseWriter: Store the Cartesian sizes internally
because it this array can be deleted after calling the
constructor. TODO (?): Do the same for the compressed-to-Cartesian
cell index map.
2014-07-16 10:41:25 +02:00
Andreas Lauser
1a1920e5a4 EclipseWriter: remove some unused functions and refactor the code for Cartesian sizes 2014-07-16 10:41:25 +02:00
Andreas Lauser
8579a971da EclipseWriter: get rid of the EclipseHandle monster
instead, the wrapper classes now call ERT directly, so it's easy to
see what a given class does. interestingly the amount of additional
code required is neglectible (or even negative).
2014-07-16 10:41:25 +02:00
Andreas Lauser
044244c4b0 EclipseWriter: rename some variables and functions to make the naming scheme consistent 2014-07-16 10:41:25 +02:00
Andreas Lauser
750af9bf73 EclipseWriter: avoid "using namespace Foo" in compile-unit scope 2014-07-16 10:41:25 +02:00
Andreas Lauser
26dbfb78c2 EclipseWriter: Remove the non-ERT codepaths
ERT has been a requirement for opm-parser for a while now and
opm-parser is a prerequisite of opm-core, so ERT is always
available. Thus remove the stub code to avoid bitrot...
2014-07-16 10:41:25 +02:00
Andreas Lauser
e142094443 remove the "Eclipse" prefix from all classes in namespace "EclipseWriterDetails"
this have become become superfluous by the namespace...
2014-07-14 13:58:53 +02:00
Andreas Lauser
d71c2a0fa6 EclipseWriter: introduce namespace EclipseWriterDetails
it is for -- well -- the implementation details of EclipseWriter...
2014-07-14 13:58:53 +02:00
Andreas Lauser
15ff31f307 EclipseWriter: stop making UnstructuredGrid think it is special
instead, the same interface as for Dune::CpGrid is now
used. (i.e. pass all relevant information as separate arguments.)
2014-07-14 13:58:50 +02:00
Andreas Lauser
6ac1196859 EclipseWriter: use opm-parser's EclipseGrid class
this unifies the grid creation code paths with the one used by the
simulators and simplfies things.
2014-07-14 13:58:35 +02:00
Andreas Lauser
126ca8043f Eclipse does not have a PERM keyword 2014-06-05 08:36:53 +02:00
Andreas Lauser
f96417e81c rename all "newParserDeck" objects to "deck"
The "new" parser is now "the" parser...
2014-05-21 11:22:43 +02:00
Andreas Lauser
720acacad3 remove the EclipseGridParser class
RIP!
2014-05-21 11:22:43 +02:00
Andreas Lauser
3941fbc5f1 remove EclipseGridParser compatibility methods from all classes 2014-05-21 11:22:43 +02:00
Andreas Lauser
7c226478dd Eclipse summary output: always convert the simulation time to days
this seems to have been forgotten in one place...
2014-05-16 11:50:32 +02:00
Andreas Lauser
6a90aa086a CornerPointChopper: add methods opm-parser'y methods 2014-04-25 14:25:53 +02:00
Andreas Lauser
a313dd86d6 convert the EclipseGridInspector to opm-parser
that one is completely unused in opm-core (*booo*!), but used quite a
bit in dune-cornerpoint and dune-porsol, so let's keep it for now...
2014-04-25 14:25:53 +02:00
Joakim Hove
b43b89063e Renamed struct EclipseGrid -> struct EclipseWriterGrid to avoid conflict
with class in opm-parser.
2014-04-22 15:14:10 +02:00
Markus Blatt
fdd19fd3f6 Reintroduce lifetime guarantees for UnstructuredGrid used.
In this pull requested we resorted to storing the data items (e.g. cart_dims, global_cell,
etc.) instead of the UnstructuredGrid. Unfortunately, this is a change of the lifetime
guarantees: Previously, a shared_ptr to the Unstructuredgrid was stored. Thus the data members
were available for the lifetime of the EclipseWriter. With the previous changes the grid could
actually have been destroyed before the writer.

Therefore we no store a shared_ptr to the UnstructuredGrid again (in addition to the datamembers).
Thus at least for UnstructuredGrid the old guarantees still hold.
2014-04-09 10:31:46 +02:00
Markus Blatt
ebc86bc624 Merge remote-tracking branch 'upstream/master' into master-refactor-for-cpgrid-support
Manually resolved conflicts in:
	opm/core/io/eclipse/EclipseWriter.cpp
	opm/core/io/eclipse/EclipseWriter.hpp
	opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp
2014-04-08 21:50:00 +02:00
Markus Blatt
d83374e6b7 Merge remote-tracking branch 'upstream/master' into master-refactor-for-cpgrid-support
Removed conflicts in
	opm/core/wells/WellsManager.cpp
that were due to the change
```diff
-                    pd.well_index = WellsManagerDetail::computeWellIndex(radius, cubical, cell_perm, completion->getDiameter());
+                    pd.well_index = WellsManagerDetail::computeWellIndex(radius, cubical, cell_perm, completion->getSkinFactor());
```
in  WellsManager::createWellsFromSpecs which moved from WellsManager.cpp to WellsManager_impl.hpp file in a previous commit.
2014-04-04 21:21:22 +02:00
Andreas Lauser
e693fa8cf1 EclipseWriter: write the summary file after each call to writeTimeStep()
this allows to interrupt a simulation and inspect the summary file
which was computed up to that point...
2014-04-04 14:29:34 +02:00
Andreas Lauser
b4b03ffee3 EclipseWriter: remove unused method activeToGlobalCellData_() 2014-04-02 16:47:59 +02:00
Andreas Lauser
c8683b39d0 EclipseWriter: fold the writeSolution_() method back into writeTimeStep()
because this was the only caller...
2014-04-02 16:47:27 +02:00
Andreas Lauser
3ce9d6b3b1 output writers: remove the state parameters from writeInit()
because as discussed with Atgeirr, this function should no longer
write the initial solution, it also does no longer need to know the
initial simulator state...
2014-04-02 16:42:04 +02:00
Andreas Lauser
a02f315ace EclipseWriter: remove old parser
this patch gets rid of the old-parser-taking methods of
EclipseWriter. this avoids quite a few consistency issues and also
reduces the amount of duplicate work required.
2014-04-02 14:25:03 +02:00
Roland Kaufmann
5371e19d19 Use new parser in common output interface
Since EclipseWriter can now take a Deck instead of an EclipseGridParser
the interface can be changed to take this type instead.
2014-04-01 14:33:55 +02:00
Atgeirr Flø Rasmussen
3adcadff42 Remove debug output. 2014-03-28 13:04:32 +01:00
Atgeirr Flø Rasmussen
27a396b439 This re-adds the bhp reports to the summary output.
It was lost in the shuffling bewteen branches when working on the new parser.
2014-03-28 13:01:10 +01:00
Markus Blatt
8668ce7b71 Merge remote-tracking branch 'upstream/master' into master-refactor-for-cpgrid-support
Manually resolved conflicts:
	opm/core/io/eclipse/EclipseWriter.cpp
	opm/core/io/eclipse/EclipseWriter.hpp
	opm/core/props/BlackoilPropertiesFromDeck.cpp
	opm/core/simulator/initState_impl.hpp
	opm/core/wells/WellsManager.cpp
	opm/core/wells/WellsManager.hpp
2014-03-27 15:27:11 +01:00
Atgeirr Flø Rasmussen
417c08e890 Merge pull request #536 from andlaus/EclipseWriter_dont_restrict_pressure
EclipseWriter: don't convert the pressure field to active cells
2014-03-21 08:59:41 +01:00
Andreas Lauser
2397eecf6f EclipseWriter: work around a GCC 4.4 smart_ptr bug
maybe it is not a bug but a slightly spec. The problem is that GCC 4.4
does not implicitly convert std::shared_ptr<$FOO> to
std::shared_ptr<const $FOO> which caused the recent Jenkins build
errors at Statoil. Note that this problem only occurs with the output
writer in conjunction with the old Eclipse parser, so
OPM/opm-autodiff#105 also makes the problem disappear. The present
patch addresses the root cause, though...
2014-03-20 16:58:57 +01:00
Andreas Lauser
2443903928 EclipseWriter: don't convert the pressure field to active cells
because that array already is restricted to the active cells...

found using ASAN.
2014-03-20 15:59:02 +01:00