CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

How to set the fixheatflux boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2010, 23:27
Question How to set the fixheatflux boundary condition
  #1
New Member
 
Join Date: Oct 2010
Posts: 24
Rep Power: 16
LijieNPIC is on a distinguished road
Hi all,
I know this topic has been discussed a lot before, but I still don't understand. I am going to set the fixedHeatFlux boundary.As you know, q=-k*Grad(T),where q is heat flux and k is thermal conductivity. Although q is known and the relationship between k and T is known, Grad(T) still cannot get. So the fixGradient boudary is useless for me. In this situation, how can I set the boundary condition?
Thanks a lot in advance.
LijieNPIC is offline   Reply With Quote

Old   November 10, 2010, 07:43
Default
  #2
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15
alfa_8C is an unknown quantity at this point
hy,

This is the procedure:

- download the "groovyBC" contribution
- compile it

and insert the following as a T boundary condition:

WALL_HEATSOURCE (change it to the name of your BC )
{
type groovyBC;
value uniform 283;
valueExpression "283";
gradientExpression "gradT";
fractionExpression "0";
variables "heatFlux=2000;Cp0=1005;rho0=1.18;gradT=heatFl ux/(alphaEff * Cp0 * rho0);";
timelines (
);
}

- change the desired heatflux (a minus in front of the value would be a sink then)

- add the following lines to your controlDict:

libs ( "libOpenFOAM.so" "libgroovyBC.so" );

Thats it!

Have fun!
alfa_8C is offline   Reply With Quote

Old   November 10, 2010, 11:00
Default
  #3
New Member
 
Join Date: Oct 2010
Posts: 24
Rep Power: 16
LijieNPIC is on a distinguished road
Antonio Liggieri,
Thank you very much. I will have a try.
LijieNPIC is offline   Reply With Quote

Old   December 9, 2010, 13:18
Default
  #4
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Code:
WALL_HEATSOURCE (change it to the name of your BC )
{
type groovyBC;
value uniform 283;
valueExpression "283";
gradientExpression "gradT";
fractionExpression "0";
variables "heatFlux=2000;Cp0=1005;rho0=1.18;gradT=heatFl ux/(alphaEff * Cp0 * rho0);";
timelines (
); 
}
Is there a way to get groovyBC to read a dimensionedScalar? For example, instead of specifying Cp0 and rho0 in the "variables" string, I want to specify them in a Properties dictionary. I know groovyBC can access a volScalarField but I want to read in Cp0 and rho0 like:

Code:
dimensionedScalar Cp0(domainProperties.lookup("Cp0"));
and then have groovyBC access Cp0
benk is offline   Reply With Quote

Old   December 9, 2010, 15:15
Default
  #5
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
hello!

is it possible to have a variable K with this BC ? If not, how can I do ??


Regards,
Cyp
Cyp is offline   Reply With Quote

Old   December 9, 2010, 15:23
Default
  #6
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Code:
is it possible to have a variable K with this BC ?
Yes. Just make your K a volScalarField and use:

Code:
variables "heatFlux=2000;Cp0=1005;rho0=1.18;gradT=heatFl ux/(K * Cp0 * rho0);";
I'm still interested in knowing if we can use dimensionedScalar with groovyBC though. A workaround is to create a volScalarField and populate it with the value of a dimensionedScalar, but this seems to be a bit of a waste.
benk is offline   Reply With Quote

Old   December 10, 2010, 11:21
Default
  #7
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15
alfa_8C is an unknown quantity at this point
Hello Ben,

yes that's possible. If I understand you aright, the thread I posted recently attached below, points out exactly your problem but with different fields... take a look at it..

************************************************** ******
since alphaEff = alphat (turbulent alpha) + alpha (laminar alpha),

and alphat as well as alpha is defined as volsclarfield in and thus present, the groovyBC expression can be modified as follows:

SURFACE_SOURCE
{
type groovyBC;
value uniform 283;
valueExpression "283";
gradientExpression "gradT";
fractionExpression "0";
variables "heatFlux=0.00000001;Cp0=1005;rho0=1.18;gradT= heat Flux/((alphat + alpha) * Cp0 * rho0);";
timelines (
);
}

Good Luck
Tony
alfa_8C is offline   Reply With Quote

Old   December 10, 2010, 13:16
Default
  #8
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Hi Tony, thanks. But what I want to do is have groovyBC read a dimensionedScalar not a volScalarField.
benk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
External Radiation Boundary Condition for Grid Interface CFD XUE FLUENT 0 July 9, 2010 03:53
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 07:49
how to set boundary condition for a tank filling w namrata FLUENT 6 May 2, 2007 11:23
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55
how to set the porous boundary condition chocheng FLUENT 2 March 22, 2001 14:42


All times are GMT -4. The time now is 09:08.