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.
Attachments: | star_wAMR.sim (716 KB) star_woAMR.sim (984 KB) |
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.
The simulation is set up as a laminar steady-state run with constant density.
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
0.025m - 2nd order vs. 0.0125m - 2nd order
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.
Leave the rest to default for now.
Below the results with a 0.1m base-size and 4 levels of refinement is shown.
An example sim-file is attached in this document with AMR activated.