CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

CCL and Perl syntax

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2015, 11:26
Default CCL and Perl syntax
  #1
New Member
 
Mickael
Join Date: Apr 2013
Posts: 9
Rep Power: 13
Leackim is on a distinguished road
Hello,

I am currently using CCL and Perl to make a post treatment file.

I would like to know if someone already managed to used CCL syntax inside a perl .pm file (library file).

To explain a little more, when i am writting my .pm file i can't use !,
So how i show CFX that some commands are CCL.
Here is an example :
************************************************
package Cfx;

use strict;
use Exporter qw(import);

our $VERSION = 1.00;
our @ISA = qw(Exporter);
our @EXPORT = ();
our @EXPORT_OK = qw(PointXYZ);
our %EXPORT_TAGS = ( DEFAULT => [qw(&PointXYZ)],
All => [qw(&PointXYZ)]);

COMMAND FILE:
CFX Post Version = 14.5
END

sub PointXYZ{
my ($s_dom,$s_x,$s_y,$s_z,$s_unit,$s_name)=@_; # Subroutine Input

my ($r_name);


# ------------Variable Initialization-----------------------------------------------------------------------------------------------------#
$r_name="";
# -----------------------------------------------------------------------------------------------------------------------------------------#
POINT:Point $s_name
Apply Instancing Transform = On
Colour = 1, 1, 0
Domain List = $s_dom
Line Width = 2
Option = XYZ
Point = $s_x $s_unit, $s_y $s_unit, $s_z $s_unit;
Point Symbol = Crosshair
Range = Global
Specular Lighting = On
Surface Drawing = Smooth Shading;
Symbol Size = 0.07
Transparency = 0.0
END;
$r_name="/POINT:Point $s_name"; #/
return($r_name);
}
1;
******************************************
As soon as i add CFX command (CCL) like POINT... my code stop working, however if i removed any CFX line and make just "print" things, my library works.

So,if someone find a solution to mix perl and CFX language let me know.

Thank you
Leackim is offline   Reply With Quote

Old   March 10, 2015, 11:37
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
Have you looked in the installation directory for CFD-Post session file examples ? They are suffixed .cse (Cfx SEssion)

They are worth a fortune if you are interested in Perl+CCL

Last edited by Opaque; March 10, 2015 at 18:43.
Opaque is offline   Reply With Quote

Old   March 11, 2015, 14:51
Default
  #3
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 21
singer1812 is on a distinguished road
Why do you have ; on END and Point = $s_x $s_unit, $s_y $s_unit, $s_z $s_unit

Those are CFX commands, not Perl
singer1812 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
CCL CFD post: use of common perl function Leackim CFX 1 January 23, 2017 09:37
Access to arrays of variables with CCL or perl in command editor omidiut CFX 2 October 18, 2011 06:13
Perl script for intialisation pratik mehta CFX 2 September 10, 2008 04:09
CFX5Post error in batch mode with Perl windhair CFX 2 March 20, 2007 06:41
Time-steps via Perl in CCL Rui CFX 5 March 29, 2004 01:47


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