implementation of wallHeatTransfer BC

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

 August 6, 2012, 06:58 implementation of wallHeatTransfer BC #1 Senior Member     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 1,506 Blog Entries: 6 Rep Power: 26 Hi all, i have a question to you. I am using the flamelet solver build by Alberto Cuoci et. al. All variables are depended on the mixture fraction Z in that solver. There for you just have to solve the navier-stokes-equations (p & U) and two additional equations describing the mixture fraction Z and the variance of it Z". Thats all. With Z and Z" you go into a look-up-table and extract your values like, cp, T, h, and so on No energy equation is solved! The extension by Alberto is using the enthalpy defect. Therefor he is solving an additional enthalpy equation H (its not the enthalpy h). You can use zeroGradient or fixedValue temperature BC but a wallHeatTransfer BC is treated like a zeroGradient BC. If you have a fixedValue you calculate the enthalpy-defect from that temperature. Thats a other way then in the inside cells or on a zeroGradient BC. The idea is to implement a wallHeatTransfer to make the "fixedValue BC" more dynamically... The problem is the following. I implemented the BC and now I can use the wallHeatTransfer BC but its like a fixedValue BC couse I am not solving the transport equation for "h" and do not get into the updateCoeffs() function. If I implement an additional enthalpy equation for "h" its working but the calculated "h" field is not the same like "H" depend on the difference species and therefor the temperature field I get is wrong. Is it possible to add the BC without solving the enthalpy equation? Therefor I should get into the "updateCoeffs()" function or? Hmm I think its hard to understand couse that solver is very complex and the thermodynamics too. Maybe someone has a suggestion?! Thanks for ready also. Tobi

August 8, 2012, 08:21
#2
Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,648
Blog Entries: 39
Rep Power: 99
Hi Tobi,

I was about to answer your private message and remembered to come look for a thread of yours on this... and since I found it, I'll reply to it here.

Quote:
 Originally Posted by Tobi In the wallHeatTransfer BC there is the function "updateCoeffs()" which is updating the wall temperature. I am searching in which file that function "updateCoeffs()" is called and how. Till now I do not find it in the code. Maybe you can help me?
Since it's a virtual method, you'll have to trek back to the basic class that gives it this virtual method, namely Foam::fvPatchField::updateCoeffs ().
In the Doxygen description for this method you'll see an entry in the section "Referenced by" to fvPatchField< Type >::evaluate(), which is also part of this very same class template, namely:
Code:
`void Foam::fvPatchField<Type>::evaluate(const Pstream::commsTypes)`
How I got there? Given this is a very heavy dependency class hierarchy, you'll have to abstract yourself from the complex structure and think that:
1. There is a master parent (father or mother, whichever you want to name it) class somewhere that defines the existence of said virtual methods.
2. Once we find the master parent, we look for the virtual method.
3. Then look for references to this specific virtual method.

This is how I did this trip (fully based on the Doxygen generated code documentation):
1. Search for parent class, by looking at the header files: Foam::wallHeatTransferFvPatchScalarField -> mixedFvPatchScalarField -> mixedFvPatchFields.H
2. Things here get confusing because it uses a macro:
Code:
`makePatchTypeFieldTypedefs (mixed)`
3. Well, we ignore this and keep looking for relevant headers, which you'll find inside the file "mixedFvPatchFields.H", namely:
Code:
`#include "mixedFvPatchField.H"`
4. There you'll see:
Quote:
5. This class does not re-implement "updateCoeffs", so you'll have to look for the complete member list: List of all members.
6. There you'll certainly find updateCoeffs() and can then see this line:
The one in bold is the one you're looking for, because it's the most parent-like class!

So the next question will be: then who calls "evaluate"?

Best regards,
Bruno
__________________

 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 su_junwei OpenFOAM Running, Solving & CFD 2 May 7, 2014 17:33 thomek OpenFOAM Programming & Development 0 October 18, 2010 05:10 fs82 OpenFOAM 1 October 9, 2009 10:31 kallipygian OpenFOAM Running, Solving & CFD 0 October 13, 2008 07:29 Niels Main CFD Forum 3 July 3, 2008 17:45

All times are GMT -4. The time now is 17:50.