Theseus
Compressible flow solver
Loading...
Searching...
No Matches
LTEEOS.hpp
Go to the documentation of this file.
1// Copyright (c) 2025-2026 Board of Trustees of the University of Illinois
2//
3// This file is part of Theseus.
4//
5// SPDX-License-Identifier: BSD-3-Clause
6#pragma once
7
8#include <cmath>
9#include "Physics.hpp"
10#include "GasState.hpp"
11#include "LTETable.hpp"
12
13using namespace Theseus::LTETable;
14
15namespace Theseus
16{
17
18 // ============================================================================
19 // LTEGasEOS: Gas-mixture in local thermodynamic equilibrium
20 // ============================================================================
21 struct LTEGasEOS
22 {
23
24 // ---- helpers on conservative state --------------------------------------
25 template<typename StateView>
26 MFEM_HOST_DEVICE
27 inline mfem::real_t R_gas(const PhysicsConstants &phys, const StateLayout &L,
28 const StateView &S, const LTETables &lteTables) const
29 {
30 return property_lookup(lteTables.L.R_eq_idx, phys, L, S, lteTables);
31 }
32
33 template<typename StateView>
34 MFEM_HOST_DEVICE
35 inline mfem::real_t density(const PhysicsConstants &phys, const StateLayout &L,
36 const StateView &S, const LTETables &lteTables) const
37 {
38 return S.mass(L); // this is "rho" (mass density)
39 }
40
41 template<typename StateView>
42 MFEM_HOST_DEVICE
43 inline mfem::real_t rhoE(const PhysicsConstants &phys, const StateLayout &L,
44 const StateView &S) const
45 {
46 return S.energy(L);
47 }
48
49 template<typename StateView>
50 MFEM_HOST_DEVICE
51 inline mfem::real_t momentum_sq(const PhysicsConstants &phys, const StateLayout &L,
52 const StateView &S) const
53 {
54 const int dim = L.dim; // uses state layout
55 mfem::real_t m2 = 0;
56 for (int d = 0; d < dim; ++d)
57 {
58 const mfem::real_t m = S.momentum(L,d);
59 m2 += m * m;
60 }
61 return m2;
62 }
63
64 template<typename StateView>
65 MFEM_HOST_DEVICE
66 inline mfem::real_t kinetic_energy_density(const PhysicsConstants &phys, const StateLayout &L,
67 const StateView &S, const LTETables &lteTables) const
68 {
69 // 0.5 * rho * |u|^2 = 0.5 * |rho*u|^2 / rho
70 const mfem::real_t rho = density(phys, L, S, lteTables);
71 const mfem::real_t m2 = momentum_sq(phys, L, S);
72 return 0.5 * m2 / rho;
73 }
74
75 template<typename StateView>
76 MFEM_HOST_DEVICE
77 inline mfem::real_t internal_energy_density(const PhysicsConstants &phys, const StateLayout &L,
78 const StateView &S, const LTETables &lteTables) const
79 {
80 // rho*e = rho*E - 0.5*rho*|u|^2
81 return rhoE(phys, L, S) - kinetic_energy_density(phys, L, S, lteTables);
82 }
83
84 template<typename StateView>
85 MFEM_HOST_DEVICE
86 inline mfem::real_t internal_energy_from_pressure(const PhysicsConstants &phys, const StateLayout &L,
87 const StateView &S, mfem::real_t pressure_target,
88 const LTETables &lteTables) const
89 {
90 mfem::real_t U[Theseus::MAXEQ];
91 PointStateViewRW S_dummy(U);
92 S_dummy.set_mass(L, S.mass(L));
93
94 for(int idim = 0; idim < L.dim; idim++)
95 {
96 S_dummy.set_momentum(L, idim, S.momentum(L, idim));
97 }
98 S_dummy.set_energy(L, S.energy(L));
99
100 // Secant Method to find internal energy that matches a target pressure
101 mfem::real_t tol = 1e-12;
102 mfem::real_t denom = 0.0;
103 mfem::real_t ie_old = pressure_target * 3; // initial guess for internal energy (CL NOTE : make sure this is inside the table range)
104 mfem::real_t ie_new = ie_old*1.01 + tol;
105
106 mfem::real_t ke = kinetic_energy_density(phys, L, S, lteTables);
107
108 mfem::real_t f_old, f_new, ie_update;
109
110 for(int iter = 0; iter < 100; iter++)
111 {
112 S_dummy.set_energy(L, ie_old+ke);
113 f_old = property_lookup(lteTables.L.P_idx, phys, L, S_dummy, lteTables) - pressure_target;
114
115 S_dummy.set_energy(L, ie_new+ke);
116 f_new = property_lookup(lteTables.L.P_idx, phys, L, S_dummy, lteTables) - pressure_target;
117
118 denom = f_new - f_old;
119
120 if( Theseus::Kernels::rabs(f_new) < tol || Theseus::Kernels::rabs(denom) < 1e-12)
121 {
122 break;
123 }
124
125 ie_update = ie_new - f_new * (ie_new - ie_old) / denom;
126
127 ie_old = ie_new;
128 ie_new = ie_update;
129 if(iter == 99){
130 MFEM_ABORT("Secant method did not converge in internal_energy_from_pressure");
131 }
132 }
133 return ie_new;
134 }
135
136 template<typename StateView>
137 MFEM_HOST_DEVICE
138 inline mfem::real_t specific_internal_energy(const PhysicsConstants &phys, const StateLayout &L,
139 const StateView &S, const LTETables &lteTables) const
140 {
141 // e = (rho*e) / rho
142 const mfem::real_t rho = density(phys, L, S, lteTables);
143 const mfem::real_t rhoe = internal_energy_density(phys, L, S, lteTables);
144 return rhoe / rho;
145 }
146
147 // ---- primary EOS interface ----------------------------------------------
148
149 template<typename StateView>
150 MFEM_HOST_DEVICE
151 inline mfem::real_t pressure(const PhysicsConstants &phys, const StateLayout &L,
152 const StateView &S, const LTETables &lteTables) const
153 {
154 return property_lookup(lteTables.L.P_idx, phys, L, S, lteTables);
155 }
156
157 template<typename StateView>
158 MFEM_HOST_DEVICE
159 inline mfem::real_t gamma(const PhysicsConstants &phys, const StateLayout &L,
160 const StateView &S, const LTETables &lteTables) const
161 {
162 return property_lookup(lteTables.L.gamma_eq_idx, phys, L, S, lteTables);
163 }
164
165 template<typename StateView>
166 MFEM_HOST_DEVICE
167 inline mfem::real_t temperature(const PhysicsConstants &phys, const StateLayout &L,
168 const StateView &S, const LTETables &lteTables) const
169 {
170 return temp_from_internal_energy(phys, L, S, lteTables);
171 }
172
173 template<typename StateView>
174 MFEM_HOST_DEVICE
175 inline void grad_temperature(const PhysicsConstants &phys, const StateLayout &L,
176 const StateView &S, const mfem::real_t *grad_rho,
177 const mfem::real_t *grad_p, mfem::real_t *grad_t,
178 const LTETables &lteTables) const
179 {
180 for(int i = 0; i < L.dim; i++){
181 grad_t[i] = grad_p[i]; // CL NOTE : we store T_xi in contiguous gradient array for LTE (W=[rho, u, v, w , T])
182 }
183 }
184
185 template<typename StateView>
186 MFEM_HOST_DEVICE
187 inline mfem::real_t sound_speed(const PhysicsConstants &phys, const StateLayout &L,
188 const StateView &S, const LTETables &lteTables) const
189 {
190 return property_lookup(lteTables.L.c_idx, phys, L, S, lteTables);
191 }
192
193 template<typename StateView>
194 MFEM_HOST_DEVICE
195 inline mfem::real_t cv(const PhysicsConstants &phys, const StateLayout &L,
196 const StateView &S, const LTETables &lteTables) const
197 {
198 return property_lookup(lteTables.L.cv_idx, phys, L, S, lteTables);
199 }
200
201 template<typename StateView>
202 MFEM_HOST_DEVICE
203 inline mfem::real_t cp(const PhysicsConstants &phys, const StateLayout &L,
204 const StateView &S, const LTETables &lteTables) const
205 {
206 return property_lookup(lteTables.L.cp_idx, phys, L, S, lteTables);
207 }
208
209 template<typename StateView>
210 MFEM_HOST_DEVICE
211 inline mfem::real_t entropy(const PhysicsConstants &phys, const StateLayout &L,
212 const StateView &S, const LTETables &lteTables) const
213 {
214 MFEM_ABORT("CL ALERT : Dont have it in plato tables and also not needed");
215 return 0.0;
216 }
217
218 template<typename InStateView, typename OutStateView>
219 MFEM_HOST_DEVICE
220 inline void entropy_state(const PhysicsConstants &phys, const StateLayout &L,
221 const InStateView &S, OutStateView &E,
222 const LTETables &lteTables) const
223 {
224 const mfem::real_t T = temperature(phys, L, S, lteTables);
225 const mfem::real_t beta = 1/T;
226 const mfem::real_t ent_1 = 0.0;
227
228 E.set_mass(L, ent_1);
229 int dim = L.dim;
230 for(int idim = 0;idim < dim;idim++){
231 E.set_momentum(L, idim, beta * S.velocity(L, idim));
232 }
233 E.set_energy(L, -beta);
234 }
235
236 template<typename InStateView, typename OutStateView>
237 MFEM_HOST_DEVICE
238 inline void grad_entropy_to_grad_prim(const PhysicsConstants &phys, const StateLayout &L,
239 const InStateView &S, const InStateView &dE,
240 OutStateView &dPrim, const LTETables &lteTables) const
241 {
242
243 const mfem::real_t T = temperature(phys, L, S, lteTables);
244
245 dPrim.set_mass(L, 0.0); // CL NOTE : won't be using density gradient (if W = [rho, u, v, w , T])
246 int dim = L.dim;
247 for(int i=0; i < dim; i++)
248 {
249 dPrim.set_momentum(L, i, dE.momentum(L, i)*T + T*S.velocity(L, i)*dE.energy(L));
250 }
251 dPrim.set_energy(L, T*T*dE.energy(L));
252 }
253
254 template<typename InStateView, typename OutStateView>
255 MFEM_HOST_DEVICE
256 inline void entropy_to_conserved(const PhysicsConstants &phys, const StateLayout &L,
257 const InStateView &Se, OutStateView &Sc,
258 const LTETables &lteTables) const
259 {
260 std::cerr<< " CL ALERT : Not functional in LTE yet "<<std::endl;
261 }
262
263 template<typename InStateView, typename OutStateView>
264 inline void primitive_to_conserved(const PhysicsConstants &phys, const StateLayout &L,
265 const InStateView &prim, OutStateView &cons,
266 const LTETables &lteTables) const
267 {
268 const mfem::real_t rho = prim.mass(L);
269 const int dim = L.dim;
270 mfem::real_t v2 = 0.0;
271
272 cons.set_mass(L, rho);
273 for(int d = 0; d < dim; d++)
274 {
275 cons.set_momentum(L, d, rho*prim.velocity(L, d));
276 v2 += prim.velocity(L,d)*prim.velocity(L,d);
277 }
278 mfem::real_t rhoe = internal_energy_from_pressure(phys, L, cons, prim.pressure(L), lteTables);
279 cons.set_energy(L, rhoe + 0.5 * rho * v2);
280 }
281
282 // TODO: Consider whether this is needed/convenient
283 // It *can be* nice to have here, but kind of out-of-place
284 template<typename StateView>
285 MFEM_HOST_DEVICE
286 inline void velocity(const PhysicsConstants &phys, const StateLayout &L,
287 const StateView &S, mfem::real_t u[3], const LTETables &lteTables) const
288 {
289 const int dim = L.dim;
290 for (int d = 0; d < dim; ++d)
291 {
292 u[d] = S.velocity(L, d);
293 }
294 for (int d = dim; d < 3; ++d)
295 {
296 u[d] = mfem::real_t(0);
297 }
298 }
299
300 template<typename StateView>
301 MFEM_HOST_DEVICE
302 inline mfem::real_t property_lookup(int property_idx, const PhysicsConstants &phys,
303 const StateLayout &L, const StateView &S,
304 const LTETables &lteTables) const
305 {
306 mfem::real_t T = temp_from_internal_energy(phys, L, S, lteTables);
307 return biinterp_lte_table(property_idx, phys, L, S, T, lteTables);
308 }
309
310 template<typename StateView>
311 MFEM_HOST_DEVICE
312 inline mfem::real_t temp_from_internal_energy(const PhysicsConstants &phys, const StateLayout &L,
313 const StateView &S, const LTETables &lteTables) const
314 {
315 mfem::real_t rho = density(phys, L, S, lteTables);
316 mfem::real_t e = specific_internal_energy(phys, L, S, lteTables);
317 mfem::real_t T = biinterp_inverse_table(phys, L, S, lteTables);
318
319 mfem::real_t tol = 1e-12;
320 mfem::real_t res = 1;
321
322 int iter = 0;
323
324 while(res > tol)
325 {
326 mfem::real_t e_guess = biinterp_lte_table(lteTables.L.e_idx, phys, L, S, T, lteTables);
327 mfem::real_t cv = biinterp_lte_table(lteTables.L.cv_idx, phys, L, S, T, lteTables);
328
329 res = (e - e_guess)/cv;
330
331 T = T + res;
332 res = Theseus::Kernels::rabs(res)/T;
333
334 iter++;
335 if(iter > 100)
336 {
337#ifdef __CUDA_ARCH__
338 printf("Newton method did not converge in temp_from_internal_energy");
339 asm("trap;");
340#else
341 MFEM_ABORT("Newton method did not converge in temp_from_internal_energy");
342#endif
343 }
344 }
345
346 return T;
347 }
348
349 template<typename StateView>
350 MFEM_HOST_DEVICE
351 inline mfem::real_t biinterp_inverse_table(const PhysicsConstants &phys, const StateLayout &L,
352 const StateView &S, const LTETables &lteTables) const
353 {
354 /*
355 * Q01--------Q11
356 * | |
357 * | |
358 * | |
359 * Q00--------Q10
360 */
361
362 // Point rho and e values
363 mfem::real_t rho = density(phys, L, S, lteTables);
364 mfem::real_t e = specific_internal_energy(phys, L, S, lteTables);
365
366 // Get the lower and upper x and y indices of the cell
367 int l_x = hunt(lteTables.tables.rho_grid, lteTables.L.nx, rho, 0);
368 int l_y = hunt(lteTables.tables.e_grid, lteTables.L.ny, e, 0);
369 int u_x = l_x + 1 , u_y = l_y + 1;
370
371 if(l_x < 0 || u_x >= lteTables.L.nx || l_y < 0 || u_y >= lteTables.L.ny)
372 {
373#ifdef __CUDA_ARCH__
374 printf(" CL ALERT : Out of bounds in LTE table lookup! \n");
375 printf("l_x : %d l_y : %d \n", l_x, l_y);
376 printf("rho : %e < %e < %e \n", lteTables.tables.rho_grid[0],
377 rho, lteTables.tables.rho_grid[lteTables.L.nx-1]);
378 printf("e : %e < %e < %e \n", lteTables.tables.e_grid[0],
379 e, lteTables.tables.e_grid[lteTables.L.ny-1]);
380 asm("trap;");
381#else
382 std::cout << " CL ALERT : Out of bounds in LTE table lookup! "<<std::endl;
383 std::cout << "l_x : " << l_x << "l_y : " << l_y << std::endl;
384 std::cout << "rho : " << lteTables.tables.rho_grid[0] << " < " << rho
385 << " < " << lteTables.tables.rho_grid[lteTables.L.nx-1] << std::endl;
386 std::cout << "e : " << lteTables.tables.e_grid[0] << " < "
387 << e << " < " << lteTables.tables.e_grid[lteTables.L.ny-1] << std::endl;
388 std::exit(1);
389#endif
390 }
391
392 // Get the lower and upper x and y coordinates of the cell
393 mfem::real_t rho_l = lteTables.tables.rho_grid[l_x] , rho_u = lteTables.tables.rho_grid[u_x];
394 mfem::real_t e_l = lteTables.tables.e_grid[l_y] , e_u = lteTables.tables.e_grid[u_y];
395
396 // Get the corner property values
397 mfem::real_t Q00 = lteTables.tables.inv_table[lteTables.L.property_index(0, l_x, l_y)];
398 mfem::real_t Q01 = lteTables.tables.inv_table[lteTables.L.property_index(0, l_x, u_y)];
399 mfem::real_t Q10 = lteTables.tables.inv_table[lteTables.L.property_index(0, u_x, l_y)];
400 mfem::real_t Q11 = lteTables.tables.inv_table[lteTables.L.property_index(0, u_x, u_y)];
401
402
403 mfem::real_t wx = (rho - rho_l) / (rho_u - rho_l);
404 mfem::real_t wy = (e - e_l) / (e_u - e_l);
405
406
407 // Clamp to [0, 1]
408 wx = Theseus::Kernels::rmax(mfem::real_t(0), Theseus::Kernels::rmin(mfem::real_t(1), wx));
409 wy = Theseus::Kernels::rmax(mfem::real_t(0), Theseus::Kernels::rmin(mfem::real_t(1), wy));
410
411
412 return Q00 * ((1 - wx) * (1 - wy)) + Q01 * ((1 - wx) * wy) +
413 Q10 * (wx * (1 - wy)) + Q11 * (wx * wy);
414 }
415
416 template<typename StateView>
417 MFEM_HOST_DEVICE
418 inline mfem::real_t biinterp_lte_table(int property_idx, const PhysicsConstants &phys,
419 const StateLayout &L, const StateView &S,
420 const mfem::real_t T,
421 const LTETables &lteTables) const
422 {
423 /*
424 * Q01--------Q11
425 * | |
426 * | |
427 * | |
428 * Q00--------Q10
429 */
430
431 mfem::real_t rho = density(phys, L, S, lteTables);
432
433 // Get the lower and upper x and y indices of the cell
434 int l_x = hunt(lteTables.tables.rho_grid, lteTables.L.nx, rho, 0);
435 int l_y = hunt(lteTables.tables.T_grid, lteTables.L.ny, T, 0);
436 int u_x = l_x + 1 , u_y = l_y + 1;
437
438 // Get the lower and upper x and y coordinates of the cell
439 mfem::real_t rho_l = lteTables.tables.rho_grid[l_x] , rho_u = lteTables.tables.rho_grid[u_x];
440 mfem::real_t T_l = lteTables.tables.T_grid[l_y] , T_u = lteTables.tables.T_grid[u_y];
441
442 // Get the corner property values
443 mfem::real_t Q00 = lteTables.tables.lte_table[lteTables.L.property_index(property_idx, l_x, l_y)];
444 mfem::real_t Q01 = lteTables.tables.lte_table[lteTables.L.property_index(property_idx, l_x, u_y)];
445 mfem::real_t Q10 = lteTables.tables.lte_table[lteTables.L.property_index(property_idx, u_x, l_y)];
446 mfem::real_t Q11 = lteTables.tables.lte_table[lteTables.L.property_index(property_idx, u_x, u_y)];
447
448 mfem::real_t wx = (rho - rho_l) / (rho_u - rho_l);
449 mfem::real_t wy = (T - T_l) / (T_u - T_l);
450
451 // Clamp to [0, 1]
452 wx = Theseus::Kernels::rmax(mfem::real_t(0), Theseus::Kernels::rmin(mfem::real_t(1), wx));
453 wy = Theseus::Kernels::rmax(mfem::real_t(0), Theseus::Kernels::rmin(mfem::real_t(1), wy));
454
455
456 return Q00 * ((1 - wx) * (1 - wy)) + Q01 * ((1 - wx) * wy) +
457 Q10 * (wx * (1 - wy)) + Q11 * (wx * wy);
458 }
459 };
460}
MFEM_HOST_DEVICE mfem::real_t rmin(mfem::real_t a, mfem::real_t b)
Definition theseus_kernels.hpp:18
MFEM_HOST_DEVICE mfem::real_t rmax(mfem::real_t a, mfem::real_t b)
Definition theseus_kernels.hpp:17
MFEM_HOST_DEVICE mfem::real_t rabs(mfem::real_t x)
Definition theseus_kernels.hpp:22
Definition LTETable.hpp:19
MFEM_HOST_DEVICE int hunt(const mfem::real_t *arr, int n, mfem::real_t x, int ind_lo)
Definition LTETable.hpp:272
Definition AxisymmetricGeometry.hpp:15
constexpr const int MAXEQ
Definition theseus_kernels.hpp:13
Definition LTEEOS.hpp:22
MFEM_HOST_DEVICE mfem::real_t property_lookup(int property_idx, const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:302
MFEM_HOST_DEVICE mfem::real_t momentum_sq(const PhysicsConstants &phys, const StateLayout &L, const StateView &S) const
Definition LTEEOS.hpp:51
MFEM_HOST_DEVICE mfem::real_t cp(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:203
MFEM_HOST_DEVICE mfem::real_t density(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:35
MFEM_HOST_DEVICE mfem::real_t pressure(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:151
MFEM_HOST_DEVICE mfem::real_t cv(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:195
MFEM_HOST_DEVICE mfem::real_t gamma(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:159
void primitive_to_conserved(const PhysicsConstants &phys, const StateLayout &L, const InStateView &prim, OutStateView &cons, const LTETables &lteTables) const
Definition LTEEOS.hpp:264
MFEM_HOST_DEVICE void entropy_state(const PhysicsConstants &phys, const StateLayout &L, const InStateView &S, OutStateView &E, const LTETables &lteTables) const
Definition LTEEOS.hpp:220
MFEM_HOST_DEVICE void velocity(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, mfem::real_t u[3], const LTETables &lteTables) const
Definition LTEEOS.hpp:286
MFEM_HOST_DEVICE mfem::real_t entropy(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:211
MFEM_HOST_DEVICE mfem::real_t kinetic_energy_density(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:66
MFEM_HOST_DEVICE mfem::real_t internal_energy_from_pressure(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, mfem::real_t pressure_target, const LTETables &lteTables) const
Definition LTEEOS.hpp:86
MFEM_HOST_DEVICE mfem::real_t R_gas(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:27
MFEM_HOST_DEVICE void grad_entropy_to_grad_prim(const PhysicsConstants &phys, const StateLayout &L, const InStateView &S, const InStateView &dE, OutStateView &dPrim, const LTETables &lteTables) const
Definition LTEEOS.hpp:238
MFEM_HOST_DEVICE mfem::real_t sound_speed(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:187
MFEM_HOST_DEVICE mfem::real_t temperature(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:167
MFEM_HOST_DEVICE void grad_temperature(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const mfem::real_t *grad_rho, const mfem::real_t *grad_p, mfem::real_t *grad_t, const LTETables &lteTables) const
Definition LTEEOS.hpp:175
MFEM_HOST_DEVICE mfem::real_t rhoE(const PhysicsConstants &phys, const StateLayout &L, const StateView &S) const
Definition LTEEOS.hpp:43
MFEM_HOST_DEVICE mfem::real_t specific_internal_energy(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:138
MFEM_HOST_DEVICE void entropy_to_conserved(const PhysicsConstants &phys, const StateLayout &L, const InStateView &Se, OutStateView &Sc, const LTETables &lteTables) const
Definition LTEEOS.hpp:256
MFEM_HOST_DEVICE mfem::real_t internal_energy_density(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:77
MFEM_HOST_DEVICE mfem::real_t temp_from_internal_energy(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:312
MFEM_HOST_DEVICE mfem::real_t biinterp_lte_table(int property_idx, const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const mfem::real_t T, const LTETables &lteTables) const
Definition LTEEOS.hpp:418
MFEM_HOST_DEVICE mfem::real_t biinterp_inverse_table(const PhysicsConstants &phys, const StateLayout &L, const StateView &S, const LTETables &lteTables) const
Definition LTEEOS.hpp:351
Definition LTETable.hpp:75
LTETable::View tables
Definition LTETable.hpp:82
LTETable::Layout L
Definition LTETable.hpp:81
int cv_idx
Definition LTETable.hpp:30
int ny
Definition LTETable.hpp:24
int R_eq_idx
Definition LTETable.hpp:32
int cp_idx
Definition LTETable.hpp:31
int e_idx
Definition LTETable.hpp:29
int nx
Definition LTETable.hpp:24
MFEM_HOST_DEVICE int property_index(int property, int ind_x, int ind_y) const
Definition LTETable.hpp:45
int P_idx
Definition LTETable.hpp:28
int c_idx
Definition LTETable.hpp:34
int gamma_eq_idx
Definition LTETable.hpp:33
const mfem::real_t * T_grid
Definition LTETable.hpp:70
const mfem::real_t * inv_table
Definition LTETable.hpp:68
const mfem::real_t * rho_grid
Definition LTETable.hpp:69
const mfem::real_t * e_grid
Definition LTETable.hpp:71
const mfem::real_t * lte_table
Definition LTETable.hpp:67
Definition Physics.hpp:14
Definition GasState.hpp:218
MFEM_HOST_DEVICE void set_mass(const StateLayout &L, mfem::real_t val)
Definition GasState.hpp:239
MFEM_HOST_DEVICE void set_momentum(const StateLayout &L, int d, mfem::real_t val)
Definition GasState.hpp:252
MFEM_HOST_DEVICE void set_energy(const StateLayout &L, mfem::real_t val)
Definition GasState.hpp:301
Definition GasState.hpp:37
int dim
Definition GasState.hpp:38