Commit Graph

427 Commits

Author SHA1 Message Date
Bård Skaflestad
2b8bde1b55 Summarise the fields of struct coarse_topology. 2011-06-05 13:20:15 +02:00
Bård Skaflestad
11ae0c62ae Use (c1,c2) alias rather than neigh[] references where possible. 2011-05-31 23:06:44 +02:00
Bård Skaflestad
1cb20e7637 Increase readability of create_c2c().
Introduce two intermediate variables, c1, and c2, to hold cell numbers
during the building of the cell<->cell neighbourhood.  This reduces
the statement complexity--both for the human reader and the compiler...
2011-05-31 23:04:40 +02:00
Bård Skaflestad
eed3e5bc65 Spelling. 2011-05-28 00:08:33 +02:00
Bård Skaflestad
f825d4e23d Avoid signed/unsigned problem. 2011-05-27 23:17:44 +02:00
Bård Skaflestad
f316c730d0 Enable silent build rules if available in Automake.
Automake 1.11 introduced the concept of "silent build rules" wherein the
build commands are reported as

  CC     cfsh.lo

rather than something along the lines of

  bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../../opmpressure/src -I..   -DMATLAB_MEX_FILE=1 -I/work/opt/matlab/R2009b/extern/include/  -O3 -DNDEBUG -std=c99 -Wall -Wextra -pedantic -march=native -mtune=native -MT cfsh.lo -MD -MP -MF .deps/cfsh.Tpo -c -o cfsh.lo ../../../../../opmpressure/src/cfsh.c
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../../../opmpressure/src -I.. -DMATLAB_MEX_FILE=1 -I/work/opt/matlab/R2009b/extern/include/ -O3 -DNDEBUG -std=c99 -Wall -Wextra -pedantic -march=native -mtune=native -MT cfsh.lo -MD -MP -MF .deps/cfsh.Tpo -c ../../../../../opmpressure/src/cfsh.c  -fPIC -DPIC -o .libs/cfsh.o

The former is much easier to read and, consequently, more conducive to
visually noticing diagnostics from the toolset (compiler, linker &c).

On the other hand, only fairly recent editions of Automake have the
"silent rule" capability, so enable silent rules only if available.  In
particular, Automake 1.10.x (the default Automake version in MacOS X
10.6) does not support the capability.  Neither does the default
Automake in CentOS 5.6.

Further details on silent build rules can be found at

  http://sources.redhat.com/automake/automake.html#Options
  http://www.flameeyes.eu/autotools-mythbuster/automake/silent.html

Thanks to Arne Morten Kvarving in Dune Flyspray issue #922
(http://www.dune-project.org/flyspray/index.php?do=details&task_id=922)
for the tip on how to preserve "configure.ac" backwards compatibility
with Automake < 1.11 .
2011-05-27 15:09:58 +02:00
Bård Skaflestad
4eeb70e016 Delete trailing whitespace. 2011-05-11 15:14:34 +02:00
Bård Skaflestad
298034ea98 Consistently refer to "half-transmissibilities" as "one-sided".
While here, remove a comment that only describes the mechanics of the
following loop and does not provide any more insight.
2011-05-11 15:14:19 +02:00
Bård Skaflestad
79b5e95bc4 Merge from upstream. 2011-05-11 14:24:47 +02:00
Atgeirr Flø Rasmussen
70ff7a1b99 Three changes:
1. Changed calculation of face pressures to avoid using mobilities.
2. Added 'scratch_f' array to cfs_tpfa_impl struct (for use by above routine).
3. Changed interface of cfs_tpfa_fpress() to pass the data struct.
2011-05-11 14:17:30 +02:00
Atgeirr Flø Rasmussen
23f1cff3c2 Now assemble() expects gravcapf as a parameter instead of computing it. 2011-05-10 11:35:01 +02:00
Bård Skaflestad
9efc70d353 Reorder declarations to remove warning.
Specifically, GCC in strict ISO C90 mode warns of:
  cfs_tpfa.c: In function ‘cfs_tpfa_impes_maxtime_cell’:
  cfs_tpfa.c:1086: warning: ISO C90 forbids mixed declarations and code
2011-04-26 23:15:43 +02:00
Atgeirr Flø Rasmussen
deb1f4e5ad Using gravtrans_p for well impes transport. 2011-04-26 11:06:46 +02:00
Atgeirr Flø Rasmussen
9730ea81c1 Merged. 2011-04-18 13:52:54 +02:00
Atgeirr Flø Rasmussen
c7fb0bfc3a Bugfix in impes transport for well perforations, function signature change. 2011-04-18 13:51:54 +02:00
Bård Skaflestad
61bbaf821b Merge from upstream. 2011-04-12 12:34:04 +02:00
Atgeirr Flø Rasmussen
c0a1444fa4 More output. Substantially changed effect of do_impes parameter. In detail:
0. Writes total fluid volumes to octave and vtk output files.
(following considerations ONLY apply to IMPES mode: do_impes=true)
1. Now we do timestep safety evaluations for IMPES, a la Coats.
   This is done after the pressure computation.
2. If current timestep is unsafe, we set the new timestep to the safe one,
   divided by 1.5.
3. If minimum_stepsize is set, we will not further reduce the timestep once
   it is below the minimum (yes, this is not quite a "minimum").
All in all, timestepping and reporting should be reconsidered to make a
user-friendly yet controllable impes code. The current impes mode does
not interact well with timestep_file for instance.
2011-04-12 09:44:39 +02:00
Bård Skaflestad
87a0756af6 Merge from upstream. 2011-04-11 16:35:06 +02:00
Atgeirr Flø Rasmussen
389d7627f4 Added explicitTimestepLimit() method. 2011-04-11 13:37:30 +02:00
Bård Skaflestad
5548973e73 Sort includes. 2011-04-11 11:32:42 +02:00
Atgeirr Flø Rasmussen
58b7db31c5 Added setting of dpmob arrays. Minor edit and reindent. 2011-04-11 11:12:33 +02:00
Atgeirr Flø Rasmussen
3ceab3dc45 Added gravity parameter, and gravity potential computations. 2011-04-11 11:04:52 +02:00
Atgeirr Flø Rasmussen
7e290e8bfd First partial implementation of Coats' stable IMPES step limit. 2011-04-11 10:11:22 +02:00
Bård Skaflestad
fb2192a7ed Implement total rate constraint for wells.
Untested.
2011-02-16 10:41:43 +01:00
Ove Saevareid
405900ac39 Bugfix: Correct number of connections also for the last well. 2011-02-07 17:52:32 +01:00
Atgeirr Flø Rasmussen
c1e686a3d6 Removed check for wells, no longer necessary since we support them now. 2011-02-03 15:44:36 +01:00
Atgeirr Flø Rasmussen
a0c54cb6de Added well handling to cfs_tpfa_expl_mass_transport(), simplified interface. 2011-02-03 12:51:53 +01:00
Atgeirr Flø Rasmussen
a779a061cc Corrected size of gpot_storage. 2011-01-26 16:00:08 +01:00
Atgeirr Flø Rasmussen
6c5520a9ad Merge. 2011-01-24 14:37:32 +01:00
Atgeirr Flø Rasmussen
fba93287c9 Fixed sign of gravity input to pressure solver. 2011-01-24 14:34:38 +01:00
Bård Skaflestad
5c3b6432b2 Explicitly state that ratio->psum is a scalar per total connection. 2011-01-24 11:21:25 +01:00
Bård Skaflestad
079d2704a6 Merge from upstream. 2011-01-20 16:07:36 +01:00
Atgeirr Flø Rasmussen
3ecfac750a Updated to match changed C interface. 2011-01-20 16:01:58 +01:00
Bård Skaflestad
e23b9e5aff Satisfy all post-conditions of compute_densrat_update()
The total (accumulated) phase contributions must be available in
ratio->psum for each completion when leaving the function.
2011-01-20 10:49:11 +01:00
Bård Skaflestad
8efa1b88e2 Add compressible well completion flows.
Specifically, allocate storage for 'masstrans' and 'gravtrans' terms
per well completion (perforation), as well as compressible
transmissibilities (scalar per completion).  Calculate compressible
quantities by treating each completion as an interface.

Introduce a new structure, 'completion_data', to collect static and
dynamic discretisation data pertaining to each completion (e.g.,
productivity indices, gravity potentials and density ratio
operators).  Pass this structure, rather than individual fields, into
affected CFS_TPFA entry points.

Compile tested only.
2011-01-19 20:20:15 +01:00
Bård Skaflestad
570ca120b9 Restructure calculation of compressible terms.
Specifically, rename the obtuse structure 'disc_data' to the more targeted
'densrat_util' and hoist the compressible terms 'ctrans' and 'P' into
the 'cfs_tpfa_impl' structure.  Moreover, rename the remaining fields
into something that makes sense in (almost) isolation.  Update
compute_densrat_update() and cfs_tpfa_construct() accordingly.

This is in preparation of adding compressible well terms.
2011-01-19 12:08:12 +01:00
Bård Skaflestad
f5eaab04fe Reorder internal functions for call-sequence consistency. 2011-01-18 13:49:35 +01:00
Bård Skaflestad
0a42f65a52 Add gravity contributions to flux.
Only really verified for incompressible data.  There are likely to be
programming errors.
2011-01-16 21:21:06 +01:00
Bård Skaflestad
2e3a5fff64 Improve gravity handling in linear system.
Specifically, only assemble gravity contributions on internal faces or
external Dirichlet faces.  Moreover, pay attention to direction of
gravity flux (in/out of cell) during assembly.
2011-01-14 20:30:07 +01:00
Atgeirr Flø Rasmussen
827bd17d5d Added transmissibilities to transport solver. Fixed some initialization issues. 2011-01-13 16:04:19 +01:00
Bård Skaflestad
e7214faf0f Re-install zero-level enforcement, but only for incompressible problems. 2011-01-13 14:19:07 +01:00
Bård Skaflestad
4d6a286ab4 Remove enforcement of pressure zero level for pure Neumann problems.
This direct manipulation of the linear system is inappropriate when
solving compressible flows where the absolute pressure level matters
greatly.
2011-01-13 13:06:45 +01:00
Atgeirr Flø Rasmussen
fefaa301e7 Removed zero-gravity check, since we now (supposedly) handle gravity. 2011-01-13 09:23:01 +01:00
Atgeirr Flø Rasmussen
15438e67fc Added gravity support. Not yet tested. 2011-01-12 09:02:02 +01:00
Atgeirr Flø Rasmussen
4ce8b87c0f Ensure proper behaviour if well object is empty. 2011-01-07 14:43:53 +01:00
Atgeirr Flø Rasmussen
da647c6658 Work in progress adding wells to transport part. 2011-01-06 11:23:58 +01:00
Atgeirr Flø Rasmussen
d478df23cf Added missing well argument in function call. 2011-01-06 09:28:51 +01:00
Atgeirr Flø Rasmussen
2e40522940 Properly initialize with wells. New init() overload with wells. 2011-01-05 13:36:54 +01:00
Atgeirr Flø Rasmussen
16b2d16452 Fixed usage of wctrl object. 2011-01-05 11:15:51 +01:00
Atgeirr Flø Rasmussen
378ab369ed Implemented initWells(). Added whitespace. 2011-01-05 09:48:06 +01:00