CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Adding heat source to chtMultiRegionFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 7, 2010, 00:45
Default
  #41
Member
 
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 6
swahono is on a distinguished road
Thank you, Maddalena.

I will try it out.
__________________
Stefano Wahono

Defence Science and Technology Organisation
Propulsion Systems
swahono is offline   Reply With Quote

Old   December 7, 2010, 01:34
Default Heat Source
  #42
New Member
 
Join Date: Dec 2010
Location: Tokyo, Japan
Posts: 10
Rep Power: 6
cbritan is on a distinguished road
Quote:
Originally Posted by maddalena View Post
I commented the if selection while leaving uncommented the inner test in solidWallHeatFluxTemperature.

And where can one find this file? (I too am new to OpenFOAM)

-Clark
cbritan is offline   Reply With Quote

Old   December 7, 2010, 03:06
Default
  #43
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Hi Clark,
Quote:
Originally Posted by cbritan View Post
And where can one find this file? (I too am new to OpenFOAM)
the original file is this one:
OpenFOAM/OpenFOAM-1.6.x/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField .C

Hint: it is always a good idea to create a copy of the original solver to your own folder (OpenFOAM/userID-1.6.x/applications/solvers) before modifying it!

Mad
maddalena is offline   Reply With Quote

Old   January 17, 2011, 10:21
Post Some results on steady and unsteady cht simulations on two solid regions
  #44
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Hello everybody,

After a while, I had the chance to work on cht again and, following some suggestions I had, I decided to investigate a little bit deeper the problem of adding an explicit heat source on conduction equation in chtMultiRegionFoam.

Set-up
I created a two solids geometry, similar to what I did here but with region2 larger than before (see geom01.png). I planned 6 different simulations, applying different conditionA and conditionB BC and switching on or off a heat source on region1:
  1. Simulation I
    1. time: unsteady;
    2. condition A:T = 350K;
    3. condition B: T = 300K;
    4. Heat source: off;
  2. Simulation II
    1. time: unsteady;
    2. condition A:T = 350K;
    3. condition B: coupling;
    4. Heat source: off;
  3. Simulation III
    1. time: unsteady;
    2. condition A:T = 350K;
    3. condition B: coupling;
    4. Heat source: on;
  4. Simulation IV
    1. time: unsteady;
    2. condition A:symmetry;
    3. condition B: T = 300K;
    4. Heat source: on;
  5. Simulation V
    1. time: unsteady;
    2. condition A:symmetry;
    3. condition B: coupling;
    4. Heat source: on;
  6. Simulation VI
    1. time: steady;
    2. condition A:symmetry;
    3. condition B: coupling;
    4. Heat source: on;
I selected some points where to sample temperature in time and… well… I let the simulations run… and run… and run… longer and longer than the last time.

Results
What I am more interested in is simulations V and VI, thus the following discussion applies to them. However, similar conclusions can be drawn for the others.

Firstly, I analyzed the temperature variation with position and compared it with theory. Results are reported in xvst.png. As can be seen, results given by steady solver close match the theoretical distribution, while a small error (about 0.5°C) is obtained with the unsteady simulation.

As a second step, I checked time vs temperature for simulation V on the selected point and compare it with the theoretically known temperature variation. As can be seen in figure timevst.png, both using a fixed time step or an adjustable time step, the simulated curves are far to be as in the theory. However, while the fixed time step simulation reaches (almost) the expected steady state temperature for the selected point, the adjustable time step simulation has an unrealistic discontinuity, which spoils the solution before the steady state. Some more tests showed that the position in time of this discontinuity was not affected by the time the solution was saved on the hard disk, but it seems affected by the maxDi value.

Conclusions
  • chtMultiRegionFoam and chtMultiRegionSimpleFoam matches the steady state temperature distribution;
  • chtMultiRegionFoam is not able to simulate correctly the temperature variation in time;
  • chtMultiRegionFoam is not able to reach the steady state solution when using an adjustable time step, but it is when using a fixed time step.

To do
This is for a two solids geometry. What happens when considering a fluid? My next step is to test the same geometry for a steady state & incompressible simulation, with a heat source, using a modified version of this solver.

Notes
is what I reported before these tests wrong? Well, not completely. What I did was to consider the simulation failed when, checking the solution, I could not see the steady state, but this study has showed that chtMultiRegionFoam is not able to simulate correctly the temperature variation in time. Therefore, my error was to consider a total simulation time related to the theoretically known time constant of the solids, while a longer simulated time would have been more appropriate.


Please, can anybody comment on that? Any experience on the subject is welcome, of course!
Regards,

mad
Attached Images
File Type: jpg timevst.jpg (32.9 KB, 149 views)
File Type: jpg xvst.jpg (37.2 KB, 138 views)
File Type: jpg geom01.jpg (11.2 KB, 168 views)
maddalena is offline   Reply With Quote

Old   January 19, 2011, 19:00
Default
  #45
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
Hi Maddalena,

can you please post archives of setups 5 & 6? I would like to study them some more.

Thank you,

Mirko
mirko is offline   Reply With Quote

Old   January 20, 2011, 03:39
Default
  #46
Member
 
Join Date: Nov 2009
Location: Germany
Posts: 96
Rep Power: 7
val46 is on a distinguished road
Hi mad,

I'm also still working on this problem and I think I made some progress. The problem is I have no data from theory to compare my results.
Where do you get this theory data from?
Or do you have any cases for me which I can use for comparison?

Thanks in advance

Toni
val46 is offline   Reply With Quote

Old   January 25, 2011, 06:27
Default
  #47
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
hi guys,
come back in my office today. I will post setup 5 and 6 in the next days, hope within this week. Please, be patient...

mad
maddalena is offline   Reply With Quote

Old   January 31, 2011, 06:59
Default Cases
  #48
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Hi,

@mirko
here are the two cases you asked for. Note that both require a modified model of chtMultiRegionFoam which includes a heat source (variable H). They are ready to run, there is nothing to setup - couple - modify. Hope you find them useful. Please report anything!

@toni
I compared my results with theoretical values you get from formulas for a 1D geometry. Conduction equation, that is it!

Enjoy,

mad
Attached Files
File Type: gz V.tar.gz (66.2 KB, 148 views)
File Type: gz VI.tar.gz (66.2 KB, 108 views)
maddalena is offline   Reply With Quote

Old   June 14, 2011, 01:57
Default
  #49
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7
fisch is on a distinguished road
Hello maddalena,

did you finally use "-H" in your TEqun or did you use something like Su(H) for introducing the Volumes?

thanks a lot,
rupert
fisch is offline   Reply With Quote

Old   June 14, 2011, 10:28
Default
  #50
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Quote:
Originally Posted by fisch View Post
did you finally use "-H" in your TEqun or did you use something like Su(H) for introducing the Volumes?
-H. That should be fine.

mad
maddalena is offline   Reply With Quote

Old   June 30, 2011, 08:06
Default
  #51
Member
 
Nicolas
Join Date: Apr 2011
Location: Biarritz / France
Posts: 33
Rep Power: 6
NicolasB is on a distinguished road
Hi Maddalena,

I'd like to study the cooling of a room in which there is a voltage transformer. The heat power is dissipated through a cooling system (seen as a porous medium), with 3 fans behind it. Thanks to your hint I succeeded in setting up the fans' BC.
The question is : is your chtMultiRegionHeatSourceSimpleFoam suited for the job?
If so, would you mind, please, send it at nicolas[dot]bur[at]laposte[dot]net?

Regards
NicolasB is offline   Reply With Quote

Old   July 12, 2011, 07:32
Default Summary
  #52
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Just to be clear and for everybody is new here:

Unless what the name says, chtMultiRegionSimpleFoam is for compressible flow: http://foam.sourceforge.net/docs/cpp...674e2e921.html since it implements buoyancy. Let us say that the name SimpleFoam is not really appropriate...

In order to have a steady state, incompressible and turbulent cht solver, one has to modify the solver made by Fabio here: chtIcoMultiRegionFoam - Incompressible version of chtMultiRegionFoam.. the following should be implemented:
  • Make everything independent from temperature.

If an unsteady, incompressible and turbulent solver is required, conjugateHeatFoam (1.6-ext) should be changed. The following should be implemented:

This is only to trace back my progress (if any... ). Maybe someone else will find them useful. Maybe someone else can tell me if I am wrong.


mad
maddalena is offline   Reply With Quote

Old   March 21, 2012, 06:20
Default
  #53
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Dear Maddalena,
I'm trying to use chtMultiRegionSimpleFoam (2.1.0) for a Heat Pipe application where I have:
- two incompressible fluids (liquid water and steam) in two different regions
- a solid region whit heat (fuel cell)

I prepared a model with 3 regions (you can see the picture attached).
I resolved "well" (I hope!) problems regarding two phase coupling, incompressiblility, capillarity effects, grid convergence... but what I did not solved yet is the heat flux in "red" patch!
For the heat I used in my "red" BC:
1) temperature fixed value. The simulation reaches convergence but the heat flux I have through the solid region is not enough
2) heat flux fixed value (externalWallHeatFluxTemperature). The simulation doesn't reach convergence. The temperatures rises for ever!
3) fixed gradient. Equal to (2)
4) I tried to use your Vol. Heat Source. I added the field H and changed the solid eqn as:
Quote:
-fvm::laplacian(kappa, T) - H
But adding Vol. Heat Source what BCs I have to use for H and T? What about the interface between solid and fluid for H?

I'm running now 2 simulation, 1 with zero gradient T and 1 with fixed value T in "red" BC and zero gradient H for both for all solid patches.

I'll report my results here,
Thanks for any help/suggestion

Andrea
Attached Images
File Type: jpg mesh.jpg (24.2 KB, 129 views)
__________________
Andrea Pasquali
andrea.pasquali is offline   Reply With Quote

Old   March 21, 2012, 06:44
Default
  #54
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Quote:
Originally Posted by andrea.pasquali View Post
But adding Vol. Heat Source what BCs I have to use for H and T? What about the interface between solid and fluid for H?
Ciao Andrea,
As for H: I used internalField uniform XXX; and zeroGradient on the boundary patches, including the interfaces between different regions.
As for T: I used internalField uniform ambientTemperature; and zeroGradient or solidWallMixedTemperatureCoupled on the boundary patches, depending if the coupling was needed or not.
Hope this help,
mad
maddalena is offline   Reply With Quote

Old   March 22, 2012, 05:01
Default
  #55
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Hi,
here my (first) results with Vol. Heat Source in solid region and:
1) T fixedValue at "red" patch
2) T zeroGradient at "red" patch
As you can see from pictures:
1) with fixedValue (T_fV.jpg) the temperatures seem to reach convergence but the T at interface steam/solid is grater than the free solid wall ! This is very strange for me because the heat is going out the domain (?)...
2) with zeroGradient (T_zG.jpg) the temperatures don't seem to reach convergence... or how many iterations I need to?

Now it seems that using Vol. Heat Source in solid region instead heat flux in "red" patch does not solve the problem.... the T doesn't converge too.

My question is: how is the correct way to set Heat Flux? (I have already tried fixedGradient, externalWallHeatFluxTemperature, vol. heat source...).
It seems only T fixed value allow me to reach convergence, but T fixed value at "red" patch is not what I want!
Maybe steady state is not good for this? Do I need transient?

Any comment is useful!

Thanks

Andrea
Attached Images
File Type: jpg T_fV.jpg (39.7 KB, 74 views)
File Type: jpg T_zG.jpg (38.0 KB, 58 views)
__________________
Andrea Pasquali
andrea.pasquali is offline   Reply With Quote

Old   May 11, 2012, 04:39
Default
  #56
New Member
 
Adam Sitko
Join Date: Apr 2012
Posts: 12
Rep Power: 5
sitekss is on a distinguished road
Dear Foamers,
I'm playing with chtMultiRegionFoam, in my case I would like to have heat source too. I added:

"-H" to solveSolid.H,

" volScalarField H (
IOobject
(
"H"
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);" to setRegionsSolidField.H
and
"PrtList<volScalarField> H(solidRegions.size());" to createSolidFields.H


I can compile my solver but it returns error:
Cannot find file
file /.../cht/0.0588235/solid/H
Where is the problem? It seems that the solver can't read 0/H file.
sitekss is offline   Reply With Quote

Old   September 17, 2012, 13:48
Default
  #57
New Member
 
Fabien Farella
Join Date: Jan 2012
Posts: 7
Rep Power: 5
FabienF is on a distinguished road
Hi Maddalena,
I am working on the same implementation and I am facing the same problem. Did you make any progress on this issue?
Fab
FabienF is offline   Reply With Quote

Old   April 20, 2014, 01:20
Default Adding heat source to chtMultiregionFoam
  #58
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 122
Rep Power: 5
ahmmedshakil is on a distinguished road
Hi Maddalena,
Can you please advice me how added the volume heat source to the chtMultiregionFoam ? My problem is similar to yours (heat transfer between to different solids).
Thanks in advance.
shakil

Quote:
Originally Posted by maddalena View Post
Hello everybody,

After a while, I had the chance to work on cht again and, following some suggestions I had, I decided to investigate a little bit deeper the problem of adding an explicit heat source on conduction equation in chtMultiRegionFoam.

Set-up
I created a two solids geometry, similar to what I did here but with region2 larger than before (see geom01.png). I planned 6 different simulations, applying different conditionA and conditionB BC and switching on or off a heat source on region1:
  1. Simulation I
    1. time: unsteady;
    2. condition A:T = 350K;
    3. condition B: T = 300K;
    4. Heat source: off;
  2. Simulation II
    1. time: unsteady;
    2. condition A:T = 350K;
    3. condition B: coupling;
    4. Heat source: off;
  3. Simulation III
    1. time: unsteady;
    2. condition A:T = 350K;
    3. condition B: coupling;
    4. Heat source: on;
  4. Simulation IV
    1. time: unsteady;
    2. condition A:symmetry;
    3. condition B: T = 300K;
    4. Heat source: on;
  5. Simulation V
    1. time: unsteady;
    2. condition A:symmetry;
    3. condition B: coupling;
    4. Heat source: on;
  6. Simulation VI
    1. time: steady;
    2. condition A:symmetry;
    3. condition B: coupling;
    4. Heat source: on;
I selected some points where to sample temperature in time and… well… I let the simulations run… and run… and run… longer and longer than the last time.

Results
What I am more interested in is simulations V and VI, thus the following discussion applies to them. However, similar conclusions can be drawn for the others.

Firstly, I analyzed the temperature variation with position and compared it with theory. Results are reported in xvst.png. As can be seen, results given by steady solver close match the theoretical distribution, while a small error (about 0.5°C) is obtained with the unsteady simulation.

As a second step, I checked time vs temperature for simulation V on the selected point and compare it with the theoretically known temperature variation. As can be seen in figure timevst.png, both using a fixed time step or an adjustable time step, the simulated curves are far to be as in the theory. However, while the fixed time step simulation reaches (almost) the expected steady state temperature for the selected point, the adjustable time step simulation has an unrealistic discontinuity, which spoils the solution before the steady state. Some more tests showed that the position in time of this discontinuity was not affected by the time the solution was saved on the hard disk, but it seems affected by the maxDi value.

Conclusions
  • chtMultiRegionFoam and chtMultiRegionSimpleFoam matches the steady state temperature distribution;
  • chtMultiRegionFoam is not able to simulate correctly the temperature variation in time;
  • chtMultiRegionFoam is not able to reach the steady state solution when using an adjustable time step, but it is when using a fixed time step.

To do
This is for a two solids geometry. What happens when considering a fluid? My next step is to test the same geometry for a steady state & incompressible simulation, with a heat source, using a modified version of this solver.

Notes
is what I reported before these tests wrong? Well, not completely. What I did was to consider the simulation failed when, checking the solution, I could not see the steady state, but this study has showed that chtMultiRegionFoam is not able to simulate correctly the temperature variation in time. Therefore, my error was to consider a total simulation time related to the theoretically known time constant of the solids, while a longer simulated time would have been more appropriate.


Please, can anybody comment on that? Any experience on the subject is welcome, of course!
Regards,

mad
ahmmedshakil is offline   Reply With Quote

Old   July 16, 2014, 02:57
Default chtMultiregionSimpleFoam
  #59
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
Dear All,

I am solving a multisolid domain consisting of three different solids one in the bottom, one in the middle and one in the top.
I apply a fixed temp Gradient at the bottom patch of the bottom solid which is the heat flux (W/m2) divided by the thermal conductivity (k) of the bottom solid (W/mK). When i use the same k for all three solids the results are as expected. However when i use a different k for the middle solid the results are not correct.

Can anybody help me

Thanks

T.
ageorg is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, coupling, heat source, interface

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving heat Source AB FLUENT 2 January 30, 2012 08:06
Version 15 on Mac OS X gschaider OpenFOAM Installation 120 December 2, 2009 11:23
moving heat source Mehdi FLUENT 0 March 24, 2008 18:32
how to define volme heat source in udf ? wanghong FLUENT 0 February 24, 2006 04:53
heat source in a domain aydin FLUENT 0 January 3, 2003 08:01


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