CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

My RAS kEpsilon model diverges

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By matejfor
  • 1 Post By Kummi
  • 1 Post By matejfor
  • 1 Post By Kummi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2021, 08:01
Unhappy My RAS kEpsilon model diverges
  #1
New Member
 
Leander Tielkes
Join Date: Nov 2021
Posts: 4
Rep Power: 5
Leander is on a distinguished road
Hello FOAMers,

I am using RAS kEpsilon for an Atmospheric Boundary Layer simulation in order to calculate the mean wind speeds above a mountainous area. My domain is 3km long, 3km wide and 1.5km high. I first checked whether the model gives reasonable results and apparently it reproduces the measurement results from the Askervein Hill Project quite well.
Currently I am trying to run a mesh convergence study. I wrote a script that runs the simulation over and over again each time with a finer mesh. However, for some mesh configurations, the solution suddenly diverges.
I picked such a configuration that does not work and attached it as a .zip. Unfortunately the mesh was too large to upload, so I only have a screenshot of it.
When I run simpleFoam (Build : _f815a12b-20210902 OPENFOAM=2106) the solution diverges, and at the 16th time step I get a floating point exception.

The mesh seems to be okay. checkMesh prints "Mesh OK."

Do you have an idea what is wrong here? Thank you in advance.

Best regards,
Leander
Attached Images
File Type: png mesh_screenshot.png (164.4 KB, 21 views)
Attached Files
File Type: zip run_wo_mesh.zip (14.5 KB, 3 views)
Leander is offline   Reply With Quote

Old   November 23, 2021, 04:33
Default
  #2
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
HI, you said it is a refined mesh, and you have 5 layers in the Z direction? I wonder how the coarse mesh looks like.

Your discretisation is pretty tight, can you post the log file with this FPO crash and checkMesh log as well?
Leander likes this.
matejfor is offline   Reply With Quote

Old   November 23, 2021, 04:39
Default
  #3
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 355
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Why don't you try boundary layer mesh?
Leander likes this.
Kummi is offline   Reply With Quote

Old   November 23, 2021, 15:40
Default
  #4
New Member
 
Leander Tielkes
Join Date: Nov 2021
Posts: 4
Rep Power: 5
Leander is on a distinguished road
Quote:
Originally Posted by matejfor View Post
HI, you said it is a refined mesh, and you have 5 layers in the Z direction? I wonder how the coarse mesh looks like.
Actually I started with a very coarse mesh (I guess 25x25x5). I then increased the discretisation in x and y to 29 respectively but I haven't increased the z discretisation yet. Since it is the start of a convergence study, I do not expect the results to be correct at this coarse discretisation. Do you think such a coarse mesh might be the reason for divergence?



Quote:
Originally Posted by matejfor View Post
Your discretisation is pretty tight, can you post the log file with this FPO crash and checkMesh log as well?
I have uploaded the two logs. Sorry about the lengthy log for simpleFoam, I am solving one time step at a time.
Attached Files
File Type: txt checkMeshLog.txt (3.3 KB, 1 views)
File Type: txt simpleFoamLog.txt (47.1 KB, 1 views)
Leander is offline   Reply With Quote

Old   November 23, 2021, 15:59
Default
  #5
New Member
 
Leander Tielkes
Join Date: Nov 2021
Posts: 4
Rep Power: 5
Leander is on a distinguished road
Quote:
Originally Posted by Kummi View Post
Why don't you try boundary layer mesh?
Hi Kummi, what is the advantage of using a boundary layer mesh over what I am doing right now?
Leander is offline   Reply With Quote

Old   November 23, 2021, 17:43
Default
  #6
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
There is one thing I do not understand. YOu are using simpleFoam, you run the case for a single iteration and you stop the case and then you restart the case running again a single iteration. Is there any reason for such an unusual solution strategy? Looking at the simpleFoam log, at iteration 10 your max velocity is too high which leads to excessive gradients and unphysical values of k and epsilon feeding momentum equation with too high Laplacian leading to continuity equation divergence.


What happens if you let your simpleFoam do it's work for a couple of hundreds of iterations?
Leander likes this.
matejfor is offline   Reply With Quote

Old   November 24, 2021, 00:15
Default
  #7
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 355
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Hello Leander,
I thought mesh should be the issue. I havent looked any of your files yet. Boundary layer mesh grow from the surface and used to analyze high gradients of temperature or momentum normal to a surface.
Hope there is no error during compilation. Try to post your error message here.
Irrespective of the mesh, have you tried to locate the error in your problem ? It's a good practice to run your problem in debug mode which locates your error exactly. This helps you in future to understand the code easily. Check this link,
https://sites.google.com/site/foamgu...-debug-version
Thank you
Leander likes this.
Kummi is offline   Reply With Quote

Old   November 26, 2021, 07:23
Default
  #8
New Member
 
Leander Tielkes
Join Date: Nov 2021
Posts: 4
Rep Power: 5
Leander is on a distinguished road
Hi Matej, I was solving step by step in order to monitor the convergence. I was doing it with a small script that postprocesses after every time step and decides whether the solution has converged. Since you asked, I did a bit of research and found that this can be done much simpler by using convergence criteria in openfoam. I switched to this method now. Unfortunately, letting openfoam run for ~500 timesteps does not stop it from diverging at timestep ~10, however the solution runs much faster now. Thanks for the advice!

Hi Kumar: I have attached a working minimal example that reproduces the error. It contains the mesh so if you like, you can check it yourself. It also contains the log and the error message. Thank you for the advice to switch to debug mode. However I feel uncomfortable rebuilding openfoam since I fear messing up things and ending up with no working installation of openfoam.

I added a screenshot to show where the divergence starts. Depending on the mesh size it always seems to start at the top boundary. The fact that it starts at the edge towards the inlet might be a coincidence here.


Here is my definition of the top boundary

U:
top
{
type fixedShearStress;
tau (0.390796574 0 0);
value uniform (0 0 0);
}

p:
top
{
type zeroGradient;
}

k:
top
{
type zeroGradient;
}

epsilon:
top
{
type zeroGradient;
}

nut:
top
{
type calculated;
value uniform 0;
}
Attached Images
File Type: png divergenceStartsHere.png (98.5 KB, 10 views)
Attached Files
File Type: zip minimalExample.zip (67.9 KB, 1 views)
Leander is offline   Reply With Quote

Reply

Tags
atmospheric bl, divergence, kepsilon, ras incompressible


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
totalFlowRateAdvectiveDiffusive BC with RAS Model EMM OpenFOAM Running, Solving & CFD 1 April 25, 2019 06:45
VOF model + mixture model + RAS or LES model ebtedaei OpenFOAM Running, Solving & CFD 23 May 12, 2018 04:36
Make wall-function read a newly defined field inside modified kEpsilon model Radunz OpenFOAM Programming & Development 2 July 18, 2017 23:39
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36


All times are GMT -4. The time now is 04:31.