Skip to content

Commit

Permalink
more progress on turbinflow documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
baperry2 committed Apr 1, 2024
1 parent 9f2e720 commit 0dad956
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Docs/sphinx/Support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ Generating an initial condition file is as easy as: ::
Generating Inflow Files
~~~~~~~~~~~~~~~~~~~~~~~

The `TurbFileHIT` directory also contains C++ source code for a small program that reads the ``.dat`` files created using the python script
The ``TurbFileHIT`` directory also contains C++ source code for a small program that reads the ``.dat`` files created using the python script
above and saves them as AMReX data structures that can be read by the TurbInflow utility, which uses Taylor's hypothesis to provide
temporally varying boundary data by marching through the 3rd dimension of the HIT files at a constant velocity.

Build options can be specified in the ``GNUmakefile``. Notably, if you did not recursively clone PelePhysics with the AMReX submodule, you
will need to specify a path to AMReX (``AMREX_HOME``). In most cases, you should be able to directly build the utility simply by running: ::
will need to specify a path to AMReX (``AMREX_HOME``). But in most cases, you should be able to directly build the utility simply by running: ::

make -j

Expand Down
36 changes: 33 additions & 3 deletions Docs/sphinx/Utility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,44 @@ An additional script is provided to allow plotting of the PMF solutions. This sc
Turbulent Inflows
=================

Placeholder. PelePhysics supports the capability of the flow solvers to have spatially and temporally varying inflow conditions based on precomputed turbulence data.
PelePhysics supports the capability of the flow solvers to have spatially and temporally varying inflow conditions based on precomputed turbulence data (3 components of velocity fluctuations).
A three-dimensional synthetic istropic turbulence is generated and Taylor's hypothesis is used to convert this data into two-dimensional planar data by moving through the third dimension at fixed velocity (the TurbInflow capability is currently not supported for 2D simulations). To reduce memory requirements, a fixed number of planes in the third dimension are read at a time and then replaced when exhausted. This number of planes can be specified at runtime to balance I/O and memory requirements. Multiple turbulent inflow patches can be applied on any domain boundary or on multiple domain boundaries. If multiple patches overlap on the same face, the data from each overlapping patch are superimposed.

This PelePhysics utility provides the machinery to load the data files and interpolate in space and time onto boundary patches, which may or may not cover an entire boundary. Additional code within PeleC and PeleLMeX is required to drive this functionality, and the documentation for the relevant code should be consulted to fully understand the necessary steps. Typically, the TurbInflow capability provides veloicity fluctuations, and the mean inflow velocity must be provided through another means. For each code, an example test case for the capability is provided in `Exec/RegTests/TurbInflow`. Note that the turbulence data is always a square of size 2pi and has a fluctuation velocity scale of unity. Inputs are available as part of this utility to rescale the data as needed. If differently shaped inlet patches are required, this must be done by masking undesired parts of the patch on the PeleC or PeleLMeX side of the implementation.

Generating a turbulence file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The relevant data files are generated using the tools in ``Support/TurbFileHIT``
and usage inscructions are available in the :ref:`documentation <sec_turbfile>` on these tools.

and usage instructions are available in the :ref:`documentation <sec_turbfile>` on these tools.

Input file options
~~~~~~~~~~~~~~~~~~

The input file options that drive this utility (and thus are inherited by PeleC and PeleLMeX) are
provided below. ::

turbinflows=low high # Names of injections (can provide any number)

turbinflow.low.turb_file = TurbFileHIT/TurbTEST # Path to directory created in previous step
turbinflow.low.dir = 1 # Boundary normal direction (0,1, or 2) for patch
turbinflow.low.side = "low" # Boundary side (low or high) for patch
turbinflow.low.turb_scale_loc = 633.151 # Factor by which to scale the spatial coordinate between the data file and simulation
turbinflow.low.turb_scale_vel = 1.0 # Factor by which to scale the velcoity between the data file and simulation
turbinflow.low.turb_center = 0.005 0.005 # Center point where turbulence patch will be applied
turbinflow.low.turb_conv_vel = 5. # Velocity to move through the 3rd dimension to simulate time evolution
turbinflow.low.turb_nplane = 32 # Number of planes to read and store at a time
turbinflow.low.time_offset = 0.0 # Offset in time for reading through the 3rd dimension

turbinflow.high.turb_file = TurbFileHIT/TurbTEST # All same as above, but for second injection patch
turbinflow.high.dir = 1
turbinflow.high.side = "high"
turbinflow.high.turb_scale_loc = 633.151
turbinflow.high.turb_scale_vel = 1.0
turbinflow.high.turb_center = 0.005 0.005
turbinflow.high.turb_conv_vel = 5.
turbinflow.high.turb_nplane = 32
turbinflow.high.time_offset = 0.0006

Plt File Management
===================
Expand Down

0 comments on commit 0dad956

Please sign in to comment.