Migrating list queries and utility functions to pyfluent (meshing mode) #1111
-
I am trying to migrate an existing meshing journal file that contains some query and utility functions. Is there a way to conveniently migrate these to PyFluent? All TUI commands seem to be available, but I wasn't able to find a way to pass scheme commands to the session. For instance I am trying to patch a list of un-referenced face zones. In a normal journal file I use something like this:
However, I don't know how I would get the list of unreferenced face zones to PyFluent: unreferenced_zones = session.meshing. ... ?
session.meshing.tui.boundary.modify.auto_patch_holes( unreferenced_zone[0], unreferenced_zone[1], ... ) Any suggestions on how I could work around this problem? Passing the scheme command as string could already work, but perhaps there is already a more elegant way to do this? In the end it comes down to being able to retrieve some properties/characteristics of the objects that are present in the Fluent session. Is there already a way to do this, or is this being considered? @seanpearsonuk. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
So I have found a workaround by pushing scheme commands directly to Fluent: # define scheme variable "zone-ids-to-patch":
session.scheme_eval.scheme_eval(
"(define zone-ids-to-patch (get-unreferenced-face-zones-of-filter '*) )"
)
# and use the ti-menu-load-string:
session.scheme_eval.scheme_eval(
'(ti-menu-load-string ( format #f "/boundary/modify/auto-patch-holes ~a" zone-ids-to-patch) )'
) The last one seems a bit silly to do though. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I agree it seems silly. I've turned it into an issue. |
Beta Was this translation helpful? Give feedback.
Yeah, I agree it seems silly. I've turned it into an issue.