July 24, 2015, 03:53
|
|
#61
|
New Member
saeed rashidzade
Join Date: Jun 2015
Posts: 4
Rep Power: 11
|
Quote:
Originally Posted by mordab
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
|
|
|