
[Sponsors] 
March 26, 2012, 11:57 
groovyBC

#1 
New Member
Maike
Join Date: Dec 2010
Posts: 8
Rep Power: 7 
I try to set up a depth dependent Temperature Gradient for a case in OpenFOAM with groovyBC.
FLOOR { type groovyBC; variables "ypos=pos().y;"; valueExpression "(ypos7300)*(0.025)+273"; } when I run the case, I get the following in the output of the first written timestep: FLOOR { type groovyBC; refValue nonuniform List<scalar> 283 (... here are 283 correct values); refGradient uniform 0; valueFraction uniform 1; value nonuniform List<scalar> 283 (... here are the same 283 values); valueExpression "(ypos7300)*(0.025)+273"; gradientExpression "0"; fractionExpression "1"; variables "ypos=pos().y;"; timelines ( ); why is it written in refValue and value? I use a Temperature reference Value and define it elsewhere, to calculate the density... But this one I don't need. Then there is a further problem, no clue if it's connected... The field phi gets a completly wrong number of points for the internal field and several nan. The field U gets the right number of points in the internal field but as well a lot of nan... Does someone have an idea about this? Cheers, Maike. 

March 26, 2012, 16:49 

#2  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,952
Rep Power: 41 
Quote:
refValue is something used by the mixedBC (which groovyBC inherits from) to set that valuevalue (see the mixedBC in the UserGuide to see what that actually means) groovyBC sets the refValue from the valueExpression. So all three depend on each other (the wonder of inheritance) The only reason that value and refValue are the same is because your fractionExpression is "1" (see the mixeddocu and you'll be enlightened) Quote:
phi and U depend on each other so the NaN are no surprise. Most likely there is a problem during the solution of the Momentum/Continuityequations. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
groovyBC and funkySetFields married and got a kid named swak4Foam  gschaider  OpenFOAM  164  January 13, 2015 03:52 
GroovyBC for 2D wave flume!  Hisham  OpenFOAM Running, Solving & CFD  13  January 20, 2012 06:04 
groovyBC and Eqn.setReference()  benk  OpenFOAM  3  June 2, 2011 08:49 
Wall heat transfer using groovyBC (XiFoam solver)  usergk  OpenFOAM  7  February 4, 2011 14:36 
Nonnormal inflow with groovyBC  bjr  OpenFOAM  9  January 17, 2011 11:35 