# where is the calculation of the temperature field

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 30, 2012, 04:07 where is the calculation of the temperature field #1 Senior Member     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 1,077 Blog Entries: 4 Rep Power: 19 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 void Foam::hPsiThermo::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.

 July 30, 2012, 10:40 #2 Senior Member     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 1,077 Blog Entries: 4 Rep Power: 19 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post ovie OpenFOAM Running, Solving & CFD 97 June 30, 2015 15:21 matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51 Törnquist CFX 0 September 16, 2003 04:22 jess CFX 0 November 13, 2002 03:50 ghlee Main CFD Forum 1 December 1, 1998 13:36

All times are GMT -4. The time now is 04:19.