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