GEOS
CompositionalMultiphaseBaseFields.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 TotalEnergies
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 GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONALMULTIPHASEBASEFIELDS_HPP_
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONALMULTIPHASEBASEFIELDS_HPP_
22 
23 #include "common/DataLayouts.hpp"
24 #include "mesh/MeshFields.hpp"
25 
26 namespace geos
27 {
31 namespace fields
32 {
33 
34 namespace flow
35 {
36 
37 using array2dLayoutPhase = array2d< real64, compflow::LAYOUT_PHASE >;
38 using array3dLayoutPhase_dC = array3d< real64, compflow::LAYOUT_PHASE_DC >;
39 using array2dLayoutComp = array2d< real64, compflow::LAYOUT_COMP >;
40 using array3dLayoutComp_dC = array3d< real64, compflow::LAYOUT_COMP_DC >;
41 using array3dLayoutPhaseComp = array3d< real64, compflow::LAYOUT_PHASE_COMP >;
42 
43 DECLARE_FIELD( globalCompDensity,
44  "globalCompDensity",
45  array2dLayoutComp,
46  0,
47  LEVEL_0,
48  WRITE_AND_READ,
49  "Global component density" );
50 
51 DECLARE_FIELD( globalCompDensity_n,
52  "globalCompDensity_n",
53  array2dLayoutComp,
54  0,
55  NOPLOT,
56  NO_WRITE,
57  "Global component density updates at the previous converged time step" );
58 
59 DECLARE_FIELD( globalCompDensity_k,
60  "globalCompDensity_k",
61  array2dLayoutComp,
62  0,
63  NOPLOT,
64  NO_WRITE,
65  "Global component density updates at the previous sequential iteration" );
66 
67 DECLARE_FIELD( globalCompFraction,
68  "globalCompFraction",
69  array2dLayoutComp,
70  0,
71  LEVEL_0,
72  WRITE_AND_READ,
73  "Global component fraction" );
74 
75 DECLARE_FIELD( globalCompFraction_n,
76  "globalCompFraction_n",
77  array2dLayoutComp,
78  0,
79  NOPLOT,
80  NO_WRITE,
81  "Global component fraction at the previous converged time step" );
82 
83 // may be needed later for sequential poromechanics implementation
84 //DECLARE_FIELD( globalCompFraction_k,
85 // "globalCompFraction_k",
86 // array2dLayoutComp,
87 // 0,
88 // NOPLOT,
89 // NO_WRITE,
90 // "Global component fraction updates at the previous sequential iteration" );
91 
92 DECLARE_FIELD( bcGlobalCompFraction,
93  "bcGlobalCompFraction",
94  array2dLayoutComp,
95  0,
96  NOPLOT,
97  WRITE_AND_READ,
98  "Boundary condition global component fraction" );
99 
100 DECLARE_FIELD( faceGlobalCompFraction,
101  "faceGlobalCompFraction",
102  array2dLayoutComp,
103  0,
104  LEVEL_0,
105  WRITE_AND_READ,
106  "Face global component fraction" );
107 
108 DECLARE_FIELD( dGlobalCompFraction_dGlobalCompDensity,
109  "dGlobalCompFraction_dGlobalCompDensity",
110  array3dLayoutComp_dC,
111  0,
112  NOPLOT,
113  NO_WRITE,
114  "Derivative of global component fraction with respect to component density" );
115 
116 DECLARE_FIELD( phaseVolumeFraction,
117  "phaseVolumeFraction",
118  array2dLayoutPhase,
119  0,
120  LEVEL_0,
121  WRITE_AND_READ,
122  "Phase volume fraction" );
123 
124 DECLARE_FIELD( dPhaseVolumeFraction,
125  "dPhaseVolumeFraction",
126  array3dLayoutPhase_dC,
127  0,
128  NOPLOT,
129  NO_WRITE,
130  "Derivative of phase volume fraction with respect to pressure, temperature, global component density" );
131 
132 DECLARE_FIELD( phaseMobility,
133  "phaseMobility",
134  array2dLayoutPhase,
135  0,
136  LEVEL_0,
137  WRITE_AND_READ,
138  "Phase mobility" );
139 
140 DECLARE_FIELD( dPhaseMobility,
141  "dPhaseMobility",
142  array3dLayoutPhase_dC,
143  0,
144  NOPLOT,
145  NO_WRITE,
146  "Derivative of phase volume fraction with respect to pressure, temperature, global component density" );
147 
148 // Face-based properties for boundary conditions
149 // These store constitutive properties evaluated at BC face conditions
150 DECLARE_FIELD( facePhaseMobility,
151  "facePhaseMobility",
152  array2dLayoutPhase,
153  0,
154  NOPLOT,
155  NO_WRITE,
156  "Phase mobility at boundary faces evaluated at BC conditions" );
157 
158 DECLARE_FIELD( facePhaseMassDensity,
159  "facePhaseMassDensity",
160  array2dLayoutPhase,
161  0,
162  NOPLOT,
163  NO_WRITE,
164  "Phase mass density at boundary faces evaluated at BC conditions" );
165 
166 DECLARE_FIELD( facePhaseCompFraction,
167  "facePhaseCompFraction",
168  array3dLayoutPhaseComp,
169  0,
170  NOPLOT,
171  NO_WRITE,
172  "Phase component fraction at boundary faces evaluated at BC conditions" );
173 
174 // this is needed for time step selector
175 DECLARE_FIELD( phaseVolumeFraction_n,
176  "phaseVolumeFraction_n",
177  array2dLayoutPhase,
178  0,
179  NOPLOT,
180  WRITE_AND_READ,
181  "Phase volume fraction at the previous converged time step" );
182 
183 DECLARE_FIELD( phaseOutflux,
184  "phaseOutflux",
185  array2dLayoutPhase,
186  0,
187  NOPLOT,
188  NO_WRITE,
189  "Phase outflux" );
190 
191 DECLARE_FIELD( componentOutflux,
192  "componentOutflux",
193  array2dLayoutComp,
194  0,
195  NOPLOT,
196  NO_WRITE,
197  "Component outflux" );
198 
199 DECLARE_FIELD( phaseCFLNumber,
200  "phaseCFLNumber",
201  array1d< real64 >,
202  0,
203  LEVEL_0,
204  NO_WRITE,
205  "Phase CFL number" );
206 
207 DECLARE_FIELD( componentCFLNumber,
208  "componentCFLNumber",
209  array1d< real64 >,
210  0,
211  LEVEL_0,
212  NO_WRITE,
213  "Component CFL number" );
214 
215 DECLARE_FIELD( globalCompDensityScalingFactor,
216  "globalCompDensityScalingFactor",
217  array1d< real64 >,
218  1,
219  NOPLOT,
220  NO_WRITE,
221  "Scaling factors for global component densities" );
222 
223 DECLARE_FIELD( globalCompFractionScalingFactor,
224  "globalCompFractionScalingFactor",
225  array1d< real64 >,
226  1,
227  NOPLOT,
228  NO_WRITE,
229  "Scaling factors for global component fractions" );
230 
231 DECLARE_FIELD( compAmount,
232  "compAmount",
233  array2dLayoutComp,
234  0,
235  LEVEL_0,
236  WRITE_AND_READ,
237  "Component amount" );
238 
239 DECLARE_FIELD( compAmount_n,
240  "compAmount_n",
241  array2dLayoutComp,
242  0,
243  LEVEL_0,
244  WRITE_AND_READ,
245  "Component amount at the previous converged time step" );
246 
247 }
248 
249 }
250 
251 }
252 
253 #endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONALMULTIPHASEBASEFIELDS_HPP_
#define DECLARE_FIELD(NAME, KEY, TYPE, DEFAULT, PLOTLEVEL, RESTARTFLAG, DESCRIPTION)
Generates a traits struct.
Definition: MeshFields.hpp:39