Simple flow through an axisymmetric pipe
compressibleFlow/axisymmetricPipeFlow.yaml
---
test:
# a unique test name for this integration tests
name: axisymmetricPipeFlow
# create a default assert that compares the log file
assert: "inputs/compressibleFlow/axisymmetricPipeFlow/axisymmetricPipeFlow.txt"
# metadata for the simulation
environment:
title: _axisymmetricPipeFlow
tagDirectory: false
# global arguments that can be used by petsc
arguments: [ ]
# set up the time stepper responsible for marching in time
timestepper:
# write the output to show the mesh
io:
interval: 0
# time stepper specific input arguments
arguments:
ts_type: rk
ts_max_time: 100000
ts_max_steps: 50
ts_dt: 1.0E-10
ts_adapt_safety: 0.9
ts_adapt_type: physicsConstrained
# create a simple box mesh for simulation
domain: !ablate::domain::MeshGenerator
name: exampleAxisymmetricMesh
# specify the axisymmetric mesh description
description: !ablate::domain::descriptions::Axisymmetric
axis:
start: [ 0.0, 0.0, 0.0 ]
length: 0.5
nodes: 30 # one more node than slice
radius: ".05 + (z-.25)*(z-.25)"
numberWedges: 15
numberShells: 10
# output the result label for interior cells
options:
# output the flow region to visually check the result
dm_label_view: flowRegion
# force the new mesh to check everything
dm_plex_check_all: true
# specify any modifications to be performed to the mesh/domain
modifiers:
- # use the newly labels to extrude the boundary. Do not extrude the cell
!ablate::domain::modifiers::ExtrudeLabel
regions:
- name: boundary
# mark all the resulting boundary faces with boundaryFaces label
boundaryRegion:
name: boundaryFaces
# tag the original mesh as the flow region
originalRegion:
name: flowRegion
# tag the new boundary cells for easy boundary condition specifications
extrudedRegion:
name: boundaryCells
# if using mpi, this modifier distributes cells
- !ablate::domain::modifiers::DistributeWithGhostCells
ghostCellDepth: 2
# setup some dummy fields
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
# species are added to the flow through the eos. This allows testing of the species transport equations
species: [ N2, H2O, O2 ]
# by adding a pressure field the code will compute and output pressure
- name: pressure
location: AUX
type: FVM
# initialize the dummy field
initialization:
# 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:
&flowFieldState
eos: *eos
pressure: 101325.0
temperature: 300
velocity: "0.0, 0.0, 0.0"
# individual mass fractions must be passed to the flow field state to compute density, energy, etc.
other: !ablate::finiteVolume::fieldFunctions::MassFractions
eos: *eos
values:
- fieldName: N2
field: "z > 0.25 ? .2 : 1.0"
- fieldName: H2O
field: "z> 0.25 ? .3 :0"
- fieldName: O2
field: " z > 0.25 ? .5 : 0"
# the same state can be used to internalize the DensityMassFractions field from density and mass fractions
- !ablate::finiteVolume::fieldFunctions::DensityMassFractions
state: *flowFieldState
# this is a test input file with no solvers
solvers:
# The compressible flow solver will solve the compressible flow equations over the interiorCells
- !ablate::finiteVolume::CompressibleFlowSolver
id: flowField
# only apply this solver to the flowRegion, area without faces
region:
name: flowRegion
additionalProcesses:
- !ablate::finiteVolume::processes::PressureGradientScaling
&pgs
eos: *eos
alphaInit: 100.0
maxAlphaAllowed: 100.0
domainLength: 0.165354
log: !ablate::monitors::logs::CsvLog
name: pgsLog
# a flux calculator must be specified to so solver for advection
fluxCalculator: !ablate::finiteVolume::fluxCalculator::AusmpUp
pgs: *pgs
# the default transport object assumes constant values for k, mu, diff
transport:
k: .2
mu: .1
diff: 1E-4
# cfl is used to compute the physics time step
parameters:
cfl: 0.5
# share the existing eos with the compressible flow solver
eos: *eos
monitors:
# output the timestep and dt at each time step
- !ablate::monitors::TimeStepMonitor
interval: 10
# use a boundary solver to update the cells in the gMsh inlet region to represent an inlet
- !ablate::boundarySolver::BoundarySolver
id: inlet
region:
name: lowerCap
fieldBoundary:
name: boundaryFaces
mergeFaces: false
processes:
- !ablate::boundarySolver::lodi::Inlet
eos: *eos
pgs: *pgs
velocity: "0.0, 0.0, min(10, 10*t)" # for stability, increase the velocity slowly
# use a boundary solver to update the cells in the gMsh outlet region to represent an open pipe
- !ablate::boundarySolver::BoundarySolver
id: openBoundary
region:
name: upperCap
fieldBoundary:
name: boundaryFaces
mergeFaces: true
processes:
- !ablate::boundarySolver::lodi::OpenBoundary
eos: *eos
reflectFactor: 0.0
referencePressure: 101325.0
maxAcousticsLength: 1
pgs: *pgs
# use a boundary solver to update the cells in the wall region to represent standard wall
- !ablate::boundarySolver::BoundarySolver
id: wall
region:
name: outerShell
fieldBoundary:
name: boundaryFaces
mergeFaces: true
processes:
- !ablate::boundarySolver::lodi::IsothermalWall
eos: *eos
pgs: *pgs