Commit Graph

626 Commits

Author SHA1 Message Date
Arne Morten Kvarving
4dbf2428f7 suppress some unused variables warnings without mpi 2019-06-28 14:20:51 +02:00
Kai Bao
dfe22cb1a4
Merge pull request #1901 from totto82/fixMSWThrow
Make sure rvmax and rsmax is non-negtive in the getSurfaceVolume for MSW
2019-06-27 15:41:45 +02:00
Tor Harald Sandve
e2420a4361
Merge pull request #1916 from andlaus/abort_on_unknown_parameters
mebos, flow: adapt to the eWoms changes in handling unknown parameters
2019-06-27 14:59:35 +02:00
Andreas Lauser
2a2b183679 add comments to describe flag arguments 2019-06-27 14:27:18 +02:00
Tor Harald Sandve
fd26b61599
Merge pull request #1907 from andlaus/improve_time_integration
Improve time integration
2019-06-27 14:08:07 +02:00
Andreas Lauser
1bbf18d7c8 mebos, flow: adapt to the eWoms changes in handling unknown parameters
for `flow`, there's no change compared to the current behavior, `ebos`
and its variants will complain when it encounters unused parameters.
2019-06-27 11:51:28 +02:00
Kai Bao
9a2fcdbfd5 fixing warnings in other folder under opm-simulators 2019-06-26 10:48:41 +02:00
Kai Bao
53b15527c2 fixing warnings under simulator/wells 2019-06-26 09:52:38 +02:00
Atgeirr Flø Rasmussen
aa06942695
Merge pull request #1911 from GitPaean/refactoring_wtest_for_wellcut_completions_continue
adapting to the upstream change
2019-06-26 09:34:19 +02:00
Kai Bao
1d5d883e99 adapting to the upstream change 2019-06-25 22:13:34 +02:00
Andreas Lauser
c2aebbb5da EclProblem: use the generic time integration mechanism
i.e., the EclProblem does no longer need to implement the
`timeIntegration()` method itself. since `flow` does not use this code
path, it is unaffected.
2019-06-25 12:39:00 +02:00
Atgeirr Flø Rasmussen
bc07b688c5 Fix typo, indentation and return in unknown-parameter situation. 2019-06-25 10:10:58 +02:00
Atgeirr Flø Rasmussen
43503cf7c6
Merge pull request #1904 from blattms/abort-with-notification
Notify user that we are aborting because of unused keywords.
2019-06-25 09:45:27 +02:00
Kai Bao
e15a8f62e8 considering not OPEN connection when updateCompletions
in WellInterface.
2019-06-24 21:20:37 +02:00
Kai Bao
e0bd33db43 using template instead of pointer to function
for functions checkMaxRatioLimitWell and checkMaxRatioLimitCompletions
2019-06-24 14:03:20 +02:00
Kai Bao
b27a646b98 adding function checkMaxRatioLimitCompletions in WellInterface
and use it in checkMaxWaterCutLimit()
2019-06-21 14:11:12 +02:00
Kai Bao
7bb06e1c3c adding function checkMaxRatioLimitWell to WellInterface
and use it in function checkMaxWaterCutLimit
2019-06-21 14:11:12 +02:00
Kai Bao
01c9935b02 fixing the function checkMaxWaterCutLimit
when looking for the worst offending completion
2019-06-21 14:11:12 +02:00
Kai Bao
8be28e8448 adding function initCompletions() to WellInterface 2019-06-21 14:11:12 +02:00
Markus Blatt
35ad7a60e2 Notify user that we are aborting because of unused keywords. 2019-06-21 13:11:21 +02:00
Atgeirr Flø Rasmussen
a598734e71
Merge pull request #1890 from akva2/janitoring
remove unused variables
2019-06-21 08:33:03 +02:00
Tor Harald Sandve
337ad8a046 Make sure rvmax and rsmax is non-negtive in the getSurfaceVoluem for MSW
Negative values can happen if the pressure is outside the table range
2019-06-21 08:15:30 +02:00
Atgeirr Flø Rasmussen
5749a7150c Move files out of opm/core/simulator. 2019-06-20 11:00:52 +02:00
Atgeirr Flø Rasmussen
fa016a6008 Moved all remaining files out of opm/autodiff. 2019-06-20 11:00:51 +02:00
Atgeirr Flø Rasmussen
a33cfbf0bc Moved Flow-related classes and files to opm/simulators/flow. 2019-06-20 11:00:51 +02:00
Andreas Thune
c4e0bc2385 Moving findOverlapRowsAndColumns() to a separate file. 2019-06-20 11:00:51 +02:00
Kai Bao
1593d431ce
Merge pull request #1897 from alfbr/well-logging
Moved well test messages from debug to log and prt
2019-06-20 10:47:04 +02:00
Atgeirr Flø Rasmussen
841f92afc7
Merge pull request #1896 from alfbr/time-reports
Adding time and date to time step report
2019-06-20 10:31:48 +02:00
Alf Birger Rustad
671b2d9a47 Moved well test messages from debug to log and prt 2019-06-20 09:57:24 +02:00
Kai Bao
f4efd464f4
Merge pull request #1883 from totto82/fix_inj
Upwinding for MSW
2019-06-19 12:50:16 +02:00
Arne Morten Kvarving
34bcccef9c remove unused variables
quells warnings
2019-06-19 11:59:43 +02:00
Tor Harald Sandve
a7f718a368 Some clean-up adressing PR comments 2019-06-19 09:13:38 +02:00
Alf Birger Rustad
d8b4bbb0be Adding time and date to time step report 2019-06-18 14:01:08 +02:00
Arne Morten Kvarving
181d3cea6b fixed: build with dune 2.6 without MPI 2019-06-18 13:39:13 +02:00
Tor Harald Sandve
5c7cfd8c21 fix scaling of gas injector 2019-06-17 08:40:44 +02:00
Tor Harald Sandve
22af6e563c fix upwinding for injector 2019-06-17 08:40:44 +02:00
Tor Harald Sandve
c39cec55fe fix control eq inj 2019-06-17 08:40:44 +02:00
Joakim Hove
7f1970af3c Use the shared SummaryState instance when initializing well rates 2019-06-17 07:49:55 +02:00
Kai Bao
ab839896b6 using createConstantZero instead of createBlank
the content for createBlank is not initialized, which causes undefined
behavoir.
2019-06-13 15:05:12 +02:00
Kai Bao
4c105d7672 copying invertMatrix for DynamicMatrix
the reason is to make sure for blackoil cases, the same algorithm will
be used to invert the D matrix for the well model. As a result, it will
reduce the burden to test the PR.

Whether we will keep this algorithm for 4 X 4 matrix will be addressed
as a separate issue.
2019-06-13 14:49:04 +02:00
Kai Bao
310741a54f fixing a small bug related to EvalWell 2019-06-13 14:49:04 +02:00
Kai Bao
4449f0c172 adding updateConnectionRatePolyMW to StandardWell 2019-06-13 14:49:04 +02:00
Kai Bao
2256395957 adding updateExtraPrimaryVariables to StandardWell 2019-06-13 14:49:04 +02:00
Kai Bao
94057a53f9 adding checkConvergenceExtraEqs to StandardWell 2019-06-13 14:49:04 +02:00
Kai Bao
4f7b899290 fixing the compilation problem due to rebasing
and also some small cleaning up
2019-06-13 14:49:04 +02:00
Kai Bao
3dcec6a436 removing StandardWellV 2019-06-13 14:49:04 +02:00
Kai Bao
33de77e595 incorporate the staticSize template parameter for DynamicEvaluation 2019-06-13 14:49:04 +02:00
Kai Bao
ad0e294e52 using StandardWellV as the default StandardWell model 2019-06-13 14:49:04 +02:00
Atgeirr Flø Rasmussen
078678206a Changes to support latest Dune version. 2019-06-12 10:40:55 +02:00
Atgeirr Flø Rasmussen
b837dd71b4 Small fixes for the FlexibleSolver system. 2019-06-11 09:55:05 +02:00
Atgeirr Flø Rasmussen
2c5ef367dd
Merge pull request #1852 from atgeirr/flexible-linear-solver
Flexible linear solver
2019-06-06 14:21:51 +02:00
Atgeirr Flø Rasmussen
d5c3c93c7d Use overloading instead of template specialization.
This seems to be necessary for older compilers.
2019-06-06 10:36:17 +02:00
Atgeirr Flø Rasmussen
72ae444566 Fixes for Dune < 2.6.
The PreconditionerFactory requires 2.6, so this is addressed by
simply not using that code at all for Dune < 2.6. No FlexibleSolver
etc.
2019-06-06 09:10:43 +02:00
Atgeirr Flø Rasmussen
8ae671eb86
Merge pull request #1871 from totto82/fix_segfault
fix segfault when no well report is registred
2019-06-06 08:57:56 +02:00
Atgeirr Flø Rasmussen
38a61fa0c0 Add <config.h> include, clean up comments. 2019-06-05 15:57:45 +02:00
Atgeirr Flø Rasmussen
c21fd6f26d Add and use PreconditionerFactory class.
This replaces the makePreconditoner() function. The main advantage
is that it is extensible, making it easy to for example add new
preconditioners to the factory at runtime. It supports both parallel
and serial preconditioners.
2019-06-05 15:12:52 +02:00
Atgeirr Flø Rasmussen
d44b974dc8 Bugfix: ensure the matrix passed to parallel preconditioner is ok.
Done with the makeOverlapRowsInvalid() approach.
2019-06-05 15:12:33 +02:00
Atgeirr Flø Rasmussen
d42c5426b2
Merge pull request #1872 from totto82/eval_friction2
Make calculateFrictionFactor evalution  + critical bugfix in MSW friction model
2019-06-05 11:19:28 +02:00
Joakim Hove
47f4e750d2
Merge pull request #1865 from joakim-hove/use-shared-summarystate
Use shared summarystate
2019-06-04 09:49:56 +02:00
Atgeirr Flø Rasmussen
84a8143bad Improved parameter hierarchy and const-correctness. 2019-06-03 11:42:30 +02:00
Atgeirr Flø Rasmussen
a76b19d95a Make FlexibleSolver feature-complete.
In particular:
 - Add parallel solvers and preconditioners.
 - Add the update() interface to preconditioners, and use it with CPR.
2019-06-03 11:42:30 +02:00
Halvor Møll Nilsen
ec498086a6 Add flexible solver and preconditioner infrastructure.
Also use it in flow_blackoil_dunecpr.cpp. Adds new command-line parameter,
--linear-solver-configuration-json-file, to read linear solver config from
JSON-format file at runtime.
2019-06-03 11:42:30 +02:00
Tor Harald Sandve
0d28dfff17 fix cutoff value bug in haalandFormula 2019-06-03 11:28:15 +02:00
Tor Harald Sandve
779dbd39dd make calculateFrictionFactor Evaluation 2019-06-03 11:24:56 +02:00
Tor Harald Sandve
8f60a5f9fc
Merge pull request #1841 from andlaus/remove_isSubstep
EclProblem: remove the isSubstep parameter from writeOutput()
2019-06-03 10:41:12 +02:00
Tor Harald Sandve
4c4921c6b2 fix segfault when no well report is registred 2019-06-03 09:22:04 +02:00
Atgeirr Flø Rasmussen
2cc22f99cb
Merge pull request #1868 from andlaus/sparse_matrix_adapter_from_linear_solver
set the SparseMatrixAdapter property in the linear solver type tag
2019-05-31 20:40:10 +02:00
Kai Bao
8fd1a8b7da assert pressure derivative in getSegmentRateUpwinding is zero 2019-05-31 12:51:50 +02:00
Kai Bao
5aacda1880 adding some comments about getSegmentRateUpwinding() 2019-05-31 11:22:35 +02:00
Andreas Lauser
e36ae88ab9 set the SparseMatrixAdapter property in the linear solver type tag
this is necessary because after OPM/ewoms#513, the
`SparseMatrixAdapter` property will be "owned" by the linear solver
and because ISTLSolverEbos does not build on top of
`Ewoms::ParallelBaseBackend`.
2019-05-31 10:55:13 +02:00
Kai Bao
c5983eeec5 not trying to update RESV target for prediction producers 2019-05-30 11:58:23 +02:00
Atgeirr Flø Rasmussen
ff2965e346
Merge pull request #1862 from GitPaean/fixing_multisegment_wells_cleaning_up_restarting_test_1
adding function updateUpwindingSegments() for MSW
2019-05-29 10:09:08 +02:00
Joakim Hove
b129a10362 Use shared SummaryState in BlackoilWellModel 2019-05-29 07:52:17 +02:00
Joakim Hove
a0aa7fcc2b Use shared SummaryState when instantiating WellsManager 2019-05-29 07:44:23 +02:00
Joakim Hove
c6af5f11b6 Fixup: Use ProductionControls and InjectionControls 2019-05-29 07:12:15 +02:00
Joakim Hove
dc4f57f7eb
Merge pull request #1831 from joakim-hove/use-wells2-controls
Use wells2 controls
2019-05-29 06:46:58 +02:00
Kai Bao
236e4d7e33 adding function updateUpwindingSegments() for MSW
to update the upwinding segment for each segment based on flow direction
2019-05-28 12:35:59 +02:00
Tor Harald Sandve
613473082f Address PR comments 2019-05-24 16:45:27 +02:00
Joakim Hove
511645d12c Use InjectionControls and ProductionControls data classes 2019-05-23 16:27:17 +02:00
Tor Harald Sandve
821794b0ad Add well potential output to MSW
The common part is moved to the well interface class
This commit also adds iterations to the standardWells
well potential calculations to improve the results
2019-05-23 15:32:48 +02:00
Joakim Hove
b6840db604 Use new well implementation Well2 from opm-common 2019-05-22 21:47:45 +02:00
Atgeirr Flø Rasmussen
025b828e80
Merge pull request #1855 from totto82/fix_throw
throw runtime_error instead of logic_error
2019-05-22 11:39:09 +02:00
Tor Harald Sandve
a33c967ad0 throw runtime_error instead of logical_error 2019-05-22 10:08:55 +02:00
Kai Bao
080e840f2f using tolerance_wells_ for BHP control tolerance for MSW 2019-05-16 12:20:35 +02:00
Kai Bao
28f0274fb5 fixing bugs spotted in the review comments 2019-05-15 16:28:18 +02:00
Kai Bao
4593453d10 adding function checkConvergenceControlEq to refactor getWellConvergence
only functional change is that rate control or BHP control has different
tolerance for MSW now.
2019-05-15 16:28:18 +02:00
Andreas Lauser
8657f18075 EclProblem: remove the isSubstep parameter from writeOutput()
Now that the book keeping for time stepping is correct even in `flow`,
this parameter has become redundant.
2019-05-13 13:05:39 +02:00
Atgeirr Flø Rasmussen
8197bcfc54
Merge pull request #1832 from GitPaean/upding_well_control_inner_msw
updating well control during iterateWellEquations in MSW
2019-05-13 12:47:10 +02:00
Kai Bao
8c96aeebbe updating well control during iterateWellEquations in MSW 2019-05-10 14:56:20 +02:00
Robert Kloefkorn
6c77fae891 [cleanup][istl] Adjust to shared_ptr change in dune-istl >= 2.7. 2019-05-09 11:28:52 +02:00
Atgeirr Flø Rasmussen
c17adf788f Moved files to opm/simulators/ subdirs. 2019-05-08 12:58:19 +02:00
Atgeirr Flø Rasmussen
32572ac2ab Clear DeferredLogger's message container after logging.
This keeps from logging the same messages again. Also add clearMessages()
method, which is useful to clear the local container after gathering into
a global container (which leaves the local containers untouched).
2019-04-30 12:24:31 +02:00
Tor Harald Sandve
8a4117441c Make sure that the convergece report is stored before throw 2019-04-25 10:33:39 +02:00
Franz G. Fuchs
25299b7a0a correct exception handling in wells for parallel runs 2019-03-13 15:19:31 +01:00
Atgeirr Flø Rasmussen
7c30ee46ce
Merge pull request #1713 from fgfuchs/replace_well_switching_logger
Replace well switching logger
2019-01-21 21:56:56 +01:00
Franz G. Fuchs
129e7d181e replace well switching logger with deferred logger 2019-01-18 14:04:30 +01:00
Bård Skaflestad
a689973760
Merge pull request #1708 from blattms/warn-parallel-logging-fallout
Warn about parallel logging fallout only on request / Use uppercase logfiles

Fixes OPM/opm-common#606
2019-01-17 16:13:25 +01:00
Markus Blatt
20d12f5b53 [bugfix] Use file not filename to remove files not in current directory.
Passing just the filename to remove only will remove files in the
current directory. When --output-dir the files would not have been
removed.
2019-01-16 12:01:46 +01:00
Markus Blatt
0c2edcfe47 Remove debugging output 2019-01-16 11:56:47 +01:00
Bård Skaflestad
767df6c6fe Deferred Logger: Support Older MPI Implementations
The MPI_Pack() function does not support pointers-to-const until
MPI-3.
2019-01-14 18:10:53 +01:00
Markus Blatt
4b6144bb65 Only warn and show parallel logging fallout on demand.
This commit adds an option that allows to enable detecting parallel
logging fallout (option --enable-logging-fallout-warning). It is now
false by default (previous behavior was as if the option was true).

If option is true a warning will be printed for any process with nonzero
rank that does try to log to *.PRT or *.DBG and the logged output will be appended
to these files at the end.
2019-01-14 13:06:21 +01:00
Franz G. Fuchs
70425a681f style changes 2019-01-14 09:22:17 +01:00
Franz G. Fuchs
f61e55995a query mpi pack size 2019-01-11 21:23:09 +01:00
Franz G. Fuchs
828c3c7949 fix for variable number of messages 2019-01-11 19:05:11 +01:00
Franz G. Fuchs
37d691e678 bugfixes 2019-01-11 15:47:22 +01:00
Franz G. Fuchs
5d902c8bd4 removed commented out line 2019-01-11 13:56:58 +01:00
Franz G. Fuchs
831a374d02 gather deferredLogger implemented 2019-01-11 13:53:18 +01:00
Franz G. Fuchs
040d576839 Use angle brackets for includes
verify that the tagged messages are forwarded correctly
2019-01-08 13:26:19 +01:00
Franz G. Fuchs
5b2a38fee5 doxygen comment 2019-01-08 11:41:19 +01:00
Franz G. Fuchs
c815c56287 new feature: DeferredLogger class 2019-01-08 11:28:18 +01:00
Atgeirr Flø Rasmussen
23edd39c63 Revise logic of shutting wells vs. chopping step.
An infinite loop was possible if no wells were actually shut,
yet the step was restarted with no chopping.
2018-12-03 13:25:19 +01:00
Atgeirr Flø Rasmussen
8bd3cbc1c1 Only shut down wells if under prediction-type control. 2018-11-23 12:51:13 +01:00
Atgeirr Flø Rasmussen
1979fc8f5d Avoid deep chopping by shutting down misbehaving wells. 2018-11-22 16:24:52 +01:00
Atgeirr Flø Rasmussen
9167d08839 Limit timestep when we have THP constraints present.
Using 16 days as the current limit. Could be made a user parameter.
2018-11-22 11:03:18 +01:00
Arne Morten Kvarving
f027262ec4 remove files 2018-11-16 14:53:37 +01:00
Markus Blatt
8cafb0e92a Make MPI calls in gatherConvergenceReport with void* instead of const void*
Fixes compilation of PR #1612 with open-mpi 1.6.5.
Compiler complained about not being able to transform const void* to void*
as needed by MPI.
2018-11-15 09:30:51 +00:00
Atgeirr Flø Rasmussen
6e7cc756de Move implementation of gatherConvergenceReport() to cpp file.
No templates involved, no reason to keep it in header. This also makes
building more robust by only invoking HAVE_MPI in the cpp file, after
including config.h.
2018-11-13 14:01:01 +01:00
Atgeirr Flø Rasmussen
566f6813dd Created gatherConvergenceReport() function and test. 2018-11-13 10:30:32 +01:00
Atgeirr Flø Rasmussen
576852b299 Remove cell_index from ReservoirFailure struct. 2018-11-13 10:19:15 +01:00
Tor Harald Sandve
5edd63c554 flow: let the wells be managed by EclProblem 2018-11-08 10:40:28 +01:00
Atgeirr Flø Rasmussen
671ed75535 Made ReservoirFailure and WellFailure into classes. 2018-10-25 13:08:16 +02:00
Atgeirr Flø Rasmussen
852765a65b Address review comments. 2018-10-25 12:12:06 +02:00
Atgeirr Flø Rasmussen
2bf4d15285 Rename ConvergenceStatus -> ConvergenceReport. 2018-10-25 11:57:47 +02:00
Atgeirr Flø Rasmussen
37d4327ce3 Add Pressure equation type (for multisegment wells). 2018-10-23 14:04:27 +02:00
Atgeirr Flø Rasmussen
42cb36ab9f Improve severity feature, add severityOfWorstFailure(). 2018-10-23 11:28:32 +02:00
Atgeirr Flø Rasmussen
34afb0b254 Add severity (normal, too large, nan) to failure objects. 2018-10-23 10:52:34 +02:00
Atgeirr Flø Rasmussen
892b24c435 Make well failure types more informative.
Separating control eq failures with THP, BHP and Rate.
2018-10-23 10:26:39 +02:00
Atgeirr Flø Rasmussen
891912b04a Add ConvergenceFailure class and test. 2018-10-23 10:03:13 +02:00
Andreas Lauser
d7efb362a2 make the build of flow fully parallelizable
so far, the actual specializations of the simulator were compiled into
the `libopmsimulators` library and the build of the glue code
(`flow.cpp`) thus needed to be deferred until the library was fully
built. Since the compilation of the glue code requires a full property
hierarchy for handling command line parameters, this arrangement
significantly increases the build time for systems with a sufficient
number of parallel build processes. ("sufficient" here means 8 or more
threads, i.e., a quadcore system with hyperthreading is sufficient
provided that it has enough main memory.)

the new approach is not to include these objects in
`libopmsimulators`, but to directly deal with them in the `flow`
binary. this allows all of them and the glue code to be compiled in
parallel.

compilation time on my machine before this change:

```
> touch ../opm/autodiff/BlackoilModelEbos.hpp; time make -j32 flow 2> /dev/null
Scanning dependencies of target opmsimulators
[  2%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_gasoil.cpp.o
[  2%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_oilwater.cpp.o
[  2%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_blackoil.cpp.o
[  2%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_solvent.cpp.o
[  4%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_polymer.cpp.o
[  6%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_energy.cpp.o
[  6%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_oilwater_polymer.cpp.o
[  6%] Linking CXX static library lib/libopmsimulators.a
[ 97%] Built target opmsimulators
Scanning dependencies of target flow
[100%] Building CXX object CMakeFiles/flow.dir/examples/flow.cpp.o
[100%] Linking CXX executable bin/flow
[100%] Built target flow

real    1m45.692s
user    8m47.195s
sys     0m11.533s
```

after:

```
> touch ../opm/autodiff/BlackoilModelEbos.hpp; time make -j32 flow 2> /dev/null
[ 91%] Built target opmsimulators
Scanning dependencies of target flow
[ 93%] Building CXX object CMakeFiles/flow.dir/flow/flow.cpp.o
[ 95%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_gasoil.cpp.o
[ 97%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_oilwater_polymer.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_polymer.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_oilwater.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_solvent.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_blackoil.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_energy.cpp.o
[100%] Linking CXX executable bin/flow
[100%] Built target flow

real    1m21.597s
user    8m49.476s
sys     0m10.973s
```

(this corresponds to a ~20% reduction of the time spend on waiting for
the compiler.)
2018-09-26 11:49:12 +02:00
Markus Blatt
8455c0457b ParallelFileMerger: Remove old local regex and fileWaringRegex_ instead 2018-09-05 16:42:13 +02:00
Markus Blatt
5aab0dfb7b Really only warn about CASENAME.[0-9]+.[A-Z]+.
Previously we did warn about files not starting with CASENAME.
2018-09-05 16:06:36 +02:00
Markus Blatt
07bc4396ab Let ParallelFileMerger only warn about CASENAME.[0-9]*.EXT files.
Previously the regex issued warning for all files containing ".[0-9]*." in the name
in the output directory. That was too general and created more warnings than we wanted.
2018-09-05 16:06:36 +02:00
Andreas Lauser
43ac2e36c6 remove the Flow prefixes of parameters only used by flow
this has been requested by [at]atgeirr.

Note: The FlowLinearSolverVerbosity, FlowNewtonMaxIterations and
FlowNewtonMinIterations parameters are still prefixed because they
clashes with parameters registered deeply within eWoms.
2018-08-15 23:34:32 +02:00
Andreas Lauser
b5cddef928 flow: switch it to use the eWoms parameter system
this has several advanges:

- a consistent and complete help message is now printed by passing the
  -h or --help command line parameters. most notably this allows to
  generically implement tab completion of parameters for bash
- the full list of runtime parameters can now be printed before the simulator
  has been run.
- all runtime parameters understood by ebos can be specified
- no hacks to marry the two parameter systems anymore
- command parameters now follow the standard unix convention, i.e.,
  `--param-name=value` instead of `param_name=value`

on the negative side, some parameters have been renamed and the syntax
has changed so calls to `flow` that specify parameters must adapted.
2018-08-15 23:34:32 +02:00
Tor Harald Sandve
b1e03d5196
Merge pull request #1523 from atgeirr/fix-currentDateTime
Cast argument for milliseconds() call to an integer.
2018-06-28 07:51:53 +02:00
Andreas Lauser
c794028bcf flow: fix the time held by the simulator object 2018-06-27 12:13:50 +02:00
Atgeirr Flø Rasmussen
53e46ca017 Cast argument for milliseconds() call to an integer.
Apparently required by boost::posix_time::milliseconds.
2018-06-27 11:11:27 +02:00
Atgeirr Flø Rasmussen
576612c4b2 Rename .CASE.DEBUG -> CASE.DBG. 2018-06-25 22:22:29 +02:00
Andreas Lauser
37b6a540af remove BlackoilOutputEbos
after the actual output writing code has been moved to core ebos, this
was just a unnecessary glue layer for API compatibility.
2018-06-06 10:59:41 +02:00
Andreas Lauser
dfbc24b35f flow: avoid wrangling around with dummy state objects
these objects are only used by flow_legacy, so not having to deal with
them anymore lets non-legacy flow avoid to jump through a lot of hoops
for the sake of having a common API.

this required a fork of the NonlinearSolver and AdaptiveTimeStepping
classes. this is not a problem because the original classes would get
pruned to look like the new ones once flow_legacy gets moved out of
the opm-simulators module.
2018-06-06 10:59:41 +02:00
Joakim Hove
dd3fb03286 THPRES API updates 2018-05-30 14:27:32 +02:00
Tor Harald Sandve
54c8a48481 code clean-up based on review 2018-05-08 10:22:47 +02:00
Tor Harald Sandve
ee88790dea Add a flow specialization for blackoil with energy conservation
The energy conservation is enabled by specifying either TEMP or
THERMAL in the deck. The deck also needs to contatin relevant fluid and rock
heat properties.

The blackoil + energy equations are solved fully implicit.
2018-04-30 13:45:18 +02:00
Andreas Lauser
b74d39f2e1 make flow compile in face of the energy conservation changes of the eWoms black oil model
with this, flow does *not* yet support thermal simulations, this patch
merely makes it compile while nothing user-facing is supposed to
change.
2018-04-06 11:01:33 +02:00
Atgeirr Flø Rasmussen
ce308455ab
Merge pull request #1433 from totto82/fix_reportStep
Add reportStep method in SimulatorReport and use it
2018-04-04 15:23:01 +02:00
Tor Harald Sandve
7c9dab1a64 Add reportStep method in SimulatorReport and use it 2018-03-12 14:48:34 +01:00
Kai Bao
56caffab67 fixing comments for PR#1416 2018-02-28 10:26:54 +01:00
Kai Bao
635f6c7db2 trying to add the functionality to handle oil/water polymer 2018-02-28 08:39:38 +01:00
Atgeirr Flø Rasmussen
cf9b7c39b9 Adapt to moved opm-grid headers. 2018-02-10 08:33:33 +01:00
Andreas Lauser
3d0fca2f08 adapt to the gridManager() -> vanguard() change in ewoms 2018-02-08 16:27:42 +01:00
Andreas Lauser
7f3a9f1f43 catch NumericalIssue instead of NumericalProblem
the underlying problem is that the OPM build system does not define a
HAVE_OPM_COMMON macro in config.h.
2018-02-08 12:02:25 +01:00
Andreas Lauser
58a1b7df1f adapt to the move of infrastructure from opm-common to opm-material 2018-02-07 13:32:52 +01:00
Atgeirr Flø Rasmussen
532403c5fb
Merge pull request #1391 from totto82/RFIP
Use FIP, EGRID and INIT output code in ebos.
2018-02-06 12:54:01 +01:00
Arne Morten Kvarving
141186ad1d changed: opm/[core -> common]/utility/parameters 2018-01-30 16:33:45 +01:00
Arne Morten Kvarving
e9404486bb changed: opm/common/[->utility]/ResetLocale.hpp 2018-01-30 12:34:04 +01:00
Tor Harald Sandve
b38430ea2e Output TCPU for every substep. 2018-01-29 08:56:55 +01:00
Atgeirr Flø Rasmussen
8ad9c979f8 Remove old 2p simulator. 2018-01-08 17:22:50 +01:00
Atgeirr Flø Rasmussen
2bf880fadd
Merge pull request #1351 from totto82/changeDefaultTimeStep
Use 1 day as default initial time step
2017-11-29 10:01:15 +01:00
Tor Harald Sandve
a1dbeec4d4 Use 1 day as default initial time step 2017-11-28 15:12:48 +01:00
Tor Harald Sandve
e350c04871 Fix date for long simulation times 2017-11-28 13:37:00 +01:00
Tor Harald Sandve
c03dbc1693 Support TUNING in schdule section. 2017-11-21 11:12:16 +01:00
Alf B. Rustad
7dba2c4d70 Format fix-up 2017-11-17 08:25:22 +01:00
Alf B. Rustad
ad68c05982 Change substep to time step in logging 2017-11-17 08:25:21 +01:00
Joakim Hove
e125334847
Merge pull request #1315 from joakim-hove/extract-schedule
Use Schedule constructor.
2017-11-06 17:06:49 +01:00
Joakim Hove
566f4fbb02 Use Schedule constructor. 2017-11-06 14:20:41 +01:00
Andreas Lauser
e65790224e replace #if HAVE_CONFIG_H by #ifdef HAVE_CONFIG_H
it seems like most build systems pass a -DHAVE_CONFIG_H flag to the
compiler which still causes `#if HAVE_CONFIG_H` to be false while it
clearly is supposed to be triggered.

That said, I do not really see a good reason why the inclusion of the
`config.h` file should be guarded in the first place: the file is
guaranteed to always available by proper build systems, and if it was
not included the build either breaks at the linking stage or -- at the
very least -- the runtime behavior of the resulting libraries will be
very awkward.
2017-10-27 17:48:26 +02:00
Andreas Lauser
cede806bd5 flow: refactor the specializations
The motivation for this PR is that currently the build fails on my
Ubuntu 17.10 laptop with two processes because that machine "only" has
8 GB of RAM (granted, the optimization options may have been a bit too
excessive). under the new scheme, each specialization of the simulator
is put into a separate compile unit which is part of
libopmsimulators. this has the advantages that the specialized
simulators and the main binary automatically stay consistent, the
compilation is faster (2m25s vs 4m16s on my machine) because all
compile units can be built in parallel and that compilation takes up
less RAM because there is no need to instantiate all specializations
in a single compile unit.

on the minus side, all specializations must now always be compiled,
the approach means slightly more work for the maintainers and the
flow_* startup code gets even more complicated.
2017-10-06 15:35:00 +02:00
Andreas Lauser
64d7366de2 mark the non-template methods of the adaptive time stepper as inline
this is needed to avoid linker errors if this class ought to be used
in multiple compile units. IMO the main problem here is the use of an
_impl.hpp file.
2017-10-06 15:34:59 +02:00
Markus Blatt
b89aa1fa4a Added initialStep to SimulatorTimerInterface 2017-07-20 12:11:11 +02:00
Markus Blatt
e8d89bcf48 Fix lookup of std::cerr by including iostream 2017-06-27 10:00:31 +00:00
Rohith Nair
7500d3eb0c edit 2017-06-26 12:46:09 +02:00
Rohith Nair
84ca3cd9b9 Removes multiple problem logging for linear solver convergence failure 2017-06-26 12:21:44 +02:00
Joakim Hove
66931cb030 Changed to TimeMap api - using std::time_t 2017-06-19 14:03:14 +02:00
Rohith Nair
2976b62d75 Add cause_of_failure for NumericalProblem 2017-06-12 10:48:07 +02:00
Rohith Nair
073e4ce839 Add cause_of_failure for LinearSolverProblem 2017-06-12 10:28:38 +02:00
Rohith Nair
18dfe1783b remove debug info from terminal output for convergence failure 2017-06-11 22:32:46 +02:00
Rohith Nair
c1e76d6b51 edit 2017-06-07 14:49:00 +02:00
Rohith Nair
deaf90f211 edit 2017-06-07 14:47:45 +02:00
Rohith Nair
58285bb8f8 edit 2017-06-07 14:46:04 +02:00
Rohith Nair
348cb5e5a4 Changes made as requested 2017-06-07 14:40:18 +02:00
Rohith Nair
c12665e04f -Added exception TooManyIterations
-Combined log messages from NonLinearSolver_impl.hpp and AdaptiveTimeStepping_impl.hpp
2017-06-07 10:37:25 +02:00
Tor Harald Sandve
434f96db0a FIX output the correct next timestep after convergece failure 2017-05-29 09:48:34 +02:00
Arne Morten Kvarving
3c0cb9e950 adjust for changed ParameterGroup namespacing 2017-04-28 15:36:25 +02:00
Andreas Lauser
ef2a560fb3 flow_ebos: print statistics about failed time steps
the performance summary at the end of a Norne run which are printed by
`flow_ebos` now looks like this on my machine:

```
Total time (seconds):         773.757
Solver time (seconds):        753.349
 Assembly time (seconds):     377.218 (Failed: 23.537; 6.23965%)
 Linear solve time (seconds): 352.022 (Failed: 23.2757; 6.61201%)
 Update time (seconds):       16.3658 (Failed: 1.13149; 6.91375%)
 Output write time (seconds): 22.5991
Overall Well Iterations:      870 (Failed: 35; 4.02299%)
Overall Linearizations:       2098 (Failed: 136; 6.48236%)
Overall Newton Iterations:    1756 (Failed: 136; 7.74487%)
Overall Linear Iterations:    26572 (Failed: 1786; 6.72136%)
```

for the flow_legacy family, nothing changes.
2017-04-11 11:12:11 +02:00
dr-robertk
9b29b57960 Merge pull request #1124 from atgeirr/output-dir
Refactor directory creation
2017-04-10 13:04:42 +02:00
Atgeirr Flø Rasmussen
98debed741 Fix minor output bug and refine output.
Previously the substep summary reports were cumulative, misleading the user.
Also, made output a little more compact and readable, ensuring numbers line up
unless unusually many digits are needed for times and iteration counts.
2017-04-06 14:54:08 +02:00
Atgeirr Flø Rasmussen
85e1544553 Use ensureDirectoryExists() instead of boost::filesystem directly.
Motivated by
 - proliferation of identical code
 - need to avoid strange behaviour with "." directory on some boost versions
 - potenial for further refactoring to avoid boost entirely
2017-04-06 12:14:54 +02:00
Atgeirr Flø Rasmussen
d267c1a77d Create ensureDirectoryExists() free function. 2017-04-06 12:14:06 +02:00
Tor Harald Sandve
19a16ceeca Set timesteps after events
The time step after an event can either be set using
timestep_in_days_after_event or using the TUNING keyword in the deck.
2017-03-09 08:54:44 +01:00
Atgeirr Flø Rasmussen
ffaa48295a Add restart I/O of suggested timestep length. 2017-03-01 08:45:34 +01:00
Atgeirr Flø Rasmussen
27c0430932 Change include paths for moved headers. 2017-02-10 16:07:25 +01:00
Arne Morten Kvarving
86fbb36fd2 adjustments for imported files
- adjust include paths
- add new test to build system
- add new example to build system
2017-02-10 13:02:00 +01:00
Arne Morten Kvarving
109780f62f Import adaptive time stepping and simulator timer from opm-core
also import associated tests / examples
2017-02-10 12:04:11 +01:00
Arne Morten Kvarving
1cb81c12e8 changed: pass fipnum array into adaptive time stepping loop
needed as substep summary reports requires FIP data to be available.
add calculation of this data if output is requested and summary
config holds relevant keywords.
2017-02-09 09:33:32 +01:00
Tor Harald Sandve
f65f5d2c3b Store whether timestep failed or not
Used in flow ebos to tell the simulator to recalculate the cached
quantities for failed timesteps.
2016-12-19 10:52:59 +01:00
Atgeirr Flø Rasmussen
508da6689f Change include path for writeVtkData.hpp, or remove include. 2016-12-06 09:48:03 +01:00
Atgeirr Flø Rasmussen
14ab6b6810 Add writeVtkData(), including version for UnstructuredGrid. 2016-12-06 09:26:45 +01:00
Andreas Lauser
676af2b00b AdaptiveTimeStepping: fix stupid (but harmless) mistake in the sub-step info message
that was a copy-and-pasto: newton iterations = linearizations - 1
2016-12-03 15:04:32 +01:00
Andreas Lauser
6720eb7a75 clean up and extend the SimulationReport class
it now also accounts for assembly, linear solve, update and output
write time and indicates if an operation has converged.
2016-11-30 11:27:49 +01:00
Andreas Lauser
8c5f92dbc4 extend and clean up the SimulatorReport 2016-11-25 21:19:57 +01:00
Markus Blatt
1882d3315a Do not throw for unrecognized file when merging log files.
The regex we are using might also consider a file named bla.2.blub.
In that case it is not nice to throw an exception. Instead we print
a message to std::cerr.
2016-11-11 12:00:49 +01:00
Tor Harald Sandve
a083f46d44 Make it possible to set initial timestep
Default is kept at -1.0. I.e. this PR does not change the current
behaviour.
2016-10-28 09:03:29 +02:00
Atgeirr Flø Rasmussen
08b7db6c7f Classify convergence failure as a "problem" not "error". 2016-10-20 22:36:20 +02:00
Atgeirr Flø Rasmussen
83b3d8a149 Ensure logging only on first rank. 2016-10-20 22:36:20 +02:00
Jørgen Kvalsvik
1c6a4b34da Update to shared_ptr-less parser interface. 2016-10-20 14:08:04 +02:00
Jørgen Kvalsvik
ad6b77cc15 Update to shared_ptr-less parser interface. 2016-10-20 10:14:41 +02:00
Atgeirr Flø Rasmussen
d007cd8e6e Merge pull request #859 from atgeirr/compile-fixes
Compile fixes
2016-10-14 13:31:12 +02:00
Markus Blatt
a424516639 Do not refer users to issue tracker if multiple procs log.
This is currently still happening due to the implementation of
OPM_THROW whenever the linear solver does not converge. This
happens quite often and we might not want to get overwhelmed by
the issue tracker.
2016-10-14 10:47:16 +02:00
Atgeirr Flø Rasmussen
654a24b625 Use vector instead of VLA, also add missing includes. 2016-10-13 17:08:52 +02:00
Andreas Lauser
144318b567 consolidate the unit system to opm-parser
since the unit code within opm-parser is now a drop-in replacement,
this simplifies things and make them less error-prone.

unfortunately, this requires quite a few PRs. (most are pretty
trivial, though.)
2016-10-10 17:50:26 +02:00
Markus Blatt
2a1388d124 Make WellSwitchingLogger work with DUNE 2.3
That version does not provide a default constructor for
CollectiveCommunication, Therefore we now use
MPIHelper::getCollectiveCommunication() for the default
constructor argument.
2016-10-05 16:13:11 +02:00
Markus Blatt
14eeb7c39a Removed warning in WellSwitchLogger::calculateMessageSize 2016-10-05 13:51:08 +02:00
Markus Blatt
99bf74c705 Changed some names in WellSwitchingLogger 2016-10-05 11:45:59 +02:00
Markus Blatt
ab05cb66d9 Whitespace and other formatting changes 2016-10-05 11:45:51 +02:00
Markus Blatt
d86f552a76 Added missing const reference to constructor argument 2016-10-05 11:39:28 +02:00
Markus Blatt
bfb7ccfa8b Moved ParallelFileMerger to its own file. 2016-10-05 11:39:06 +02:00
Markus Blatt
07318edfa1 Added a parallel aware logger for switching wells.
It will collect all the switches. Afterwards they are collect on
the root process and logged there.

This commit includes a small test program.
2016-10-05 10:33:15 +02:00
Markus Blatt
66f0b71fc1 Log the message of exceptions in the catch clause of adaptive time stepper. 2016-10-04 10:33:56 +02:00
Tor Harald Sandve
e034bbc7ad Add initalizer for adaptiveTimeStepper that uses values from TUNING
Some of the tuning values from the TUNING keywords is used to tune the
timestepping.
2016-09-30 10:36:30 +02:00
Andreas Lauser
83a9f6ffce threshold pressure defaults: calculate the pressure difference like when computing the fluxes
this should not change the value of the result at all (because the
total delta which is added to the phase pressures stays identical),
but it should be less confusing when comparing this with the code that
calculates the gravity correction term in the flux calculation.
2016-09-28 16:57:34 +02:00
Andreas Lauser
000fde19dc threshold pressures: simplify code for the density calculation a bit 2016-09-28 16:57:34 +02:00
Andreas Lauser
4f4d7531af threshold pressure: be more cautious when acessing the defaults
maybe it worked as-is, or maybe decks which lead to illegal accesses
to the map are incorrect (i.e., they specify threshold pressures for
EQUIL-regions that do not touch), but let's play save here...
2016-09-28 16:56:54 +02:00
Andreas Lauser
662d6e28cd threshold pressures: properly consider the dissolved components for the density
even if a phase is saturated, the dissolved component must be
considered when calculating the fluid density.
2016-09-28 16:55:15 +02:00
Andreas Lauser
ae3248da8b threshold pressure: use phase pressure instead of reference pressure...
... to calculate phase densities for the threshold pressure
defaults. I don't know if the reference simulator does this, but this
makes it consistent with what's done in the flux calculation of flow.
2016-09-28 16:54:00 +02:00
Markus Blatt
815480d052 Only call writeTimeStep for real sub steps.
Previously, we also called it when the full time step was done.
As the simulator writes that information anyway and we cannot call
it a sub step, we omit the final write in the adaptive time stepper.
2016-09-26 11:51:17 +02:00
Tor Harald Sandve
4c4b5233c0 Guard against non-existing file 2016-09-21 13:46:31 +02:00
Tor Harald Sandve
1bde4f4a22 Small fixes hardcodedTimestepControl
-- avoid using eof()
-- add comments
-- no longer assumes two lines of comments.
-- revert change to default value for timestep.initial_step_length
-- make contructer explicit
-- pass reference
2016-09-21 09:39:36 +02:00
Tor Harald Sandve
380fe6e2fd Timestepper based on userInput
A new timestepper that reads timesteps from a file generated using
ecl_summary "DECK" TIME
and applies it to the simulator

Also a parameter timestep.initial_step_length (default 1 day) is added
to controll the frist timestep.
2016-09-21 09:39:36 +02:00
babrodtk
63da817852 Initial version for outputting cell data 2016-09-01 14:37:41 +02:00
Pål Grønås Drange
bd58792714 TransMult, Init, and SimConfig are references, applyModifierDeck takes reference, and EclipseState constructor too 2016-08-08 10:07:09 +02:00
Atgeirr Flø Rasmussen
d31081992b Merge pull request #1052 from andlaus/pass_timer_instead_of_dt
pass the timer object instead of the time step size to the simulators
2016-08-02 11:05:33 +02:00
Liu Ming
61889dafbd fix indentation. 2016-07-14 10:30:20 +08:00
Liu Ming
62134b4a0f drop useage of std::numeric_limits 2016-07-14 10:27:13 +08:00
Andreas Lauser
0dda8d49c5 pass the timer object instead of the time step size to the simulators 2016-07-05 12:23:55 +02:00
Kai Bao
02a3ba39b5 adding a initialStep() function to SimulatorTimer
to indicate if the current step is the inital step.
2016-07-04 11:12:53 +02:00
Liu Ming
b8ef9cb630 output well iterations if it is a valid number. 2016-06-30 09:03:30 +08:00
Liu Ming
30d9c34481 Add space. 2016-06-28 15:26:06 +08:00
Liu Ming
b1b464535a output well iterations and non-linear iterations. 2016-06-28 13:40:32 +08:00
Liu Ming
6097a14b0e get current date time. 2016-06-21 11:25:05 +08:00
Liu Ming
63f244a36d mark time stepping messages type as OpmLog::note 2016-06-21 08:44:32 +08:00
Jørgen Kvalsvik
71560b5fb2 BlackoilOutputWriter rewritten to use opm-output
Changes to BlackoilOutputWriter as mandated by the split and rewrite of
opm-output. Notable changes:

* BlackoilOutputWriter is no longer a child class of OutputWriter.
* Minor interface changes; writeTimeStep requires a Wells pointer
* restore requires a Wells* pointer
* VTK/Matlab support rewrites; no longer inherits OutputWriter
* WellStateFullyImplicitBlackoil::report added, to write its data to a
  opm-output understood format

Relies on utility/Compat.hpp for quick conversion to the opm-output
defined formats.
2016-06-07 10:15:07 +02:00
Jørgen Kvalsvik
18fda2d7f0 WellState::report() to make opm-output Well data 2016-06-06 12:40:44 +02:00
Liu Ming
248ea780b3 add missing braces. 2016-05-16 09:04:54 +08:00
Liu Ming
a4dc135045 use OpmLog only for error messages. 2016-05-10 14:13:33 +08:00
Liu Ming
40dbcc496a output timer messages for terminal and log file. 2016-05-09 13:31:04 +08:00
Liu Ming
cabfffe25d use ostream not std::cout directly. 2016-05-09 13:30:28 +08:00
babrodtk
a1504a2bff Runs first iterations of two-phase case plausibly 2016-04-26 07:49:12 +02:00
Atgeirr Flø Rasmussen
a031c25ced Re-enable output for 2-phase sims.
This was disabled when the facilities were moved to opm-output.
Now that the simulators are in the opm-simulators module and not
opm-core we can re-enable it.
2016-04-14 13:08:24 +02:00
Pål Grønås Drange
170a71eef8 Using API get3DProperties. 2016-04-14 11:37:27 +02:00
Atgeirr Flø Rasmussen
be67e0f7a5 Update include file locations. 2016-04-14 11:32:08 +02:00