Varying heat flux using groovyBC with chtMultiRegionSimpleFoam
Hi all,
I want to impose a heat flux varying linear with the y-coordinate. Basically it's just q(y)=C1*y+C2 Since I can't see how to do this with boundary conditions like externalWallHeatFluxTemperature I got the idea oif calculating the temperature gradient with thermal conductivity of the wall and use groovyBC to impose this BC. dT/dn = C3*y + C4 Code:
type groovyBC; http://s12.postimg.org/7dwd8bmrh/Scr...0_16_04_47.png I wonder whether groovyBC really sets the boundary condition for temperature or for energy. Because when I compared externalWallHeatFluxTemperature, fixedGradient and groovyBC, the latter one deviates heavily from the first ones. Code:
/* Every help is appreciated! My test case: https://owncloud.tu-berlin.de/public...e61c8c86356a78 Best |
I solved my problem by modifying the boundary condition to the following
Code:
|
Right, if you miss the fractionExpression, groovyBC assumes you are using a fraction of 1 which corresponds to fixedValue. So when you want to set a gradient you have to set the fractionExpression to zero.
That's the reason I always set all three expressions in groovyBC. Cheers Fabian |
Yeah exactly I thought I could just omit that one.
But another question for me is whether setting the temperature gradient to apply a varying heat flow is going to work on a curved geometry as well. Since the gradient has to be normal to the wall. Is this automatically done by OF or do I have to take this into consideration? |
So I tried to impose the nonuniform heat flux with the groovyBC heat gradient on a curved surface with unstructured mesh and the result doesn't look to good for me.
The heat flux on the surface becomes "patchy" with zones of high flux and zones with low flux also when I applied a constant wallHeatFluxTemperature BC. Do you know whether OpenFOAM accounts for the normal direction when applying a fixedGradient boundary condition by itself? http://s8.postimg.org/faw0dy0xx/Scre...5_13_22_06.png |
To avoid the workaround using fixedGradient to apply a heat flux I'm using
Code:
type externalWallHeatFluxTemperature; But it's nearly impossible to do it in this "manual" way for a complex geomety. Is there a way to use a swak4Foam like expression in combination with externalWallHeatFluxTemperature boundary condition? I uploaded my simple testcase for you here https://owncloud.tu-berlin.de/public...da69d0f2649e9e |
All times are GMT -4. The time now is 01:18. |