Removed unused files.
This commit is contained in:
parent
05ac35ed14
commit
da1159061a
@ -84,9 +84,7 @@ opm/core/transport/spu_explicit.c \
|
||||
opm/core/transport/spu_implicit.c \
|
||||
opm/core/transport/transport_source.c \
|
||||
opm/core/transport/reorder/TransportModelTwophase.cpp \
|
||||
opm/core/transport/reorder/fluid.c \
|
||||
opm/core/transport/reorder/reordersequence.c \
|
||||
opm/core/transport/reorder/twophase.cpp \
|
||||
opm/core/transport/reorder/nlsolvers.c \
|
||||
opm/core/transport/reorder/tarjan.c \
|
||||
opm/core/transport/reorder/twophasetransport.cpp
|
||||
@ -203,10 +201,8 @@ opm/core/transport/ImplicitAssembly.hpp \
|
||||
opm/core/transport/transport_source.h \
|
||||
opm/core/transport/reorder/TransportModelInterface.hpp \
|
||||
opm/core/transport/reorder/TransportModelTwophase.hpp \
|
||||
opm/core/transport/reorder/fluid.h \
|
||||
opm/core/transport/reorder/nlsolvers.h \
|
||||
opm/core/transport/reorder/reordersequence.h \
|
||||
opm/core/transport/reorder/twophase.hpp \
|
||||
opm/core/transport/reorder/tarjan.h \
|
||||
opm/core/transport/reorder/twophasetransport.hpp
|
||||
|
||||
|
@ -1,65 +0,0 @@
|
||||
#include <opm/core/transport/reorder/fluid.h>
|
||||
|
||||
|
||||
#if 1
|
||||
|
||||
/* Quadratic relperm */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
double fluxfun(double sw, const int reg)
|
||||
/*---------------------------------------------------------------------------*/
|
||||
{
|
||||
double so, mw, mo, vw, vo;
|
||||
(void) reg;
|
||||
/* Hardcoding behaviour to make test program work */
|
||||
so = 1.0 - sw;
|
||||
vw = 0.001;
|
||||
vo = 0.003;
|
||||
mw = sw*sw / vw;
|
||||
mo = so*so / vo;
|
||||
return mw / (mw + mo);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
double dfluxfun(double sw, const int reg)
|
||||
/*---------------------------------------------------------------------------*/
|
||||
{
|
||||
double so, mw, mo, vw, vo, dmw, dmo, fw;
|
||||
(void) reg;
|
||||
/* Hardcoding behaviour to make test program work */
|
||||
so = 1.0 - sw;
|
||||
vw = 0.001;
|
||||
vo = 0.003;
|
||||
mw = sw*sw / vw;
|
||||
mo = so*so / vo;
|
||||
|
||||
dmw = 2.0*sw / vw;
|
||||
dmo = 2.0*so / vo;
|
||||
|
||||
fw = mw / (mw+mo);
|
||||
|
||||
return (dmw * (1-fw) - dmo * fw) / (mw+mo);
|
||||
}
|
||||
#else
|
||||
|
||||
/* Linear relperm */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
double fluxfun(double sw, const int reg)
|
||||
/*---------------------------------------------------------------------------*/
|
||||
{
|
||||
(void) reg;
|
||||
return sw;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
double dfluxfun(double sw, const int reg)
|
||||
/*---------------------------------------------------------------------------*/
|
||||
{
|
||||
(void) sw, reg;
|
||||
return 1.0;
|
||||
}
|
||||
#endif
|
||||
/* Local Variables: */
|
||||
/* c-basic-offset:4 */
|
||||
/* End: */
|
@ -1,37 +0,0 @@
|
||||
/*===========================================================================
|
||||
|
||||
File: system.h
|
||||
|
||||
Created: Tue Nov 15 12:59:17 CET 2011
|
||||
|
||||
Author: Knut-Andreas Lie <Knut-Andreas.Lie@sintef.no>
|
||||
|
||||
Revision: $Id$
|
||||
|
||||
Description:
|
||||
Implementation of the Corey fluid object for a single rock type
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef FLUID_H
|
||||
#define FLUID_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef MATLAB_MEX_FILE
|
||||
void init_fluid(const mxArray *);
|
||||
#else
|
||||
void init_fluid(void);
|
||||
#endif
|
||||
|
||||
double fluxfun (double sw, const int);
|
||||
double dfluxfun (double sw, const int);
|
||||
int getNumSatRegions(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FLUID_H */
|
@ -1,159 +0,0 @@
|
||||
/* Copyright 2011 (c) Jostein R. Natvig <Jostein.R.Natvig at sintef.no> */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/transport/reorder/twophase.hpp>
|
||||
#include <opm/core/transport/reorder/nlsolvers.h>
|
||||
#include <opm/core/transport/reorder/fluid.h>
|
||||
#include <opm/core/fluid/IncompPropertiesInterface.hpp>
|
||||
|
||||
|
||||
/* Parameters used in solution of single-cell boundary-value problem */
|
||||
struct Parameters
|
||||
{
|
||||
double s0;
|
||||
double influx; /* sum_j min(v_ij, 0)*f(s_j) */
|
||||
double outflux; /* sum_j max(v_ij, 0) */
|
||||
double dtpv; /* dt/pv(i) */
|
||||
int cell;
|
||||
const Opm::IncompPropertiesInterface* props;
|
||||
};
|
||||
|
||||
|
||||
static struct Parameters get_parameters(struct SolverData *d, int cell);
|
||||
static double residual(double s, void *data);
|
||||
static double fluxfun_props(double s, int cell, const Opm::IncompPropertiesInterface* props);
|
||||
|
||||
void
|
||||
destroy_solverdata(struct SolverData *d)
|
||||
{
|
||||
if (d!=NULL)
|
||||
{
|
||||
free(d->fractionalflow);
|
||||
}
|
||||
free(d);
|
||||
}
|
||||
|
||||
struct SolverData *
|
||||
init_solverdata(struct UnstructuredGrid *grid,
|
||||
const Opm::IncompPropertiesInterface* props,
|
||||
const double *darcyflux,
|
||||
const double *porevolume,
|
||||
const double *source,
|
||||
const double dt,
|
||||
double *saturation)
|
||||
{
|
||||
int i;
|
||||
struct SolverData *d = (struct SolverData*) malloc(sizeof *d);
|
||||
|
||||
if(d!=NULL)
|
||||
{
|
||||
d->grid = grid;
|
||||
d->props = props;
|
||||
d->darcyflux = darcyflux;
|
||||
d->porevolume = porevolume;
|
||||
d->source = source;
|
||||
d->dt = dt;
|
||||
|
||||
d->saturation = saturation;
|
||||
d->fractionalflow = (double*) malloc(grid->number_of_cells *
|
||||
sizeof *d->fractionalflow);
|
||||
if (d->fractionalflow == NULL)
|
||||
{
|
||||
destroy_solverdata(d);
|
||||
d = NULL;
|
||||
}
|
||||
for(i=0; i<grid->number_of_cells; ++i)
|
||||
{
|
||||
d->fractionalflow[i] = 0.0;
|
||||
}
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
/* Solver for single-cell bvp calls root-finder in nlsolvers.c */
|
||||
void solvecell(void *data, struct NonlinearSolverCtrl *ctrl, int cell)
|
||||
{
|
||||
struct SolverData *d = (struct SolverData*) data;
|
||||
struct Parameters prm = get_parameters(d, cell);
|
||||
d->saturation[cell] = find_zero(residual, &prm, ctrl);
|
||||
// double ff1 = fluxfun_props(d->saturation[cell], cell, d->props);
|
||||
// double ff2 = fluxfun(d->saturation[cell], -999);
|
||||
// printf("New = %f old = %f\n", ff1, ff2);
|
||||
d->fractionalflow[cell] = fluxfun_props(d->saturation[cell], cell, d->props);
|
||||
}
|
||||
|
||||
|
||||
/* ====================== Internals =================================*/
|
||||
|
||||
|
||||
/* Residual function r(s) for a single-cell bvp */
|
||||
/*
|
||||
* r(s) = s - s0 + dt/pv*(influx - outflux*f(s) )
|
||||
*/
|
||||
/* influx is water influx, outflux is total outflux */
|
||||
static double
|
||||
residual(double s, void *data)
|
||||
{
|
||||
struct Parameters *p = (struct Parameters*) data;
|
||||
return s - p->s0 + p->dtpv*(p->outflux*fluxfun_props(s, p->cell, p->props) + p->influx);
|
||||
}
|
||||
|
||||
static struct Parameters
|
||||
get_parameters(struct SolverData *d, int cell)
|
||||
{
|
||||
int i;
|
||||
struct UnstructuredGrid *g = d->grid;
|
||||
struct Parameters p;
|
||||
double flux;
|
||||
int f, other;
|
||||
|
||||
p.s0 = d->saturation[cell];
|
||||
p.influx = d->source[cell] > 0 ? -d->source[cell] : 0.0;
|
||||
p.outflux = d->source[cell] <= 0 ? -d->source[cell] : 0.0;
|
||||
p.dtpv = d->dt/d->porevolume[cell];
|
||||
p.cell = cell;
|
||||
p.props = d->props;
|
||||
|
||||
for (i=g->cell_facepos[cell]; i<g->cell_facepos[cell+1]; ++i) {
|
||||
f = g->cell_faces[i];
|
||||
|
||||
/* Compute cell flux*/
|
||||
if (cell == g->face_cells[2*f]) {
|
||||
flux = d->darcyflux[f];
|
||||
other = g->face_cells[2*f+1];
|
||||
}
|
||||
else {
|
||||
flux =-d->darcyflux[f];
|
||||
other = g->face_cells[2*f];
|
||||
}
|
||||
|
||||
if (other != -1) {
|
||||
if (flux < 0.0) {
|
||||
p.influx += flux*d->fractionalflow[other];
|
||||
}
|
||||
else {
|
||||
p.outflux += flux;
|
||||
}
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
static double fluxfun_props(double s, int cell, const Opm::IncompPropertiesInterface* props)
|
||||
{
|
||||
const double* visc = props->viscosity();
|
||||
double sat[2] = { s, 1.0 - s };
|
||||
double mob[2];
|
||||
props->relperm(1, sat, &cell, mob, NULL);
|
||||
mob[0] /= visc[0];
|
||||
mob[1] /= visc[1];
|
||||
return mob[0]/(mob[0] + mob[1]);
|
||||
}
|
||||
|
||||
|
||||
/* Local Variables: */
|
||||
/* c-basic-offset:4 */
|
||||
/* End: */
|
@ -1,48 +0,0 @@
|
||||
/* Copyright 2011 (c) Jostein R. Natvig <Jostein.R.Natvig at sintef.no> */
|
||||
|
||||
#ifndef TWOPHASE_HPP_INCLUDED
|
||||
#define TWOPHASE_HPP_INCLUDED
|
||||
|
||||
|
||||
|
||||
struct UnstructuredGrid;
|
||||
namespace Opm
|
||||
{
|
||||
class IncompPropertiesInterface;
|
||||
}
|
||||
|
||||
struct SolverData {
|
||||
struct UnstructuredGrid *grid;
|
||||
const Opm::IncompPropertiesInterface* props;
|
||||
const double *darcyflux; /* one flux per face in cdata::grid*/
|
||||
const double *porevolume; /* one volume per cell */
|
||||
const double *source; /* one source per cell */
|
||||
double dt;
|
||||
double *saturation; /* one per cell */
|
||||
double *fractionalflow; /* one per cell */
|
||||
};
|
||||
|
||||
struct NonlinearSolverCtrl;
|
||||
|
||||
|
||||
void
|
||||
solvecell (void *data, struct NonlinearSolverCtrl *ctrl, int cell);
|
||||
|
||||
void
|
||||
destroy_solverdata(struct SolverData *d);
|
||||
|
||||
struct SolverData *
|
||||
init_solverdata(struct UnstructuredGrid *grid,
|
||||
const Opm::IncompPropertiesInterface* props,
|
||||
const double *darcyflux,
|
||||
const double *porevolume,
|
||||
const double *source,
|
||||
const double dt,
|
||||
double *saturation);
|
||||
|
||||
|
||||
#endif /* TWOPHASE_H_INCLUDED */
|
||||
|
||||
/* Local Variables: */
|
||||
/* c-basic-offset:4 */
|
||||
/* End: */
|
Loading…
Reference in New Issue
Block a user