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

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2015, 02:53
Default
  #61
New Member
 
saeed rashidzade
Join Date: Jun 2015
Posts: 4
Rep Power: 10
mordab is on a distinguished road
Quote:
Originally Posted by mordab View Post
Hi all,
I tried to simulate a cavity in below temperature conditions:

Right & Left Wall:
Th-(Th-Tc)*y/L

Floor:
T=Th

ceiling:
gradT=0

so I changed 0/T file like this:
"
boundaryField
{
floor
{
type fixedValue;
value uniform 1;
}

rightWall
{

type groovyBC;
variables "y=pos().y; ymax=max(pos().y); T@floor=Th; Tc=0;";
valueExpression "Th-(Th-Tc)*y/ymax";
value uniform 0;
}

leftWall
{
type groovyBC;
variables "y=pos().y; ymax=max(pos().y); T@floor=Th; Tc=0;";
valueExpression "Th-(Th-Tc)*y/ymax";
value uniform 0;
}


movingWall
{
type zeroGradient;
}
"
but when I run, got the error message:

swak4Foam: Allocating new repository for sampledGlobalVariables
--> FOAM Warning :
From function ConcretePluginFunction<DriverType>::exists
in file lnInclude/ConcretePluginFunction.C at line 121
Constructor table of plugin functions for PatchValueExpressionDriver is not initialized


--> FOAM FATAL ERROR:
Parser Error for driver PatchValueExpressionDriver at "1.1-2" :"field Th not existing or of wrong type"
"Th-(Th-Tc)*y/ymax"
^^
--|

Context of the error:


- From dictionary: /home/saeed/Desktop/porousCavity/0/T.boundaryField.rightWall
Evaluating expression "Th-(Th-Tc)*y/ymax"


From function parsingValue
in file lnInclude/CommonValueExpressionDriverI.H at line 1189.

FOAM exiting


did I use groovyBC correctly?
what should I do?

Thanks
finally I found the trouble, I should not use space in variables
TML likes this.
mordab is offline   Reply With Quote

Reply

Tags
groovybc, swak4foam


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 07:52.