Rework compressibility representation.

Switch to storing a complete fluid-matrix derivative in the
compr_quantities rather than the total compressibility.  Maintain the
"volume discrepancy" field.  Also, add traditional memory management
functions.
This commit is contained in:
Bård Skaflestad
2011-10-18 20:38:28 +02:00
parent c3036166a9
commit 94fc6de78a

View File

@@ -29,15 +29,21 @@ extern "C" {
#endif #endif
struct compr_quantities { struct compr_quantities {
int nphases; /* Number of phases/components */ int nphases; /* Number of phases/components */
double *totcompr; /* Total compressibility per cell */
double *voldiscr; /* Volume discrepancy per cell */
double *Ac; /* RB^{-1} per cell */ double *Ac; /* RB^{-1} per cell */
double *dAc; /* d/dp (RB^{-1}) per cell */
double *Af; /* RB^{-1} per face */ double *Af; /* RB^{-1} per face */
double *phasemobf; /* Phase mobility per face */ double *phasemobf; /* Phase mobility per face */
double *voldiscr; /* Volume discrepancy per cell */
}; };
struct compr_quantities *
compr_quantities_allocate(size_t nc, size_t nf, int np);
void
compr_quantities_deallocate(struct compr_quantities *cq);
void void
compr_flux_term(grid_t *G, compr_flux_term(grid_t *G,
const double *fflux, const double *fflux,