|
[Sponsors] |
July 4, 2009, 22:38 |
turbFoam solver with heat-transfer?
|
#1 |
Member
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16 |
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 |
|
July 6, 2009, 10:53 |
|
#2 |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
||
July 8, 2009, 22:34 |
|
#3 |
Member
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16 |
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 ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(DTEff, T) ); TEqn.solve(); 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 { return tmp<volScalarField> ( new volScalarField("DTEff", 1/0.85 * nut_ + nu()) ); } 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 |
|
July 9, 2009, 04:14 |
|
#4 |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
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 = turbulence.nut()/0.85 + laminarTransport.nu(); Henrik |
|
July 9, 2009, 14:26 |
|
#5 |
Member
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16 |
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 |
|
July 9, 2009, 14:34 |
|
#6 |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
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 |
|
July 9, 2009, 14:43 |
|
#7 |
Member
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16 |
...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 |
|
July 9, 2009, 18:11 |
|
#8 |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
Dear Sven,
thanks for the flowers 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 |
|
July 13, 2009, 12:09 |
|
#9 |
Member
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16 |
Your are right Henrik - I going to do this the next days.
Regards - Sven |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Heat transfer coefficient - what is waht | Stan | FLUENT | 28 | December 29, 2021 16:29 |
Concentric tube heat exchanger (Air-Water) | Young | CFX | 5 | October 6, 2008 23:17 |
CFX Heat Transfer | RJamison | CFX | 0 | July 24, 2008 12:11 |
heat transfer in two-phase flow | Leonid Fromzel | CFX | 0 | April 8, 2008 05:57 |
heat transfer on dimpled plate | mech | FLUENT | 4 | February 6, 2007 15:15 |