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

[swak4Foam] whats wrong with groovyBC for nusselt number?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2016, 16:29
Default whats wrong with groovyBC for nusselt number?
  #1
New Member
 
rana
Join Date: Jul 2014
Posts: 21
Rep Power: 11
ranasa is on a distinguished road
hi everyone,

i intend simulating a routine heat transfer problem; i.e. 2D free convection of a circular cylinder in a closed cavity. cylinder is hot, side walls of constant temp.
AND
ceiling has a Neumann BC (convection), in contact with cavity's surrounding fluid.

i wanna get average Nusselt number over the cylinder surface

i use groovyBC in T file for ceiling

ceiling
{
type groovyBC;
gradientExpression "snGrad(T)";
fractionExpression "1";
variables
"htot=10;T_inf=293; snGrad(T)=htot*(T-T_inf);";
timelines (
);
}

and add libs. to controlDict

libs
(
"libOpenFOAM.so"
"libgroovyBC.so"
"libforces.so"
"libFVFunctionObjects.so"
"libsampling.so"
"libfieldFunctionObjects.so"
);


functions
{


NusseltNumber
{
functionObjectLibs
(
//"libsimpleFunctionObjects.so"
"libsimpleSwakFunctionObjects.so"

);
type patchExpression;
outputControlMode timeStep;
outputInterval 1;
patches
(
cyl
);
verbose true;
variables
(
"T_0=295;"
"D=0.014;"
);
expression "D*snGrad(T)/(T-T_0)";
accumulations
(
average
);
log true;
}

the plotted gnu for Nu looks absurd, goes up and down within a considerable range, say, 10 to 2000 during 1000 iteration! :|

the case is ok when i replace constant temp. for ceiling.

i really have now idea how to get this problem solved.

please give me some help

thanks in advance,
Rana
ranasa is offline   Reply With Quote

Old   June 27, 2016, 02:49
Default
  #2
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
Hi rana,

snGrad(T) is normal gradient of temperature,and you define it again in

variables section!!!

I have a question,What is your boundary condition???
rapierrz is offline   Reply With Quote

Old   June 27, 2016, 04:06
Default
  #3
New Member
 
rana
Join Date: Jul 2014
Posts: 21
Rep Power: 11
ranasa is on a distinguished road
hi Hesam,

actually a 2D hot cylinder is encompassed in a cavity, in which the side walls are remained at constant temp., bottom face is adiabatic, and, the ceiling transfers convective heat to the ambient; that is, "normal Grad(T)=htot*(T-T_inf)". htot is known from the experiments. T is the temperature of the ceiling that varies during solution.

here is my T file,

dimensions [0 0 0 1 0 0 0];

internalField uniform 295;

boundaryField
{
cyl
{
type fixedValue;
value uniform 300;
}
ceiling
{
type groovyBC;
gradientExpression "snGrad(T)";
fractionExpression "1";
variables
"htot=10;T_inf=293; snGrad(T)=htot*(T-T_inf);";
timelines (
);
}
bottom
{
type zeroGradient;
}

side
{
type fixedValue;
value uniform 295;
}

front-back
{
type empty;
}
}


a point to be said, i'm not sure about the temperature magnitudes given here, just tried to fulfill the required Ra.

i'll be glad to hear from you


regards
ranasa is offline   Reply With Quote

Old   June 27, 2016, 04:11
Smile
  #4
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
As you say,if you want gradT=h(T - T_inf),you must define for example:

variables " dummy = h(T - T_inf);";

gradientExpression "dummy";
rapierrz is offline   Reply With Quote

Old   June 27, 2016, 04:15
Lightbulb
  #5
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
Another thing,

You must put fractionExpression "0" in Neumann boundary condition.
rapierrz is offline   Reply With Quote

Old   June 27, 2016, 05:32
Default
  #6
New Member
 
rana
Join Date: Jul 2014
Posts: 21
Rep Power: 11
ranasa is on a distinguished road
thank you Hesam,

it looks better in oscillation now, but i really wonder if i could get such a Nu plot for the case.

first Nu is obtained for constant Ceiling temperature
the second one is for convective BC, applying your suggestion.
and the third one refers to the former convective BC that i wrote it goes up and down!

not sure,
but maybe something else is going wrong?! but actually i copy the folders and just adjust them!
Attached Images
File Type: jpg Screenshot from 2016-06-27 13:05:37.jpg (46.1 KB, 12 views)
File Type: jpg Screenshot from 2016-06-27 13:14:41.jpg (70.0 KB, 10 views)
File Type: jpg Screenshot from 2016-06-27 13:23:11.jpg (83.6 KB, 11 views)
ranasa is offline   Reply With Quote

Old   June 27, 2016, 06:25
Default
  #7
Member
 
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 10
bijan darbari is on a distinguished road
Dear RANASA

I not sure but I think using " externalWallHeatFluxTemperature " BC can solve your problem. Did you try that??

http://foam.sourceforge.net/docs/cpp...3.html#details
bijan darbari is offline   Reply With Quote

Old   June 27, 2016, 07:48
Default
  #8
New Member
 
rana
Join Date: Jul 2014
Posts: 21
Rep Power: 11
ranasa is on a distinguished road
it seems as an alternative for the groovyBC in this case

now i have problem defining kappa, i.e. thermal conductivity

the BC for ceiling is as follows,

ceiling
{
type externalWallHeatFluxTemperature;

kappa fluidThermo;
Ta uniform 293;
h uniform 10;
value uniform 293;
kappaName none;
Qr none;
relaxation 1;
}

openFoam says:

Kappa defined to employ fluidThermo method, but thermo package not available

does any other file expected to put in Constant folder?!

best regards
ranasa is offline   Reply With Quote

Old   June 27, 2016, 08:06
Default
  #9
Member
 
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 10
bijan darbari is on a distinguished road
Use:

kappa lookup ;
bijan darbari is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library aylalisa OpenFOAM Installation 23 June 15, 2015 14:49
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
[blockMesh] --> foam fatal error: lillo763 OpenFOAM Meshing & Mesh Conversion 0 March 5, 2014 10:27
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01


All times are GMT -4. The time now is 13:32.