GEOS
CompositionalMultiphaseStatistics.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 Total, S.A
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONALMULTIPHASESTATISTICS_HPP_
21 #define SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONALMULTIPHASESTATISTICS_HPP_
22 
24 
25 namespace geos
26 {
27 
28 class CompositionalMultiphaseBase;
29 
35 class CompositionalMultiphaseStatistics : public FieldStatisticsBase< CompositionalMultiphaseBase >
36 {
37 public:
38 
44  CompositionalMultiphaseStatistics( const string & name,
45  Group * const parent );
46 
48  static string catalogName() { return "CompositionalMultiphaseStatistics"; }
49 
57  virtual bool execute( real64 const time_n,
58  real64 const dt,
59  integer const cycleNumber,
60  integer const eventCounter,
61  real64 const eventProgress,
62  DomainPartition & domain ) override;
63 
66 private:
67 
69 
73  struct viewKeyStruct
74  {
76  constexpr static char const * computeCFLNumbersString() { return "computeCFLNumbers"; }
78  constexpr static char const * computeRegionStatisticsString() { return "computeRegionStatistics"; }
80  constexpr static char const * regionStatisticsString() { return "regionStatistics"; }
82  constexpr static char const * relpermThresholdString() { return "relpermThreshold"; }
83  };
84 
85  struct RegionStatistics
86  {
88  real64 averagePressure;
90  real64 minPressure;
92  real64 maxPressure;
93 
95  real64 minDeltaPressure;
97  real64 maxDeltaPressure;
98 
100  real64 averageTemperature;
102  real64 minTemperature;
104  real64 maxTemperature;
105 
107  real64 totalPoreVolume;
109  real64 totalUncompactedPoreVolume;
111  array1d< real64 > phasePoreVolume;
112 
114  array1d< real64 > phaseMass;
116  array1d< real64 > trappedPhaseMass;
118  array1d< real64 > immobilePhaseMass;
120  array2d< real64 > componentMass;
121 
122 
123  };
124 
131  void computeRegionStatistics( real64 const time,
132  MeshLevel & mesh,
133  arrayView1d< string const > const & regionNames ) const;
134 
141  void computeCFLNumbers( real64 const time,
142  real64 const dt,
143  DomainPartition & domain ) const;
144 
145  void postInputInitialization() override;
146 
147  void registerDataOnMesh( Group & meshBodies ) override;
148 
150  integer m_computeCFLNumbers;
151 
153  integer m_computeRegionStatistics;
154 
156  real64 m_relpermThreshold;
157 
158 };
159 
160 
161 } /* namespace geos */
162 
163 #endif /* SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONALMULTIPHASESTATISTICS_HPP_ */
CompositionalMultiphaseStatistics(const string &name, Group *const parent)
Constructor for the statistics class.
static string catalogName()
Accessor for the catalog name.
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
Group()=delete
Deleted default constructor.
virtual bool execute(real64 const time_n, real64 const dt, integer const cycleNumber, integer const eventCounter, real64 const eventProgress, DomainPartition &domain) override
Main extension point of executable targets.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82