Simcenter STAR-CCM+ Simcenter STAR-CCM+: The effect of differencing scheme on numerical diffusion

2023-09-14T09:57:08.000-0400
Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

Summary

This FAQ demonstrates how to set up a simple test case to investigate the effect of differencing scheme to capture the gradient of a passive scalar. The FAQ also shows how to use Adaptive Mesh Refinement (AMR) to run the case.


Details

This work is based on similar tests carried out in STAR-CD:
STAR-CD: What is the effect of the differencing scheme on the numerical diffusion

The target is to investigate how well the numerical discretization scheme will capture the gradient of a passive scalar. In this very simple box case, a passive scalar with unity value is applied at one inlet with a velocity of 1 m/s. On the counterpart side, a passive scalar with a value of zero is applied with a velocity of 1 m/s.  
The mesh has a 0.025m discretization in the x and y direction and one single cell in the z-direction. The side length of the box is 1m. 

 

User-added image

The simulation is set up as a laminar steady-state run with constant density.
 

User-added image


To be consistent to the setup of the aforementioned article (above), the passive scalar is both convected and diffused through the domain, but with a Schmidt number of 1e20, effectively making the effect of diffusion redundant. 
Thus, the transport option for the passive scalar (Physics 1 > Models > Passive Scalar > . . . > Transport is set to Convection and Diffusion.
Under Material Properties, the Schmidt number is changed to 1e20. 

Here the convection order of the passive scalar is varied between 1st order and 2nd order, for two different mesh resolutions, 0.025m and 0.0125m. The simulation is run until the residuals are converged (500 iterations are sufficient).

0.025m - 1st order vs. 0.0125m - 1st order 

User-added imageUser-added image


0.025m - 2nd order vs. 0.0125m - 2nd order

User-added image User-added image

From the images above, we clearly see the effect of mesh resolution and discretization order on how well the gradient is captured. An example sim-file is attached to this article and can easily be extended to further investigations. 

In the following section, an example is how to run the above simulation with AMR will be demonstrated.

  • Under Select Models, add the Adaptive Mesh option under Optional Models, and click OK. A new node appears under the Models node called Adaptive Mesh. 
  • Right-click on Adaptive Mesh Criteria > New, and use the Passive Scalar as a Scalar Function. Limit the range to be between 0.01 and 0.99.
  • Chose to Coarsen below Min and above Max, and Refine in Between.
  • The benefit of AMR is to control where in the domain to have higher resolution, e.g., as in this case, where there are sharp flow gradients. Thus, to reduce the cell count, the cell base-size is changed to 0.1m whilst the Max Refinement Level is changed to 4, in order to achieve a finest 0.025m resolution. 

Leave the rest to default for now.

User-added image


Below the results with a 0.1m base-size and 4 levels of refinement is shown. 

User-added image

 

User-added image


An example sim-file is attached in this document with AMR activated.
 

KB Article ID# KB000041307_EN_US

Contents

SummaryDetails

Associated Components

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