forked from benrhodges/SvePy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRun_Bump_32_T00_simplejump.py
170 lines (151 loc) · 6.61 KB
/
Run_Bump_32_T00_simplejump.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
#!/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_simplejump',
'txtout_directory' : 'outtxt_bump_0032_simplejump',
'binsave_directory' : 'outbin_bump_0032_simplejump',
'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' : 'T00',
'method_hydjump_face': 'simple',
'method_Q_adjust_Vshape' : True,
'method_Q_adjust_Vshape_coef' :1.0,
'method_use_cosangle' : True,
'plot_element_limits': [0,15],
'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_0032bR',
# 'txtout_directory' : 'outtxt_bump_0032bR',
# 'binsave_directory' : 'outbin_bump_0032bR',
# '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.35,
# 'cfl_increase_dt': 0.3,
# 'mannings_n_global_default': 0.0,
# 'mannings_n_for_buffer': 0.03,
# 'method_momentum' : 'T00',
# '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_0032cR',
# 'txtout_directory' : 'outtxt_bump_0032cR',
# 'binsave_directory' : 'outbin_bump_0032cR',
# 'flow_over_a_bump_NX': 32,
# 'heightBC': 0.262,
# 'time_total': 400,
# 'plot_time_interval' : 4,
# 'print_time_header_step_interval':500,
# 'cfl_max': 0.1,
# 'cfl_increase_dt': 0.085,
# '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_0032dR',
# 'txtout_directory' : 'outtxt_bump_0032dR',
# 'binsave_directory' : 'outbin_bump_0032dR',
# 'flow_over_a_bump_NX': 32,
# 'heightBC': 0.262,
# 'time_total': 400,
# 'plot_time_interval' : 4,
# 'print_time_header_step_interval':1000,
# 'cfl_max': 0.035,
# 'cfl_increase_dt': 0.03,
# 'mannings_n_global_default': 0.0,
# 'mannings_n_for_buffer': 0.03,
# 'method_momentum' : 'T20',
# '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
if __name__ == '__main__':
import sys
main(sys.argv)
#==============================================================================
#EOF