-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParameters.py
97 lines (63 loc) · 1.45 KB
/
Parameters.py
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#--------------------------------------------
# Parameters.py
# In this module all the different user defined
# parameters are set.
#
#--------------------------------------------
import numpy as np
print "Loading Variables.."
# ------------------ MESH ---------------------
Nz = 500
z0 = 0
zf = 2.*np.pi
Ny = 500
y0 = 0
yf = 2.*np.pi
dim = 2
twoHalfD = True
MHD = True
staggered = False
# ----------------- TIME SETUP ----------------
dt_max = 0.1
dt = dt_max
tt = 0.
tf = 3. #np.inf
it = 0
max_it = np.inf
cfl_set = .8
cfl = cfl_set
# ------------------ PLOT SETUP ---------------
FolderName = 'RESULTS/OrszagTangVortex'
save_rate = 100
# ------------------ SOURCE TERMS -------------
IsComputingSource = False
# Gravity
IsThereGravity = False
GravityMode = 'Constant'
FreeFallLine = False
g = 1.
# Momentum Damping
MomentumDamping = False
DampingMode = 'MaximumVelocity'
DampingMultiplier = 0.01
DampingMaxVel = 1000000
# Thermal Diffusion
ThermalDiffusion = False
SpitzerDiffusion = False
ImplicitConduction = False
ct = 9e-12 * 1e5 # Value at E.Priest "Solar Magnetohydrodynamics" * mks to cgs factor
f_cfl = .5 #0.5 Largest stable number
DiffusionPercent = 1. #1e-2
# Radiative losses
RadiativeLoss = False
RadiationPercent = 1.
# ------------------ EQUATION OF STATE --------
gamma = 5./3.
R = 1.
Na = 1. #6.022e23
molarMass = 1. #1.6605e-24 #grams
mu = 1.
cv = 1.
def Computecv():
global cv
cv = R/(mu*(gamma-1.)*molarMass*Na)