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

[swak4Foam] groovyBC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 26, 2012, 11:57
Default groovyBC
  #1
New Member
 
Maike
Join Date: Dec 2010
Posts: 8
Rep Power: 15
mugi is on a distinguished road
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 "(ypos-7300)*(-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 "(ypos-7300)*(-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.
mugi is offline   Reply With Quote

Old   March 26, 2012, 16:49
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mugi View Post
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 "(ypos-7300)*(-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 "(ypos-7300)*(-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.
value is used by almost ever BC and the actual value on the patch

refValue is something used by the mixed-BC (which groovyBC inherits from) to set that value-value (see the mixed-BC 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 mixed-docu and you'll be enlightened)

Quote:
Originally Posted by mugi View Post
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?
With "wrong number" you mean "different from the internalField in T". That is because phi is a surfaceField and all other fields are volumeFields. So this is no problem.

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/Continuity-equations.
gschaider 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
[swak4Foam] groovyBC for oscillatory flow liybzd OpenFOAM Community Contributions 5 November 12, 2018 07:53
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC zanilu70 OpenFOAM Community Contributions 4 December 13, 2016 06:46
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam dani2702 OpenFOAM Community Contributions 0 November 17, 2016 03:30
[swak4Foam] groovyBC issue - k and epsilon sagnikmazumdar OpenFOAM Community Contributions 24 March 1, 2015 07:16
[swak4Foam] groovyBC and Eqn.setReference() benk OpenFOAM Community Contributions 3 June 2, 2011 08:49


All times are GMT -4. The time now is 18:05.