This is the lodi validation case from Poinsot and Lele (Boundary Conditions for Direct Simulations of Compressible Viscous Flows) but setup to test the restart capability of ablate.
Parameters
parameters | formula | value |
---|---|---|
l | Â | .5 |
L | Â | 1 |
pInf | Â | 101325.0 |
rhoInit | Â | 1.0 |
gamma | Â | 1.4 |
Rgas | Â | 287.0 |
c | sqrt(gamma*p/rho) | ~ 376.6178434435 |
uo | 1.1*c | 414.2796277878 |
Re | uo * l/nu = rho * uo * l /mu | 10,000 |
mu | (rho * uo * l)/Re | 0.02071398139 |
Vortex Params
parameters | value |
---|---|
C/(cl) | -.0005 |
C | -0.09415446086 |
Rc = 0.15*l | 0.075 |
Fields
- \[u_x = uo - C/(rho*Rc^2) * exp((-x^2 - y^2)/(2*Rc^2))*y\]
- \[u_y = + C/(rho*Rc^2) * exp((-x^2 - y^2)/(2*Rc^2))*x\]
- \[p = pinf + (rho*C^2)/Rc^2 * exp(-(x^2 - y^2)/(2*Rc^2))\]
- \[T = p/(Rgas*rho) = 1/(Rgas*rho) * (pinf + (rho*C^2)/Rc^2 * exp(-(x^2 - y^2)/(2*Rc^2)))\]
- \[timeEnd = 2*l/c = 0.002655211423\]
compressibleFlow/compressibleFlowVortexLodiRestart.yaml
---
test: !IntegrationRestartTest
# specify the basic test parameters for restart test
testParameters:
# a unique test name for this integration tests
name: compressibleFlowVortexLodiRestart
asserts:
- "inputs/compressibleFlow/compressibleFlowVortexLodiRestart.txt"
# upon restart, override some of the input parameters
restartOverrides:
timestepper::arguments::ts_max_steps: "20"
# metadata for the simulation
environment:
title: _compressibleFlowVortex
tagDirectory: false
arguments: {}
# set up the time stepper responsible for marching in time
timestepper:
name: theMainTimeStepper
# the Hdf5MultiFileSerializer writes each timestep state to a different file. Using a serializer allows for the simulation to be viewed and restarted
io: !ablate::io::Hdf5MultiFileSerializer
interval: 0
# time stepper specific input arguments.
arguments:
ts_type: rk
ts_adapt_type: physics # overwrite and set the time step based upon the CFL constraint
ts_max_steps: 10
ts_max_time: 0.002655211423
ts_adapt_safety: 1.0
# the BoxMeshBoundaryCells domain adds an extra layer of boundary cells to the outside of the domain and
# tags these cells with special labels
domain: !ablate::domain::BoxMeshBoundaryCells
name: simpleBoxField
faces: [ 25, 25]
lower: [ 0.0, -.5 ]
upper: [ 1.0, .5 ]
# pass in these options to petsc when setting up the domain. Using an option list here prevents command line arguments from being seen.
options:
dm_refine: 0 # must be zero when using the BoxMeshBoundaryCells
preModifiers:
# if using mpi, this modifier distributes cells
- !ablate::domain::modifiers::DistributeWithGhostCells
# add any modifications after the ghost boundaries have been set up
postModifiers:
# to simplify setup, the boundaryCellsRight, boundaryCellsTop, boundaryCellsBottom are all labeled as openBoundaryLabel
- !ablate::domain::modifiers::MergeLabels
mergedRegion:
name: openBoundaryLabel
regions:
- name: boundaryCellsRight
- name: boundaryCellsTop
- name: boundaryCellsBottom
# if using a FVM ghost boundary cells must be added
- !ablate::domain::modifiers::GhostBoundaryCells
fields:
# all fields must be defined before solvers. The ablate::finiteVolume::CompressibleFlowFields is a helper
# class that creates the required fields for the compressible flow solver (rho, rhoE, rhoU, ...)
- !ablate::finiteVolume::CompressibleFlowFields
eos: !ablate::eos::PerfectGas &eos
parameters:
gamma: 1.4
Rgas : 287.0
# define the field only over the domain cells, this prevents cells from being defined in unused corners
region:
name: domain
# set the initial conditions of the flow field
initialization:
# all fields must be defined before solvers. The ablate::finiteVolume::CompressibleFlowFields is a helper
# class that creates the required fields for the compressible flow solver (rho, rhoE, rhoU, ...)
- !ablate::finiteVolume::fieldFunctions::Euler
state:
eos: *eos
pressure:
!ablate::mathFunctions::Formula # the formula mathFunction allows specifying constants to use in the formula
formula: pinf + (rho*C^2)/Rc^2 * exp(-((x-l)^2 + (y)^2)/(2*Rc^2))
constants:
# define the constants used by the formulas and shared with the temperature and velocity
&constants
pinf: 101325.0
rho: 1.0
gamma: 1.4
Rgas: 287.0
Rc: 0.075
C: -0.09415446086
uo: 414.2796277878
l: .5
temperature:
!ablate::mathFunctions::Formula
formula: 1/(Rgas*rho) * (pinf + (rho*C^2)/Rc^2 * exp(-((x-l)^2 +(y)^2)/(2*Rc^2)))
constants: *constants
velocity:
!ablate::mathFunctions::Formula
formula: uo - C/(rho*Rc^2) * exp((-(x-l)^2 - (y)^2)/(2*Rc^2))*y, C/(rho*Rc^2) * exp((-(x-l)^2 - (y)^2)/(2*Rc^2))*(x-l)
constants: *constants
solvers:
# The compressible flow solver will solve the compressible flow equations over the interiorCells
- !ablate::finiteVolume::CompressibleFlowSolver
id: vortexFlowField
region:
name: interiorCells
# a flux calculator must be specified to so solver for advection
fluxCalculator: !ablate::finiteVolume::fluxCalculator::AusmpUp
mInf: .3
# cfl is used to compute the physics time step
parameters:
cfl: 0.5
# the default transport object assumes constant values for k, mu, diff
transport:
mu: 0.02071398139
monitors:
# output the max, min average value of the euler field at every time step
- !ablate::monitors::MaxMinAverage
field: euler
# share the existing eos with the compressible flow solver
eos: *eos
# use a boundary solver to update the cells in the boundaryCellsLeft region to represent an inlet
- !ablate::boundarySolver::BoundarySolver
id: inlet
region:
name: boundaryCellsLeft
fieldBoundary:
name: boundaryFaces
processes:
- !ablate::boundarySolver::lodi::Inlet
eos: *eos
# use a boundary solver to update the cells in the openBoundaryLabel region to represent an open boundary
- !ablate::boundarySolver::BoundarySolver
id: openBoundary
region:
name: openBoundaryLabel
fieldBoundary:
name: boundaryFaces
processes:
- !ablate::boundarySolver::lodi::OpenBoundary
eos: *eos
reflectFactor: 0.0
referencePressure: 101325.0
maxAcousticsLength: 1