rename computeWellConnectionDensitesPressures to computeProperties

make computePressureDelta and computeDensities private
This commit is contained in:
Arne Morten Kvarving 2022-11-21 15:52:43 +01:00
parent 86bf452059
commit dfd68266e9
3 changed files with 46 additions and 45 deletions

View File

@ -447,7 +447,7 @@ computePropertiesForPressures(const WellState& well_state,
template<class FluidSystem, class Indices, class Scalar> template<class FluidSystem, class Indices, class Scalar>
void StandardWellConnections<FluidSystem,Indices,Scalar>:: void StandardWellConnections<FluidSystem,Indices,Scalar>::
computeWellConnectionDensitesPressures(const WellState& well_state, computeProperties(const WellState& well_state,
const std::function<Scalar(int,int)>& invB, const std::function<Scalar(int,int)>& invB,
const std::function<Scalar(int,int)>& mobility, const std::function<Scalar(int,int)>& mobility,
const std::function<Scalar(int)>& solventInverseFormationVolumeFactor, const std::function<Scalar(int)>& solventInverseFormationVolumeFactor,

View File

@ -39,18 +39,6 @@ class StandardWellConnections
public: public:
StandardWellConnections(const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well); StandardWellConnections(const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well);
void computePressureDelta();
// TODO: not total sure whether it is a good idea to put this function here
// the major reason to put here is to avoid the usage of Wells struct
void computeDensities(const std::vector<Scalar>& perfComponentRates,
const std::vector<Scalar>& b_perf,
const std::vector<Scalar>& rsmax_perf,
const std::vector<Scalar>& rvmax_perf,
const std::vector<Scalar>& rvwmax_perf,
const std::vector<Scalar>& surf_dens_perf,
DeferredLogger& deferred_logger);
void computePropertiesForPressures(const WellState& well_state, void computePropertiesForPressures(const WellState& well_state,
const std::function<Scalar(int,int)>& getTemperature, const std::function<Scalar(int,int)>& getTemperature,
const std::function<Scalar(int)>& getSaltConcentration, const std::function<Scalar(int)>& getSaltConcentration,
@ -63,7 +51,8 @@ public:
std::vector<Scalar>& rvwmax_perf, std::vector<Scalar>& rvwmax_perf,
std::vector<Scalar>& surf_dens_perf) const; std::vector<Scalar>& surf_dens_perf) const;
void computeWellConnectionDensitesPressures(const WellState& well_state, //! \brief Compute connection properties (densities, pressure drop, ...)
void computeProperties(const WellState& well_state,
const std::function<Scalar(int,int)>& invB, const std::function<Scalar(int,int)>& invB,
const std::function<Scalar(int,int)>& mobility, const std::function<Scalar(int,int)>& mobility,
const std::function<Scalar(int)>& solventInverseFormationVolumeFactor, const std::function<Scalar(int)>& solventInverseFormationVolumeFactor,
@ -86,6 +75,18 @@ public:
{ return perf_pressure_diffs_[perf]; } { return perf_pressure_diffs_[perf]; }
private: private:
void computePressureDelta();
// TODO: not total sure whether it is a good idea to put this function here
// the major reason to put here is to avoid the usage of Wells struct
void computeDensities(const std::vector<Scalar>& perfComponentRates,
const std::vector<Scalar>& b_perf,
const std::vector<Scalar>& rsmax_perf,
const std::vector<Scalar>& rvmax_perf,
const std::vector<Scalar>& rvwmax_perf,
const std::vector<Scalar>& surf_dens_perf,
DeferredLogger& deferred_logger);
const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well_; //!< Reference to well interface const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well_; //!< Reference to well interface
std::vector<Scalar> perf_densities_; //!< densities of the fluid in each perforation std::vector<Scalar> perf_densities_; //!< densities of the fluid in each perforation

View File

@ -1470,7 +1470,7 @@ namespace Opm
return ebosSimulator.model().cachedIntensiveQuantities(cell_idx, 0)->solventMobility().value(); return ebosSimulator.model().cachedIntensiveQuantities(cell_idx, 0)->solventMobility().value();
}; };
this->connections_.computeWellConnectionDensitesPressures(well_state, this->connections_.computeProperties(well_state,
invB, invB,
mobility, mobility,
invFac, invFac,