existing api scripts - femap y nx nastran | lo último en ... · existing api scripts . ... who am...
Post on 03-Jul-2018
249 Views
Preview:
TRANSCRIPT
Unrestricted © Siemens AG 2013 All rights reserved.
Andy Haines – Senior Applications Engineer
Existing API Scripts
Unrestricted © Siemens AG 2013 All rights reserved.
Page 2 Siemens PLM Software
Who am I?
What you will learn
Femap capabilities
Demonstrations
Benefits of this topic
How to learn more
Agenda Existing API Scripts
Unrestricted © Siemens AG 2013 All rights reserved.
Page 3 Siemens PLM Software
Stress Linearization Tool
Why the tool was desired • ASME Code based on the observed failure of Pressure Vessels • Bending Stress less dangerous than Membrane Stress • SCL – Stress Classification Line
• Requirements – Perpendicular Inside and Out • Stress Linearization takes the component stresses along this line and
computes – • Membrane • Bending • Membrane + Bending • Peak
• Good Reference – http://www.pveng.com/FEA/FEAGeneral/NutsBoltsStress/Nuts_and_Bolts_Stress_Linearization.pdf
Unrestricted © Siemens AG 2013 All rights reserved.
Page 4 Siemens PLM Software
Stress Linearization Tool
API Features • Compiled Code with Visual
Basic Express • Needs to be installed, not
simply copied onto machine • Run from the Start Menu (All
Programs, Siemens, FEMAP Stress Linearization Tool)
• Tool appears as a “dockable pane” in the FEMAP GUI
Developed by Mark Sherman
Unrestricted © Siemens AG 2013 All rights reserved.
Page 5 Siemens PLM Software
Stress Linearization Tool
Using the API • Open model with results on solid elements first • Start FEMAP Stress Linearization Tool • Select an Output Set from drop-down • Click “Select Nodes” button to select two nodes to specify “path” of SCL • The SCL will appear on screen and persist until model is moved in any way • Examine Graph of Results (curves for Stress, Membrane Stress, Max
Membrane plus Bending, Membrane + Bending, and Bending Stress) • Depending on your needs, use “Control Options” to switch between von
Mises and Tresca Stress and optionally include “Full Component Bending” • Information and Graph are automatically posted to the clipboard for use in a
report and/or allows you to resize the graph for more detailed inspection *Tip – To redraw the SCL, simply change from von Mises to Tresca and then back (or vice versa) or toggle “Full Component Bending” on/off
Unrestricted © Siemens AG 2013 All rights reserved.
Page 6 Siemens PLM Software
Stress Linearization Tool
Unrestricted © Siemens AG 2013 All rights reserved.
Page 7 Siemens PLM Software
Stress Linearization Tool
FEMAP Stress Linearization Tool All Data Calculated as von Mises Stresses All stress tensor components used to calculate linearized bending stress.
Unrestricted © Siemens AG 2013 All rights reserved.
Page 8 Siemens PLM Software
Stress Linearization Tool
Stress Linearization between Nodes 6074 and 5859 Data from FEMAP Model - C:\FEMAP Symposium\FSLT_Example.modfem From FEMAP Output Set 4 - Titled - Step 1, Sub 4, - 1. The Linearized Membrane Stress is calculated as 302.622 The Linearized Bending Stress is calculated as 2218.85 The Linearized Maximum Combined Membrane and Bending Stress is calculated as 2323.259 The Maximum von Mises Stress along the SCL is 3069.236
Unrestricted © Siemens AG 2013 All rights reserved.
Page 9 Siemens PLM Software
Hide and Show Entities
Why the tool was desired • Users hoped FEMAP could
have a similar tool to the “Plot/Erase” command in PATRAN
API Features
• API script developed using API Programing Window
• Uses a number of different subroutines
• User-defined dialog box • Uses Multi-Group Display
Developed by Chip Fricke
Unrestricted © Siemens AG 2013 All rights reserved.
Page 10 Siemens PLM Software
Hide and Show Entities
Using the API to “Show” entities (default behavior) • Open model and run command. • Select type of entity to “Show”, optionally toggle on the “Include Related
Entities” option, then click OK. • Use standard entity selection dialog box to select entities of chosen entity
type, then click OK.
Original Model Select “Surfaces” as the Entity Type and toggle on “Include Related Entities”
Only the selected surfaces and related entities are now displayed
Tip - If command is used again to “Show”, only the entities selected in that use of the command will be shown
Unrestricted © Siemens AG 2013 All rights reserved.
Page 11 Siemens PLM Software
Hide and Show Entities
Using the API to “Hide” entities • Select type of entity, toggle on “Hide Selected Entities”, and optionally toggle
on the “Include Related Entities” option, then click OK. • Use standard entity selection dialog box to select entities of chosen entity
type, then click OK.
Original Model Select “Surfaces” as the Entity Type and toggle on “Include Related Entities”
Any entity not chosen to “Hide” will remain displayed
Tip - If command is used again to “Hide”, the entities already hidden by the command will remain hidden and the newly selected entities will then also be hidden.
Unrestricted © Siemens AG 2013 All rights reserved.
Page 12 Siemens PLM Software
Hide and Show Entities
Using the API to “Reset View (Clear Hidden and Shown Entities)” • Select “Reset View (Clear Hidden and Shown Entities)” option, then click OK
to restore the view to the “original” state before the command was used
Unrestricted © Siemens AG 2013 All rights reserved.
Page 13 Siemens PLM Software
Thicken By Data Surface
Why the tool was desired • If plate thickness needs to be varied in multiple directions, this was difficult
or simply not possible to do with “Modify, Update Other, Adjust Plate”
API Features • API script developed using API Programing Window • Allows use of any type of Data Surface, but “Along Coordinates”, “Between
Coordinates”, “Tabular Data Surface”, or “Arbitrary 3-D Data Surface” are the types which should yield the best results
• Creates all of the needed property cards to attain variable thickness
Developed by Dan Hinkle
Unrestricted © Siemens AG 2013 All rights reserved.
Page 14 Siemens PLM Software
Thicken By Data Surface
Using the API • Not required, but having all of the elements start off being a single plate
property is recommended • Run the script, select desired elements, choose a Data Surface that has
already been defined, then answer “Yes/No” to “OK to Minimize Properties (Slower)” question
4 Point Bilinear Data Surface Locations and values shown in model
Unrestricted © Siemens AG 2013 All rights reserved.
Page 15 Siemens PLM Software
Thicken By Data Surface
Model shown with Plate Thickness on and contoured using the “View, Advanced Post, Contour Model Data” command, with “Plane Element Thickness” selected
Unrestricted © Siemens AG 2013 All rights reserved.
Page 16 Siemens PLM Software
Calculate and Thicken
Why the tool was desired • If plate thickness needs to be varied to match surfaces of a solid, this was
again difficult or not possible using “Modify, Update Elements, Adjust Plate” or even “Thicken by Data Surface” API
API Features • API script developed using API Programing Window • Creates all of the needed property cards to attain variable thickness • Any number of surfaces may be selected and the script will determine the
appropriate thickness at each node using a “ray-firing” technique • Stores thickness data on a temporary Data Surface
Developed by Dan Hinkle
Unrestricted © Siemens AG 2013 All rights reserved.
Page 17 Siemens PLM Software
Calculate and Thicken
Using the API • Not required, but having all of the elements start off being a single plate
property is recommended • Position mesh in the “middle” (use “Middler” API, if needed) • Run the script, select desired elements, choose upper and lower “bounding
surfaces”, define a default minimum thickness values, then answer “Yes/No” to “OK to Minimize Properties (Slower)” question Solid Geometry of fictitious “fin” Shell mesh at “middle” of the “fin”
Unrestricted © Siemens AG 2013 All rights reserved.
Page 18 Siemens PLM Software
Calculate and Thicken
6 “Bounding Surfaces” selected on top
Shell mesh of “fin” shown with updated thickness
6 “Bounding Surfaces” selected on bottom
Unrestricted © Siemens AG 2013 All rights reserved.
Page 19 Siemens PLM Software
Copy Functions Between Models
Why the tool was desired • Sometimes you may need to copy
functions from one open model into other open models
API Features
• API script developed using API Programing Window
Using the API
• The “Source” model and all “Destination” models must be open
• Run the script, select any number of functions, then any number of “Destination” models.
Developed by Patrick Kriengsiri
Unrestricted © Siemens AG 2013 All rights reserved.
Page 20 Siemens PLM Software
Embed Multiple Faces
Why the tool was desired • “Geometry, Curve – From Surface…” tools such as “Pad” and “Washer” are
useful when trying to create a mapped mesh on surfaces…embedding those surfaces may also be useful for creating a mapped hex mesh
API Features
• API script developed using API Programing Window
Using the API • Surfaces should be subdivided before using this tool • Run the script, then select only the surfaces to embed using the standard
entity selection dialog box
Developed by Andrew Jabola, Saratech
Unrestricted © Siemens AG 2013 All rights reserved.
Page 21 Siemens PLM Software
Embed Multiple Faces
Original Geometry – All One Part Surfaces selected for embed operation After command, multiple solids are now ready for sizing and hex meshing
Unrestricted © Siemens AG 2013 All rights reserved.
Page 22 Siemens PLM Software
Selective Display of Node IDs
Why the tool was desired • Users wanted to show all the
nodes, but only have the IDs shown for selected nodes
API Features • Uses Text objects to create the
temporary Node labels • Could be modified to do the
same for other entity types
Developed by Andrew Jabola, Saratech
Unrestricted © Siemens AG 2013 All rights reserved.
Page 23 Siemens PLM Software
Selective Display of Node IDs
Using the API • Run the script to open the “Select Node ID Manager” dialog box • Optionally, click “Specify Color” to select a color for the labels from the
FEMAP Color Palette • Click “Select Nodes” to use the standard entity selection dialog box to select
the nodes • When done with the temporary labels, use the command again and click
“Clear Node IDs”
Unrestricted © Siemens AG 2013 All rights reserved.
Page 24 Siemens PLM Software
Create Multiple Load Sets from Multiple CSV files
Why the tool was desired • User had over 100 comma-separated value files created by MATLAB
containing nodal IDs and load values, each of which needed to be imported into FEMAP to create an individual load set.
API Features
• API script developed using API Programing Window • Cycles through all files in a selected directory • Load Set Titles match CSV file names
Using the API
• Place all CSV files in a single directory • Run script, then select any CSV file in directory to set directory path
Developed by Dan Hinkle and Andy Haines
Unrestricted © Siemens AG 2013 All rights reserved.
Page 25 Siemens PLM Software
Create Multiple Load Sets from Multiple CSV files
Values from Load Set 1
Values from Load Set 4
Unrestricted © Siemens AG 2013 All rights reserved.
Page 26 Siemens PLM Software
AutoBoltMaker
Why the tool was desired • Using “Custom Tools, Meshing, Hole-to-Hole Fastener” for multiple holes
can be quite time consuming.
API Features • API script developed using API Programing Window
Using the API
• Surfaces need to be meshed before using this tool • Run the script and answer question to enter a radius for the “bolt” or to
select an existing beam property (used for every fastener created during each use of the command)
• Select any number of Curves using the Standard Entity Selection dialog box for Curves (will not use anything other than circular arcs)
Developed by Andy Haines
Unrestricted © Siemens AG 2013 All rights reserved.
Page 27 Siemens PLM Software
AutoBoltMaker
Select any number of curves In this area of the model
Only curves which make up a pair of circular loops will be selected
Rigid Spiders and a beam element using the selected property or entered radius will be created
A variation of this command is also available which allows selection of a CBUSH Property with a reference coordinate system, then creates 2 rigid spiders and a coincident node CBUSH element equidistant from the independent node of each newly created RBE2
Unrestricted © Siemens AG 2013 All rights reserved.
Page 28 Siemens PLM Software
Coincident Node CBUSH Coordinate System Display
Why the tool was desired • For coincident node CBUSH elements, a Reference Coordinate System
must be set on the property. This script displays the coordinate system directions at each CBUSH location.
API Features
• Code has checking to make sure only Spring/Damper Elements which reference a “CBUSH” property AND have a “Ref CSys” defined are used
• Appearance of arrows on triads (Line or Solid) is based on Color Mode for Coordinate Systems in View Options.
Using the API to “Show” the triads • Run the script and examine triads for each CBUSH • Different colors used for triads representing rectangular and spherical
Developed by Andy Haines
Unrestricted © Siemens AG 2013 All rights reserved.
Page 29 Siemens PLM Software
Coincident Node CBUSH Coordinate System Display
Using different API to “Remove” the triads • Use “Custom Tools, Model Query, CBUSH CSys Display Reset” command
to remove the triads Rectangular CSys shown in X Direction = Red, Y Direction = Green, Z Direction = Blue
Spherical CSys shown in Radial Direction = Yellow Theta Direction = Orange, Phi Direction = Cyan
Unrestricted © Siemens AG 2013 All rights reserved.
Page 30 Siemens PLM Software
Laminate Next Ply and Laminate Prev Ply - Improved
Why the tool was desired • Users want to be able to look at the same output vector on either the Next
or Previous ply in a model without have to select it from the Select PostProcessing Data dialog box…also works when looking at Global Plies
API Features
• Simply adds or subtracts 200 to the current output vector, which signifies it is on the next or previous ply
• Similar to one shipped with FEMAP and can be found in “Custom Tools, PostProcessing…”, but this one also does Global Plies
Using the API • Recommend creating icons on a toolbar to aid is use • Click appropriate icon to go to next or previous ply
Developed by Mark Sherman, altered by Andy Haines
Unrestricted © Siemens AG 2013 All rights reserved.
Page 31 Siemens PLM Software
Linear Combination using Base Output Set
Why the tool was desired • User had many output sets, wanted to be able to choose 1 set as the “base”
set, then linearly combine the “base” set with any number of other selected output sets, one at a time
API Features
• Creates multiple output sets (“Base” set + 1 “Other” set) using the feOutputProcessLinearCombination call, one of several that now exist which make it easier to use the functionality of “Model, Output, Process”
Using the API • Model needs multiple output sets • Run script, select “Base” set, then select any number of other output sets
Developed by Andy Haines
Unrestricted © Siemens AG 2013 All rights reserved.
Page 32 Siemens PLM Software
Group from Freebody
Why the tool was desired • User wanted to create groups based on the elements of a “Freebody” or the
nodes and elements of an “Interface Load”
API Features • Represents use of the Freebody Object
Using the API
• Run script, select a Freebody or Interface Load and a group will be created automatically.
• Alternate version of this script, “Groups from All Freebodies”, creates a individual group for each Freebody entity in a model
Developed by Andy Haines
Unrestricted © Siemens AG 2013 All rights reserved.
Page 33 Siemens PLM Software
Standard Analysis (Statics or Modes)
Why the tool was desired • Model is ready to be analyzed and you want to launch a Nastran job using a
single command without seeing a single dialog box
API Features • API script developed using API Programing Window • Shipped with FEMAP and can be accessed via Custom Tools toolbar • Good example of how to use the API to create and modify the Analysis Set
Manager • Slight modifications can be made to run your “standard” analysis
Using the API • Model has everything needed for a “standard” static or modal analysis run • Choose “Custom Tools, Standard Analysis…” command
Developed by Andy Haines
top related