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

Using Perl script and power Syntax in CFX-Pre

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 17, 2011, 09:47
Default Using Perl script and power Syntax in CFX-Pre
  #1
Senior Member
 
omid
Join Date: Apr 2011
Posts: 105
Rep Power: 15
omidiut is on a distinguished road
Dear member

i am trying to simulate a moving mesh problem, and i need to have pressure on each node of moving surface. i interest to use Perl and command editor in CFX-pre in my simulation.

what is the capabilities of Perl scripts in CFX-pre?can i access to arrays of pressure matrix there?
Can i define user function by Perl scripts?


i search the forum about this but i find some example about use of Perl in CFD-Post.

Best regards.
omidiut is offline   Reply With Quote

Old   October 17, 2011, 18:32
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,868
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Perl in CFX can only write stuff to the CCL file. It does not access any variable arrays. In fact perl is only evaluated when the run starts and is not evaluated during run-time.

You need user fortran to access the variable arrays during running.

But based on your post in another thread I do not think this is what you want. Simple CEL expressions should be fine for what you are doing.
ghorrocks is offline   Reply With Quote

Old   October 18, 2011, 06:04
Default
  #3
Senior Member
 
omid
Join Date: Apr 2011
Posts: 105
Rep Power: 15
omidiut is on a distinguished road
Thanks for your kind answer ghorrocks.

about last thread (Access to array of pressure...) i use an expression like this: LogicalExp= if(x>0[m]&&x<10[m]&&z=1[m],Pressure,0)

my purpose from this expression is the pressure of specified location( 0<x<10, z=1) store in it ( Logical expression).
i tested it, but i think pressure of any node of location that i use in my relation be stored. (not in range 0<x<10 , z=1) !! Do you have any idea?

Thanks, best regards.
omidiut is offline   Reply With Quote

Old   October 18, 2011, 07:10
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,868
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
As I said, you cannot access variables using perl.

You need to use a CEL expression.
ghorrocks is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



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