CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

get-surface in string list

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2018, 05:33
Default get-surface in string list
  #1
New Member
 
DS
Join Date: May 2016
Posts: 28
Rep Power: 10
denis.sanga@hotmail.it is on a distinguished road
Goodmorning,
I need to save in a string-list the name and id of all surfaces created in fluent.
I did the same with the threads and works as written in the following code, but I don't know how to do the same with the surfaces. I tried with (get-surfaces) but without success. I would ask if someone know how to do that.

HTML Code:
(rp-var-define 'a () 'string-list #f)
(rpsetvar 'a ())
(for-each (lambda (t) (rpsetvar 'a (list-add
(rpgetvar 'a) (thread-name t))))
(get-all-threads))
(rpgetvar 'a)
thank you really much
Best regards
Denis
denis.sanga@hotmail.it is offline   Reply With Quote

Old   May 24, 2018, 05:57
Default
  #2
Senior Member
 
Join Date: Sep 2017
Posts: 246
Rep Power: 12
obscureed is on a distinguished road
Hi Denis,


I think the Scheme command that you want is
Code:
(map symbol->string (inquire-surface-names))


The reason I recommend the (map symbol->string ...) wrapper is that some commands like this return a list of objects/symbols, rather than a list of strings. This can make a big difference -- namely, if you type one of these commands into the Fluent command window, Fluent attempts to display the results, and this can crash the session fatally if the objects are not easy to display. So, save your case before you experiment!


Good luck!
Ed

obscureed is offline   Reply With Quote

Old   May 24, 2018, 06:35
Default
  #3
New Member
 
DS
Join Date: May 2016
Posts: 28
Rep Power: 10
denis.sanga@hotmail.it is on a distinguished road
Quote:
Originally Posted by obscureed View Post
Hi Denis,


I think the Scheme command that you want is
Code:
(map symbol->string (inquire-surface-names))


The reason I recommend the (map symbol->string ...) wrapper is that some commands like this return a list of objects/symbols, rather than a list of strings. This can make a big difference -- namely, if you type one of these commands into the Fluent command window, Fluent attempts to display the results, and this can crash the session fatally if the objects are not easy to display. So, save your case before you experiment!


Good luck!
Ed
Thank you really really much...your suggestion is very usefull and now works correctly.
Thank you
Best Regards
Denis
denis.sanga@hotmail.it is offline   Reply With Quote

Reply

Tags
get-surfaces list 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
SU2 cfg file and runtime problems hedley SU2 19 January 26, 2016 05:17
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible velan OpenFOAM Meshing & Mesh Conversion 3 October 22, 2015 12:05
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 16:03
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 13:43


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