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/)
-   -   attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000; (https://www.cfd-online.com/Forums/openfoam-solving/78727-attempt-use-janafthermo-equationofstate-out-temperature-range-200-5000-a.html)

gkewl July 30, 2010 15:54

attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000;
 
Hi

I was using the reactingFoam tutorial on OpenFOAM 1.6, and made changes as suggested in the OPenFOAM Wiki. I got the following error message:

attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000; T = 5000.05#0 Foam::error::printStack(Foam::Ostream&) in "/home/gkewlani/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/gkewlani/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::specieThermo<Foam::janafThermo<Foam::perfect Gas> >::H(double) const in "/home/gkewlani/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libreactionThermophysicalModels.so"
#3 Foam::ODEChemistryModel<Foam::psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam::perfectGas> > > >::solve(double, double) in "/home/gkewlani/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libchemistryModel.so"
#4 main in "/home/gkewlani/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/reactingFoam"
#5 __libc_start_main in "/lib/libc.so.6"
#6 _start in "/home/gkewlani/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/reactingFoam"

How can I change the temperature range above? Is something else going wrong?

I am new to this software, so any help would be useful.

Thanks!

sahm August 5, 2010 16:42

Same problem
 
Hello Foamers
I have the same problem(also posted on other threads), can any body help?:(

Rickard.Solsjo August 6, 2010 08:38

Im having the same problem, so maybe not much of help here.
What I was thinking - since im using very high injection speed and therefore very big density gradient - is to refine the mesh and use very small timesteps. In this case the courant number will be satisfied as well.

If you are very skeptical, read this thread

http://www.cfd-online.com/Forums/ope...your-time.html

apparently then , janaf would be a bug and cant be solved if using combustion

sahm August 6, 2010 12:16

I got it, but new problem
 
Hi everyone,
I just made my mesh 4X finer with fixed courant number, and this time it worked, but there is another problem.
in the oxidizer field, there is no reaction, but the temperature drops as soon as the flow gets into the domain. I don't know what exactly causes this, but that has to do something with Cp or mixture properties. I`m looking for this new problem, as my results does not look good.
You can see my case through this link. Remember to change the mesh and constant/Reactions file, as the file was not defined correctly.
Have fun, Take care.

Rickard.Solsjo August 6, 2010 14:16

Hey man, your link didnt work please post it again.
What kind of case are you doing? DieselFOAM?

sahm August 6, 2010 14:19

ReactingFoam Error
 
http://www.cfd-online.com/Forums/ope...oam-error.html
The address is that, If it didn't work, go to my profile, and bring statistics, go to my latest posts.

Linse August 9, 2010 08:09

Redefining JANAF-THERMO limits
 
Hello to all,

I just tripped over a similar problem, the JANAF giving a warning of a too low temperature.

Here is a way to change these limits - not less, but surely not more!
It might work in case the rest of the simulation would be going well and it is just these three or four degrees that would make the calculation fail. About the outcome if you redefine the limits I cannot say anything, I am just starting to get into the program!

So here it is:
- Open ../constant/thermophysicalProperties
- Look for the line with plenty of numbers
In my case the second triplet of numbers were the ones defining the JANAF-parameters. The first one set the low temperature limit, the next one the upper temperature limit, the third one gives some value that is needed by the library.
- Change the value corresponding to your failing limit
- Be happy (or not) with the results!


I would be happy if someone could explain the entries in the "thermophysicalProperties" file, so I really can understand it.
Of course, pointing to a thread where that is done would be equally welcome. ;)

Rickard.Solsjo August 9, 2010 08:23

Hi, thanks for your reply. Would you please copy the file you mean in here so that I can get an idea of what you mean. Are you actually talking about the therm.dat file in the chemkin ? Are you doing dieselFoam?
Thx!

Quote:

Originally Posted by Linse (Post 270814)
Hello to all,

I just tripped over a similar problem, the JANAF giving a warning of a too low temperature.

Here is a way to change these limits - not less, but surely not more!
It might work in case the rest of the simulation would be going well and it is just these three or four degrees that would make the calculation fail. About the outcome if you redefine the limits I cannot say anything, I am just starting to get into the program!

So here it is:
- Open ../constant/thermophysicalProperties
- Look for the line with plenty of numbers
In my case the second triplet of numbers were the ones defining the JANAF-parameters. The first one set the low temperature limit, the next one the upper temperature limit, the third one gives some value that is needed by the library.
- Change the value corresponding to your failing limit
- Be happy (or not) with the results!


I would be happy if someone could explain the entries in the "thermophysicalProperties" file, so I really can understand it.
Of course, pointing to a thread where that is done would be equally welcome. ;)


Linse August 9, 2010 13:16

Quote:

Originally Posted by Rickard.Solsjo (Post 270815)
Hi, thanks for your reply. Would you please copy the file you mean in here so that I can get an idea of what you mean. Are you actually talking about the therm.dat file in the chemkin ? Are you doing dieselFoam?
Thx!

Actually, I was trying to use rhoCentralFoam which again and again gave me that error (though it is a comprehensible thing in my case, as I try to simulate the break of a vacuum barrier).
So I did not try too much with it, thus cannot say anything about the results (or problems) with changed value.


The file I was using was a basic "thermophysicalProperties" as I found it in one of the tutorials. Unfortunately somehow it doesn't work to upload it, but it contains following text:
Quote:

Originally Posted by File
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Pr Pr [ 0 0 0 0 0 0 0 ] 0.72;

thermoType ePsiThermo<pureMixture<sutherlandTransport<specieT hermo<janafThermo<perfectGas>>>>>;

mixture N2 1 28.01348 100 10000 1000 2.9525407 0.0013968838 -4.9262577e-07 7.8600091e-11 -4.6074978e-15 -923.93753 5.8718221 3.5309628 -0.0001236595 -5.0299339e-07 2.4352768e-09 -1.4087954e-12 -1046.9637 2.9674391 1.458e-06 110;


// ************************************************** *********************** //

Just noticed it seems to be OF 1.6, but the error occurred with 1.7 as well.
The numbers 100 10000 and 1000 are the ones of interest in this case.
100 is the low limit, 10000 the upper one, and 1000 seems to be interesting for averaging...

faithhidy August 10, 2010 01:18

In my experience,the modification of the limit values can not help you to solve the janaf error. It just can move the calculation forward for several steps. That problem will appear finally.

Linse August 23, 2010 04:45

I agree, Josiah! The way I described would help only, if it really was just very few degrees AND the janaf-library contains the necessary values.


But just at that point another question:
I know that in my case most probably at some point I will reach temperatures close to air liquefaction (vacuum breaches, air getting sucked in, extreme temperature drop due to immensely increased volume...).
Does anybody know a solver and libraries that would provide me with the means for such thing including possible liquefaction of air (or the contained gases, to be exact)?

(I will post this question in an extra thread in case I find nothing similar. So if you have an answer, perhaps the other thread would be the better place for posting the answer. So others looking would find it more easily...)

Thanks in advance for your answers/opinions!

yingkun June 13, 2011 22:41

Hi,Josiah
I have the same problem with the solver coalChemistryFoam for a long time, I refine the mesh from 0.67 million to 0.9 million,but it still doesn't work,do you know how to solve it?
best regards,
ying

carowjp June 23, 2011 10:54

Newer JANAF implementation
 
I stumbled onto the thread linked below while trying to find more info about OpenFOAM's thermophysical models.

Take a look:

http://www.cfd-online.com/Forums/ope...naf-model.html

regards,

Jim

yingkun June 24, 2011 04:33

Hi,Jim
thank you for reply
I try as http://openfoamwiki.net/index.php/Janaf ,but it seems doesn't help,I am trying to solve it!

flowAlways June 17, 2015 11:53

Hello,

Is there a way to disable the warning ??
"attempt to use janafThermo<EquationOfState> out of temperature range 300 -> 3500"
Because the warning is generated every time step and for each cell(where temperature is not in the Janaf limit), the log file generated is very large and it also slows down the processing due to IO.

Because, for my case I know that the warning eventually disappears by end of the simulation, I would like to disable it from the very beginning.

Is there a way to disable it ... I have tried to make changes here by commenting out the block which generates the warning. Can somebody suggest if I am doing the right way ??

OpenFOAM/OpenFOAM-2.3.x/blob/master/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H

if (T < Tlow_ || T > Thigh_) { //COMMENTED return min(max(T, Tlow_), Thigh_); } else { return T; }

flowAlways June 18, 2015 04:07

yes, commenting the code here does work and there are no Janaf Messages.

OpenFOAM/OpenFOAM-2.3.x/blob/master/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H

if (T < Tlow_ || T > Thigh_) { //COMMENTED return min(max(T, Tlow_), Thigh_); } else { return T; }


However I realized that its not a very good idea to disable the warnings completely. I would like to have this warning once every time iteration(if the limits are exceeded for any of the cells) and not for each cell seperately. This would also reduce the size of the log file generated and will also make the log more readable. A more elegant way would be to display the count of the cells where the Janaf limit is exceeded each time step. But I do not understand how can it be done, where to add the code, I assume a flag needs to be provided by the user to disable the warnings completely, display the count or to enable the warnings(default). This flag can be a part of the dictionary file but where and how will it be read.. any ideas ?

flowAlways June 19, 2015 07:29

To remove the JANAF Warnings from the log file I have written a simple shell script using the sed command.
run the script as ./shellScript log
Code:

#!/bin/sh
echo "The JANAF THERMO warnings will be removed from the following file $1"
oldLineCount=$(sed -n '$=' $1)
oldFileSize=$(du -h $1 | cut -f -1)
sed -i '/--> FOAM Warning/,/out of temperature range/d' $1
echo -e "\nThe JANAF warnings have been removed" >> $1
newLineCount=$(sed -n '$=' $1)
newFileSize=$(du -h $1 | cut -f -1)
echo "The line count before = $oldLineCount and size = $oldFileSize" >> $1
echo "The line count after = $newLineCount and size = $newFileSize" >> $1

The script will append the following lines to the log after removing the warnings
The JANAF warnings have been removed
The line count before = 240592584 and size = 18G
The line count after = 531150 and size = 35M

I am doing the benchmark test case Sandia Flame D where the air inlet and fuel inlet are at temperatures 291k and 294K respectively
with the Pilot jet at 1880K for ignition.
It is quite obvious that the temperature at some places in the domain will fall below the JANAF lower limit
example janafThermo<EquationOfState> out of temperature range 300 -> 3500; T = 293.62368

Is there an elegant way to disable/minimize the warnings ??
It is really frustrating when the log generated is of size 20-30G. It slows down the processing significantly when global reaction is used.
Is there a workaround ??

sahmed October 2, 2016 15:40

dear all
Did anyone recently face similar problem with the janaf? I was running reactingFoam in OF 2.3.1 and got the same warning. I commented the block (as shown below) but still getting the same warning. I ran 'wmake' in the reactingFoam directory to activate/recompile the change I made in the header fle. Could anyone please share his/her recent experience on this issue, how to solve it?



//{
// if (T < Tlow_ || T > Thigh_)
// {
// WarningIn
// (
// "janafThermo<EquationOfState>::limit(const scalar T) const"
// ) << "attempt to use janafThermo<EquationOfState>"
// " out of temperature range "
// << Tlow_ << " -> " << Thigh_ << "; T = " << T
// << endl;
//
// return min(max(T, Tlow_), Thigh_);
// }
// else
// {
return T;
// }
//}

sahmed October 3, 2016 10:33

Any kind of help or suggestion from anyone PLEASE? I still have the problem.

sahmed October 5, 2016 11:26

problem solved
 
I solved the problem by decreasing the number of cores in my parallel runs. It is working fine now without showing any warning msg and taking unnecessary times.
Hope this will help others.


All times are GMT -4. The time now is 09:25.