Skip to content

Commit

Permalink
Regression tests for two-phase solver with Nalu-Wind domains containi…
Browse files Browse the repository at this point in the history
…ng solid bodies (#73)

* update meshes repository for new tests
* update git ignore
  • Loading branch information
mbkuhn authored Aug 8, 2024
1 parent f5a5a97 commit 97d0dbc
Show file tree
Hide file tree
Showing 9 changed files with 482 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
spack*
compile_commands.json
.cache
.vscode
build*
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ add_test_r(hybrid-multi-cylinder)
add_test_r(flat-surface)
add_test_r(sloshing-tank)
add_test_r(linear-waves)
add_test_r(stokes-waves-cylinder)
add_test_r(dam-break-block)
2 changes: 1 addition & 1 deletion test/meshes
61 changes: 61 additions & 0 deletions test/test_files/dam-break-block/dam-break-block-amr.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
time.stop_time = 2 # Max (simulated) time to evolve
time.max_step = 2000 # Max number of time steps

time.fixed_dt = 0.001 # Use this constant dt if > 0
time.cfl = 0.95 # CFL factor

time.plot_interval = 10 # Steps between plot files
time.checkpoint_interval = -100 # Steps between checkpoint files

io.int_outputs = iblank_cell

incflo.use_godunov = 1
incflo.godunov_type = "weno_z"
transport.model = TwoPhaseTransport
transport.viscosity_fluid1=1.e-5
transport.viscosity_fluid2=1.e-5

transport.laminar_prandtl = 0.7
transport.turbulent_prandtl = 0.3333
turbulence.model = Laminar

incflo.physics = MultiPhase DamBreak
MultiPhase.density_fluid1=1000.
MultiPhase.density_fluid2=1.
DamBreak.location = -0.8 0.0 -0.3125
DamBreak.width = 0.5
DamBreak.height = 0.8
ICNS.source_terms = GravityForcing

amr.n_cell = 64 16 32 # Grid cells at coarsest AMRlevel
amr.max_level = 0 # Max AMR level in hierarchy

geometry.prob_lo = -1.4 -0.375 -0.3125 # Lo corner coordinates
geometry.prob_hi = 1.1 0.375 1.1875 # Hi corner coordinates
geometry.is_periodic = 0 0 0 # Periodicity x y z (0/1)

Overset.disable_coupled_mac_proj = true
Overset.disable_coupled_nodal_proj = true

xlo.type = "slip_wall"
xlo.vof_type = "zero_gradient"
xhi.type = "slip_wall"
xhi.vof_type = "zero_gradient"

ylo.type = "slip_wall"
ylo.vof_type = "zero_gradient"
yhi.type = "slip_wall"
yhi.vof_type = "zero_gradient"

zlo.type = "slip_wall"
zlo.vof_type = "zero_gradient"
zhi.type = "slip_wall"
zhi.vof_type = "mass_inflow"
zhi.vof = 0.0

incflo.verbose=0

nodal_proj.num_pre_smooth = 20
nodal_proj.num_post_smooth = 20
mac_proj.num_pre_smooth = 20
mac_proj.num_post_smooth = 20
140 changes: 140 additions & 0 deletions test/test_files/dam-break-block/dam-break-block-nalu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
Simulations:
- name: sim1
time_integrator: ti_1
optimizer: opt1

linear_solvers:

- name: solve_scalar
type: hypre
method: hypre_gmres
preconditioner: boomerAMG
tolerance: 1e-5
max_iterations: 200
kspace: 5
output_level: 0

- name: solve_cont
type: hypre
method: hypre_gmres
preconditioner: boomerAMG
tolerance: 1e-5
max_iterations: 200
kspace: 5
output_level: 0

realms:

- name: realm_1
mesh: meshes/block_within_cube.exo
use_edges: yes
automatic_decomposition_type: rcb
check_for_missing_bcs: yes

equation_systems:
name: theEqSys
max_iterations: 3
decoupled_overset_solve: yes

solver_system_specification:
volume_of_fluid: solve_scalar
velocity: solve_scalar
pressure: solve_cont

systems:
- VolumeOfFluid:
name: myVOF
max_iterations: 1
convergence_tolerance: 1e-8
- LowMachEOM:
name: myLowMach
max_iterations: 1
convergence_tolerance: 1e-8

initial_conditions:

- constant: ic_1
target_name: fluid-HEX
value:
volume_of_fluid: 0.0
velocity: [0.0, 0.0, 0.0]
pressure: 0.0

material_properties:
target_name: fluid-HEX
specifications:
- name: density
type: volume_of_fluid
primary_value: 1000.0
secondary_value: 1.

- name: viscosity
type: constant
value: 1.0e-5

boundary_conditions:

- wall_boundary_condition: bc_wall
target_name: block
wall_user_data:
velocity: [0.0, 0.0, 0.0]
- overset_boundary_condition: bc_overset
overset_connectivity_type: tioga
overset_user_data:
mesh_group:
- overset_name: oset_n
mesh_parts: [fluid-HEX]
wall_parts: [block]
ovset_parts: [ovst_bdy]

solution_options:
name: myOptions
use_balanced_buoyancy_force: yes

options:
- hybrid_factor:
velocity: 0.05
volume_of_fluid: 0.0

- upw_factor:
velocity: 0.0

- limiter:
volume_of_fluid: yes

- consistent_mass_matrix_png:
pressure: no

- source_terms:
momentum:
- buoyancy_density

- user_constants:
reference_density: 0.00
gravity: [0.0, 0.0, -9.81]

output:
output_data_base_name: out/damBreak.e
output_frequency: 10
output_node_set: yes
output_variables:
- density
- volume_of_fluid
- velocity
- pressure
- dvolume_of_fluiddx
- dpressuredx
- iblank
Time_Integrators:
- StandardTimeIntegrator:
name: ti_1
start_time: 0.0
termination_time: 2.0
time_step: 0.001
time_stepping_type: fixed
time_step_count: 0
second_order_accuracy: yes


realms:
- realm_1
19 changes: 19 additions & 0 deletions test/test_files/dam-break-block/dam-break-block.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

exawind:
nalu_wind_inp:
- dam-break-block-nalu.yaml
amr_wind_inp: dam-break-block-amr.inp
num_timesteps: 10
additional_picard_iterations: 2

nalu_vars:
- volume_of_fluid
- velocity
- density
- pressure
amr_cell_vars:
- vof
- velocity
- density
amr_node_vars:
- p
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
time.stop_time = 200 # Max (simulated) time to evolve
time.max_step = -10 # Max number of time steps

time.initial_dt = -0.05 # Use this constant dt if > 0
time.fixed_dt = 0.01
time.cfl = 0.95 # CFL factor
time.plot_interval = 10 # Steps between plot files
incflo.do_initial_proj = 0
incflo.initial_iterations = 0

io.outputs = density vof velocity p gp reference_pressure ow_velocity ow_levelset
io.int_outputs = iblank_cell iblank_node

incflo.use_godunov = 1
incflo.godunov_type="weno_z"
incflo.diffusion_type = 0
transport.model = TwoPhaseTransport
transport.laminar_prandtl = 0.7
transport.turbulent_prandtl = 0.3333
turbulence.model = Laminar

transport.viscosity_fluid1=1e-3
transport.viscosity_fluid2=1e-5

incflo.physics = MultiPhase OceanWaves
OceanWaves.label = Wave1
OceanWaves.Wave1.type = StokesWaves
OceanWaves.Wave1.order=5
OceanWaves.Wave1.wave_height=0.3327 # nominal: 0.37
OceanWaves.Wave1.wave_period=1.536 # nominal: 1.533
OceanWaves.Wave1.water_depth=10.0
OceanWaves.Wave1.relax_zone_gen_length=4.801496963
OceanWaves.Wave1.numerical_beach_length=9.602993926
OceanWaves.Wave1.numerical_beach_length_factor=2.0
OceanWaves.Wave1.zero_sea_level=0.0
MultiPhase.density_fluid1=1000.
MultiPhase.density_fluid2=1.
ICNS.source_terms = GravityForcing

ICNS.use_perturb_pressure = true
ICNS.reconstruct_true_pressure = true
VOF.replace_masked = true
Overset.disable_coupled_mac_proj = true
Overset.disable_coupled_nodal_proj = true

amr.n_cell = 128 48 56
amr.max_level = 1

geometry.prob_lo = -9.602993926 -5.25 -10.0 # Lo corner coordinates
geometry.prob_hi = 19.205987852 5.25 2.4007484815 # Hi corner coordinates
geometry.is_periodic = 0 0 0 # Periodicity x y z (0/1)

tagging.labels = refine0
tagging.refine0.type = GeometryRefinement
tagging.refine0.shapes = c0 b0
tagging.refine0.level = 0

tagging.refine0.c0.type = cylinder
tagging.refine0.c0.start = 0.0 0.0 -2.0
tagging.refine0.c0.end = 0.0 0.0 1.5
tagging.refine0.c0.outer_radius = 0.5

tagging.refine0.b0.type = box
tagging.refine0.b0.origin = -10.0 -5.5 -0.5
tagging.refine0.b0.xaxis = 30.0 0.0 0.0
tagging.refine0.b0.yaxis = 0.0 11.0 0.0
tagging.refine0.b0.zaxis = 0.0 0.0 1.0

xlo.type = "wave_generation"
xhi.type = "pressure_outflow"
ylo.type = "slip_wall"
yhi.type = "slip_wall"
zlo.type = "slip_wall"
zhi.type = "slip_wall"

incflo.verbose = 0 # incflo_level
Loading

0 comments on commit 97d0dbc

Please sign in to comment.