mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Rename CompletionData::gpot -> wdp .
This is in preparation of implementing actual gravity support in (compressible) well-pressure solution.
This commit is contained in:
parent
10604d237b
commit
8a8c29f5ce
@ -192,7 +192,7 @@ struct CompletionData
|
||||
/**
|
||||
* Gravity potentials.
|
||||
*/
|
||||
double *gpot;
|
||||
double *wdp;
|
||||
|
||||
/**
|
||||
* Volumes to surface-components matrix, A = RB^{-1}.
|
||||
|
@ -216,8 +216,8 @@ namespace Opm
|
||||
const int nperf = wells_->well_connpos[nw];
|
||||
const int dim = grid_.dimensions;
|
||||
const double grav = gravity_ ? gravity_[dim - 1] : 0.0;
|
||||
wellperf_gpot_.clear();
|
||||
wellperf_gpot_.resize(np*nperf, 0.0);
|
||||
wellperf_wdp_.clear();
|
||||
wellperf_wdp_.resize(np*nperf, 0.0);
|
||||
if (grav == 0.0) {
|
||||
return;
|
||||
}
|
||||
@ -239,7 +239,7 @@ namespace Opm
|
||||
props_.matrix(1, &state.pressure()[cell], &state.surfacevol()[np*cell], &cell, &A[0], 0);
|
||||
props_.density(1, &A[0], &rho[0]);
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
wellperf_gpot_[np*j + phase] = rho[phase]*grav*(cell_depth - ref_depth);
|
||||
wellperf_wdp_[np*j + phase] = rho[phase]*grav*(cell_depth - ref_depth);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -480,7 +480,7 @@ namespace Opm
|
||||
const double bhp = well_state.bhp()[w];
|
||||
double perf_p = bhp;
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
perf_p += wellperf_gpot_[np*j + phase]*comp_frac[phase];
|
||||
perf_p += wellperf_wdp_[np*j + phase]*comp_frac[phase];
|
||||
}
|
||||
// Hack warning: comp_frac is used as a component
|
||||
// surface-volume variable in calls to matrix() and
|
||||
@ -512,7 +512,7 @@ namespace Opm
|
||||
const double* z = &state.surfacevol()[0];
|
||||
UnstructuredGrid* gg = const_cast<UnstructuredGrid*>(&grid_);
|
||||
CompletionData completion_data;
|
||||
completion_data.gpot = ! wellperf_gpot_.empty() ? &wellperf_gpot_[0] : 0;
|
||||
completion_data.wdp = ! wellperf_wdp_.empty() ? &wellperf_wdp_[0] : 0;
|
||||
completion_data.A = ! wellperf_A_.empty() ? &wellperf_A_[0] : 0;
|
||||
completion_data.phasemob = ! wellperf_phasemob_.empty() ? &wellperf_phasemob_[0] : 0;
|
||||
cfs_tpfa_res_wells wells_tmp;
|
||||
@ -599,7 +599,7 @@ namespace Opm
|
||||
{
|
||||
UnstructuredGrid* gg = const_cast<UnstructuredGrid*>(&grid_);
|
||||
CompletionData completion_data;
|
||||
completion_data.gpot = ! wellperf_gpot_.empty() ? const_cast<double*>(&wellperf_gpot_[0]) : 0;
|
||||
completion_data.wdp = ! wellperf_wdp_.empty() ? const_cast<double*>(&wellperf_wdp_[0]) : 0;
|
||||
completion_data.A = ! wellperf_A_.empty() ? const_cast<double*>(&wellperf_A_[0]) : 0;
|
||||
completion_data.phasemob = ! wellperf_phasemob_.empty() ? const_cast<double*>(&wellperf_phasemob_[0]) : 0;
|
||||
cfs_tpfa_res_wells wells_tmp;
|
||||
@ -643,7 +643,7 @@ namespace Opm
|
||||
const double bhp = well_state.bhp()[w];
|
||||
double perf_p = bhp;
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
perf_p += wellperf_gpot_[np*j + phase]*comp_frac[phase];
|
||||
perf_p += wellperf_wdp_[np*j + phase]*comp_frac[phase];
|
||||
}
|
||||
well_state.perfPress()[j] = perf_p;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ namespace Opm
|
||||
struct cfs_tpfa_res_data* h_;
|
||||
|
||||
// ------ Data that will be modified for every solve. ------
|
||||
std::vector<double> wellperf_gpot_;
|
||||
std::vector<double> wellperf_wdp_;
|
||||
std::vector<double> initial_porevol_;
|
||||
|
||||
// ------ Data that will be modified for every solver iteration. ------
|
||||
|
@ -420,15 +420,15 @@ compute_well_compflux_and_deriv(struct cfs_tpfa_res_wells *wells ,
|
||||
const double *wpress,
|
||||
struct cfs_tpfa_res_impl *pimpl )
|
||||
{
|
||||
int c, i, w, np2;
|
||||
double pw, dp;
|
||||
double *WI, *gpot, *Ap, *pmobp;
|
||||
|
||||
double *pflux, *dpflux;
|
||||
int c, i, w, np2;
|
||||
double pw, dp;
|
||||
const double *WI, *wdp, *Ap, *pmobp;
|
||||
double *pflux, *dpflux, gpot[3] = { 0.0 };
|
||||
|
||||
struct Wells *W;
|
||||
|
||||
assert (wells->W != NULL);
|
||||
assert (wells->W->number_of_phases <= 3);
|
||||
|
||||
W = wells->W;
|
||||
|
||||
@ -436,7 +436,7 @@ compute_well_compflux_and_deriv(struct cfs_tpfa_res_wells *wells ,
|
||||
assert (W->data != NULL);
|
||||
|
||||
WI = W->WI;
|
||||
gpot = wells->data->gpot;
|
||||
wdp = wells->data->wdp;
|
||||
Ap = wells->data->A;
|
||||
pmobp = wells->data->phasemob;
|
||||
|
||||
@ -449,11 +449,11 @@ compute_well_compflux_and_deriv(struct cfs_tpfa_res_wells *wells ,
|
||||
pw = wpress[w];
|
||||
|
||||
for (; i < W->well_connpos[w + 1]; i++,
|
||||
gpot += np, Ap += np2, pmobp += np,
|
||||
Ap += np2, pmobp += np,
|
||||
pflux += np, dpflux += 2 * np) {
|
||||
|
||||
c = W->well_cells[i];
|
||||
dp = pw - cpress[c];
|
||||
dp = pw + wdp[i]- cpress[c];
|
||||
|
||||
compute_darcyflux_and_deriv(np, WI[i], dp, pmobp, gpot,
|
||||
pimpl->flux_work,
|
||||
@ -909,8 +909,8 @@ assemble_well_contrib(struct cfs_tpfa_res_wells *wells ,
|
||||
{
|
||||
int w, i, c, np, np2, nc;
|
||||
int is_neumann, is_open;
|
||||
double pw, dp;
|
||||
double *WI, *gpot, *pmobp;
|
||||
double pw, dp, gpot[3] = { 0.0 };
|
||||
const double *WI, *wdp, *pmobp;
|
||||
const double *Ac, *dAc;
|
||||
|
||||
struct Wells *W;
|
||||
@ -923,7 +923,7 @@ assemble_well_contrib(struct cfs_tpfa_res_wells *wells ,
|
||||
W = wells->W;
|
||||
|
||||
WI = W->WI;
|
||||
gpot = wells->data->gpot;
|
||||
wdp = wells->data->wdp;
|
||||
pmobp = wells->data->phasemob;
|
||||
|
||||
is_neumann = 1;
|
||||
@ -932,14 +932,13 @@ assemble_well_contrib(struct cfs_tpfa_res_wells *wells ,
|
||||
pw = wpress[ w ];
|
||||
is_open = W->ctrls[w]->current >= 0;
|
||||
|
||||
for (; i < W->well_connpos[w + 1];
|
||||
i++, gpot += np, pmobp += np) {
|
||||
for (; i < W->well_connpos[w + 1]; i++, pmobp += np) {
|
||||
|
||||
c = W->well_cells[ i ];
|
||||
Ac = cq->Ac + (c * np2);
|
||||
dAc = cq->dAc + (c * np2);
|
||||
|
||||
dp = pw - cpress[ c ];
|
||||
dp = pw + wdp[i] - cpress[ c ];
|
||||
|
||||
init_completion_contrib(i, np, Ac, dAc, h->pimpl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user