|
opm-common
|
Computational engine for calculating summary vectors (2D curves as a function of time) and writing these values to the summary file. More...
#include <Summary.hpp>
Classes | |
| class | SummaryImplementation |
Public Types | |
| using | GlobalProcessParameters = std::map<std::string, double> |
| Collection of named scalar quantities such as field-wide pressures, rates, and volumes, as well as performance related quantities such as CPU time, number of linear iterations &c. | |
| using | RegionParameters = std::map<std::string, std::vector<double>> |
| Collection of named per-region quantities. | |
| using | BlockValues = std::map<std::pair<std::string, int>, double> |
| Collection of per-block (cell) quantities. | |
| using | InterRegFlowValues = std::unordered_map<std::string, data::InterRegFlowMap> |
| Collection of named inter-region flows (rates and cumulatives). | |
Public Member Functions | |
| Summary (SummaryConfig &sumcfg, const EclipseState &es, const EclipseGrid &grid, const Schedule &sched, const std::string &basename="", const bool writeEsmry=false) | |
| Constructor. | |
| ~Summary () | |
| Destructor. | |
| void | add_timestep (const SummaryState &st, const int report_step, const int ministep_id, const bool isSubstep) |
| Linearise summary values into internal buffer for output purposes. | |
| void | eval (SummaryState &summary_state, const int report_step, const double secs_elapsed, const data::Wells &well_solution, const data::WellBlockAveragePressures &wbp, const data::GroupAndNetworkValues &group_and_nwrk_solution, const GlobalProcessParameters &single_values, const std::optional< Inplace > &initial_inplace, const Inplace &inplace, const RegionParameters ®ion_values={}, const BlockValues &block_values={}, const data::Aquifers &aquifers_values={}, const InterRegFlowValues &interreg_flows={}) const |
| Calculate summary vector values. | |
| void | write (const bool is_final_summary=false) const |
| Write all current summary vector buffers to output files. | |
Computational engine for calculating summary vectors (2D curves as a function of time) and writing these values to the summary file.
Supports formatted and unformatted, unified and separate summary files.
| using Opm::out::Summary::BlockValues = std::map<std::pair<std::string, int>, double> |
Collection of per-block (cell) quantities.
Identifier associates a summary keyword and a block ID (linearised Cartesian cell index).
| using Opm::out::Summary::InterRegFlowValues = std::unordered_map<std::string, data::InterRegFlowMap> |
Collection of named inter-region flows (rates and cumulatives).
Name may or may not include a region set identifier.
| using Opm::out::Summary::RegionParameters = std::map<std::string, std::vector<double>> |
Collection of named per-region quantities.
Name may or may not include a region set identifier.
| Opm::out::Summary::Summary | ( | SummaryConfig & | sumcfg, |
| const EclipseState & | es, | ||
| const EclipseGrid & | grid, | ||
| const Schedule & | sched, | ||
| const std::string & | basename = "", | ||
| const bool | writeEsmry = false ) |
Constructor.
| [in,out] | sumcfg | On input, the full collection of summary vectors requested in the run's SUMMARY section. On exit, also contains those additional summary vectors needed to evaluate any UDQ defining expressions. |
| [in] | es | Run's static parameters such as region definitions. The Summary object retains a reference to this object, so its lifetime should not exceed that of the EclipseState object. |
| [in] | grid | Run's active cells. The Summary object retains a reference to this object, so its lifetime should not exceed that of the EclipseGrid object. |
| [in] | sched | Run's dynamic objects. The Summary object retains a reference to this object, so its lifetime should not exceed that of the Schedule object. |
| [in] | basename | Run's base name. Needed to create names of summary output files. |
| [in] | writeEsmry | Whether or not to additionally create a "transposed" .ESMRY output file during the simulation run. ESMRY files typically load faster into post-processing tools such as qsummary and ResInsight than traditional SMSPEC/UNSMRY files, especially if the user only needs to view a small number of vectors. On the other hand, ESMRY files typically require more memory while writing. |
| Opm::out::Summary::~Summary | ( | ) |
Destructor.
Needed for PIMPL idiom.
| void Opm::out::Summary::add_timestep | ( | const SummaryState & | st, |
| const int | report_step, | ||
| const int | ministep_id, | ||
| const bool | isSubstep ) |
Linearise summary values into internal buffer for output purposes.
| [in] | st | Summary values from most recent call to eval(). Source object from which to retrieve the values that go into the output buffer. |
| [in] | report_step | One-based report step index for which to create output. This is the number that gets incorporated into the file extension of "separate" summary output files (i.e., .S000n). Report_step=0 represents time zero. |
| [in] | ministep_id | Zero based count of time steps performed. |
| [in] | isSubstep | Whether or not we're being called in the middle of a report step. |
| void Opm::out::Summary::eval | ( | SummaryState & | summary_state, |
| const int | report_step, | ||
| const double | secs_elapsed, | ||
| const data::Wells & | well_solution, | ||
| const data::WellBlockAveragePressures & | wbp, | ||
| const data::GroupAndNetworkValues & | group_and_nwrk_solution, | ||
| const GlobalProcessParameters & | single_values, | ||
| const std::optional< Inplace > & | initial_inplace, | ||
| const Inplace & | inplace, | ||
| const RegionParameters & | region_values = {}, | ||
| const BlockValues & | block_values = {}, | ||
| const data::Aquifers & | aquifers_values = {}, | ||
| const InterRegFlowValues & | interreg_flows = {} ) const |
Calculate summary vector values.
| [in,out] | summary_state | Summary vector values. On exit, holds updated values for all vectors that are not user-defined quantities. UDQs are calculated in UDQConfig::eval() which should be called shortly after calling Summary::eval(). |
| [in] | report_step | One-based report step index for which to create output. This is the number that gets incorporated into the file extension of "separate" summary output files (i.e., .S000n). Report_step=0 represents time zero. |
| [in] | secs_elapsed | Elapsed physical time in seconds since start of simulation. |
| [in] | well_solution | Collection of per-well, per-connection, and per-segment solution variables. |
| [in] | wbp | Well-block average pressures inferred from WPAVE (or WWPAVE) settings. |
| [in] | group_and_nwrk_solution | Constraints, guide rates and nodal pressures for the extended network model. |
| [in] | single_values | named scalar quantities such as field-wide pressures, rates, and volumes, as well as performance related quantities such as CPU time, number of linear iterations &c. |
| [in] | initial_inplace | Volumes initially in place. Needed to calculate recovery factors. Nullopt if such initial volumes are not available. |
| [in] | inplace | Current volumes in place. |
| [in] | region_values | Per-region quantities. Empty if such values do not exist–typically in unit tests or if per-region summary output has not been requested. |
| [in] | block_values | Per-block (cell) quantities. Empty if such values do not exist (e.g., in unit tests) or if no per-block summary vectors have been requested. |
| [in] | aquifers_values | Flow rates, cumulatives, and pressures attributed to aquifers–both analytic and numerical aquifers. Empty if such values do not exist (e.g., in unit tests) or if per-aquifer summary vectors have not been requested. |
| [in] | interreg_flows | Inter-region flows (rates and cumulatives). Empty if no such values exist (e.g., in unit tests) or if no such summary vectors have been requested. |
| void Opm::out::Summary::write | ( | const bool | is_final_summary = false | ) | const |
Write all current summary vector buffers to output files.
| [in] | is_final_summary | Whether or not this is the final summary output request. When set to true, this guarantees that runs which request the creation of a "transposed" .ESMRY output file will create ESMRY file output containing all summary vector values. |