CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [DesignModeler] Scripting named selections for use in downstream applications (ICEM and CFX) (https://www.cfd-online.com/Forums/ansys-meshing/204920-scripting-named-selections-use-downstream-applications-icem-cfx.html)

jgross August 4, 2018 11:53

Scripting named selections for use in downstream applications (ICEM and CFX)
 
Hi everyone,

I have a centrifugal pump fluid domain CAD geometry which I have created in FreeCAD (and so it is a STEP or IGES file). Unfortunately FreeCAD does not support the use of named surfaces, and so I need to use another application to name these faces for downstream applications.

From what I've read, https://www.cfd-online.com/Forums/an...ry-import.html, this is not possible using workbench journalling. Therefore I would like to create a script for use in DesignModeler to take in this geometry and create named face selections using some pretty easy criteria (i.e. area and/or a point on the surface).

This is will need to performed from command line. I've only managed to create a js file to import the geometry, which I can run from batch.

Code:

// start from clear scratch
ag.gui.NewFile();
ag.m.ClearAllErrors();
ag.m.NewSession (true);
ag.gui.setUnits(ag.c.UnitMeter, ag.c.UnitDegree, ag.c.No);

// import file
var imp1=ag.b.Import("/home/jg847/PhD_CAD/3D_Geometries/Impeller/Impeller.step");  // IAnsImport
imp1.Name="Impeller_Fluid";

However I don't know and can't seem to find anything detailing the commands for named selections. Does anyone know the commands for this, or can point me in the right direction?

Kind regards,
James


All times are GMT -4. The time now is 13:53.