CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem with dieselFoam and themophysical properties

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2011, 16:32
Default Problem with dieselFoam and themophysical properties
  #1
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
I just did a pull from the repository and can no longer run anything in dieselFoam. Even the tutorial crashes with the following:

Code:
 --> FOAM FATAL ERROR: 
Tcommon 1000 for C7H16 != 1391 for others

    From function janafThermo<EquationOfState>::operator-=(const janafThermo<EquationOfState>& jt) const
    in file /home/turcios/OpenFOAM/OpenFOAM-2.0.x/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 260.
Looks like something has changed in the underlying structure. Anyone have a fix for this or seen it before
mturcios777 is offline   Reply With Quote

Old   October 31, 2011, 17:03
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Marco,

Yeah, I know, Henry Weller has been tweaking the code to respect physics a bit better: http://www.openfoam.com/mantisbt/view.php?id=327 - the tutorials still need fixing as mentioned on comment #777: http://www.openfoam.com/mantisbt/view.php?id=327#c777

I think that you can go back to a safer place by running:
Code:
git checkout 2b11286dad626d4f6a35379eeda0f29b0ee5ac23
At least until it's safe to pull the latest one.

You can check what they've been doing before doing a "git pull" by seeing here first: https://github.com/OpenFOAM/OpenFOAM-2.0.x/commits/

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 23, 2012, 07:25
Default
  #3
New Member
 
James Behzadi
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 27
Rep Power: 14
JBUNSW is on a distinguished road
Hi everyone,

I have the same problem with my newly installed OF 2.0.x.

Code:
 --> FOAM FATAL ERROR: 
Tcommon 1000 for C7H16 != 1391 for others

    From function janafThermo<EquationOfState>::operator-=(const janafThermo<EquationOfState>& jt) const
    in file /home/turcios/OpenFOAM/OpenFOAM-2.0.x/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 260.
I installed it using the instructions given here:

http://www.tfd.chalmers.se/~hani/kur...OwnLaptop.html

I tried the restore command Bruno has offered, but that avenue failed too!

Quote:
Originally Posted by wyldckat View Post
I think that you can go back to a safer place by running:
Code:
git checkout 2b11286dad626d4f6a35379eeda0f29b0ee5ac23
At least until it's safe to pull the latest one.
I have developed a chemistry model under OpenFOAM 2.0.x using DieselFOAM solver, and by modifying corresponding ODEChemistryModel's library classes. In new version, they have replaced this solver with SprayFOAM, which its interaction with aforementioned classes is unclear to me. So I prefer to continue my development with 2.0.x version, and when I figured out what SprayFOAM's secret(!) is, I will migrate to OF 2.1.0.

I truly appreciate it, if anyone can help me to resolve this error?!

Thanks in advance,
Jalal
JBUNSW is offline   Reply With Quote

Old   April 23, 2012, 07:43
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Jalal,

Quote:
Originally Posted by JBUNSW View Post
I tried the restore command Bruno has offered, but that avenue failed too!
Was there any error message when you did the "git checkout" command?
Did you do any changes to the code in the OpenFOAM-2.0.x folder, before running that command?

If so, run the following commands:
Code:
git stash
git checkout 2b11286dad626d4f6a35379eeda0f29b0ee5ac23
git stash pop
And build OpenFOAM again:
Code:
./Allwmake
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 23, 2012, 21:36
Default
  #5
New Member
 
James Behzadi
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 27
Rep Power: 14
JBUNSW is on a distinguished road
Hi Bruno,

Thanks for your immediate follow up. As for your following question:
Quote:
Originally Posted by wyldckat View Post
Was there any error message when you did the "git checkout" command?
I did it couple of days ago, and don't remember the details, but I'm sure that I was facing the same fatal error of janafThermo when I tried to run the code again.

As for changes to the code in the OF-2.0.x folder:
Quote:
Originally Posted by wyldckat View Post
Did you do any changes to the code in the OpenFOAM-2.0.x folder, before running that command?
As far as I remember, no. I didn't change anything there. I just copied my custom code under 'user' directory, that is jalal-2.0.x, and compiled them and tried to run my binaries.

Today, I went to the openFOAM-2.0.x directory, and issued the restore command you provided in your old post. This is what I witnessed:
Code:
Note: checking out '2b11286dad626d4f6a35379eeda0f29b0ee5ac23'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 2b11286... ENH: meshSearch: use tet decomposition for cell searching
After that I tried to run the original aachenBomb test case with original dieselFoam solver, not my customized version, and I had the same problem:
Code:
--> FOAM FATAL ERROR: 
Tcommon 1000 for C7H16 != 1391 for others

    From function janafThermo<EquationOfState>::operator-=(const janafThermo<EquationOfState>& jt) const
    in file /home/jalal/OpenFOAM/OpenFOAM-2.0.x/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 260.

FOAM exiting
What should I do?!

I tried the new restore and make commands you proposed:
Quote:
Originally Posted by wyldckat View Post
If so, run the following commands:
Code:
git stash
git checkout 2b11286dad626d4f6a35379eeda0f29b0ee5ac23
git stash pop
And build OpenFOAM again:
Code:
./Allwmake
And this was what I received:
Code:
jalal@ubuntu:~/OpenFOAM/OpenFOAM-2.0.x$ git stash
No local changes to save
jalal@ubuntu:~/OpenFOAM/OpenFOAM-2.0.x$ git checkout 2b11286dad626d4f6a35379eeda0f29b0ee5ac23
HEAD is now at 2b11286... ENH: meshSearch: use tet decomposition for cell searching
jalal@ubuntu:~/OpenFOAM/OpenFOAM-2.0.x$ git stash pop
No stash found.
Even though there was no stash to be saved, I issued the Allwmake command. Now, I have to wait hours for the Allwmake to finish...

I hope this fixes the problem.

Jalal
JBUNSW is offline   Reply With Quote

Old   April 24, 2012, 04:13
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Jalal,

OK, then the problem was that you only did the git checkout. Without re-building OpenFOAM, the libraries and applications could not reflect the modified source code. I didn't mention the need to run Allwmake because it's implied when using the git version of OpenFOAM

To speed up the build process, run this command before Allwmake:
Code:
export WM_NCOMPPROCS=4
This allows you to build with 4 simultaneous processes, making it about 3 times faster...

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 24, 2012, 04:35
Default
  #7
New Member
 
James Behzadi
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 27
Rep Power: 14
JBUNSW is on a distinguished road
Thanks Bruno,

I didn't know about the necessity of Allwmaking after gitting!

I didn't have the chance to try your multiprocessor speedup command, because I had already issued the Allwmake. Anyway, now dieselFoam works and I do not see those strange janafThermo errors. So happy!

Thanks again,
Jalal
JBUNSW is offline   Reply With Quote

Old   April 4, 2013, 07:29
Default
  #8
New Member
 
Pang
Join Date: Mar 2011
Location: Denmark
Posts: 25
Rep Power: 15
kmpang is on a distinguished road
Hi Foamers,

I have used the solution proposed by Bruno and it worked on my laptop. However, when I did the exact same thing on my workstation and I received the error below when I run the case.

Evolving Spray
Solving chemistry
#0 Foam::error:: printStack(Foam::Ostream&) in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 exp in "/lib/x86_64-linux-gnu/libm.so.6"F
#4 Foam::ReversibleReaction<Foam::sutherlandTransport <Foam::specieThermo<Foam::janafThermo<Foam:: perfectGas> > >, Foam::FallOffReactionRate<Foam::ArrheniusReactionR ate, Foam::TroeFallOffFunction> >::kf(double, double, Foam::Field<double> const&) const in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libreactionThermophysicalModels.so"
#5 Foam::ODEChemistryModel<Foam:: psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:: perfectGas> > > >:mega(Foam::Reaction<Foam::sutherlandTransport< Foam::specieThermo<Foam::janafThermo<Foam:: perfectGas> > > > const&, Foam::Field<double> const&, double, double, double&, double&, int&, double&, double&, int&) const in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so"
#6 Foam::ODEChemistryModel<Foam:: psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:: perfectGas> > > >:mega(Foam::Field<double> const&, double, double) const in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so"
#7 Foam::ODEChemistryModel<Foam:: psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:: perfectGas> > > >::derivatives(double, Foam::Field<double> const&, Foam::Field<double>&) const in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so"
#8 Foam::ODESolver::solve(Foam::ODE const&, double, double, Foam::Field<double>&, double, double&) const in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libODE.so"
#9 Foam:de<Foam::ODEChemistryModel<Foam:: psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:: perfectGas> > > > >::solve(Foam::Field<double>&, double, double, double, double) const in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so"
#10 Foam::ODEChemistryModel<Foam:: psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:: perfectGas> > > >::solve(double, double) in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libchemistryModel.so"
#11
in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/dieselFoam"
#12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#13
in "/home/kmpan/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/dieselFoam"
Floating point exception (core dumped)

Both my laptop and workstation are running with OF20x and the test case is exactly the same.

FYI, there are many fall-off reactions in my chem.inp, defined by by LOW and TROE, for example:

C2H2+H(+M)<=>C2H3(+M) 5.600E+12 0.000 2.400E+03
LOW / 3.8000E+40 -7.2700E+00 7.2200E+03 /
TROE / 7.5100E-01 9.8500E+01 1.3020E+03 4.1670E+03 /
H2/2/ H2O/6/ CO/1.5/ CO2/2/ CH4/2/ C2H6/3/

When I commented out LOW and/or TROE, the case can be run but apparently, the solution is just not right.

Can anyone please give some advice regarding this issue?

Many thanks in advance!

Best regards,
Pang.
kmpang is offline   Reply With Quote

Old   April 6, 2013, 07:03
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Pang,

Try this on both machines:
Code:
dieselFoam -help
At the end of the help message, you should see something similar to this:
Code:
Using: OpenFOAM-2.0.x (see www.OpenFOAM.org)
Build: 2.0.x-3cdcacaf38bb
But in your case, instead of "3cdcacaf38bb" you should see "2b11286dad62", which is the first 12 bytes from the hash for the commit I indicated in the second post.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 9, 2013, 03:46
Default
  #10
New Member
 
Pang
Join Date: Mar 2011
Location: Denmark
Posts: 25
Rep Power: 15
kmpang is on a distinguished road
Hi Bruno,

Sorry for the late reply.

I have run dieselFoam -help on both of the machines and they did show 2.0.x-2b11286dad62. However, one of them gives the problem that I mentioned earlier. Do you have any clue? It's just confusing me.

Many thanks for your help.

Best regards,
Pang
kmpang is offline   Reply With Quote

Old   April 9, 2013, 04:22
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pang,

Try running one of the tutorial cases from 2.0.x that use dieselFoam.

If it also crashes, try running the following commands for rebuilding OpenFOAM 2.0.x:
Code:
foam
wcleanAll
export WM_NCOMPPROCS=4
./Allwmake > make.log 2>&1
Change "4" to the number of cores in your machine.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 11, 2013, 06:01
Default
  #12
New Member
 
Pang
Join Date: Mar 2011
Location: Denmark
Posts: 25
Rep Power: 15
kmpang is on a distinguished road
Thanks again Bruno.

In fact it didn't crash with the tutorial case and when I use some other chemical mechanisms. I tried to recompile OF too but it doesn't solve the problem. That's weird. Emm...

Best regards,
Pang
kmpang is offline   Reply With Quote

Old   April 11, 2013, 09:46
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pang,

A few ideas come to mind:
  1. Do both machines use the x86_64 architecture? Because if one of them is a 32bit machine, or has a i686 Linux Distribution installed, that might indicate that the problem is related to small math differences.
  2. The libraries used on the system might be different. Run the following command on both machines:
    Code:
    ldd $(which dieselFoam)
    Check if there are differences between the two outputs.
  3. Check if the binary is exactly the same, location-wise:
    Code:
    which dieselFoam
  4. Are you 100% certain that the cases are identical on both machines?
  5. Does your case have any "libs ();" or function object entries in "system/controlDict"?
  6. Have you modified anything or any file inside the folder "OpenFOAM-2.0.x/etc"?
  7. Does the folder "~/.OpenFOAM" exist? If so, are there any stray files inside it? Notice that there is a dot symbol before "OpenFOAM"! This folder is for personal configurations.
  8. Have you built any custom solvers or libraries on one of the machines? Check by running:
    Code:
    ls -l $FOAM_USER_APPBIN
    ls -l $FOAM_USER_LIBBIN
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 13, 2013, 04:40
Default
  #14
New Member
 
Pang
Join Date: Mar 2011
Location: Denmark
Posts: 25
Rep Power: 15
kmpang is on a distinguished road
Hi Bruno,

Million thanks for the suggestion. Unfortunately, the remote access to my office workstations is down. I can't test them out throughout the weekend. I'll test next week and share my experience here by then.

Thanks again and have a nice weekend!

Best regards,
Pang.
kmpang is offline   Reply With Quote

Old   April 15, 2013, 03:14
Default
  #15
New Member
 
Pang
Join Date: Mar 2011
Location: Denmark
Posts: 25
Rep Power: 15
kmpang is on a distinguished road
Hi Bruno,

I have checked through according to your suggestions:

1) Do both machines use the x86_64 architecture? Because if one of them is a 32bit machine, or has a i686 Linux Distribution installed, that might indicate that the problem is related to small math differences.
A: Yes, both are running with the x86_64 architecture.

2) The libraries used on the system might be different. Run the following command on both machines:
Code: ldd $(which dieselFoam)
Check if there are differences between the two outputs.
A: All the libraries are same but the alphanumeric at the end of each line is different, does it matter?
----- Eg: libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f16723bc000)

3) Check if the binary is exactly the same, location-wise:
A: The binary is exactly the same.

4) Are you 100% certain that the cases are identical on both machines?
A: Yes, I'm sure that the cases are identical.

5) Does your case have any "libs ();" or function object entries in "system/controlDict"?
A: No, I didn't include that function objection there.

6) Have you modified anything or any file inside the folder "OpenFOAM-2.0.x/etc"?
A: I don't think I did anything to any files in that folder.

7) Does the folder "~/.OpenFOAM" exist? If so, are there any stray files inside it? Notice that there is a dot symbol before "OpenFOAM"! This folder is for personal configurations.
A: I have checked under my personal directory and I don't see any ~/.OpenFOAM there.

8) Have you built any custom solvers or libraries on one of the machines?
A: I have quite a bit of different custom solvers and libraries in both of the machines but as far as I remember, I didn't modify anything on the default dieselFoam.

By the way, one of my machine (of that which is free from this problem) is running with Ubuntu 11.10 while the one faces the problem is running with Kubuntu 12.04. Will this difference give the problem?

Many thanks again.

Best regards,
Pang
kmpang is offline   Reply With Quote

Old   April 15, 2013, 08:21
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pang,

7) Confirm with the following command, just in case:
Code:
ls -l ~/.OpenFOAM
8) Just in case, try the following commands:
Code:
mv ${FOAM_USER_APPBIN} ${FOAM_USER_APPBIN}_backup
mv ${FOAM_USER_LIBBIN} ${FOAM_USER_LIBBIN}_backup
  • To check what they do first, run with "echo" in the beginning:
    Code:
    echo mv ${FOAM_USER_APPBIN} ${FOAM_USER_APPBIN}_backup
    echo mv ${FOAM_USER_LIBBIN} ${FOAM_USER_LIBBIN}_backup
  • To undo:
    Code:
    mv ${FOAM_USER_APPBIN}_backup ${FOAM_USER_APPBIN}
    mv ${FOAM_USER_LIBBIN}_backup ${FOAM_USER_LIBBIN}
This will only work if your custom solvers/utilities were built into these folders.

As for one being Ubuntu 11.10 and the other Kubuntu 12.04 - there are a few possibilities:
  • If you incorrectly copied things from one machine to the other, then there might be some broken files or links. But if you independently built on both directly from the git repositories, then there shouldn't be any problems.
  • The kernel on one of them might be suspicious, at least from my experience with Ubuntu 11.10... but on 12.04, it should be very stable.
  • There could be a hardware problem on the machine you are having problems. But usually you should have gotten more than one problem so far...
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 18, 2013, 05:23
Default
  #17
New Member
 
Pang
Join Date: Mar 2011
Location: Denmark
Posts: 25
Rep Power: 15
kmpang is on a distinguished road
Hi Bruno,

Sorry for the late reply. I was busy with something else.

7) Tried using 'ls -l ~/.OpenFOAM' and it returned with 0 found.

8) I can't test these now cause I'm running some cases with the solvers. I'll test it as soon as I finish those simulations.

Emm, for some reasons, it works with 11.10 but not 12.04 in my case - weird enough.

Many thanks for the support again. I shall continue to find out the reason behind soon.

Best regards,
Pang.
kmpang is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



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