CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Problems using createBaffles to create a 3D thermal baffle (https://www.cfd-online.com/Forums/openfoam-solving/141220-problems-using-createbaffles-create-3d-thermal-baffle.html)

zfaraday September 2, 2014 15:26

Problems using createBaffles to create a 3D thermal baffle
 
4 Attachment(s)
Dear FOAMers,

As I commented in my latest thread (extrange-behaviour-when-solving-circuitboardcooling-tutorial) opened recently, lately I have been testing the Circuit Board Cooling tutorial. My main aim was to discover the procedure of creating 3D baffles for thermal applications in a multi region problem.

I had a bunch of problems during my several attempts, because the tutorial is made up of only one region and I didn't know the exact execution order of the multiple applications needed in order to create the geometry I need. The utilities I used in my case are:
  • I generated the base geometry with blockMesh,
  • created the multiple cellZones using topoSet utility,
  • created the baffles with createBaffles, of course (the faceZone needed for it I generated it either with a stl file or with topoSet, I tried both cases)
  • separated the multiple regions with splitMeshRegions utility

However I got confused because I didn't know if I had to create the baffle first and then split the regions or the opposite (I tried both, I tried almost everything). These are the Allrun scripts that I think should suit my needs:
  1. Baffle creation done at the end (not sure about the -region flag use)
    Code:

    blockMesh
    cp -rf 0.org 0    //like is done in the tutorial (same files used)
    topoSet
    splitMeshRegions -cellZones -overwrite
    createBaffles -region air -overwrite

  2. Baffles are created before regions are created
    Code:

    blockMesh
    cp -rf 0.org 0    //like is done in the tutorial (same files used)
    topoSet
    createBaffles -overwrite
    splitMeshRegions -cellZones -overwrite


________________________________1st Question________________________________

· What is the most proper procedure to generate correctly the regions and the baffle? Did I miss any step? How would you do that?

__________________________________________________ ________________________



I'll let you know that both procedures created the baffle patches but no one generated the 3D baffle region it is supposed to be generated after the process is finished. That is, something didn't work well. As this was my first attempt creating 3D thermal baffles I finally decided to simplify my case, because I thought that maybe the problem came from the multi region specification. Thus, I ended up creating a single air block with a baffle (very, very similar to the tutorial case, but all was made by me except the baffle definition that was taken from the tutorial).

My surprise was that the result was the same I got before with the multi region case (it was the same geometry but without using the topoSet step in the Allrun script). Baffle patches were created but no 3D baffle region nowhere...

At this point, I tried to find out what was happening and I found out something suspicious in the log.createBaffles and the 0/T files. Attached you can see both files coming from the tutorial (*.txt) and from my personal attempt (*.myCase.txt). The main difference between both log files is that this piece is missing in my case but not in the tutorial case:

Code:

Selecting extrudeModel linearNormal
    Selecting region model functions
    none

The thermal baffle is 3D

Selecting thermodynamics package
{
    type            heSolidThermo;
    mixture        pureMixture;
    transport      constIso;
    thermo          hConst;
    equationOfState rhoConst;
    specie          specie;
    energy          sensibleEnthalpy;
}

Selecting radiationModel opaqueSolid
Selecting absorptionEmissionModel none
Selecting scatterModel none

I guess this is the point where the region is created so, if I don't see it in my log file it means the baffle region is not created, is it?

________________________________2nd Question________________________________

· Why is the region not created if I used exactly the same specification in the createBaffleDict file that is used in the tutorial? What am I doing wrong? I'm begining to get crazy for it since I have tried it a bunch of times and it never works in my case but keeps working in the tutorial case...

__________________________________________________ ________________________



On the other hand, I noticed that the definition of the boundary condition in the baffle patch of the T file (also in the other variables) is quite diferent from one case to the other. Let's see the difference.
  1. My case (it seems like it's been copied directly from the createBafflesDict file)
    Code:

        baffleFacesThermoBaffle3D_master
        {
            type            compressible::thermalBaffle;
            kappa          fluidThermo;
            kappaName      none;
            regionName      baffle3DRegion;
            active          yes;
            thermoType
            {
                type            heSolidThermo;
                mixture        pureMixture;
                transport      constIso;
                thermo          hConst;
                equationOfState rhoConst;
                specie          specie;
                energy          sensibleEnthalpy;
            }
            mixture
            {
                specie
                {
                    nMoles          1;
                    molWeight      20;
                }
                transport
                {
                    kappa          0.01;
                }
                thermodynamics
                {
                    Hf              0;
                    Cp              15;
                }
                equationOfState
                {
                    rho            80;
                }
            }
            radiation
            {
                radiationModel  opaqueSolid;
                absorptionEmissionModel none;
                scatterModel    none;
            }
            extrudeModel    linearNormal;
            nLayers        50;
            expansionRatio  1;
            columnCells    false;
            linearNormalCoeffs
            {
                thickness      0.02;
            }
            value          uniform 300;
        }

  2. Tutorial case (It has been generated from the createBafflesDict file, but not directly copied)
    Code:

        baffleFacesThermoBaffle3D_master
        {
            type            compressible::thermalBaffle;
            refValue        uniform 300;
            refGradient    uniform 0;
            valueFraction  uniform 1;
            value          uniform 300;
            Tnbr            T;
            QrNbr          none;
            Qr              none;
            thicknessLayers 0();
            kappaLayers    0();
            kappa          fluidThermo;
            kappaName      none;
            extrudeModel    linearNormal;
            nLayers        10;
            expansionRatio  1;
            columnCells    0;
            linearNormalCoeffs
            {
                thickness      0.05;
            }

            regionName      baffle3DRegion;
            active          1;
            thermoType     
            {
                type            heSolidThermo;
                mixture        pureMixture;
                transport      constIso;
                thermo          hConst;
                equationOfState rhoConst;
                specie          specie;
                energy          sensibleEnthalpy;
            }

            mixture       
            {
                specie
                {
                    nMoles          1;
                    molWeight      20;
                }
                transport
                {
                    kappa          0.01;
                }
                thermodynamics
                {
                    Hf              0;
                    Cp              15;
                }
                equationOfState
                {
                    rho            80;
                }
            }

            radiation     
            {
                radiationModel  opaqueSolid;
                absorptionEmissionModel none;
                scatterModel    none;
            }

        }



You can see the differences deeper by checking the files attached if you need it.

________________________________3rd Question________________________________

· Is this error related to the previous one? Is it really an error? Why is it occurring?

__________________________________________________ ________________________


As you can see I am having strong problems and I don't know what to do next because, as I already said, I have been trying to figure out what is going wrong for a few days with no success. That's why now I really need some help to go forward with my case. I'm sure that the problem is something obvious, or even ridiculous, but I haven't been able to solve it by myself so far. So if anybody has a hint or advice I will be very grateful to read it.

Many thanks in advance.


Alex

PS: My apologies for the size of the text :)

derekm February 6, 2015 18:43

Did you get this to work ?
I suspect that buoyant simple foam is different from chtmultiregionssimplefoam and that the baffle region may need to be explicitly created just like the other regions int chtmultiregionsimplefoam. I m at the same point with this so any tips or even a working case with chtmultiregionssimplefoam and thermalbaffle3d would be welcome

zfaraday February 8, 2015 08:18

Hi Derek

Quote:

Originally Posted by derekm (Post 530782)
Did you get this to work ?
I suspect that buoyant simple foam is different from chtmultiregionssimplefoam and that the baffle region may need to be explicitly created just like the other regions int chtmultiregionsimplefoam. I m at the same point with this so any tips or even a working case with chtmultiregionssimplefoam and thermalbaffle3d would be welcome

If your question is related to the 3D baffles the answer is no, I couldn't manage to get it to work. However, finally I could create the baffle as a normal 2D baffle and make it work this way...

By the way, if you are using buoyantSimpleFoam, have you taken a look at the circuitBoardCooling tutorial? It's the tutorial I learnt the baffle creation set up from. Study that case and understand it and afterwards try to create your own (3D?) baffle. If you finally can create it successfully you could come back here to mention it so I never managed to create a 3D baffle on my own...:(

Regards,

Alex

derekm February 9, 2015 14:38

1 Attachment(s)
Attachment 37066These is a straight merge of the CHTmultregionsimplefoam and the 3D baffel from circuit cooling
I got it to solve but its lost its heat input via the Q field. To see the baffle set a temperature in the baffle changedictionarydict.
I've turned off the heater so you can see the baffle heat it up.

jkim February 2, 2016 07:31

check controlDcit
 
I had the same problem before.
Do you add a line to include thermlaBaffle lib in the controlDict?

You can find the line in the controlDict file in circuitBoardCooling tutorial.

zfaraday February 2, 2016 11:19

Hi @jkim!

Yes, you are right, I forgot to add the library in the controlDict, I realized that some time ago, but never tried it again since it was a problem of the past and I had no time to try it again. However, I'm sure it was because of what you say that I had this problem.

Thanks to point it out!

Best regards,

Alex

Zeppo October 1, 2016 15:44

Can those baffle be used along with viewFactor radiation mode? I mean, I have a region with external boundaries. Then I create some internal baffles (they are seen by the code as boundaries, right?). And now I want the external and internal boundaries to take part in radiation exchange. Can it work out?

derekm October 1, 2016 16:44

Quote:

Originally Posted by Zeppo (Post 619971)
Can those baffle be used along with viewFactor radiation mode? I mean, I have a region with external boundaries. Then I create some internal baffles (they are seen by the code as boundaries, right?). And now I want the external and internal boundaries to take part in radiation exchange. Can it work out?

The last time I used viewfactors with baffles it worked but was often problematic with complex topologies with narrow spaces.

Zeppo October 1, 2016 18:00

Quote:

Originally Posted by derekm (Post 619981)
The last time I used viewfactors with baffles it worked but was often problematic with complex topologies with narrow spaces.

Every baffle has 2 sides. Can you specify which one (or even both) is radiative?

zfaraday October 3, 2016 11:31

Hi Sergei,

I see that you are struggling with radiation mixed with baffles as per what I have been seeing in several posts regarding these matters. Well, as per your question, yes, you can use baffles with radiation (no matter what kind of model you use in order to compute it). Regarding the viewFactors method, you can specify what BC's (baffles included) play a role in radiation within the viewFactorsDict file.

If you want to get a tutorial case where radiation takes an important role you can download it from my web site. In this case radiation is modelled via fvDOM model, however you can switch it to viewFactors and play around with it a little.

Hope it helps.

Best regards,

Alex

student666 September 6, 2017 17:07

Hi all,

I'm trying to set up a case with Baffles as well, following a similiar way to what Alex did.

In few words, I copied the same settings from the circuitBoad tutorial and changed them according to mine.

When I run the createBaffles utility I got this:
Code:

inconsistent patch and patchField types for
    patch type empty and patchField type zeroGradient

file: /home/michele/OpenFOAM/michele-dev/run/mio_heatTransfer/baffles_thermal_dicts/0/baffle3DRegion/T.boundaryField.side from line 32 to line 32.

    From function static Foam::tmp Foam::fvPatchField::New(const Foam::fvPatch&, const Foam::DimensionedField&, const Foam::dictionary&) [with Type = double]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-dev/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 160.

FOAM exiting

I know what OF is telling me, but I can't understand why the same problem has not shown up from the tutorial case?

Can someone explain me what top, bottom and side means for the BC of the Baffles?
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
{
    bottom
    {
        type                compressible::thermalBaffle;
        kappaMethod        solidThermo;
        value              uniform 300;
    }
    side
    {
        type                zeroGradient;
    }
    top
    {
        type                compressible::thermalBaffle;
        kappaMethod        solidThermo;
        value              uniform 300;
    }
}

Thanks a lot.


All times are GMT -4. The time now is 21:06.