|
[Sponsors] |
May 17, 2015, 10:20 |
thermalBaffle1D showing bad behavior
|
#1 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Dear foamers,
Lately I have been trying to work with cylindrical baffles in a multiregion case. The solver I'm working with is chtMultiRegionSImpleFoam and I'm working with OpenFOAM 2.3.x. The case I'm currently working on aims to test the thermal behavior of the elements inside a furnace in vacuum conditions. As a consequence, I'm only interested in computing radiative and conductive heat fluxes since convection can be neglected. For this purpose, I set the thermal conductivity of the fluid region close to 0 by adjusting properly tha values of cp or Pr number in the "constant/fluidRegion/thermophysicalProperties" (I use constant transport and thermophysical properties). Furthermore, I activated the frozenFlow option in fvSolution file. One of the regions that make up the whole system are a set of cylindrical heat shields that prevent from heat losses. Since these components have a small thickness compared to their length I decided to create them as baffles using the utility createBaffles and the BC named thermalBaffle1D, that develops the heat conduction equation in 1D and allows to include Qr in the balance as follows being the thermal conductivity of the fluid near the patch (kappaEff) the distance between the center of the patch face to the center of the cell the thermal conductivity of the the baffle the baffle thickness In order to compute the mentioned balance, and according to the source code, the boundary condition (thermalBaffle1D) uses with On the paper it looked fantastic and I thought that I was going to get nice values by using this BC with the heat shields created as baffles. However, it wasn't that cool... In my case, the balance at the patch was a little simpler since I don't have to compute the convection term (OpenFOAM does it anyway although tha values of convection heat transfer are small depending on the value of cp or Pr I choose in the thermophysicalProperties file). Bellow the equation without the convection term is shown. The fact that is close to 0 implies that So far, it seems that the mentioned BC must work properly for my case. However, it was not like that... After some tests I found out that the fact of setting low values of cp (or hign values of Pr instead) in the "constant/fluidRegion/thermophysicalProperties" file has a weird influence on the thermal distribution on the baffles once the solver has converged. More exactly, what is happening is that the lower value the cp (or higher value the Pr) has, the variation of the baffle temperature is smaller from the initial value. For instance, if I set a value of cp (for the air) of 1e-5 and an initial value for the temperature in the baffle surface of 500 K, once the solver has converged the temperature in the baffles is almost uniform of 500 K. If I increase the value of cp to, say, 1e-2, the final value of the baffle temperature shows a little more variation, say, it's in a range between 500.1 and 500.3 K. However, if I use a normal value for the cp of the air (1000), the baffle's temperature distribution looks quite physical and its values go from 492 to 548 K. Attached you can see a quarter of the cylindrical shield and its temperature distribution with a value of the cp for the air of 1000. I cannot understand why the value of makes that big difference over the value of the temperatures on the baffles, whereas the effect of the radiative heat flux has no influence when has a very low value, because, according to the source code, it shouldn't be like that. Another strange thing I noticed is that the value of the relaxation factor for the Qr is not taken inton account or, at least, is not shown properly. In this other post you can see how I define my baffles in the createBafflesDict file. If I give a value different from 0 to the relaxation factor in the createBafflesDict file, say, a value of 0.5 as you can see below Code:
"./0.org/include/1DBaffle/1DTemperatureMasterBafflePatches_shield" T { type compressible::thermalBaffle1D<hConstSolidThermoPhysics>; thickness uniform 0.002; // thickness [m] Qr Qr; relaxation 0.5; Qs uniform 0; // heat flux [W/m2] # include "1DbaffleSolidThermo_shield" value uniform 500; } Code:
shieldBaffle1D_1_up_master { type compressible::thermalBaffle1D<hConstSolidThermoPhysics>; refValue uniform 500; refGradient uniform 0; valueFraction uniform 0; value uniform 500; sampleMode nearestPatchFace; sampleRegion air; samplePatch shieldBaffle1D_1_up_slave; coupleGroup shieldBaffle1D_1_up; thickness uniform 0.002; Qs uniform 0; specie { nMoles 1; molWeight 20; } equationOfState { rho 7930; } thermodynamics { Cp 460; Hf 0; } transport { kappa 21; } QrPrevious uniform 0; Qr Qr; QrRelaxation 0; } shieldBaffle1D_1_up_slave { type compressible::thermalBaffle1D<hConstSolidThermoPhysics>; refValue uniform 500; refGradient uniform 0; valueFraction uniform 0; value uniform 500; sampleMode nearestPatchFace; sampleRegion air; samplePatch shieldBaffle1D_1_up_master; coupleGroup shieldBaffle1D_1_up; QrPrevious uniform 0; Qr Qr; QrRelaxation 0; }
At this stage, I don't have a clue where the problem is but I would like to know if I can do something in order to get good results using these BC in my case (without convection). Maybe both problems mentioned above are related, no idea... Should I report this issue in the bug tracker? Any kind of help is much apprecaited. Best regards, Alex PS: I apologize for the post's length...
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! Last edited by zfaraday; May 18, 2015 at 08:42. Reason: paths in the last list corrected. Image correctly attached |
|
May 17, 2015, 15:27 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Alex,
You did very well in providing as much information as possible! Although, a few details are missing:
The first problem I can spot is this: Did you check what values "alpha" has got? Namely in the equation for "f". The second problem is regarding "createBafflesDict", because this line: Code:
relaxation 0.5; Code:
QrRelaxation 0; The third problem... is just a suspicion. If you are getting one situation where you get: Code:
QrRelaxation 0.5; Like I wrote above, having a good test case would make it easier to diagnose the problem. And I hope you're using "Allrun" scripts to help run the case. In addition, I strongly suggest you first try solving a 2D problem case, so that you can do the tests faster and the mathematics are easier to do manually, in order to double check what might be going wrong. And if there is a bug in createBaffles, then we definitely need a test case, in order to isolate the problem. Best regards, Bruno
__________________
|
|
May 18, 2015, 09:19 |
|
#3 | |||||
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Thanks for your quick answer Bruno, your insight is much appreciated.
Quote:
Quote:
Quote:
Code:
QrRelaxation_(dict.lookupOrDefault<scalar>("relaxation", 0)), Quote:
Quote:
Many thanks again for your advices. Best regards, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
||||||
May 18, 2015, 15:42 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Alex,
Earlier today, as soon as I saw that you had replied to my post and you stated that I was wrong, I remembered that yesterday I didn't manage to take a look into the source code of the BC. Since you provided the link in your post, I saw the code and the bug regarding the "relaxation" keyword and reported it here: http://www.openfoam.org/mantisbt/view.php?id=1696 The fix was up less than an hour later and is shown here: https://github.com/OpenFOAM/OpenFOAM...f72ad2fb034bf5 As for showing the "alpha" value, find the following piece of code in this boundary condition: Code:
scalarField KDeltaSolid(kappas/baffleThickness()); scalarField alpha(KDeltaSolid - Qr/Tp); Code:
Info << "alpha: " << alpha << endl; Info << "KDeltaSolid: " << KDeltaSolid << endl; Info << "Qr: " << Qr << endl; Info << "Tp: " << Tp << endl; Code:
wmake libso $FOAM_SRC/turbulenceModels/compressible/turbulenceModel My suspicion is that the "alpha" values you're getting are very small and that something like the following might be happening: Code:
0.0001/(0.0001 + 0.01) Bruno |
|
May 18, 2015, 17:12 |
test case
|
#5 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Thanks Bruno for reporting the bug! I just saw that it had been solved just some minutes before you posted your last post. However, I don't know if it solves my main problem, I will check it out soon!
My main problem was that when I deactivated the effect of convection (by setting a low value of Cp in the "air/thermophysicalProperties" file) in order to compute only radiation and conduction heat transfer, the thermal distribution on the baffle was not realistic since it remained constant (or almost constant) with the same value as the initial one. With this post I attach a simple test case where this effect can be noticed. This case is based on the original tutorial case "circuitBoardCooling", the only differences are:
It's not exactly the same case I was struggling with in the first post of this thread because the other one was run with chtMultiRegionSimpleFoam solver, while this one is solved with buoyantSimpleFoam. Even so, I guess that the solver for the fluids in chtMultiRegion solvers does the same as buoyantSimpleFoam... I haven't checked the source code. Nonetheless, the effect I want to show is the same in both cases: when the thermal conductivity of the fluid region is diminished by giving a low value to the Cp, the baffle temperature doesn't show physical values (the lower the Cp is, the less changes the temperature from the initial value). I also want to thank you for the good advice you gave me. I will add that piece of code to the BC source code in order to check where the error may be. Best regards, Alex PS. Btw, I would like to understand why a relaxation factor for Qr is needed in this BC and it's not in other BC's (e.g. in externalWallHeatFluxTemperature among others) __________________________________________________ ____________ (1) I have to dismiss the effect of Qr at the boundaries because when I try to take it into account the solver always crashes after some iterations. I found it out some time ago in a case solved with chtMultiRegionSimpleFoam. Maybe it is another bug to be reported...
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! Last edited by zfaraday; May 18, 2015 at 17:21. Reason: PS added. |
|
May 22, 2015, 09:02 |
|
#6 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
After some tests, it seems to solve the problem!
Thanks Bruno for the report! Best regards, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
|
October 1, 2016, 17:05 |
|
#7 | |
Senior Member
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21 |
Quote:
Code:
//- system/fvSolution relaxationFactors { fields { Qr 0.1; } } Code:
//-src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C void Foam::radiation::viewFactor::calculate() { ... // Relax Qr if necessary Qr_.relax(); } |
||
Tags |
chtmultiregionsimplefoam, convection, createbaffles, radiation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bad pressure distribution in pump | oringo | FLUENT | 2 | March 2, 2013 11:38 |
[ANSYS Meshing] Very thin plate (0.1mm) ICEM CFD bad meshing | msormania | ANSYS Meshing & Geometry | 1 | April 30, 2012 08:45 |
Allwmake path error | kiski | OpenFOAM Installation | 20 | March 22, 2012 13:45 |
Bad OpenGL Performance with FIRE GL2 using GAMBIT | Volker Pawlik | FLUENT | 1 | December 1, 2003 13:38 |
Problems of Duns Codes! | Martin J | Main CFD Forum | 8 | August 15, 2003 00:19 |