|
[Sponsors] |
wrong calculation of wallHeatFlux utility in solid patches |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 23, 2015, 09:12 |
wrong calculation of wallHeatFlux utility in solid patches
|
#1 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Dear foamers,
I'm currently working on a multi region case with chtMultiRegionFoam solver. In this case I only work with solids and my purpose is to calculate the heat balance in one of the solids in every time step. To do so, I implemented the following function objects in the controlDict file: Code:
energyVariationFasana { type swakExpression; region fasana; outputControlMode timeStep; outputInterval 1; aliases { rho thermo:rho; } expression "rho*vol()*(h-oldTime(h))/deltaT()"; accumulations ( sum ); valueType internalField; verbose true; } energyAbsorbedFasana { type patchExpression; outputControlMode timeStep; outputInterval 1; accumulations ( sum ); patches (".*"); region fasana; variables ("k=0.5;" ); expression "k*(snGrad(T))*area()"; verbose true; } So far, one may think that only one of the methods to compute heat flux at patches should be used because it's a waste of time to use both. Well, I have used both and I found something surprising. Both methods give exactly the same result in regular patches (as it was expected), but very different one in patches of type mappedWall (those named solid1_to_solid2 that connect two solids). Here you can see an example of such difference: Code:
wallHeatFlux function object wHF/fo -0.0382378 -0.01433923 2,6666564383 -0.044291812 -0.014763784 3,0000311573 0.013526612 0.0099961003 1,3531889031 -0.034700336 -0.013012907 2,6666090828 -0.044298687 -0.014766133 3,0000195041 My guess is that the wrong values have something to do with the contact area between solids because the bigger values of the third column belong to the patches that have bigger area that transfers heat from one solid to another. Maybe there's some bug in the wallHeatFlux utility or maybe I am doing something wrong. Can anybody give me a hint on what is the correct value? In my case it's not a big deal because the contact surfaces between solids are not much big ant the heat transmitted between them is practically 0, but it may cause a big confussion in other cases where heat flux between different solids is an important point. Note: Another point I don't understand is why I have to define the Fourire's Law in the function object as "k*(snGrad(T))*area()" instead of "-k*(snGrad(T))*area()" which is the correct formulation... If I use the correct one I get the opposite fluxes! Thanks in advance. 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! Last edited by zfaraday; January 23, 2015 at 09:15. Reason: Note added |
|
January 30, 2015, 11:38 |
|
#2 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Isn't there anyone who can shed some light on it? It seems that something doesn't work as expected with wallHeatFlux utility... Does no one really faced this problem before?
__________________
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! |
|
March 17, 2015, 05:17 |
|
#3 |
New Member
Join Date: Mar 2015
Location: Earth yet
Posts: 25
Rep Power: 11 |
I am a newbie with OF, so I won't be of any help yet, but I am very interested in this topic as I need to calculate the heat transfer between solids in a chtMultiRegion case.
I agree with you there should be a minus in front of K*snGrad(T)*area() since heat flows in the opposite direction of temperature gradient vector indeed (positive direction pointing from cold to hot), though it can be a matter of sign convention. It seems to me that OF works with a coherent sign system (also when fixed gradients need to be imposed I use the opposite of what I would naturally use) so sign is not really a big deal for me, I am more concerned with magnitude. One thing I would like to know is how to read out energyAbsorbed and energyVariation after calculation stopped and why does wallHeatFlux work only on walls (or how do I get heat fluxes from other kind of boundaries)... Thanks for your effort! |
|
March 19, 2015, 05:26 |
|
#4 | |
New Member
Join Date: Mar 2015
Location: Earth yet
Posts: 25
Rep Power: 11 |
Quote:
One thing is puzzling me is that energy variation is always null even though the region is heating up! |
||
April 3, 2015, 05:25 |
|
#5 | ||
New Member
Join Date: Mar 2015
Location: Earth yet
Posts: 25
Rep Power: 11 |
Quote:
Could it be? Quote:
Anyway I'd go on (or, better, I do go on) with function obj since I have a grasp on what they actually do. Last edited by coccone; April 3, 2015 at 06:52. Reason: forgot smthg |
|||
January 12, 2016, 08:41 |
|
#6 |
Member
Join Date: May 2015
Posts: 68
Rep Power: 11 |
Did you made any progress here?
|
|
January 12, 2016, 17:39 |
|
#7 |
New Member
Join Date: Mar 2015
Location: Earth yet
Posts: 25
Rep Power: 11 |
I completely ditched wallHF, so far I've been using only function objects to calculate it. The formulation here above works fine for solid regions so I sticked to it, you just get slightly different values at opposite sides of a coupled patch that eventually tend to converge.
If you have the same issues with wallHF, my advice is to just switch to function objects and if you need to calculate heat flux at a solid-fluid coupled interface just use them on the solid side! Enjoy! |
|
Tags |
cht coupling, chtmultiregion, function object, wallheatflux |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf error | srihari | FLUENT | 1 | October 31, 2016 15:18 |
[mesh manipulation] Sharp edge problem on concave patches using polyDualMesh without error | keepfit | OpenFOAM Meshing & Mesh Conversion | 1 | November 25, 2014 15:28 |
Wrong calculation of nut in the kOmegaSST turbulence model | FelixL | OpenFOAM Bugs | 27 | March 27, 2012 10:02 |
Wrong calculation of yPlus for low-Re models | bastil | OpenFOAM Bugs | 4 | February 9, 2010 08:39 |
calculation of pressure difference wrong? | Ralf Schmidt | FLUENT | 0 | January 5, 2006 11:06 |