Differences simpleFoam vs. pimpleFoam / RASModel.H vs turbulenceModel.H
hi
I am trying to get a turbulence model (for heat flux) running that was implemented in simplefoam the following way:
But for pimpleFoam it does not work (I applied the above steps on pimpleFoam). Simplefoam uses RASModel.H whereas pimpleFoam uses turbulenceModel.H. What is the difference? Without replacing Code:
include "turbulenceModel.H" Code:
include "RASModel.H" Code:
/home/uli/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude/nearWallDist.H: In function 'int main(int, char**)': So I replaced turbulenceModel.H by RASModel.H and it compiled without error message, but running a case I get: Code:
Starting time loop I use RAS and normally pisoFoam but since the model was implemented in simpleFoam I thought it might be easier to use pimpleFoam for this case. Uli |
Code:
include "turbulenceModel.H" When you find Code:
include "RASModel.H" |
hello Gerhard, thank you for you answer.
Your explanation is what I assumed. What I do not understand is why I get the error posted above ("error: 'namespace' definition is not allowed here") when compiling my modified solver, but when I - instead of turbulencemodel.H - include RASModel.H, I can compile the solver. However, I get the 2nd error posted above when I run my case. Uli |
Greetings to all!
@Uli: I would suggest that you check the buoyant solvers located at "applications/solvers/heatTransfer" for more ideas. As for RASModel vs turbulenceModel, (I think) the access to the wall functions is a bit different, which is why you're having problems. If you could post/attach the "TEqn.H" file, it would make it a lot easier to diagnose the problem! Best regards, Bruno |
1 Attachment(s)
hi, sorry for the delay
I checked the Heat transfer solvers but they don't include "nearWallDist.H", which seems to be the source of the problem. Attached you find the TEqn.H file. Thanks for any kind of help. |
1 Attachment(s)
Hi Uli,
Now I don't know why you're having problems :( Attached is the code resulting from these steps:
Best regards, Bruno |
TEqn.H
Hi Bruno,
I looked through files you have attached in the previous post. I don't understand why the part fvScalarMatrix TEqn // ( // fvm::div(phi, T) // - fvm::laplacian(kappaEff, T) // ); // // TEqn.relax(); is commented since it meant to solve the temperature equation. I am also trying to include TEqn in simpleFoam solver. And I used the TEqn.H as given below. { volScalarField kappaEff ( "kappaEff", turbulence->nu()/Pr + turbulence->nut()/Prt ); fvScalarMatrix TEqn ( //fvm::ddt(T) fvm::div(phi, T) - fvm::laplacian(kappaEff, T) ); TEqn.relax(); TEqn.solve(); //rhok = 1.0 - beta*(T - TRef); } Is this wrong? or what is your opinion? Thanks and best regards, Suranga. |
Hi Suranga,
The previous posts should have given you the hint that I'm not experienced enough in OpenFOAM's source code in order to be able to guess the problems from loose code written on a post. If you really want us (i.e. any one on the forum) to help you, please provide the source code that you can share. Or at least, describe the exact steps you've taken so that anyone can reach the same point you're in right now. Best regards, Bruno edit: I've moved Suranga's answer to a new thread, in an attempt to gather the problem in a single thread: http://www.cfd-online.com/Forums/ope...implefoam.html |
All times are GMT -4. The time now is 17:56. |