-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinput3d_irregwave.cyl
570 lines (503 loc) · 16.7 KB
/
input3d_irregwave.cyl
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
// constants
PI = 3.14159265358979e+0
// physical parameters
MU_F = 1.0e-3
MU_G = 1.8e-5
RHO_F = 1025
RHO_S = RHO_F/2.0
RHO_G = 1.225
G = 9.81
GRAV_CONST = 0.0, 0.0, -G
GCW = 4
GRAV_TYPE = "FULL"
FREE_DOFS = 0, 0, 1, 0, 0, 0 // surge, sway, heave, roll, pitch, yaw
// Optional flag to set viscosity in the solid region
SET_MU_S = TRUE
MU_S = MU_F
// Ambient parameters that are used in constant case
MU = MU_G
RHO = RHO_F
// Wave Parameters
DEPTH = 2.0 // Water surface z coordinate (m)
TIME_PERIOD = 1.7475 // (s)
HEIGHT = 0.3 // (m)
AMPLITUDE = HEIGHT/2.0
WAVELENGTH = 4.7215 // Here, deep water formula is used (m)
WAVENUMBER = 2*PI/WAVELENGTH
OMEGA = 2*PI/TIME_PERIOD
WAVE_TYPE = "IRREGULAR"
WAVE_GENERATOR_TYPE = WAVE_TYPE
// Solid and gas level set parameters
R = 0.25
D = 2.0 * R
L = 0.8
MASS = PI * R * R * L * RHO_S
Lx = 15.0
Ly = 3.0
Lz = 4.4
X_LO = 0.0
X_HI = Lx
Y_LO = 0.0
Y_HI = Ly
Z_LO = 0.0
Z_HI = Lz
GAS_LS_INIT = DEPTH
XCOM = WAVELENGTH + 5*R
YCOM = Ly/2.0
ZCOM = DEPTH
Z_MEAN = DEPTH - 0.0125 // 0.0125 is found from decay test
// Parameters for setting rho and mu
NUM_SOLID_INTERFACE_CELLS = 1.0
NUM_GAS_INTERFACE_CELLS = 1.0
// Surface tension parameters
SIGMA = 0.0
SMOOTHER = "IB_4"
NUM_INTERFACE_CELLS = 2.5
// Wave relaxation parameters
WAVE_DAMPING_METHOD = "RELAXATION"
OUTLET_ZONE_START = X_HI - 1.5 * WAVELENGTH
OUTLET_ZONE_END = X_HI
INLET_ZONE_START = X_LO
INLET_ZONE_END = X_LO + WAVELENGTH
ALPHA = 3.5
// grid spacing parameters
MAX_LEVELS = 2
REF_RATIO = 4
REF_RATIO_FINEST = 2
Nx = 150
Ny = 30 // coarsest grid spacing
Nz = 44
NXFINEST = (REF_RATIO^(MAX_LEVELS - 1))*Nx // finest grid spacing
NYFINEST = (REF_RATIO^(MAX_LEVELS - 1))*Ny // finest grid spacing
NZFINEST = (REF_RATIO^(MAX_LEVELS - 1))*Nz // finest grid spacing
Hx_COARSEST = Lx/Nx
Hy_COARSEST = Ly/Ny
Hz_COARSEST = Lz/Nz
Hx = Lx/NXFINEST
Hy = Ly/NYFINEST
Hz = Lz/NZFINEST
VOL_ELEM = Hx * Hy * Hz
// Level set option parameters
LS_ORDER = "THIRD_ORDER_ENO"
LS_ABS_TOL = 1.0e-6
LS_REINIT_INTERVAL = 1
MAX_ITERATIONS = 20
LS_TAG_VALUE = 0.0
LS_TAG_ABS_THRESH = 2 * Hz_COARSEST
APPLY_SIGN_FIX = TRUE
APPLY_SUBCELL_FIX = TRUE
APPLY_MASS_CONSTRAINT = FALSE
FlowGravityForcing {
rho_neg = RHO_G
rho_pos = RHO_F
num_interface_cells = NUM_GAS_INTERFACE_CELLS
}
VelocityInitialConditions {
function_0 = "0.0"
function_1 = "0.0"
function_2 = "0.0"
}
df = 1.7 * OMEGA / WAVENUMBER // df is same from load_mpc_parameters.m
ProbePoints {
probe_0 = XCOM - df , YCOM , DEPTH + 2*Hz // x_A (upwave) point
}
SpongeLayerForceFunction {
forcing_enabled_5 = TRUE, TRUE, TRUE
width_5 = 4 * Hz_COARSEST
}
VelocityBcCoefs_0 {
acoef_function_0 = "1.0"
acoef_function_1 = "1.0"
acoef_function_2 = "1.0"
acoef_function_3 = "1.0"
acoef_function_4 = "1.0"
acoef_function_5 = "1.0"
bcoef_function_0 = "0.0"
bcoef_function_1 = "0.0"
bcoef_function_2 = "0.0"
bcoef_function_3 = "0.0"
bcoef_function_4 = "0.0"
bcoef_function_5 = "0.0"
gcoef_function_0 = "0.0"
gcoef_function_1 = "0.0"
gcoef_function_2 = "0.0"
gcoef_function_3 = "0.0"
gcoef_function_4 = "0.0"
gcoef_function_5 = "0.0"
wave_parameters_db {
omega = OMEGA
amplitude = AMPLITUDE
depth = DEPTH
omega_begin = 2*PI/5.2359
omega_end = 2*PI/0.5
gravitational_constant = G
significant_wave_period = 0.772 * TIME_PERIOD
significant_wave_height = HEIGHT
wave_spectrum = "BRETSCHNEIDER"
wave_number = WAVENUMBER
num_waves = 30
num_interface_cells = NUM_INTERFACE_CELLS
}
}
VelocityBcCoefs_1 {
acoef_function_0 = "1.0"
acoef_function_1 = "1.0"
acoef_function_2 = "1.0"
acoef_function_3 = "1.0"
acoef_function_4 = "1.0"
acoef_function_5 = "1.0"
bcoef_function_0 = "0.0"
bcoef_function_1 = "0.0"
bcoef_function_2 = "0.0"
bcoef_function_3 = "0.0"
bcoef_function_4 = "0.0"
bcoef_function_5 = "0.0"
gcoef_function_0 = "0.0"
gcoef_function_1 = "0.0"
gcoef_function_2 = "0.0"
gcoef_function_3 = "0.0"
gcoef_function_4 = "0.0"
gcoef_function_5 = "0.0"
wave_parameters_db {
omega = OMEGA
amplitude = AMPLITUDE
depth = DEPTH
omega_begin = 2*PI/5.2359
omega_end = 2*PI/0.5
gravitational_constant = G
significant_wave_period = 0.772 * TIME_PERIOD
significant_wave_height = HEIGHT
wave_spectrum = "BRETSCHNEIDER"
wave_number = WAVENUMBER
num_waves = 30
num_interface_cells = NUM_INTERFACE_CELLS
}
}
VelocityBcCoefs_2 {
acoef_function_0 = "1.0"
acoef_function_1 = "1.0"
acoef_function_2 = "1.0"
acoef_function_3 = "1.0"
acoef_function_4 = "1.0"
acoef_function_5 = "0.0"
bcoef_function_0 = "0.0"
bcoef_function_1 = "0.0"
bcoef_function_2 = "0.0"
bcoef_function_3 = "0.0"
bcoef_function_4 = "0.0"
bcoef_function_5 = "1.0"
gcoef_function_0 = "0.0"
gcoef_function_1 = "0.0"
gcoef_function_2 = "0.0"
gcoef_function_3 = "0.0"
gcoef_function_4 = "0.0"
gcoef_function_5 = "0.0"
wave_parameters_db {
omega = OMEGA
amplitude = AMPLITUDE
depth = DEPTH
omega_begin = 2*PI/5.2359
omega_end = 2*PI/0.5
gravitational_constant = G
significant_wave_period = 0.772 * TIME_PERIOD
significant_wave_height = HEIGHT
wave_spectrum = "BRETSCHNEIDER"
wave_number = WAVENUMBER
num_waves = 30
num_interface_cells = NUM_INTERFACE_CELLS
}
}
DensityBcCoefs {
acoef_function_0 = "0.0"
acoef_function_1 = "0.0"
acoef_function_2 = "0.0"
acoef_function_3 = "0.0"
acoef_function_4 = "0.0"
acoef_function_5 = "0.0"
bcoef_function_0 = "1.0"
bcoef_function_1 = "1.0"
bcoef_function_2 = "1.0"
bcoef_function_3 = "1.0"
bcoef_function_4 = "1.0"
bcoef_function_5 = "1.0"
gcoef_function_0 = "0.0"
gcoef_function_1 = "0.0"
gcoef_function_2 = "0.0"
gcoef_function_3 = "0.0"
gcoef_function_4 = "0.0"
gcoef_function_5 = "0.0"
}
ViscosityBcCoefs {
acoef_function_0 = "0.0"
acoef_function_1 = "0.0"
acoef_function_2 = "0.0"
acoef_function_3 = "0.0"
acoef_function_4 = "0.0"
acoef_function_5 = "0.0"
bcoef_function_0 = "1.0"
bcoef_function_1 = "1.0"
bcoef_function_2 = "1.0"
bcoef_function_3 = "1.0"
bcoef_function_4 = "1.0"
bcoef_function_5 = "1.0"
gcoef_function_0 = "0.0"
gcoef_function_1 = "0.0"
gcoef_function_2 = "0.0"
gcoef_function_3 = "0.0"
gcoef_function_4 = "0.0"
gcoef_function_5 = "0.0"
}
PhiBcCoefs {
acoef_function_0 = "0.0"
acoef_function_1 = "0.0"
acoef_function_2 = "0.0"
acoef_function_3 = "0.0"
acoef_function_4 = "0.0"
acoef_function_5 = "0.0"
bcoef_function_0 = "1.0"
bcoef_function_1 = "1.0"
bcoef_function_2 = "1.0"
bcoef_function_3 = "1.0"
bcoef_function_4 = "1.0"
bcoef_function_5 = "1.0"
gcoef_function_0 = "0.0"
gcoef_function_1 = "0.0"
gcoef_function_2 = "0.0"
gcoef_function_3 = "0.0"
gcoef_function_4 = "0.0"
gcoef_function_5 = "0.0"
}
// Simulation Parameters
START_TIME = 0.0e0
END_TIME = 45.0e0
GROW_DT = 2.0e0
MAX_INTEGRATOR_STEPS = 500000000000
CFL_MAX = 0.5
NUM_INS_CYCLES = 1
NON_CONSERVATIVE_CONVECTIVE_OP_TYPE = "CUI"
CONVECTIVE_FORM = "CONSERVATIVE"
INIT_CONVECTIVE_TS_TYPE = "MIDPOINT_RULE"
CONVECTIVE_TS_TYPE = "MIDPOINT_RULE"
NORMALIZE_PRESSURE = FALSE
VORTICITY_TAGGING = FALSE
TAG_BUFFER = 2
REGRID_CFL_INTERVAL = 5000000000000
DT_MAX = 0.00125
OUTPUT_U = TRUE
OUTPUT_P = TRUE
OUTPUT_F = TRUE
OUTPUT_OMEGA = TRUE
OUTPUT_DIV_U = TRUE
OUTPUT_RHO = TRUE
OUTPUT_MU = TRUE
RHO_IS_CONST = FALSE
MU_IS_CONST = FALSE
ERROR_ON_DT_CHANGE = FALSE
// Application
CHI = RHO_S/DT_MAX
PRECOND_REINIT_INTERVAL = 1
VC_INTERPOLATION_TYPE = "VC_AVERAGE_INTERP"
DENSITY_CONVECTIVE_LIMITER = "CUI"
VELOCITY_CONVECTIVE_LIMITER = "CUI"
DENSITY_TS = "SSPRK3"
OPERATOR_SCALE_FACTORS = 1.0
EXPLICITLY_REMOVE_NULLSPACE = FALSE
ENABLE_LOGGING = TRUE
// AdvDiff solver parameters
ADV_DIFF_NUM_CYCLES = 2
ADV_DIFF_CONVECTIVE_TS_TYPE = "MIDPOINT_RULE"
ADV_DIFF_CONVECTIVE_OP_TYPE = "PPM"
ADV_DIFF_CONVECTIVE_FORM = "CONSERVATIVE"
BrinkmanPenalization {
chi = CHI
}
INSVCStaggeredConservativeHierarchyIntegrator {
start_time = START_TIME
end_time = END_TIME
grow_dt = GROW_DT
convective_difference_form = CONVECTIVE_FORM
normalize_pressure = NORMALIZE_PRESSURE
cfl = CFL_MAX
dt_max = DT_MAX
using_vorticity_tagging = VORTICITY_TAGGING
vorticity_rel_thresh = 0.25
tag_buffer = TAG_BUFFER
regrid_cfl_interval = REGRID_CFL_INTERVAL
output_U = OUTPUT_U
output_P = OUTPUT_P
output_F = OUTPUT_F
output_Omega = OUTPUT_OMEGA
output_Div_U = OUTPUT_DIV_U
output_rho = OUTPUT_RHO
output_mu = OUTPUT_MU
rho_is_const = RHO_IS_CONST
mu_is_const = MU_IS_CONST
rho = RHO_G
precond_reinit_interval = PRECOND_REINIT_INTERVAL
operator_scale_factors = OPERATOR_SCALE_FACTORS
vc_interpolation_type = VC_INTERPOLATION_TYPE
enable_logging = ENABLE_LOGGING
max_integrator_steps = MAX_INTEGRATOR_STEPS
explicitly_remove_nullspace= EXPLICITLY_REMOVE_NULLSPACE
num_cycles = NUM_INS_CYCLES
// Solver parameters
velocity_solver_type = "VC_VELOCITY_PETSC_KRYLOV_SOLVER"
velocity_precond_type = "VC_VELOCITY_POINT_RELAXATION_FAC_PRECONDITIONER"
velocity_solver_db {
ksp_type = "richardson"
max_iterations = 1
rel_residual_tol = 1.0e-1
}
velocity_precond_db {
num_pre_sweeps = 0
num_post_sweeps = 3
prolongation_method = "CONSERVATIVE_LINEAR_REFINE"
restriction_method = "CONSERVATIVE_COARSEN"
coarse_solver_type = "VC_VELOCITY_PETSC_LEVEL_SOLVER"
coarse_solver_rel_residual_tol = 1.0e-12
coarse_solver_abs_residual_tol = 1.0e-50
coarse_solver_max_iterations = 100
coarse_solver_db {
ksp_type = "gmres"
pc_type = "jacobi"
}
}
pressure_solver_type = "PETSC_KRYLOV_SOLVER"
pressure_precond_type = "POINT_RELAXATION_FAC_PRECONDITIONER"
pressure_solver_db
{
ksp_type = "richardson"
max_iterations = 1
rel_residual_tol = 1.0e-1
}
pressure_precond_db {
num_pre_sweeps = 0
num_post_sweeps = 3
prolongation_method = "LINEAR_REFINE"
restriction_method = "CONSERVATIVE_COARSEN"
coarse_solver_type = "HYPRE_LEVEL_SOLVER"
coarse_solver_rel_residual_tol = 1.0e-12
coarse_solver_abs_residual_tol = 1.0e-50
coarse_solver_max_iterations = 1
coarse_solver_db {
solver_type = "PFMG"
num_pre_relax_steps = 0
num_post_relax_steps = 3
enable_logging = FALSE
}
}
mass_momentum_integrator_db {
density_time_stepping_type = DENSITY_TS
velocity_convective_limiter = VELOCITY_CONVECTIVE_LIMITER
density_convective_limiter = DENSITY_CONVECTIVE_LIMITER
}
}
AdvDiffSemiImplicitHierarchyIntegrator {
start_time = START_TIME
end_time = END_TIME
grow_dt = GROW_DT
num_cycles = ADV_DIFF_NUM_CYCLES
convective_time_stepping_type = ADV_DIFF_CONVECTIVE_TS_TYPE
convective_op_type = ADV_DIFF_CONVECTIVE_OP_TYPE
convective_difference_form = ADV_DIFF_CONVECTIVE_FORM
cfl = CFL_MAX
dt_max = DT_MAX
tag_buffer = TAG_BUFFER
enable_logging = ENABLE_LOGGING
}
LevelSet_Gas {
order = LS_ORDER
abs_tol = LS_ABS_TOL
max_iterations = MAX_ITERATIONS
enable_logging = FALSE
reinit_interval = LS_REINIT_INTERVAL
apply_sign_fix = APPLY_SIGN_FIX
apply_subcell_fix = APPLY_SUBCELL_FIX
apply_mass_constraint = APPLY_MASS_CONSTRAINT
}
SurfaceTensionForceFunction {
smoother = SMOOTHER
sigma = SIGMA
num_interface_cells = NUM_INTERFACE_CELLS
}
Main {
// log file parameters
log_file_name = "IB3d_cylinder.log"
log_all_nodes = FALSE
// visualization dump parameters
viz_writer = "VisIt"
viz_dump_interval = 5000 //zero to turn off
viz_dump_dirname = "viz_cylinder3d"
visit_number_procs_per_file = 1
// restart dump parameters
restart_interval = 0
restart_write_dirname = "restart_IB3d"
// hierarchy data dump parameters
hier_dump_interval = 0
hier_dump_dirname = "hier_data_IB3d"
// timer dump parameters
timer_dump_interval = 1
// post processor parameters
postprocess_interval = 0
}
CartesianGeometry {
domain_boxes = [ (0,0,0) , (Nx - 1, Ny - 1, Nz - 1) ]
x_lo = X_LO, Y_LO, Z_LO
x_up = X_HI, Y_HI, Z_HI
periodic_dimension = 0, 0, 0
}
GriddingAlgorithm {
max_levels = MAX_LEVELS // Maximum number of levels in hierarchy.
ratio_to_coarser {
level_1 = REF_RATIO,REF_RATIO,REF_RATIO // vector ratio to next coarser level
level_2 = REF_RATIO,REF_RATIO,REF_RATIO
level_3 = REF_RATIO,REF_RATIO,REF_RATIO
level_4 = REF_RATIO,REF_RATIO,REF_RATIO
level_5 = REF_RATIO,REF_RATIO,REF_RATIO
level_6 = REF_RATIO,REF_RATIO,REF_RATIO
level_7 = REF_RATIO,REF_RATIO,REF_RATIO
}
largest_patch_size {
level_0 = 2048, 2048, 2048 // largest patch allowed in hierarchy
// all finer levels will use same values as level_0...
}
smallest_patch_size {
level_0 = 8, 8, 8 // smallest patch allowed in hierarchy
// all finer levels will use same values as level_0...
}
allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
efficiency_tolerance = 0.80e0 // min % of tag cells in new patch level
combine_efficiency = 0.80e0 // chop box if sum of volumes of smaller
// boxes < efficiency * vol of large box
}
Nz_lower1 = int( (DEPTH - 2.0*L/2)/Hz_COARSEST )
Nz_upper1 = int( (DEPTH + 2.2*L/2)/Hz_COARSEST )
Nz_lower2 = int( (DEPTH - 1.6*L/2)/Hz_COARSEST )
Nz_upper2 = int( (DEPTH + 2.2*L/2)/Hz_COARSEST )
StandardTagAndInitialize {
// tagging_method = "GRADIENT_DETECTOR"
tagging_method = "REFINE_BOXES"
RefineBoxes {
level_0 = [( 0 , 0 , Nz_lower1 ),( Nx - 1 , Ny - 1 , Nz_upper1 )]
level_1 = [( 0 , 0 , REF_RATIO*Nz_lower2 ),( REF_RATIO*Nx - 1 , REF_RATIO*Ny - 1 , REF_RATIO*Nz_upper2 )]
level_2 = [( 0 , 0 , 0 ),( 16*Nx - 1 , 16*Ny - 1 , 16*Nz - 1 )]
level_3 = [( 0 , 0, 0 ),( 8*Nx - 1 , 8*Ny - 1, 8*Nz - 1 )]
level_4 = [( 0 , 0, 0 ),( 16*Nx - 1 , 16*Ny - 1, 16*Nz - 1 )]
level_5 = [( 0 , 0, 0 ),( 32*Nx - 1 , 32*Ny - 1, 32*Nz - 1 )]
level_6 = [( 0 , 0, 0 ),( 64*Nx - 1 , 64*Ny - 1, 64*Nz - 1 )]
level_7 = [( 0 , 0, 0 ),( 128*Nx - 1 , 128*Ny - 1, 128*Nz - 1 )]
level_8 = [( 0 , 0, 0 ),( 256*Nx - 1 , 256*Ny - 1, 256*Nz - 1 )]
level_9 = [( 0 , 0, 0 ),( 512*Nx - 1 , 512*Ny - 1, 512*Nz - 1 )]
}
}
LoadBalancer {
bin_pack_method = "SPATIAL"
max_workload_factor = 1
}
TimerManager{
print_exclusive = FALSE
print_total = TRUE
print_threshold = 0.1
//timer_list = "IBAMR::*::*" , "IBTK::*::*" , "*::*::*"
timer_list = ""
}