Skip to content

Commit

Permalink
EB-FlowOverCylinder Case (#827)
Browse files Browse the repository at this point in the history
Co-authored-by: Bruce Perry <[email protected]>
  • Loading branch information
dmontgomeryNREL and baperry2 authored Jul 23, 2024
1 parent 989b9de commit 1ce0ed1
Show file tree
Hide file tree
Showing 16 changed files with 528 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Docs/sphinx/ebverification/FlowPastCylinder/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. _EB-FlowPastCylinder:

Flow Past a Cylinder
~~~~~~~~~~~~~~~~~~~~~~~~~~

Case description
################

This case simulates 2D flow past a cylinder for Reynolds numbers :math:`\text{Re} = 10,500`. The geometry is defined as a rectangle with height :math:`D = 4` [cm] and length :math:`L = 12` [cm]. The inlet flow is constant in the positive x-direction with :math:`u(y) = U_{max}`, provided a Reynolds number

.. math::
\text{Re} = \frac{\rho U_{max} D}{\mu},
where :math:`\rho` is the density and :math:`\mu` is the dynamic viscosity.


Domain definition
##################################
The cylinder with radius :math:`r=5` is centered at (0,0) on the upstream side of the domain as seen below.

.. image:: /ebverification/FlowPastCylinder/domain.png
:width: 450pt

Results: Re = 10
##################################

.. image:: /ebverification/FlowPastCylinder/Re10.png
:width: 450pt

Results: Re = 500
##################################

.. image:: /ebverification/FlowPastCylinder/Re500.png
:width: 450pt

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Docs/sphinx/ebverification/ebverification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ description and the source code for these test cases are included below.
+------------------------------------------------------------------------------------------------+---------------------------------------+---+---+---+---+
| :ref:`EB-ConvergingNozzle` | analytical | x | | | |
+------------------------------------------------------------------------------------------------+---------------------------------------+---+---+---+---+
| :ref:`EB-FlowPastCylinder` | vortex shedding for high Re | x | | | |
+------------------------------------------------------------------------------------------------+---------------------------------------+---+---+---+---+


.. toctree::
Expand All @@ -66,3 +68,4 @@ description and the source code for these test cases are included below.
C13/README
C14/README
ConvergingNozzle/README
FlowPastCylinder/README
3 changes: 3 additions & 0 deletions Exec/RegTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ add_subdirectory(Soot-ZeroD)
if(NOT PELE_EXCLUDE_BUILD_IN_CI)
add_subdirectory(Soot-Flame)
endif()
if(PELE_DIM EQUAL 2)
add_subdirectory(EB-FlowPastCylinder)
endif()
if(PELE_DIM EQUAL 3)
add_subdirectory(EB-C7)
add_subdirectory(EB-C8)
Expand Down
7 changes: 7 additions & 0 deletions Exec/RegTests/EB-FlowPastCylinder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set(PELE_PHYSICS_EOS_MODEL GammaLaw)
set(PELE_PHYSICS_CHEMISTRY_MODEL Null)
set(PELE_PHYSICS_TRANSPORT_MODEL Constant)
set(PELE_PHYSICS_ENABLE_SOOT OFF)
set(PELE_PHYSICS_ENABLE_SPRAY OFF)
set(PELE_PHYSICS_SPRAY_FUEL_NUM 0)
include(BuildExeAndLib)
38 changes: 38 additions & 0 deletions Exec/RegTests/EB-FlowPastCylinder/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# AMReX
DIM = 2
COMP = gnu
PRECISION = DOUBLE

# Profiling
PROFILE = FALSE
TINY_PROFILE = FALSE
COMM_PROFILE = FALSE
TRACE_PROFILE = FALSE
MEM_PROFILE = FALSE
USE_GPROF = FALSE

# Performance
USE_MPI = TRUE
USE_OMP = FALSE
USE_CUDA = FALSE
USE_HIP = FALSE
USE_SYCL = FALSE

# Debugging
DEBUG = FALSE
FSANITIZER = FALSE
THREAD_SANITIZER = FALSE

# PeleC
PELE_CVODE_FORCE_YCORDER = FALSE
PELE_USE_MAGMA = FALSE
PELE_COMPILE_AJACOBIAN = FALSE
Eos_Model := GammaLaw
Chemistry_Model := Null
Transport_Model := Constant

# GNU Make
Bpack := ./Make.package
Blocs := .
PELE_HOME := ../../..
include $(PELE_HOME)/Exec/Make.PeleC
3 changes: 3 additions & 0 deletions Exec/RegTests/EB-FlowPastCylinder/Make.package
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CEXE_headers += prob.H
CEXE_headers += prob_parm.H
CEXE_sources += prob.cpp
14 changes: 14 additions & 0 deletions Exec/RegTests/EB-FlowPastCylinder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 2D Flow over a cylinder

Building on the [EB-C10 case](https://amrex-combustion.github.io/PeleC/ebverification/C10/README.html), this case prescribes flow over a cylinder.


## Short case description

| | description |
|:-------------------|:----------------------------------------------------|
| Problem definition | Flow over a cylinder |
| EB geometry | embedded cylinder |
| EOS | GammaLaw |
| Multi-level | no |
| Metric | vortex shedding occurs for Re = 500 |
77 changes: 77 additions & 0 deletions Exec/RegTests/EB-FlowPastCylinder/eb-flowpastcylinder-re10.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# ------------------ INPUTS TO MAIN PROGRAM -------------------
# max_step = 100
stop_time = 0.05

# PROBLEM SIZE & GEOMETRY
geometry.is_periodic = 0 0 0
geometry.coord_sys = 0 # 0 => cart
geometry.prob_lo = -2. -2. -2.
geometry.prob_hi = 10. 2. 2.
amr.n_cell = 192 64 16

# >>>>>>>>>>>>> BC KEYWORDS <<<<<<<<<<<<<<<<<<<<<<
# Interior, UserBC, Symmetry, SlipWall, NoSlipWall
# >>>>>>>>>>>>> BC KEYWORDS <<<<<<<<<<<<<<<<<<<<<<

pelec.lo_bc = "Hard" "SlipWall" "FOExtrap"
pelec.hi_bc = "Hard" "SlipWall" "FOExtrap"

# Problem setup
prob.p = 1013250.
prob.T = 298.
prob.Re = 10.
prob.Ma = 0.2
prob.Pr = 0.7
pelec.eb_boundary_T = 298.
pelec.eb_isothermal = 1

# WHICH PHYSICS
pelec.do_hydro = 1
pelec.do_mol = 0
pelec.do_react = 0
pelec.allow_negative_energy = 0
pelec.diffuse_temp = 1
pelec.diffuse_vel = 1
pelec.diffuse_spec = 0
pelec.diffuse_enth = 1

# TIME STEP CONTROL
pelec.dt_cutoff = 5.e-20 # level 0 timestep below which we halt
pelec.cfl = 0.9 # cfl number for hyperbolic system
pelec.init_shrink = 0.1 # scale back initial timestep
pelec.change_max = 1.05 # maximum increase in dt over successive steps

# DIAGNOSTICS & VERBOSITY
pelec.sum_interval = 1 # timesteps between computing mass
pelec.v = 1 # verbosity in PeleC cpp files
amr.v = 1 # verbosity in Amr.cpp
#amr.grid_log = grdlog # name of grid logging file

# REFINEMENT / REGRIDDING
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 5 # how often to regrid
amr.blocking_factor = 16 # block factor in grid generation
amr.max_grid_size = 64

# CHECKPOINT FILES
amr.checkpoint_files_output = 1
amr.check_file = chkReLow # root name of checkpoint file
amr.check_int = 100000 # number of timesteps between checkpoints

# PLOTFILES
amr.plot_files_output = 1
amr.plot_file = pltReLow
amr.plot_int = 20000
amr.derive_plot_vars=ALL

# EB
ebd.boundary_grad_stencil_type = 0

# for 2D (need a sphere):
eb2.geom_type = "sphere"
eb2.sphere_radius = 0.5
eb2.sphere_center = 0 0 0
eb2.sphere_has_fluid_inside = 0
eb2.small_volfrac = 1.0e-4

76 changes: 76 additions & 0 deletions Exec/RegTests/EB-FlowPastCylinder/eb-flowpastcylinder-re500.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# ------------------ INPUTS TO MAIN PROGRAM -------------------
# max_step = 100
stop_time = 0.05

# PROBLEM SIZE & GEOMETRY
geometry.is_periodic = 0 0 0
geometry.coord_sys = 0 # 0 => cart
geometry.prob_lo = -2. -2. -2.
geometry.prob_hi = 10. 2. 2.
amr.n_cell = 192 64 16

# >>>>>>>>>>>>> BC KEYWORDS <<<<<<<<<<<<<<<<<<<<<<
# Interior, UserBC, Symmetry, SlipWall, NoSlipWall
# >>>>>>>>>>>>> BC KEYWORDS <<<<<<<<<<<<<<<<<<<<<<

pelec.lo_bc = "Hard" "SlipWall" "FOExtrap"
pelec.hi_bc = "Hard" "SlipWall" "FOExtrap"

# Problem setup
prob.p = 1013250.
prob.T = 298.
prob.Re = 500.
prob.Ma = 0.2
prob.Pr = 0.7
pelec.eb_boundary_T = 298.
pelec.eb_isothermal = 1

# WHICH PHYSICS
pelec.do_hydro = 1
pelec.do_mol = 0
pelec.do_react = 0
pelec.allow_negative_energy = 0
pelec.diffuse_temp = 1
pelec.diffuse_vel = 1
pelec.diffuse_spec = 0
pelec.diffuse_enth = 1

# TIME STEP CONTROL
pelec.dt_cutoff = 5.e-20 # level 0 timestep below which we halt
pelec.cfl = 0.7 # cfl number for hyperbolic system
pelec.init_shrink = 0.1 # scale back initial timestep
pelec.change_max = 1.05 # maximum increase in dt over successive steps

# DIAGNOSTICS & VERBOSITY
pelec.sum_interval = 1 # timesteps between computing mass
pelec.v = 1 # verbosity in PeleC cpp files
amr.v = 1 # verbosity in Amr.cpp
#amr.grid_log = grdlog # name of grid logging file

# REFINEMENT / REGRIDDING
amr.max_level = 0 # maximum level number allowed
#amr.ref_ratio = 2 2 2 2 # refinement ratio
#amr.regrid_int = 5 # how often to regrid
amr.blocking_factor = 16 # block factor in grid generation
amr.max_grid_size = 64

# CHECKPOINT FILES
amr.checkpoint_files_output = 1
amr.check_file = chkReHigh # root name of checkpoint file
amr.check_int = 100000 # number of timesteps between checkpoints

# PLOTFILES
amr.plot_files_output = 1
amr.plot_file = pltReHigh
amr.plot_int = 20000
amr.derive_plot_vars=ALL

# EB
ebd.boundary_grad_stencil_type = 0

# for 2D (need a sphere):
eb2.geom_type = "sphere"
eb2.sphere_radius = 0.5
eb2.sphere_center = 0 0 0
eb2.sphere_has_fluid_inside = 0
eb2.small_volfrac = 1.0e-4
Loading

0 comments on commit 1ce0ed1

Please sign in to comment.