wrong calculation of wallHeatFlux utility in solid patches
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 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 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!:confused: Thanks in advance. Regards, Alex |
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?
|
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! |
Quote:
One thing is puzzling me is that energy variation is always null even though the region is heating up! |
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. |
Did you made any progress here?
|
Quote:
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!:cool: Enjoy! |
All times are GMT -4. The time now is 08:34. |