This problem statement tests pipe flow results suing both a lodi isothermal wall and sublimation boundary condition. The sublimation uses a very high latentHeatOfFusion resulting is no blowing and therefore should behave like a wall.
compressibleFlow/compressibleSublimationPipe.yaml
---
test:
# a unique test name for this integration tests
name: compressibleSublimationPipe
# run mpi with two ranks
ranks: 2
# create a default assert that compares the log file
assert: "inputs/compressibleFlow/compressibleSublimationPipe/compressibleSublimationPipe.txt"
# metadata for the simulation
environment:
title: _compressibleFlowPgsLodi
tagDirectory: false
arguments: { }
# set up the time stepper responsible for marching in time
timestepper:
name: theMainTimeStepper
arguments:
ts_type: rk
ts_max_time: 100000
ts_max_steps: 50
ts_dt: 1.0E-10
ts_adapt_safety: 0.9
# io controls how often the results are saved to a file for visualization and restart
io:
interval: 5 # results are saved at every 5 steps. In real simulations this should be much larger.
# 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: [ 50, 10 ]
lower: [ 0.0, 0.0 ]
upper: [ .5, .1 ]
# 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
ghostCellDepth: 2
# add any modifications after the ghost boundaries have been set up
postModifiers:
# tag the boundary faces along the bottom boundary so that they can be excluded from the interior cells. The flow solver can not reach into boundary cells/faces used by the sublimation boundary condition
- !ablate::domain::modifiers::TagLabelInterface
# tag the bottom boundary faces
leftRegion:
name: boundaryCellsBottom
rightRegion:
name: interiorCells
boundaryFaceRegion:
name: boundaryFaceBottom
# remove the boundaryFaceBottom from the interiorCells and name the result as flowRegion
- !ablate::domain::modifiers::SubtractLabel
differenceRegion:
name: flowRegion
minuendRegion:
name: interiorCells
subtrahendRegions:
- name: boundaryFaceBottom
incompleteLabel: true
- !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
# species are added to the flow through the eos. This allows testing of the species transport equations
species: [ N2, H2O, O2 ]
# define the field only over the domain cells, this prevents cells from being defined in unused corners
region:
name: domain
# by adding a pressure field the code will compute and output pressure
- name: pressure
location: AUX
type: FVM
region:
name: domain
# set the initial conditions of the flow field
initialization:
# 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:
&flowFieldState
eos: *eos
pressure: 101325.0
temperature: 300
velocity: "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
&massFractions
eos: *eos
values:
- fieldName: N2
field: "x > .1 ? .2 : 1.0"
- fieldName: H2O
field: " x> .1 ? .3 :0"
- fieldName: O2
field: " x > .1 ? .5 : 0"
# the same state can be used to internalize the DensityMassFractions field from density and mass fractions
- !ablate::finiteVolume::fieldFunctions::DensityMassFractions
state: *flowFieldState
solvers:
# The compressible flow solver will solve the compressible flow equations over the interiorCells
- !ablate::finiteVolume::CompressibleFlowSolver
id: vortexFlowField
# 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
# 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:
&transportModel
k: .2
mu: .1
diff: 1E-4
# share the existing eos with the compressible flow solver
eos: *eos
monitors:
# output the timestep and dt at each time step
- !ablate::monitors::TimeStepMonitor
# 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
mergeFaces: false
processes:
- !ablate::boundarySolver::lodi::Inlet
eos: *eos
pgs: *pgs
velocity: "min(10, 10*t), 0" # for stability, increase the velocity slowly
# use a boundary solver to update the cells in the boundaryCellsRight region to represent an open pipe
- !ablate::boundarySolver::BoundarySolver
id: openBoundary
region:
name: boundaryCellsRight
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 boundaryCellsTop region to represent standard wall
- !ablate::boundarySolver::BoundarySolver
id: topBoundary
region:
name: boundaryCellsTop
fieldBoundary:
name: boundaryFaces
mergeFaces: true
processes:
- !ablate::boundarySolver::lodi::IsothermalWall
eos: *eos
pgs: *pgs
# use a boundary solver to update the cells in the boundaryCellsBottom region to represent standard wall with a Sublimation BC
- !ablate::boundarySolver::BoundarySolver
id: bottomBoundary
region:
name: boundaryCellsBottom
fieldBoundary:
name: boundaryFaces
processes:
- !ablate::boundarySolver::physics::Sublimation
latentHeatOfFusion: 1E30 # very high to turn off boundary sublimation for testing
transportModel: *transportModel
eos: *eos
pgs: *pgs
massFractions: *massFractions
monitors:
# a monitor is needed to write to a hdf5
- !ablate::monitors::BoundarySolverMonitor