Steady state simpleFOAM crash
1 Attachment(s)
Hello fellow foamers. I tried to simulate a flow inside a U shaped pipe whose cross section changes from circular to elliptical suddenly. I've attached a rough drawing of the geometry (done on MS Paint :p) for your reference. The input is 0.001 m^3/s and the diameter is roughly 0.028m. The flow is unsteady and turbulent. I used k-epsilon modelling with ddt scheme set to steady state.
Problem: The steady state simulation was crashing no matter what I tried. The time step continuity error kept increasing leading to a crash or the bounding of k and epsilon kept becoming bigger and bigger (eg: Min = -1e30 and Max = 1e30) or it just crashed with floating point exception error. I did try various things:
The geometry was meshed using snappyHexMesh and checkMesh did not show any errors. I finally had to run the steady state simulation on Ansys CFX and submit my project. Now that I some time I want to investigate why OpenFOAM could not solve the problem when Ansys could. Even more frustrating thing is that transient simulation in OpenFOAM worked without any issue and even giving me similar result to Ansys. Please help in figuring out the cause for the issue. I am currently away for the day and hence not able to upload case files. Moreover, I did not create a new folder for every change I made (such a noob :() and was overwriting the case files with new changes everytime. Please let me know what file you guys will be requiring. Thanks! |
I am playing around with case file to see where I'm making a mistake. My files in the 0 folder:
p Code:
dimensions [0 2 -2 0 0 0 0]; Code:
dimensions [0 1 -1 0 0 0 0]; Code:
dimensions [0 2 -3 0 0 0 0]; Code:
dimensions [0 2 -2 0 0 0 0]; Code:
dimensions [0 2 -1 0 0 0 0]; Code:
dimensions [0 2 -1 0 0 0 0]; |
Forgot to add my system files. :p There are many things commented out and many changes were made overwriting the files.
controlDict Code:
application simpleFoam; Code:
ddtSchemes Code:
solvers |
You can try to run potentialFoam first (remember to backup your u in 0, because potentialFoam overwrites it). It will do a initialization of the u-field. Afterwards you can run simpleFoam
Second, you can try to use the localEuler ddt Scheme. It is pseudo-transient and more stable than steadyState. Third, if nothing helps you can just average you transient results. Your pressure B/C is really low. Is it supposed to be like that? Maybe the problem is in you thermophysicalProperties. Can you post the as well? |
Change the velocity at the outlet to:
outlet { type inletOutlet; value uniform (0 0 0); inletValue uniform (0 0 0); } inletOutlet is much stable than zeroGradient! ------------------------- Try to add referencePressure to the velocity field at the inlet. referencePressure value; This advice works well if the flow compressible. I dont know if it works in simpleFoam... |
Quote:
1) I did try potentialFoam but it did not initialise for the whole domain, rather it initialised only for the inlet boundary surface. I tried running it again and again but initialising was not happening. 2) Tried the localEuler but got a weird error. Code:
--> FOAM FATAL ERROR: 3) Do you mean that I should take results from various time step and just average? For pressure, I wanted to use 1 atm at outlet. According to the forums, OpenFOAM uses p = p/rho. So I divided 1 atm/ rho. 101325 Pa/1043 Kg/m3. I don't have a thermophysical dict. I guess those are used in heat transfer analysis. In constant all I have are transport properties and turbulenceDict. |
Quote:
|
Hello,
you can try more stuff : - start by a laminar simulation, if it runs, introduce turbulence at a later timestep - your div schemes are very diffusive (that's good to make it run at first), but you can try to change your other schemes (see p.47 of these slides http://www.wolfdynamics.com/wiki/fvm_crash_intro.pdf) - Increase your mass flow rate gradually to the final value, may help. good luck, let us know how it goes :) |
outlet
{ type inletOutlet; inletValue uniform (0 0 0); value $internalField; } |
Quote:
I'm now suspecting that it may be due to meshing. CheckMesh did not show any errors but I'm going to tighten the mesh quality parameters and try running the simulation again. |
Quote:
|
I've found something interesting. When I increase the nNonOrthogonalCorrectors, the simulation crashes at a much later timestep. This leads me to thinks that I may have some problem with my mesh. CheckMesh did not show any errors. However, I'm planning on remeshing the geometry with tighter mesh quality parameters. Can someone suggest what should be the values of parameters to be set in meshQualityDict for snappyHexMesh. I'm currently using default values found in OpenFOAM-4.x/etc/caseDicts.
|
Can you share your files?
|
All times are GMT -4. The time now is 20:43. |