|
[Sponsors] |
[swak4Foam] Varying heat flux using groovyBC with chtMultiRegionSimpleFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 10, 2015, 10:05 |
Varying heat flux using groovyBC with chtMultiRegionSimpleFoam
|
#1 |
Member
Join Date: May 2015
Posts: 68
Rep Power: 11 |
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; gradientExpression "(0.05*pos().y+0.01)"; 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:
/* type externalWallHeatFluxTemperature; kappa solidThermo; q uniform 500; thicknessLayers (); kappaLayers (); value uniform 400; kappaName none; QrName none; */ /* type fixedGradient; gradient uniform 6.25; */ /* type groovyBC; gradientExpression "6.25"; */ Every help is appreciated! My test case: https://owncloud.tu-berlin.de/public...e61c8c86356a78 Best |
|
December 11, 2015, 06:59 |
|
#2 |
Member
Join Date: May 2015
Posts: 68
Rep Power: 11 |
I solved my problem by modifying the boundary condition to the following
Code:
type groovyBC; fractionExpression "0"; variables "C1=0;C2=6.25;"; gradientExpression "(C1*pos().y+C2)"; value uniform 0; |
|
December 11, 2015, 08:21 |
|
#3 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
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 |
|
December 11, 2015, 08:40 |
|
#4 |
Member
Join Date: May 2015
Posts: 68
Rep Power: 11 |
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? |
|
December 15, 2015, 07:20 |
|
#5 |
Member
Join Date: May 2015
Posts: 68
Rep Power: 11 |
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? |
|
December 15, 2015, 08:55 |
|
#6 |
Member
Join Date: May 2015
Posts: 68
Rep Power: 11 |
To avoid the workaround using fixedGradient to apply a heat flux I'm using
Code:
type externalWallHeatFluxTemperature; kappa solidThermo; q nonuniform List<scalar> 56( 4.5 [...] 145 ); thicknessLayers (); kappaLayers (); value uniform 400; kappaName none; QrName none; 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 |
|
Tags |
expression, externallwallheat, gradient, groovybc, heat transfer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for a time varying heat flux boundary condition | B.Hamada | Fluent UDF and Scheme Programming | 9 | August 8, 2018 12:51 |
[swak4Foam] Fixed Wall Heat Flux with groovyBC | flowpow | OpenFOAM Community Contributions | 0 | September 7, 2016 09:48 |
[swak4Foam] Heat Flux boundary conditions with groovyBC for chtMultiRegionFoam with solids only | Kumudu | OpenFOAM Community Contributions | 7 | August 23, 2014 14:33 |
Heat Flux at wall in a conjugate heat transfer problem | Chander | CFX | 2 | July 9, 2011 22:22 |
Linearly varying heat flux | Ankit Tayal | FLUENT | 1 | April 16, 2006 10:12 |