Commit Graph

404 Commits

Author SHA1 Message Date
Kai Bao
a897501521 Applying the shear-thinning effect with PLYSHLOG 2015-06-04 15:10:19 +02:00
Kai Bao
9b93579d00 Adding the shear-thinning factors member varaiables. 2015-06-03 11:26:38 +02:00
Kai Bao
1baa2eb06a Adding the pre-shear-thinning water velocity for well performations. 2015-06-03 10:28:35 +02:00
Kai Bao
ec2d4ee6a5 Correcting location of several brackets. 2015-06-03 10:14:58 +02:00
Kai Bao
3b34356695 Adding pre-shear-thinning water velocity computing. 2015-06-03 10:09:21 +02:00
Kai Bao
587a0c747b adding the function to compute shear-thinning effect based on PLYSHLOG 2015-06-03 09:56:29 +02:00
Kai Bao
a9f55128d4 adding the function to find the intersection point.
This apply to find the intersection point of the line and a line
segmention. Will be used in the shear multipler calculation of with
PLYSHLOG.

Solver is not the best place to put this function, while need suggestion
and fixed later.
2015-06-03 09:56:29 +02:00
Kai Bao
b22e6588b9 Adding PLYSHLOG related to PolymerPropsAd 2015-06-03 09:56:29 +02:00
Kai Bao
db420faf75 Adding PLYSHLOG related to PolymerProperies. 2015-06-03 09:56:29 +02:00
Kai Bao
1032f11d3d added some comments that the current code is only for serial running. 2015-06-02 15:14:22 +02:00
Kai Bao
4f44c33c58 reserve() for wells_rep_radius and wells_perf_length
for more efficient push_back()
2015-06-02 15:10:09 +02:00
Kai Bao
9cc4a5d371 making wells_rep_radius and wells_perf_length const when initializing. 2015-06-02 15:01:22 +02:00
Kai Bao
8205ad3303 calculating the representative radius and perf length
for all well perforations, to be used in shear-thinning calculation.

The calculation is approximated.
2015-06-02 11:09:56 +02:00
Kai Bao
a4f456ab87 deleting unused solver files. 2015-06-01 12:46:44 +02:00
Kai Bao
c6e240daae Adding the flag for PLYSHLOG keyword. 2015-06-01 10:52:49 +02:00
Atgeirr Flø Rasmussen
79b861db10 Silence multiple warnings. 2015-05-29 16:31:32 +02:00
Atgeirr Flø Rasmussen
bd51ce8dbe Merge pull request #116 from andlaus/simplify_simulator
Simplify simulator
2015-05-29 15:47:06 +02:00
Atgeirr Flø Rasmussen
a1709aad94 Use unique_ptr instead of shared_ptr. 2015-05-29 15:10:51 +02:00
Andreas Lauser
9c78d5ef00 do not use std::shared_ptr where it is deemed inappropriate by the maintainers
note that I don't agree with this change and will assume no
responsibility if something goes down the gutter.
2015-05-29 14:36:34 +02:00
Andreas Lauser
2b085e0062 fully implicit simulators: various cleanups
these are mostly stylistic: the function bodies of most new methods
have been moved to the _impl.hpp file and the Simulator classes are
now templated on the grid type, so it should be not too hard to switch
them to Dune::CpGrid.
2015-05-29 12:59:40 +02:00
Bård Skaflestad
3e12d739b5 Restore build on older compilers
Older compilers, e.g., GCC 4.4., do not understand the
"simple-type-specifier" syntax of C++11's "friend" declarations.
Typical responses are

   error: a class-key must be used when declaring a friend
   error: friend declaration does not name a class or function

Restore build on older compilers (e.g., GCC prior to 4.7) by
inserting the 'class' keyword.
2015-05-28 17:16:28 +02:00
Andreas Lauser
01555da823 remove the run() method from SimulatorFullyImplicitCompressiblePolymer
With this the simulator is basically done, but since
FullyImplicitCompressiblePolymerSolver has not yet been converted to
the NewtonSolver plus Model approach, the solver cannot be removed and
thus still contains quite a bit of copy-and-pasted code.
2015-05-28 13:56:07 +02:00
Andreas Lauser
d27fb2bc45 properly use the SimulatorBase class for SimulatorFullyImplicitBlackoilPolymer and SimulatorFullyImplicitCompressiblePolymer 2015-05-28 13:56:07 +02:00
Andreas Lauser
0f1a7a16d7 unify the run() methods and the constructors of the 2p-compressible and the flow_polymer with the one from flow 2015-05-28 13:56:07 +02:00
Andreas Lauser
a816ab9a0c start to use the SimulatorBase class for SimulatorFullyImplicitCompressiblePolymer
since SimulatorFullyImplicitCompressiblePolymer is now a template, the
opaque pointer stuff is also removed and the contents of the .cpp file
basically became _impl.hpp. for SimulatorFullyImplicitBlackoilPolymer,
the opaque pointer stuff was removed for the same reasons as for
SimulatorFullyImplicitBlackoil.

the actual unification of code is not yet done, but this patch points
out the direction of where this will go.

Also note that some synchronization with the ordinary blackoil
simulator (FLOW) was necessary to make it compile.

Finnally, the parser currently likes to throw an exception (also for
the opm-polymer master) when eating the opm-data polymer test
case. This prevented me from properly testing this patch:

```
and@heuristix:~/src/opm-polymer|simplify_simulator > ./bin/flow_polymer deck_filename=/home/and/src/opm-data/polymer_test_suit/simple2D/2D_THREEPHASE_POLY_HETER.DATA

================    Test program for fully implicit three-phase black-oil flow     ===============

---------------    Reading parameters     ---------------
deck_filename found at /, value is /home/and/src/opm-data/polymer_test_suit/simple2D/2D_THREEPHASE_POLY_HETER.DATA
output not found. Using default value 'true'.
output_dir not found. Using default value 'output'.
Program threw an exception: IOConfig: Reading GRIDFILE keyword from GRID section: Output of GRID file is not supported
terminate called after throwing an instance of 'std::runtime_error'
  what():  IOConfig: Reading GRIDFILE keyword from GRID section: Output of GRID file is not supported
Aborted
```
2015-05-28 13:56:07 +02:00
Atgeirr Flø Rasmussen
1d5a67f2cd Remove method computeResidualNorms(), use base version. 2015-05-26 17:10:16 +02:00
Atgeirr Flø Rasmussen
1dcffe4b18 Refactor computeMassFlux(). 2015-05-26 17:04:33 +02:00
Atgeirr Flø Rasmussen
2ddfe91504 Make computeMassFlux() more like the base class version. 2015-05-26 16:49:25 +02:00
Atgeirr Flø Rasmussen
9cc01245f1 Adapt to rq_.head -> rq_.dh renaming in opm-autodiff. 2015-05-26 16:43:06 +02:00
Atgeirr Flø Rasmussen
a42c982628 Refactor updateState() to not copy base version code. 2015-05-26 15:31:45 +02:00
Atgeirr Flø Rasmussen
272947c99c Use extraAddWellEq() to add well contrib to polymer equation.
This way of refactoring was chosen since the extra term depends
on a lot of context. Instead of recreating the context in the
polymer model (which would not reduce any complexity) the necessary
variables are passed to extraAddWellEq().
2015-05-26 14:04:35 +02:00
Atgeirr Flø Rasmussen
64da6ef184 Refactor computeAccum().
Extend base class version instead of copying.
2015-05-26 12:55:43 +02:00
Atgeirr Flø Rasmussen
c9c19d9253 Fix error and warning in assert() statements. 2015-05-26 12:08:30 +02:00
Atgeirr Flø Rasmussen
2cd5b672bf Only deal with concentration if has_polymer_ is true. 2015-05-26 12:06:17 +02:00
Atgeirr Flø Rasmussen
2539fb935d Refactor variableState().
Use base case where possible instead of copying it.
2015-05-26 11:49:10 +02:00
Atgeirr Flø Rasmussen
da98f18f80 Use base class version of parameter accessors. 2015-05-26 02:00:46 +02:00
Atgeirr Flø Rasmussen
f2e5177594 Remove functions that are identical in BlackoilModelBase.
Also refactor some functions that are different to call the
base version and then do additional processing. However this
process has not been carried out on all methods at this point.
2015-05-26 01:46:34 +02:00
Atgeirr Flø Rasmussen
26484e91a5 Transform BlackoilPolymerModel to inherit BlackoilModelBase.
The class still contains surplus implementations though.
2015-05-26 00:12:37 +02:00
Atgeirr Flø Rasmussen
5c1e314cbb Fix the same bug for the MPI case.
Note: not actually tested with MPI, written blindly!
2015-05-25 00:10:11 +02:00
Atgeirr Flø Rasmussen
5f6027ba01 Bugfix: we compute no well flux residual for polymer, do not try to use. 2015-05-25 00:06:17 +02:00
Atgeirr Flø Rasmussen
82da34ddd3 Merge pull request #109 from atgeirr/refactor-solver
Start refactor fully implicit polymer solver
2015-05-22 12:41:01 +02:00
Atgeirr Flø Rasmussen
59bd1391a8 Update polymer solver with convergence features from opm-autodiff.
Original patches by Tor Harald Sandve and Markus Blatt.
2015-05-21 16:29:01 +02:00
Atgeirr Flø Rasmussen
d7de9894e0 Follow minor API changes in opm-autodiff. 2015-05-21 09:50:54 +02:00
Atgeirr Flø Rasmussen
c700b2124d Merge pull request #110 from qilicun/fix_polyinflow
Fix error: When the injector is not the first of wells, opm should work well
2015-05-20 11:12:43 +02:00
Liu Ming
641113bfa8 remove the debug information. 2015-05-20 15:06:00 +08:00
Liu Ming
f66921612c Output well name when wells can't find in WPOLYMER keyword. 2015-05-20 14:57:26 +08:00
Atgeirr Flø Rasmussen
b7ef3b7f57 Minor changes to make BlackoilPolymerModel more like BlackoilModel.
No behaviour changes, only renaming etc. to reduce the diff.
2015-05-20 08:48:54 +02:00
Liu Ming
f8baad5d91 Fix error: When the injector is not the first of wells, opm should work well. 2015-05-20 12:35:04 +08:00
Atgeirr Flø Rasmussen
6984ca52e4 Update docs. 2015-05-19 21:36:40 +02:00
Atgeirr Flø Rasmussen
65e7a934a9 Make BlackoilPolymerModel usable with NewtonSolver from opm-autodiff. 2015-05-19 21:29:14 +02:00