CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   ERROR CCL parser failed with message: Perl Syntax errors detected: Can't use an undef (https://www.cfd-online.com/Forums/fluent-udf/193916-error-ccl-parser-failed-message-perl-syntax-errors-detected-cant-use-undef.html)

nands_bullwalker October 6, 2017 10:17

ERROR CCL parser failed with message: Perl Syntax errors detected: Can't use an undef
 
Hello everyone! I am trying to play a session file to create planes and polylines and thereby to extract required data using the code mentioned below. When I am trying to play the .cse file in CFD-POST the following error is displayed.

"ERROR
CCL parser failed with message:
Perl Syntax errors detected:
Can't use an undefined value as a symbol reference at (eval 183) line 6."


Any help regarding this is deeply appreciated. Please do respond.

This is the code in the session file:


#Post-processing macro
#set results file name
!my $outfile ='Nu_ConstwallQ_Bao1.xls';
!$pi = atan2(1,1)*4;
!$tiny = 1.0E-8;
#Set number of planes
!$nplanes = 100;
!open FH, "> $outfile" or die $!;
!print $FH " -------------------------------------------------\n";
!print $FH "Heat transfer along the duct length \n";
!print $FH "Results file used is $resname \n";
!print $FH " Axial length \t QwallCFX \t TWall \t Tbulk \t HTC \n";
!print $FH " ------------------------------------------------\n";
#set some basic geometry locations
!$l=0.02;
!$d= 2.0E-3;
#
!$pathlen = $l;
!$spacing = $pathlen/($nplanes -1);
#Start of main loop
! $i = 1;
! $im = $i -1;
while($i<=$nplanes){
!$clen = ($i-1)*$spacing;
! $px = $clen;
! $py = 0.0;
! $pz = 0.0;
! $nx = $pz+0.01;
! $ny = 0.0;
! $nz = 0.0;
PLANE:Plane 1
Apply Instancing Transform = On
Apply Texture = Off
Blend Texture = On
Bound Radius = 0.02 [m]
Colour = 0.75, 0.75, 0.75
Colour Map = Default Colour Map
Colour Mode = Constant
Colour Scale = Linear
Colour Variable = X
Colour Variable Boundary Values = Hybrid
Culling Mode = No Culling
Direction 1 Bound = 1.0 [m]
Direction 1 Orientation = 0 [degree]
Direction 1 Points = 10
Direction 2 Bound = 1.0 [m]
Direction 2 Points = 10
Domain List = /DOMAIN GROUP:All Domains
Draw Faces = On
Draw Lines = Off
Instancing Transform = /DEFAULT INSTANCE TRANSFORM:Default Transform
Invert Plane Bound = Off
Lighting = On
Line Colour = 0, 0, 0
Line Colour Mode = Default
Line Width = 1
Max = 0.0 [m]
Min = 0.0 [m]
Normal = $nx, $ny, $nz
Option = Point and Normal
Plane Bound = Circular
Plane Type = Slice
Point = $px [m], $py [m], $pz [m]
Point 1 = 0 [m], 0 [m], 0 [m]
Point 2 = 1 [m], 0 [m], 0 [m]
Point 3 = 0 [m], 1 [m], 0 [m]
Range = Global
Render Edge Angle = 0 [degree]
Specular Lighting = On
Surface Drawing = Smooth Shading
Texture Angle = 0
Texture Direction = 0 , 1 , 0
Texture File =
Texture Material = Metal
Texture Position = 0 , 0
Texture Scale = 1
Texture Type = Predefined
Tile Texture = Off
Transform Texture = Off
Transparency = 0.0
X = 0.0 [m]
Y = 0.0 [m]
Z = 0.0 [m]
OBJECT VIEW TRANSFORM:
Apply Reflection = Off
Apply Rotation = Off
Apply Scale = Off
Apply Translation = Off
Principal Axis = Z
Reflection Plane Option = XY Plane
Rotation Angle = 0.0 [degree]
Rotation Axis From = 0 [m], 0 [m], 0 [m]
Rotation Axis To = 0 [m], 0 [m], 0 [m]
Rotation Axis Type = Principal Axis
Scale Vector = 1 , 1 , 1
Translation Vector = 0 [m], 0 [m], 0 [m]
X = 0.0 [m]
Y = 0.0 [m]
Z = 0.0 [m]
END
END

POLYLINE:Polyline 1
Apply Instancing Transform = On
Boundary List = top_wall contact_region trg
Colour = 0, 1, 0
Colour Map = Default Colour Map
Colour Mode = Constant
Colour Scale = Linear
Colour Variable = X
Colour Variable Boundary Values = Hybrid
Contour Level = 1
Domain List = /DOMAIN GROUP:All Domains
Input File =
Instancing Transform = /DEFAULT INSTANCE TRANSFORM:Default Transform
Line Width = 2
Location = /PLANE:Plane 1
Max = 0.0 [m]
Min = 0.0 [m]
Option = Boundary Intersection
Range = Global
OBJECT VIEW TRANSFORM:
Apply Reflection = Off
Apply Rotation = Off
Apply Scale = Off
Apply Translation = Off
Principal Axis = Z
Reflection Plane Option = XY Plane
Rotation Angle = 0.0 [degree]
Rotation Axis From = 0 [m], 0 [m], 0 [m]
Rotation Axis To = 0 [m], 0 [m], 0 [m]
Rotation Axis Type = Principal Axis
Scale Vector = 1 , 1 , 1
Translation Vector = 0 [m], 0 [m], 0 [m]
X = 0.0 [m]
Y = 0.0 [m]
Z = 0.0 [m]
END
END
# Sending visibility action from ViewUtilities
>show /POLYLINE:Polyline 1, view=/VIEW:View 1
>show /PLANE:Plane 1, view=/VIEW:View 1
LIBRARY:
CEL:
EXPRESSIONS:
CpT = Specific Heat Capacity At Constant Pressure*Temperature
END
END
END
EXPRESSION EVALUATOR:
Evaluated Expression = CpT
END
> forceupdate EXPRESSION EVALUATOR

USER SCALAR VARIABLE: Variable 1
Boundary Values = Conservative
Calculate Global Range = Off
Expression = CpT
Recipe = Expression
Variable to Copy = Water.Density
Variable to Gradient = Water.Density
END
!$Qtot=massFlowInt("CpT","Plane 1");
!$mCptot=massFlowInt("Specific Heat Capacity At Constant Pressure","Plane 1");
!$Tbulk=$Qtot/$mCptot;
!$qwall=lengthAve("Wall Heat Flux","Polyline 1");
!$Twall=lengthAve("Temperature","Polyline 1");
!$h=$qwall/($Twall-$Tbulk);
!print $FH " %6.3e\t %9.3e \t %9.3e \t%9.3e \t %9.3e \n" , $clen,$qwall,$Twall,$Tbulk,$h;
!$i =$i+1;
}
!close $FH;

nands_bullwalker October 6, 2017 11:32

Somebody please give ur valuable suggestions on this code.....m in a needful situation

kirmaks October 9, 2017 09:13

Quote:

Originally Posted by nands_bullwalker (Post 666793)
Somebody please give ur valuable suggestions on this code.....m in a needful situation

Hallo,

I think You haven't declared file handle for open the file:
Code:

!open my $FH ...
Regards, Maksim

P.S. I think this topic is not a subject of the UDF forum


All times are GMT -4. The time now is 22:32.