mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-18 21:43:27 -06:00
merge
This commit is contained in:
commit
3058e26447
@ -94,8 +94,9 @@ namespace Opm
|
|||||||
/// \param[out] faceflux Will contain F signed face flux values.
|
/// \param[out] faceflux Will contain F signed face flux values.
|
||||||
/// \param[out] well_bhp Will contain bhp values for each well passed
|
/// \param[out] well_bhp Will contain bhp values for each well passed
|
||||||
/// in the constructor.
|
/// in the constructor.
|
||||||
/// \param[out] well_rate Will contain rate values for each well passed
|
/// \param[out] well_rate Will contain rate values for each
|
||||||
/// in the constructor.
|
/// connection in all wells passed in the
|
||||||
|
/// constructor
|
||||||
void IncompTpfa::solve(const std::vector<double>& totmob,
|
void IncompTpfa::solve(const std::vector<double>& totmob,
|
||||||
const std::vector<double>& omega,
|
const std::vector<double>& omega,
|
||||||
const std::vector<double>& src,
|
const std::vector<double>& src,
|
||||||
@ -141,7 +142,7 @@ namespace Opm
|
|||||||
|
|
||||||
if(wells_ != NULL) {
|
if(wells_ != NULL) {
|
||||||
well_bhp.resize(wells_->number_of_wells);
|
well_bhp.resize(wells_->number_of_wells);
|
||||||
well_rate.resize(wells_->number_of_wells);
|
well_rate.resize(wells_->well_connpos[ wells_->number_of_wells ]);
|
||||||
soln.well_flux = &well_rate[0];
|
soln.well_flux = &well_rate[0];
|
||||||
soln.well_press = &well_bhp[0];
|
soln.well_press = &well_bhp[0];
|
||||||
}
|
}
|
||||||
@ -169,8 +170,9 @@ namespace Opm
|
|||||||
/// \param[out] faceflux Will contain F signed face flux values.
|
/// \param[out] faceflux Will contain F signed face flux values.
|
||||||
/// \param[out] well_bhp Will contain bhp values for each well passed
|
/// \param[out] well_bhp Will contain bhp values for each well passed
|
||||||
/// in the constructor
|
/// in the constructor
|
||||||
/// \param[out] well_rate Will contain rate values for each well passed
|
/// \param[out] well_rate Will contain rate values for each
|
||||||
/// in the constructor
|
/// connection in all wells passed in the
|
||||||
|
/// constructor
|
||||||
void IncompTpfa::solve(const std::vector<double>& totmob,
|
void IncompTpfa::solve(const std::vector<double>& totmob,
|
||||||
const std::vector<double>& omega,
|
const std::vector<double>& omega,
|
||||||
const std::vector<double>& src,
|
const std::vector<double>& src,
|
||||||
@ -240,7 +242,7 @@ namespace Opm
|
|||||||
|
|
||||||
if(wells_ != NULL) {
|
if(wells_ != NULL) {
|
||||||
well_bhp.resize(wells_->number_of_wells);
|
well_bhp.resize(wells_->number_of_wells);
|
||||||
well_rate.resize(wells_->number_of_wells);
|
well_rate.resize(wells_->well_connpos[ wells_->number_of_wells ]);
|
||||||
soln.well_flux = &well_rate[0];
|
soln.well_flux = &well_rate[0];
|
||||||
soln.well_press = &well_bhp[0];
|
soln.well_press = &well_bhp[0];
|
||||||
}
|
}
|
||||||
|
@ -61,10 +61,10 @@ namespace Opm
|
|||||||
|
|
||||||
/// Assemble and solve incompressible pressure system.
|
/// Assemble and solve incompressible pressure system.
|
||||||
/// \param[in] totmob Must contain N total mobility values (one per cell).
|
/// \param[in] totmob Must contain N total mobility values (one per cell).
|
||||||
/// totmob = \sum_{p} kr_p/mu_p.
|
/// \f$totmob = \sum_{p} kr_p/mu_p\f$.
|
||||||
/// \param[in] omega Must be empty if constructor gravity argument was null.
|
/// \param[in] omega Must be empty if constructor gravity argument was null.
|
||||||
/// Otherwise must contain N mobility-weighted density values (one per cell).
|
/// Otherwise must contain N mobility-weighted density values (one per cell).
|
||||||
/// omega = \frac{\sum_{p} mob_p rho_p}{\sum_p rho_p}.
|
/// \f$omega = \frac{\sum_{p} mob_p rho_p}{\sum_p rho_p}\f$.
|
||||||
/// \param[in] src Must contain N source rates (one per cell).
|
/// \param[in] src Must contain N source rates (one per cell).
|
||||||
/// Positive values represent total inflow rates,
|
/// Positive values represent total inflow rates,
|
||||||
/// negative values represent total outflow rates.
|
/// negative values represent total outflow rates.
|
||||||
|
@ -408,6 +408,8 @@ namespace Opm
|
|||||||
void computeWDP(const Wells& wells, const UnstructuredGrid& grid, const std::vector<double>& saturations,
|
void computeWDP(const Wells& wells, const UnstructuredGrid& grid, const std::vector<double>& saturations,
|
||||||
const std::vector<double>& densities, std::vector<double>& wdp)
|
const std::vector<double>& densities, std::vector<double>& wdp)
|
||||||
{
|
{
|
||||||
|
const size_t np = densities.size();
|
||||||
|
|
||||||
// Simple for now:
|
// Simple for now:
|
||||||
for(int i = 0; i < wells.number_of_wells; i++) {
|
for(int i = 0; i < wells.number_of_wells; i++) {
|
||||||
double depth_ref = wells.depth_ref[i];
|
double depth_ref = wells.depth_ref[i];
|
||||||
@ -425,9 +427,9 @@ namespace Opm
|
|||||||
saturation_sum = 1.0;
|
saturation_sum = 1.0;
|
||||||
}
|
}
|
||||||
double density = 0.0;
|
double density = 0.0;
|
||||||
for(size_t i = 0; i < densities.size(); i++) {
|
for(size_t p = 0; p < np; p++) {
|
||||||
// Is this a smart way of doing it?
|
// Is this a smart way of doing it?
|
||||||
density += saturations[densities.size()*cell+i]*densities[i]/saturation_sum;
|
density += saturations[np*cell + p] * densities[p];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is the sign correct?
|
// Is the sign correct?
|
||||||
|
Loading…
Reference in New Issue
Block a user