Commit Graph

2386 Commits

Author SHA1 Message Date
Kai Bao
50385013fe adding variableWellStateInitials to MultisegmentWells 2016-05-23 15:11:51 +02:00
Kai Bao
7886e4b9d2 adding computeWellConnectionPressures to MultisegmentWells 2016-05-23 15:11:51 +02:00
Kai Bao
b4f4878901 fixing the errors from rebasing. 2016-05-23 15:11:51 +02:00
Kai Bao
60fb868727 adding updatePerfPhaseRatesAndPressures to MultisegmentWells 2016-05-23 15:11:51 +02:00
Kai Bao
508de4dc37 adding extractWellPerfProperties to MultisegmentWells
removing extractWellPerfProperties in all the model classes.
2016-05-23 15:11:51 +02:00
Kai Bao
718ba5470b adding const Wells* wells_ for MultisegmentWells
for interface refactoring.
At the moment, both wells_ and wells_multisegment_ contain all the
wells.
2016-05-23 15:11:51 +02:00
Kai Bao
4180fea951 refactoring the construcor of MultisegmentWells
MultisegmentWells is initialized with Wells structure.
2016-05-23 15:11:51 +02:00
Kai Bao
7d0d50eb53 changing reservoir related members to pointers for MultisegmentWells 2016-05-23 15:11:51 +02:00
Kai Bao
66cd66e61b change reservoir related members to be pointers in StandardWells
to fullfil the requirement of interface design.
2016-05-23 15:11:51 +02:00
Kai Bao
89a8f133fd adding variableWellStateIndices to MultisegmentWells
to remove the using of stdWells() in BlackoilMultiSegmentModel
The code is copied from StandardWells, better solution need to be
exploited.
2016-05-23 15:11:50 +02:00
Kai Bao
a8742a9348 introduce perforation densities and pressdiffs to MultisegmentWells
to reduce dependence on StandardWells.
2016-05-23 15:11:50 +02:00
Kai Bao
25fbd20acf adding a few member variables for MultisegmentWells
and reduce the number of parameters of the related functions by using
the new introduced member variables.
2016-05-23 15:11:50 +02:00
Kai Bao
bd03eff5a5 making two functions in StandardWells protected.
computePropertiesForWellConnectionPressures
computeWellConnectionDensitesPressures
2016-05-23 15:11:50 +02:00
Kai Bao
1f2442fe80 reducing paramter list for more functions in StandardWells
computeWellFlux
updateWellState
updateWellControls
addWellControlEq
computeWellPotentials
2016-05-23 15:11:50 +02:00
Kai Bao
a35c3e7468 removing parameters for extractWellPerfProperties 2016-05-23 15:11:50 +02:00
Kai Bao
75c64b67d1 fixing the compilation from the rebase. 2016-05-23 15:11:50 +02:00
Kai Bao
0667fceb35 reducing the number of arguments of computeWellConnectionPressures
and computeWellConnectionDensitesPressures.

These functions need to be renamed.
2016-05-23 15:11:50 +02:00
Kai Bao
18a530f9be removing paramters in computePropertiesForWellConnectionPressures 2016-05-23 15:11:50 +02:00
Kai Bao
22b5157bf2 adding a few fluid related members to StandardWells
to reduce the number of the public function arguments.
2016-05-23 15:11:50 +02:00
Atgeirr Flø Rasmussen
d1da78b5b2 Merge pull request #692 from GitPaean/fixing_volumeratio_calculation
fixing application of rs and rv to the volumeRatio calculation.
2016-05-23 10:02:37 +02:00
Atgeirr Flø Rasmussen
7dbd197650 Merge pull request #684 from totto82/liveoilsolvent2
Changes needed to run Model 2 with co2
2016-05-20 15:08:48 +02:00
Kai Bao
6f2a0c47a2 fixing application of rs and rv to the volumeRatio calculation.
the use of parenthesis is wrong according to Cramer's rule
2016-05-20 14:52:24 +02:00
Atgeirr Flø Rasmussen
bd774ed06c Merge pull request #679 from qilicun/log_simulation_messages
write simulation details to log file.
2016-05-19 15:09:39 +02:00
Pål Grønås Drange
2620dda8c3 Moved NNC to GeoProps, populating NNC at update
* FlowMain now gets NNC by `geoprops_->nnc()`
* Refactored update()
* Moved big chunk of unused code to new private method pinchProcess_
* Reordered logic to unite the NNC logic
2016-05-19 13:33:09 +02:00
Pål Grønås Drange
973914931d Introducing NNC output
* Compute NNC by face2cell information from a grid
* Pass NNC information to EclipseWriter
* Made NNC respect ECLIPSE input data
* nncStructure() is now exportNncStructure()
2016-05-19 13:23:18 +02:00
Tor Harald Sandve
cc2a7d8767 Cleanup in updateState in the solvent model 2016-05-19 12:38:44 +02:00
Tor Harald Sandve
0730ffcb69 BUGFIX. Wrong uses of parenthesis in Cramer's rule 2016-05-19 11:28:36 +02:00
Tor Harald Sandve
bd0ad6aa5b Adapt to changes related to hydroCarbonState 2016-05-19 11:25:27 +02:00
Liu Ming
626bde704a fix indentation. 2016-05-19 17:10:13 +08:00
Tor Harald Sandve
03d6dde203 Convergence improvment in the TL model
-- division on zero is avoided
-- if no solvent is present, pure values are used for the density and
visocity
2016-05-19 10:49:22 +02:00
Tor Harald Sandve
8be3ca7557 Support for liveoil in combination with solvent
- a solvent specific updateState is used to assure that the correct oil
saturation is used to detect phase transision
- presence of gas is compensated for in the oil phase
2016-05-19 10:49:22 +02:00
Liu Ming
b134455a4d use OpmLog to control terminal output limits. 2016-05-19 10:51:52 +08:00
Pål Grønås Drange
d995582f46 trying disabling async output default setting 2016-05-18 16:11:57 +02:00
Atgeirr Flø Rasmussen
9c771ab6b1 Merge pull request #687 from totto82/hydrocarbonstate
Use stored hydrocarbonstate to get primal variables
2016-05-18 14:16:58 +02:00
Tor Harald Sandve
cd91444bc9 Compute the hydroCarbonState after initializing from restart files 2016-05-13 14:09:51 +02:00
Tor Harald Sandve
5757ef8ad0 Adjust to upstream changes
Change from std::vector<int> to std::vector<HydroCarbonState> for the
hydroCarbonState
2016-05-13 12:40:50 +02:00
Tor Harald Sandve
01c782dbf3 Remove primalvariable_ and use hydroCarbonState instead
the hydrocarbonstate is stored in the reservoir state and
used instead of the primalvariable_
The initial hydrocarbonstate is computed using
initHydroCarbonState(...);
2016-05-13 09:04:48 +02:00
Atgeirr Flø Rasmussen
ca40a31e7b Merge pull request #681 from dr-robertk/PR/use_have_pthread
Use HAVE_PTHREAD to enable async output.
2016-05-12 12:20:09 +02:00
Tor Harald Sandve
e8fcf9259c Use stored hydrocarbonstate to get primal variables
If hydrocarbonstate is not provided by the state fall back to
the old behaviour of computing the hydrocarbonstate from the saturations
2016-05-12 10:38:49 +02:00
Tor Harald Sandve
09ab530674 Add the option of computing the full sparity pattern based on all phases
- For some cases (for instance involving solvent flow) the reasoning for
only adding the pressure derivatives seems to fail. As getting the
sparsity pattern is non-trivial, in terms of work, the full sparsity
pattern is only added when specified by the parameter
"require_full_sparsity_pattern"
- For solvent runs "require_full_sparsity_pattern" defaults to true for
all other runs the default is to only extract the sparsity pattern from
the pressure derivatives.
2016-05-11 15:13:52 +02:00
Atgeirr Flø Rasmussen
5fabce7c2c Check if dir already exists before creating.
May be necessary on some platforms for the current dir (".").
2016-05-10 09:22:31 +02:00
Liu Ming
f5a57b8a26 Let OpmLog control output. 2016-05-10 13:51:10 +08:00
Robert Kloefkorn
42a76e3da6 SimulatorFullyImplicitBlackoilOutput: use HAVE_PTHREAD to enable async_output by
default.
2016-05-09 16:58:07 +02:00
Kai Bao
28e65283d9 initializing top_well_segments_ when constructing MultisegmentWells
not wait until BlackoilMultiSegmentModel.
2016-05-09 10:33:53 +02:00
Kai Bao
9bdf1d5b93 removing unhelpful public functions in MultisegmentWells 2016-05-09 10:33:53 +02:00
Kai Bao
f8a6ae4f8c adding num_phases_ to MultisegmentWells
and removing all the np in the argument of the public methods.
2016-05-09 10:33:53 +02:00
Kai Bao
40baf3b720 moving updateWellControls to MultisegmentWells 2016-05-09 10:33:53 +02:00
Kai Bao
868efa97a0 moving addWellControlEq to MultisegmentWells 2016-05-09 10:33:53 +02:00
Kai Bao
5ba53a7a39 moving addWellFluxEq to MultisegmentWells 2016-05-09 10:33:53 +02:00
Kai Bao
89117c0294 moving computeSegmentPressuresDelta to MultisegmentWells 2016-05-09 10:33:53 +02:00
Kai Bao
580ac7df6b moving computeSegmentFluidProperties to MultisegmentWells 2016-05-09 10:33:53 +02:00
Kai Bao
944ebec4c0 moving computeWellFlux to MultisegmentWells 2016-05-09 10:33:53 +02:00
Kai Bao
484c48e0fe moving onlyWellDerivs() to MultisegmentWells
it is only used for MultisegmentWells
2016-05-09 10:33:53 +02:00
Kai Bao
ec3b50d092 adding updateWellState to MultisegmentWells 2016-05-09 10:33:53 +02:00
Kai Bao
15ff16efd2 removing multi-segment member variables from BlackoilMultiSegmentModel 2016-05-09 10:33:53 +02:00
Kai Bao
a07843a896 adding the member variables to MultisegmentWells
and ther public interfaces. Probably the mutable interfaces can be
removed after moving the functions to the Wells class.
2016-05-09 10:33:53 +02:00
Kai Bao
05e164b609 adding number of segment and performation to MultisegmentWells 2016-05-09 10:33:52 +02:00
Kai Bao
f319514581 using the MultisegmentWells class in BlackoilMultiSegmentModel 2016-05-09 10:33:52 +02:00
Kai Bao
aa6065a70c introducing a new class MultisegmentWells
which will handle the multi-segment wells related.
2016-05-09 10:33:52 +02:00
Liu Ming
431a21d632 write simulation details to log file. 2016-05-09 13:33:44 +08:00
Kai Bao
8236a32aee sliencing a few shadowing warnings. 2016-05-06 17:59:00 +02:00
Atgeirr Flø Rasmussen
8e550bf98c Merge pull request #668 from qilicun/get-messages-from-parser
extract messages from parser.
2016-05-04 10:16:57 +02:00
Pål Grønås Drange
96d073a13e set default output directory to . 2016-05-03 17:38:29 +02:00
Pål Grønås Drange
c5d68f802a one line shared_ptr to ref fix 2016-05-03 15:38:04 +02:00
Joakim Hove
58851e8c02 Merge pull request #666 from kjellkongsvik/clean_EclipseWriter
Remove parameters from EclipseWriter constructor
2016-05-03 15:37:30 +02:00
Arne Morten Kvarving
5bc252c4ab fixed: build with g++ 5.3
this partially fixes the build on ubuntu xenial.
it also breaks due to an updated eigen, but with this
you can build with the old eigen instead of the distro
supplied eigen.
2016-04-29 19:02:56 +02:00
Atgeirr Flø Rasmussen
34bc69c257 Move helpers to the detail namespace, layout changes.
The helpers were moved to the bottom of the file for clarity.
Misc. layout and whitespace changes, also fix two minor
errors in comments.
2016-04-29 14:59:18 +02:00
Atgeirr Flø Rasmussen
8ea71e2f15 Use a small lambda to avoid repeating code. 2016-04-29 14:58:44 +02:00
Kjell W. Kongsvik
be1ffec94f Remove phaseUsage parameter as it can be found internally 2016-04-29 13:12:43 +02:00
Kjell W. Kongsvik
e4688c32ce Reverted back parameters so that output grid is not unsafely recreated 2016-04-29 13:06:36 +02:00
Kjell W. Kongsvik
c7bbd2489e Use output_dir_ member instead of querying the parameters again. 2016-04-29 13:06:36 +02:00
Kjell W. Kongsvik
385c7e74d2 Remove parameters from EclipseWriter constructor 2016-04-29 13:06:36 +02:00
Kai Bao
08e691e262 moving variableWellStateInitials to StandardWells. 2016-04-29 10:07:10 +02:00
Kai Bao
15380fd370 moving variableWellStateIndices to StandardWells
Probably it is the time to introduce SeqQs and SeqP for the
multi-segment wells.
2016-04-29 10:07:10 +02:00
Kai Bao
e7d00f4f99 adding variableStateWellIndices to StandardWells
to handle different types of variables later for different types of
wells.
2016-04-29 10:07:10 +02:00
Kai Bao
b87920e5e4 moving computeWellPotentials to StandardWells 2016-04-29 10:07:10 +02:00
Kai Bao
13acc8ee03 moving computeWellConnectionPressures to StandardWells
the results look okay, while the running for flow_solvent needs further
investigation even the results with flow_solvent actually look okay.

With two different version of
computePropertiesForWellConnectionPressures, flow_solvent produces the
same results. This is something needs further investigation.

The current implementation requires a copy of
computeWellConnectionPressure in StandardWells and StandardWellsSolvent.
That means probably we need to introduce the asImpl() for the Wells.
2016-04-29 10:07:10 +02:00
Kai Bao
dcca0b0b76 moving addWellControlEq to StandardWells 2016-04-29 10:07:10 +02:00
Kai Bao
eb278c3c9a moving addWellFluxEq() to StandardWells
Conflicts:
	opm/autodiff/BlackoilModelBase_impl.hpp
2016-04-29 10:07:10 +02:00
Liu Ming
c23fa6f359 correct spelling. 2016-04-29 14:16:48 +08:00
Liu Ming
f29f087435 extract messages from parser. 2016-04-29 14:13:21 +08:00
Joakim Hove
240e08733e Merge pull request #663 from joakim-hove/restart-refactor
Change method name -> IOConfig::restart()
2016-04-28 22:20:31 +02:00
Joakim Hove
ead88e9ee4 Change method name -> IOConfig::restartRequested() 2016-04-28 15:58:17 +02:00
Atgeirr Flø Rasmussen
0d85f3642c Access water/gas quantities only if active phase. 2016-04-26 08:24:54 +02:00
babrodtk
613052525b Code cleanup 2016-04-26 07:49:12 +02:00
babrodtk
a1504a2bff Runs first iterations of two-phase case plausibly 2016-04-26 07:49:12 +02:00
babrodtk
2ac514a1ea Checkpoint 2016-04-26 07:49:12 +02:00
Kai Bao
9afadffea9 fixing flow_polymer running cases without polymer. 2016-04-21 12:59:11 +02:00
Atgeirr Flø Rasmussen
cc8facc378 Merge pull request #659 from GitPaean/fixing_flow_solvent_running_without_solvent
adding the has_solvent_ flag to StandardWellsSolvent
2016-04-21 12:28:54 +02:00
Kai Bao
cc79dff708 adding the has_solvent_ flag to StandardWellsSolvent
flow_solvent is able to run cases without solvent.
2016-04-21 11:17:39 +02:00
Atgeirr Flø Rasmussen
4af2b4a915 Silence some recently introduced warnings. 2016-04-21 10:29:09 +02:00
Joakim Hove
1f64f79f6d Merge pull request #657 from pgdr/eclipsegrid-is-input
Using getInputGrid API from Parser
2016-04-20 15:50:33 +02:00
Atgeirr Flø Rasmussen
07fec302f4 Cherry-pick Atgeirr's Remove Deck parameter patch
Remove Deck parameter from GridInit constructor.

Possible because we now use the EclipseGrid-taking
overload of processEclipseFormat() for CpGrid.
2016-04-20 15:30:45 +02:00
Kai Bao
be55efa484 fixing the compilation and running resulting from PR648 2016-04-20 14:42:56 +02:00
Kai Bao
e67e31171d adding one line comment for WellModel in BlackoilModelBase 2016-04-20 14:26:13 +02:00
Kai Bao
350a38164e fixing the compilation and running of flow_multisegment 2016-04-20 14:26:13 +02:00
Kai Bao
a72f04a564 fixing the compilation and running of flow_polymer 2016-04-20 14:26:13 +02:00
Kai Bao
b82e917b0d improving the initSolvent in StandardWellsSolvent 2016-04-20 14:26:13 +02:00
Kai Bao
ebe60bc5d7 puting WellModel before Implementation in the template. 2016-04-20 14:26:13 +02:00
Kai Bao
5bce482086 fixing the compilation and running of flow_solvent 2016-04-20 14:26:13 +02:00
Kai Bao
b464e4fb4a adding WellModel as template class for BlackoilModelBase
the compilation and running of flow are recovered.

Conflicts:
	opm/autodiff/BlackoilModelBase_impl.hpp
2016-04-20 14:26:13 +02:00
Tor Harald Sandve
18434e54ad Query the compute_well_potential parameter only once
-- and fix some comments
2016-04-20 08:32:57 +02:00
Pål Grønås Drange
18f6672df0 Using getInputGrid API from Parser 2016-04-19 17:03:41 +02:00
Tor Harald Sandve
e9b097cbf4 Only compute well potential if needed
A boolen user parameter is added to controll the computation of well
potential.

This is a temporary fix to assure that no extra computation time is used
on well potential calculation if it is not needed. The long term fix
will require a more thorough revising of the well group implementation.
2016-04-19 16:24:28 +02:00
Tor Harald Sandve
84972ac21e Fix bhp/thp logic in well potential calculation
Pick the most restrictive bhp (not the one that gives the largest
potential flow)
2016-04-19 15:58:05 +02:00
Tor Harald Sandve
4867e14f88 Fixes after rebase
-- remove some leftovers from merge process
-- start using stdWells()
2016-04-19 09:41:25 +02:00
Tor Harald Sandve
b216302895 Adapt to usage of stdWells() 2016-04-19 09:21:16 +02:00
Tor Harald Sandve
cc48e8a17e Add support for THP in well potential calculations 2016-04-19 09:21:15 +02:00
Tor Harald Sandve
18246263e9 Move computation of well potentials from simulator class ot model class
- the computation of well potentials in the model class calculates the
well potentials using computeWellFlux()
- in this way the well potential calculations also handle well where
some perforations are closed by the simulator due to cross-flow.
- the well potentials pr perforation and phase is stored in the well
state.
2016-04-19 09:21:15 +02:00
Andreas Lauser
4baf0f6acf Merge pull request #654 from andlaus/nested_ad
Fix build
2016-04-18 11:01:39 +02:00
dr-robertk
93f48d6ad9 Merge pull request #647 from GitPaean/wells_refactoring_onlytemplate_function
Moving more well related functions to StandardWells
2016-04-16 12:37:42 +02:00
Andreas Lauser
0405953a64 adapt code w.r.t. the removal of the tags for Opm::Evaluation 2016-04-15 18:49:29 +02:00
Robert Kloefkorn
da0e725eb8 BackupRestore: remove all specializations for BlackoilState. This is now covered by
SimulationDataContainer.
2016-04-15 12:21:47 +02:00
Kai Bao
adb140a788 fixing the running of flow_multisegment 2016-04-14 16:05:19 +02:00
Kai Bao
75b73a893e putting Vector and ADB to be inside StandardWells and wellhelpers 2016-04-14 16:05:19 +02:00
Kai Bao
19734f2103 adding extractWellPerfProperties to StandardWellsSolvent
to fix the flow_solvent running.
2016-04-14 16:05:19 +02:00
Kai Bao
5da57973fe adding updateWellState and updateWellControls to StandardWells 2016-04-14 16:05:18 +02:00
Kai Bao
376c940f09 moving updatePerfPhaseRatesAndPressures to StandardWells 2016-04-14 16:05:18 +02:00
Kai Bao
c398a6e424 puting computeWellFlux in StandardWells 2016-04-14 16:05:18 +02:00
Kai Bao
e9e1b9fda8 adding extractWellPerfProperties to StandardWells
It causes problem for the flow_multisegment. So the version in
BlackoilModelBase is kept for now.

On the other hand, it is few of functions that will be both required by
the standard wells and multisegment wells.

Some decision will be made later on how to put this function.
2016-04-14 16:05:18 +02:00
Kai Bao
c8b66821d5 adding computeWellConnectionDensitesPressures to StandardWells class. 2016-04-14 16:05:18 +02:00
Kai Bao
5d99fac207 adding StandardWellsSolvent for Solvent model. 2016-04-14 16:05:18 +02:00
Kai Bao
bca23d34c1 making StandardWells non-templated
we will focus on template functions instead.
2016-04-14 16:05:18 +02:00
Kai Bao
266f6f2df5 adding computePropertiesForWellConnectionPressures to StandardWells
tested with flow. Not sure how other flow siblings work.
2016-04-14 16:05:18 +02:00
Kai Bao
3bcfc905bd makding StandardWells a template based on SolutionState and WellState
may need to be adjusted later.
2016-04-14 16:05:18 +02:00
Kai Bao
c120313f09 renaming visc parameters to mu_w for better readability 2016-04-14 15:09:03 +02:00
Kai Bao
104f6053f1 removing blank spaces and replacing the tab with spaces by retab 2016-04-14 14:57:26 +02:00
Kai Bao
30774d8309 correcting buggy visc pointer usage in effective viscosity calculation 2016-04-14 14:52:00 +02:00
Atgeirr Flø Rasmussen
c64593a023 Merge pull request #650 from GitPaean/mixing_parameters_fixing
using effective polymer viscosity for polymer mobility calculation.
2016-04-14 14:16:45 +02:00
Kai Bao
666f91505d using effective polymer viscosity for polymer mobility calculation. 2016-04-14 13:45:21 +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
Pål Grønås Drange
fd9f67ae55 Using API get3DProperties() 2016-04-12 14:47:50 +02:00
Pål Grønås Drange
77fc26475b Using new EclipseState API, made ->s into .s 2016-04-12 14:47:50 +02:00
Arne Morten Kvarving
66333051e7 Import the following files from opm-core
opm/core/utility/thresholdPressures.hpp
tests/test_thresholdpressure.cpp
opm/core/simulator/SimulatorCompressibleTwophase.hpp
opm/core/simulator/SimulatorCompressibleTwophase.cpp
opm/core/simulator/SimulatorIncompTwophase.hpp
opm/core/simulator/SimulatorIncompTwophase.cpp
examples/sim_2p_comp_reorder.cpp

the files in opm/core has been put in opm/simulators
2016-04-11 09:59:25 +02:00
Atgeirr Flø Rasmussen
ff549195ab Rename opm-autodiff -> opm-simulators. 2016-04-08 14:58:07 +02:00
Robert Kloefkorn
e80ad5a9fe Merge remote-tracking branch 'upstream/master' into PR/async-output 2016-04-08 13:07:44 +02:00
Robert Kloefkorn
b3a313bfec ThreadHandle: added documentation and use std::unique_ptr to store object pointers. 2016-04-08 11:12:09 +02:00
Kai Bao
23ba5fa398 removing the StandardWells definition inside BlackoilModelBase
and some other tiny cleaning up.
2016-04-07 10:45:13 +02:00
Kai Bao
624516ed3c creating separate files for class StandardWells 2016-04-06 16:42:04 +02:00
Atgeirr Flø Rasmussen
cebc393caf Merge pull request #635 from GitPaean/wells_refactoring
A first step towards Wells refactoring
2016-04-06 16:08:18 +02:00
Robert Kloefkorn
ec45b5547d cleanup. 2016-04-06 15:39:57 +02:00
Robert Kloefkorn
7e6a6fb20a ThreadHandle: cleanup and docu. 2016-04-06 15:26:47 +02:00
Kai Bao
84cc1ed81d correcting the determination of wells_active_. 2016-04-06 14:36:51 +02:00
Kai Bao
2bd83aae73 making the constructors of WellOps and StandardWells explicit. 2016-04-06 14:10:17 +02:00
Atgeirr Flø Rasmussen
37c4bd16b1 Adapt code to dune-cornerpoint -> opm-grid renaming. 2016-04-06 13:29:47 +02:00
Kai Bao
9972dae32a updating for the comments.
implement wells(), localWellsActive() and wellsActive() for the
BlackoilModelBase and its derived classed.
2016-04-06 12:54:01 +02:00
Kai Bao
4ad5d81296 fixing wrong codes from the rebase process and cleanup. 2016-04-06 12:54:01 +02:00
Kai Bao
8a52dd743b making StandardWells a simple class. 2016-04-06 12:54:01 +02:00
Kai Bao
3947ff5b1d moving localWellsActive and wellsActive to StandardWells
maybe later it can be something general for different types of wells.
2016-04-06 12:54:01 +02:00
Kai Bao
48483b23c7 update BlackoilSolventModel to fix the compilation. 2016-04-06 12:54:01 +02:00
Kai Bao
23288ce2e5 fixing the compilation after updated with master branch. 2016-04-06 12:54:01 +02:00
Kai Bao
5910c0db7c recovering the buidling for flow_multisegment 2016-04-06 12:54:01 +02:00
Kai Bao
723da3e618 recovering the flow_polymer 2016-04-06 12:54:01 +02:00
Kai Bao
bef4b8c077 moving the wellOps to the StandardWells class. 2016-04-06 12:54:01 +02:00
Kai Bao
8367eaacb3 first attempt to introduce StandardWells struct.
To replace the const Wells struct in BlackoilModelBase.
Only testing with Flow for the moment. Will update other Flow siblings
later.
2016-04-06 12:54:00 +02:00
Robert Kloefkorn
54ea243c5f SimulatorFullyImplicitBlackoilOutput: added threaded asynchronous output. 2016-04-06 11:10:01 +02:00
Tor Harald Sandve
e5254f3779 Adapt to changes interface of extractWellPerfProperties
The BlockoilmultisegmentModel is updated to account for changes in the
extractWellPerfProperties() interface.
2016-04-05 09:13:29 +02:00
Tor Harald Sandve
764d8a1c3f Remove leftovers from a merge process going wrong 2016-04-05 09:03:22 +02:00
Tor Harald Sandve
89e540cb2c Pass solutionState as first parameter
output parameters go last...
2016-04-05 08:57:07 +02:00
Tor Harald Sandve
925d0becf3 Fix to make flow_solvent run decks without solvent 2016-04-05 08:57:07 +02:00
Tor Harald Sandve
541475b2db Implement computePropertiesForWellConnectionPressures for solvent model
The solvent specify part of computeWellConnectionPressures is factored
out to computePropertiesForWellConnectionPressures in order to reuse
the computeWellConnectionPressures from the base model.
2016-04-05 08:57:07 +02:00
Tor Harald Sandve
9cd0383d36 Factor out computation of properties for well connection pressures
Computation of properties used in computeConnectionPressureDelta
is factored out to computePropertiesForWellConnectionPressures
The motivation is to be able to use a modified version of
computePropertiesForWellConnectionPressures in the solvent model
2016-04-05 08:57:07 +02:00
Tor Harald Sandve
7b81facfb0 Make use of extractWellPerfProperties to avoid code duplication
The following changes are done in order to remove the duplicated code in
assemble().
- extractWellPerfProperties takes SolutionState as input (only used in
the solvent model)
- the computation of effective parameters is moved to computeAccum()
With these changes the solvent model can use assemble() from the base
model.
2016-04-05 08:53:09 +02:00
Atgeirr Flø Rasmussen
0e7e45c129 Merge pull request #627 from totto82/well_potentials
Compute well potentials
2016-04-04 15:11:19 +02:00
Atgeirr Flø Rasmussen
cf6ed11f46 Merge pull request #626 from qilicun/adapt-changes
adapt changes to relpermDiagnostics.
2016-04-04 15:04:50 +02:00
Tor Harald Sandve
a2bff9149a Remove unused argument from computeWellPotentials() 2016-04-04 15:03:59 +02:00
Tor Harald Sandve
e4b52a457f Only calculate well potentials for cases with well groups 2016-04-04 09:03:13 +02:00
Tor Harald Sandve
bd81bda57b Remove well_perforation_pressure_diffs fr WellStateFullyImplicitBlackoil
- Calculate the well perforatino pressure difference based on bhp and
perforation pressures instead of storing it in
WellStateFullyImplicitBlackoil
2016-04-04 08:35:59 +02:00
Tor Harald Sandve
36a73591b0 Fix doc. for pressureMixingParameter 2016-04-01 15:59:17 +02:00
Tor Harald Sandve
a02a07289e Implement pressure effects in the Todd-Longstaff mixing parameter
The Todd-Longstaff model is extended to incorporate pressure effects
The solvent viscosity is then caculated as

mu_eff = mu_s^(1-\alpha * \omega) * mu_mix^(\alpha * \omega)

where \omega accounts for the porous media effects and \alpha =
\alpha(pressure) accounts for the miscibility of the solvent and oil
when contacted.
The \alpha values can be given using the TLPMIXPA keyword

If no entries are given to TLPMIXPA the table specified using PMISC will
be used as default.
IF TLPMIXPA does not appear in the grid \alpha = 1 and the pressure
effect is neglected.
This is tested in test_solventprops_ad.cpp
2016-04-01 15:55:56 +02:00
Tor Harald Sandve
30bd24f2fe Compute well potentials
The well potentials are caculated based on the well rates and pressure
drawdown at every time step. They are used to calculate default guide
rates used in group controlled wells.

well_perforation_pressure_diffs is stored in
WellStateFullyImplicitBlackoil as it is needed in the well potential
calculations.
2016-04-01 14:58:46 +02:00
Atgeirr Flø Rasmussen
8c9b17b943 Merge pull request #615 from totto82/fixes_solvent_model
Fixes to the solvent model
2016-04-01 13:40:00 +02:00
Liu Ming
778d318bb3 adapt changes to relpermDiagnostics. 2016-04-01 12:33:02 +08:00
Liu Ming
c314c30e79 if output_dir exists, save PRT file in that folder. 2016-04-01 09:27:39 +08:00
Liu Ming
0108216a68 Merge remote-tracking branch 'remotes/opm/master' into change-PRT-folder 2016-04-01 09:22:59 +08:00
Atgeirr Flø Rasmussen
6549658622 Merge pull request #624 from GitPaean/polymer_linearsolver
making the interleaved solver works for blackoil polymer simulator.
2016-03-31 15:39:54 +02:00
Atgeirr Flø Rasmussen
543c1655b9 Merge pull request #616 from jokva/accept-filename-without-DATA
Flow accepts base name for input Deck
2016-03-31 15:33:23 +02:00
Atgeirr Flø Rasmussen
b5c216f4f3 Merge pull request #621 from totto82/fix_lrat
Bugfix. Fix setting initial rates in updateWellControls
2016-03-31 14:33:33 +02:00
Atgeirr Flø Rasmussen
3aa5158842 Merge pull request #619 from kjellkongsvik/Move_OutputWriter_to_opm-output
Refactored to use OutputWriter from opm-output
2016-03-31 09:44:09 +02:00
Atgeirr Flø Rasmussen
13b86a7825 Revert "Asynchronous output." 2016-03-31 09:43:01 +02:00
Kai Bao
b39b9a85a2 making the interleaved solver works for blackoil polymer simulator.
The CPR solver does not work yet. An error will be thrown if people
specify to use CPR linear solver.
2016-03-30 16:19:56 +02:00
Robert Kloefkorn
8d11be71e0 SimulatorState --> SimulationDataContainer. 2016-03-30 11:01:34 +02:00
Robert Kloefkorn
9c67c0e135 Merge remote-tracking branch 'upstream/master' into PR/async-output 2016-03-30 10:45:40 +02:00
Jørgen Kvalsvik
9df3b2fda9 Flow accepts base name for input Deck
Enables flow to accept a basename for a case by appending a .DATA suffix
should it not be provided. It already supported reading the basename
from a .DATA extension file, but not opening said file by handing it to
the parser.
2016-03-30 08:51:41 +02:00
Robert Kloefkorn
5044a07e46 SimFullImplOutput: added future to ensure that write history is accounted for. 2016-03-29 15:22:33 +02:00
Kjell W. Kongsvik
a15085ad7d Replace comment with "ifdef DISABLE_OUTPUT" 2016-03-29 14:57:58 +02:00
Kjell W. Kongsvik
3614defbd9 Commented out usage of OutputWriter in simulator 2016-03-29 14:56:25 +02:00
Robert Kloefkorn
d5c375f297 SimulatorFullyImplicitOutput: added flag for async output. 2016-03-29 10:49:49 +02:00
Robert Kloefkorn
29053dc18d SimulFulImplBOOutput: asynchronous serial output. 2016-03-29 10:49:49 +02:00
Atgeirr Flø Rasmussen
463866b523 Create state_ in all cases. 2016-03-29 10:48:36 +02:00
Atgeirr Flø Rasmussen
98862f449c Restore compilation (init -> constructor).
Also suppress new warnings due to unsigned/signed comparisons.
2016-03-29 10:48:36 +02:00
Joakim Hove
18c07d5d66 Replaced SimulatorState -> SimulationDataContainer 2016-03-29 10:48:36 +02:00
Tor Harald Sandve
d91831b971 Avoid comparsion of floating point numbers 2016-03-18 14:30:47 +01:00
Tor Harald Sandve
94aa360fe6 Bugfix. Fix setting initial rates in updateWellControls
- The initial rates are only set to target values for single phase
producers (orat, wrat, grat).
- For injectors compi is used to determine the initial target rates.
2016-03-18 13:16:23 +01:00
chflo
e63bf7aead Changed includes due to OpmLog moved from parser to common 2016-03-17 16:19:07 +01:00
Kjell W. Kongsvik
ea9e572a65 Refactored to use OutputWriter from opm-output
As OutputWriter has been deleted from opm-core
Only changes in includes
2016-03-17 14:45:30 +01:00
Liu Ming
debf039175 rename ParseMode as ParseContext. 2016-03-17 08:55:52 +08:00
Tor Harald Sandve
753909b8b9 Fix convergence issues for negative relperm endpoints.
The relative permeabilty endpoints are scaled by the miscibility
function. The endpoints is not supposed to be negative therefore all
negative values are replaced by zero.
2016-03-16 11:04:56 +01:00
Tor Harald Sandve
41aa55ec82 Allow for shut wells in solvent run 2016-03-16 11:00:00 +01:00
Atgeirr Flø Rasmussen
a3ae13b892 Merge pull request #612 from qilicun/enable-solvent-diagnostics
enable relperm diagnostics for solvent model.
2016-03-16 10:32:18 +01:00
Liu Ming
f0a2959a6d use EclipsePRTLog. 2016-03-15 09:43:18 +08:00
Liu Ming
b4b821521e enable relperm diagnostics for solvent model. 2016-03-10 14:41:10 +08:00
Atgeirr Flø Rasmussen
77ea648e6a Merge pull request #610 from GitPaean/performance_multisegment
adding flag to wops_ms_ to indicate if MSW is involved.
2016-03-09 12:54:30 +01:00
Kai Bao
8115d918dd adding flag to wops_ms_ to indicate if MSW is involved.
to reduce some extra cost when MSW is not involved.
2016-03-09 11:20:16 +01:00
Andreas Lauser
bf283f8684 threshold pressures: consider the saturated case and fix a typo
the typo was caused the surface density of the oil phase to be used
instead of the one of gas. This caused the density to be off by a
factor of typically about 900.

using saturated FVFs does not change much, but it does not hurt
because it is also done that way in the simulator.

This makes the defaults for the threshold pressures reasonable again,
but for some reason they are not exactly the same as in the old
implementation. (although the differences are very tolerable.)

On the question why only "Model 2" is affected by this: the other
decks don't use threshold pressures (SPE-X) or do not default any
values (Norne).
2016-03-08 14:52:09 +01:00
Atgeirr Flø Rasmussen
d75516a705 Merge pull request #609 from totto82/powADB
Add power method for general f^g in the AutoDiffBlock
2016-03-08 11:15:00 +01:00
Tor Harald Sandve
35b34f1b3a Add pow() for constant base raised to variable exponent in AutoDiffBlock
- associated tests are added
- this PR also contains some clean up
2016-03-08 10:35:29 +01:00
Atgeirr Flø Rasmussen
235bdedc55 Merge pull request #605 from totto82/supportForPMISC
Add support for PMISC
2016-03-08 10:03:03 +01:00
Atgeirr Flø Rasmussen
597cda6cbb Merge pull request #608 from totto82/relperm_diagnostic_solvent
Skip the relperm diagnostics for the solvent model.
2016-03-08 08:41:27 +01:00
Tor Harald Sandve
b2e02f6d2b Add power method for general f^g in the AutoDiffBlock
A power method where both f and g are ADB variables is added
using the general derivative rule
(f^g)' = f^g * ln(f) * g' + g * f^(g-1) * f'

Tests are added to test_block.cpp
2016-03-07 14:23:45 +01:00
Andreas Lauser
b39e579197 fix the fallout of the removal of the opm-core black-oil PVT classes 2016-03-07 11:32:12 +01:00
Tor Harald Sandve
20819b8a03 Skip the relperm diagnostics for the solvent model. 2016-03-07 09:19:42 +01:00
Liu Ming
74fedcc53b Save PRT in the same folder as summary file. 2016-03-07 09:58:17 +08:00
Andreas Lauser
1f1dfbfc65 replace the blackoil PVT classes by the ones of opm-material
the opm-material classes are the ones which are now used by
opm-autodiff and this patch makes it much easier to keep the opm-core
and opm-autodiff results consistent. Also, the opm-material classes
seem to be a bit faster than the opm-core ones (see
https://github.com/OPM/opm-autodiff/pull/576)

I ran the usual array of tests with `flow`: SPE1, SPE3, SPE9 and Norne
all produce the same results at the identical runtime (modulo noise)
and also "Model 2" seems to work.
2016-03-05 19:11:44 +01:00
Tor Harald Sandve
948d985f56 Add support for PMISC
Pressure effects are added to relative permeability, capillary pressure,
viscosity and density miscibility
2016-03-04 11:34:31 +01:00
Atgeirr Flø Rasmussen
96938548c1 Merge pull request #603 from atgeirr/remove-unused-parameter
Adapt to removed init() parameter.
2016-03-04 11:22:08 +01:00
Atgeirr Flø Rasmussen
f7f18c70bb Merge pull request #604 from atgeirr/minor-fixes
Fix minor initialization and overriding bugs.
2016-03-04 11:21:09 +01:00
Atgeirr Flø Rasmussen
a19607fabc Merge pull request #593 from qilicun/integrate_diagnostics
integrate relperm diagnostics into flow.
2016-03-04 09:49:10 +01:00
Atgeirr Flø Rasmussen
7bfa8f405e Fix bug in overriding method. 2016-02-29 11:18:51 +01:00
Atgeirr Flø Rasmussen
b0b42d7dc7 Add missing initializer for 'singlePrecision'. 2016-02-29 11:17:54 +01:00
Atgeirr Flø Rasmussen
6dd3f0ebb3 Adapt to removed init() parameter. 2016-02-29 11:05:35 +01:00
Jørgen Kvalsvik
6ae1613765 Add missing opm-parser headers
opm-parser pull #695
https://github.com/OPM/opm-parser/pull/695
2016-02-26 11:56:44 +01:00
Bård Skaflestad
1237251ee4 Merge pull request #599 from joakim-hove/state-updates
PolymerState changes
2016-02-24 07:31:37 -06:00
Joakim Hove
7ddd1c1c80 PolymerState changes
- The PolymerState class will derive from SimulatorState, instead of
   containing a TwoPhaseState instance.

 - The Polymer calculation methods take PolymerState& input argument
   instead of TwoPhaseState&
2016-02-22 18:42:13 +01:00
Andreas Lauser
7c3020822a properly create state.temperature in the FullyImplicitCompressiblePolymerSolver class 2016-02-22 15:16:44 +01:00
Andreas Lauser
099c958137 fix the deprecation warnings caused by OPM/opm-parser#687 2016-02-21 17:45:56 +01:00
Jørgen Kvalsvik
19e41bd246 Change Deck access methods/types to references
opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.

https://github.com/OPM/opm-parser/pull/677
2016-02-19 11:55:19 +01:00
Atgeirr Flø Rasmussen
5bb705fda8 Merge pull request #953 from andlaus/const_gridproperties
fix the build
2016-02-19 11:46:32 +01:00
Atgeirr Flø Rasmussen
af2455fdbe Merge pull request #590 from dr-robertk/PR/bugfix-in-backup-restore
Bugfix in backup/restore.
2016-02-19 11:37:57 +01:00
Liu Ming
b15320b659 change diagnostics function call order. 2016-02-19 16:40:45 +08:00
Liu Ming
fe06257f27 rename LOG to PRT file. 2016-02-19 16:23:31 +08:00
Liu Ming
66cde4e052 integrate relperm diagnostics into flow. 2016-02-19 12:45:23 +08:00
Markus Blatt
c0b871a38a Improves NNC error message. 2016-02-18 22:05:01 +01:00
Markus Blatt
51b8d9acb1 Fixes the exception for models with threshold pressures.
Since the support for threshold pressures running Norne with
flow_mpi aborted error messages like
```
Program threw an exception: [/home/mblatt/DUNE-test/opm-autodiff/opm/autodiff/BlackoilModelBase_impl.hpp:383] Illegal size of threshold_pressures input ( 153924 ), must be equal to number of faces + nncs ( 78316 + 0 ).
```
This commit now distributes the threshold pressures (if present) just like the rest
of the model properties and Norne does not abort here any more.

Please note:
1. If there are NNCs flow_mpi will abort with an error.
2. We might want to resort to reading and calculating the threshold pressure
  (and maybe other properties) on distributed grids instead of using communication.
2016-02-18 17:00:08 +01:00
Atgeirr Flø Rasmussen
569df33ab2 Merge pull request #583 from totto82/solventSupportRegions
Support regions in the solvent model
2016-02-18 15:43:27 +01:00
Robert Kloefkorn
8b08be2b78 fastSparseAdd/Substruct: use operator += and -=. 2016-02-18 15:31:35 +01:00
Robert Kloefkorn
ce04e22399 BackupRestore: bugfix due to mixup of size_t and unsigned int. 2016-02-18 15:30:52 +01:00
Jørgen Kvalsvik
369050cc9c Change Deck access methods/types to references
opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.

https://github.com/OPM/opm-parser/pull/677
2016-02-18 08:50:26 +01:00
Atgeirr Flø Rasmussen
8dfc8d82fc Merge pull request #582 from dr-robertk/PR/fast-sparse-add
Fast sparse add.
2016-02-17 19:55:15 +01:00
Robert Kloefkorn
d001cac5b7 equalSparsityPattern: address nitpicks. 2016-02-17 15:59:34 +01:00
Robert Kloefkorn
bc71458d44 AutoDiffMatrix: added braces in operator += and -=. 2016-02-17 14:24:55 +01:00
Tor Harald Sandve
fd219dd544 Add whitespaces and comments to beautify the code 2016-02-17 10:43:01 +01:00
Markus Blatt
696dfc23ee Account for variable change in 2.4.1
Due to the upcomming release the name changes (j->j_, nnz->nnz_)already appear
in 2.4.1. This commit now checks for 2.4.1 and newer instead of 3.0 and newer.
2016-02-16 19:17:27 +00:00
Robert Kloefkorn
75ffd897da AutoDiffBlock: revert changes in operator /.
equalSparsityPattern: also include outer index in check.
2016-02-16 17:18:04 +01:00
Robert Kloefkorn
9661973387 Also check outer ptr. 2016-02-16 15:24:52 +01:00
Robert Kloefkorn
4df4c9147a fastSparseProduct.hpp --> fastSparseOperations.hpp 2016-02-16 10:25:57 +01:00
Robert Kloefkorn
743fad877a remove unused typedef. 2016-02-16 10:25:57 +01:00
Robert Kloefkorn
2eebf73e1a computeWellFlux: use operator -= when possible. 2016-02-16 10:25:57 +01:00