Add temperature to pisoFoam
I'm trying to add temperature field to pisoFoam.
I followed the icoFoam tutorial, applied to pisoFoam files, and everything seems fine but the turbolence models. It let me work with laminar model only. Some notes: - I'm using BlueCape windows porting. - Compiling the new solver returns me lots of warning concerning missing header files (but developer guide says it's ok) - Following the Developer guide you have to edit the solver changing CourantNo.H into CourantNo.T.H. But I miss this file. Leaving the original name let the solver be compiled. My creteFields.h is as following: Code:
Info<< "Reading transportProperties\n" << endl; - why in the original pisoFoam file the transportProperties Dict was missing ? - why in the very last lines turbolence is specified using just laminarTransport ? I tested a case with the laminar model and the result seems ok. Any help is really appreciated. Daniele |
I tried to follow the guideline of this thread: http://www.cfd-online.com/Forums/ope...implefoam.html
but the problem still remains. I've just the laminar turbolence model. I think I'm missing something very stupid but I don't know where since I compiled a modified version of pisoFoam. BTW, now I don't have any missing headers compiling problem. I'll try to compile an exact copy of original pisoFoam solver and see whether the problem is there too. Daniele |
Strange... even the original pisoFoam solver has the same problem, no other turbolence models than laminar.
The exact error is: --> FOAM FATAL ERROR: Unknow turbolenceModel type RASModel Valid turbolenceModel types: 1 ( laminar ) From function turbolenceModel::New(&const volVectorField&, const surfaceScalarField&, transportModel&, const word&) in file turbolenceModel.C at line 111. Any help ? Daniele |
Hi Daniele,
I've already replied to you via email. For other forum readers, the latest problem is fixed on blueCFD by running: Code:
wmake Keep in mind that wmakeVerifyExeDependencies is available only on blueCFD's modifications to OpenFOAM source code and this script can be found via Google as well ;) Best regards, Bruno |
It works ! (well, what else ? ;))
Thanks for the fast support. Daniele |
Quote:
Regards Mojtaba |
I found the solution myself. I was putting TEqn.h in the wrong place in source code. I was putting TEqn after PISO loop, mentioned in this link:
http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam I put it at the first of the PISO loop which was mentioned in here: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/programmingTutorial.pdf And problem solved. |
Troubles to add temperature to pisoFoam
Hi you all,
I found this thread which is as closer as possible to my current case. I managed to add temperature to pisoFoam and I followed hints found on the forum and even on the wikipage "How to add temperature to icoFoam". The steps are the following: SOLVER FOLDER 1) I created a new solver called "pisoFoamT" copying and pasting from the already available "pisoFoam". 2) I added in createFields.H the code for reading new T volScalarField and a new dictionary called "thermophysicalProperties" in the "constant" folder of the new case. 3) I created new "TEqn.H" for the temperature transport equation. 4) In "Make" first I changed in "files" reference from "pisoFoam.C" to "pisoFomT.C", then in "options" I added the address and the new libraries to manage T transport ("specie" and "basicThermophysicalModels"). CASE FOLDER 1) Added T in "0" folder. 2) Added "thermophysicalProperties" in the "constant" folder with the thermo type. 3) In "System/ fvSchemes" I added correct operators to solve T equation and in "System/fvSolution" I added T with the proper solving method. After that I reached the solver directory on the bash terminal, then I typed "wclean" to delete all the previous dependancies and then "wmake". The binary file seems generated correctly even because the wmake operation report an error in TEqn.H which to me is not very important at this stage, because it just says that one paramether is not declared, which I already knew. The problem is that, running the case, the T equation is not calculated, is like ignored by the solver and of course the T has not changed at all along time steps. Going deeper and debugging by means of gdb, seems "pisoFoamT" wasn't recognized and was run "pisoFoam" instead, because the lines I added are completely ignored. So, if I added in "pisoFoamT.C" the line #include "TEqn.H", this is like skipped; the same if I enter createFields.H, here is correctly read p, U but T is skipped as well. Doesn't anybody have any clue on what is happening here? Thank you. Matteo |
Hi Matteo,
Quote:
Either way, have you done the other tutorial first? The one to add temperature to icoFoam? Best regards, Bruno |
Quote:
By the way, I already made step by step the "How to add temperature to icoFoam" without any big deal. Thank you Bruno, if I keep having troubles I'll post it ;) |
hi Matt
I also modified pisoFoam to solve for temperature. I did not introduce "thermophysicalProperties" nor "TEqn.H" but just added the code to solve energy equation to the pisoFoamT.C file. Except that I did the same you did and so far it works. Have you found a solution to your problem yet? What comes to my mind are two points: Did you change "pisoFoam" to "pisoFoamT" in your controldict file? Did you call pisoFoamT instead of pisoFoam when starting your simulation? Uli |
Hi uli,
thanks for your reply and to try to help me ;) I appreciate that. By the way, I made lots of progress and now I'm able to run my code with temperature equation and thermophysical properties, which was my goal actually. I suggest you to read the following thread I opened after this: http://www.cfd-online.com/Forums/ope...cal-model.html I will post on this thread the latest version of my pisoFoamT solver files. See ya! |
All times are GMT -4. The time now is 18:25. |