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

wallHeatFlux utility for an incompressible case

Register Blogs Community New Posts Updated Threads Search

Like Tree33Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 19, 2013, 09:48
Default
  #21
New Member
 
ae-lab VUB
Join Date: Oct 2011
Posts: 17
Rep Power: 14
aevub is on a distinguished road
hi

Is there a example/tutorial on how to use the wallHeatFluxIncompe utility?
What should be included in the wallHeatFluxDict?

Thx!
aevub is offline   Reply With Quote

Old   December 29, 2013, 16:43
Default
  #22
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings aevub,

Well... I had already mentioned in my previous post where a "wallHeatFluxDict" can be found:
Quote:
Originally Posted by wyldckat View Post
2. Inside the package you've provided, the file "wallHeatFluxDict" exists inside it. Therefore, it's just a matter of copying it to where the previous message was telling you to copy it to.
The package in question that you're probably looking for is in post #12.
This is because the one mentioned on the quoted post is for a modified version of the one in #12.

As for an example case... my guess is that you can use any tutorial case that uses heat transfer and uses incompressible flow.

Best regards,
Bruno
imani likes this.
__________________
wyldckat is offline   Reply With Quote

Old   May 19, 2014, 08:03
Default
  #23
New Member
 
Chris
Join Date: May 2014
Posts: 2
Rep Power: 0
Christian1003 is on a distinguished road
Hello,
i have an other problem with using the wallHeatFluxIncompressible tool. I'm computing a case with the buoyantBoussinesqPimpleFoam in OF 2.2 with k-w SST and wall-functions.
When i'm using the tool it makes the error:

--> FOAM FATAL IO ERROR:
Unknown patchField type kappatJayatillekeWallFunction for patch type wall

Valid patchField types are :
...

Sure i can change the wall function and recompute it but is there a solution with this wall-function?

thanks
Christian1003 is offline   Reply With Quote

Old   June 22, 2014, 15:08
Default
  #24
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

I've created a git repo for the utility wallHeatFluxIncompressible by Eelco van Vliet: https://github.com/wyldckat/wallHeatFluxIncompressible
In addition, I've adapted the code to work with OpenFOAM 2.2.x and 2.3.x.

Note: When using OpenFOAM 2.2.0, you should use the code that is meant for OpenFOAM 2.1.x, because the field names in 2.2.0 are still using the old field naming convention "kappat" and "kappaEff", while 2.2.1 and above use "alphat" and "alphaEff".


@Chris: I don't know if you've managed to solve the problem you had, but if you're using OpenFOAM 2.2.1 or 2.2.2 or 2.2.x, then try using the code from the repository I've indicated above.

Best regards,
Bruno
ayhan515 likes this.
__________________
wyldckat is offline   Reply With Quote

Old   October 30, 2014, 06:49
Default
  #25
New Member
 
Kostas Margaris
Join Date: Feb 2014
Posts: 15
Rep Power: 12
kmargaris is on a distinguished road
Hi all!

I have created a simple model (attached) of natural convection inside a rectangular domain. I used the wallHeatFluxIncompressible utility to check the heat flux balance. I got the expected result, 10 W/m2 were applied to wall4 as BC and 10 W/m2 are coming out wall3 which had a constant temperature BC:

Quote:
Wall heat fluxes
wall1: Total 0 [W] over 1 [m2] (0 [W/m2])
wall2: Total 0 [W] over 1 [m2] (0 [W/m2])
wall3: Total -0.1000000647 [W] over 0.01 [m2] (-10.00000647 [W/m2])
wall4: Total 0.1 [W] over 0.01 [m2] (10 [W/m2])
floor: Total 0 [W] over 0.01 [m2] (0 [W/m2])
ceiling: Total 0 [W] over 0.01 [m2] (0 [W/m2])
However, in order to get this result I had to set rho0 equal to 1.0 in the transport properties dictionary file (attached).

Could someone explain why this is happenning?
Attached Files
File Type: txt transportProperties.txt (1.4 KB, 71 views)
File Type: zip testBox_thin_air.zip (96.0 KB, 89 views)
kmargaris is offline   Reply With Quote

Old   October 30, 2014, 07:00
Default
  #26
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
ssss is on a distinguished road
Quote:
Originally Posted by kmargaris View Post
Hi all!

I have created a simple model (attached) of natural convection inside a rectangular domain. I used the wallHeatFluxIncompressible utility to check the heat flux balance. I got the expected result, 10 W/m2 were applied to wall4 as BC and 10 W/m2 are coming out wall3 which had a constant temperature BC:



However, in order to get this result I had to set rho0 equal to 1.0 in the transport properties dictionary file (attached).

Could someone explain why this is happenning?
You are working in an incompressible case so pressure is divided by rho. But as I think Openfoam doesn't divide the pressure by your rho, so he uses rho=1 and then

Code:
surfaceScalarField heatFlux =fvc::interpolate(kappaEff*Cp0*rho0)*gradT;
rho0 should be the density of the solver so 1.

This is the only thing I can imagine that can explain it, but I'm pretty sure I'm not right.
ssss is offline   Reply With Quote

Old   November 1, 2014, 16:35
Default
  #27
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@kmargaris: From the files in the case you provided, I had to guess that you used the solver buoyantBoussinesqPimpleFoam.

The answer by ssss seems to be correct. More details:
Can you spot the problem?


Essentially, the inverted equation implemented in the boundary condition would be this:
Code:
q_ = gradient()*(Cp0*alphaEffp)
which clearly has no reference to "rho", hence being considered as "1.0".

I took a quick look at the compressible implementation of this boundary condition... and it's essentially the same equation, i.e.:
Code:
q_/(alphaEff*thermo.Cp)
Which means that some particular detail is being missed here... OK, it looks like the problem is in the units for "alpha":
  • incompressible "alphat" field:
    Code:
    dimensions      [0 2 -1 0 0 0 0];
  • compressible "alphat" field:
    Code:
    dimensions      [1 -1 -1 0 0 0 0];
And there you have it, the reason why "rho" is interpreted as "1.0"... although... the header file "turbulentHeatFluxTemperatureFvPatchScalarFiel d.H" clearly stated that it was assuming "alphaEff" is already in "kg/m/s"... oh my, this looks like a bug in OpenFOAM ! Then again, it's more likely to be a typo in the header's comment!?

So, essentially, the problem is that the heat flux used in the boundary condition is actually "q/rho", i.e. the possibly named kinematic heat flux...


Mmm... I'll report this on the bug tracker...
edit: Bug reported at http://www.openfoam.org/mantisbt/view.php?id=1433

Best regards,
Bruno
__________________

Last edited by wyldckat; November 1, 2014 at 17:19. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   November 3, 2014, 04:56
Default
  #28
New Member
 
Kostas Margaris
Join Date: Feb 2014
Posts: 15
Rep Power: 12
kmargaris is on a distinguished road
@wyldckat: Thanks for the explanation and for submitting the bug report.

It seems that this bug only affects the post processing; the actual heat flux boundary condition is applied correctly in this case, right?
kmargaris is offline   Reply With Quote

Old   November 8, 2014, 09:20
Default
  #29
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi kmargaris,

The boundary condition is incorrect. It would only be correct if Cp0 value was in fact "Cp*rho".
In other words, you can fix the problem for the boundary condition if you simply define "rho" as 1.0 and that "Cp0" is the result of "Cp*rho".

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 7, 2015, 01:26
Default Dear wyldckat
  #30
New Member
 
Seokwon Whang
Join Date: May 2012
Posts: 25
Rep Power: 13
hswzzz is on a distinguished road
@ wyldckat

hello, I tried to use your 'wallHeatFluxIncompressible' in my problem. (buoyantBoussinesqPimpleFoam with LES, oneEqEddy)
(I think my result is reasonable when I comparing the temperature and velocity with literature.)
Your utility was completely working and calculating wallHeatFlux!
When I plot the wallHeatFlux, the trend is similar with literature, however, the magnitude is totally different. (e.g. literature: 100, my case: 0.1)

Do you have any idea for this problem?

I use Cp0 =1.005, rho0=1.166

Thank you
hswzzz is offline   Reply With Quote

Old   January 11, 2015, 15:35
Default
  #31
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings hswzzz,

I'm sorry to say that you haven't provided enough information in order to deduce what might be wrong.

Nonetheless, if I have to guess, since the discrepancy is at a scale of 1000, then my guess is that you were not careful enough with the units of the final mesh. OpenFOAM deals with metre by default and you probably planned for the mesh to be in millimetre.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   March 16, 2015, 12:54
Default
  #32
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 11
Naresh yathuru is on a distinguished road
Hi Foamers,

Sorry for restarting the thread again.i am using buoyant boussinesq simpleFoam. i have read most of the threads here how to calculate wall heat flux. now i got a question may be its dumb, I have given temprature b.c on a surface patch is it now possible to find the heat flux on this patch after the simulaion?

i tired the wallheatflux command on the terminal.
can somebody help me.

Thank You.

regards,
Naresh
Naresh yathuru is offline   Reply With Quote

Old   March 16, 2015, 15:24
Default
  #33
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 11
Naresh yathuru is on a distinguished road
Hi Bruno,

I also used the turbulentHeatFluxtemperature to specify the heat flux boundary conditions for a patch and i got unphysical result. i m using buoyantboussinesqsimpleFoam. Now i understand the reason. Thanks for the explanation.

That being said is there any other posibility to specify heatFlux boundary condition for a patch?

2. i have another doubt could you please through some light on why should Cp0 should be specified as 1.0. because for TurbulenceHeatFluxTemperature B.C Cp0 is specified as 1006 though they both has the same dimensions m^2/s^2/k

This is very crucial for me right now . thank you.



regards,
Naresh Yathuru

Last edited by Naresh yathuru; March 17, 2015 at 12:43.
Naresh yathuru is offline   Reply With Quote

Old   April 5, 2015, 08:04
Default
  #34
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Naresh,

Quote:
Originally Posted by Naresh yathuru View Post
i tired the wallheatflux command on the terminal.
Installation instructions for compiling wallHeatFluxIncompressible are given here: https://github.com/wyldckat/wallHeatFluxIncompressible

Usage instructions are given in post #19.

Quote:
Originally Posted by Naresh yathuru View Post
2. i have another doubt could you please through some light on why should Cp0 should be specified as 1.0. because for TurbulenceHeatFluxTemperature B.C Cp0 is specified as 1006 though they both has the same dimensions m^2/s^2/k
This was explained in detail in the posts #27, #29 and in the bug report http://www.openfoam.org/mantisbt/view.php?id=1433

It's not "Cp0" that should be set to "1.0", it's "rho0" that should be "1.0", as already explained in post #29:
Quote:
Originally Posted by wyldckat View Post
It would only be correct if Cp0 value was in fact "Cp*rho".
In other words, you can fix the problem for the boundary condition if you simply define "rho" as 1.0 and that "Cp0" is the result of "Cp*rho".

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 7, 2015, 02:57
Default
  #35
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 11
Naresh yathuru is on a distinguished road
Hello bruno,

thank you so much for the reply. I have read the posts you have mentioned already. and sorry if my question was not clear. My question was concerning the wallHeatfluxIncompressible. in the readme file it says the following:

Modified version of wallHeatFlux based on suggestion of to change combustion flow to normal flows

http://www.cfd-online.com/Forums/ope...ance-flow.html

I replaced the createField with the boussinesqSimpleFoam

In this version it is required to specify values for the density, heat capacity, and Prandtl numbers in the transportProperties dictionary like
Code:
// Laminar Prandtl number
Pr              Pr [0 0 0 0 0 0 0] 0.9;

// Turbulent Prandtl number
Prt             Prt [0 0 0 0 0 0 0] 0.85;

// Cp0 value needed for wallHeatFluxIncompressible
rho0             rho0 [1 -3 0 0 0 0 0] 1.2; // this rho0

// rho0 value needed for wallHeatFluxIncompressible
Cp0             Cp0 [0 2 -2 -1 0 0 0] 1.0; // i meant this cp0
could u please through some light on this. i tried but i couldnt figure it out.

may be this is a silly question could you tell me please which value should i use for cp0 and rho0 when i use turbulentwallheatFlux B.C and if i m using the wallheatfluxincompressible utility to find the flux on the patches. should i use Cp0 = 1.0 or 1005.

Thank you,

regards,
Naresh

Last edited by wyldckat; April 12, 2015 at 16:07. Reason: Added [CODE][/CODE]
Naresh yathuru is offline   Reply With Quote

Old   April 12, 2015, 16:13
Default
  #36
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Naresh,

Quote:
Originally Posted by Naresh yathuru View Post
may be this is a silly question could you tell me please which value should i use for cp0 and rho0 when i use turbulentwallheatFlux B.C and if i m using the wallheatfluxincompressible utility to find the flux on the patches. should i use Cp0 = 1.0 or 1005.
You'll have to provide more details on how you originally defined your simulation case. Because you're asking about details that relate to post-processing a case I/we know nothing about.
In other words, if you don't indicate how your case was originally created and defined, I don't know how is should be handled at the end of the simulation.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   April 13, 2015, 12:43
Default
  #37
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 11
Naresh yathuru is on a distinguished road
Quote:
You'll have to provide more details on how you originally defined your simulation case. Because you're asking about details that relate to post-processing a case I/we know nothing about.
In other words, if you don't indicate how your case was originally created and defined, I don't know how is should be handled at the end of the simulation.

Best regards,
Bruno
thanks for the reply.I am doing a indoor airflow simulation. my geometry is basically a room with inlet, outlet and an object inside.

Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293; //17C

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform 293.15; // 20C
    }
    outlet
    {
        type            zeroGradient;
        
    }
    sideandfloorwalls
    {
        type            zeroGradient;
        
    }
    lightingwall
    {
        //type            wallHeatFlux; 
        //heatFlux        uniform -200; 
        // This did not work for incompressible flows. I read somewhere that this B:C does not exist in OF 230
    
        type            turbulentHeatFluxTemperature;
        heatSource      flux;
        q               uniform -200; // w/m^2 // This is just a check . this would generate a surface temperature of -27 C 
        alphaEff        alphaEff;
        value           uniform 273; // place holder
    } 
    /*{
        type            fixedValue;
        value           uniform 323.15; // for the time being or flux 100 w/m
    }*/
    innercube
    {
        type            zeroGradient;
        //value           uniform 313.15;
    }
    roof
    {
        type            zeroGradient;
        //value           uniform 291.15;
    }
}
This is my T B.c

and this how i specified my transport properties
Quote:
transportModel Newtonian;

// Laminar viscosity
nu nu [0 2 -1 0 0 0 0] 1.7e-05;

// Thermal expansion coefficient
beta beta [0 0 0 -1 0 0 0] 3.4482e-03; // 1/Tref

// Reference temperature
TRef TRef [0 0 0 1 0 0 0] 290;

// Laminar Prandtl number
Pr Pr [0 0 0 0 0 0 0] 0.9;

// Turbulent Prandtl number
Prt Prt [0 0 0 0 0 0 0] 0.7;

// Cp0 value needed for wallHeatFluxIncompressible
//rho0 rho0 [1 -3 0 0 0 0 0] 1.2;

// rho0 value needed for wallHeatFluxIncompressible
//Cp0 1005;

// Cp0 value needed for wallHeatFluxIncompressible
rho0 rho0 [1 -3 0 0 0 0 0] 1;

// rho0 value needed for wallHeatFluxIncompressible
Cp0 1005;
and my 0 folder has wallGradT, wallheatFlux,GradT folders as mentioned in the test case ffor the wallheatFluxincompressible.

when i use turbulentHeatFluxtemperature boundary condition i specify cp0 as 1005. but according to the read me file in the wallheatfluxincompressible it says

Quote:
// Cp0 value needed for wallHeatFluxIncompressible
rho0 rho0 [1 -3 0 0 0 0 0] 1.2;

// rho0 value needed for wallHeatFluxIncompressible
Cp0 Cp0 [0 2 -2 -1 0 0 0] 1.0;
My doubt is that, should cp0 be specified as 1.0 or can it be changed according to the case?

i m a little confused.

Thank you
Regards,
Naresh
Naresh yathuru is offline   Reply With Quote

Old   April 15, 2015, 05:12
Default
  #38
New Member
 
Gautam Saikia
Join Date: Jan 2015
Location: India
Posts: 12
Rep Power: 11
gomsy1987 is on a distinguished road
Hi Eelcovv

Can you please suggest how to use the "wallHeatFluxIncompressible" utilty file. I mean is it like just cope paste the files to the respective directory and than running the utility command from the terminal will work??

Warm regards
Gautam
gomsy1987 is offline   Reply With Quote

Old   April 15, 2015, 05:28
Default
  #39
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 11
Naresh yathuru is on a distinguished road
Hi goutham,


I use it this way. I copy pase the respective files eg, GradT and other required files in the 0 folder before starting the simulation. after the simulation is done u can type wallHeatfluxTemperature and the patchname in yout terminal . it is basically a post processing utility.

i assume u already installed the wallHeatFluxIncompressible utility successfully and checked .

All the best.
Naresh
Naresh yathuru is offline   Reply With Quote

Old   April 15, 2015, 10:13
Default
  #40
New Member
 
Gautam Saikia
Join Date: Jan 2015
Location: India
Posts: 12
Rep Power: 11
gomsy1987 is on a distinguished road
Hi Naresh

Thanks for your reply. I just downloaded the zipfile given in this thread. After that I am not understanding if to copy the folder to "/applications/utilities" or some other steps to follow. Please help me.

Thanking you
Gautam
gomsy1987 is offline   Reply With Quote

Reply

Tags
incompressible, open foam, wallheatflux


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
how to create an internal fan for a multiRegion case? phsieh2005 OpenFOAM 0 February 2, 2012 16:32
wallHeatFlux utility in OpenFoam1.6 maruthamuthu_venkatraman OpenFOAM 29 October 3, 2011 10:43
thermal analysis - how to model internal fan? Pei-Ying Hsieh Main CFD Forum 6 March 20, 2008 10:35
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
flow simulation across a small fan jane luo Main CFD Forum 15 April 12, 2004 17:49


All times are GMT -4. The time now is 00:01.