forked from benrhodges/SvePy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRun_Bump_T10_rectangular_Simulations.py
198 lines (168 loc) · 7.85 KB
/
Run_Bump_T10_rectangular_Simulations.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 23 11:48:49 2018
Simulations for flow over a bump
Using 64 grid cells (32 in domain)
Modifying CFL limits to look at convergence with decreasing dt
Using rectangular hydraulic jump
@author: brh
"""
def main(argv):
import SimulationRun as sr
import numpy as np
#--------------------------------------------------------------------------
# RUN-TIME OUTPUT CONTROLS
# useful for compact printout during debugging
np.set_printoptions(precision=10)
#--------------------------------------------------------------------------
# SETUP
# Provide a dictionary that replaces the methods of setting.###
# with the values in the dictionary. See SettingDefault.py for values
# At a minimum, the 'user_case_name' must be provided that
# matches one of the predefined cases.
# See SimulationRun.predefined_case_setup()
# Waller Creek baseline - starting from time 0
# custom = {'user_case_name' : 'Waller_Creek_baseline',
# 'plot_element_limits': [190,250],
# 'plot_types' : ['free_surface','flowrate']}
#--------------------------------------------------------------------------
# new setup
custom = {'user_case_name' : 'flow_over_a_bump_0032_T10_R',
'txtout_directory' : 'outtxt_bump_0032_T10_R',
'binsave_directory' : 'outbin_bump_0032_T10_R',
'flow_over_a_bump_NX': 32,
'heightBC': 0.262,
'time_total': 400,
'plot_time_interval' : 4,
'print_time_header_step_interval':100,
'cfl_max': 0.7,
'cfl_increase_dt': 0.6,
'mannings_n_global_default': 0.0,
'mannings_n_for_buffer': 0.03,
'method_momentum' : 'T10',
'method_hydjump_face': 'momentum_match',
'method_Q_adjust_Vshape' : True,
'method_Q_adjust_Vshape_coef' :1.0,
'method_use_cosangle' : True,
'plot_element_limits': [6,10],
'plot_types' : ['free_surface','flowrate'],
'swashes_bin' : '/Users/brh/Box Sync/AA_Sync/CODE/SWASHES-1.03.00/bin/swashes'}
#--------------------------------------------------------------------------
# run the simulation
[trun, setting] = sr.SimulationRun().simulation_toplevel(custom)
del trun
del setting
#--------------------------------------------------------------------------
# new setup
custom = {'user_case_name' : 'flow_over_a_bump_0064_T10_R',
'txtout_directory' : 'outtxt_bump_0064_T10_R',
'binsave_directory' : 'outbin_bump_0064_T10_R',
'flow_over_a_bump_NX': 64,
'heightBC': 0.262,
'time_total': 400,
'plot_time_interval' : 4,
'print_time_header_step_interval':100,
'cfl_max': 0.7,
'cfl_increase_dt': 0.6,
'mannings_n_global_default': 0.0,
'mannings_n_for_buffer': 0.03,
'method_momentum' : 'T10',
'method_hydjump_face': 'momentum_match',
'method_Q_adjust_Vshape' : True,
'method_Q_adjust_Vshape_coef' :1.0,
'method_use_cosangle' : True,
'plot_element_limits': [12,20],
'plot_types' : ['free_surface','flowrate'],
'swashes_bin' : '/Users/brh/Box Sync/AA_Sync/CODE/SWASHES-1.03.00/bin/swashes'}
#--------------------------------------------------------------------------
# run the simulation
[trun, setting] = sr.SimulationRun().simulation_toplevel(custom)
del trun
del setting
#--------------------------------------------------------------------------
# new setup
custom = {'user_case_name' : 'flow_over_a_bump_0128_T10_R',
'txtout_directory' : 'outtxt_bump_0128_T10_R',
'binsave_directory' : 'outbin_bump_0128_T10_R',
'flow_over_a_bump_NX': 128,
'heightBC': 0.262,
'time_total': 400,
'plot_time_interval' : 4,
'print_time_header_step_interval':100,
'cfl_max': 0.7,
'cfl_increase_dt': 0.6,
'mannings_n_global_default': 0.0,
'mannings_n_for_buffer': 0.03,
'method_momentum' : 'T10',
'method_hydjump_face': 'momentum_match',
'method_Q_adjust_Vshape' : True,
'method_Q_adjust_Vshape_coef' :1.0,
'method_use_cosangle' : True,
'plot_element_limits': [24,40],
'plot_types' : ['free_surface','flowrate'],
'swashes_bin' : '/Users/brh/Box Sync/AA_Sync/CODE/SWASHES-1.03.00/bin/swashes'}
#--------------------------------------------------------------------------
# run the simulation
[trun, setting] = sr.SimulationRun().simulation_toplevel(custom)
del trun
del setting
#--------------------------------------------------------------------------
# new setup
custom = {'user_case_name' : 'flow_over_a_bump_0256_T10_R',
'txtout_directory' : 'outtxt_bump_0256_T10_R',
'binsave_directory' : 'outbin_bump_0256_T10_R',
'flow_over_a_bump_NX': 256,
'heightBC': 0.262,
'time_total': 400,
'plot_time_interval' : 4,
'print_time_header_step_interval':100,
'cfl_max': 0.7,
'cfl_increase_dt': 0.6,
'mannings_n_global_default': 0.0,
'mannings_n_for_buffer': 0.03,
'method_momentum' : 'T10',
'method_hydjump_face': 'momentum_match',
'method_Q_adjust_Vshape' : True,
'method_Q_adjust_Vshape_coef' :1.0,
'method_use_cosangle' : True,
'plot_element_limits': [45,75],
'plot_types' : ['free_surface','flowrate'],
'swashes_bin' : '/Users/brh/Box Sync/AA_Sync/CODE/SWASHES-1.03.00/bin/swashes'}
#--------------------------------------------------------------------------
# run the simulation
[trun, setting] = sr.SimulationRun().simulation_toplevel(custom)
del trun
del setting
#--------------------------------------------------------------------------
# new setup
custom = {'user_case_name' : 'flow_over_a_bump_0512_T10_R',
'txtout_directory' : 'outtxt_bump_0512_T10_R',
'binsave_directory' : 'outbin_bump_0512_T10_R',
'flow_over_a_bump_NX': 512,
'heightBC': 0.262,
'time_total': 400,
'plot_time_interval' : 4,
'print_time_header_step_interval':100,
'cfl_max': 0.7,
'cfl_increase_dt': 0.6,
'mannings_n_global_default': 0.0,
'mannings_n_for_buffer': 0.03,
'method_momentum' : 'T10',
'method_hydjump_face': 'momentum_match',
'method_Q_adjust_Vshape' : True,
'method_Q_adjust_Vshape_coef' :1.0,
'method_use_cosangle' : True,
'plot_element_limits': [90,150],
'plot_types' : ['free_surface','flowrate'],
'swashes_bin' : '/Users/brh/Box Sync/AA_Sync/CODE/SWASHES-1.03.00/bin/swashes'}
#--------------------------------------------------------------------------
# run the simulation
[trun, setting] = sr.SimulationRun().simulation_toplevel(custom)
del trun
del setting
if __name__ == '__main__':
import sys
main(sys.argv)
#==============================================================================
#EOF