CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   borken Simulation (https://www.cfd-online.com/Forums/star-ccm/212219-borken-simulation.html)

Birk November 28, 2018 11:05

borken Simulation
 
So I'm currently designing aerodynamic elements of an SAE car.

In the full car simulation, the Cw-Value always drops after some 200 Iterations.
Which is weird because the simulation has worked fine without the diffusor.


So: what could be the reason for this problem?




Images:

https://drive.google.com/open?id=1sa...zjpdQE6Wgqpmoy


edit: the Prism layer mesher didn't work properly either, but it also gave wrong solutions without the prism layer mesher enabled.
*broken


Mesh settings:



default:

Base size: 1.0
target surface size :100%
minimum surface size: 10%
number of prism layers: 3
prism layer stretching: 1.2


also custom surface size of 10% for a block around the car as well as rear flow.

fluid23 November 28, 2018 16:08

I wouldn't expect to get a valid solution without a proper prism mesh. Generally speaking, 3 layers is not enough for this sort of scenario. Have you examined your wall y+ values? What are they? Those will tell you if your prism mesh is sized appropriately.

The behavior of your Cw monitor could be a product of how you are initializing and I wouldn't put any stock into your results at or before 1000 iterations, let alone 200 iterations.

Birk November 29, 2018 03:52

1 Attachment(s)
Without the prism layer the simulation of the car without the diffusor worked fine(or at least it gave consistent values).
What values for prism layer thickness would you suggest?
I tried the prism layer calculator of this website and it suggested 3.3e-5m.
Now the mesh looks better but the simulation crashes saying:


Initialization of star.flow.EffectiveViscosityModel requires an additional pass...
Initialization of star.flow.EffectiveViscositySolver requires an additional pass...
Re-partitioning

Wall distance limited to 1e-06 on 1 cells in Subtract 2
Turbulent viscosity limited on 231 cells in Subtract 2
Iteration Continuity X-momentum Y-momentum Z-momentum Tke Tdr Cw Ca
1 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 5.080573e+01 -5.080344e-01
2 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 3.688444e-01 1.000000e+00 3.233523e+01 -2.929574e-01
3 1.000000e+00 8.107875e-01 1.000000e+00 1.000000e+00 1.000000e+00 6.501350e-01 -1.166565e+01 1.793767e+01
4 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 -1.168766e+04 2.073623e+04
Reversed flow on 30 faces on Block.outlet
5 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00 9.664118e+06 4.116152e+08
Reversed flow on 441 faces on Block.outlet
Turbulent viscosity limited on 5 cells in Subtract 2
A floating point exception has occurred: floating point exception [Invalid operation]. The specific cause cannot be identified. Please refer to the troubleshooting section of the User's Guide.
Context: star.segregatedflow.SegregatedFlowSolver
Command: Automation.Run
error: Server Error






Here is the y+ (probably not good):

fluid23 November 30, 2018 10:26

Ok, you've got some things mixed around. Let me break this down for you, hopefully it will make sense.

First of all, the goal of the prism mesh is to resolve near wall flow. Without getting too technical, you basically need really small cells near the wall to resolve steep gradients in the boundary layer. Without it you run the risk of your model crashing, or best case returning bogus results.

Now the tool you mentioned, that is used for sizing cell height of a single wall bounded cell. Unless you changed it, it assumes you want a wall y+ of 1 and that whatever velocity you specify in the freestream input exists immediately outside the boundary layer at that wall location. (Actually it might even be ½ cell height that it returns, I don’t really remember). That’s great and all, but it is not very practical for a simulation like this. Your velocity distribution around the car will mean that you would technically need a different cell height at ever wall node to meet your target of y+ = 1. You simply don’t have that kind of control in commercial meshers.

By default, the prism layer thickness you set in star-ccm controls the stack up of all your prism cells. If you are setting this to be the value you got from the online tool then you are trying to cram all of your prism cells into the space you needed for one (or maybe even ½) of your wall bounded cell. Ultimately, your goal with the prism mesh is to provide cells at every location on the wall that retur y+ in your target range AND smoothly transition from your small near wall cell to your larger core mesh. The best prism layer meshes look like a smooth transition from surface to the core. The ultimate goal would be to set just one global control for everything, but often times you will need to do surface controls to set prism layer properties differently for various surfaces.

The good news is you don’t need a wall y+ of 1. Depending on your turbulence model and chosen wall treatment there are a range of acceptable values. Assuming you just went with the default selections that the software gives you, your y+ should really be between 1 and 5 or 30 and 60. Between 5 and 30 is ok, but the interpolation between low wall and high wall models can be a little hit-or-miss. You can also relax that for features that are not critical to what you are looking at. If you know that that the contribution of something toward your Cw value is negligible, then you can let that slip to 100 or more. That flexibility gives you room to refine areas of interest but still adequately capture bulk effects elsewhere.

What I suggest is setting a global total prism thickness of between 1 and 3 inches, using 5 to 7 layers and a layer ratio of 1.2. Mesh, run for about 100 – 200 iterations and check your y+ values. Then refine global settings, apply surface controls for critical components and continue refining until you get y+ values that you can live with.

I can talk on this subject for days, hopefully this helped a little.

Birk December 5, 2018 10:56

Quote:

Originally Posted by fluid23 (Post 717491)
Ok, you've got some things mixed around. Let me break this down for you, hopefully it will make sense.

First of all, the goal of the prism mesh is to resolve near wall flow. Without getting too technical, you basically need really small cells near the wall to resolve steep gradients in the boundary layer. Without it you run the risk of your model crashing, or best case returning bogus results.

Now the tool you mentioned, that is used for sizing cell height of a single wall bounded cell. Unless you changed it, it assumes you want a wall y+ of 1 and that whatever velocity you specify in the freestream input exists immediately outside the boundary layer at that wall location. (Actually it might even be ½ cell height that it returns, I don’t really remember). That’s great and all, but it is not very practical for a simulation like this. Your velocity distribution around the car will mean that you would technically need a different cell height at ever wall node to meet your target of y+ = 1. You simply don’t have that kind of control in commercial meshers.

By default, the prism layer thickness you set in star-ccm controls the stack up of all your prism cells. If you are setting this to be the value you got from the online tool then you are trying to cram all of your prism cells into the space you needed for one (or maybe even ½) of your wall bounded cell. Ultimately, your goal with the prism mesh is to provide cells at every location on the wall that retur y+ in your target range AND smoothly transition from your small near wall cell to your larger core mesh. The best prism layer meshes look like a smooth transition from surface to the core. The ultimate goal would be to set just one global control for everything, but often times you will need to do surface controls to set prism layer properties differently for various surfaces.

The good news is you don’t need a wall y+ of 1. Depending on your turbulence model and chosen wall treatment there are a range of acceptable values. Assuming you just went with the default selections that the software gives you, your y+ should really be between 1 and 5 or 30 and 60. Between 5 and 30 is ok, but the interpolation between low wall and high wall models can be a little hit-or-miss. You can also relax that for features that are not critical to what you are looking at. If you know that that the contribution of something toward your Cw value is negligible, then you can let that slip to 100 or more. That flexibility gives you room to refine areas of interest but still adequately capture bulk effects elsewhere.

What I suggest is setting a global total prism thickness of between 1 and 3 inches, using 5 to 7 layers and a layer ratio of 1.2. Mesh, run for about 100 – 200 iterations and check your y+ values. Then refine global settings, apply surface controls for critical components and continue refining until you get y+ values that you can live with.

I can talk on this subject for days, hopefully this helped a little.


Ok, I did the meshing again. This time I took the estimated wall distance times the number of prism layers. There are no spots where it failed to be generated anymore.

However I still get the same error when runnning the simulation.

fluid23 December 5, 2018 10:58

What are your boundary conditions? How are you initializing? How aggressive is your courant number? Have you tried a courant ramp?

Birk December 5, 2018 11:39

Quote:

Originally Posted by fluid23 (Post 718082)
What are your boundary conditions? How are you initializing? How aggressive is your courant number? Have you tried a courant ramp?


my regions are:
Inlet set as "velocity inlet"
outlet set as "pressure outlet"
symmetry plane as "Symmetry plane"
the body set as not moving wall
ground and side surface of the block are set to move in the same direction as the fluid with the same speed (11m/s).


I found "under relacation factor" under slover/k-epsilon if that's what you mean.

it is set to 0.8.
I made a scalar scene but didn't find courant number to be selected for the function to be displayed (I have version 11).


edit: ok, I found the mistake. I set the outlet pressure to athmosphere, instead of 0 Pa


All times are GMT -4. The time now is 07:25.