mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Report Connection Level Fracturing Statistics to I/O Layer
Populates the new data::Connection::fract data member.
This commit is contained in:
parent
d5e84cf9c7
commit
4b096ed142
@ -83,6 +83,7 @@ PerfData<Scalar> PerfData<Scalar>::serializationTestObject()
|
||||
result.skin_pressure = {27.0, 28.0};
|
||||
result.water_velocity = {29.0, 30.0};
|
||||
result.filtrate_data = ConnFiltrateData<Scalar>::serializationTestObject();
|
||||
result.connFracStatistics.assign(3, ConnFracStatistics<Scalar>::serializationTestObject());
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -124,6 +125,7 @@ bool PerfData<Scalar>::try_assign(const PerfData& other)
|
||||
this->skin_pressure = other.skin_pressure;
|
||||
this->water_velocity = other.water_velocity;
|
||||
this->filtrate_data = other.filtrate_data;
|
||||
this->connFracStatistics = other.connFracStatistics;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -152,6 +154,7 @@ bool PerfData<Scalar>::operator==(const PerfData& rhs) const
|
||||
&& (this->skin_pressure == rhs.skin_pressure)
|
||||
&& (this->water_velocity == rhs.water_velocity)
|
||||
&& (this->filtrate_data == rhs.filtrate_data)
|
||||
&& (this->connFracStatistics == rhs.connFracStatistics)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define OPM_PERFDATA_HEADER_INCLUDED
|
||||
|
||||
#include <opm/simulators/wells/ConnFiltrateData.hpp>
|
||||
#include <opm/simulators/wells/ConnFracStatistics.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
@ -71,6 +72,7 @@ public:
|
||||
serializer(skin_pressure);
|
||||
serializer(water_velocity);
|
||||
serializer(filtrate_data);
|
||||
serializer(connFracStatistics);
|
||||
}
|
||||
|
||||
bool operator==(const PerfData&) const;
|
||||
@ -105,6 +107,7 @@ public:
|
||||
std::vector<Scalar> water_velocity{};
|
||||
|
||||
ConnFiltrateData<Scalar> filtrate_data{};
|
||||
std::vector<ConnFracStatistics<Scalar>> connFracStatistics{};
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -31,8 +31,10 @@
|
||||
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
|
||||
#include <opm/simulators/wells/ConnFracStatistics.hpp>
|
||||
#include <opm/simulators/wells/ParallelWellInfo.hpp>
|
||||
#include <opm/simulators/wells/PerforationData.hpp>
|
||||
#include <opm/simulators/wells/RunningStatistics.hpp>
|
||||
|
||||
#include <opm/simulators/utils/ParallelCommunication.hpp>
|
||||
|
||||
@ -639,6 +641,11 @@ void WellState<Scalar>::reportConnections(std::vector<data::Connection>& connect
|
||||
if (! ws.producer) {
|
||||
this->reportConnectionFilterCake(well_index, connections);
|
||||
}
|
||||
|
||||
if (! perf_data.connFracStatistics.empty()) {
|
||||
this->reportFractureStatistics(perf_data.connFracStatistics,
|
||||
connections);
|
||||
}
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
@ -1134,6 +1141,43 @@ reportConnectionFilterCake(const std::size_t well_index,
|
||||
}
|
||||
}
|
||||
|
||||
template <class Scalar>
|
||||
void WellState<Scalar>::
|
||||
reportFractureStatistics(const std::vector<ConnFracStatistics<Scalar>>& stats,
|
||||
std::vector<data::Connection>& connections) const
|
||||
{
|
||||
using Quantity = typename ConnFracStatistics<Scalar>::Quantity;
|
||||
using StatResult = data::ConnectionFracturing;
|
||||
|
||||
auto connIx = 0*connections.size();
|
||||
for (auto& connection : connections) {
|
||||
for (const auto& [q, result] : {
|
||||
std::pair { Quantity::Pressure, &StatResult::press },
|
||||
std::pair { Quantity::FlowRate, &StatResult::rate },
|
||||
std::pair { Quantity::Width , &StatResult::width },
|
||||
})
|
||||
{
|
||||
const auto& stat = stats[connIx].statistics(q);
|
||||
|
||||
if (stat.sampleSize() > 0) {
|
||||
auto& x = connection.fract.*result;
|
||||
|
||||
x.avg = stat.mean();
|
||||
x.min = stat.min();
|
||||
x.max = stat.max();
|
||||
|
||||
if (const auto stdev = stat.stdev(); stdev.has_value()) {
|
||||
x.stdev = *stdev;
|
||||
}
|
||||
|
||||
connection.fract.numCells = stat.sampleSize();
|
||||
}
|
||||
}
|
||||
|
||||
++connIx;
|
||||
}
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
bool WellState<Scalar>::wellIsOwned(std::size_t well_index,
|
||||
[[maybe_unused]] const std::string& wellName) const
|
||||
|
@ -55,6 +55,7 @@ namespace Opm
|
||||
|
||||
template<class Scalar> class ParallelWellInfo;
|
||||
template<class Scalar> struct PerforationData;
|
||||
template<class Scalar> class ConnFracStatistics;
|
||||
class Schedule;
|
||||
enum class WellStatus;
|
||||
|
||||
@ -456,6 +457,9 @@ private:
|
||||
|
||||
void reportConnectionFilterCake(const std::size_t well_index,
|
||||
std::vector<data::Connection>& connections) const;
|
||||
|
||||
void reportFractureStatistics(const std::vector<ConnFracStatistics<Scalar>>& stats,
|
||||
std::vector<data::Connection>& connections) const;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
Loading…
Reference in New Issue
Block a user