This is the lodi validation case from Poinsot and Lele Boundary Conditions for Direct Simulations of Compressible Viscous Flows

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/compressibleFlowVortexLodi.yaml

---
test:
  # a unique test name for this integration tests
  name: compressibleFlowVortexLodi
  # run mpi with two ranks
  ranks: 2
  # create a default assert that compares the log file
  assert: "inputs/compressibleFlow/compressibleFlowVortexLodi.txt"

# metadata for the simulation
environment:
  title: _compressibleFlowVortex
  tagDirectory: false
arguments: {}
# set up the time stepper responsible for marching in time
timestepper:
  name: theMainTimeStepper
  # 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: 25
    ts_max_time: 0.002655211423

  # 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:
    # 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

    # only apply this solver to the interior cells
    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 #the inlet velocity is selected from the initial conditions
        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