-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathParameters.h
45 lines (38 loc) · 1.16 KB
/
Parameters.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
#pragma once
#include "Constants.h"
#include <string>
// These must be defined at compile time
struct GridParams
{
int N1; // Number of streamwise gridpoints
int N2; // Number of spanwise gridpoints
int N3; // Number of vertical gridpoints
Dimensionality dimensionality;
bool ThirdDimension() const // whether to resolve spanwise direction
{
return dimensionality == Dimensionality::ThreeDimensional
|| dimensionality == Dimensionality::TwoAndAHalf;
}
};
// In principle these can be changed mid-run
struct FlowParams
{
stratifloat L1; // streamwise (periodic) domain size
stratifloat L2; // spanwise (periodic domain size)
stratifloat L3; // vertical domain half-height
stratifloat Re; // Reynolds number
stratifloat Ri; // bulk Richardson number
stratifloat Pr; // Prandtl number
bool EvolveBackground;
};
// background shear
inline stratifloat InitialU(stratifloat z)
{
return tanh(z);
}
void DumpParameters();
void PrintParameters();
void LoadParameters(const std::string& file);
constexpr GridParams gridParams
= {48, 1, 512, Dimensionality::TwoDimensional};
extern FlowParams flowParams;