July 3, 2019, 06:15
|
GroovyBC - issue with non-uniform inlet
|
#1
|
New Member
Sina
Join Date: Jun 2015
Posts: 7
Rep Power: 11
|
I am new to GroovyBC but will try to explain the issue. I have built the last version of GroovyBC on openfoam 5. Now trying to apply a non-uniform velocity as an inlet boundary condition to a jet fan suspending in the air (solver: simpleFoam). This is the BC I set:
Code:
fanOutlet
{
type groovyBC;
variables "Uavg=-7;yp=pts().y;xp=pts().x;minY=min(yp);maxY=max(yp);minX=min(xp);maxX=max(xp);ctrX=0.5*(min(xp)+max(xp));ctrY=0.5*(min(yp)+max(yp));";
valueExpression "(Uavg/0.64)*(1-pow((pos().x-ctrX)/ctrX,4)*(1-pow((pos().y-ctrY)/ctrY,4)*normal()";
value uniform (0 0 -7);
}
and when trying to run, I get the following message and the run before starting ends:
Code:
swak4Foam: Allocating new repository for sampledGlobalVariables
tried to debug: When changing the expression to a constant it works. when changing pts() to pos() (to check if it is compilation problem) then it would start the run, but from the beginning it diverges.
PS: just attached the screenshot when running with uniform fixed velocity.
|
|
|