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

BC for People Heat Flow

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2017, 03:23
Default
  #21
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
You can edit the expression of wallHeatFlux correspond parameters in material properties and result.

Last edited by hiuluom; May 25, 2017 at 23:47.
hiuluom is offline   Reply With Quote

Old   May 25, 2017, 13:56
Default Query
  #22
Member
 
jeanpinto24@hotmail.com
Join Date: Feb 2017
Posts: 44
Rep Power: 9
jeanpinto24| is on a distinguished road
Dear Huynh:

I have modified the BC wallHeatFlux as follows. M

Code:
FoamFile
{
    Version 2.0;
    Format ascii;
    Class volScalarField;
    Location "0";
    Object wallHeatFlux;
}
// * * * * * * * * * * * * * *

Dimensions [1 0 -3 0 0 0 0];

InternalField uniform 0;

BoundaryField
{
    Inlet1
    {
        Type calculated;
        Value uniform 0;
    }
    Inlet2
    {
        Type calculated;
        Value uniform 0;
    }
    Inlet3
    {
        Type calculated;
        Value uniform 0;
    }
    Inlet4
    {
        Type calculated;
        Value uniform 0;
    }
    Wall
    {
        Type calculated;
        Value uniforms 0;
    }
    Outlet1
    {
        Type calculated;
        Value uniform 0;
    }
    WallTemperature
    {
        Type fixedValue;
        Value uniform 308;
    }
}
On the other hand, I use OpenFoam 2.3, I do not know how to use the download file and then add it to the buoyantBoussinesqPimpleFoam solver. You could tell me how this new BC is imported to the solver to use.

Last edited by wyldckat; May 27, 2017 at 10:17. Reason: Added [CODE][/CODE] markers
jeanpinto24| is offline   Reply With Quote

Old   May 25, 2017, 23:35
Default
  #23
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
What heat flux do you want?

You can assign a heat flux or power, convection on a boundary. Reference here:

https://github.com/OpenFOAM/OpenFOAM...hScalarField.H

about wallHeatFlux tool that it is used to calculate heat flux on wall when you have a result. It is not a BCs.
hiuluom is offline   Reply With Quote

Old   May 26, 2017, 08:34
Default Query
  #24
Member
 
jeanpinto24@hotmail.com
Join Date: Feb 2017
Posts: 44
Rep Power: 9
jeanpinto24| is on a distinguished road
The heat flow that I want to assign to a wall is 104 W / m2. I have searched the forum and it is not so easy to find. Regarding turbulentHeatFluxTemperature, I do not want to get a fixed temperature gradient. As you comment that wallTransfer is this case is not valid, what other way do you recommend ?. I guess Ansys this BC is already activated, but in OpenFoam 2.3 is difficult to find, I hope your help.
jeanpinto24| is offline   Reply With Quote

Old   May 26, 2017, 09:35
Default
  #25
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
I do not get clearly your idea but the heat flux only assign for wall. If you do not want to use it, I can refer other wall heat that:
https://github.com/OpenFOAM/OpenFOAM...hScalarField.H

Otherwise, if you want to distribute non-uniform heat heat flux on the wall, you just change uniform to non-uniform like that:
Code:
myPatch

        {

            type            externalWallHeatFluxTemperature;

            kappa           fluidThermo;       // fluidThermo, solidThermo or

                                               // lookup

            q               nonuniform List<scalar> 
                              <number face here>
                              (value here);  

            Ta              uniform 300.0;     // ambient temperature /[K]

            h               uniform 10.0;      // heat transfer coeff /[W/K/m2]

            thicknessLayers (0.1 0.2 0.3 0.4); // thickness of layer [m]

            kappaLayers     (1 2 3 4)          // thermal conductivity of

                                               // layer [W/m/K]

            value           uniform 300.0;     // initial temperature / [K]

            kappaName       none;

        }
or you can use swakfoam conditions.
hiuluom is offline   Reply With Quote

Old   May 26, 2017, 09:57
Default Query
  #26
Member
 
jeanpinto24@hotmail.com
Join Date: Feb 2017
Posts: 44
Rep Power: 9
jeanpinto24| is on a distinguished road
I just need to assign a constant (uniform) heat flux to a wall and that this heat flow comes through the wall in the simulation and is taken into account in the energy equation. This heat is the heat energy of people delivered to the environment. I need something like:

Code:
FoamFile
{
    Version 2.0;
    Format ascii;
    Class volScalarField;
    Location "0";
    Object wallHeatFlux;
}
// * * * * * * * * * * * * * *

Dimensions [1 0 -3 0 0 0 0];

InternalField uniform 0;

BoundaryField
{
    Wall1
    {
        Type fixedValue;
        Value uniform 100;
    }
    Wall2
    {
        Type calculation;
        Value uniform 0;
    }
    Wall3
    {
        Type calculated;
        Value uniform 0;
    }
    Wall4
    {
        Type calculated;
        Value uniform 0;
    }
    Floor
    {
        Type calculated;
        Value uniform 0;
    }
    Ceiling
    {
        Type calculated;
        Value uniform 0;
    }
I have searched and it is not so easy to do it, it is only to assign a constant flow of heat that must be taken into account in the energy and simulated equation.

Last edited by wyldckat; May 27, 2017 at 10:17. Reason: Added [CODE][/CODE] markers
jeanpinto24| is offline   Reply With Quote

Old   May 26, 2017, 10:15
Default Query
  #27
Member
 
jeanpinto24@hotmail.com
Join Date: Feb 2017
Posts: 44
Rep Power: 9
jeanpinto24| is on a distinguished road
Find this paper, where you configure the constant heat flux in a wall through a temperature gradient. It's not exactly what I want, I need a heat out the wall:

http://www.tfd.chalmers.se/~hani/kur...ingmingLiu.pdf
jeanpinto24| is offline   Reply With Quote

Old   May 27, 2017, 13:00
Default
  #28
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,

AFAIK, "turbulentHeatFluxTemperature" is the closest possibility I know of and setting wall heat flux based on a gradient into the temperature field is a must, because with the Boussinesq approach there is no energy equation, at least in OpenFOAM 2.3.x and when using buoyantBoussinesqPimpleFoam or buoyantBoussinesqSimpleFoam.

You can find more specific details in the source code file, which you can get the path to it by running this command:
Code:
echo $FOAM_SRC/turbulenceModels/incompressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H
As for the specific version of OpenFOAM 2.3, it is very important to know if it's 2.3.0, 2.3.1 or 2.3.x, because there is a bug in this boundary condition in OpenFOAM 2.3.0, as reported here: https://bugs.openfoam.org/view.php?id=1433


I've also had to do another bug fix to the custom utility wallHeatFluxIncompressible for it to work properly with this boundary condition, so if you had an old build, then you need to update your existing build, as instructed here: https://github.com/wyldckat/wallHeatFluxIncompressible


Attached is the package "modified_hotRoom_example_23x_v1.tar.gz" which provides a modified tutorial case, based on the "tutorials" from OpenFOAM 2.3.x, namely:
  • "heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/"
  • "heatTransfer/buoyantPimpleFoam/hotRoom"
Keep in mind that the attached case is just a dummy example, it does not have correct "Cp*rho", "Cp" and "rho" values defined in the file "constant/transportProperties", it only has some example values, so that you can define them properly.

If you run this example case by running the script Allrun, at the end it will also run the utility that checks the calculated heat flux exchanged, for which an example for the time step 200, has the customized wallHeatFluxIncompressible giving the following values:
Code:
Wall heat fluxes 
floor: Total 10431.5 [W] over 100 [m2] (104.315 [W/m2])
ceiling: Total -4001.14 [W] over 100 [m2] (-40.0114 [W/m2])
fixedWalls: Total 0 [W] over 200 [m2] (0 [W/m2])
Keep in mind that this means that the heat flux isn't 100% accurate (doesn't give exactly 104 W/m2), but stating that a human body emits 104 W/m2, is also a fallacy since it's based on an average measured value...

Best regards,
Bruno
Attached Files
File Type: gz modified_hotRoom_example_23x_v1.tar.gz (3.0 KB, 26 views)
__________________
wyldckat is offline   Reply With Quote

Old   May 29, 2017, 00:40
Default Answer
  #29
Member
 
jeanpinto24@hotmail.com
Join Date: Feb 2017
Posts: 44
Rep Power: 9
jeanpinto24| is on a distinguished road
I found the answer. OpenFoam is not available to configure a constant heat flow. What is done is to impose this condition indirectly, applying the Fourier law and applying a fixed temperature gradient in the Temperature file (This is the response of the previously described Anton Kidess user). Investigate for several days and the first option of imposing a heat flow is not possible. The discussion is over, I hope this information will be beneficial to OpenFoam users on heat transfer issues.
akidess and hiuluom like this.
jeanpinto24| is offline   Reply With Quote

Old   May 29, 2017, 02:34
Default
  #30
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Congratulations. Indeed all you need to to is specify a fixed temperature gradient of ~ 4.16 K/m2. Really surprised by the other answers you've been getting here.

Quote:
Originally Posted by jeanpinto24| View Post
I found the answer. OpenFoam is not available to configure a constant heat flow. What is done is to impose this condition indirectly, applying the Fourier law and applying a fixed temperature gradient in the Temperature file (This is the response of the previously described Anton Kidess user). Investigate for several days and the first option of imposing a heat flow is not possible. The discussion is over, I hope this information will be beneficial to OpenFoam users on heat transfer issues.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   May 30, 2017, 00:36
Default Query
  #31
Member
 
jeanpinto24@hotmail.com
Join Date: Feb 2017
Posts: 44
Rep Power: 9
jeanpinto24| is on a distinguished road
Dear Bruno, I use the OpenFoam version 2.3.0. With respect to the energy equation in heat transfer solver with the Boussinesq approximation, if there is an energy equation defined as a function of temperature. Analyzing the case, it is interesting to impose a temperature gradient with "TurbulentHeatFluxTemperature", on the other hand, the use of wallHeatFluxIncompressible is a reinforcement study to calculate the heat flux in the wall to be studied. I think this last step is not necessary. By the way, the shared case does not run me, I will solve this.
jeanpinto24| is offline   Reply With Quote

Old   June 4, 2017, 19:35
Default
  #32
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
Quick answers:

@akidess:
Quote:
Originally Posted by akidess View Post
Congratulations. Indeed all you need to to is specify a fixed temperature gradient of ~ 4.16 K/m2. Really surprised by the other answers you've been getting here.
I did not see that indication in previous posts. I guess that setting a fixed temperature gradient will pretty much do the same as using "turbulentHeatFluxTemperature", but the user has to do the calculations manually first.


@jeanpinto24:
Quote:
Originally Posted by jeanpinto24| View Post
Dear Bruno, I use the OpenFoam version 2.3.0.
Then the bug I pointed out is in that version. The fix is described in the report I indicated.

Quote:
Originally Posted by jeanpinto24| View Post
Analyzing the case, it is interesting to impose a temperature gradient with "TurbulentHeatFluxTemperature", on the other hand, the use of wallHeatFluxIncompressible is a reinforcement study to calculate the heat flux in the wall to be studied. I think this last step is not necessary.
Verification and validation is something that should not be ignored when using OpenFOAM, which was why I used the utility wallHeatFluxIncompressible to check if the results were correct. Specially if there is a known bug and we're not certain if things are working as intended or not.

Quote:
Originally Posted by jeanpinto24| View Post
By the way, the shared case does not run me, I will solve this.
That's because you have OpenFOAM 2.3.0 and the aforementioned bug.
As I mentioned, the shared case was tested with 2.3.x. I expect it might work with 2.3.1, but will definitely not work with 2.3.0.
wyldckat is offline   Reply With Quote

Old   June 6, 2017, 03:07
Default
  #33
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
Quick answers:

@akidess:

I did not see that indication in previous posts.
See BC for People Heat Flow
wyldckat likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   June 8, 2017, 04:38
Default Query
  #34
Member
 
jeanpinto24@hotmail.com
Join Date: Feb 2017
Posts: 44
Rep Power: 9
jeanpinto24| is on a distinguished road
Dear Bruno, I have a query regarding the BC of the temperature on the walls in the classroom. Currently placed as zeroGradient. Attached the case file temperature file:

Code:
FoamFile
{
    Version 2.0;
    Format ascii;
    Class volScalarField;
    Location "0";
    Object T;
}
// * * * * * * * * * * * * * *

Dimensions [0 0 0 1 0 0 0];

InternalField uniform 300;

BoundaryField
{
    Inlet1
    {
        Type fixedValue;
        Value uniform 303;
    }
    Inlet2
    {
        Type fixedValue;
        Value uniform 303;
    }
    Inlet3
    {
        Type fixedValue;
        Value uniform 291;
    }
    Inlet4
    {
        Type fixedValue;
        Value uniform 291;
    }
    Wall
    {
        Type zeroGradient;
    }
    Outlet1
    {
        Type zeroGradient;
    }
    WallTemperature
    {
        Type fixedValue;
        Value uniform 308;
    }
}
What temperature BC do you recommend me for this case ?. The purpose of setting the zeroGradient condition is for the walls to have the temperature of the adjacent fluid. By the way, already use wallHeatFluxIncompressible in OpenFoam 2.3.0. I will change version in the coming days, for now I dedicate myself to other topics of my thesis of degree.

Last edited by wyldckat; June 25, 2017 at 09:04. Reason: Added [CODE][/CODE] markers
jeanpinto24| is offline   Reply With Quote

Old   June 8, 2017, 16:13
Default
  #35
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 313
Rep Power: 15
agustinvo is on a distinguished road
Hello,

maybe I'm repeating something introduced before, but why don't you use "turbulentHeatFluxTemperature"? If you know already your heat flux, you can set alphaEff in your solver and get a proper BC.
agustinvo is offline   Reply With Quote

Old   June 25, 2017, 09:08
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
Quick answers:
Quote:
Originally Posted by jeanpinto24| View Post
Dear Bruno, I have a query regarding the BC of the temperature on the walls in the classroom. Currently placed as zeroGradient. Attached the case file temperature file:

[...]

What temperature BC do you recommend me for this case ?. The purpose of setting the zeroGradient condition is for the walls to have the temperature of the adjacent fluid.
Correct, using "zeroGradient" will give you the same values on the walls as in the adjacent cell centers. This is is the most common option for establishing adiabatic heat exchange (i.e. no heat exchange through those boundaries).



Quote:
Originally Posted by agustinvo View Post
maybe I'm repeating something introduced before, but why don't you use "turbulentHeatFluxTemperature"? If you know already your heat flux, you can set alphaEff in your solver and get a proper BC.
Full instructions on how to use that boundary condition were given in post #28.
wyldckat is offline   Reply With Quote

Reply

Tags
bc for people heat flow


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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
heat conduction in solid and convection in flow kunal FLUENT 3 February 29, 2012 04:42
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 12:02
Inviscid Drag at subsonic, subcritical Mach # Axel Rohde Main CFD Forum 1 November 19, 2001 12:19
time averaged heat transfer in oscillating flow Matthieu Ubas Main CFD Forum 2 November 5, 1999 14:20


All times are GMT -4. The time now is 05:56.