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

where is the calculation of the temperature field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 30, 2012, 04:07
Default where is the calculation of the temperature field
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

i am looking for the calculation step of the temperature field in the rhoSimpleFoam solver.

The T field must be calculated due to the enthalpy field which is solved in the hEqn.H file.

I had a look at the thermodynamics (hPsiThermo) which is used in the constant/hermodynamics file. There i find the correction (h.correct()) and therefor OF go to the calculate function. The code (shorted) is that one:

Code:
template<class MixtureType>
void Foam::hPsiThermo<MixtureType>::calculate()
{
    const scalarField& hCells = h_.internalField();
    const scalarField& pCells = this->p_.internalField();

    scalarField& TCells = this->T_.internalField();
    scalarField& psiCells = this->psi_.internalField();
    scalarField& muCells = this->mu_.internalField();
    scalarField& alphaCells = this->alpha_.internalField();

    forAll(TCells, celli)
    {
        const typename MixtureType::thermoType& mixture_ =
            this->cellMixture(celli);

        TCells[celli] = mixture_.TH(hCells[celli], TCells[celli]);
        psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]);

        muCells[celli] = mixture_.mu(TCells[celli]);
        alphaCells[celli] = mixture_.alpha(TCells[celli]);
    }
and I think that the calculation of the temperature in the cells is defined and solved by that line
Code:
        TCells[celli] = mixture_.TH(hCells[celli], TCells[celli]);
Is that correct?
After that I had a look at the TH function in the species (pureMixture) files but there was just a inline function prototype in the header file and no declaration of the function.

Can someone give me an advice?
Or am I completely wrong?


Why do I need it (for those who are interested in it):

I am using the flamelet solver. In this model all theromdynamic properties are just depend on the mixture fraction Z. The new thermodynamic model get the temperature field by extracting the temperature depended on Z out of a flamelet library. In this solver there is an extension using an enthalpy defect. So you can get use fixed value BC. If you choose that, the thermodynamics just calculating a new enthalpy defect derived of the fixed temperature and then selecting all new properties out of the flamelet library using that depended on Z and the enthalpy defect.

That`s very good but I wanna use the "wallHeatTransfer" BC. For that I have to calculate the temperature field every time step. For now just the h, p and U are calculated. h is used for the correct choice of enthalpy defect library to get better results. But if I have the enthalpy field it should be possible to recalculate the temperature field every iteration or just for the patch faces.

For now its possible to set the BC "wallHeatTransfer" but there is no calculation of the temperature and its like I set a fixed value.



Notice:
The extraction of the properties can be set. Like every 10 iterations you can extract the properties depended on Z.

Thanks in advance
Tobi

Last edited by Tobi; July 30, 2012 at 05:39.
Tobi is offline   Reply With Quote

Old   July 30, 2012, 10:40
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

i solved it. I had to implement the enthalpy equation for "h". Present I am just calculating the enthalpy "H".

Now the calculation for the temperature field is going and my wall heat transfer wall BC works.

But I have to get deeper into the code to know exactly what the solver is doing.

Tobi & Thanks for reading
Tobi 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
Diverging result for Temperature field in interFoam ovie OpenFOAM Running, Solving & CFD 105 December 6, 2021 09:02
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
transient temperature field with constant velocity Törnquist CFX 0 September 16, 2003 04:22
overwrite temperature field using usrsrc jess CFX 0 November 13, 2002 02:50
Question concering about validating Temperature field ghlee Main CFD Forum 1 December 1, 1998 12:36


All times are GMT -4. The time now is 03:37.