CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Problem with BC on Rans k-e model. (https://www.cfd-online.com/Forums/openfoam-solving/106182-problem-bc-rans-k-e-model.html)

rafamusura August 21, 2012 10:24

Problem with timestep error on Rans k-e model.
 
1 Attachment(s)
Hi everyone

I'm having some problems with my simulation. What i'm doing is a delta wing through wind at -5ºC. What I want to do is to study de vortex geometry formed at the leeward side of the delta wing. For that i'm usin RANS, pisoFoam, k-e model. With a y+ value of 30, so i'm usin the wallfunctions. The mesh is a cube with the delta wing positioned near the front face (inlet, named "entrada") and two conic volumes that melt with the back (outlet, named "salida"), the contour has to be open space like if the delta wing were levitating in the air, so non wall function is applied for the contour named "contorno" and i give them the same properties as the inlet ("entrada"). Wall functions are applied over the delta wing for epsilon, k, and nut.

i'm attaching the 0, the contstant and the system folder without the mesh because it has over 6e6 cells. The quality is ok, gmsh and checkMesh said so.

Soon I'll attach some pictures of the geometry.

MY QUESTION IS: What am I doing wrong with the BC or some of the other files in constant and system folder or is just a mesh problem?

Thank you very much.

PD: If some one has any k-e simulation files, would you send them to me please?

rafamusura August 21, 2012 14:23

3 Attachment(s)
Here I attach the mesh view

rafamusura August 21, 2012 14:33

2 Attachment(s)
My question is what am I doing wrong in the system files or with the pressure that generates the high timestep continuity error

rafamusura August 21, 2012 15:00

5 Attachment(s)
Hi everyone

I'm having some problems with my simulation. What i'm doing is a delta wing through wind at -5ºC. What I want to do is to study de vortex geometry formed at the leeward side of the delta wing. For that i'm usin RANS, pisoFoam, k-e model. With a y+ value of 30, so i'm usin the wallfunctions. The mesh is a cube with the delta wing positioned near the front face (inlet, named "entrada") and two conic volumes that melt with the back (outlet, named "salida"), the contour has to be open space like if the delta wing were levitating in the air, so non wall function is applied for the contour named "contorno" and i give them the same properties as the inlet ("entrada"). Wall functions are applied over the delta wing for epsilon, k, and nut.

But when I run the code it crashed inmediately without any information only crazy caracters, i'm attaching the 0, the contstant and the system folder without the mesh because it has over 6e6 cells. The quality is ok, gmsh and checkMesh said so.

I'm solving the problem but i think the timestep continuity error is too high. I'm attaching the 0, constant and system folder, images of the mesh and a file with the log generated by openFoam.


Time = 0.0336

DILUPBiCG: Solving for Ux, Initial residual = 0.0107502, Final residual = 0.000280403, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.00391993, Final residual = 0.000106919, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.00883818, Final residual = 0.000195784, No Iterations 2
DICPCG: Solving for p, Initial residual = 1.83261e-16, Final residual = 1.83261e-16, No Iterations 0
time step continuity errors : sum local = 6.63806e+32, global = 3.95053e+30, cumulative = 1.03367e+32
DILUPBiCG: Solving for epsilon, Initial residual = 4.79003e-09, Final residual = 4.79003e-09, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 5.31403e-19, Final residual = 5.31403e-19, No Iterations 0
ExecutionTime = 8039.58 s ClockTime = 8091 s

Time = 0.0339

DILUPBiCG: Solving for Ux, Initial residual = 0.0109797, Final residual = 0.000390804, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.00381153, Final residual = 0.000152027, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.00965729, Final residual = 0.000251777, No Iterations 2
DICPCG: Solving for p, Initial residual = 2.05904e-16, Final residual = 2.05904e-16, No Iterations 0
time step continuity errors : sum local = 6.64336e+32, global = 3.94975e+30, cumulative = 1.07317e+32
DILUPBiCG: Solving for epsilon, Initial residual = 4.79003e-09, Final residual = 4.79003e-09, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 5.09973e-19, Final residual = 5.09973e-19, No Iterations 0
ExecutionTime = 8104.96 s ClockTime = 8157 s

Time = 0.0342

DILUPBiCG: Solving for Ux, Initial residual = 0.00955455, Final residual = 0.000285136, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.00319492, Final residual = 9.09444e-05, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.00881291, Final residual = 0.000391108, No Iterations 2
DICPCG: Solving for p, Initial residual = 2.03742e-16, Final residual = 2.03742e-16, No Iterations 0
time step continuity errors : sum local = 6.64862e+32, global = 3.95421e+30, cumulative = 1.11271e+32
DILUPBiCG: Solving for epsilon, Initial residual = 4.79003e-09, Final residual = 4.79003e-09, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 4.90337e-19, Final residual = 4.90337e-19, No Iterations 0
ExecutionTime = 8169.98 s ClockTime = 8222 s

Time = 0.0345

DILUPBiCG: Solving for Ux, Initial residual = 0.00777732, Final residual = 0.000356118, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.00291982, Final residual = 0.000111127, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.00717223, Final residual = 0.000263995, No Iterations 2
DICPCG: Solving for p, Initial residual = 1.96088e-16, Final residual = 1.96088e-16, No Iterations 0
time step continuity errors : sum local = 6.65354e+32, global = 3.96524e+30, cumulative = 1.15236e+32
DILUPBiCG: Solving for epsilon, Initial residual = 4.79003e-09, Final residual = 4.79003e-09, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 4.72676e-19, Final residual = 4.72676e-19, No Iterations 0
ExecutionTime = 8235.81 s ClockTime = 8288 s

Time = 0.0348

DILUPBiCG: Solving for Ux, Initial residual = 0.00845433, Final residual = 0.000324603, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.00300571, Final residual = 7.6532e-05, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.00998808, Final residual = 0.000212127, No Iterations 2
DICPCG: Solving for p, Initial residual = 1.99572e-16, Final residual = 1.99572e-16, No Iterations 0
time step continuity errors : sum local = 6.66062e+32, global = 3.98281e+30, cumulative = 1.19219e+32
DILUPBiCG: Solving for epsilon, Initial residual = 4.79003e-09, Final residual = 4.79003e-09, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 4.56481e-19, Final residual = 4.56481e-19, No Iterations 0
ExecutionTime = 8300.7 s ClockTime = 8354 s

Time = 0.0351

DILUPBiCG: Solving for Ux, Initial residual = 0.00852669, Final residual = 0.000562289, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.00322229, Final residual = 9.61648e-05, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.0105383, Final residual = 0.00019362, No Iterations 2
DICPCG: Solving for p, Initial residual = 2.11936e-16, Final residual = 2.11936e-16, No Iterations 0
time step continuity errors : sum local = 6.67132e+32, global = 4.00495e+30, cumulative = 1.23224e+32
DILUPBiCG: Solving for epsilon, Initial residual = 4.79003e-09, Final residual = 4.79003e-09, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 4.42232e-19, Final residual = 4.42232e-19, No Iterations 0
ExecutionTime = 8365.5 s ClockTime = 8419 s

Time = 0.0354


PLEASE HELPE WITH THIS PROBLEM!

wyldckat August 21, 2012 16:20

Greetings Rafael,

FYI: I've moved your posts from that older thread where you posted, to this thread, because ... the other one was an old thread!!! And don't repeat the same questions over and over! Use the "Edit" button! You can edit a post of yours and modify anything in it. ;)

Now, about your problem:
  1. What tutorial are you basing your case on?
  2. Are you able to run that tutorial correctly?
  3. Which OpenFOAM version (or even variant) are you using?
  4. Quote:

    it crashed inmediately without any information only crazy caracters
    That's highly suspicious.
    Are you running OpenFOAM inside a virtual machine?
    • If you are, are you running inside a shared folder?
  5. Could you create a complete and simple example so we can properly try the case for ourselves? Because simply looking at some files is rather limiting.
Best regards,
Bruno

rafamusura August 21, 2012 18:25

Hi Bruno

1- Well I'm basing the simulation with the pitzdaily tutorial, because is the only k-e incompresible tutorial i've. But I changed the boundary conditions as said on: http://www.cfd-online.com/Wiki/Turbu...ary_conditions, but I think I have made a mistake on the distribution of them, i mean if I asignate a nut fixed valua to some patch that deosn't have to have it.

2- Basing the controldict of pitzdaily there are some fuctions that i've deleted so the simulation run properly, but solwly and with very high timestep error like on the erleir post. Is not something that came large ina a short period it has been growing constantly since time=0

3- Actualy I'm using the openFOAM2.1.1

5- Yes I was able to run the pitzdaily tutorial.

wyldckat August 22, 2012 17:22

Hi Rafael,

What I meant by the last question was this: it would be easier to help you if you could provide a complete and simplified version of your case.

For example, the tutorial "compressible/sonicFoam/ras/prism" has a very good and simple mesh that can be used for trying to replicate your case. You can change that case to use pisoFoam. Then change from 2D to 3D, by increasing the 3rd dimension resolution and with "symmetryPlanes" instead of empty patches.

From there it'll be easier to gradually increase the level of complexity of the case to reach a similar situation.

Otherwise, this is just a guessing game :(

Best regards,
Bruno

rafamusura August 24, 2012 07:57

1 Attachment(s)
Hi Bruno

I've made some changes and simplified the problem. Now I've started the simulation with a sapartallmaras model, and it looks ok (image attached). But i have another problem, if I don't want to have a U value=0 at the contour walls, but if I change the initial boundary confitions for the contor walls for the same as the inlet the simulation crashed. Do you have any ideas for solbing this problem, I think i'm loosing something here.

Another question is the fvSolution file, when I tried to simulate the vortex with k-e there was pcibg solver and for spalar is a GAMG and smoothsolver, I would like to know the diference between them and where is information about the comands that are included in gamg ans smoothsolver and it's values.

Thankyou very much

wyldckat August 24, 2012 17:57

Quote:

Originally Posted by rafamusura (Post 378533)
I've made some changes and simplified the problem. Now I've started the simulation with a sapartallmaras model, and it looks ok (image attached). But i have another problem, if I don't want to have a U value=0 at the contour walls, but if I change the initial boundary confitions for the contor walls for the same as the inlet the simulation crashed. Do you have any ideas for solbing this problem, I think i'm loosing something here.

Take a look at the "incompressible/simpleFoam/motorBike" tutorial for ideas ;) It's basically a wind tunnel simulation with a motor bike :D

Quote:

Originally Posted by rafamusura (Post 378533)
Another question is the fvSolution file, when I tried to simulate the vortex with k-e there was pcibg solver and for spalar is a GAMG and smoothsolver, I would like to know the diference between them and where is information about the comands that are included in gamg ans smoothsolver and it's values.

Google these three words in a single search ;)
Code:

OpenFOAM GAMG smoothSolver

rafamusura August 25, 2012 11:01

Hi Bruno first of all thankyou for your help, I have making some simulations with the spalartallamaras model, but I have some convege problems the code doesn't converge although the solution doesn't varies so maybe i'm missing something on the fvsolution. I'm using the same of the tutorial airfoil.

Thanks

wyldckat August 26, 2012 07:50

Hi Rafael,

If you can't share the case, it becomes very complicated to help you :( This is why I've been telling you to "create a simple case"! ;)

My guess is that it is the mesh the one to be blamed. Run checkMesh to see if anything bad is indicated.

Good luck!
Bruno

rafamusura August 27, 2012 12:35

1 Attachment(s)
Hi Bruno, I'm really sorry because I haven't been able to explain what is really what i'm asking so today I will try to put in order my ideas.

1) I have been reading some books, and I don't know if using the k-e turbulence model is appropiete for this case, because what I really want is to get the conic geometry of the vortex generated leeward. I believe that the k-e is for Hi-Re flows, so if I take a chord avarege of the delta wing and I calculate the Re number with wind 10m/s I get a Re of about 1.14e6 wich is turbulent but only for the wing. Another thing is that k-e is unable to show me the vortex generated over the wing, the picture attached in the above reply is from the spalartallamaras.

*Bibliography tells me that with this angle of attack the vortex is steady so lets suppouse RANS is ok.

My question is: Do you think i'm wrong using k-e model, and I should use the Spalart Allamaras o the k-omega model.?

2) Second question, when I ran the spalart allamaras model the residuals converge to a realitve high rage e-1 to e-3 (picture attached) so I would like to know how do I have to do for this residuals to get lower, is something about the mesh resolution or is something in the fvSchemes and fvSolution files that I should change.

If the information I give you isn't enough I could share you the case folders to take a look at them.

Thank you very much and sorry for my incapacity to explain myself.

wyldckat August 27, 2012 17:03

Hi Rafael,

Unfortunately I don't know enough to help you decide which turbulence and wall function models to use :(. My best suggestion is to look for threads here at the forum related to aerodynamic models.


As for the simple case, my objective was to try and help you to "get better help".
I could also test the case myself and in my limited experience I could find one or two problems, but I would probably end up not knowing the final solution.

Last but not least, I should have pointed you to the following thread on my first response to you: http://www.cfd-online.com/Forums/ope...-get-help.html

Good luck!
Bruno

rafamusura August 30, 2012 10:54

Hi Bruno

Finally I could make it fine with the simulations, but I only have one more question. I'm trying to get a inlet wind profile with the atmboundarylayervelicity BC but it seems no to work anymore in OF2.1.1, so i tried with swak4Foam utility for using the groovyBC but I don't have any idea of how to make it work. If you know something about it please give me a hand.

Thanks a lot.

wyldckat August 31, 2012 05:31

Hi Rafael,

:confused:
  1. Look into this tutorial: "incompressible/simpleFoam/turbineSiting"
  2. Look at the file "0/U".
  3. See this?
    Code:

    type            atmBoundaryLayerInletVelocity;
It's still there :D


Best regards,
Bruno


All times are GMT -4. The time now is 15:18.