CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Create variable to read in a journal (https://www.cfd-online.com/Forums/fluent/247683-create-variable-read-journal.html)

alexvaleije February 17, 2023 06:05

Create variable to read in a journal
 
Hi everyone,

I'm trying to create a journal to mesh recursively some different geometries with the same parameters, but I'm not being able to do so. My code is the following:

Code:

(Do ((x 1 (+ x 1))) ((> x 5))
        (%py-exec "workflow.InitializeWorkflow(WorkflowType=r'Watertight Geometry')")
        (%py-exec "meshing.GlobalSettings.LengthUnit.setState(r'mm')")
        (%py-exec "meshing.GlobalSettings.AreaUnit.setState(r'mm^2')")
        (%py-exec "meshing.GlobalSettings.VolumeUnit.setState(r'mm^3')")
        ;Read the geometry
        ;(%py-exec "workflow.TaskObject['Import Geometry'].Arguments.setState({r'FileName': r'/folder1/folder2/queue_test/designX.pmdb',})")
        (%py-exec "workflow.TaskObject['Import Geometry'].Execute()")
        ;Start doing operations
      ;Not relevant code for this
        ;Save mesh
        ;(cx-gui-do cx-activate-item "MenuBar*WriteSubMenu*Mesh...")
        ;(cx-gui-do cx-set-file-dialog-entries "Select File" '( "designX.msh.h5" s1) "CFF Mesh Files (*.msh.h5 )")
)

(cx-gui-do cx-activate-item "MenuBar*WriteSubMenu*Stop Journal")

I want that the name "designX" changes recursively with every loop, but I have tried some many different ways, without any positive result.

Has anyone done this before?
Regards,


All times are GMT -4. The time now is 00:12.