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/)
-   -   Weird problem with engineFoam tutorial (https://www.cfd-online.com/Forums/openfoam-solving/59274-weird-problem-enginefoam-tutorial.html)

chris1980 February 3, 2006 07:01

I am trying to do the engineFo
 
I am trying to do the engineFoam tutorial (delivered with OpenFoam 1.2) but the application crashes all the time with the following error:

FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 -> 5000; T = 193.577

Ok with the default setup it crashes so I played a little bit with the parameters in fvSolution (increase non-orth and ncorrectors), controlDict (maxDeltaT=0.01, adjustTimeStep=yes) but with success (same error at other CA positions).

I think it would be very nice if the official tutorial will work "out of the box". For beginners it is quite impossible to know what parameters they have to change to run the case without these problems. Is there someone who has a setup for the engineFoam tutorial which works or is the tutorial just buggy?

chris1980 February 7, 2006 09:53

Is there really nobody who can
 
Is there really nobody who can (would) help?

guido_adriaensen February 7, 2006 10:37

Hello, Did you use max. cou
 
Hello,

Did you use max. courantno? and restarted the simulation from the beginning? (at least beginning of ignition?) It should work.

regards
Guido

chris1980 February 7, 2006 10:42

Yes I use the following: ad
 
Yes I use the following:

adjustTimeStep yes
maxCo 0.2
maxDeltaT 0.025

but it don`t work!

niklas February 7, 2006 15:23

try to increase the number of
 
try to increase the number of piso loops and non-orthoganl corrections, try a 2/2, or 3/2 combo

chris1980 February 8, 2006 02:23

thanks for helping me Niklas h
 
thanks for helping me Niklas http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

I have already tried to increase the no of piso loops and non-orth corrections (tested with 2/2 3/2 3/6) but the problem still exists!

stefanke February 9, 2006 04:55

I have experienced the same pr
 
I have experienced the same problem as descirbed above!

Anyone out there who can help?

guido_adriaensen February 9, 2006 10:12

I'm experiencing also the same
 
I'm experiencing also the same problems. Changing the number of piso loops and non-ortogonal correctors delay the error, but it still exists. A differerent maxCo also has some effect, but the problem does not disappear.
When I look at the output in paraView it seems as if the error occurs when the combustion reaches the liner. Can anybody else confirm this?

Guido

stefanke February 9, 2006 10:19

Yes I agree, as soon as the fl
 
Yes I agree, as soon as the flame reaches the liner (approx 54CA) the solver blows up!

hjasak February 9, 2006 10:24

I have run this yesterday and
 
I have run this yesterday and it all works, all the way to 60 deg and full combustion. However, the spark plug location looks stupid to me, but that's another matter...

I will tar up the complete result for you and put it on http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/ when I find a peaceful moment.

Hrv

guido_adriaensen February 9, 2006 10:36

Thank you, The results are
 
Thank you,

The results are probably not that interesting, more interesting is the setup. Did you perform the simulation with fixedTemperatureWallFunctions or adiabaticWalls?, when I do the simulation with adiabaticWalls it also runs perfectly.

Guido

hjasak February 9, 2006 19:02

Here comes: You've got the
 
Here comes:

You've got the case with the complete solution zipped up in:

http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/

There's several IMPORTANT points I want to make:
- this is not the best mesh and the easiest physics to deal with.
- if I set up the second part to run with delta t of 0.01 degrees crank angle, everything runs smoothly and in one go. However, I am impatient and cannot be bothered to wait. Therefore...
- I have run a number of tests to see how the case fails, each time finding out why. In every single situation (when it fails), it fails because PISO stops converging, which is easy to spot and easy to fix.

Thus, when you are running your case, pay attention to the print out from the solver. PISO is that lot with several repetitions of:

solving for b
solving for Xi
solving for hu
solving for h
solving for p (several times)

Pay attention to the first initial residual in the "solving for p" bit: this tells you what PISO is doing. If in the last try you did not reduce the residual (INITIAL RESIDUAL) for at least an order of magnitude, your run is likely to blow up.

You can fix this in two ways:
- reduce the time-step. (you can always increase it later, when the combustion bit is finished
- increase the number of PISO correctors
- if your mesh is badly non-orthogonal, add non-orthogonal correctors or fiddle with the discretisation of the laplacian.

Now, I can set up this case and solver to be idiot-proof, with tons of PISO correctors, under-relaxation, time-step control and in a dozen more ways, but I cannot be bothered - I prefer to have people use their brain. Thus, please pay attention to what the solver is doing and act accordingly.

I appreciate that some people don't know this stuff or understand numerics. I would strongly recommend studying the code, reading about discretisation and thinking about stuff because otherwise you are likely to waste a lot of time staring into a black box.

If you are (really) interested, maybe we should consider doing a summer school or an intensive course on numerics (Finite Volume and CFD for starters), with OpenFOAM as a platform: this will not only teach you about algorithms but give you a chance to mess about with OpenFOAM solvers until you know them really well. If you're interested, please talk to me (I have done this before).

Enjoy the engine :-)

Hrv

nsp82 January 13, 2007 13:37

Hello! Could somebody direc
 
Hello!

Could somebody direct me to a copy of the enginefoam tutorial ...

Thanks.

nishant_hull December 19, 2007 16:42

Hi hrv I am trying to run e
 
Hi hrv

I am trying to run engine simulation on Openfoam. But The simpleEngineTutorial case is not running on my foam setup. what could be the possible reason for this? please guide me in this regard. Your suggestion posted above are helpful though. http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
I am running in dieselFoam and also tried it on engineFoam. The error reported is:
[343880@w191-210 dieselFoam]$ paraFoam . simpleEngine


--> FOAM FATAL IO ERROR : keyword U is undefined in dictionary "/home/343880/OpenFOAM/343880-1.4.1/run/tutorials/dieselFoam/simpleEngine/215/p: :presin"

file: /home/343880/OpenFOAM/343880-1.4.1/run/tutorials/dieselFoam/simpleEngine/215/p:: presin from line 464 to line 466.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 146.

FOAM exiting



looking forward from you reply ..

Nishant

lucchini December 19, 2007 17:05

Hi Nishant, this is due to
 
Hi Nishant,

this is due to a change in the totalPressure boundary condition dictionary. Modify it as follows:



type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho none;
psi none;
gamma 1.0;
value uniform 0;

And it will work.

Please specify the correct value for the entries "value" and "p0" (here I put 0 just as an example)

Hope this can help.

Regards

Tommaso

nishant_hull December 19, 2007 17:59

Hi Tommaso Thanks for the re
 
Hi Tommaso
Thanks for the response.
Actually my boundary files in dir "-225" is - see attachment.
\attach
i am not sure which value i am supposed to change. can u please point it out.

Nishant

nishant_hull December 19, 2007 18:00

http://www.cfd-online.com/Ope
 
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif p

Akuji October 2, 2009 07:02

Hello,
I have the same problem with OpenFOAM-1.5. I tried to make an example, that is described in programmers guide. But I have an error

keyword PISO is undefined in dictionary "/home/caelinux/OpenFOAM/caelinux-1.5/run/tutorials/simpleFoam/pitzDaily/system/fvSolution"

file: /home/caelinux/OpenFOAM/caelinux-1.5/run/tutorials/simpleFoam/pitzDaily/system/fvSolution from line 19 to line 69.

From function dictionary::subDict(const word& keyword) const


I'm waiting for your reply=)

paladin July 17, 2012 09:55

Quote:

Originally Posted by chris1980 (Post 189130)
I am trying to do the engineFoam tutorial (delivered with OpenFoam 1.2) but the application crashes all the time with the following error:

FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 -> 5000; T = 193.577

Ok with the default setup it crashes so I played a little bit with the parameters in fvSolution (increase non-orth and ncorrectors), controlDict (maxDeltaT=0.01, adjustTimeStep=yes) but with success (same error at other CA positions).

I think it would be very nice if the official tutorial will work "out of the box". For beginners it is quite impossible to know what parameters they have to change to run the case without these problems. Is there someone who has a setup for the engineFoam tutorial which works or is the tutorial just buggy?



Hi,

Sorry to dig up the thread, but I kinda have the same problem and i can't figure out what's wrong..

I have both OF1.7.1 and 2.1.1, and i'm trying to use engineFoam. I've checked every file in both tutorial cases, and they are exactly the same (except for some keywords syntax, but no big deal making the link between the two versions).
For the 2.1.1 case/solver, I've lowered maxCo, increased the number of correctors,.. followed every advice in this thread, but pressure and Temperature are still decreasing and temperature eventually gets out of janaf tables range...
But with the 1.7.1 solver, everything's working just fine (except for pressure and temperature a bit to low near TDC, as opposed to classical SI engine values, but someone already mentioned it in another thread and that's not the point...)

Does anyone experience the same problem?
Is there something 'wrong' with the new engineFoam solver or with the tutorial case? (btw, sprayEngineFoam has the same problem...)


Thanks !

Gregory

wyldckat July 17, 2012 15:42

Greetings Gregory and welcome to the forum!

Which exact tutorial are you using?
There have been changes in the diesel and engine solvers for a while now, due to some issues... I'll have to dig up some dirt to find the issues on this topic... here we go:
Best regards,
Bruno

paladin July 17, 2012 17:39

Hi Bruno, thanks !

Thanks for the threads link, i'll read them carfully, but i think my problem is more basic than that...


I ran the kivatest tutorial case both with engineFoam from OF1.7.1 and OF 2.1.1 (each solver with the appropriate version of the case, of course...).

In OF1.7.1, the case work just fine, but in OF 2.1.1, temperature and pressure do not increase, wich is... wierd for a compression. Worst than that, in some aera of the domain, temperature drop to 200K and lower...

I've checked the boundary conditions, and even every file in the kivatest 2.1.1, and it's the same as the kivatest 1.7.1 (except for some syntax), so my humble guess is that the problem comes from the solver or from one of the parameter like the maxCo, number of correctors, time step, ...

What's wierd is that i haven't made any modification to the tutorial case so... it should work... or am i missing something?


I've read here (http://sourceforge.net/apps/mantisbt...view.php?id=46 , link from the thread you've posted) that a year and a half ago, the same bug was observed in 1.6... But if it works correctly in 1.7, one can assume that the problem has been resolved... My question is how? :-)
Let's hope the same method can be used to fix engineFoam 2.1.1 ...

Thanks again !


Gregory

wyldckat July 17, 2012 19:49

Hi Gregory,

OK, then more information is going to be necessary for trying to isolate the problem:
  • What Linux Distribution are you using and version?
  • 32 or 64bit?
  • How did you install OpenFOAM? From Deb/RPM or from source?
If this was witnessed in the past, it might be a corner case, where an alignment of characteristics leads to things not working as intended.

I didn't have time to do a full run on this tutorial. But in 24-48h I might be able to look better into this. Therefore knowing more about the installation you're using, might help isolate the issue.

Best regards,
Bruno

paladin July 18, 2012 02:53

I have ubuntu 12.04 lts, 64 bit. And I used the Deb pack for the install.

We tried it on different computer, and the problem remains the same :
on a 32 bit ubuntu 12.04, OF2.1.1 deb pack install,
on a 64 bit ubuntu 12.04, OF 2.1.0 source install,
on a 64 bit CenTOS, OF 2.1.0 source install ...


Since pressure increase to 7.6bar at -15 CAD, (it is supposed to be around 14bar) and the temperature drops below 200K in some aera of the domain, i've checked the boundary condition in the -180 folder and they are the same.
I also double checked every coefficient in thermophysicalProperties, and they're the same... If it isn't caused by the type of OS or install, maybe something with the ideal/perfect gas law ? (wild guess...)

I tired changing the T file in -180, using higher & lower initial temperature, i tried changing the boundaryfield type from fixed value to zeroGradient (to have adiabatic walls), but it doesn't change anything.

Thanks for the help Bruno, really appreciate!

Gregory

wyldckat July 18, 2012 16:02

Hi Gregory,

OK, after testing this case on my machine with Ubuntu 11.10 with a more recent version of OpenFOAM 2.1.x, I've come to the conclusion that this case falls into the same category of this bug report: http://www.openfoam.org/mantisbt/view.php?id=571

As you can see from the last comment, the next release of OpenFOAM (hopefully) should have this issue fixed properly, since it falls into the same category of issues with thermodynamics that OpenFOAM has.

I believe that since OpenFOAM 1.7.1 works with this tutorial, then 2.0.1 should be working as well, or at least 2.0.0. The modification made to the code for trying to make models for thermodynamics more realistic was made somewhere in 2.0.x, as indicated in one of the links I've written about the other day.

So basically, you can still use 2.1.1 for everything not thermodynamics and 2.0.1 or older for the ones you do need thermodynamics.
edit: A reminder that this was modified in 2.0.x due to this bug report: http://www.openfoam.org/mantisbt/view.php?id=346

Last but not least, I think they (the OpenFOAM team) always welcome sponsors for improving parts of the code, such as this! ;)

Best regards,
Bruno

paladin July 18, 2012 17:02

Quote:

Originally Posted by wyldckat (Post 372217)
So basically, you can still use 2.1.1 for everything not thermodynamics and 2.0.1 or older for the ones you do need thermodynamics.
edit: A reminder that this was modified in 2.0.x due to this bug report: http://www.openfoam.org/mantisbt/view.php?id=346

Okay, i'll try 2.0.1 and i'll post a feedback !

Last quick question : I'm not really sure of what you mean by "everything not thermodynamics", is this suppose to include every solver that use "thermophysicalProperties" ?
Because for example, i've ran every tutorial case for combustions with OF2.1.1, and they're working fine. Don't they "use" thermodynamics? For example, in engineFoam, isn't the combustion part based on the XiFoam solver?
I use reactingFoam with other cases than the tutorial and results are good, so..

I've run the sprayFoam tutorial (aachenbomb) and it seems okay, and then i've transformed the kivatest tutorial to use sprayEngineFoam, and Temperature is dropping, like in engineFoam. (i'm not even talking about problem with the spray, i was just checking if the compression phase of the engine works...)

I don't know if this is of any use, but could it be caused by the moving mesh? Is there another tutorial case with moving mesh with or without thermodynamics that I could test?

One last thing that i've noticed : If you use the kivatest case, but starting from top dead center so that the piston head go down (decompression), there is a tiny zone juste above the piston surface where temperature increase (373K->500K). I'm aware that it could be caused by the bad formulation of internal energy in specieThermoI.H, but the fact that temperature drops everywhere else (as it should) except for that aera near the moving piston head make me wonder...

(Then again, the aera near the moving piston head is the aera where the speed magnitude is maximum, so it could be a problem with the kinetic energy witch is part of internal energy... and we're back at the starting point.)


Sorry if my post doesn't make much sense, i hope i wasn't just thinking out loud and some of this will actually be of use !

Thanks a million, Bruno !

Gregory

wyldckat July 18, 2012 17:18

Hi Gregory,

Well, the italic not was implying a somewhat generic idea that whenever things don't work on 2.1.1, try using the older 2.0.1 ;) I should have been more clearer about what I really meant :(

As for your doubt about the moving/dynamic mesh - feel free to report this on the bug tracker: http://www.openfoam.org/mantisbt/
It might take a while for them to answer back though. And give the same level of details you've given here about this issue with the dynamic mesh and this tutorial case.
Keep in mind that simply giving a link to this thread won't be enough, since there is a lot of info to go through here :(

With any luck, the dynamic mesh issue might be something that they can back-port from the ongoing development of the next release of OpenFOAM.

Best regards,
Bruno

paladin July 19, 2012 04:24

Hi Bruno,

engineFoam tutorial with OF2.0.1 is working just fine (wich is a great relief ;-) )

I'll dig more about the dynamic mesh before posting anything on bt, i don't wanna cry wolf !

Is there a due date for the next release? (or at least for a correction of internal energy behaviour)
Because if it is corrected, and engineFoam still isn't working, then maybe more experienced people will check an hypothetical dynamic mesh problem... (I can try but i'm a beginner in OF :) )

I hope I didn't take to much of your time,

Regards,
Gregory

wyldckat July 20, 2012 05:11

Hi Gregory,

Quote:

Originally Posted by paladin (Post 372305)
Is there a due date for the next release? (or at least for a correction of internal energy behaviour)

I don't think there is any publicly official date for the next release, so there are only guesses.
One such guess is that it might be only released in December, one year after 2.1.0 was released.
Another guess would be to celebrate the Foundation's 1st year, this August.

Best regards,
Bruno

Vito31388 July 20, 2013 06:27

Quote:

Originally Posted by paladin (Post 372305)
Hi Bruno,

engineFoam tutorial with OF2.0.1 is working just fine (wich is a great relief ;-) )

I'll dig more about the dynamic mesh before posting anything on bt, i don't wanna cry wolf !

Is there a due date for the next release? (or at least for a correction of internal energy behaviour)
Because if it is corrected, and engineFoam still isn't working, then maybe more experienced people will check an hypothetical dynamic mesh problem... (I can try but i'm a beginner in OF :) )

I hope I didn't take to much of your time,

Regards,
Gregory

Hi Paladin, I've your same problem with kivaTest in OpenFoam 2.1.1 and so I want to know how you have resolved it. Did you have downloaded version 2.0.1 or according to you should I use the latest version 2.2 ?
Thanks a lot,
Vito

Vito31388 August 28, 2013 06:53

Problem solved
 
The problem was a bug of OpenFoam 2.1.1 ; with the latest version (2.2.1) engineFoam works fine


All times are GMT -4. The time now is 10:11.