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( faceGlobalCompFraction,
93  "faceGlobalCompFraction",
94  array2dLayoutComp,
95  0,
96  LEVEL_0,
97  WRITE_AND_READ,
98  "Face global component fraction" );
99 
100 DECLARE_FIELD( dGlobalCompFraction_dGlobalCompDensity,
101  "dGlobalCompFraction_dGlobalCompDensity",
102  array3dLayoutComp_dC,
103  0,
104  NOPLOT,
105  NO_WRITE,
106  "Derivative of global component fraction with respect to component density" );
107 
108 DECLARE_FIELD( phaseVolumeFraction,
109  "phaseVolumeFraction",
110  array2dLayoutPhase,
111  0,
112  LEVEL_0,
113  WRITE_AND_READ,
114  "Phase volume fraction" );
115 
116 DECLARE_FIELD( dPhaseVolumeFraction,
117  "dPhaseVolumeFraction",
118  array3dLayoutPhase_dC,
119  0,
120  NOPLOT,
121  NO_WRITE,
122  "Derivative of phase volume fraction with respect to pressure, temperature, global component density" );
123 
124 DECLARE_FIELD( phaseMobility,
125  "phaseMobility",
126  array2dLayoutPhase,
127  0,
128  LEVEL_0,
129  WRITE_AND_READ,
130  "Phase mobility" );
131 
132 DECLARE_FIELD( dPhaseMobility,
133  "dPhaseMobility",
134  array3dLayoutPhase_dC,
135  0,
136  NOPLOT,
137  NO_WRITE,
138  "Derivative of phase volume fraction with respect to pressure, temperature, global component density" );
139 
140 // this is needed for time step selector
141 DECLARE_FIELD( phaseVolumeFraction_n,
142  "phaseVolumeFraction_n",
143  array2dLayoutPhase,
144  0,
145  NOPLOT,
146  WRITE_AND_READ,
147  "Phase volume fraction at the previous converged time step" );
148 
149 DECLARE_FIELD( phaseOutflux,
150  "phaseOutflux",
151  array2dLayoutPhase,
152  0,
153  NOPLOT,
154  NO_WRITE,
155  "Phase outflux" );
156 
157 DECLARE_FIELD( componentOutflux,
158  "componentOutflux",
159  array2dLayoutComp,
160  0,
161  NOPLOT,
162  NO_WRITE,
163  "Component outflux" );
164 
165 DECLARE_FIELD( phaseCFLNumber,
166  "phaseCFLNumber",
167  array1d< real64 >,
168  0,
169  LEVEL_0,
170  NO_WRITE,
171  "Phase CFL number" );
172 
173 DECLARE_FIELD( componentCFLNumber,
174  "componentCFLNumber",
175  array1d< real64 >,
176  0,
177  LEVEL_0,
178  NO_WRITE,
179  "Component CFL number" );
180 
181 DECLARE_FIELD( globalCompDensityScalingFactor,
182  "globalCompDensityScalingFactor",
183  array1d< real64 >,
184  1,
185  NOPLOT,
186  NO_WRITE,
187  "Scaling factors for global component densities" );
188 
189 DECLARE_FIELD( globalCompFractionScalingFactor,
190  "globalCompFractionScalingFactor",
191  array1d< real64 >,
192  1,
193  NOPLOT,
194  NO_WRITE,
195  "Scaling factors for global component fractions" );
196 
197 DECLARE_FIELD( compAmount,
198  "compAmount",
199  array2dLayoutComp,
200  0,
201  LEVEL_0,
202  WRITE_AND_READ,
203  "Component amount" );
204 
205 DECLARE_FIELD( compAmount_n,
206  "compAmount_n",
207  array2dLayoutComp,
208  0,
209  LEVEL_0,
210  WRITE_AND_READ,
211  "Component amount at the previous converged time step" );
212 
213 }
214 
215 }
216 
217 }
218 
219 #endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONALMULTIPHASEBASEFIELDS_HPP_
#define DECLARE_FIELD(NAME, KEY, TYPE, DEFAULT, PLOTLEVEL, RESTARTFLAG, DESCRIPTION)
Generates a traits struct.
Definition: MeshFields.hpp:39