Is it possible to generate automatically surface bodies on all faces of an enclosure?

Erik Kostson
Erik Kostson Member, Moderator, Employee Posts: 312
50 Answers 100 Comments Second Anniversary 25 Likes
✭✭✭✭
edited March 7 in 3D Design

Often say for an ICFD analysis in LS-Dyna one needs to generate a skin mesh on the exterior boundaries of the fluid domain, and potentially a solid mesh for any structures that might be included in this type of analysis.

One way is to generate the surface bodies on all fluid domain boundaries/faces, and mesh those with shells e.g., inside an LS-Dyna system in Workbench.

For this reason it would be of help to generate automatically surface bodies on all faces of a fluid enclosure.

Best Answer

  • Erik Kostson
    Erik Kostson Member, Moderator, Employee Posts: 312
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    edited March 7 Answer ✓

    One way of doing this is shown below (one needs to have the fluid enclosure graphically selected for the script to work):

    #select fluid enclosure graphically
    
    body = Selection.GetActive().Items[0]
    faces = body.Faces
    for face in faces:
        result = Copy.Execute(FaceSelection.Create(face))
    
    
    # Suppress/Unsuppress Physics
    simulation = Solution.Simulation.GetByLabel("Simulation 1")
    selection = BodySelection.Create(body)
    simulation.SuppressBodies(selection,True)
    # EndBlock
    
    # Share Topology
    options = ShareTopologyOptions()
    options.Tolerance = MM(0.1)
    result = ShareTopology.FindAndFix(options)
    # EndBlock
    

    Another way is to use Pull and surface coating in Mechanical.

This discussion has been closed.