Heat Flow across patches using chtmultiregionfoam
Hello,
I am having great difficulty finding out how to evaluate heat flow across patches between solid regions, and across patches that are between a solid and fluid region. This is for chtMultiRegionFoam or ..SimpleFoam. I have installed and looked into swak4foam, but this functionality does not look to be there. In swak4foam, I can average T across a patch between fluid and solid, but not across patches between solids. Any guidance? Thanks |
Quote:
|
Hello,
Thank you for your reply and link. I am putting the function code into the controldict in order to test access to the average temperature of a patch. In my simple test model, there are three regions, with different thermal conductivities. The following code reports the correct average temperature for the external patches, but reports -1e300 for average temperature of any internal patch. The regions are met1, elem, and met2. Basically two metals on each end of a material called elem. The patches cold and hot are external, and cold_int/hot_int are internal patches between regions. Code:
functions Any guidance would be greatly appreciated. |
Quote:
Quote:
|
Thank you, I will look into the items you pointed out.
|
Hey Chaz,
Did you find a convinient Way to Solve your Problem? |
Hello,
Yes, I did make progress getting heat flow data from patches in chtmultiregionfoam. As Bernhard suggested, swak4foam can be used to get the heat flow between two regions that are solid. I added code similar to the following to then trigger swak4foam to calculate the heat flow and to output it for every iteration into a file. qHot { type swakExpression; valueType patch; patchName hot; verbose true; expression "-K*area()*snGrad(T)"; accumulations (sum); region Solid_2; } I also had to load the libraries needed first in the controldict file: libs ( "libOpenFOAM.so" "libgroovyBC.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" "libswakTopoSources.so" ) ; Not sure if all of these are needed, this was just copied and pasted from somewhere else. I ran this on a simple model with two regions with different thermal conductivity and compared it to theory, and confirmed that it works. |
All times are GMT -4. The time now is 02:20. |