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

CEL in CFD-Post - Combining Parameter with String

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2017, 13:21
Default CEL in CFD-Post - Combining Parameter with String
  #1
New Member
 
Join Date: Jul 2016
Posts: 7
Rep Power: 10
Dog92 is on a distinguished road
Hello,

i am new in writing Macros for CFD-Post that's why I have some problems.
My problem is that I want to combine a Paramter with a String.

Thats my Code:

# Macro GUI begin
#
# macro name = TestMakro
# macro subroutine = mySub
#
# macro parameter = Version-Number
# type = integer
#
# macro parameter = VelAngle
# type = float
#
# Macro GUI end

! no warnings 'redefine';

! sub mySub {
! ($datanr, $angle) = @_;

>load filename=/home/XXX/YYY/CFD/$datanr/'$datanr'Version-transient.dat, force_reload=\
true


For example my file-name is 83Version-transient.dat and i want to load this result file with this macro. How can I achieve that ? The '83' will be declared as a parameter and i want to use it.
What i get is '83'Version-transient.dat with the code above and that can't be loaded.
Thanks
Dog92 is offline   Reply With Quote

Old   July 18, 2017, 15:00
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
try adding a variable for the filename location, say

! myfile = /home/XXX....
> load filename = myfile , ....

Then, it is all about Perl string concatenation rules.
Opaque is offline   Reply With Quote

Old   July 21, 2017, 09:54
Default
  #3
New Member
 
Join Date: Jul 2016
Posts: 7
Rep Power: 10
Dog92 is on a distinguished road
Sorry for the late reply. It worked. Thank you.
Dog92 is offline   Reply With Quote

Reply

Tags
cel, cfd-post, parameter, string


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
On the CFD market and trends sbaffini Main CFD Forum 14 June 13, 2017 12:48
Post-processing star ccm+ results in Ansys CFD Post sidharath STAR-CCM+ 4 April 10, 2017 12:49
calculating output parameter in cfd post markus67 CFX 3 August 26, 2015 10:28
CFD Post crashed davidwilcox FLUENT 1 February 23, 2013 01:41
Automated post processing using CFD Post shreyasr ANSYS 0 January 28, 2013 07:21


All times are GMT -4. The time now is 17:26.