/*
Copyright 2010 Statoil ASA.
This file is part of The Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see .
*/
/**
@file upscale_cond.C
@brief Upscales resistivity as a function of water saturation
Description:
Reads in a lithofacies geometry in Eclipse format, reads in J(S_w)
for each stone type, and calculates upscaled
resistivity values for values of S_w.
Steps in the code:
1: Process command line options.
2: Read and parse Eclipse file
3: Read a J-function for each stone-type.
4: Tesselate the grid (Sintef code)
5: Find minimum and maximum capillary pressure from the J-functions in each cell.
6: Upscale water saturation as a function of capillary pressure
7: Upscale conductivity ( = 1/resistivity ) for each saturation point
8: Print output to screen and optionally to file.
The relative permeability computation is based on
- Capillary equilibrium, p_c is spatially invariant.
Units handling:
- Input surface tension is in dynes/cm
- The denominator \sigma * cos(\phi) in J-function scaling
is what we call "surface tension". If angle dependency is to be
included, calculate the "surface tension" yourself.
- Outputted capillary pressure is in Pascals.
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include // for DBL_MAX
#include
#include
#include
#include
#include
#include
#include