-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.h
67 lines (60 loc) · 1.83 KB
/
constants.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#if !defined(CONSTANTS_H_)
#define CONSTANTS_H_
#include "petsc.h"
/*
******************************************************************************
* Dimensional constants
******************************************************************************
*/
/* constants to scale the physical problem, largely chosen based on numerical
considerations */
typedef struct {
/* primary */
PetscScalar RADIUS;
PetscScalar TEMP;
PetscScalar ENTROPY; /* note: specific entropy */
PetscScalar DENSITY;
PetscScalar VOLATILE;
/* derived from primary */
PetscScalar AREA;
PetscScalar VOLUME;
PetscScalar MASS;
PetscScalar TIME;
PetscScalar TIMEYRS;
PetscScalar SENERGY; /* specific energy */
PetscScalar ENERGY;
PetscScalar PRESSURE;
PetscScalar POWER;
PetscScalar FLUX;
PetscScalar DPDR;
PetscScalar GRAVITY;
PetscScalar KAPPA;
PetscScalar DSDP;
PetscScalar DSDR;
PetscScalar DTDP;
PetscScalar DTDR;
PetscScalar GSUPER;
PetscScalar VISC;
PetscScalar LOG10VISC;
PetscScalar COND;
PetscScalar SIGMA;
PetscScalar RHS;
PetscScalar HEATGEN;
} data_ScalingConstants;
typedef data_ScalingConstants* ScalingConstants;
PetscErrorCode ScalingConstantsCreate(ScalingConstants*);
PetscErrorCode ScalingConstantsDestroy(ScalingConstants*);
/* fundamental constants */
typedef struct {
PetscScalar AVOGADRO;
PetscScalar BOLTZMANN;
PetscScalar GAS;
PetscScalar GRAVITATIONAL;
PetscScalar STEFAN_BOLTZMANN;
PetscScalar OCEAN_MOLES;
} data_FundamentalConstants;
typedef data_FundamentalConstants* FundamentalConstants;
PetscErrorCode FundamentalConstantsCreate(FundamentalConstants*);
PetscErrorCode FundamentalConstantsDestroy(FundamentalConstants*);
PetscErrorCode FundamentalConstantsSet(FundamentalConstants, ScalingConstants const);
#endif