-
-
September 16, 2023 at 2:51 pm
Michael Connolly
SubscriberHi All,
Is there a simple few commands to use to generate a surface mesh that is identical to that that would be created using the fluent meshing workflow button "generate the surface mesh"?
I would ideally like to use the GUI version of fluent meshing on my desktop to import the cad from Spaceclaim, and also complete the local sizings. Once done I would want to export the mesh, then reimport it on a HPC and execute the commands to generate the surface mesh and volume mesh.
Kind regards,
Michael.
-
September 19, 2023 at 8:38 am
Lars Goellnitz
SubscriberHi Michael,
I think the easiest way to achieve that, is to record a journal while you're clicking through the workflow on your Windows machine. Your starting point can be the reading of the mesh file with the already imported geometry. In the journal file you will find all your setting within Python commands.
If you want to start from the CAD import, please kind in mind that SpaceClaim (.scdoc) is not supported in Linux. You have to start from a pmdb, which can be created in SpaceClaim or you get after the import of the .scdoc on your Windows machine.Thanks,
Lars -
September 19, 2023 at 3:15 pm
Michael Connolly
SubscriberHi Lars,
Yes I already know the commands for importing that CAD and setting the local sizings. What I need to know is the TUI commands used to replicate the "Generate the Surface Mesh" button in the GUI.
Kind regards,
Michael.
-
September 20, 2023 at 6:59 am
Lars Goellnitz
SubscriberHi Michael,
the journal I wrote while running the watertight setting, looks like this (until the point of creating the surface mesh):
/file/set-tui-version "23.2"
;;; Selecting watertight workflow
(%py-exec "workflow.InitializeWorkflow(WorkflowType=r'Watertight Geometry')")
;;; Import a pmdb file
(%py-exec "meshing.GlobalSettings.LengthUnit.set_state(r'mm')")
(%py-exec "meshing.GlobalSettings.AreaUnit.set_state(r'mm^2')")
(%py-exec "meshing.GlobalSettings.VolumeUnit.set_state(r'mm^3')")
(%py-exec "workflow.TaskObject['Import Geometry'].Arguments.set_state({r'FileName': r'D:/3-ServiceRequest/Testgeometrie/Cylinder.pmdb',})")
(%py-exec "workflow.TaskObject['Import Geometry'].Execute()")
(newline)
;;; No addition of Local Sizes
(%py-exec "workflow.TaskObject['Add Local Sizing'].AddChildAndUpdate()")
;;; Run Generate the Surface Mesh with min=0.1, max=1.6, Cells per Gap=2
(%py-exec "workflow.TaskObject['Generate the Surface Mesh'].Arguments.set_state({r'CFDSurfaceMeshControls': {r'CellsPerGap': 2,r'MaxSize': 1.6,r'MinSize': 0.1,},})")
(%py-exec "workflow.TaskObject['Generate the Surface Mesh'].Execute()")
(%py-exec "workflow.TaskObject['Describe Geometry'].UpdateChildTasks(SetupTypeChanged=False)")I added some comments afterwards to understand the action of the python script better. For all the python commands there are more option available.
How your commands look like?
In addition I know that there are TUI commands to generate a surface mesh (let me call it the old style) but the watertight workflow uses Python instead of the TUI commands. Sometimes a python command calls a series of action that is nearly impossible to reproduce with TUI commands.
Thanks,
Lars
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
-
7552
-
4424
-
2947
-
1414
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.