|
[Sponsors] |
November 18, 2014, 05:08 |
alphat
|
#1 |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Good Morning,
I'm studying an OF model which consists on a cube which has a sphere inside. A fluid flows from inlet to outlet. As it is incompressible, I think I have to assign the 4 walls like this: type alphatWallFunction; value uniform 0; The problem is that it appears this error: PHP Code:
- How do I calculate this value for my incompressible fluid? - How do I assign these 2 inputs? Should it be just with "fixedValue? Thank you very much for your help |
|
November 18, 2014, 05:16 |
|
#2 |
Senior Member
|
Hi,
you've truncated meaningful part of the error message. About the way alphat is calculated: Code:
alphat = turbulence->nut()/Prt; |
|
November 18, 2014, 05:36 |
|
#3 | |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Hi,
I will try to explain my doubts again: 1) Does an incompressible fluid need a Pr number? 2) With this kind of fluid, should I assign solid elements as "alphatWallFunction" or "alphatJayatillekeWallFunction"? 3) And with inlet and outlet, should I assign a "fixedValue" for them or just write "calculated"?? As they are not Walls, I cannot use the alphatFunctions I guess. Currently my input of alphat is here: Quote:
Thank you again |
||
November 18, 2014, 05:47 |
|
#4 | ||
Senior Member
|
Hi,
It's not fluid, it's solver who needs Prandtl number. Quote:
Quote:
|
|||
November 18, 2014, 05:58 |
|
#5 |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Ok thank you very much! So I guess my file was well!
And another question: should I assign the "epsilon, omega, k and nut" in the same way? I mean that every inlet/outlet are "calculated uniform 0" and the walls are kqRWallFunction for k, epsilonWallFunction for epsilon and omegaWallFunction for omega, and nutWallFunction (everything with uniform 0). Thanks! |
|
November 18, 2014, 06:30 |
|
#6 |
Senior Member
|
Usually I use zero gradient outlet boundary conditions for turbulence. For inlet it's turbulentIntensityKineticEnergyInlet and similar patch types (see $FOAM_SRC/finiteVolume/fields/fvPatchFields/derived, $FOAM_SRC/turbulenceModels/incompressible/RAS/derivedFvPatchFields folders for names or you can use fixedValue estimated using http://www.cfd-online.com/Wiki/Turbu...ary_conditions). And for walls - yes - wall functions.
|
|
November 18, 2014, 07:27 |
|
#7 |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Hi,
your advice were really helpful! Now I understand quite better many things. I hope this post could be useful too for someone amateur in OF like me. As it seems you control a lot this program, could you take a look to the post I wrote the last week in this same forum? The one which is called "pressure and velocity in inlet/outlet definitions". Thank you really much |
|
November 18, 2014, 08:35 |
|
#8 |
Senior Member
|
I've taken a look at your message but wasn't able to grasp what you're trying to simulate.
|
|
November 18, 2014, 08:48 |
|
#9 |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Well, I'll try to explain.
Corresponding to the model I have described in this forum (a cube with a sphere inside it and a fluid which cross it from inlet to outlet) I'm just trying to analyze the evolution of temperature and pressure in the different elements. When I imported my model from enGrids, there were only p and U file, so I decided to create T file and change simpleFoam by buoyantBoussinesqSimpleFoam (as it is an incompressible fluid). Obviously it is not enough to add this file, I had to do it with others, for example alphat, g, p_rgh, etc. Everything worked fine until I analyse the p and p_rgh, and I notice two things: - The first one is that when I click play it doesn't continue until my endTime (defined in controlDict) which is 1000. It does it just until 2, which is the numbers of iterations. - The second one is it doesn't appear any heat transference, so temperature fields stay the same that at the beginning. That's why I need to know if my p and p_rgh (I think T and U are fine) are right or not for defining my model: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Thanks in advance |
|
November 18, 2014, 10:20 |
|
#10 | |
Senior Member
|
Still don't get what you're trying to do. p_rgh, U, T seem to be reasonable. Pressure (p) is calculated in the solver:
Code:
... volScalarField p ( IOobject ( "p", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), p_rgh + rhok*gh ); ... Code:
if (p_rgh.needReference()) { p += dimensionedScalar ( "p", p.dimensions(), pRefValue - getRefCellValue(p, pRefCell) ); p_rgh = p - rhok*gh; } This part is enigmatic: Quote:
If you'd like to discuss you controlDict, fvSolution, and fvSchemes, post your files (and the output of simulation). |
||
November 18, 2014, 10:49 |
|
#11 |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Hello!
Ok, so those files are fine. You tell that p file is calculated by the programme. Does it mean can I delete it from 0 file or just I have to write every element as uniform 0? First of all, and to make the model easier, I input a gravity=0, in order to not to be influenced by this force. With the initial conditions mentioned above, it appears this message: PHP Code:
I attach the controlDict, fvSolution, and fvSchemes files and also the images with the output of the simulation. When I said "Pressed Play" I referred to the OpenFOAM, because asi you can see in the images the simulation stops at the 2° step (which is also the number of iterations). As you can see in Temperature picture it doesn't appear any heat transference. I don't know which file is wrong =S Thank you in advance Last edited by Wien3; November 19, 2014 at 09:47. |
|
November 18, 2014, 11:08 |
|
#12 |
Senior Member
|
Hi,
1. with this, rather relaxed convergence criterion Code:
residualControl { "(p|T|U|k|epsilon|omega)" 0.5; //*(7) } 2. On your temperature screenshot values of BCs are shown (as you selected patches and not internalMesh). Your BCs are in fixedValue except outlet. So you get these fixed values on your screenshot. If you'd like to see temperature variations - select internalMesh, cut it with Clip filter. |
|
November 19, 2014, 05:16 |
|
#13 |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Good Morning,
1) Concerning to p file, I have understood it doesn't matter its input because the solver will calculate this value but not from 0 folder. Anyway we cannot delete p from 0 file. 2) Related to reducing the tolerance, I can easily reduce it to 0.31 (which only takes 3 iterances) but if I reduce this value more it diverges (for example with 0.3). So I guess the responsible of this it is not the tolerance... 3) And talking about your advice related to temperature, it is really useful, but the problem is that my theory about no complete simulation is confirmed. I attach pictures. In the first one you can see the BC temperatures and in the second one how the left part seems to have some heat transference (although it seems to be stopped) and how the sphere, which is 800 K, doesn't have any heat exchange. Thank you Last edited by Wien3; November 19, 2014 at 09:47. |
|
November 19, 2014, 05:29 |
|
#14 |
Senior Member
|
Hi,
1. You can. Solver doesn't read p file in the beginning. It reads p_rgh file. 2. In general value of residuals should be below 1e-4. 3. Looking at the attached figure, it seems your simulation diverges. Maybe your posts lack some information? Can you post the case? (Surely I can reproduce it myself but it'll take more time). |
|
November 19, 2014, 06:49 |
|
#15 |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Hello,
I attach my files. I have change the times in controlDict and it improved just a littel bit. As OF forums don't accept so big folders, I am able to post just 0 and systems files. It gives continuity problems, so after importing 0/U (run with potentialFoam) to the previous folder I can attach the the following pictures. Pay attention to the given values, in the case of pressure and velocity are enormous. I don't know if everything you need is here. In other case please let me know and I will post it. Last edited by Wien3; November 19, 2014 at 09:47. |
|
November 19, 2014, 08:58 |
|
#16 |
Senior Member
|
Well, without a mesh it's rather meaningless. Surely I can construct mesh and make the case running. But it'll be my mesh and you've got problems running case on your mesh. Post case with the mesh somewhere else, there are plenty of places where you can store large files.
|
|
November 19, 2014, 10:33 |
|
#17 |
Member
Join Date: Oct 2014
Posts: 42
Rep Power: 12 |
Hello,
I found the way. Here I post two links: the first one is the model with the initial conditions and the second is the one which has the new 0/U file copied from the same case run with potentialFoam, as it gave continuity problems. http://www.filedropper.com/test00 http://freakshare.com/files/th1rvk69/test01.zip.html |
|
November 19, 2014, 12:39 |
|
#18 |
Senior Member
|
Hi,
not quite get why I need second archive but... 1. Get yourself new mesh. Really. The geometry is not so complicated. 2. About your configuration 2.1. Code:
residualControl { "(p|T|U|k|epsilon|omega)" 0.3; //*(7) } Code:
residualControl { "(p_rgh|T|U|k|epsilon|omega)" 1e-2; } Code:
ddtSchemes { default Euler; } Code:
ddtSchemes { default steadyState; } 2.3. Code:
gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } Code:
gradSchemes { default leastSquares; } Code:
divSchemes { default none; div(phi,T) Gauss linearUpwind Gauss; //*(16) div(phi,U) Gauss linearUpwind Gauss; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; //*(6) } Code:
divSchemes { default none; div(phi,T) bounded Gauss upwind; div(phi,U) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; //*(6) } 2.6. Change solver for p_rgh to GAMG, this will speed up solution process. 3. How did you calculate Pr? It looks rather random. Guess this is the time to wash my hands, you should read User guide at least. |
|
March 6, 2015, 10:27 |
|
#19 |
Member
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 11 |
No words to thank you Alexey. you did a great contribution. i was trying to simulate a similar case, u almost cleared most of my doubts.
Respect..!! Regards Naresh |
|
May 20, 2019, 07:15 |
|
#20 |
Senior Member
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7 |
Hello Everyone,
I am modeling a laminar fluid flow. But now I want to change my flow from Laminar to Turbulent. I replaced my Turbulence properties and using kEpsilon Turbulence model. But when I RUN the solver it gives the following error: Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon Code:
--> FOAM FATAL IO ERROR: cannot find file file: /home/openfoam/raza-4.1/run/circular_fluid/0/fluid/alphat at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 72. FOAM exiting Can someone please help me out in this? I am using chtMultiRegionSimpleFoam and my OpenFoam version is 4.1. Thank you Last edited by Raza Javed; May 20, 2019 at 08:21. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Alphat file in heat transfer case | xiyuqiu | OpenFOAM Running, Solving & CFD | 1 | June 8, 2017 18:39 |
mut and alphat & compressible flow | sasanghomi | OpenFOAM | 2 | September 17, 2013 15:42 |
an odd(at least for me!) reconstructPar error on a field | immortality | OpenFOAM Running, Solving & CFD | 3 | June 3, 2013 23:36 |
Where do I find the equation for alphat? | ishihara | OpenFOAM | 1 | July 30, 2012 04:23 |
turbulent jet simulation | antonio_ing | OpenFOAM Running, Solving & CFD | 5 | September 16, 2010 03:31 |