Femap_Training_Lesson 14 - Finite Element Model Debugging

合集下载

Femap_Training_Lesson 09- The Meshing Toolbox

Femap_Training_Lesson 09- The Meshing Toolbox

CT 1690 – Student Guide for Femap 101 - v10.2
9-5
Lesson 9
The Meshing Toolbox
Feature Suppression
Feature Suppression controls allow you to interactively suppress or remove suppression of: • Loops – select one edge on an feature to automatically suppress the entire set of curves and surfaces comprising the feature Curves – select curve(s) to be suppressed. Should not be used on solids. Surfaces – select surface(s) to be suppressed. Should not be used on surfaces.
CT 1690 – Student Guide for Femap 101 - v10.2 9-6
Lesson 9
The Meshing Toolbox
Feature Removal
Feature Removal differs from Feature Suppression in that the underlying solid or surface geometry is modified. • • • Loops – includes an option to set the Limit Size for selecting loops. Curves – includes an option to set the Limit Size for selecting loops. Also includes an option for Aggressive Removal Surfaces - when a single surface on a solid is selected, Femap will attempt to clean up the solid to result in a “clean” solid. In some cases, no operation will be performed and in others, other adjacent surfaces will be removed. There is also an option for Aggressive Removal.

Femap入门教程

Femap入门教程

分析步骤
建立几何模型、定义材料属性、 施加边界条件和载荷、定义动态 分析参数、划分网格、求解和后 处理。
注意事项
选择合适的动态分析类型、考虑 阻尼和惯性效应、正确施加动态 载荷和边界条件、关注结构的频 率响应和模态分析结果。
热传导问题求解案例
1 2
案例介绍 热传导问题涉及热量的传递和分布,需要考虑结 构的热传导性能和对流换热等因素。
脚本编程 除了API接口外,Femap还支持脚本编程,用户可以使用 Python等脚本语言编写自动化脚本,实现批量操作和自 定义分析流程。
07
Femap实战案例 解析
简单结构静力学分析案例
案例介绍
简单结构静力学分析是Femap的基础应用之一,通过对结构施加 静力载荷,求解结构的位移、应力和应变等响应。
Femap可实现结构、热和流体 等多物理场的耦合分析,以更
全面地评估工程问题。
Femap界面及基本操作
用户界面
Femap采用直观的图形用户界面,提供丰富的功能和工具,方便用 户进行建模、分析和后处理等操作。
基本操作
Femap的基本操作包括创建几何模型、定义材料属性、施加边界条 件和载荷、进行网格划分、求解分析和查看结果等。
求解结构在动力荷载作用下的响 应,如固有频率、振型等。
流体分析
求解流体在管道或容器中的流动 状态,如速度、压力等。
网格划分与质量控制
网格类型
根据分析需求选择合适的网格类型,如一维、 二维或三维网格。
网格质量检查
检查网格质量,避免出现畸形网格,确保计 算准确性。
网格密度
合理设置网格密度,以保证计算精度和效率。
材料属性赋值
在定义好材料属性后,用 户可以通过选择相应的几 何实体为其赋值。

机器学习讲义14

机器学习讲义14

RBF Network: distance similarity-to-centers as feature transform
Radial Basis Function Network
RBF Network Hypothesis
Fun Time
Which of the following is not a radial basis function? 1 φ(x, µ) = exp(−γ x − µ 2) 2 φ(x, µ) = − xT x − 2xT µ + µT µ 3 φ(x, µ) = x = µ 4 φ(x, µ) = xT x + µT µ
Machine Learning Techniques (機器學習技法)
Radial Basis Function Network
Roadmap
1 Embedding Numerous Features: Kernel Models 2 Combining Predictive Features: Aggregation Models 3 Distilling Implicit Features: Extraction Models
Interpolation by Full RBF Network
full RBF Network for squared error regression:
N
h(x) = XOuXtpXu Xt
βmRBF(x, xm)
m=1
• just linear regression on RBF-transformed data
Radial Basis Function Network
RBF Network Learning

FEMAP培训教程1

FEMAP培训教程1
15
有限元预备知识
(3)弹性极限:材料在外力作用下将产生变形,但是去除外力后仍能恢复原 状的能力称为弹性。金属材料能保持弹性变形的最大应力即为弹性极限,相应 于拉伸试验曲线图中的e点,以σe表示,单位为兆帕(MPa):σe=Pe/Fo 式中 Pe为保持弹性时的最大外力 。 (4)弹性模数:这是材料在弹性极限范围内的应力σ与应变δ(与应力相对应 的单位变形量)之比,用E表示,单位兆帕(MPa):E=σ/δ=tgα 式中α为拉伸 试验曲线上o-e线与水平轴o-x的夹角。反映金属材料刚性的指标。 (5)疲劳强度极限:金属材料在长期的反复应力作用或交变应力作用下(应 力一般均小于屈服极限强度σs),未经显著变形就发生断裂的现象称为疲劳 破坏或疲劳断裂,这是由于多种原因使得零件表面的局部造成大于σs甚至大 于σb的应力(应力集中),使该局部发生塑性变形或微裂纹,随着反复交变 应力作用次数的增加,使裂纹逐渐扩展加深(裂纹尖端处应力集中)导致该局 部处承受应力的实际截面积减小,直至局部应力大于σb而产生断裂。
解析解:δ= PL3/3EI
7
什么是有限元分析?
离 散 化
8
什么是有限元分析?
理论解析方法提供了固体、流体、热、电磁领域的完美求解方 程和边界条件,可对于复杂形体的不能得到解析解。 复杂形体是简单形体堆积的结果,简单的形体总是可以得到解 析结果,比如方块或四面体。 有限元方法就是把复杂形体用大量简单形体堆积,先处理简单 的形体,再推演处理复杂的形体,使得复杂问题简单化。 这每一个简单形体称为一个单元,单元越小,堆积出来的形状 越接近于真实实体。 有限元方法解决问题时首先将复杂的形体划分为网格,每个网 格就是一个单元,网格划分的越细,计算越精确。
有限元分析与 FEMAP

Femap技巧

Femap技巧

Femap 技巧“后处理工具箱”是 FEMAP 10.2 的新增功能。

它在界面中提供一个固定位置,可在其中对分析结果进行后处理。

使用“视图>高级后处理>梁横截面”命令可直接在梁/棒单元的横截面上查看根据单元力计算的应力结果。

“模型>输出>强迫响应”命令可供您通过使用模态分析和其他指定输入的现有结果,在 FEMAP 内创建频率响应输出。

“特征编辑”、“几何体编辑”以及“网格曲面”工具已添加到网格划分工具箱中。

关于各工具的更多信息,请参见《命令》手册中的“网格划分工具箱”部分。

在网格划分工具箱内的“实体定位器”中,现在提供基于指定准则来定位单元的选项。

“连接”选项卡已添加到“可见性”对话框(“视图>可见性”命令或Ctrl+Q),可控制“区域”和“连接器”的可见性。

“坐标系”选项卡已添加到“可见性”对话框(“视图>可见性”命令或Ctrl+Q),可控制“坐标系”的可见性。

“坐标系”、“区域”和“连接器”的可见性复选框已添加到模型信息树中。

- 选项 - 工具和视图样式 - 模型剪切平面”可为该模型定义一个模型剪切平面。

不论位于该平面的正面还是负面,使用“视图模型中的所有实体都将被剪切。

通过“视图”工具条上“视图样式”图标菜单的“剪切平面”部分,可以控制模型剪切平面。

当“模型剪切平面”处于活动状态时,可按下 Ctrl 键并向上或向下转动鼠标滚轮来使该平面沿着垂直于已定义平面的矢量动态移动。

使用“视图 - 选项 - 标签、实体及颜色 - 曲线/曲面方向”可打开曲线和/或曲面的参数方向。

现在,更改“连接>自动”命令的“查找”选项即可自动定义边到面接触。

还可以通过“曲线”或“节点”定义“连接区域”并将“输出”设置为“节点”,从而以手动方式创建“边”连接区域。

使用“刚性单元”对话框中的合适选项卡可创建 RBE1、RBE2 或 RBE3 单元。

在“工具>检查>单元品质”下,“显式时间步”现已可用。

_ANSYS_Workbench_15.0_有限元分析培训(第二讲)

_ANSYS_Workbench_15.0_有限元分析培训(第二讲)

B
偏微分方程法
1974年,J. F. Thompson 椭圆型方程
Laplace
网格线光滑 可以处理复杂的边界线
Poisson
控制正交性
Thomas & Middlecoff
基本几何形状的网格画法
优化网格质量:
少+饱满
钱币原理
面网格到体网格的几种生成方法
ANSYS Workbench 培训
1.协同访真、项目管理
集设计、仿真、优化、网格变形等功能于—体,对各种数据进行项目协同管理。
2.双向的参数传输功能
支持加与眺间的双向参数传翰功能。
3.高级的袭配部件处理工具
具有复杂装配件接触关系的自动识别触建模功能。
4.先进的网格处理功能
可对复杂的几何模型进行高质量的网格处理。
5.分析功能
支持几乎所有州sYs的有限元分析功能,
空间离散化: 划分网格
非结构化网格
自动化程度高,能应对复杂的几何体
数据结构简单 结构化网格 精度高,计算速度快
结构化网格可以用一套固定的方式命名,例如左图中的红色节点可以命名为i5j4, 非结构网格的节点则不能用一套固定的法则予以有序的命名。
A
映射法
体映射

保角映射法
要求多边形有相同的顶点数。可被映射法替代。 应用较少,因为其单元形状和网格深度目前难以控制。
推荐切割工具:SpaceClaim,SolidWorks
单体零件与多体零件
单体零件的装配模型中,零件实体间接触连 接,每一个实体都独立地划分网格,节点不 共享。
多体零件的装配模 型中,零件实体间无接 触,1个零件可以有多 种材料实体,每个实体 独立划分网格但实体间 的关联被保留。 生成多体零件

2024版FEMAP培训教程1

2024版FEMAP培训教程1
可设置多个载荷步,模拟不同时间 或不同工况下的载荷变化情况,以 便更全面地了解结构的响应特性。
03
网格划分与优化策略
网格划分原则及技巧分享
遵循几何特征
根据模型的几何形状、尺寸和特 征进行网格划分,确保网格能够
准确反映模型的细节。
均匀性原则
尽量保持网格的均匀性,避免出 现过大或过小的网格,以提高计 算精度和稳定性。
问题解答和互动交流环节
针对学员在练习过程 中遇到的问题,进行 解答和指导。
通过讨论和互动,加 深对有限元分析方法 和应用的理解。
鼓励学员之间的互动 交流,分享各自的经 验和心得。
THANKS
感谢观看
FEMAP培训教程1
目录
• FEMAP软件简介与安装 • 模型建立基础 • 网格划分与优化策略 • 求解器设置与运算过程监控 • 后处理功能深入挖掘 • 实际应用案例分析与讨论
01
FEMAP软件简介与安装
FEMAP软件概述
FEMAP是一款广泛应用于有限元分析的软件,具有强大的前处理和后处理功能。
支持多种CAD软件格式(如 SolidWorks、CATIA、AutoCAD等) 的导入,实现与外部CAD软件的无缝 对接。
材料属性设置与分配
01
02
03
材料库管理
内置丰富的材料库,用户 可自定义材料属性并添加 到材料库中,方便后续调 用。
材料属性分配
将材料属性分配给几何模 型中的各个部分,确保分 析结果的准确性。
进度条
部分软件提供进度条果文件类型
01
了解并掌握各种结果文件的输出方式和查看方法,如文本文件、
二进制文件等。
后处理软件
02
利用后处理软件查看和分析结果文件,如云图、等值线图等。

Femap中文学习全面

Femap中文学习全面

结果数据提取、处理及
数据提取
从分析结果中提取关键数据,如最大应力、最大位移等,以便进 一步分析和评估。
数据处理
对数据进行整理、筛选和统计分析,以支持决策制定和报告编制。
数据输出
将处理后的数据以图表、表格等形式输出,便于报告编制和交流沟 通。
结构优化建议提供
设计优化建议
根据分析结果,提出针对性的设计优化建议,如改进材料选择、调 整截面尺寸等,以提高结构的性能。
制造工艺改进建议
针对制造过程中可能出现的问题,提出改进建议,如优化焊接工艺、 提高加工精度等。
后期维护建议
根据结构在使用过程中可能出现的问题,提出相应的维护建议,如定 期检查、加固措施等。
06
高级应用:疲劳分析、非线性 分析等
Chapter
疲劳分析方法介绍及实例演示
疲劳分析基本概念
阐述疲劳破坏机理、疲劳寿命预测等基础知识。
02
施加载荷
根据分析需求,在模型上施加相应的载荷,如力、压力、温度等。
03
考虑载荷的施加方式和时间历程
对于动态分析等问题,需要考虑载荷的施加方式和时间历程。
运行分析并监控求解过程
运行求解器进行分析
选择合适的求解器类型后,运行求解器进行分析。
监控求解过程
在求解过程中,可以通过查看求解器的输出信息来监控求解过程, 确保分析的正确性。
通过去除重复面、删除小孔、简化细 节等操作,降低模型复杂度,提高计 算效率。
模型修复功能
对于导入的几何模型,Femap提供了 一系列修复工具,如缝合、填充、偏 移等,以处理模型中的错误和缺陷。
网格划分策略与技巧
01
02
03
自动网格划分

Femap实例-中面建模及多载荷集分析

Femap实例-中面建模及多载荷集分析

IntroductionIn this exercise, you will generate a midsurface model of a machined bracket. The steps to complete this exercise are:•Import geometry•Generate and edit midsurfaces•Assign mesh attributes, set mesh sizing and mesh the bracket•Create constraints and loads, including combined load sets•Analyse the bracket using a Multi-set analysis and view the stress results.Step 1:Import geometryImport the Parasolid geometry of the multi-thickness solid model.•Open a new FEMAP model.•Select the File, Import, Geometry command.•Select the Parasolid file ex13-Bracket_inches.x_t from your class Geometry folder.•Click OK to accept the defaults in the Solid Model Read Options dialog box.Change the view orientation to the Trimetric view.•Press the F8key (or use the View, Rotate, Model command) to open the View Rotate dialog box.•Select the Isometric button.•Click OK to close the dialog box.Save the model•Save the model in your class Exercises folder as “ex13-Bracket.modfem”.Step 2:Create midsurfacesExtract the midsurfaces from the solid.•Select the Geometry, Midsurface, Automaticcommand.•Click the Select All button to select all the surfaces on the solid.•In the Mid-Surface Tolerance dialog box, click the Measure Distance icon to enable measuring a 3-Ddistance. Ctrl+D can also be used to measure adistance from the graphics window while in acommand.•When the Locate –Define Location to Measure From dialog box is displayed, select one of the points onthe thickest edge of the sold. Set the Method to OnPoint and select one of the points shown below.•Click OK to confirm the selection of the first point.•Select the “other” point shown below that has not been chosen, then click OK to confirm the selection.•Click OK to accept the calculated distance, .156 in the Mid-Surface Tolerance dialog box. FEMAP willnow extract the mid-surfaces.Display the automatically generated Midsurfaces group.•In the Model Info pane, turn on “highlighting” by clicking the Show When Selected icon.•Expand the Group object in the tree and select1..Midsurfaces in the Model Info pane. This willhighlight the newly created group. Since we are onlyworking with a single part, you can delete the groupand the original solid.•Right-click 1..Midsurfaces and select Delete from the context-sensitive menu.•Expand the Geometry object in the Model Info tree, select 1..ex12-Bracket, and using the context-sensitive menu, Delete the original solid part.•Expand the view if needed with the Ctrl+A hotkey to “Autoscale”Note that the midsurfacing operation has generatedsplit lines in the midsurfaces that will be easily beremoved in the next step.Remove the split lines from the surfaces.•Select the command, Geometry, Solid, Cleanup.•Select All surfaces and click OK.•In the Solid Cleanup dialog box, accept the default option to Remove Redundant Surfaces and click OKto proceed with remove the split lines in the surfaces.Extend the surface representing the bend of the rib.•Switch your view orientation to the Front view.•Note that the bottom edge of bend surface doesnot intersect the surface representing the flange.•Select the command, Geometry, Midsurface, Extend.•Select the bottom edge of the bend surface in the Select Entity dialog box.Complete extending the surface representing the bend of the rib.•In the Surface Extend Options dialog box, leave the option for Extend Shape as Linear.•Using the Extend To –Solid option, select the Solid that represents the flange and click OK.Note that the blend surface now extends to theintersection with the flange.Trim the two surfaces representing the flat sections of the rib.You will use two different Geometry, Midsurfacecommands to do this, the first is to use the Trim with Curve operation and the second is use the Intersect operation.•Select the command, Geometry, Midsurface, Trim with Curve.•Select the flat surface of the rib closest to the back surface (the surface with the four mounting holes) inthe Solid/Surface to Trim dialog box and the clickOK.•In the Entity Select ion –Select Line(s) to Trim With dialog box, select the top edge of the rib and theedge of the blend surface intersecting the flat ribsection and click OK to confirm your selection.•With highlighting enabled in the Model Info pane, select the sheet solid of the rib section you justmodified and note how it has been sliced into threesurfaces.Continue with trimming the two surfaces representing the flat sections of the rib.•Select the command, Geometry, Midsurface, Intersect.•Select the two (2) surfaces that will represent the blend and the end of the rib then click OK togenerate the intersection.Delete the extraneous surfaces.•Select the command Delete, Geometry, Surfaces.•Select the small tab on the longer flat section of the rib and the two surfaces on the flat rib sections thatextend beyond the blend of the rib. Click OK todelete the surfaces.Stitch the surfaces together to create contiguous sheet solids.•Select the command Geometry, Solid, Stitch.•Select all the surfaces and click OK.•Click OK to accept the default Gap Tolerance.•Note how there are now three sheet solidsrepresenting the back face, web, and rib of thebracket.Intersect the surfaces to imprint the surfaces at the intersection of the three main features of the bracket.•Select the command Geometry, Midsurfaces, Intersect.•Select all the surfaces and click OK.•Again, using the Model Info pane, click the three sheet solids under the Geometry tree and note howthe surfaces have been imprinted using theintersection operation.Create Offset Curves around the six holes on thebracket.•If not displayed, active the Curves on Surfaces toolbar.•Click the Curve Washer icon on the Curves on Surfaces toolbar.•In the Define Washer or Offset Curves dialog box,set the Mode to Washer , enable the option for Save Split Lines and set the Offset to .125. Click OK to accept the settings.•Select one of the arcs on each of the six holes on thebracket and click OK .•Cancel out of the Curve Washer command.•After completing the Curve Washer operation, your model should appear as follows (shown with multiple windows to more clearly display the washers).Step 3:Assign mesh attributes, set mesh sizing and mesh the bracketAssign the mesh attributes (property) to themidsurfaces.•Select the Geometry, Midsurface, Assign Mesh Attributes command.•Press Select All the surfaces and click OK.•The Define Material –ISOTROPIC dialog box will open, prompting you for a material. Click the Loadbutton to open up the default material library.•In the Select from Library dialog box, select one of the Stainless Steel materials and click OK.•Click OK.•In the dialog box, click Yes to consolidate the properties by thickness.•Note that there are now two (2) properties that reflect the two different wall thicknesses of the part.Set the mesh size for the mid-surfaces.•Using the Select toolbar, set the Selector Entity to Surface and Selector Mode to Select Multiple .•Select all the surfaces by holding down the Shift keyto create a box picking region around the entire model.•In the graphics pane, right-click your mouse andselect Mesh Size from the context-sensitive menu.•In the Automatic Mesh Sizing dialog box, set the Element Size to .2 set the Max Angle Tolerance to15. Disable the Max Elem on Small Feature optionthen click OK to set the mesh size.Set the mesh size for the curves around the holes•Before meshing, turn on the mesh size indicators using the F6hotkey to open the View Options dialog box.•In the View Options dialog box, set the Category to Labels ,Entities and Color, enable the Draw Entityoption and set Show As to 3..Symbols and Count.Click Apply to update the display and once theoptions are displayed as below, you can close thedialog box by clicking either the OK or Cancelbutton.Set mesh sizes for the holes.•Using the Select toolbar, set the Selector Entity to Curve and leave the Selector Mode as SelectMultiple.•Select the curves surrounding the holes on the bracket to include the hole and the washer’s arcs,but not the split lines.•In the Model Info pane, expand the Selection List object .•Right-click the Curves object and select Mesh Size from the context-sensitive menu.•In the Mesh Size Along Curve dialog box, set the Number of Elements to 6 then click OK to set themesh size.Mesh the model.•In the Model Info pane, right –click the Surfaces object then select Mesh from the context-sensitivemenu.•Click OK in the Automesh Surfaces dialog box to mesh the model using the “Mesh Attributes”assigned to the surfaces in an earlier step.With mesh size symbols turned off and elementthickness display turned off, your model shouldappear similar to the following.Step 4:Create constraints and loads, including aCombined load setCreate the constraints on the back wall of the part.•In the Model Info pane, create a Constrain Set. Use a descriptive name for the title of the constraint set.•Expand the new constraint set and right-clickConstraint Definitions and select On Surface from the context-sensitive menu.•Select the eight (8) surfaces which represent the washers around the holes on the back wall of the bracket.•In the Create Constraints on Geometry dialog box,set the constraint to Pinned then click OK to create the constraints.•Again, right-click Constraint Definitions and select On Surface from the context-sensitive menu.Continue with creating the constraints on the back wall of the bracket.•Select the two (2) remaining surfaces on the back wall of the bracket and click OK.•In the Create Constraints on Geometry dialog box, set the constraint to Surface and choose Slidingalong Surface (Symmetry)then click OK to create the constraints.Create the loads on the holes on the left end of the bracket. To do this, you will create a Rigid elementconnecting the washers of the holes on the front of the bracket to a node at the center of the holes.•Select the command, Model, Element.•In the Define Plate Element dialog box, click the Type button an d select the Rigid element under theOther type.•Click the RBE2tab.•Click the New Node at Center button. Femap will then create the Independent node at the center ofthe selected Dependent nodes.•Click the Nodes button.•In the Entity Selection dialog box, change Methods^to on Curve and select the two curves making up one of the two holes on the web then Click OK to confirm your selection.•Create a second rigid element on the other hole byrepeating the previous two steps (New Node atCenter and selecting nodes on the two curves on the edge of the other hole).Create loads on the center nodes of the rigid “spider”elements in the holes.•Zoom in on the end of the bracket where you just created the rigid “spiders”.•From the Model Info tree, right-click the Loads object select New .•Enter a Title for the new Load Set as Front Web Hole Loading and click OK .•Expand the Load Set just created, right-click Load Definitions and select Nodal from the menu.•Select the node at the center of the front hole rigid element on the web then click OK .•In the Create Loads on Nodes dialog box, enter adescriptive name for the load, set the Load Type to Force , and set the Load value to FZ = 1.•Create a second load set and load at the node at the center of the read hole on the web by repeating steps b) through f) for the other hole. Set the Title for the second load set to Rear Web Hole Loading and click OK .Create a combined load set that will take the two previous load sets and by setting a scale factor, willcreate a combined load of 100 lbs in the negative Zdirection.•Select the command Model, Load, Combine.•In the Combine Load Data dialog box, set the Title to Combined 100 lb Web Hole Load.•In the From list, select both of the load sets you just created.•With both load sets selected, set the Scale Factor to -50.•Click the Add Combination button.•After the previous step, the Combinations section of the dialog box should appear as shown to the right.•Click OK to create the combined load set.•In the Model Info pane, right-click the combined load set you created and select Activate from the menu. Create a Nastran combined load set that will take the two previous load sets and by setting a scale factor, will create a combined load of 50 lbs in the positive Zdirection for the front hole and 50 lbs in the negative Z direction for the rear hole.•In the Model Info pane, right-click the Loads object and select New from the menu.•In the New Load Set dialog box, set the Title to a descriptive name similar to below.•For the Set Type, select Nastran LOAD Combination then click OK.•Select Reference Sets after right-clicking the newly created load set in the Model Info pane.•In the Referenced Loads Sets for Nastran LOAD dialog box, click the first load set under the Available Sets list field.•With the first load set selected, set the value For Referenced Set to 50then click the Add Referenced Set button.•With the second load set selected, set the value For Referenced Set to -50 then click the Add Referenced Set button. The Referenced Sets list field shouldappear as below.•Click OK to update the load set.Display the element thickness.•From the View toolbar, select the View Style pull down icon and select the Thickness/Cross Sectionicon to toggle on the display of the elementthickness.Step 5:Analyze the bracket and display stress resultsModify the Femap preference for Output Set Titles .•Select the command File, Preferences .•Select the Interfaces tab.•Under the Nastran Solver Write Options group, setthe Output Set Title option to 2..Nastran SUBTITLE .•Click OK to apply the changes to Femap’s preferences.Create an MultiSet Analysis Set and run the analysis.•Create an new analysis set for NX Nastran Linear Statics by right-clicking the Analysis object in theModel Info pane and select New.•Set the Title of the analysis set to MultiSet Linear Statics.•Expand the newly created analysis set to display Boundary Conditions.•Select Boundary Conditions then click Edit.Continue with creating the new analysis set for linear statics.•Set both the Constraints and Loads to None.•Click the MultiSet button.•In the Entity Selection –Select Constraint Set(s) to Generate Cases dialog box, click Select All thenOK.•In the Entity Selection –Select Load Set(s) to Generate Cases dialog box, click the Select fromList button.•In the Select One or More Load Sets(s) dialog box, select the two combined load sets, then clickOK.•Click OK to add the two load sets to the analysisset. The analysis set should now show two subcases as part of the analysis set.•Click the Analyze button in the Analysis Set Manager dialog box to start the analysis.•Close the NX Nastran Analysis Monitor when theanalysis completes and the results sets have been read into Femap.Review the results.•Activate the first results set by right-clicking on it in the Model Info pane.•Using the PostProcessing Toolbox, create a deformed contour plot of the Plate TopMajorPrin(cipal)Stress.•Set the Type to Elemental•Enable the option for Double-Sided Planar.•Save your model and exit Femap.。

Wtp2000_Femap_docs_api_ref

Wtp2000_Femap_docs_api_ref

FEMAP BASIC Scripting LanguageAPI ReferenceCopyright 1996-1999 by Enterprise Software Products, Inc.OverviewThe FEMAP BASIC Script Language provides direct access to theFEMAP Database Engine through the BASIC Intepreter built in toFEMAP.The MechanismThe FEMAP BASIC Script Language is based on Cypress Enable BASICScripting for Applications. Cypress Enable provides a the complete arrayBASIC programming functionality. Wherever possible, Cypress Enable’simplementation of BASIC follows the Microsoft Visual Basic syntax andsemantics. The Cypress Enable portion of the BASIC Scripting Languagehandles all flow of control, subroutines, and functions created in yourscript. We have added a FEMAP specific interface (the ApplicationProgramming Interface, or API) that allows your BASIC program tocustomize FEMAP. The FEMAP menu has also been extended to includethe capability to launch and run BASIC scripts from your own user-definedmenus.Details regarding the general elements of the Cypress Enable BASICScripting Language are included in the Language Reference Manual. Thisdocument covers variables, constants, control structures, subroutines andfunctions, file input/output, arrays, dialog support, etc. that will help youcraft your BASIC Scripts.Creating and Executing BASIC ScriptsThe BASIC Script files themselves are simple ASCII Text files. Everyprogram that you write must contain a main subroutine that acts as yourentire program, or calls other functions and subroutines.Sub Main ()….‘Your Program….End SubDialog boxes can be created using the dlgdsn.exe program. To launch thisprogram from the script editor use the Edit-Dialog Editor command. Thedlgdsn.exe program must be run once by itself so it can register itself in theregistry.BASIC Script files can be executed in five different ways.1.From the FEMAP Main Menu, select File Program Run Script. Youwill then be presented with the File Open Common Dialog box fromwhich you can select the script file to execute2.From the FEMAP Main Menu, select File Program Edit Script. TheScript Editor is a standard Microsoft Windows Single DocumentInterface ASCII Text Editor. Here you can open up text files, copyand paste between them, or copy and paste between other Windowsapplications, to create or edit your BASIC Script.3.Custom menus can be created and linked to FEMAP scripts or programfiles. A .esp file should be created and selected in the preferences,libraries, menu. The format of the file is similar to a window’s menuresource. An example is below.POPUP "&CustomCommands"BEGINMENUITEM "&Cut Element", "c:\Femap60\cut.bas"MENUITEM "&Radius", "c:\ Femap60\radius.bas"MENUITEM SEPARATORMENUITEM "&Group by Elem", "c:\ Femap60\group.bas"MENUITEM "Group &Elem 3", "c:\ Femap60\group3.bas"MENUITEM "Group &Node", "c:\ Femap60\grpnd.bas"MENUITEM SEPARATORMENUITEM "E&xtrude Plates", "c:\ Femap60\plex.bas"END4.Finally, FEMAP Program Files can themselves launch BASIC Scripts.A new Program File command, #RUN has been added that will run theBASIC Script File specified.5.As a command line argument when launching FEMAP, use –P and thename of the script. The script must end with the .bas extension,otherwise FEMAP will think it is a Program File.VariablesA short note on variables. Although the BASIC engine included withFEMAP can handle many variable types, to avoid problems in passing datainto and out of FEMAP you must declare all variables as the same typespecified in the arguments for the functions.Overview of FunctionalityThe FEMAP specific functions that have been added to the BASICScripting Language are described in this section, broken down by theirgeneral area of application.Output Data ManipulationThe functions concerned with the manipulation of FEMAP output data allbegin with the esp_Outp prefix. Using these functions, you can queryoutput that has been loaded into the FEMAP database by any of thesupported FEA programs and use that output in your own calculations.You can also put output data into the FEMAP database for furthermanipulation with your own program, for graphical post-processing withinFEMAP, or for text based reporting using the FEMAP listing commandsand formatted output.Manipulation of output data is broken down into three categories, getting,putting, and manipulating.FEMAP Output DataBefore you begin crafting your own program to manipulate FEMAP outputdata, it is important that you understand some of the underlyingorganizational issues.Output SetsEvery piece of output data in a FEMAP model is linked to an Output Sets.Output Sets are analogous to distinct FEA loads and/or boundary conditionsets. For example, a FEA model that is subjected to three distinct loadingconditions will have three distinct output sets. You can manipulate theoutput data of existing output sets, create new data in existing output sets,or create your own new output set to store and partition your calculatedfrom the actual data that was returned from your finite element analysis.Output Set CreationEvery Output Set in FEMAP contains the following information that youmust provide in order to create a new output set.Item Description Possible Values Function Used toSetSet ID ID Number of the Set.Must be unique withregard to other existingoutput sets.1 to 99,999,999esp_OutpCreateSetTitle Descriptive Title of theOutput Set Maximum of 25charactersesp_OutpCreateSetProgram Analysis Program whereoutput came from.0 - Unknown1 - FEMAP2 - PAL3 - PAL24 - MSC/NASTRAN5 - ANSYSesp_OutpCreateSet6 - STARDYNE7 - COSMOS8 - PATRAN9 - FEMAP Neutral10 - ALGOR11 - SSS/NASTRAN12 - Comma Separated13 - UAI/NASTRAN14 –COSMIC/NASTRAN15 - STAAD16 - ABAQUS17 - WECAN18 - MTAB19 - CDA/Sprint20 - CAEFEMAnalysis Type Type of Analysis0 - Unknown1 - Static2 - Modes3 - Transient4 - Frequency Response5 - Response Spectrum6 - Random7 - Linear Buckling10 - Nonlinear Static11 - Nonlinear Buckling20 - Steady State Heat21 - Transient Heatesp_OutpCreateSetvalue Numerical Valueassociated with thisOutput Set. Typicalusers are the time valuefor a transient analysis,or the frequency valuefor a modal run.Real esp_OutpCreateSetExample:This example creates Output Set 1, makes the title “BASIC Script Set”,sets the from_program flag to “FEMAP”, the analysis type to NonlinearStatic, and sets the Set Value to 1.455. Notice the variable ‘j’, this scriptsuses j to determine whether or not a new output set has been created. IfOutput Set 1 already existed, esp_OutpCreateSet would have returnedFALSE (-1).Example outp_1.bas:Sub MainDim ExistFlag as LongDim j as LongDim setID as LongDim Title as String * 25Dim from_program as LongDim anal_type as LongDim setValue as DoubleDim MsgsetID = 1Title = "BASIC Script Set"from_program = FEMAPanal_type = NONLINSTATICsetValue = 1.455j = esp_OutpCreateSet( setID, from_program, anal_type,setValue, Title )If j = TRUE THENMsg = "Created Output Set " + Str(setID)ElseMsg = "Could Not Create Output Set " + Str(setID)End IfPrint MsgEnd SubOutput Data Vector NumberingFEMAP uses output vector numbers between 1 and 99,999 for standard output data that is read in from the supported FEA programs. User defined output data, such as that created using the output calculation menu commands in FEMAP, is stored in vector numbers 300,000 and greater. Output created with your own programs should be placed in this region. If you are creating or calculating output that matches similar output that is normally read in directly by FEMAP, it is strongly recommended that you follow the standard FEMAP numbering convention for consistency. Appendix A of this manual contains a list of some of the standard vector ID numbers used by FEMAP for your reference.Nodal and Elemental DataAll output data contained in the FEMAP database is either nodal or elemental. Nodal output data is just that, output data attached to nodes in the FEMAP model. Elemental data is attached to individual elements. In addition to basic data, where there is one value for each node for a nodal data vector or one value for each element in an elemental data vector, there are special cases that you should be aware of.Output Vector DescriptionIn order for FEMAP to know how to handle your output data, there issome information that must be provided for every output vector that youcreate.Item Description PossibleValuesFunction Used to SetSet ID Number The ID of the Output Set towhich this vector belongs.AnyExistingOutput Setesp_OutpCreateVectorVector ID Number The ID number of thisoutput vector.1 to99,999,999esp_OutpCreateVectorTitle Description of this OutputVectorAny Text esp_OutpCreateVectorOut_Type Type of Output Data0 - Any1 - Disp.2 - Accel.3 - Force4 - Stress5 - Strain6 - Temp.7 - Otheresp_OutpCreateVectorData_type Nodal or Elemental OutputData 7 - Nodal8 - Elem.esp_OutpCreateVectorComp_dir Component Direction Flag0 - Default value. Setduring vector creation,indicates that this datastands alone and does nothave connected componentinformation.1 - vector data, comp[0..2]of this vector contain thevector ID’s of the X, Y, Zcomponents of this vector.2 - comp[0..1] contain thevector ID’s of the EndAand EndB for the beam datacorresponding to thisvector’s centroidal data.3 - comp[0..1] contain thevector ID’s of the EndAand EndB for the beam data 0 - No1 - Yes2 - Beam3 - BeamReversedesp_OutpSetVectorComponentFlagcorresponding to thisvector’s centroidal data,where EndB is reversed insign convention fromstandard beam data.min_val Minimum value in vector Real esp_OutpVectorSetMaxMin max_val Maximum value in vector Real esp_OutpVectorSetMaxMin abs_max Maximum absolute value invectorReal esp_OutpVectorSetMaxMinid_min ID of entity where minimumvalue occurs.Long esp_OutpVectorSetMaxMinid_max ID of entity wheremaximum value occurs.Long esp_OutpVectorSetMaxMincalc_flag Flag to whether or not thisoutput data can be linearlycombined.0 - Yes1 - NoSet to a default value of 1 -No when the vector iscreated withesp_OutpCreateVector, canbe overridden withesp_OutpSetVectorCalcFlagcentroidal flag Flag indicating that this datavector contains elemental ornodal centroidal data.Usually 1 for standard nodaland elemental data, only setto 0 if this vector containselement corner data.0 - Corner1 - YesSet to a default value of 1 -Yes when the vector iscreated withesp_OutpCreateVector, canbe overridden withesp_OutpSetVectorCentroidalFlagPlain Nodal or Elemental DataThe simplest and most common type of data that will need to be loaded into and out of FEMAP is plain nodal or elemental data. By plain, we mean a single output value for each node or element of your model. The following example demonstrates opening a file on disk and reading in nodal values into a new FEMAP output vector.Example - outp_2.bas, requires outp_2.dat and a 10 x 10 plate model with nodes numbered 1 through 100.Sub Main' Output Set VariablesDim setID as LongDim Title as String * 25Dim from_program as LongDim anal_type as LongDim setValue as Double' Output Vector VariablesDim vectorID as LongDim vectorTitle as String * 25' "Global" VariablesDim MsgDim j as LongDim k as LongDim l as LongDim nodecount as LongDim nodevalue as DoubleDim nodeID as LongDim st as String' Initialize Output Set ValuessetID = 1Title = "BASIC Script Set"from_program = FEMAPanal_type = NONLINSTATICsetValue = 1.455' Initialize Output Vector ValuesvectorID = 300000vectorTitle = "Nodal Temperature Data"' First Create an Empty Output Setj = esp_OutpCreateSet( setID, from_program, anal_type, setValue, Title )If j = TRUE ThenMsg = "Created Output Set " + Str(setID)ElseMsg = "Could Not Create Output Set " + Str(setID)End IfPrint Msg' Now Create an Empty Output Vectorj = esp_OutpCreateVector( setID, vectorID, Temp, Node, VectorTitle )If j = TRUE ThenMsg = "Created Output Vector " + Str(vectorID)ElseMsg = "Could Not Create Output Vector " + Str(vectorID)End IfPrint MsgIf j = TRUE Then' Open the data fileOpen "outp_2.dat" for Input as #1Line Input #1, stret_val = esp_MiscParseInit( st )ret_val = esp_MiscParseInt( 1, nodecount )If ret_val = TRUE ThenFor k = 1 to nodecountLine Input #1, stret_val = esp_MiscParseInit( st )ret_val = esp_MiscParseInt( 1, nodeID )ret_val = esp_MiscParseDouble( 2, nodevalue )l = esp_OutpPutData( setID, vectorID, nodeID, nodevalue ) Next kEnd Ifret_val = esp_OutpVectorFinish( setID, vectorID )End IfClose #1End SubNodal Vector DataFEMAP can store and post-process vector data that is made up of three global components. With vector data, there are typically four output vectors total, the first, the vector sum of the other three components. FEMAP stores the vector containing the vector sum with pointers to the constituent individual component vectors. By doing this, it is possible in graphical post-processing to select a single vector, and be able to display on screen the direction of this vector data since FEMAP knows where the component values come from. In your programmatic access to FEMAP, you are responsible for setting up only to components vectors, and then calling a built in routine that creates the vector sum vector, and connects everything up for later graphical post-processing.The following example creates three nodal vectors, and then calls the esp_OutpCreateVectorVectorSum function to create the vector total vector.Example - outp_3.bas - requires a two node model connected by one element.Sub Main' Output Set VariablesDim setID as LongDim Title as String * 25Dim from_program as LongDim anal_type as LongDim setValue as Double' "Global" VariablesDim MsgDim j as LongDim k as LongDim l as LongDim nodecount as LongDim nodevalue as DoubleDim nodeID as LongDim st as String' Initialize Output Set ValuessetID = 1Title = "BASIC Script Set"from_program = FEMAPanal_type = STATsetValue = 0.0' First Create an Empty Output Setj = esp_OutpCreateSet( setID, from_program, anal_type,setValue, Title )If j = TRUE ThenMsg = "Created Output Set " + Str(setID)ElseMsg = "Could Not Create Output Set " + Str(setID)End IfPrint Msg' Now Create the Component Vectors' Bad programming practice, but we will assume that thecreation' will happen and not fail.j = esp_OutpCreateVector( setID, 300001, Disp, Node, "X-Value")j = esp_OutpCreateVector( setID, 300002, Disp, Node, "Y-Value")j = esp_OutpCreateVector( setID, 300003, Disp, Node, "Z-Value")l = esp_OutpPutData( setID, 300001, 1, .125 )l = esp_OutpPutData( setID, 300002, 1, .25 )l = esp_OutpPutData( setID, 300003, 1, .375 )l = esp_OutpPutData( setID, 300001, 2, .5 )l = esp_OutpPutData( setID, 300002, 2, .25 )l = esp_OutpPutData( setID, 300003, 2, .375 )' Start FEMAP Internal Cleanup of Vectorsret_val = esp_OutpVectorFinish( setID, 300001 )ret_val = esp_OutpVectorFinish( setID, 300002 )ret_val = esp_OutpVectorFinish( setID, 300003 )ret_val = esp_OutpCreateVectorVectorSum( setID, 300000,300001, 300002, 300003, Disp, Node, "Vector Sum" )End SubElemental Output DataElemental output data can be broken down into two distinct categories. Straight elemental data contains a single output value for each element in your model. The most important thing to remember about elemental output data in FEMAP, is how it used when drawing color contour plots. FEMAP must, in order to draw a color contour plot, resolve the output data to the nodes. With pure elemental data, FEMAP averages the output value reported for all elements connected to a node to determine what contour level will be drawn at that node. This process is repeated for each node of every element.Elemental Output Data with Corner DataIn line with the actual output data from several of the supported FEA programs, FEMAP can also store elemental output data that contains references to the actual corner data for each element. In this case, there is an centroidal value for each element, as well as references to other data vectors that contain actual corner values for each of the nodes connected to that elements. For example, 4-node plate output data with corners is actually made up of five output data vectors in FEMAP. The first,represents the value at the centroid of the element, and the other four represent values for that elements, for each of the four nodes. With corner data, FEMAP can create a color contour plot that is more accurate, since instead of averaging adjacent element centroidal data to determine the contour color at a node, we can use the actual corner values.The following example - outp_4.bas, creates element centroidal output data and corresponding corner data for a two element plate model.Example - outp_4.bas - requires a two element plate model, elements number 1 and 2, with nodes numbered 1 through 6.Sub Main' Output Set VariablesDim setID as LongDim Title as String * 25Dim from_program as LongDim anal_type as LongDim setValue as Double' Output Vector VariablesDim vectorID as LongDim vectorTitle as String * 25' "Global" VariablesDim MsgDim j as LongDim k as LongDim l as LongDim m as LongDim nodecount as LongDim nodevalue as DoubleDim nodeID as LongDim st as String' Initialize Output Set ValuessetID = 1Title = "BASIC Script Set"from_program = FEMAPanal_type = STATsetValue = 0.0' First Create an Empty Output Setj = esp_OutpCreateSet( setID, from_program, anal_type,setValue, Title )If j = TRUE ThenMsg = "Created Output Set " + Str(setID)Print MsgElseMsg = "Could Not Create Output Set " + Str(setID)Print MsgGoTo FailedEnd If' First, we will create the element centroidal vectorj = esp_OutpCreateVector( setID, 7033, Stress, Elem, "Plt. Top VonMises Stress" )If j = TRUE ThenMsg = "Created Centroidal Vector"Print MsgElseMsg = "Error Creating Centroidal Vector"Print MsgGoTo FailedEnd If' now create the corner vectorsj = esp_OutpCreateVector( setID, 20133, Stress, Elem, "Plt. Top VonMises Str C1" )k = esp_OutpCreateVector( setID, 30133, Stress, Elem, "Plt. Top VonMises Str C2" )l = esp_OutpCreateVector( setID, 40133, Stress, Elem, "Plt. Top VonMises Str C3" )m = esp_OutpCreateVector( setID, 50133, Stress, Elem, "Plt. Top VonMises Str C4" )If j = TRUE ThenMsg = "Created Corner 1 Vector"Print MsgElseMsg = "Error Creating Corner 1 Vector"Print MsgGoTo FailedEnd IfIf k = TRUE ThenMsg = "Created Corner 2 Vector"Print MsgElseMsg = "Error Creating Corner 2 Vector"Print MsgGoTo FailedEnd IfIf l = TRUE ThenMsg = "Created Corner 3 Vector"Print MsgElseMsg = "Error Creating Corner 3 Vector"Print MsgGoTo FailedEnd IfIf m = TRUE ThenMsg = "Created Corner 4 Vector"Print MsgElseMsg = "Error Creating Corner 4 Vector"Print MsgGoTo FailedEnd If' Set up Corner Pointers on Centroidal Vectorj = esp_OutpSetVectorComponent( setID, 7033, 0, 20133 )If j = FALSE ThenMsg = "Error Setting Corner Reference"Print MsgGoTo FailedEnd Ifj = esp_OutpSetVectorComponent( setID, 7033, 1, 30133 )If j = FALSE ThenMsg = "Error Setting Corner Reference"Print MsgGoTo FailedEnd Ifj = esp_OutpSetVectorComponent( setID, 7033, 2, 40133 )If j = FALSE ThenMsg = "Error Setting Corner Reference"Print MsgGoTo FailedEnd Ifj = esp_OutpSetVectorComponent( setID, 7033, 3, 50133 )If j = FALSE ThenMsg = "Error Setting Corner Referenc e"Print MsgGoTo FailedEnd If' Also need to set the Centroidal Flag to indicate that the corner' vectors contain corner data.j = esp_OutpSetVectorCentroidalFlag( setID, 20133, 0 )If j = FALSE ThenMsg = "Error Setting Centroidal Flag"Print MsgGoTo FailedEnd Ifj = esp_OutpSetVectorCentroidalFlag( setID, 30133, 0 )If j = FALSE ThenMsg = "Error Setting Centroidal Flag"Print MsgGoTo FailedEnd Ifj = esp_OutpSetVectorCentroidalFlag( setID, 40133, 0 )If j = FALSE ThenMsg = "Error Setting Centroidal Flag"Print MsgGoTo FailedEnd Ifj = esp_OutpSetVectorCentroidalFlag( setID, 50133, 0 )If j = FALSE ThenMsg = "Error Setting Centroidal Flag"Print MsgGoTo FailedEnd If' Now pump in the data,' this script assumes there are two elements, 1 and 2' and 6 nodes, 1 through 6l = esp_OutpPutData( setID, 7033, 1, 600 ) ' Center, Elem 1 l = esp_OutpPutData( setID, 7033, 2, 800 ) ' Center, Elem 2 l = esp_OutpPutData( setID, 20133, 1, 100 ) ' C1 E1l = esp_OutpPutData( setID, 30133, 1, 200 ) ' C2 E1l = esp_OutpPutData( setID, 40133, 1, 500 ) ' C3 E1l = esp_OutpPutData( setID, 50133, 1, 400 ) ' C4 E1l = esp_OutpPutData( setID, 20133, 2, 200 ) ' C1 E2l = esp_OutpPutData( setID, 30133, 2, 300 ) ' C2 E2l = esp_OutpPutData( setID, 40133, 2, 600 ) ' C3 E2l = esp_OutpPutData( setID, 50133, 2, 500 ) ' C4 E2ret_val = esp_OutpVectorFinish( setID, 20133 )ret_val = esp_OutpVectorFinish( setID, 30133 )ret_val = esp_OutpVectorFinish( setID, 40133 )ret_val = esp_OutpVectorFinish( setID, 50133 )ret_val = esp_OutpVectorFinish( setID, 7033 )GoTo Success:Failed:Msg = "Error Executing Script File"Print MsgSuccess:End SubGetting Output DataGetting output data out of FEMAP is much easier to describe since it does not have the setup requirement that creating data does. The following example demonstrates getting output set data, in this case natural frequency values. It also demonstrates the OLE Automation capabilities of the FEMAP BASIC Scripting Language. In this example, the freqency values associated with the output sets of a natural frequency analysis are transferred to Microsoft Word.Example - outp_5.bas - assumes you have a model containing the results from a modal analysis.Sub Main ()' Word VariablesDim MSWord As objectDim Doc As object' Output Set VariablesDim setID as LongDim Title as String * 25Dim from_program as LongDim anal_type as LongDim setValue as Double' Global VariablesDim j as LongDim k as LongDim Msgj = esp_DBNextEntity( Existing, Out_Case, After, 0 )If j > MAX_LABEL ThenMsg = "No Output Sets Exist"Print MsgGoTo FailedEnd If' Connect to WordSet MSWord = CreateObject("Word.Application")MSWord.Application.Visible = TrueMSWord.Documents.Add' Insert into the DocumentSet Doc = MSWord.ActiveDocumentDoc.Content.InsertAfter "Natural Frequencies"Doc.Content.InsertParagraphAfterDoc.Content.InsertParagraphAfterWhile j < MAX_LABEL' Walk through all the Output Setsk = esp_OutpGetSet( j, from_program, anal_type, setValue,Title )If k = TRUE ThenIf anal_type = MODES ThenMsg = " Output Set " + Str(j) + ": Frequency = " + Str(setValue) + " Hz."Doc.Content.InsertAfter MsgDoc.Content.InsertParagraphAfterEnd IfEnd Ifj = esp_DBNextEntity( Existing, Out_Case, After, j )WendDoc.Content.InsertParagraphAfterDoc.Content.InsertParagraphAfter' Format the TitleDoc.Paragraphs(1).Range.Bold = TrueDoc.Paragraphs(1) = "Arial"Doc.Paragraphs(1).Range.Font.Size = 24GoTo SuccessFailed:Success:End SubFunction DefinitionsAll functions return TRUE if successful, FALSE is the action requested is not possible, unless otherwise noted.Declare Function esp_OutpGetSet App ( ByVal setID as Long, ByRef program as Long, ByRef anal_type as Long, ByRef value as Double, ByVal Title asString ) as LongGets information about the Output Set defined by setID. Fills program, anal_type, value, and Title with the corresponding information from inside of FEMAP.Declare Function esp_OutpGetVector App ( ByVal setID as Long, ByVal vectorID as Long, ByRef out_type as Long, ByRef data_type as Long, ByVal Title asString ) as LongGets information about the Output Vector defined by vectorID in setID. Fills out_type, data_type, and Title with the corresponding information from inside of FEMAP. Declare Function esp_OutpGetVectorComponentFlag App ( ByVal setID as Long, ByVal vectorID as Long, ByRef flag as Long ) as LongGets the Vector Component Flag from Output Vector vectorID in Output Set setID, and fills flag with its value, TRUE or FALSE.Declare Function esp_OutpGetVectorCalcFlag App ( ByVal setID as Long, ByVal vectorID as Long, ByRef flag as Long ) as LongGets the Calculation Flag information for Output Vector vectorID in Output Set setID, and returns this flag in flag, TRUE or FALSE.Declare Function esp_OutpGetVectorCentroidalFlag App ( ByVal setID as Long, ByVal vectorID as Long, ByRef flag as Long ) as LongGets the Centroidal Flag information for Output Vector vectorID in Output Set setID, and returns this flag in flag, TRUE or FALSE.Declare Function esp_OutpGetVectorMaxMinData App ( ByVal setID as Long, ByVal vectorID as Long, ByRef absmax as Double, ByRef max as Double,ByRef min as Double, ByRef maxID as Long, ByRef minID as Long ) asLongRetrieves the max/min data for Output Vector vectorID in Output Set setID, and fills in the appropriate absmax, max, min, maxID, and minID values.Declare Function esp_OutpGetVectorComponent App ( ByVal setID as Long, ByVal vectorID as Long, ByVal index as Long, ByRef comp as Long ) asLongRetrieves the component ID number for the Output Vector vectorID in Output Set setID, at the Index value index, and fills this value into comp.Declare Function esp_OutpGetData App ( ByVal setID as Long, ByVal vectorID as Long, ByVal ID as Long, ByRef value as Double ) as LongRetrieves the output data value for entity ID from the Output Vector vectorID in the。

Femap梁板单元模型实例操作BeamPlateModel

Femap梁板单元模型实例操作BeamPlateModel

IntroductionIn this example we will read in simplified wireframe geometry of the following assembly.The top plate will be modeled with plate elements, and the underlying support beams will be modeled with beam elements.The steps you will follow in this exercise are:•Import a Femap Neutral File containing wireframe geometry.•Create a Material and the Plate and Beam Properties for the model•Create the surfaces for the model•Mesh the surfaces•Constrain the plate•Add the support beams•Apply a load to the plates•Analyze the model and review the resultsStep 1:Import a Femap Neutral FileImport the geometry from a Femap Neutral file.•Select the File, Import, Femap Neutral command•Select the file, ex9 –Plate Geometry.neu,located in your training class’ Geometry folder. Click OK in theNeutral File Read Options dialog box.This geometry will be meshed with elements, whoseproperties and materials we will now define.•Save your model in the Exercises folder as ex9-BeamPlate.modfem.Step 2:Create a Material and the Plate and BeamProperties for the modelCreate the Material•Select the Model, Material command or right-click on the Materials object in the Model Info window andselect New.•In the Define Material –ISOTROPIC dialog box, click Load.•Select the material, Aluminum 7075 Heat Treated(T6) Wrought in the Select from Library dialog box.•After selecting the Aluminum 7075 Heat Treated (T6)Wrought material, click OK to create the material.•Click Cancel or use the esc key to exit the command.Note :mat_eng_in-lbf-If your default library is not set topsi-degF-BTU.esp, you can easily change thelibrary to this by clicking the Choose Librarybutton in the Select from Library dialog box.The library referenced above is in both theLibraries and Settings folder under you classfiles folder or in the main Femap installationfolder.•To create the plate property, right-click the Properties object in the Model Info window and select New.•In the Define Property –PLATE Element Type dialog box select the material previously created from the Material drop-down list.•Enter the Title as 2.5 mm Thick Plate.•Enter the Thickness as 2.5.•Click OK to continue.Create the a Beam property.•FEMAP will automatically prompt you for the next property. To change to a beam property, click theElem/Property Type button, and change theElem/Property Type to Beam.•FEMAP now displays the Define Element -BEAM Element Type dialog box.•Set the Title to 25 X 12.5 X 15 X 2.5 C-Channel•Set the Material to the aluminum material created earlier.•Instead of entering the beam properties manually, click the Shape button to enter the cross-section data directly.•In the Cross Section Definition dialog box, select Channel (C) Section from the Shape drop-down list.•Enter the following:Height25Width, top12.5Width,bottom15Thick,top 1.5Thick, bottom 2.5Thickness 2.5•Check the option for Reference Point on. Using the arrow buttons, move the Reference Point to theupper left corner of the channel cross section. You should see the letter R as the indication of thelocation of the reference point.•Click OK to confirm your entries in the Cross Section Definition dialog box.Note how the fields in the Define Property dialog boxhave been filled in with the calculated values for thebeam property.•Click OK to create the first beam’s property.•Click Cancel or use the Esc key to exit the property command.Save your model.Step 3:Create the surfaces for the modelCreate the Boundary Surfaces that will be meshed with plates. Boundary Surfaces are composed of exterior, and optionally, interior closed connected curves.•In our example, we will create two boundaries.Select the Geometry, Boundary Surface, FromCurves command.•Select the six curves (curves 1-6) that make up the left boundary in any order. Click OK in the EntitySelection… dialog box to create the boundarysurface.•Create another Boundary Surface using the four curves (curves 2, 7, 8, and 9) in the right boundary.•Click Cancel or press Esc key to exit the command.Convert the Boundary Surfaces to Parasolid surfaces and create a single sheet body.•Select the Geometry, Surface, Convert command.•Click Select All to choose both boundary surfaces and click OK.•When prompted to “OK to delete original surfaces?”, click YES•Click Cancel or press Esc key to exit the command.Note how the two surfaces now appear in the ModelInfo window as sheet solids.•Select the Geometry, Solid, Stitch command.•In the Entity Selection dialog box, click Select All, and then click OK.•In the Surface/Solid Stitching dialog box, Disable (uncheck the box) for the option, Cleanup Mergeable Curves.•With highlighting enabled in the Model Info pane toolbar, select the solid (3..Stitched Body) and notehow the vertical mid-line is still part of the body. Ifyou had had not disabled the option for CleanupMergeable Curves, the stitching operation wouldrecognize that the two surfaces share a commonedge and lie on a tangent plane resulting in a into asingle surface sheet body.Step 4:Mesh the surfacesSet a new default mesh size.•Select the command, Mesh, Mesh Control, Default Size.•In the Default Mesh Size dialog box, set the Size to25.0and then, click OK to apply the new setting.Visualize the mesh size.•To visualize the mesh spacing, press the F6key.This activates the View Options command.•Under the Labels, Entities and Color category, select the Curve –Mesh Size option. In the Show Assection, choose 3..Symbols and Count to turn on theMesh Size indicators on curves. Also, check theDraw Entity option on (this can also be toggled onand off from the View Style, Mesh Size icon on theView toolbar).•Click OK to display the Mesh Size indicatorsTurn off display of the surfaces.•On the Entity Display toolbar, click the ViewGeometry Toggle iconNote that the display of all geometry has been turnedoff. Also note how the display of icons on the toolbarhave changed from filled to unfilled. Filled iconsindicate the entity type is displayed and unfilled icons indicate the entity type is not displayed.•On the Entity Display toolbar, click the View Curves Toggle icon. This will turn on display of curves.Adjust the mesh sizes on the surface.•Select Mesh, Mesh Control, Size Along Curve command.•Select the vertical midline splitting the two surfaces and the vertical edge on the right side of the body(curves 13 and 17) and click OK to confirm yourselection and set the mesh size on those two curves.•Change the Number of Elements to 20and click OK.Note how the mesh size indicators have beenupdated to show the finer mesh size as well as thenumber of elements along the two curves youupdated the mesh size on. Only those curves,surfaces and solids that have had mesh sizes setmanually with the Mesh, Mesh Control, Size Along…command will have the number of elements ontheir respective curves displayed. No mesh sizenumber indicates that the default mesh size is beingused.Set the mesh attributes on the surfaces.•Select the command, Mesh, Mesh Control, Attributes on Surface.•In the Entity Selection dialog box, click the Select All button, and then click OK.•In the Surface Mesh Attributes dialog box, set the Property to 1..2.5 mm Thick Plate.Set the option for Offset to Surface To Bottom Face.This will automatically set the offset of the mesh sothat the bottom face of the elements lie on thesurface.Enable the option for Map Subdivisions.•Click OK to set the mesh attributes.•Click the Esc key to exit the command.Mesh the surfaces.•Select the command, Mesh, Geometry, Surfaces.•In the Entity Selection dialog box, click the Select All button, and then click OK.Your model should appear as below.The view is set to display elements by element color, and in this case, the default color for elements arewhite, making the display appear as if it is inwireframe mode.Change the color of the elements.•In the Model Info pane, expand the Model, Elements object, and then the By Type object.You should see an element object, Plate, Linear.The number indicates the number of this type ofelement in the model.•Right-click the Plate, Linear object and select Color from the menu.•In the Color Palette dialog box, select one of the colors and click OK.Change the display of the elements to the property color.•On the View toolbar, select the View Style icon and then the Color With, Property Colors command.Modify the mesh using by setting the mesh size on surfaces and then remeshing the model.•Select the command, Mesh, Mesh Control, Size on Surfaces.•In the Entity Selection dialog box, click the Select All button, and then click OK.•In the Automatic Mesh Sizing dialog box, set the Element Size to 12.5.Enable the option for Replace Mesh Sizes on AllCurves.Disable the options for both Max Angle Toleranceand Max Elem on Small Feature.Click OK to set the mesh sizes.Note how the mesh size indicators on the curveshave been updated to show the new mesh size.Modify the mesh size on the arc.•Select the command, Mesh, Mesh Control, Interactive.•In the Interactive Mesh Sizing dialog box, click the Subtract button. Make sure you do this beforeselecting any curves.•Select the arc, then click Done. The mesh size on the curve should now be shown as 12.Remesh the surfaces.•Select the Mesh, Geometry, Surfaces command.•In the Entity Selection dialog box, click the Select All button, then click OK.•Since the surfaces have already been meshed, the Meshing Already Meshed Surfaces dialog box isopened. Accept the default setting, Delete ExistingMesh and Remesh option and click OK to remeshthe surfaces.•Click OK in the Automesh Surfaces dialog box.Your mesh should appear as below.Display the quality of the mesh.•Activate the Meshing Toolbox. If it is already activated and in the background or tabbed closed,click the Meshing Toolbox tab. If the toolbox is notopen, click the Meshing Toolbox icon on the Panestoolbar.•On the Meshing Toolbox’s toolbar, click the Quality icon.The mesh quality should be displayed as shownbelow. The red colored elements indicate elementswith a Jacobian value exceeding 0.6.Expand the Quality tool to display the maximum value of the Jacobian quality measurement.The Jacobian value is the comparison of all theelement’s quality values (aspect ratio, etc.) versus anideal element of the same type.•Expand the Quality tool by clicking on the Quality object in the Meshing Toolbox.Note how the worst element quality is at a value of.642246.•Click the Quality icon again on the MeshingToolbox’s toolbar to turn off display of the meshquality.Turn off display of the mesh size indicators•On the View toolbar, select the View Style icon and select Mesh Size from the menu.Step 5:Constrain the plateConstrain the Model. For this example, we will add boundary conditions to the geometry of the modelbefore meshing. FEMAP will automatically expand the boundary conditions out to the nodes when exporting the analysis model to your solver.•Create a constraint set by expanding the Model Info pane and selecting New from the menu.•In the New Constraint Set dialog box, set the Title to Pinned Edges and then click OK to create the newconstraint set.Create pinned constraints on the edges of the panels.•Expand the Pinned Edges constraint set in the Model Info pane.•Right-click Constraint Definitions and select On Curve from the menu.•In the Entity Selection dialog box, select the four curves parallel to the model’s X-axis and the right edge of the plates. Use the Preview button tohighlight the selected curves before clicking the OK button to confirm you’ve selected the correct curves.•In the Create Constraints on Geometry dialog box, enter a descriptive Title for the constraint definition and set the constraint to Pinned –No Translation.•Click OK to create the constraints.•With highlighting enabled, click the newly created constraint in the Model Info pane. The geometry that is attached to the constraint should be displayed as highlighted.Step 6:Add the support beamsAdd the support beams.•Select Mesh, Geometry, Curve command. Select the left straight edges and the center vertical edge as indicated below.•Select the channel, 2..25 X 12.5…C-Channelproperty created earlier from the Property drop-down list. Click OK to continue.Add the support beams (continued).•FEMAP will now ask for a vector to orient the Y-Axis of the beam elements, align the beam Y-Axis withthe Global X-Axis (Base: 0,0,0Tip: 1,0,0).Since the element cross section displays are not turned on, you will need to turn this on at this time to display the beam shape and the element thickness of theshells.•Select the View Style icon on the View toolbar, and then select Thickness/Cross Section from the menu.The plate and beam offset are also not displayed.Reorient the view to the front view orientation byselecting the Orient Front icon on the ViewOrientation toolbar.Note how the offsets are not displayed.Select the View Style icon on the View toolbar, and then select Offsets from the menu.Visualize the resulting mesh.•Rotate the view so that you can see the entire model.In the next set of steps, you will modify the offsets ofthe beams and for some of the beams, their directionwill need to be reversed.Modify the color of the beam property.•Right-click the property 2..25 X 12.5 X 15 X 2.5in the Model Info pane and select Color from the menu.•Change the color of the property to some other color different than the existing channel property.Modify the offsets of the beam so that their offset location is set to the reference location you set whencreating the property.•Select the command, Modify, Update Elements, Line Element Offsets.•In the Entity Selection dialog box, click the Method button and select Property from the menu.Note how the title of the dialog box changed to Entity Selection –Select Element(s) to Update Offsets (ByProperty).•Select one of the beam elements, and then click OK.•In the Update Element Offsets dialog box, click the Move to Reference Point button and then click OK.You will need to refresh your graphics pane to update it to display the beam offsets correctly.•Press the Ctrl+g hotkey to refresh the display.The beam offsets should appear as below, indicating that some of the beams need to have their directionreversed.Reverse the direction of the channel elements that are incorrectly oriented.•Select the command, Modify, Update Elements, Line Element Reverse Direction.•In the Entity Selection dialog box, click the Methods button and select On Curve from the menu.•Select the curve on the lower left and the middle curve. Use the Preview button to confirm yourselection and then, click OK.•In the Update Element Direction dialog box, select the Reverse Direction radio button and then, clickOK.Note that the direction of the beams is now correct(the shorter flange is at the top of the beam),however, their offsets will need to be reset.Correct the offsets of the beams just reversed.•Select the command, Modify, Update Elements, Line Element Offsets.•In the Entity Selection dialog box, click the Previous button and then, click OK.You may want to use the Preview button to confirmthat the elements that you selected for reversing arestill the selected beams.•Again, in the Update Element Offsets dialog box, click the Move to Reference Point button and OK.Switch to the front view of the model to confirm that the beam elements are oriented and offset correctly.•Select Orient Front icon on the View Orient toolbar.Note how the top of the channels line on the bottomof the plates.Run final checks on the model. When you mesh different portions of a model at different times, there will be coincident nodes, essentially, sections of your model that overlap.•Select Tools, Check, Coincident Nodes.•Select All of the nodes and click OK.•In the Check/Merge Coincident dialog box, set the option for Keep ID to Lower ID.•Click the Preview button.•Click the Done button.•In the Check/Merge Coincident dialog box, click OK to merge the nodes.Step 7:Apply a load to the platesCreate a load on the plates.•In the Model Info pane, right-click the Loads object and select New from the menu.•In the New Load Set dialog box, enter a descriptive Title for the load set and then click OK.Add a force load to the left plate.•Expand the newly created load set.•Right-click the Load Definitions object and select On Surface.•Select both surfaces and click OK in the Entity Selection dialog box.•In the Create Loads on Surface(s)dialog box, add a descriptive Title.Set the load type to Force.Set the Direction to Normal to Surface.Set the Magnitude to -500.Disable(uncheck) the option for Total Load. This will apply a 500N load to each of the selected surfacesinstead of distributing a 500 N load among thesurfaces.•Click OK to apply the load to the two surfaces.Display the loaded surfaces.•Just like you did when you highlighted the constraint, click the newly created load. If highlighting is stillenabled, you should see the two surfaceshighlighted.•Press the Ctrl+g hotkey to refresh the display.Save your model.Step 8:Analyze the model and review the resultsAt this point, your model is ready to analyze with the NX Nastran solver.•Select the Model, Analysis command, or right-click on the Analyses object in the Model Info window andselect Manage, to open the Analysis Set Managerdialog box.•Click on New to create a new analysis set.•Give it a title, set the Solver to NX Nastran, the Analysis Type to 1..Linear Statics and, click OK.•Click on Analyze to start the analysis.This will open the Analysis Manager pane.•If no error or warnings are generated by thisanalysis, the results are automatically imported intoyour Femap model.Display the deformed model.•Activate the PostProcessing toolbox.•Expand the Deformed tool.•Set the Style to Deformed.Display the stress contours for the plates.•Expand the Contour tool.•Set the Style to Contour.Your graphics pane should appear similar to below.Note that you cannot simultaneously beam andshell/solid contours. In the next step, you’ll display a beam diagram.Turn off display of the deformed shape and stress contours.•On the PostProcessing Toolbox ’s toolbar, click the Set to Undeformed, No Contour, No Freebody icon.Display a beam diagram of the maximum stress on the beams.•For the Contour Style, select Beam Diagram.•Click the Select Output Vector icon.•In the Select Output Vector dialog box, enter Beam for Title Contains.•Click the Output Filter button and select 4..Line Elements. This will set the list to show only results available for the beam elements in the model.•Scroll down the list and select 3164..Beam End A Max Comb Stress.•Click OK to set the contour output vector.Turn off display of the plate elements.•In the Model Info pane, expand the Model, Elements, By Type object and uncheck the visibility check boxfor Plate, Linear.•Your model should now appear similar to the following.Turn off the display of all entities except for beams.•Press the Ctrl+q hotkey.In the View Visibility dialog box, click the All Offbutton, the check the box on for Elements.•Click the Done button.The default for beam directions is to display the results in the element y-direction. This step will change theresults to the element z-direction.•In the PostProcessing Toolbox’s Contour tool, expand the Show As tool•Set the Direction to Element Z.。

Femap图文教程

Femap图文教程

常用工具栏功能介绍
缩放、旋转和平移视图
撤销和重做
用于调整模型视图的显示方式。
选择和取消选择
撤销上一步操作或重做已撤销的 操作。
选择或取消选择模型中的元素。
新建、打开和保存文件
用于创建新文件、打开已有文件 和保存文件。
属性窗口
显示所选元素的属性信息,如几 何尺寸、材料属性等。
模型视图操作技巧
使用鼠标中键进行旋转和缩放视图。
05
在非关键区域采用较粗的网格划分,以提高计算效率。
06
注意网格的连续性和协调性,避免出现畸形网格或重叠网格。
04
Femap建模与网格划分
几何建模方法
01
02
03
直接建模
在Femap中直接创建几何 模型,利用基本图形元素 (如点、线、面)构建复 杂结构。
导入外部模型
支持多种CAD格式导入, 如STEP、IGES、 Parasolid等,实现与其他 CAD系统的无缝集成。
易用。
02
Femap界面与基本操作
界面组成与布局
菜单栏
包含文件、编辑、视图、工具、 窗口和帮助等菜单项,用于执 行各种命令。
状态栏
显示当前操作状态和相关提示 信息。
主窗口
显示模型、分析结果和其他主 要信息。
工具栏
提供常用命令的快捷按钮,方 便用户快速执行操作。
模型树
展示模型的层次结构,方便用 户管理和查看模型。

何在Femap中定义相关
线
材料参数。

介绍接触问题的基本原
理和求解方法,包括接
案 例
触对的定义、接触刚度

的设置等,并展示

Femap中的相关操作。

matlab fitctree剪枝

matlab fitctree剪枝

Matlab fitctree是一种在机器学习和数据挖掘中常用的工具,它可以用于构建分类树模型。

在fitctree函数中,有一个非常重要的参数叫做'prune',它用于控制分类树的剪枝操作。

剪枝是指通过调整分类树的结构,去除一些过于复杂或者过拟合的部分,使得分类树模型更加简洁、泛化能力更强。

本文将围绕Matlab fitctree的剪枝操作展开讨论,并详细介绍其原理和使用方法。

1. 剪枝的原理在构建分类树模型时,为了最大程度地适应训练集的数据,往往会采用一些复杂的树结构,这样会导致分类树模型对训练集的拟合效果很好,但是对于未知数据的泛化能力很差。

为了解决这个问题,需要对构建好的分类树进行剪枝。

剪枝的本质是通过调整分类树的复杂度,去除一些不必要的结点和分支,以达到简化模型的目的。

2. fitctree函数中'prune'参数的作用在fitctree函数中,'prune'参数用于控制分类树的剪枝操作。

该参数有多种取值方式,包括True、False和具体的数值。

其中,True表示对构建好的分类树进行剪枝操作,False表示不进行剪枝操作,而具体的数值则表示用于调整分类树复杂度的阈值。

当'prune'参数为具体的数值时,fitctree函数会根据该数值对分类树进行剪枝,具体剪枝的方式将在下文详细介绍。

3. 如何使用'prune'参数进行分类树剪枝当'prune'参数为具体的数值时,fitctree函数会按照如下步骤进行分类树剪枝:步骤1:利用交叉验证的方法,将训练集分为K个互斥子集。

步骤2:对每一个子集进行以下操作:用剩余的K-1个子集来训练分类树,然后在当前子集上测试分类树的性能。

步骤3:对分类树进行剪枝操作,得到不同复杂度的分类树,计算它们在测试集上的误差。

步骤4:选择误差最小的那颗分类树,作为最终的分类树模型。

Femap简介

Femap简介

第1章Femap概述Femap是一个基于Windows平台开发的有限元分析环境,而不仅是一个有限元前后处理器。

Femap的研发人员全都是有着丰富经验的分析工程师,由分析工程师走向程序员,他们十分清楚用户的需求,也因为此,Femap在国际上有着广泛的用户。

本章对Femap的基本内容作出介绍。

1.1 Femap界面也许,你已经看到了Femap,也许你还没有看到,但是,它是基于Windows平台开发的、我们每天都在使用的操作系统。

在这个操作系统上的软件都有着一定的特点,而这些特点也是属于Femap的。

如浮动菜单、工具条、快捷菜单、热键、多窗口、撤销、重做、按时间自动保存文件、保存文件备份等。

也许你还没有用过Femap,那么,当你打开Femap,你会使用其中的什么?毫无疑问,新建文件、打开文件、保存文档、关闭文档、窗口排列、帮助文档、自定义工具条、自定义快捷键等,对于一个习惯于使用Windows的人来说,这是非常容易的,也是不需要学习的。

Femap的界面如图1-1所示。

图1-1 Femap基本界面在图1-1的左侧是可停靠面板,Femap吸收了CAD软件模型树的概念,让用户可以有效管理、分析每一个环节,同时吸收了Microsoft Visual Studio编辑器的优点,让用户不必打开对话框即可修改模型的相关信息,如材料的物理属性。

Femap & NX Nastran基础及高级应用21.2 菜单Femap的菜单如图1-2所示。

图1-2 Femap菜单现在只是在英文下面注释了中文,也许不久就可以看到中文版的Femap。

文字在作为菜单名称的同时,也描述了菜单的功能。

本章主要介绍“文件”菜单、“工具”菜单、“视图”菜单和“帮助”菜单。

“窗口”菜单主要是对打开的窗口的排列,和Windows的其他软件没有大的区别。

1.2.1 File菜单文件菜单包含了一个软件的基本功能,对于熟悉Windows平台的用户来说,图1-3中简单的命令不再详细介绍。

Fence入门培训教材_Emma_排版

Fence入门培训教材_Emma_排版

iSIGHT 初级培训教材1、iSIGHT简介首先,我们介绍一下iSIGHT的结构组成。

如图1所示,iSIGHT由以下四个功能模块组成:通过过程集成模块,可以集成相应的商业或自编程序,并通过问题定义模块将整个优化问题确定好,在求解过程中应用求解监视器对优化过程和效果进行实时显示,直至最终的优化结果。

以上所有的模块都是在任务管理模块的控制协调之下完成的。

为了更形象的解释各模块的功能和iSIGHT的操作,我们以一个围栏问题为例加以说明。

图 1 iSIGHT主要组成2、围栏问题下面我们以最简单、最基础的围栏问题作为优化案例来说明iSIGHT的基本操作步骤。

问题描述:一个农夫用一个周长为400米的篱笆来围一块矩形的菜地,他不知道如何选择菜地的长和宽来保证所谓菜地面积最大(图2)。

那么这个问题就可以用数学语言描述为:设矩形长为L,宽为W。

面积为Area则在约束2*(L+W)=400 的条件下使得 Area=L*W=maximum根据初等代数学的知识,我们可以将长L替换为W,即有约束可以知道L=200-W代入 Area的计算公式中,可知 Area=(200-W)*W,由一元二次函数的性质,可知当W=-b/(2a)=100时,Area取得最大值10000,即当菜地的形状为正方形时,取得的面积最大。

下面通过iSIGHT来找到这个最优点,并与理论结果比较一下。

第一步:确定问题,优化变量,计算方法和优化目标将培训光盘里Training_CD\LabFiles\Windows\iSIGHTTrn\Fence1目录及其目录下的所有文件拷贝至D:盘的根目录下,该目录中包含着整个优化计算的内容。

这里面的优化变量为矩形的长和宽,优化目标为面积,优化的目的是使面积最大化。

为此,建立一个输入文件FenceIn.txt,一个输出文件FenceOut.txt,和一个可执行文件Fence.exe来进行面积的计算。

各个文件的内容如下:FenceIn.txt:Fence Input FileThe length is: 8The width is: 6FenceOut.txt:Fence Output FileThe area is: 48.000000The perimeter is: 28.000000Fence.c:fscanf(fp,"Fence Input File\n"); // 数据输入语句fscanf(fp,"The length is: %lf\n", &Length); //读入长度fscanf(fp,"The width is: %lf\n", &Width); //读入宽度Area = Length * Width; //计算面积Perimeter = 2 * Length + 2 * Width; //计算周长fprintf(fp,"Fence Output File\n"); //数据输出语句fprintf(fp,"The area is: %f\n",Area); //输出面积fprintf(fp,"The perimeter is: %f\n",Perimeter); //输出周长程序编译成功后,便可以从输入文件中读取长和宽,计算出周长和面积,并将其输出至输出文件。

2024年度《FEMAP示例入门与提高》版本83

2024年度《FEMAP示例入门与提高》版本83

根据桥梁的实际支撑情况,设置桥墩底部 的固定约束、桥面的滑动约束等。
通过FEMAP进行桥梁结构的有限元分析, 得到桥梁的应力、变形等结果,并评估其 安全性。
2024/3/23
20
05
求解器选择与结果输 出设置
2024/3/23
21
求解器类型介绍及选择建议
直接求解器
基于直接法,适用于中小规模问题,计算精度高,但内存消耗较大 。
的车身变形、加速度、能量吸收等数据。
02
可视化设计
根据数据的类型和特点,选择合适的图表类型和色彩方案,设计出直观
、易懂的可视化界面。
2024/3/23
03
结果展示
将设计好的可视化界面应用于汽车碰撞安全性分析结果,通过图表、动
画等形式展示车身在不同碰撞工况下的表现,帮助用户更直观地了解汽
车的安全性能。
飞机机翼结构优化设计结果
展示飞机机翼结构优化设计的结果,包括优化前后的性能对比、成 本降低和效益提升等方面的分析。
32
THANKS
感谢观看
2024/3/23
33
迭代求解器
基于迭代法,适用于大规模问题,内存消耗较小,但计算精度可能 受迭代次数和收敛准则影响。
选择建议
对于中小规模、对精度要求高的问题,推荐使用直接求解器;对于大 规模问题或需要快速求解的场景,推荐使用迭代求解器。
2024/3/23
22
结果输出设置方法
结果文件类型
支持多种格式的结果文件输出,如文本文件、 Excel文件、图形文件等。
2024/3/23
施加边界条件
根据实际问题,为模型施加适当的边界条 件,如固定约束、位移约束、力或压力载 荷等。

Femap模块说明

Femap模块说明

包含的主要功能 FEMAP (前后处理) (E002, E004) Femap 是一套具有通用用途,独立于CAD,解算器中立的工程有限元分析(FEA)前后处理器。Femap 可以从Ideas、NX、Solid Edge、SolidWorks、Catia v4、Pro/E、ACIS、Parasolid、IGES、STEP 等系统中导入CAD数据 。可以在本许可证中添加可选的 Catia v5 CAD 数据转换器(E075)。使用CAD几何尺寸为基准,可以构建工程 部件或组件的结构、热学和动态分析有限元模型,或者在传统的有限元建模流程中自下而上地进行构建。Femap 支持二十种FEA解算器,其中著名的有NX Nastran、MSC Nastran、ANSYS、ABAQUS 和 LS-DYNA。范围广泛的元素 类型、材料模型、理想化,包括中面与实体几何形状清除与简化,使得其可以针对任何工程结构创建有效而准确 的模型。Femap 包含使用Parasolid几何尺寸内核,实现线框、曲面和实体几何形状的集成几何尺寸编辑与创建 功能。
Femap with NX Nastran: 优化 (E508, E509)
Femap with NX Nastran: 超单元
( E510, E511)
Femap with NX Nastran: DMAP (E512, E513)
Femap with NX Nastran: 高级非线性解算器 (E514, E515)
Femap with NX Nastran:
转子动态模块
(E516, E517)
FEMAP
热分析解算器 (E305, E306)
FEMAP 高级热分析解算器(E307, E308)
FEMAP 流动分析解算器 (E309, E310)

2024版Femap整体介绍

2024版Femap整体介绍
撤销与重做
可通过Ctrl+Z和Ctrl+Y快捷键进 行撤销和重做操作。
视图调整与显示设置
视图方向
支持多种视图方向设置,如正视、侧视、俯 视等。
显示设置
可调整模型元素的显示属性,如颜色、线型、 线宽等。
视图风格
提供多种视图风格选项,如线框、隐藏线、 着色等。
视图裁剪
支持对视图进行裁剪,以便更好地观察和分 析模型局部细节。
后处理模块
提供丰富的结果可视化工具,帮 助用户直观地理解和评估分析结 果。
基本操作与快捷键使用
文件操作
包括新建、打开、保存模型文件 等,可通过快捷键Ctrl+N、
Ctrl+O、Ctrl+S等进行快速操作。
视图操作
支持平移、旋转、缩放等视图操 作,可通过鼠标拖拽或快捷键进 行操作。
选择操作
可通过单击、框选等方式选择模 型元素,支持多种选择模式。
02
Femap界面与操作基础
界面布局及主要功能模块
网格划分模块
建模模块
用于创建和编辑几何模型,支持 多种CAD数据格式的导入和导出。
提供多种网格生成技术和网格编 辑工具,以满足不同分析需求。
求解模块
支持多种求解器接口,可进行线 性、非线性、动力学等分析。
主界面
包括菜单栏、工具栏、模型树、 属性窗口以及图形窗口等部分, 为用户提供了直观的操作环境。
质量的有限元模型。 高效的求解器和后处理功能 Femap配备了高性能的求解器和灵活 的后处理工具,可以实现快速准确的
仿真结果分析和可视化。
丰富的材料库和单元类型
Femap内置了丰富的材料库和多种单 元类型,可以满足各种复杂结构和材 料的仿真需求。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CT 1690 – Student Guide for Femap 101 - v10.2
14 - 1
Lesson 14
FEA Modeling Debugging
Finite Element Mesh Sizing
Depending on the desired accuracy of the model, a course mesh (low number of larger elements) or a fine mesh (high number of smaller elements) must be created. For instance, a more complicated structure requires a finer mesh in order to produce accurate answers.
Fine Model
Accuracy for complicated geometry is improved Less distorted elements improves results
Higher number of Elements More Degrees of Freedom Increased Solve Time
CT 1690 – Student Guide for Femap 101 - v10.2
14 - 2
Lesson 14
FEA Modeling Debugging
Checking Results
It is always a good idea to do a “reality check” with the results of any Finite Element Analysis. Using engineering knowledge and common sense will allow a user to determine if the results make sense for the applied boundary conditions. For instance, an under under-constrained or “unconnected” (nodes not merged where they should be) model may exhibit much larger displacements than expected a displacement in the opposite direction of the applied load during a linear cantilever beam analysis. Some Good Practices: • • • • Always visually plot the models elements if possible for verification Make sure responses correspond with applied boundary conditions Check input loads with reaction forces: ΣF = 0 Hand calculations are always a great idea whenever possible
Pros
Cons
Lower number of Elements Coarse Model Less Degrees of Freedom Reduced Solve Time
Less accuracy for complicated geometry Distorted elements can be too stiff and misrepresent response
CT 1690 – Student Guide for Femap 101 - v10.2
14 - 3
Lesson 14
FEA Modeling Debugging
Model Debugging
Recommended minimum checks on input • Stiffness matrix checks • • • At the G-size After MPC Processing After All Processing
Lesson 14 Finite Modeling Debugging
Purpose: This lesson is an overview of methods to check and debug Finite Element Models. Topics: Finite Element Modeling Mesh Sizing Results Checking Model Debugging Common Errors Recommended Model Checks
Mass Checks • • • Grid point weight generator output Rigid-body mass checks Assembly mass checks
Loading checks
CT 1690 – Student Guide for Femap 101 - v10.2
CT 1690 – Student Guide for Femap 101 - v10.2
ቤተ መጻሕፍቲ ባይዱ
14 - 7
Lesson 14
FEA Modeling Debugging
Common Types of Errors (continued)
Beam Orientation Beam Releases Loading (Make sure that the model is loaded accurately) Finite Element Error Round-off Error (Can cause serious, serious problems) off Program Bugs (Please Report them to UGS Solutions via GTAC) • A list of known errors is maintained and distributed Plates not lining up (zipper effect)
14 - 4
Lesson 14
FEA Modeling Debugging
Model Debugging (continued)
Structural plots are useful primarily to visually verify model geometry. Other tools must be used to assess the numerical accuracy of a finite element model. These tools include many automatic error checks performed by NX Nastran and user-supplied diagnostic requests in the form of DIAG, supplied PARAM, DMAP Alters, and Case Control requests. NX Nastran performs many error checks during an analysis to ensure that all input data is in the proper format and usable. If an error is detected during data processing, an error message is generated. If the error is fatal, the analysis terminates. Many times NX Nastran errors have a number and a short description of the error which shows up in the .f06 file. Many times the same error number can represent a variety of different issues. In cases where the error is not obvious, consult the Help->Analysis menu and choose the error >Analysis message segment where the Error Message number appears. Go to the error number for a broader description.

Use of consistent units is of utmost importance!!! Always use unique IDs – NX Nastran sometimes allows for duplicate element IDs, but not always. Duplicates can and do lead to problems, especially during data recovery
CT 1690 – Student Guide for Femap 101 - v10.2
14 - 6
Lesson 14
FEA Modeling Debugging
Common Types of Errors
Mistakes in engineering judgment Approximations to physical behavior Engineering Theory Finite Element Theory Finite Element Implementation Modeling • Bolted connection • Welded connection • Corners • Transitions Connections • Beam to Plate • Beam to solid • Plate to solid
相关文档
最新文档