Skip to content

Commit

Permalink
Regression tests for two-phase solver with empty Nalu-Wind domains (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn authored Aug 8, 2024
1 parent 70dc580 commit f5a5a97
Show file tree
Hide file tree
Showing 10 changed files with 664 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ add_test_r(nalu-nalu-cylinder-motion)
add_test_r(amr-nalu-cylinder-motion)
add_test_r(zalesak)
add_test_r(hybrid-multi-cylinder)

add_test_r(flat-surface)
add_test_r(sloshing-tank)
add_test_r(linear-waves)
52 changes: 52 additions & 0 deletions test/test_files/flat-surface/flat-surface-amr.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
time.stop_time = 2 # Max (simulated) time to evolve
time.max_step = -10 # Max number of time steps

time.initial_dt = -0.05
time.fixed_dt = 0.0005
time.cfl = 0.95
time.plot_interval = 10
incflo.do_initial_proj = 0
incflo.initial_iterations = 0

io.outputs = density vof velocity p gp levelset u_mac v_mac w_mac
io.int_outputs = iblank_cell iblank_node

incflo.use_godunov = 1
incflo.godunov_type="weno_z"
transport.model = TwoPhaseTransport
transport.viscosity_fluid1=1e-5
transport.viscosity_fluid2=1e-5
transport.laminar_prandtl = 0.7
transport.turbulent_prandtl = 0.3333
turbulence.model = Laminar

incflo.physics = MultiPhase SloshingTank
MultiPhase.density_fluid1 =1000.
MultiPhase.density_fluid2 =1.
MultiPhase.water_level =-0.1015625
SloshingTank.amplitude = 0
SloshingTank.water_level =-0.1015625

ICNS.source_terms = GravityForcing
ICNS.use_perturb_pressure = false
VOF.replace_masked = true

Overset.disable_coupled_mac_proj = true
Overset.disable_coupled_nodal_proj = true
Overset.verbose = 1

amr.n_cell = 64 64 64 # Grid cells at coarsest AMRlevel
amr.max_level = 0

geometry.prob_lo = -0.5 -0.5 -0.5 # Lo corner coordinates
geometry.prob_hi = 0.5 0.5 0.5 # Hi corner coordinates
geometry.is_periodic = 0 0 0 # Periodicity x y z (0/1)

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

incflo.verbose = 0 # incflo_level
141 changes: 141 additions & 0 deletions test/test_files/flat-surface/flat-surface-nalu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
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: "generated:48x48x48|bbox:-0.25,-0.25,-0.25,0.25,0.25,0.25|sideset:xXyYzZ|show"
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:

- user_function: ic_1
target_name: block_1
user_function_name:
volume_of_fluid: sloshing_tank
user_function_parameters:
volume_of_fluid: [-0.1015625, 0.0, 0.25, 0.03]

- constant: ic_1
target_name: block_1
value:
pressure: 0.0
velocity: [0.0, 0.0, 0.0]

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

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

boundary_conditions:

- overset_boundary_condition: bc_overset
overset_connectivity_type: tioga
overset_user_data:
mesh_group:
- overset_name: oset_n
mesh_parts: [block_1]
ovset_parts: [surface_1,surface_2,surface_3,surface_4,surface_5,surface_6]

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/flatSurface.e
output_frequency: 5
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.0005
time_stepping_type: fixed
time_step_count: 0
second_order_accuracy: yes


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

exawind:
nalu_wind_inp:
- flat-surface-nalu.yaml
amr_wind_inp: flat-surface-amr.inp
num_timesteps: 5
additional_picard_iterations: 2

nalu_vars:
- volume_of_fluid
- velocity
- density
- pressure
amr_cell_vars:
- vof
- velocity
- density
amr_node_vars:
- p
78 changes: 78 additions & 0 deletions test/test_files/linear-waves/linear-waves-amr.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# SIMULATION STOP #
#.......................................#
time.stop_time = 20 # Max (simulated) time to evolve
time.max_step = -1 # Max number of time steps
io.outputs = density vof ow_vof ow_levelset ow_velocity velocity p levelset
io.int_outputs = iblank_cell

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# TIME STEP COMPUTATION #
#.......................................#
time.initial_dt = 0.01
time.fixed_dt = 0.002 # Use this constant dt if > 0
time.cfl = 0.95 # CFL factor
time.use_force_cfl= false
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# INPUT AND OUTPUT #
#.......................................#
time.plot_interval = 10 # Steps between plot files
time.checkpoint_interval = -1 # Steps between checkpoint files

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
#.......................................#
incflo.use_godunov = 1
incflo.godunov_type="weno_z"
incflo.mflux_type="minmod"
transport.model = TwoPhaseTransport
transport.viscosity_fluid1=1e-3
transport.viscosity_fluid2=1e-5
transport.laminar_prandtl = 0.7
transport.turbulent_prandtl = 0.3333
turbulence.model = Laminar

incflo.physics = MultiPhase OceanWaves
OceanWaves.label = Wave1
OceanWaves.Wave1.type = LinearWaves
OceanWaves.Wave1.wave_height=0.1
OceanWaves.Wave1.wave_length=1.0
OceanWaves.Wave1.water_depth=1.015625
OceanWaves.Wave1.zero_sea_level = 0.015625
OceanWaves.Wave1.relax_zone_gen_length=1.5
OceanWaves.Wave1.numerical_beach_length=1.5
MultiPhase.density_fluid1=1000.
MultiPhase.density_fluid2=1.
ICNS.source_terms = GravityForcing

incflo.initial_iterations = 0
incflo.do_initial_proj = false

Overset.disable_coupled_mac_proj = true
Overset.disable_coupled_nodal_proj = true

MultiPhase.verbose=0
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# ADAPTIVE MESH REFINEMENT #
#.......................................#
amr.n_cell = 256 32 64 # Grid cells at coarsest AMRlevel
amr.max_level = 0
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# GEOMETRY #
#.......................................#
geometry.prob_lo = 0.0 -0.5 -1.0 # Lo corner coordinates
geometry.prob_hi = 8. 0.5 1.0 # Hi corner coordinates
geometry.is_periodic = 0 1 0 # Periodicity x y z (0/1)

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

zlo.type = "slip_wall"
zhi.type = "slip_wall"
zlo.vof_type = "zero_gradient"
zhi.vof_type = "zero_gradient"

incflo.verbose=0

Loading

0 comments on commit f5a5a97

Please sign in to comment.