CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Add temperature to icoFoam in OpenFOAM 2.1.1

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 24, 2012, 11:24
Default Add temperature to icoFoam in OpenFOAM 2.1.1
  #1
New Member
 
Mirco Magnini
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 14
Rep Power: 8
magnounibo is on a distinguished road
Hi everybody,

I am a new OpenFOAM user, version 2.1.1 on OpenSUSE 12.1.
I installed OpenFOAM following the instructions that I found in the OF webpage: http://www.openfoam.org/download/suse.php
The installation terminated successfully and I started to use the solver.

Now, I am trying to modify the solver icoFoam as suggested in the Wiki:http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

I copied and pasted the icoFoam folder with a new name (icoFoamTemp), renamed the .C file (icoFoamTemp.C), removed the old dependency file (icoFoam.dep), modified the /Make/files script, removed the linux64GccDPOpt folder. Now, as I run the "wmake" command to compile the new solver (still without any modification within any .C and .H file), I got the output error which you can find in the attached file.

Did anybody face the same problem and solved it, or does somebody have any suggestion?

Thanks!!!

p.s. I made the same on OF 1.6 installed on a OpenSUSE 11.4 machine and it worked perfectly.
Attached Files
File Type: txt add_temperature_to_icoFoam_error.txt (15.8 KB, 48 views)
magnounibo is offline   Reply With Quote

Old   October 25, 2012, 10:57
Default
  #2
Senior Member
 
Hisham's Avatar
 
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 247
Blog Entries: 10
Rep Power: 8
Hisham is on a distinguished road
Dear Mirco

Try this site:
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/

Best regards,
Hisham
Hisham is offline   Reply With Quote

Old   November 2, 2012, 11:49
Default
  #3
New Member
 
Mirco Magnini
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 14
Rep Power: 8
magnounibo is on a distinguished road
Thank you Hisham,

the link you provide is very interesting, with lots of useful information. Unfortunately, it wasn't of help in solving my problem. I tried to modify the IcoFoam solver following the guidelines included (they are for OF 1.6, mine is OF 2.1.1), but I received tha same error log message I got while following the Wiki steps.
magnounibo is offline   Reply With Quote

Old   November 2, 2012, 12:37
Default
  #4
Senior Member
 
Hisham's Avatar
 
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 247
Blog Entries: 10
Rep Power: 8
Hisham is on a distinguished road
Hi

It seems that the new solver is not linking to libfiniteVolume correctly. Have you changed anything with the "Make/options" file? Do you have more than one version of OpenFOAM installed?

It would help more if you compress the solver files and attach them.

Edit:
Sorry, just read your post again. It seems you're using an extend solver on the OpenCFD OpenFOAM. There are some differences of both editions. So you need to compile your solver on an extend environment.

Regards,
Hisham

Last edited by Hisham; November 2, 2012 at 13:02.
Hisham is offline   Reply With Quote

Old   November 2, 2012, 13:32
Default
  #5
New Member
 
Mirco Magnini
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 14
Rep Power: 8
magnounibo is on a distinguished road
Dear Hisham,

the Make/options file was not modified so it is equal to the original version within icoFoam. I don't have any other version of OF installed. I attach the compressed solver. When I run wmake from within this folder I got the error log attached above.
Please, could you give me more details to understand your last sentence? What do you mean for "extend solver on the OpenCFD OpenFOAM" and "extend environment"?
Thanks again!

Mirco
Attached Files
File Type: gz icoTempFoam.tar.gz (1.8 KB, 28 views)
magnounibo is offline   Reply With Quote

Old   November 2, 2012, 14:11
Default
  #6
Senior Member
 
Hisham's Avatar
 
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 247
Blog Entries: 10
Rep Power: 8
Hisham is on a distinguished road
Dear Mirco

I have just compiled your solver successfully. You need to change the destination of your solver though in Make/files:
Code:
icoTempFoam.C

EXE = $(FOAM_USER_APPBIN)/icoTempFoam
I think you have a problem with your current OpenFOAM installation. Try to reinstall it!

There are two editions: the original OpenFOAM by OpenCFD (currently owned by ESI). The current version is 2.1.1. There is a community driven release called the extend project. The current release is OpenFOAM-ext-1.6. Both editions are not 100% compatible. So some solvers from the extend edition could not compile or work as expected if compiled under the openCFD edition and vice versa.

Regards,
Hisham
Hisham is offline   Reply With Quote

Old   November 5, 2012, 05:02
Default
  #7
New Member
 
Mirco Magnini
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 14
Rep Power: 8
magnounibo is on a distinguished road
Dear Hisham,

I really thank you for your precious tips and explanations! I installed the extended version of OF and now I've been able to compile the new IcoTempFoam solver. However, I realize that all my former cases, which were run with the OpenCFD version, do not work anymore with the extended software. As instance, the extended OF does not recognize the PIMPLE routine (maybe it is not implemented).
Thus, if I would decide to keep using the OpenCFD version of OF, do you know what should I do to compile successfully new solvers?

Best regards,

Mirco
magnounibo is offline   Reply With Quote

Old   November 5, 2012, 07:55
Default
  #8
Senior Member
 
Hisham's Avatar
 
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 247
Blog Entries: 10
Rep Power: 8
Hisham is on a distinguished road
Hi Mirco

Sorry that I did not mention that earlier but I actually compiled your solver on an OpenCFD edition: OpenFOAM-2.0.1. I think it could be possible to use other versions as well. You just need to try it. I guess you need to re-install OpenFOAM (from OpenCFD). Or you can copy the icoFoam from the extend directory and modify it for temperature as you did. This should be the easiest way to do it.

Best regards
Hisham
Hisham is offline   Reply With Quote

Old   November 5, 2012, 09:33
Default
  #9
New Member
 
Mirco Magnini
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 14
Rep Power: 8
magnounibo is on a distinguished road
Dear Hisham,

now I'm understanding a bit more the issue. Maybe all of this is due to the fact that I installed the OpenCFD version of OF (2.1.1) only by downloading the rpm packages for opensuse as suggested in this link:

http://www.openfoam.org/download/suse.php

Following the guidelines reported in the web page, I could install OF in few seconds, so I guess I did not install it from the source files (otherwise it would have taken more time, as the extend version did). It might be that, in this way, OF can be used as a CFD solver but it can not be compiled and new solvers can not be compiled. I'm gonna check if, by compiling it from sources, it may work or not and I will post it.
Thanks again,

Mirco
magnounibo is offline   Reply With Quote

Old   November 6, 2012, 11:54
Default
  #10
New Member
 
Mirco Magnini
Join Date: Apr 2009
Location: Bologna, Italy
Posts: 14
Rep Power: 8
magnounibo is on a distinguished road
Dear Hisham,

I have installed OF 2.1.1 from sources following the guidelines of Alberto Passalacqua blog:
http://albertopassalacqua.com/?p=1210

The installation terminated successfully without any problem! Finally, I was able to compile the new solver. Hence, I believe that in order to compile new solvers, the version of OF installed has to be that from source and not from rpm packages, which is useful only if the user does not need to compile new solvers.
I hope this will be of help for any new OF user (like me)!
Hisham, thanks you again,

Mirco
magnounibo is offline   Reply With Quote

Old   April 11, 2013, 14:47
Default I got a warning message
  #11
New Member
 
Join Date: Feb 2013
Posts: 15
Rep Power: 4
zania is on a distinguished road
Following the instructions

http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
after wmake I got :
...
/home/user/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude/readPISOControls.H:3:15: war: unused variable ‘nOuterCorr’ [-Wunused-variable]
/home/user/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
/home/user/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
...
may I carry on using the new solver?
Thanks
zania is offline   Reply With Quote

Old   April 14, 2013, 13:20
Default
  #12
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings zania,

Those warnings are normal. I'll quote myself from a post I made back in 2010 :
Quote:
Originally Posted by wyldckat View Post
Those warnings are actually normal. AFAIK, those solvers use header files that are common to various solvers and not all solvers use those variables, therefore it triggers warning messages on those that don't use them.
You can safely proceed, if you only got warnings and no errors!

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is OpenFOAM 2.1.1 Heat Transfer applications working? fontania OpenFOAM Running, Solving & CFD 0 September 20, 2012 23:15
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50
Adding jpeg picture file in OpenFoam post in add a message window kumar2 OpenFOAM 1 March 22, 2006 23:17
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 22:07


All times are GMT -4. The time now is 04:54.