Skip to content

Commit

Permalink
Enable int field refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed Nov 15, 2024
1 parent 9ecbeae commit f3890c2
Show file tree
Hide file tree
Showing 3 changed files with 359 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ add_test_re(abl_godunov_rayleigh_damping)
add_test_re(rankine)
add_test_re(rankine-sym)
add_test_re(terrain_box)
add_test_re(terrain_box_amr)
add_test_re(box_refinement)
add_test_re(cylinder_refinement)
add_test_re(freestream_godunov_inout)
Expand Down
290 changes: 290 additions & 0 deletions test/test_files/terrain_box_amr/terrain.amrwind
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
16
16
300.0
326.667
353.333
380.0
406.667
433.333
460.0
486.667
513.333
540.0
566.667
593.333
620.0
646.667
673.333
700.0
300.0
326.667
353.333
380.0
406.667
433.333
460.0
486.667
513.333
540.0
566.667
593.333
620.0
646.667
673.333
700.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
200.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
68 changes: 68 additions & 0 deletions test/test_files/terrain_box_amr/terrain_box_amr.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# SIMULATION STOP #
#.......................................#
time.stop_time = -100.0 # Max (simulated) time to evolve
time.max_step = 10 # Max number of time steps

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# TIME STEP COMPUTATION #
#.......................................#
time.fixed_dt = -1 # Use this constant dt if > 0
time.cfl = 0.9 # CFL factor

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# INPUT AND OUTPUT #
#.......................................#
time.plot_interval = 1000000 # Steps between plot files
time.checkpoint_interval = -1 # Steps between checkpoint files

#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# PHYSICS #
#.......................................#
ConstValue.density.value = 1.0
ConstValue.velocity.value = 1.0 0.0 0.0

incflo.use_godunov = 1
incflo.diffusion_type = 2
incflo.do_initial_proj = 0
incflo.initial_iterations = 0
transport.viscosity = 1.0e-15
transport.laminar_prandtl = 0.7
transport.turbulent_prandtl = 0.3333
turbulence.model = Laminar
io.int_outputs = terrain_blank terrain_drag
incflo.physics = FreeStream TerrainDrag
ICNS.source_terms = DragForcing
DragForcing.is_laminar = 1
TerrainDrag.terrain_file = "terrain.amrwind"
amr.n_cell = 56 56 104 # Grid cells at coarsest AMRlevel
amr.max_level = 1 # Max AMR level in hierarchy
geometry.prob_lo = 0 0 0
geometry.prob_hi = 1024 1024 1024
geometry.is_periodic = 0 0 0 # Periodicity x y z (0/1)

# Boundary conditions
xlo.type = "mass_inflow"
xlo.density = 1.0
xlo.velocity = 1.0 0.0 0.0
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

incflo.post_processing = sampling
sampling.labels = volume1
sampling.fields = velocity
sampling.int_fields = terrain_blank
sampling.volume1.type = VolumeSampler
sampling.volume1.hi = 600 600 200
sampling.volume1.lo = 400 400 0.0
sampling.volume1.num_points = 10 10 20

tagging.labels = terrain
tagging.terrain.type = FieldRefinement
tagging.terrain.field_name = terrain_blank
tagging.terrain.grad_error = 0.1 0.1 0.1 0.1

0 comments on commit f3890c2

Please sign in to comment.