Adding heat sources in hvac simulations

I’ve managed to generate that heatflux with the following topoSetDict, I am still constrainted to set it to a box and not to a custom STL region.

actions
(
{
name heat;
type cellSet;
action new;
source boxToCell;
sourceInfo
{ box (0 0 0) (5 15 2);
}
}

);

and after development of the flow:

hi,@OlivierDambron
I am very interesting about what you have done. Could you upload the entire example folder or some website share link ?

Hi @minggangyin,
This was a case I assembled based on Tobias Holzmann’s work. There’s a lot of interesting content about CFD on his website. You’ll find not only his research and contributions but also a couple openfoam cases to purchase: https://holzmann-cfd.de/advanced-material/openfoam-tutorials.
In particular the example “Free convection in solar chimney” was a starting point, I then adapted the files to the case I was interested in testing: no-wind conditions and see how buoyant forces stimulate the indoor airflows and monitor heat accumulation.

Hi @OlivierDambron

I think the comparison between the two scripts might give an indication. I believe that the reason you were getting that result in the first case was setting a cellSet as the source but creating a faceZoneSet with your topoSet.

It’s been a while I used this script so I can’t remember off the top of my head if simply changing to cellSet works. I do seem to remember to have two different parts in the code, one to create a faceZoneSet from an stl and the other to create a cellSet out of that. I’ll dig around to find it and let you know!

Kind regards,
Theodore.

Hello,

I have a similar problem, My Openfoam version is 4.1. I want to generate a heat source using fvOptions on one face of a box in my geometry. I made geometry in Salome. To select one surface of a box, I am using topoSetDict to make the selected patch a faceSet, and then using that faceSet I need to make a cellSet. When I run the case, it shows that the faceSet and cellSet are successfully created but then I get the following error:

--> FOAM FATAL ERROR: 
Illegal content 8200 of set:hotcell of type cellSet
Value should be between 0 and 6396

From function void Foam::topoSet::check(Foam::label)
in file sets/topoSets/topoSet.C at line 189.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::topoSet::check(int) at ??:?
#3  Foam::cellSet::cellSet(Foam::polyMesh const&, Foam::word const&, Foam::IOobject::readOption, Foam::IOobject::writeOption) at ??:?
#4  Foam::fv::cellSetOption::setCellSet() at ??:?
#5  Foam::fv::cellSetOption::cellSetOption(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#6  Foam::fv::option::adddictionaryConstructorToTable<Foam::fv::SemiImplicitSource<double> >::New(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#7  Foam::fv::option::New(Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#8  Foam::fv::optionList::reset(Foam::dictionary const&) at ??:?
#9  Foam::fv::optionList::optionList(Foam::fvMesh const&, Foam::dictionary const&) at ??:?
#10  Foam::fv::options::options(Foam::fvMesh const&) at ??:?
#11  ? at ??:?
#12  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#13  ? at ??:?
Aborted (core dumped)

My topoSetDict is given below:

actions
(
    {
        name    hot1;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name "hotFace";
        }
    }
     
// Select based on faceSet
    {
        name    hotcell;
        type    cellSet;
        action  new;
        source  faceToCell;
        sourceInfo
        {
            set hot1;             // Name of faceSet

            //option neighbour; // cell with neighbour in faceSet
            //option owner;     //  ,,       owner
            option any;         // cell with any face in faceSet
            //option all;       // cell with all faces in faceSet
        } 
    }

And my fvOptions file is given below:

heatSource
{
    type            scalarSemiImplicitSource;
    active          true;
 
    scalarSemiImplicitSourceCoeffs
    {
        selectionMode   cellSet; // all, cellSet, cellZone, points
       // cellZone        hotcellZone;        
        cellSet         hotcell;
        volumeMode      specific; // absolute;
        injectionRateSuSp
        {
            h     (2600 0);
        }
    }
}

And the log file of topoSetDict is given below:

Create time

Create polyMesh for time = 0

Reading topoSetDict

Time = 0
    mesh not changed.
Created faceSet hot1
    Applying source patchToFace
    Adding all faces of patch hotFace ...
    Found matching patch hotFace with 253 faces.
    faceSet hot1 now size 253
Created cellSet hotcell
    Applying source faceToCell
    Adding cells according to faceSet hot1 ...
    cellSet hotcell now size 253
End

I don’t know what I am doing wrong. Maybe I am doing very obvious mistake.
I shall be very thankful for your help.

Thank you

Hello Theodoros,

I got to this page while searching for how to include heat sources in a Butterfly simulation.
I am interested in finding a way to do it automatically once the heat sources of my model are calculated by components I created and both the input conditions and the resultant heat flow vary in the spatial domain of the model. Since this post is a few months old and at the date you were planing to create a component to add heat sources, I was wondering if you had the chance to do it or not. I can’t find anything of the sort in the latest release of Butterfly.

Thanks in advance.

Hello, for my conjugate heat transfer problem, a very simple case of solid cooling by air, i am not able to see any change in the outlet temperature of air and it always remains around initial value. No matter how much i increase the value of heat flux in fvOptions, there is no change in outlet temperature or the maximum temperature of the solid. Is it that OpenFoam is not able to read the fvoption file ? Thanks in advance for any advice. Regards