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

Heat transfer, natural convection: Heat sink <-> Air

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mirx

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2013, 07:18
Default Heat transfer, natural convection: Heat sink <-> Air
  #1
New Member
 
Sven
Join Date: Nov 2013
Posts: 7
Rep Power: 13
SvenH is on a distinguished road
Hi everybody,

in the last weeks I tried to start with OpenFOAM and I would like to solve the following case:

The attached Heat sink gets a Heat Flux of 50 W on its lower surface. The natural convection of the air arround the Heat sink cools it. Seems to be a simple case. I want to solve it with the chtMultiRegionSimpleFoam solver because all i need is the steady state (right solver?).

I can't find a description how to load my heatsink.stl file and to create a air box around it. The tutorials don't give enough hints except that I could use a refinementBox (searchableBox) for this.

My Questions:
- What is the best tutorial I can build up my case with?
- How do I load my STL file into this case?
- How can I create the Airbox?
- How does OpenFOAM know what is the solid and what is the fluid?

I'm happy about every help I get.
Thanks
Attached Files
File Type: zip heatsink.stl.zip (1.8 KB, 38 views)
SvenH is offline   Reply With Quote

Old   November 11, 2013, 10:08
Default
  #2
New Member
 
Michael
Join Date: Sep 2012
Posts: 23
Rep Power: 14
mirx is on a distinguished road
The best starting point would be the chtMultiRegionFoam tutorial snappyMultiRegionHeater.

Study the Allrun-script and the whole case structure and all files.

If you would like to get a correct solution you will also need to add a radiation model, either viewFactor (chtMultiRegionSimpleFoam/multiRegionHeaterRadiation) or fvDOM (buoyantSimpleFoam/hotRadiationRoomFvDOM). Furthermore you have to study which boundary conditions you need for natural convection.
mirx is offline   Reply With Quote

Old   November 11, 2013, 10:36
Default
  #3
New Member
 
Sven
Join Date: Nov 2013
Posts: 7
Rep Power: 13
SvenH is on a distinguished road
Hi mirx,

thank you for your reply. I started with snappyMultiRegionHeater already. I tried to run the case with only two regions: heater and topAir. I commented the other regions out in every file I found.

Code:
--> FOAM FATAL ERROR: 
Attempt to cast type calculated to type compressible::turbulentTemperatureCoupledBaffleMixed

    From function refCast<To>(From&)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/typeInfo.H at line 114.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs() at ??:?
#3  Foam::mixedFvPatchField<double>::evaluate(Foam::UPstream::commsTypes) at ??:?
#4  Foam::mixedEnergyFvPatchScalarField::updateCoeffs() at ??:?
#5  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::updateCoeffs() at ??:?
#6  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
#7  
 at ??:?
#8  
 at ??:?
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  
 at ??:?
Aborted (core dumped)
I tried to get closer to my own case because I only have 1 solid and 1 fluid region.
https://dl.dropboxusercontent.com/u/...HeaterSven.zip
SvenH is offline   Reply With Quote

Old   November 11, 2013, 11:18
Default
  #4
New Member
 
Michael
Join Date: Sep 2012
Posts: 23
Rep Power: 14
mirx is on a distinguished road
splitMeshRegion created a third region: domain0.

This region is present in your boundary files:

constant/heater/polyMesh/boundary
Code:
    heater_to_domain0
    {
        type            mappedWall;
        nFaces          430;
        startFace       1555;
        sampleMode      nearestPatchFace;
        sampleRegion    domain0;
        samplePatch     domain0_to_heater;
        offsetMode      uniform;
        offset          (0 0 0);
    }
I would recommend to remove the fluid region and use domain0 as your fluid region instead. domain0 is always created by splitMeshRegions and is the remainder of your initial mesh (blockMesh) minus your solids.
mirx is offline   Reply With Quote

Old   November 12, 2013, 08:51
Default
  #5
New Member
 
Sven
Join Date: Nov 2013
Posts: 7
Rep Power: 13
SvenH is on a distinguished road
That was a nice advice! Like the other regions I removed the topAir now and made domain0 fluid in constant/regionProperties. Where can I set the size of the box? I don't understand the code of blockMeshDict, but maybe I will find out by searching the Internet in the next minutes

I copied the properties (g, radiationProperties, thermophysicalProperties etc.) into the constant/domain0 folder.

After running it again, I got a "new" error:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region domain0 for time = 0

Create solid mesh for region heater for time = 0

*** Reading fluid mesh thermophysical properties for region domain0

    Adding to thermoFluid

Selecting thermodynamics package 
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:?
#4  Foam::rhoThermo::addfvMeshConstructorToTable<Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > > >::New(Foam::fvMesh const&, Foam::word const&) at ??:?
#5  Foam::autoPtr<Foam::rhoThermo> Foam::basicThermo::New<Foam::rhoThermo>(Foam::fvMesh const&, Foam::word const&) at ??:?
#6  Foam::rhoThermo::New(Foam::fvMesh const&, Foam::word const&) at ??:?
#7  
 at ??:?
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  
 at ??:?
Floating point exception (core dumped)
Seems that only the "FATAL ERROR" is gone.

EDIT:
The box is bigger now.
https://dl.dropboxusercontent.com/u/...eaterSven2.zip
SvenH is offline   Reply With Quote

Old   November 12, 2013, 14:11
Default
  #6
New Member
 
Sven
Join Date: Nov 2013
Posts: 7
Rep Power: 13
SvenH is on a distinguished road
I learned a bit about meshing with snappyHexMesh today and my heat sink is part of the case now.

Can anybody help me with that error from my last post? And where do I define the heat source on my heat sink?

Case: https://dl.dropboxusercontent.com/u/...eaterSven3.zip
Attached Images
File Type: jpg heatsink_mesh.jpg (90.3 KB, 68 views)
SvenH is offline   Reply With Quote

Old   November 12, 2013, 15:13
Default
  #7
New Member
 
Michael
Join Date: Sep 2012
Posts: 23
Rep Power: 14
mirx is on a distinguished road
Try to get a proper mesh an case structure first. You have domain(0-10) and no mesh for the heatsink.

I would recommend to use volumetric heat fluxes instead of surface heat fluxes. This is much more realistic. Either you assign a volumetric heat flux on the heatsink itself, or you create a second body, which represents the heater and is in contact with the heatsink.

A volumetric heat flux can be created by fvOptions (scalarSemiImplicitSource).
Kummi likes this.
mirx is offline   Reply With Quote

Old   November 13, 2013, 04:18
Default
  #8
New Member
 
Sven
Join Date: Nov 2013
Posts: 7
Rep Power: 13
SvenH is on a distinguished road
For me it looks like the heatsink has a mesh And why are there now 11 domains? Do the domains all need the fluid properties?
Attached Images
File Type: jpg heatsink-mesh1.jpg (62.9 KB, 59 views)
SvenH is offline   Reply With Quote

Old   November 13, 2013, 05:00
Default
  #9
New Member
 
Michael
Join Date: Sep 2012
Posts: 23
Rep Power: 14
mirx is on a distinguished road
The domains seem to be from a previous mesh run, which failed.

Run the attached Allclean script. It removes all domains except domain0. Then mesh again.
Attached Files
File Type: gz Allclean.gz (347 Bytes, 12 views)
mirx is offline   Reply With Quote

Old   November 13, 2013, 05:35
Default
  #10
New Member
 
Sven
Join Date: Nov 2013
Posts: 7
Rep Power: 13
SvenH is on a distinguished road
Thanks mirx!

Now I have only the heater and domain0 again. I still try to fix the error. It seems that there is something wrong with the thermophysicalProperties in domain0, right?. I started to change some of these properties but this results in other (fatal) errors.

The mesh of the heatsink is OK?
SvenH is offline   Reply With Quote

Old   March 11, 2020, 05:40
Default
  #11
New Member
 
pranay
Join Date: Mar 2020
Posts: 7
Rep Power: 6
pranay347 is on a distinguished road
hi i am also working on the similar case did you completed the case simulation...
pranay347 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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
air distribution and heat transfer wasim_kassel FLUENT 0 June 24, 2013 12:12
model forced convection heat transfer on a heat sink farzad FLUENT 0 September 9, 2010 15:48
Radiative heat transfer with natural convection inside a square cavity msarkar OpenFOAM 1 January 11, 2010 23:21
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 16:08.