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

automated meshing by Matlab etc.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 7, 2018, 07:35
Question automated meshing by Matlab etc.
  #1
New Member
 
Mike
Join Date: May 2018
Posts: 10
Rep Power: 8
mir9283 is on a distinguished road
Hello,

I'm currently working with a battery module that includes several cells and the casing. Therefore there are many contacts and surfaces with boundary conditions to define. To get rid of defining these things manually I have created a Matlab Skript that can do that for me.

But another big effort is the defining of the Named Selections (In my case about 157) in the Mesher before opening Fluent.

Now I'm wondering if it's possible to create a Matlab Skript (or Scheme File or something similiar) that can define my Named Selections and the meshing parameters just like I can define boundary conditions via Matlab.

As there isn't a console in the Workbench pre-processer meshing tool I do not know if there is a possibility to communicate with the mesher. Therefore I searched for alternatives and found out that the Fluent Solver itself has a console for TUI commands so communication could be possible. But I couldn't find a command to define named selections.

But even if I found the command to create the named selection I've got to know how the meshing tool is naming the cell zones and surfaces for itself. There must be some kind of method that the tool uses.

Maybe there are other Meshing Tools like HyperMesh that are compatible with Fluent and have the capability to create the meshes automatically.

I know it's a very specific topic but I hope that somebody has faced the same problems and found a neat solution, maybe different than mine.

Thanks a lot
Greets
Mike
mir9283 is offline   Reply With Quote

Old   June 26, 2018, 07:34
Default
  #2
New Member
 
Mike
Join Date: May 2018
Posts: 10
Rep Power: 8
mir9283 is on a distinguished road
Hi,

I'm doing a repost, because I found a way to script in the meshing tool.
The tools is called ACT-console (you find the button to the right of the Help button in the toolbar) and you can write your script in IronPhyton.

The following code is a example from Ansys for Creating Mesh Controls.

def CreateMeshControls(step):
model = ExtAPI.DataModel.Project.Model
mesh = model.Mesh
sizing = mesh.AddSizing()
sel = step.Properties["Sizing/Location"].Value
entity = ExtAPI.DataModel.GeoData.GeoEntityById(sel.Ids[0])
len = entity.Length
ids = []
for part in ExtAPI.DataModel.GeoData.Assemblies[0].Parts:
for body in part.Bodies:
for edge in body.Edges:
if abs(edge.Length-len)/len<1.e-6:
ids.Add(edge.Id)
sel =

ExtAPI.SelectionManager.CreateSelectionInfo(Select ionTypeEnum.GeometryEntities)
sel.Ids = ids
sizing.Location = sel
sizing.Type = SizingType.NumberOfDivisions
sizing.NumberOfDivisions = step.Properties["Sizing/Ndiv"].Value
step.Attributes.SetValue("sizing", sizing)
mesh.GenerateMesh()

I'm having problems with choosing the right faces for defining my named selections. Maybe somebodys got experience with that.

I want to catch all faces of a part in a list and then define the names with their coordinates.
By now I can gather all faces of the assembly in one Named Selection and manually split it into Named Selections for each part with the Object Generator. But even then I'm not able to choose a specific face but name.Face always retrieves the same name.

Hope someone can help me, thanks a lot.

Greets
Mike
mir9283 is offline   Reply With Quote

Reply

Tags
automated, journal, matlab, mesh


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
Meshing Process sidharth9426 STAR-CCM+ 4 September 15, 2015 04:31
[ANSYS Meshing] Meshing strategy for External Flows Hybrid ANSYS Meshing & Geometry 0 January 24, 2012 15:27
Block structured hexagonal mesh vs automated tetra mesh inside Workbench for CFD Chander CFX 3 November 27, 2011 17:24
Best Meshing scheme for Cylinder Nutrex Main CFD Forum 4 July 29, 2008 12:03
Automated Meshing Abdul Main CFD Forum 6 May 28, 2007 03:23


All times are GMT -4. The time now is 16:41.