Victoria Harris, Project Engineer, ATA Engineering, Inc Using the Femap API to Streamline Geometry Preparation and Meshing for the Shipbuilding Industry Femap Symposium 2014 May 14-16, Atlanta, GA, USA Unrestricted © Siemens AG 2014 FEMAP SYMPOSIUM 2014 Discover New Insights ATA Used Femap’s API to Create New Tools for Industry-Specific Workflows Our shipbuilding customers were looking to develop Femap tools that would make common shipbuilding-industry processes more efficient. Femap’s Application Program Interface (API) allows users to customize existing Femap tools for their specific needs. In collaboration with Huntington Ingalls Industries, we used the API to combine and extend existing Femap tools in new ways in order to streamline the model-building process for shipbuilders. The project was funded by NSRP. Insert Presentation Title Here (View --> Header/Footer) 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 2 Shipbuilders Were Looking to Make Geometry Preparation More Efficient Reduce the time it takes to go from this: 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com to this: 3 Efficiency Improvements in Modeling Result in Large Time Savings • The design and manufacturing of a ship requires the creation of thousands of analysis models of everything from the ship as a whole down to individual equipment racks • For each of these models, the analyst must create “meshable geometry” for the object to be analyzed, from the CAD provided by the designer • Tens of thousands of man-hours are spent creating meshable geometry models for many thousands of objects on each ship hull • Even a modest reduction in the number of hours required to create a single analysis model results in a large reduction in the total number of man-hours per hull when the individual savings are multiplied by the thousands of analysis models that are created 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 4 Typical Shipbuilding Workflow Analyst receives CAD geometry from designer Unneeded features are removed from 3D CAD (fillets, etc.) 2D Geometry is prepared for meshing (holes removed, surfaces partitioned, etc.) 2D “midsurface” model is created from 3D model Loads and boundary conditions are applied 2D Geometry is meshed Analyst delivers report 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com Model is solved and results are postprocessed API Provides Ability to Combine Existing Femap Tools in New Ways Femap Application Program Interface (API) • Can automate any manual process in Femap • Codes are written in programming languages such as Visual Basic or C++ • Can interact with other software such as Excel or Matlab This toolbox was written for Femap 10.2.1 • Toolbox needed to be accessible for multiple shipbuilders • API code is usually forward-compatible Program 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 6 Use the API Within Femap or Through Visual Studio API can be accessed as a window within Femap – great for writing programs quickly You can also write programs in Visual Studio – lots of debugging tools and easy GUI construction Insert Presentation Title Here (View --> Header/Footer) 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 7 Femap Help Has Full Documentation of Objects and Functions Insert Presentation Title Here (View --> Header/Footer) 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 8 Shipbuilding Toolbox Focused on Preparing Geometry for Analysis In the toolbox: – Mid-surface tools – – – – – – – Mold-line surfaces “Washer” boundaries Extending surfaces Surface “healing” Hole removal Defeaturing selection Snipe creation – Get nodes attached to mesh points – Add mesh to group – Orient beams to shell normals – Miscellaneous – NEI Nastran log file parsing – Gravity load combinations – Model checks – Loads/constraints on un-meshed surfaces – Sliver surfaces – List associated entities – Expanded coincident element check – Meshing 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 9 Shipbuilders Like Mold-Line Surfaces • When shipbuilders create 2D surfaces from 3D geometry, they like to use a mix of mid-surfaces and “mold-line” surfaces. • Ship models have a lot of adjacent panels with varying thicknesses. Typically the faces on one side of the panels are coplanar – this is the mold-line surface. • Using a mid-surfacing tool on these panels creates sheet bodies that are no longer coplanar. Mold-line Mid-surface 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 10 “Moldline” Combines Mid-surfacing Benefits with Mold-line Concept • Shipbuilding analysts wanted a tool that uses the mold-line instead of the mid-surface for some solids while still mid-surfacing other solids • It was also desired that the mold-line surfaces would have a thickness property assigned to them (much like a mid-surface would) • The Moldline tool uses: – Copy Surface command to grab mold-line surfaces – some vector math to get the solid thickness – the built-in Mid-Surface command for midsurfaceable solids – Group tools to collect everything in one place Insert Presentation Title Here (View --> Header/Footer) 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 11 “Problem” Surfaces Needed to Be Identified Before Meshing • The Meshing Toolbox can identify surfaces with an area smaller than the specified tolerance so that those surfaces can be suppressed before meshing • The analysts at HII reported that because of the nature of their models, they often get “sliver” surfaces that are fairly large in area, but still need to be eliminated before meshing can commence Sliver surfaces 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 12 CheckSlivers Provides Additional Methods for Finding Problem Surfaces • The CheckSlivers tool needed to have several different options for identifying and grouping surfaces • The tool uses several properties and methods associated with the point, edge, and surface objects in the API. • For example – to check the “aspect ratio” of a surface, the program collects all of the edges associated with the surface, then compares the length of each edge to all the other edges. If any ratio is greater than the user-selected tolerance, the surface is added to an output group. 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 13 Element Warnings in NEI Nastran Can Be Imported Directly • The API can be used to interact with files outside of Femap, too • Analysts wanted to quickly parse the element errors and warnings that are listed in an NEI Nastran log file • The API was used to read the entire log file into a Visual Basic program, hunt for keywords related to element issues, and put element IDs into a Femap group 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com 14 “Snipe” Is An Example of Automated Geometry Editing • It can be useful to write a program “from scratch” to address a repetitive task specific to your needs • Shipbuilding analysts frequently cut “snipe” corners into their geometry; the existing methodology involved either drawing a line on the geometry or orienting a plane to make the cut • The “Snipe” program automates the process by asking the user to define the snipe dimensions • The GUI options available in Visual Studio allow for an instructional pop-up that appears when the program runs 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com “BeamsNormaltoShells” Builds From the “Beams Normal to Surface” Example Program • The Femap installation comes with several example programs, which are useful for learning how to use the API • “BeamsNormalToShells” expands the concept of the example “Beams Normal to Surface” program • The program reads in the normals of any 2D elements attached to a beam element and aligns the cross-section with the average of the normal vectors 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com Final Thoughts About the API • The easiest way to get started is to pick a simple task and figure out the steps needed to recreate it in the API • Everything you need is in the documentation • External editors can provide extra debugging options • Once your code is up and running, ask for examples from other people to test it • Enjoy! 11995 El Camino Real, Suite 200 | San Diego, CA 92130 | T 858.480.2000 | F 858.792.8932 | www.ata-e.com
© Copyright 2026 Paperzz