CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

turbFoam solver with heat-transfer?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 4, 2009, 22:38
Default turbFoam solver with heat-transfer?
  #1
Member
 
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16
svens is on a distinguished road
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
svens is offline   Reply With Quote

Old   July 6, 2009, 10:53
Default
  #2
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
Dear Sven,

please have a look here

http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

Henrik
henrik is offline   Reply With Quote

Old   July 8, 2009, 22:34
Default
  #3
Member
 
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16
svens is on a distinguished road
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();
DTEff is my formulation for the turbulent thermal diffusivity (= nut/Pr_t+nu/Pr).
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())
            );
        }
to a copied kEpsilon.H header-file (0.85 is the value of the turbulent Prandtle-Number Pr_t).
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
svens is offline   Reply With Quote

Old   July 9, 2009, 04:14
Default
  #4
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
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;
You would then call turbulence.DTEff() when constructing the temperature equation.

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();
It would be great if you could you add this wisdom to the Wiki for future generations ;-)

Henrik
henrik is offline   Reply With Quote

Old   July 9, 2009, 14:26
Default
  #5
Member
 
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16
svens is on a distinguished road
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'
Did I something wrong? Is there another way to call the nut() values then by turbulence.nut()?

Thanks for your help - Sven
svens is offline   Reply With Quote

Old   July 9, 2009, 14:34
Default
  #6
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
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
henrik is offline   Reply With Quote

Old   July 9, 2009, 14:43
Default
  #7
Member
 
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16
svens is on a distinguished road
...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
svens is offline   Reply With Quote

Old   July 9, 2009, 18:11
Default
  #8
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
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
henrik is offline   Reply With Quote

Old   July 13, 2009, 12:09
Default
  #9
Member
 
Sven Schweikert
Join Date: Jun 2009
Posts: 38
Rep Power: 16
svens is on a distinguished road
Your are right Henrik - I going to do this the next days.

Regards - Sven
svens is offline   Reply With Quote

Reply


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


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


All times are GMT -4. The time now is 10:39.