turbFoam solver with heat-transfer?
Hallo out there.
I would like to set up a case of incomp. turbulent channel flow with heat-transfer. Is there a way of implementing the energy equation in the standard turbFoam solver? Has anyone experiences with this topic? Is there another better way to compute an incomp. turbulent flow with heat-transfer? Thanks so much - svens |
|
Hello together & hello Henrik - thanks for your reply.
I did what you said and it works - at least without adding the turbulent thermal diffusivity. And exactly here is my present problem which also shows me my huge lack of C++ knowledge (I'll promise I am going to work on that issue)... But so far I would be really greatful about some inspiration on this topic: I added an energy equation to the turbFoam.C code-file like this: Code:
fvScalarMatrix TEqn I had a look where the other diffusivities had been implemented and found out that they are initialed in the respective turbulence model which is in my case a k-epsilon-model. Orientated at the DkEff and DepsilonEff I added: Code:
tmp<volScalarField> DTEff() const At the moment I am trying to connect this new turbulent thermal diffusivity via the RASModel files (-.C & -.H) to the modified turbFoam.C code-file where I want to use DTEff. Sadly all my attempts failed so far. How do I have to formulate DTEff to use it in my turbFoam.C file? I would be so thankful if someone could help me with this problem. Regards - Sven |
Dear Sven,
there is no need to change the turbulence model to solve your problem. But if you go that route, it is essential to change the base class (RASmodel.H) to give access to the effective turbulent thermal diffusivity. Basically you need this line in RASmodel.H: Code:
virtual tmp<volScalarField> DTEff() const = 0; However, this changes the library and you need to keep it up-to-date with future releases to OF. Alternatively, I would simply add the following line to your version of turbFoam.C Code:
volScalarField DTEff = Henrik |
Hello Henrik - thanks for your reply.
Your alternative seems to be much better than my attempts! I implemented your suggestion and received directly the next error massage while compiling the new turbFoam.C file with wmake: Code:
error: 'class Foam::autoPtr<FOAM::incompressible::RASModel>' has no member named 'nut' Thanks for your help - Sven |
Dear Sven,
sorry my fault. The turbulence model is hooked onto an autoPtr (see createFields.H) so we must dereference: turbulence->DTEff() Just like in the momentum predictor. Henrik |
...just had the same awareness!
Thanks Henrik - your advices had been of huge value! Well to add this in the OF Wiki would be really great. But I guess at the moment there is still a lack of backround knowledge in my case. My next step is to run the code with an modified RAS model. I guess and hope after that I will have enough knowledge to write an reasonable Wiki article. Thanks so much Henrik! Greeting - Sven |
Dear Sven,
thanks for the flowers :rolleyes: What most people on the learning curve often forget is that they have a vivid experience where they went wrong, where they needed help and what actually was the missing piece that made them struggle - and this is exactly what they could contribute. More experienced users can then correct the little mistakes and fill in the background information at a later stage. So (everybody) please use the Wiki and fill the FAQ. Henrik |
Your are right Henrik - I going to do this the next days.
Regards - Sven |
All times are GMT -4. The time now is 07:48. |