xref: /honee/qfunctions/newtonian_types.h (revision 8a8cb6e06ce4728cc6d80ca92f8de31da49852e5)
1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
3 #pragma once
4 
5 #include <ceed.h>
6 
7 #include "stabilization_types.h"
8 
9 typedef enum {
10   STATEVAR_CONSERVATIVE = 0,
11   STATEVAR_PRIMITIVE    = 1,
12   STATEVAR_ENTROPY      = 2,
13 } StateVariable;
14 
15 typedef struct NewtonianIdealGasContext_ *NewtonianIdealGasContext;
16 struct NewtonianIdealGasContext_ {
17   CeedScalar        lambda;
18   CeedScalar        mu;
19   CeedScalar        k;
20   CeedScalar        cv;
21   CeedScalar        cp;
22   CeedScalar        g[3];
23   CeedScalar        c_tau;
24   CeedScalar        Ctau_t;
25   CeedScalar        Ctau_v;
26   CeedScalar        Ctau_C;
27   CeedScalar        Ctau_M;
28   CeedScalar        Ctau_E;
29   CeedScalar        dt;
30   CeedScalar        time;
31   CeedScalar        ijacobian_time_shift;
32   bool              is_implicit;
33   StateVariable     state_var;
34   StabilizationType stabilization;
35   bool              idl_enable;
36   CeedScalar        idl_pressure;
37   CeedScalar        idl_amplitude;
38   CeedScalar        idl_start;
39   CeedScalar        idl_length;
40 };
41 
42 typedef struct {
43   CeedScalar pressure;
44   CeedScalar velocity[3];
45   CeedScalar temperature;
46 } StatePrimitive;
47 
48 typedef struct {
49   CeedScalar S_density;
50   CeedScalar S_momentum[3];
51   CeedScalar S_energy;
52 } StateEntropy;
53 
54 typedef struct SetupContext_ *SetupContext;
55 struct SetupContext_ {
56   StatePrimitive                   reference;
57   struct NewtonianIdealGasContext_ gas;
58   CeedScalar                       lx;
59   CeedScalar                       ly;
60   CeedScalar                       lz;
61   CeedScalar                       time;
62 };
63