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

Setting constant heat flux in chtMultiRegionSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By crubio.abujas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 26, 2020, 16:25
Default Setting constant heat flux in chtMultiRegionSimpleFoam
  #1
Member
 
Join Date: Feb 2020
Posts: 90
Rep Power: 6
Shibi is on a distinguished road
Hello to all,


I would like to have an opinion on a case I am assembling with chtMultiRegionSimpleFoam.
I want to simulate the temperature distribution of a container [box] having a sphere inside it which produces a constant heat flux of 120 w/mē. The container and sphere are surrounded by air without any initial imposed velocity.


The mesh was generated with snappyHexMesh to define the air, box and sphere regions. Afterwards, I separate the region with slitMeshRegions, and get the patches for the interface regions [sphere_to_air and air_to_sphere].



I would like to know how to set a constant heat flux on the sphere.


Right now I that the following in T field for the sphere



Code:

internalField   uniform 300;

boundaryField
{
    sphere_to_air
    {
        type            fixedGradient;
        gradient    uniform 120;
    }
}

And the same for the T field on the Air folder


Code:

    walls
    {
        type            zeroGradient;
    }
    air_to_box
    {
        type            compressible::turbulentTemperatureCoupledBaffleMixed;
        value           $internalField;
        Tnbr            T;
        kappaMethod     fluidThermo;
    }
    air_to_sphere
    {
        type            fixedGradient;
        gradient    uniform 120;
    }

Is this a correct way for setting a uniform heat flux out of the sphere?
Attached Images
File Type: jpg a.jpg (32.1 KB, 13 views)
Shibi is offline   Reply With Quote

Old   May 27, 2020, 02:28
Default Better use externalWallHeatFluxTemperature
  #2
Senior Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 9
crubio.abujas is on a distinguished road
Quote:
Originally Posted by Shibi View Post
Hello to all,
I would like to have an opinion on a case I am assembling with chtMultiRegionSimpleFoam.
I want to simulate the temperature distribution of a container [box] having a sphere inside it which produces a constant heat flux of 120 w/mē. The container and sphere are surrounded by air without any initial imposed velocity.
Using fixedGradient what you're applying a value to dT/dx, which have units of [K/m], so is not a heatFlux. Check if in your OF version is available a type externalWallHeatFluxTemperature. The usage for your specifications shall be as follows:

Code:
internalField   uniform 300;

boundaryField
{
    sphere_to_air
    {
        type            externalWallHeatFluxTemperature;
        mode          flux;
       q                  uniform 120;     // Heat Flux [W/m2]
       value           $internalField;

     }
}
Notice that it would only apply to the shell of the sphere. If you have a volumetric heat inside and you want to model it you may want to check a fvOption to add a source.

Hope it helps!
crubio.abujas is offline   Reply With Quote

Old   May 27, 2020, 04:01
Default
  #3
Member
 
Join Date: Feb 2020
Posts: 90
Rep Power: 6
Shibi is on a distinguished road
Hello,

Thank you very much for the clarification regarding the boundary!


I think it can be modeled like that (heat flow on the shell of the sphere) since I have no interest in the temperature distribution inside the sphere.

However, I would like to have clarified if the definition of the same boundary on the interface patches is Ok.

So, for me to define to constant heat flux, the same boundary must be applied to both interface patches, like:


Code:
boundaryField
{
    sphere_to_air
    {
        type            externalWallHeatFluxTemperature;
         mode          flux;
        q                  uniform 120;     // Heat Flux [W/m2]
       kappaMethod    solidThermo;

        value           $internalField;

     }
}
and



Code:
boundaryField
{
   air_to_ sphere
    {
        type            externalWallHeatFluxTemperature;
        mode          flux;
        q                  uniform 120;     // Heat Flux [W/m2] 

      kappaMethod    fluidThermo;

        value           $internalField;

     }
}
Thanks for the help!
Shibi is offline   Reply With Quote

Old   May 27, 2020, 06:36
Default It will depending on what you're interested on.
  #4
Senior Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 9
crubio.abujas is on a distinguished road
Hi again Shibi,

I don't think that the simulation would crash if you use the boundary as stated in your previous post, the thing is that the sphere region and the air region will be totally independent simulations, so why to model the sphere in the first place? You can just drop the sphere from the simulation and model the air with an externalWallHeatFluxTemperature condition in the sphere interface.

If you want to include the sphere region inside the model shall be because the temperature distribution on the sphere region is important and you want to solve its interaction with the rest of regions. Otherwise the best approach is to drop this geometry. It saves computation power, saves space and saves time.

I do not know the nature of the problem you want to solve, but I can assume it has to be related on two possible option: rather there is an spherical shell surrounding some kind of heat source, in which case the shell is a thermal resistance; or the spherical body is the heat source itself.

For the first case, if you're not interested in the temperature of the shell itself you can still use the externalWallHeatFluxTemperature model of boundary and add a thickness property to model the thermal resistance. If you are interested in the distribution though, the interface between regions shall be of the type compressible::turbulentTemperatureCoupledBaffleMix ed, and it is in internal boundary of the spherical shell where you can apply the externalWallHeatFluxTemperature.

For the second case, you just model all the interfaces using compressible::turbulentTemperatureCoupledBaffleMix ed and apply a volumetric source of heat using an fvOption. Check the tutorial heatDuct to see how to apply this source.

I hope it helps to clarify the different approaches you have.
altinel and Shibi like this.
crubio.abujas is offline   Reply With Quote

Old   May 27, 2020, 07:38
Default
  #5
Member
 
Join Date: Feb 2020
Posts: 90
Rep Power: 6
Shibi is on a distinguished road
Quote:
Originally Posted by crubio.abujas View Post
Hi again Shibi,

I don't think that the simulation would crash if you use the boundary as stated in your previous post, the thing is that the sphere region and the air region will be totally independent simulations, so why to model the sphere in the first place? You can just drop the sphere from the simulation and model the air with an externalWallHeatFluxTemperature condition in the sphere interface.

If you want to include the sphere region inside the model shall be because the temperature distribution on the sphere region is important and you want to solve its interaction with the rest of regions. Otherwise the best approach is to drop this geometry. It saves computation power, saves space and saves time.

I do not know the nature of the problem you want to solve, but I can assume it has to be related on two possible option: rather there is an spherical shell surrounding some kind of heat source, in which case the shell is a thermal resistance; or the spherical body is the heat source itself.

For the first case, if you're not interested in the temperature of the shell itself you can still use the externalWallHeatFluxTemperature model of boundary and add a thickness property to model the thermal resistance. If you are interested in the distribution though, the interface between regions shall be of the type compressible::turbulentTemperatureCoupledBaffleMix ed, and it is in internal boundary of the spherical shell where you can apply the externalWallHeatFluxTemperature.

For the second case, you just model all the interfaces using compressible::turbulentTemperatureCoupledBaffleMix ed and apply a volumetric source of heat using an fvOption. Check the tutorial heatDuct to see how to apply this source.

I hope it helps to clarify the different approaches you have.

In OpenFOAM v1912 I do not have that tutorial. Can you supply it?


Thanks!
Shibi is offline   Reply With Quote

Old   May 27, 2020, 15:56
Default Here you are!
  #6
Senior Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 9
crubio.abujas is on a distinguished road
Quote:
Originally Posted by Shibi View Post
In OpenFOAM v1912 I do not have that tutorial. Can you supply it?

Thanks!
Sure! Try this link:
https://drive.google.com/file/d/1VFh...ew?usp=sharing

However, for sure that in OF v1912 there are other tutorials in chrMultiRegionFoam using the same boundaries.

Good luck and happy foaming!
crubio.abujas 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
HOW TO APPLY CONSTANT HEAT FLUX OVER WALL OF TUBE K.VENKATACHALAPATHI FLUENT 6 December 28, 2015 05:58
constant heat flux imani OpenFOAM Pre-Processing 1 August 2, 2014 12:53
constant heat flux model ENG.HVAC ANSYS 0 March 10, 2013 02:04
Implement constant heat flux boundary condition new_at_this Main CFD Forum 2 April 6, 2012 23:35
BC for constant heat flux saidi Main CFD Forum 2 July 17, 1998 15:02


All times are GMT -4. The time now is 10:31.