Commit Graph

1504 Commits

Author SHA1 Message Date
Joakim Hove
33034b0319 Logger will throw if the messageType is not enabled. 2015-03-04 22:12:52 +01:00
Joakim Hove
ce5960bbcd Added new CounterLog constructor 2015-03-04 22:12:52 +01:00
Joakim Hove
25bff6480d Renamed MessageCounter -> CounterLog 2015-03-04 22:12:52 +01:00
Joakim Hove
aa604aad9e Add ostream.flush() call in the StreamLog 2015-03-04 22:10:02 +01:00
Joakim Hove
44d4b92f68 Renamed AllMessageTypes -> DefaultMessageTypes
A newly created Logger instance should have all these message types
enabled.
2015-03-04 22:10:01 +01:00
Joakim Hove
46a98747f9 Added messageType methods to OpmLog 2015-03-04 22:10:00 +01:00
Joakim Hove
139330ec88 Added backend manipulation through OpmLog frontend. 2015-03-04 22:09:59 +01:00
Joakim Hove
5d3daabaef Added Logger::getBackend<T>() method 2015-03-04 22:09:58 +01:00
Joakim Hove
e6c6209991 Added StreamLog backend. 2015-03-04 22:09:57 +01:00
Joakim Hove
2c2da004b9 WIP: Added simple backend map in Logger 2015-03-04 22:09:57 +01:00
Joakim Hove
f52b5397f7 Using LogUtil to format message. 2015-03-04 22:09:56 +01:00
Joakim Hove
245b91d0c2 Introduced LogUtil file + Logger class
- The new LogUtil.cpp / LogUtil.hpp files contain the enum definitions
  for MessageType and formatting functions.

- The Logger class is meant to be the instance which is held by the
  static OpmLog singleton class.
2015-03-04 22:09:55 +01:00
Joakim Hove
930d70744d Added thin abstract class LogBackend 2015-03-04 22:09:55 +01:00
Joakim Hove
d3277543ec Renamed existing Logger -> MessageCounter 2015-03-04 22:09:54 +01:00
Joakim Hove
738fb0c05c Moved MessageType enum to OpmLog 2015-03-04 22:07:04 +01:00
Joakim Hove
e2a11f620c Added simple static format functions to OpmLog 2015-03-04 22:07:03 +01:00
Joakim Hove
e18123b7f3 Merged Singleton Logger with existing logger. 2015-03-04 22:07:03 +01:00
Joakim Hove
2011abfcf8 Moved to SingleTonLog 2015-03-04 22:07:03 +01:00
Joakim Hove
2ac15ffae2 Rudimentary example of Log singleton.
This commit shows a very basic example of how Logging singleton can be
implemented. The commit consists of a fully static class OpmLog which
manages a Logger class; in this case an instance of the ParserLog
class. The static OpmLog class can then be used from anywhere in the opm
code with:

  OpmLog::addMessage( messageType , "Log message")

Before this can be really useful the Logger class should be extended /
subclassed / ... for general usability.
2015-03-04 22:07:01 +01:00
Joakim Hove
f4f163e874 Using defaultRegion for MULTREGTSCANNER 2015-03-04 11:11:15 +01:00
Joakim Hove
e06d14309c Using defaultRegion for xxxREG keywords 2015-03-04 11:11:14 +01:00
Joakim Hove
8846d4b7b8 EclipseState: infer default region from GRIDOPTS 2015-03-04 11:11:13 +01:00
Joakim Hove
bae2fa4b3a Updated VFPPROD keyword to include records. 2015-03-03 13:30:42 +01:00
Joakim Hove
ecb1d5bd74 Update code generator to use record iterator. 2015-03-03 13:30:42 +01:00
Joakim Hove
f0fb5c993f Added recordBegin() and recordEnd() 2015-03-03 13:30:42 +01:00
Joakim Hove
3c84bbbdca Added begin() end() to ElasticVector 2015-03-03 13:30:41 +01:00
Joakim Hove
233922e935 Using correct ParserRecord when applying units. 2015-03-03 13:30:41 +01:00
Joakim Hove
90e8af2a48 Added SGFN json configuration. 2015-03-03 13:04:13 +01:00
Joakim Hove
328097d541 Added SOF3 json configuration 2015-03-03 13:04:06 +01:00
Andreas Lauser
1d60612204 add the VISCREF keyword 2015-03-02 19:11:40 +01:00
Andreas Lauser
2ab85d3430 add the THERMAL keyword 2015-03-02 19:11:35 +01:00
Andreas Lauser
39338d97a2 add the THERMEX1 keyword
this is required to implement the temperature dependence of the oil
phase density.
2015-03-02 19:11:33 +01:00
Andreas Lauser
569917abbf add the custom keywords "GCOMPIDX" and "OCOMPIDX"
the intention of it is to specify the component index which should be
used to calculate the properties of the gas and oil phase in the case of
thermal black-oil runs. The keywords are supposed to use Eclipse-style
indices, i.e., "1" is stands for the first component.

The reason why I think that this is required at all is that I have not
found out if Eclipse does use temperature dependent gas viscosities
and densities for non-compositional runs. (I have found a few
equations in the RM and TD for gas which include temperature for
compositional runs on E300, though.)

Note that there won't be a WCOMPIDX because compositional simulations
in Eclipse do not seem to treat water as a separate component...

if somebody has a better idea or knows how eclipse does this for
thermal black-oil simulations, let me know...
2015-03-02 19:11:31 +01:00
Andreas Lauser
318bffaa13 add the ZFACTOR keyword family
again, these are mentioned in the "Thermal option" section of the TD.
2015-03-02 19:11:29 +01:00
Andreas Lauser
65d8dd6210 add the MW, MWS and OILMW keywords
these specify the molecular weight of the components (and in the case
of OILMW that of the oil phase) and are used by the "thermal option".
2015-03-02 19:11:26 +01:00
Andreas Lauser
d55fc434f7 add the [CDPT]REF and [CDPT]REFS keywords
these are required for the "thermal option".
2015-03-02 19:11:24 +01:00
Andreas Lauser
3d7a787f88 add the STCOND keyword
it allows to set the standard conditions and is mentioned in the
"Thermal option" section of the TD.
2015-03-02 19:11:22 +01:00
Andreas Lauser
724e902c80 add the keywords required for temperature dependence of the oil and water densities
strangely enough, [at]totto82 an me did not find a corresponding
keyword for the gas phase. Also, the documentation of the second item
of the WATDENT keyword seems to be incorrect to me because its default
in FIELD units it is off by a factor of 10^4 compared to the one for
METRIC (at least in my copy of the RM).
2015-03-02 19:11:20 +01:00
Andreas Lauser
03366fe2e4 add unit for absolute (i.e., thermodynamic) temperature
This is required for keywords which do not use "every-day" temperature
values but thermodynamic ones or keywords that use "per degree"
values. Examples of such specimen are the OILCOMPR and WATDENT
keywords.
2015-03-02 19:11:18 +01:00
Andreas Lauser
5ff07aa6f2 fix the COMPS keyword
the "size" item was missing...
2015-03-02 19:11:15 +01:00
Andreas Lauser
101b1c93ea fix the WATVISCT and OILVISCT table classes
in contrast to GASVISCT, the viscosity column is decreasing for these.

also, a comma was MIA in WatvisctTable...
2015-03-02 19:11:13 +01:00
Joakim Hove
be95805f15 Using variable ParserRecord when parsing. 2015-02-26 22:01:30 +01:00
Joakim Hove
f793ab09d1 Added basic support for records: in configuration. 2015-02-26 21:54:06 +01:00
Joakim Hove
62e7f2a3aa Moved item management from Keyword to record.
Withe this commit the ParserRecord objects are created as needed by the
ParserKeyword; i.e a parserkeyword can in principle be totally without a
record.
2015-02-26 19:55:06 +01:00
Joakim Hove
8ac17f744e Added Data awareness to ParserRecord. 2015-02-26 11:46:25 +01:00
Joakim Hove
9696f694bf Merge pull request #425 from joakim-hove/RecordVector
Record vector
2015-02-20 11:13:26 +01:00
Joakim Hove
0a857837df Merge pull request #422 from andlaus/correct_reservoir_volume_handling
Correct reservoir volume handling
2015-02-20 09:31:04 +01:00
Joakim Hove
875f591a1b Changed ParserKeyword to use vector of records 2015-02-20 00:21:32 +01:00
Joakim Hove
091acd1dd7 Added utility ElasticVector 2015-02-20 00:16:31 +01:00
Atgeirr Flø Rasmussen
36089420e1 Add missing throw check, also silencing warning. 2015-02-17 10:30:54 +01:00