Commit Graph

2246 Commits

Author SHA1 Message Date
Robert Kloefkorn
f8e61c0267 also catch std::runtime_error, i.e. convergence of linear solver failed. 2014-10-14 15:18:36 +02:00
Jørgen Kvalsvik
d380d1759e Reduces CHKERRXX usage to where necessary.
The error checking macro makes it harder to read and harder to write, so
instead we now only check for functions  that can contain errors. Bounds and
range checks are handled by PETSc and not OPM.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
4a79f2e2ca Petsc constructor now uses intialiser list.
The previous implementation set plenty of values in the initialization list and
immediately overwrote these values with values looked up from the param group.
This patch makes it look up the parameteres from the param group argument,
making the constructor simpler.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
2917387845 Makes using wrong constructor a compile-time error
Petsc only supports initialisation through the ParameterGroup constructor.
Calling the default, non-arg constructor is a static error, and not
implementing it makes using it break compiles.
2014-10-14 14:43:42 +02:00
Jørgen Kvalsvik
5ed0f73ba2 Removes call_petsc.c and calls the lib from C++
call_petsc.c was really a thin C wrapper around the call to petsc itself and
turns out was mostly unnecessary C++ emulation. This removes the file entirely
and ports its functionality into LinearSolverPetsc.cpp.

All features from the file should now be more readable as well as properly
utilising modern C++ features.

The patch uses the CHKERRXX macro from petsc to handle errors reported by
petsc, and currently does not handle this and give the control back to OPM's
error/throw system.
2014-10-14 14:43:42 +02:00
Joakim Hove
72cde22f62 Bug in well_index increment in WellsManager 2014-10-14 12:43:57 +02:00
Joakim Hove
dd87b8fc52 Will not update WellControls if cmode == CMODE_UNDEFINED 2014-10-14 12:42:55 +02:00
Joakim Hove
37c563689c ControlMode is left undefined if it unset in deck. 2014-10-14 12:34:58 +02:00
Robert Kloefkorn
164b892c17 added initial fraction to initialize last_timestep. 2014-10-13 11:17:37 +02:00
Robert Kloefkorn
44f90f974e Two small adjustments that came up when running in debug mode. 2014-10-10 13:55:28 +02:00
Robert Kloefkorn
2fcb3c6638 Merge remote-tracking branch 'upstream/master' into timestepcontrol 2014-10-08 16:42:32 +02:00
Andreas Lauser
16658430cc WellsManager: do not require a control mode to be set if the well status is SHUT
For Norne it fell on its nose because of this...
2014-10-08 12:35:38 +02:00
Robert Kloefkorn
80431e273f ok, now we got it. euclidianNormSquared. 2014-10-07 14:14:31 +02:00
Robert Kloefkorn
ba316dd651 more convenient name. 2014-10-07 10:45:09 +02:00
Robert Kloefkorn
b111fbbb15 innerProduct --> euclideanNorm2. 2014-10-07 10:40:44 +02:00
Robert Kloefkorn
ef813c94cc inner_product --> innerProduct. Avoid confusion with std version. 2014-10-07 09:52:22 +02:00
Robert Kloefkorn
b250383ae0 use unit::convert::to instead of hard coded 86400 factor. 2014-10-07 09:48:57 +02:00
Robert K
355e68c63b move implementation to .cpp files. 2014-10-06 14:26:23 +02:00
Robert K
5af49ed90b the adaptive time stepping utility classes. 2014-10-06 14:06:07 +02:00
Robert K
879dddc9b6 move protected area to the bottom and remove unused lines as well as halfTimeStep method. 2014-10-03 15:53:18 +02:00
Robert K
e1d1063e0d remove white spaces. 2014-10-03 14:14:01 +02:00
Robert K
0ed28121a1 reset to old state. 2014-10-03 14:10:56 +02:00
Robert K
e69c37167c renamed and split advance method. 2014-10-03 13:44:05 +02:00
Robert K
c371d4fa22 class for handling adaptive time steps. 2014-10-03 13:33:13 +02:00
Robert K
f6c9bc9090 improvement of the time step adjustment. 2014-10-02 14:04:32 +02:00
Robert K
92d5f43d82 sub step simulator timer. 2014-10-01 13:56:27 +02:00
Robert K
9517359d3f reset master. 2014-10-01 13:55:42 +02:00
Robert K
d42d0a6cbe SubStepSimulationTimer for time step control. Needs documentation and cleanup. 2014-09-30 15:55:26 +02:00
Atgeirr Flø Rasmussen
c3551dfdad Merge pull request #657 from GitPaean/PVT_viscosity_try
Obtaining viscosity by doing a linear interpolation of the inverse of B*mu instead of mu directly.
2014-09-23 22:44:37 +02:00
Kai Bao
ef3e524c30 Changing nColumns to nRows. 2014-09-23 13:17:47 +02:00
Atgeirr Flø Rasmussen
c0627c2305 Merge pull request #654 from andlaus/fix_rate_conversion
Fix rate conversion
2014-09-22 14:36:52 +02:00
Kai Bao
175da5450f Changing the location of * in long formula. 2014-09-22 14:29:18 +02:00
Kai Bao
6a43935ea3 Deleting some commented lines. 2014-09-22 14:26:00 +02:00
Kai Bao
09404202da Changing the naming in PvtDead.
To be consistent with the naming int PvtLive.
2014-09-22 14:21:33 +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
Atgeirr Flø Rasmussen
383bd4d91e Remove old legacy unit constants.
They should have been removed a long time ago, but were overlooked.
2014-09-22 13:28:17 +02:00
Kai Bao
5d3017e6c6 Merge remote-tracking branch 'upstream/master' into PVT_viscosity_try 2014-09-22 13:01:13 +02:00
Kai Bao
ee73105c95 Using resize to allocate memory for 1/BMu. 2014-09-22 10:28:23 +02:00
Atgeirr Flø Rasmussen
9afe054c25 Remove include guards from warning suppression headers.
They are intended to temporarily change compiler state, and may be
included multiple times in a single compilation unit.
2014-09-20 10:36:10 +02:00
Atgeirr Flø Rasmussen
a47e6775bd Honor SILENCE_EXTERNAL_WARNINGS in suppression headers. 2014-09-20 10:36:10 +02:00
Atgeirr Flø Rasmussen
1dd215834b Refactor third-party warning suppression.
Use header files from opm/core/utility/platform_dependent instead of
build-system generated ones for suppressing warnings from dune or Eigen.
2014-09-20 10:36:10 +02:00
Atgeirr Flø Rasmussen
763c9de6ef Add disabling and reenabling header files.
The files check for compiler versions to avoid using incompatible
pragmas. Only enabled for gcc >= 4.6 and clang.
2014-09-20 10:36:10 +02:00
Andreas Lauser
c7dfd096aa SatFuncBase.hpp: convert DOS line endings to unix ones
i.e. \r\n -> \n
2014-09-19 14:40:52 +02:00
Andreas Lauser
bd0bfc172b adapt the the table related API changes of opm-parser 2014-09-19 14:40:35 +02:00
Kai Bao
2b18b8f27f Finshing changing Pvt_liveGas
Remains to be verfied.
2014-09-18 15:28:38 +02:00
Kai Bao
eadbffa99b Changing the PvtLiveOil to use 1/BV for viscosity.
Pssing the simple 2D test.
2014-09-18 12:46:45 +02:00
Atgeirr Flø Rasmussen
6d1cfc0fb2 Avoid release mode warnings.
Variables only used in asserts have been removed, their content used
directly in the assert() instead.
2014-09-18 11:31:03 +02:00
Kai Bao
0b69961d9e A little more comment about B and b. 2014-09-17 11:15:58 +02:00
Kai Bao
d393d147a4 Updating the calculation of mu and dmudp for PvtDead. 2014-09-14 17:33:43 +02:00
Kai Bao
d9acd0f3b8 Rewriting the d_mu_d_p for deadGas. 2014-09-14 16:24:37 +02:00
Kai Bao
d9eb3ea30f Chaning using the new interpolation for viscosity 2014-09-12 13:39:16 +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
Andreas Lauser
9a44720e32 rename getCF() to getConnectionTransmissibilityFactor() 2014-09-06 22:28:21 +02:00
Andreas Lauser
da25fb699d change the defaults for pvt_tab_size and sat_tab_size to -1
this causes the code to use linear instead of spline
interpolation. thanks to @atgeirr for pointing this out..
2014-09-03 14:42:43 +02:00
Andreas Lauser
8a8c71bc63 change the default of the "threephase_model" parameter from "simple" to "gwseg"
Using "simple", the Norne deck aborts with an exception.

Note: SPE1 and SPE9 still seem to work fine with this but there might
be small differences so that the reference solutions of the Jenkins
server might need to be updated...
2014-09-03 13:37:52 +02:00
Atgeirr Flø Rasmussen
dfb7483e1e Merge pull request #648 from bska/fix-peaceman
effectiveRadius: Fix Numerator Formula
2014-09-02 15:46:36 +02:00
Bård Skaflestad
9591aec757 effectiveRadius: Fix numerator formula
We must take the square root of the permeability ratios, not use them
as is.  This was lost in the refactorisation commit 96cf137.

Pointy hat: @bska.
2014-09-02 15:12:50 +02:00
Tor Harald Sandve
a7ecde25ce Include goc and woc in the span for the phase pressure calculation 2014-09-02 14:49:09 +02:00
Tor Harald Sandve
e44b045260 Remove fix for GOC and WOC above/below reservoir 2014-09-02 14:49:09 +02:00
Bård Skaflestad
7f874c0d64 effectiveExtent: Fix out-of-bounds indexing
Commit 96cf137 introduced support for Peaceman index calculation
that honoured general completion directions (X,Y,Z).  This was
accomplished through a permutation index that reordered the
permeability and geometric extent components according to a local
coordinate system along the completion.

In a complete breakdown of logic, however, the d-component extent
vector was indexed as though it were a d-by-d matrix.  This commit
restores sanity to the processing.

Pointy hat: @bska.
2014-09-01 13:30:32 +02:00
Atgeirr Flø Rasmussen
c55a887904 Use double braces for std::array init to avoid warning.
Warning triggered at least using clang.
2014-09-01 10:09:27 +02:00
Bård Skaflestad
96cf137e4c WellsManager: Support NTG and horizontal completions
This commit extends the feature set of the WellsManager to support
horizontal ("X" and "Y") completions and include the net-to-gross
ratio in the Peaceman index ("Completion Transmissibility Factor,
CTF") of a well completion.  The NTG factor is included if present
in the input deck represented by the "eclipseState".

There are two separate, though related, parts to this commit.  The
first part splits the calculation of Peaceman's "effective radius"
out to a separate utility function, effectiveRadius(), and
generalises WellsManagerDetail::computeWellIndex() to account for
arbitrary directions and NTG factors.  The second part uses
GridPropertyAccess::Compressed<> to extract the NTG vector from the
input if present while providing a fall-back value of 1.0 if no such
vector is available.

Note: We may wish to make the extraction policy configurable at some
point in the future.
2014-08-31 21:24:37 +02:00
Bård Skaflestad
8adeb5f56c Annotate namespace closing brace with namespace name 2014-08-29 12:31:35 +02:00
Bård Skaflestad
c3375da14f Adjust white-space for readability
This is mostly just splitting long lines and aligning parameters where
appropriate.  No functional changes.
2014-08-29 12:22:26 +02:00
Bård Skaflestad
b35362f1e9 createWellsFromSpecs: Assert three space dimensions
Method WellsManager::createWellsFromSpecs() is only supported in
three space dimensions.  Assert that we don't use anything else.
2014-08-29 12:18:59 +02:00
Bård Skaflestad
fda49df8a8 createWellsFromSpecs: Use ref-to-const cart2active
This commit tightens the function header of method

    WellsManager::createWellsFromSpecs()

to accept a reference-to-const 'cartesian_to_compressed' map.  It
used to be a complete, copy-constructed object, so this is a slight
performance enhancement as we no longer need to copy a (somewhat)
large object on every call to the method.
2014-08-29 12:13:38 +02:00
Bård Skaflestad
97a8ee630e getCubeDim: Support arbitrary number of dimensions
This commit generalises the implementation of utility function
'getCubeDim' to support arbitrary number of space dimensions.  In
actual practice there's no change in features as we only really use
a compile-time constant (= 3) to specify the number of space
dimensions.
2014-08-29 11:39:24 +02:00
Bård Skaflestad
7933d87605 Merge pull request #638 from totto82/fix_GOC_below
Currectly handling GOC below and WOC above the reservoir
2014-08-29 09:27:56 +02:00
Bård Skaflestad
1a3f7b230f Merge pull request #639 from atgeirr/threshold-pressure
Threshold pressure function
2014-08-29 09:13:27 +02:00
Bård Skaflestad
9784df8024 Merge pull request #641 from atgeirr/fix-warnings
Fix warnings
2014-08-28 16:11:12 +02:00
Atgeirr Flø Rasmussen
e1be710526 Suppress unused argument warning.
The eclState argument was added in PR#634, and may be needed later.
Until then, this silences the warning generated.
2014-08-28 14:14:22 +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
59205f2e65 Add missing 'not' in documentation. 2014-08-28 10:20:07 +02:00
Bård Skaflestad
7f875a6c34 Use correct name in name-space closing comment
Pointed out by [at] atgeirr.
2014-08-28 10:14:55 +02:00
Bård Skaflestad
f22bd0c208 Fix class reference in documentation
CompressedAccess<> was the former name of class template Compressed<>.
2014-08-27 22:55:15 +02:00
Bård Skaflestad
58f55f3c90 Reimplement assign* in terms of Compressed<>
This is a demonstration of using the

    GridPropertyAccess::Compressed<>

class template.  We save (some) memory by not creating the zero
fall-back vector in assignPermeability(), preferring instead to use
the fall-back/default mechanism of ArrayPolicy::ExtractFromDeck<>.

While here, adjust vector<PermComponent>::reserve() capacity to
reflect actual requirements.
2014-08-27 21:19:41 +02:00
Bård Skaflestad
37dfc4a3b5 Add facility for accessing active subset of global data array
This commit introduces a fairly general mechanism for accessing the
active subset of a global grid (property) array.  Essentially, this
takes on the role of translating the active cell index through the
"global_cell" mapping when accessing, e.g., the net-to-gross data
value.

The primary component is class template

    Opm::GridPropertyAccess::Compressed<DataArray,Tag>

which implements a read-only

    value_type operator[](const int c)

that encapsulates and performs the compressed-to-global cell index
translation.  Template parameter "DataArray" is intended as a policy
parameter that for instance wraps access to a "GridProperty<T>" from
module opm-parser (with a fall-back default value if the data is not
specified on input).  The "Tag" parameter is a provision for type
safety--e.g., to prevent passing a region ID into a function that
requires a porosity value.
2014-08-27 21:19:41 +02:00
Bård Skaflestad
7f07964e0c assignPermeability: Remark on storage order
Clients expect column-major (Fortran) ordering of the contiguous
"permeability_" array so that's what we create despite "tensor"
being row-major.

Suggested by: [at] atgeirr
2014-08-27 21:19:40 +02:00
Bård Skaflestad
008702817d Merge pull request #637 from atgeirr/add-minpv
Add MINPV processing to GridManager
2014-08-27 19:34:34 +02:00
Atgeirr Flø Rasmussen
e1ea795cdc Fix minor typo in comment. 2014-08-27 18:13:15 +02:00
Atgeirr Flø Rasmussen
5604745642 New free function thresholdPressures(). 2014-08-27 18:07:46 +02:00
Atgeirr Flø Rasmussen
5e940faa8b Use syntax for std::array which works with GCC 4.4. 2014-08-27 16:00:57 +02:00
Tor Harald Sandve
37e526a046 Fix sign error in the specified oil pressures at at WOC and GOC
The oil pressure at the contact for the special cases:

contact	location	po(contact)
GOC 	above 	-inf
GOC 	below 	+inf
WOC 	above 	-inf
WOC 	below 	+inf
2014-08-27 14:35:01 +02:00
Atgeirr Flø Rasmussen
ce4168df27 Refactor set/getCellCorn() with private method.
Also const-ify everything that can be const.
2014-08-27 13:17:28 +02:00
Atgeirr Flø Rasmussen
0f02dba2d4 Correct doc error (zcorn is also output argument). 2014-08-27 11:15:00 +02:00
Atgeirr Flø Rasmussen
7ca1922c77 Remove unneeded const_cast. 2014-08-27 11:13:37 +02:00
Tor Harald Sandve
704e7dbb58 Currectly handling GOC below and WOC above the reservoir The phase pressure of water and gas is set to inf when WOC and GOC is above and below the reservoir. This make sure the minimum saturation values are picked for these cases. 2014-08-27 10:10:55 +02:00
Bård Skaflestad
bcec9fd0f6 Simplify diagonal component thresholding
This commit switches the assignment

    diagonal = max(diagonal, minval)

to using a reference in the "diagonal" expression.  This guarantees
that the indexing is done once which eases maintainability.  While
here, replace the hard-coded dimension stride ('3') with the current
run-time dimension.  This is mostly for symmetry because the overall
code is only really supported in three space dimension.
2014-08-26 23:50:05 +02:00
Bård Skaflestad
2ae64c1df2 Remove obsolete comment
This comment was needed when the code was first developed, but
subsequent development has rendered it obsolete.  Remove it to avoid
confusion.
2014-08-26 23:50:05 +02:00
Bård Skaflestad
194b6eda7a Fix semantics of permeability assignment
Calling code relies on permeability tensors being stored in column
major order (row index cycling the most rapidly).  Honour that
requirement.  The previous assignment implied row major ordering
(column index cycling the most rapidly).  This, however, is a
pedantic rather than visible change because the surrounding code
enforces symmetric tensors whence both orderings produce the same
results when the array is viewed contiguously.
2014-08-26 23:50:04 +02:00
Atgeirr Flø Rasmussen
6297fb7991 Merge pull request #630 from totto82/fix_init_spe9
The water/gas press. are calculated only if woc/goc is within the reservoar
2014-08-26 22:27:11 +02:00
Atgeirr Flø Rasmussen
4279170284 Change loop order. 2014-08-26 22:10:31 +02:00
Atgeirr Flø Rasmussen
37604618ec Documented MinpvProcessor. 2014-08-25 15:39:33 +02:00
Atgeirr Flø Rasmussen
4ad160d2de Add new constructor, that can handle MINPV processing. 2014-08-25 15:20:41 +02:00
Atgeirr Flø Rasmussen
f74a0bb3e6 New class MinpvProcessor, and test. 2014-08-25 15:20:01 +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
Bård Skaflestad
d3d38d2d6f Merge pull request #634 from osae/satFunc-eclState
Provide eclipse state to saturation property init.
2014-08-25 13:55:44 +02:00
osae
96823e04a3 Provide eclipse state to saturation property init. 2014-08-22 15:36:07 +02:00
Atgeirr Flø Rasmussen
cfd07600bc Create pointer-to-const objects.
Older gcc (4.4) does not allow conversion of shared_ptr<Foo> to
shared_ptr<const Foo>. Pointed out by @bska.
2014-08-21 15:24:39 +02:00
Atgeirr Flø Rasmussen
5690d20705 Add PINCH support to grid construction. 2014-08-21 14:32:13 +02:00
Atgeirr Flø Rasmussen
f72f823aab Make all construction from deck use EclipseGrid.
The deck constructor is still present, but it will construct an
EclipseGrid object instead of doing its own equivalent processing.
2014-08-21 14:21:21 +02:00
Tor Harald Sandve
b331c68fbc Fixes issues pointed out in the PR comments 2014-08-18 08:57:23 +02:00
Tor Harald Sandve
12b245df3d The water/gas pressures are only calculated if woc and goc lies within
the reservoar
The water/gas pressure is set to -inf when woc and goc is above or below
the reservoar.
2014-08-15 08:56:35 +02:00
Atgeirr Flø Rasmussen
a6c173abad Merge pull request #625 from andlaus/fix_wells_in_summary_output
EclipseWriter: attempt to fix the well summary output for activeWells != totalWells
2014-08-14 14:02:54 +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
Tor Harald Sandve
28d7380d40 BUGFIX
Wrong placement of parentes
2014-08-11 12:45:52 +02:00
Tor Harald Sandve
5051658a07 Implements initialization for constant capillary pressure functions 2014-08-11 11:23:15 +02:00
Tor Harald Sandve
4f862e759e Computes saturations based on depths
For constant capillar pressure function the saturation is
    determined by cell depths:

    Sg_max, Sw_min
    ----- goc ----
    Sg_min, Sw_min
    ----- woc ----
    Sg_min, Sw_max
2014-08-11 11:22:47 +02:00
Bård Skaflestad
6b36dab2ee swatInitScaling(): Abide by OPM coding conventions
This commit attaches the reference-signifying ampersand to the type
as is preferred in the OPM code base.

Suggested by: [at] atgeirr
2014-08-07 18:50:07 +02:00
Bård Skaflestad
c047a6c9dc swatInitScaling(): Remove EOL whitespace
This commit removes several instances of EOL whitespace in function
'swatInitScaling()'.  Aesthetic only.  No functional changes.

Suggested by: [at] atgeirr
2014-08-07 18:50:07 +02:00
Bård Skaflestad
f8492aeb64 swatInitScaling(): Name magic constant
The constant 1.0e-8 was used as a threshold to distinguish "low"
from "high" capillary pressure values.  Introduce acutual constant
"pc_low_threshold" to clarify that role.

Suggested by: [at] atgeirr
2014-08-07 18:50:07 +02:00
Bård Skaflestad
e8901775cd swatInitScaling(): Rename array size parameter
This commit renames the 'np' parameter used to allocate small arrays
for saturations and capillary pressures to 'max_np' to better
reflect its purpose.

Suggested by: [at] atgeirr
2014-08-07 18:50:06 +02:00
Bård Skaflestad
4da2c5862d Initialise saturation points for Pc scaling
This gives predictable failure modes although the actual behaviour
is (probably) unchanged.
2014-08-07 18:50:06 +02:00
Bård Skaflestad
6f75afc62b Consistently refer to BlackoilPhases::Aqua
This avoids confusion.
2014-08-07 18:50:06 +02:00
Bård Skaflestad
62f654b52c Don't use variable-length arrays
We only support up to 'BlackoilPhases::MaxNumPhases' different
phases (and components), so there's no need to pretend otherwise.
2014-08-07 18:50:06 +02:00
Atgeirr Flø Rasmussen
f32198a040 Properly handle defaulted well reference depths. 2014-08-07 12:57:05 +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
Liu Ming
53c539de6a use block{} guarantee for if and for statements. 2014-07-08 11:00:19 +08:00
Liu Ming
d8962ff1ce Add HAVE_PETSC macro. 2014-07-08 10:58:39 +08:00
Atgeirr Flø Rasmussen
6947423b97 Merge pull request #613 from andlaus/PvtLiveOil_fix_argument_ordering
PvtLiveOil: fix ordering of arguments
2014-07-07 14:23:54 +02:00
Atgeirr Flø Rasmussen
ace1e3306a Merge pull request #607 from osae/swatinit
Scaling of capillary pressure / initialisation from kw SWATINIT.
2014-07-07 14:10:02 +02:00
Andreas Lauser
db3a616a2f PvtLiveOil: fix ordering of arguments
the strange thing is that this worked as-is. The only explaination
which I have for this is that these code paths are unused...
2014-07-07 11:58:54 +02:00
Bård Skaflestad
24524e0137 Reimplement clone_wells() in terms of well_controls_clone() 2014-07-03 16:09:56 +02:00
Bård Skaflestad
841192c605 wells.h: Document several function
This commit adds Doxygen-style documentation to functions

  - clear_well_controls()
  - set_current_control()
  - wells_equal()

No functional changes.
2014-07-03 16:09:56 +02:00
Bård Skaflestad
83b1cc7438 well_controls: Add deep-copy (clone) support
New function well_controls_clone(), implemented in terms of the
public API only, mirrors the objective of function clone_wells(),
only for well control sets.  Add a basic test to demonstrate the
function too.
2014-07-03 16:09:56 +02:00
Bård Skaflestad
001834ccab clone_wells(): Assert result equal to input
This adds a debug-mode safety belt that cloning wells produces a
comparable set of wells to the input.
2014-07-03 16:09:56 +02:00
Bård Skaflestad
7f5ee5abf3 well_controls_equal(): Don't compare set capacities
The 'cpty' field is for internal memory management purposes only.
No client can know of its existence, let alone inspect or directly
change the value, so it should not be used to adjudicate control set
equality.  This was useful during the refactoring work to introduce
the opm-parser support, but its utility has since ceased.

Okay'ed by: [at] atgeirr and [at] joakim-hove
2014-07-03 16:09:56 +02:00
osae
80463a2e40 Included inititalisation of surface volumes. 2014-06-26 15:06:47 +02:00
osae
89137e8cd0 Make use of EclipseState for EQLNUM and SWATINIT. 2014-06-26 14:46:57 +02:00
osae
e3b06569e9 Adjustments for vanishing oil phase. 2014-06-25 18:03:17 +02:00
osae
d3ee5dc20a SWATINIT: Initialisation and capillary pressure scaling. 2014-06-25 18:03:17 +02:00
osae
6e00befef6 Scaling of capillary pressure. 2014-06-25 18:03:17 +02:00
Atgeirr Flø Rasmussen
e8db63dfb0 Fix initialization of tracer heads, and output ordering. 2014-06-25 09:56:37 +02:00
Atgeirr Flø Rasmussen
59d0ae185f Refactor tracer computations.
Current version executes reordered solve once for each tracer. The benefit
is a simpler code and the ability to use MDU with tracers. The cost is
potentially higher runtime, compared to doing a single sweep for all
tracers (and tof).
2014-06-24 09:43:26 +02:00
Atgeirr Flø Rasmussen
11bea99bef Remove unused data member. 2014-06-23 14:18:01 +02:00
Atgeirr Flø Rasmussen
4d2043a3ba Clean up dead code for MDU, update comment. 2014-06-23 14:05:51 +02:00
Atgeirr Flø Rasmussen
cf36cbe6d1 Add tracers_ensure_unity parameter.
When this boolean parameter is true (the default), tracer solutions
will be normalized so that the tracer averages will sum to one in each cell.
This behaviour is the same as before, the change is that it can now be
turned off.
2014-06-23 14:03:49 +02:00
Atgeirr Flø Rasmussen
8dceb4b08c Activate MDU option, making SMU method its default. 2014-06-23 11:29:14 +02:00
Atgeirr Flø Rasmussen
b3454a03b8 Fix bugs in MDU. 2014-06-23 11:23:16 +02:00
Atgeirr Flø Rasmussen
d498143488 Add computation of face tofs parts.
This must be done after the cell tof has been computed since they
depend on it.
2014-06-23 11:22:14 +02:00
Atgeirr Flø Rasmussen
57cb41217f First compiling version of fixed MDU method. 2014-06-19 15:11:32 +02:00
Atgeirr Flø Rasmussen
1080e37fb0 Fix use of assert. 2014-06-16 13:44:00 +02:00
Atgeirr Flø Rasmussen
d788814259 Work in progress fixing multidim upwinding. 2014-06-16 13:14:42 +02:00
Atgeirr Flø Rasmussen
2b6fdc6259 Removed unused debugging output. 2014-06-16 12:49:41 +02:00
Atgeirr Flø Rasmussen
5e5b9e091d Split method solveSingleCell() for easier maintenance. 2014-06-16 12:49:41 +02:00
Andreas Lauser
0c47d27827 Glue in support for the grid property modifier keywords
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.
2014-06-11 13:48:49 +02:00
Bård Skaflestad
6bac6159ee Merge pull request #596 from andlaus/fix_some_keyword_names
Fix some keyword names
2014-06-10 23:14:34 +02:00
Andreas Lauser
31c97ca172 change item names used to query the PVCDO keyword
That's similar to having fun with a vodoo doll...
2014-06-06 13:18:57 +02:00
Andreas Lauser
80cb3265db fix some keyword names
The queried keywords are unknown to the parser and after manual
inspection also to the Eclipse RM. There might be wrong keywords some
left, but these were to ones needed to get SPE9 started using
sim_fibo_ad...
2014-06-05 16:07:31 +02:00
Andreas Lauser
93f7a47062 add missing include
for some reason this seems to be only required by GCC 4.4
2014-06-05 14:32:58 +02:00
Andreas Lauser
126ca8043f Eclipse does not have a PERM keyword 2014-06-05 08:36:53 +02:00
Andreas Lauser
8568f9f3f9 add an assert 2014-06-04 11:11:35 +02:00
Andreas Lauser
2545b423fc handle the case that the compressed to logically cartesian array is NULL 2014-06-04 11:11:35 +02:00
Andreas Lauser
cbb5910a93 incorperate the review comments/decisions for multi-region PVT
the largest change is that all classes below opm/core/props/pvt take
the PVT region index as an argument, the higher-level ones (i.e.,
BlackoilProps*) take cell indices.
2014-06-04 11:11:35 +02:00
Andreas Lauser
fbd8d42e8d Implement multi-region PVT for all property classes
since they are not using a single PVT table anymore, their "Single"
prefix has been removed...
2014-06-04 11:11:35 +02:00
Liu Ming
399a8f6884 use malloc instead of calloc and rename functions. 2014-05-23 11:11:07 +08:00
Liu Ming
afe51ae669 rename the private member. 2014-05-23 11:10:22 +08:00
Liu Ming
05d3f73390 use unordered_map for "string-enum" translations. 2014-05-23 11:09:04 +08:00
Andreas Lauser
c1c3f9d2e0 remove the table_t type
that was an artifact only required for the old parser
2014-05-21 11:22:43 +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
Liu Ming
55f348e4cd Throw information for Petsc. 2014-05-16 15:02:49 +08:00
Liu Ming
46fca4d9fc Initialize Petsc from constructor.
Remove private members for initializing Petsc.
2014-05-16 14:53:49 +08:00
Liu Ming
34dfb85919 Add Petsc to OPM. 2014-05-16 14:41:51 +08:00
Atgeirr Flø Rasmussen
9690ccc978 Supress signed-unsigned comparison warning. 2014-05-12 09:18:52 +02:00
Atgeirr Flø Rasmussen
a681bcf869 Merge pull request #573 from osae/test-eps
Endpoint scaling - taking advantage of the new parser.
2014-05-12 08:28:48 +02:00
osae
f0069c7868 Removing a few bugs ... 2014-05-06 18:15:03 +02:00
osae
57b694f66a Proper interpretation of ENDNUM and IMBNUM fields.
Made consistent with grid discretization.
2014-05-06 14:41:17 +02:00
osae
6cd46c5585 Initialisation of EGLNUM (analogous to e.g SATNUM) 2014-05-06 12:47:24 +02:00
osae
2beb0631b2 Inserted some documentation. 2014-05-05 11:27:10 +02:00
osae
c6a83df998 Fix to make EQLNUM consistent with ACTNUM.
This should eventually be integrated in the parser.
2014-05-05 11:23:43 +02:00
osae
7280ce2517 ENDNUM: changed default value and jtab-logic
Default value changed from 'no scaling' to 'use table 1'.
Range of jtab changed to [-1,#tables-1].
2014-05-05 10:33:04 +02:00
osae
61a52eee2e Reset gwseg as the model for endpoint scaling. 2014-05-05 10:33:04 +02:00
osae
7f04384b10 Make use of keywords SATOPTS and EHYSTR. 2014-05-05 10:33:04 +02:00
osae
003b37ad88 Use ENDNUM and prepare for IMBNUM. 2014-05-05 10:33:04 +02:00
osae
f7d2468d79 Added missing line (parser conversion). 2014-05-05 10:33:04 +02:00
Andreas Lauser
89f4a6db5b adapt to the renames of the table classes in opm-parser
basically, "Opm::SimpleTable" becomes "Opm::SingleRecordTable".
2014-04-28 18:47:28 +02:00
Andreas Lauser
7917295923 add opm-parser variants for the incompressible property classes 2014-04-25 14:25:54 +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