|
[Sponsors] |
[swak4Foam] whats wrong with groovyBC for nusselt number? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 25, 2016, 17:29 |
whats wrong with groovyBC for nusselt number?
|
#1 |
New Member
rana
Join Date: Jul 2014
Posts: 21
Rep Power: 12 |
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 |
|
June 27, 2016, 03:49 |
|
#2 |
Senior Member
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11 |
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??? |
|
June 27, 2016, 05:06 |
|
#3 |
New Member
rana
Join Date: Jul 2014
Posts: 21
Rep Power: 12 |
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 |
|
June 27, 2016, 05:11 |
|
#4 |
Senior Member
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11 |
As you say,if you want gradT=h(T - T_inf),you must define for example:
variables " dummy = h(T - T_inf);"; gradientExpression "dummy"; |
|
June 27, 2016, 05:15 |
|
#5 |
Senior Member
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11 |
Another thing,
You must put fractionExpression "0" in Neumann boundary condition. |
|
June 27, 2016, 06:32 |
|
#6 |
New Member
rana
Join Date: Jul 2014
Posts: 21
Rep Power: 12 |
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! |
|
June 27, 2016, 07:25 |
|
#7 |
Member
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 11 |
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 |
|
June 27, 2016, 08:48 |
|
#8 |
New Member
rana
Join Date: Jul 2014
Posts: 21
Rep Power: 12 |
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 |
|
June 27, 2016, 09:06 |
|
#9 |
Member
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 11 |
Use:
kappa lookup ; |
|
|
|
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 15:49 |
Cluster ID's not contiguous in compute-nodes domain. ??? | Shogan | FLUENT | 1 | May 28, 2014 16:03 |
[blockMesh] --> foam fatal error: | lillo763 | OpenFOAM Meshing & Mesh Conversion | 0 | March 5, 2014 11:27 |
DecomposePar unequal number of shared faces | maka | OpenFOAM Pre-Processing | 6 | August 12, 2010 10:01 |