Simcenter STAR-CCM+ Swiss STAR-CCM+ Knife: [3] Ignore box: Robin, Zero Pressure Gradient and Slip Flow boundary conditions

Simcenter STAR-CCM+ Xcelerator Share


A simple tick in a small box can lead to new boundary conditions available to users. Examples shown for zero pressure gradients, general Robin boundary conditions with application to Slip flows.


The tools labelled as "Swiss STAR-CCM+ Knife" could be thought as a set of tools with the following properties:
  1. they are used sparsely, from time to time,
  2. they can save us a lot of work and save us from difficult situations,
  3. they must be used with care,
  4. if they are used improperly they can affect negatively our simulation results. 
Much in the spirit of the well-known Swiss penknife.

One of the theories trying to explain the sill intriguing Cambrian Explosion, points to the increase in complexity that can arise from tiny modifications in locations of a pool of genes called the homeobox. These are a set of genes that control the expression of other genes, so basically they can orchestrate the construction of body structures, and therefore, slight alterations in them can lead to huge changes in the final structure of the living organism without compromising its life.
We do still not have in STAR-CCM+ such homeobox, but, differences aside, we do possess a tiny box that allows you to Cambrian-expand the complexity of your boundary conditions: the Ignore Boundary Values box.
This is a box that appears whenever a new field function is defined.

User-added image
If the box is ticked, then STAR-CCM+ uses the cell value at a boundary, even if the boundary has a value.

Let's see this with an example. Imagine we define the following field function:

User-added image
The cellPressure field function is identical to the Pressure field function when evaluated at cells. However, at boundaries they differ. The former gives the value stored  at the cell centroid of the cell adjacent to the boundary and the latter gives the value stored at the boundary centroid.  That is, we have transferred the cell value to the boundary.
The use of the cell value increase greatly the flexibility in the definition of boundary condition. For example: how do we implement a zero gradient pressure boundary condition? Just use the above field function as input to the value of the pressure at the boundary. In this way, we are defining:
User-added image
and that is no more than a discretized version of null normal gradient at the boundary:

User-added image

What about a combination of  the usual Dirichlet boundary condition Pb = 0 with the Neumann boundary condition above? This is called a Robin boundary condition, where what is fixed is a linear combination of the physical variable and its derivative along the normal to the boundary:
User-added image 
(Robin boundary conditions are actually used, for example, when using Convection as Thermal Specification.)

Let's assume we want to set the value of the linear combination above to  c=0,  and we have both constants a,b>0.  This case can be also implemented as:
User-added image
with 0 <= <= 1.

The attached simulation saved in STAR-CCM+ v9.02 shows each of the above boundary conditions applied on the right side of a chamber where a pressure pulse is given on the left side. The videos below show how the pulse reacts to each of the three boundary conditions.

Let's begin with a Dirichlet boundary condition, or = 0:



A Neumann boundary condition, or = 1:


And a Robin boundary condition with = 0.9:


The ignore-box allows us to generally apply the above boundary conditions to all our physical equations. In the examples above we ve seen it applied to pressure boundary conditions. Another example, that is worthy of mention, is the use of Robin boundary conditions to approximate the slip flow regime. That is, those flows for which rarefaction effects start to become non-negligible and the molecular structure of the fluid can no longer be ignored. In the slip flow regime, departure from continuum behaviour is slight, corresponding to Knudsen numbers in the range of 10^-3 to 10^-1 and can be accommodated by just changing the no-slip boundary condition to one of partial slip:

User-added image


where Uw and dU/dn|w are velocity and normal derivative at the wall, Kn is the Knudsen number and c is a positive constant characterizing the molecular interaction of the gas with the wall.  That is completely analog to the Robin boundary condition shown above for the pressure. In particular,  the no-slip boundary is given by Kn=0, full slip is given by User-added image.
How do we implement it in the code? Just use our ignore box tool and define a field function as

User-added image


User-added image

where n is the distance between cell centroid and boundary centroid. How do we calculate that distance? Using again the ignore box tool. Define a field function, lets call it cellCentroid. Define it as $$Centroid (a vector function), and tick the ignore boundary value box. Then

n = mag($$Centroid - $$cellCentroid)

when evaluated at boundary faces.

Finally, you surely will ask yourself: Is there a boundary condition that allows the pressure pulse to pass through the boundary without reflections? Yes, indeed. In fact, the reflected wave has passed without reflection through the left wall. The boundary condition that allows this is the Freestream:


See also:
User Coding: How do I access variables on wall boundaries?
How to plot the near wall velocity?

and other Swiss STAR-CCM+ Knife tools:
Swiss STAR-CCM+ Knife: [1] Big Sources: How to override equations and fix cell physical values.
Swiss STAR-CCM+ Knife: [2] Taming of the Courant Number: Automatic Time-Step Control
Swiss STAR-CCM+ Knife: [4] Manual cosimulator: How to transfer information across multiple simulations via macro.
Swiss STAR-CCM+ Knife: [5] Pixel comparison: Integrate image processing tools in your CFD workflow.
Swiss STAR-CCM+ Knife: [7] Command and conquer: How to pass command line parameters to your macros.
Swiss STAR-CCM+ Knife: [8] Schmitt Trigger: Let STAR-CCM+ remember things.

KB Article ID# KB000032626_EN_US



Associated Components

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+