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

turbulentTemperatureCoupledBaffleMixed

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bineet_aero

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2018, 06:31
Default turbulentTemperatureCoupledBaffleMixed
  #1
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
I'm running a chtMultiRegionSimpleFoam with a tetrahedral mesh made in Salome. The model consists of a small number of connected solids surrounded with air.
One solid has a volume heat generation defined as a scalarSemiImplicitSource in fvOptions.

Solids and fluids are connected using compressive::turbulentTemperatureCoupledBaffleMixe d patch and the solver runs but it looks like the patches try to hold the temperature I set as initial guess. Obviously this never converges and temperatures on the boundary don't rise as expected.

How do I set BC for connected patches without setting a fixed temperature?
kandelabr is offline   Reply With Quote

Old   June 6, 2018, 09:57
Default
  #2
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
Here are the results from one timestep. Heat source is in the "coil" region. "Air" surrounds the whole assembly and cooler is a big aluminium piece that should disperse heat into surrounding air.

Code:
Time = 266

Solving for fluid region air
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.00595372, Final residual = 0.0002666618, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.005627012, Final residual = 0.0002532324, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.006628133, Final residual = 0.0002960641, No Iterations 1
DILUPBiCGStab:  Solving for h, Initial residual = 0.002119841, Final residual = 9.896488e-005, No Iterations 1
Min/max T:300 342.3529
GAMG:  Solving for p_rgh, Initial residual = 0.03928421, Final residual = 0.0002773877, No Iterations 3
time step continuity errors : sum local = 0.0006090867, global = 5.509568e-012, cumulative = -2.228852e-010
Min/max rho:1.016304 1.159781

Solving for solid region cooler
DICPCG:  Solving for h, Initial residual = 0.001841032, Final residual = 2.965676e-005, No Iterations 2
Min/max T:300 300.1434

Solving for solid region coil
DICPCG:  Solving for h, Initial residual = 0.001263771, Final residual = 3.696184e-005, No Iterations 2
Min/max T:300.0023 359.0179

ExecutionTime = 2512.975 s  ClockTime = 2513 s
It's obvious that although coil heats up considerably, the patch that is coupled with cooler is cold and so is the cooler. I went through chtMultiRegion* tutorials and checked boundary conditions, patch types, meshing many times. I'm out of ideas.
kandelabr is offline   Reply With Quote

Old   June 6, 2018, 10:17
Default
  #3
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
Well this isn't enough information to help. Are you certain, that your thermal conductivity in thermoPhysicalProperties is correctly defined. Maybe you are just solving something which i inherently slow to heat up. Or your temperature difference is minimal because of a high flow rate. Or you are drastically relaxing the temperature solution....All I can do here is speculate
Bloerb is offline   Reply With Quote

Old   June 6, 2018, 11:13
Default
  #4
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
I'll share the whole case. I again regret naming stuff in my language, let me translate here for you. I simplified the description in the above post, there's four solids instead of two, but the rest is the same, including the results.
  • 'luft' - air, surrounding fluid(red)
  • 'hladilnik' - cooler, aluminium, no heat generation (gray)
  • 'tuljava' - coil, plastic, 7.5W heat generation (blue)
  • 'vezje' - circuit board, glass, 15W 'floating' (only in contact with air) (yellow)
  • 'modul' - module, ceramic, 35W (green)

I got approximate thermophysical values for mentioned materials. It's a test case and I'll do more research later when this runs OK.

I can't attach a mesh, I can only give you a screenshot. I experimented with various mesh densities from 100 000 points to 10 million, same results in every case.

I also tried different boundary conditions for U but as expected, it doesn't affect heat transfer between solids.

I appreciate any advice you can give me.

Thanks!
Attached Images
File Type: png screenshot.PNG (47.7 KB, 78 views)
Attached Files
File Type: zip chtCase.zip (43.2 KB, 30 views)
kandelabr is offline   Reply With Quote

Old   June 17, 2018, 09:41
Default
  #5
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
I think I figured it out.

First, meshing. My STL files were assembled from different patches made in SALOME so their normals weren't all pointing in the same direction. There's a utility for cases like this: surfaceOrient.

I also had a separate STL file for surrounding 'air' which snappy couldn't snap to. I just removed that from meshing so now background mesh made in blockMesh is what my 'air.stl' used to be. I use topoSet to create a separate zone from background mesh then run splitMeshRegions. Here's my topoSetDict:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    {
        name    air;
        type    cellSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            name ".*";
        }
    }

    {
        name    air;
        type    cellSet;
        action  invert;
    }
);
Second, I used solvers and settings from a PIMPLE tutorial at first. The temperatures barely changed because the heat transfer process is so slow it would take ages to converge to a steady state. When I switched to SIMPLE I messed all the settings up so it again took ages.

In the end, I found a template that will be used in foamSetupCHT utility in the next release (6?). Though it's not in the current release one can still use all schemes and other settings, including boundary conditions:
https://github.com/OpenFOAM/OpenFOAM...singleFluidCHT
kandelabr is offline   Reply With Quote

Old   November 11, 2020, 12:02
Default
  #6
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 13
bineet_aero is on a distinguished road
Quote:
Originally Posted by kandelabr View Post
I think I figured it out.

First, meshing. My STL files were assembled from different patches made in SALOME so their normals weren't all pointing in the same direction. There's a utility for cases like this: surfaceOrient.

I also had a separate STL file for surrounding 'air' which snappy couldn't snap to. I just removed that from meshing so now background mesh made in blockMesh is what my 'air.stl' used to be. I use topoSet to create a separate zone from background mesh then run splitMeshRegions. Here's my topoSetDict:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    {
        name    air;
        type    cellSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            name ".*";
        }
    }

    {
        name    air;
        type    cellSet;
        action  invert;
    }
);
Second, I used solvers and settings from a PIMPLE tutorial at first. The temperatures barely changed because the heat transfer process is so slow it would take ages to converge to a steady state. When I switched to SIMPLE I messed all the settings up so it again took ages.

In the end, I found a template that will be used in foamSetupCHT utility in the next release (6?). Though it's not in the current release one can still use all schemes and other settings, including boundary conditions:
https://github.com/OpenFOAM/OpenFOAM...singleFluidCHT

Hi i have a similar problem.

For my case, 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. It seems to me that the solver is not reading fvOptions at all, even if i enter absurd values in fvOptions, it runs and the outlet temperature and solid temperature just remains the same as the initial value. I have tried many things but nothing helped. Thanks in advance for any suggestions

Regards
bineet_aero is offline   Reply With Quote

Old   November 11, 2020, 12:13
Default
  #7
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
can you share your case?
are your fvOptions in constant/<region> or in global constant folder?
__________________
www.damogranlabs.com
kandelabr is offline   Reply With Quote

Old   November 11, 2020, 12:32
Default
  #8
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 13
bineet_aero is on a distinguished road
Quote:
Originally Posted by kandelabr View Post
can you share your case?
are your fvOptions in constant/<region> or in global constant folder?
Thank you Kandelbar

I have tried all the possible locations of fvOptions. Here is the case

https://drive.google.com/file/d/1Hcs...ew?usp=sharing

I have used blockmesh toposet and splitmeshregions to set up the mesh.

Thanks a lot again

cheers
bineet_aero is offline   Reply With Quote

Old   November 11, 2020, 12:50
Default
  #9
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 13
bineet_aero is on a distinguished road
it seems to me that there is no problem with the case, its just its taking too long to converge and to settle down, i guess i need to meddle with the relaxation factors etc !!! anyways, i will really appreciate your input !!

thanks
bineet_aero is offline   Reply With Quote

Old   November 11, 2020, 16:30
Default
  #10
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
To speed up convergence on solids somewhat, try forcing more iterations on those regions. Set nNonOrthogonalCorrectors to a higher-than-needed value. For instance, system/heatsink/fvSolution:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "h.*"
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-08;
        relTol           0.001;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 20;
}

relaxationFactors
{
    equations
    {
        h 1.0;
    }
}

// ************************************************************************* //
good luck!
__________________
www.damogranlabs.com
kandelabr is offline   Reply With Quote

Old   November 12, 2020, 06:20
Default
  #11
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 13
bineet_aero is on a distinguished road
Quote:
Originally Posted by kandelabr View Post
To speed up convergence on solids somewhat, try forcing more iterations on those regions. Set nNonOrthogonalCorrectors to a higher-than-needed value. For instance, system/heatsink/fvSolution:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "h.*"
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-08;
        relTol           0.001;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 20;
}

relaxationFactors
{
    equations
    {
        h 1.0;
    }
}

// ************************************************************************* //
good luck!

thanks a lot , i will do that!! can i request you to have a look at my case, just for your input. thanks !!!
bineet_aero is offline   Reply With Quote

Old   November 12, 2020, 07:01
Default
  #12
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
Sure, but you'll have to share it with me
__________________
www.damogranlabs.com
kandelabr is offline   Reply With Quote

Old   November 12, 2020, 07:04
Default
  #13
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 13
bineet_aero is on a distinguished road
Quote:
Originally Posted by kandelabr View Post
Sure, but you'll have to share it with me
Ah sorry, but i sent you the link above, google drive ,, let me know if its opening well or not
bineet_aero is offline   Reply With Quote

Old   November 12, 2020, 08:06
Default
  #14
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
Ah, sorry, I never noticed that link.

I took a look, here are some comments:
  • you're simulating a PCB but your domain size is roughly 120 x 50 x 15m. in the end it doesn't matter but if you input 50W in such a domain, don't expect anything drastic (i increased the power to 500 kW for testing). you can use the 'scale 0.001;' keyword in blockMeshDict if you use millimeters or whatever.
  • your fvOptions should be located in system/<region>. where you had them weren't read by the solver so there was no heat generated in the two solids. also, once fvOptions file is inside the region directory, you can use "selectionMode all" (see below). when solver starts, it should report settings in fvOptions, also if you change them during run. if nothing happens, there's something wrong.
  • your test models are so big that it takes ages to heat them up. since you're working with a transient solver you will have to simulate all that heat-up time. my guess is that you're not very much interested in transients when dealing with electronics so you would be much better off with a steady-state solver. chtMultiRegionSimpleFoam if you're using openfoam.com version or chtMultiRegionFoam with fvSchemes and fvSolution files adapted accordingly.

Here's the system/diode/fvOptions file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


heatsource_diode
{
    type            scalarSemiImplicitSource;
    active          true;
 
    scalarSemiImplicitSourceCoeffs
    {
        selectionMode   all; // all, cellSet, cellZone, points
        volumeMode      absolute; // absolute;
        injectionRateSuSp
        {
            h   (500000 0);
        }
    }
}
check out tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger, that's the case that suits your (steady-state) case best.

Hope this helps.
__________________
www.damogranlabs.com
kandelabr is offline   Reply With Quote

Old   November 12, 2020, 08:37
Default
  #15
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 13
bineet_aero is on a distinguished road
Quote:
Originally Posted by kandelabr View Post
Ah, sorry, I never noticed that link.

I took a look, here are some comments:
  • you're simulating a PCB but your domain size is roughly 120 x 50 x 15m. in the end it doesn't matter but if you input 50W in such a domain, don't expect anything drastic (i increased the power to 500 kW for testing). you can use the 'scale 0.001;' keyword in blockMeshDict if you use millimeters or whatever.
  • your fvOptions should be located in system/<region>. where you had them weren't read by the solver so there was no heat generated in the two solids. also, once fvOptions file is inside the region directory, you can use "selectionMode all" (see below). when solver starts, it should report settings in fvOptions, also if you change them during run. if nothing happens, there's something wrong.
  • your test models are so big that it takes ages to heat them up. since you're working with a transient solver you will have to simulate all that heat-up time. my guess is that you're not very much interested in transients when dealing with electronics so you would be much better off with a steady-state solver. chtMultiRegionSimpleFoam if you're using openfoam.com version or chtMultiRegionFoam with fvSchemes and fvSolution files adapted accordingly.

Here's the system/diode/fvOptions file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


heatsource_diode
{
    type            scalarSemiImplicitSource;
    active          true;
 
    scalarSemiImplicitSourceCoeffs
    {
        selectionMode   all; // all, cellSet, cellZone, points
        volumeMode      absolute; // absolute;
        injectionRateSuSp
        {
            h   (500000 0);
        }
    }
}
check out tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger, that's the case that suits your (steady-state) case best.

Hope this helps.

Hello

Thanks a lot for the reply.

I will change the blockMesh

Yes you are right, after trying for all possible locations, i feel FvOptions in system/region works but i am not sure. I am not able to see any change in the temperature of air outlet and solid (No matter how big is the value of the heat flux lol). I must be doing something completely wrong, i do not know what for the moment.

Yes i am trying with a steady solver. But no difference.

anyways i will let you know if i succeed . thanks a lot
bineet_aero is offline   Reply With Quote

Old   November 12, 2020, 08:44
Default
  #16
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
It works for me, see your updated case in attachment. I stripped mesh files.
Another advice, create a sort of Allrun script so you (or whoever helps you) don't have to manually execute the whole procedure.
Attached Files
File Type: zip case.zip (21.5 KB, 20 views)
__________________
www.damogranlabs.com
kandelabr is offline   Reply With Quote

Old   November 12, 2020, 09:15
Default
  #17
Member
 
Bineet Mehra
Join Date: Aug 2013
Posts: 61
Rep Power: 13
bineet_aero is on a distinguished road
Quote:
Originally Posted by kandelabr View Post
It works for me, see your updated case in attachment. I stripped mesh files.
Another advice, create a sort of Allrun script so you (or whoever helps you) don't have to manually execute the whole procedure.
thanks a lot. Yes it worked for me as well, it was very very low heat flux taken by the system because i made a mistake of not converting my dimensions into mm in blockMesh. thanks to you. so it was my mistake not understanding the physics properly . thanks

cheers
kandelabr likes this.
bineet_aero 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



All times are GMT -4. The time now is 19:13.