patran升程mnf各种注意事项
- 格式:doc
- 大小:324.00 KB
- 文档页数:7
文章主题:patran螺栓预紧力的参考点在机械设计和工程中,螺栓预紧力是一个至关重要的参数。
它决定了螺栓的紧固效果和工作性能,直接关系到机械设备的安全和可靠性。
而patran螺栓预紧力作为一个常用的预紧力工具,在工程领域中应用广泛。
1. patran螺栓预紧力的概念与原理patran螺栓预紧力是一种通过计算机辅助设计软件来模拟和计算螺栓预紧力的方法。
其原理是利用有限元分析方法,对螺栓和螺母的连接进行模拟,通过施加预紧加载,得出螺栓的预紧力大小。
这种方法可以直观地呈现出螺栓连接的受力状态,对于工程师来说非常直观和便捷。
2. patran螺栓预紧力的应用领域在实际的工程设计中,patran螺栓预紧力可广泛应用于各种机械设备、车辆和建筑工程中。
汽车发动机的螺栓连接、高铁轨道的螺栓紧固、建筑结构的螺栓连接等。
通过对螺栓预紧力的计算和分析,可以有效地提高设备的安全性和可靠性,减少故障的发生。
3. patran螺栓预紧力的计算方法通常,计算patran螺栓预紧力需要考虑一系列因素,包括螺栓的材料、螺纹形状、预紧加载力的施加方式等。
在实际工程中,可以通过调整这些参数,来优化螺栓的预紧效果。
并且,通过有限元分析软件的模拟,可以得到更加准确和可靠的预紧力数值。
4. 个人观点和理解从个人的角度来看,patran螺栓预紧力的应用对于机械工程设计和制造来说无疑是一项十分重要的技术。
它不仅可以提高产品的质量和性能,也能够减少因螺栓脱落或故障而造成的安全事故。
在未来,我相信随着计算机辅助设计技术的不断发展,patran螺栓预紧力的应用将会更加普及和成熟。
总结回顾通过本文的讨论,我们对patran螺栓预紧力有了更加深入和全面的了解。
我们从概念与原理、应用领域、计算方法及个人观点等方面进行了探讨,以期帮助读者更加深入地理解和应用这一技术。
patran螺栓预紧力的参考点是机械工程设计和制造中的一个重要技术,它为我们提供了一种模拟和计算螺栓预紧力的便捷方法,对于提高产品性能和安全性具有重要意义。
如何在PATRAN中转换单位?Patran为了给用户提供最大的便利性&开放性,Patran没有定义具体的单位制。
用户使用自己默认的自统一的单位制就可以了。
如果确实需要进行转换的话,利用PA TRAN中的Group→Transform→Scale,可以轻易的将PA TRAN的model在各座标系统间进行转换。
但须注意的是,此一转换只会将座标尺寸加以转换,而外力与边界条件、单元特性与材料常数等资料并未自动加以转换,用户必须特别注意。
(外力及边界条件可利用放大因子[scalefactor]的来快速修正)问如何在Patran中更改背景颜色在Patran界面下,进入到Display主菜单中,选择Color Palette;进入到调色板设置。
在一列颜色列表中,先选定黑色,调整“Lightness”值为1,然后再选定白色,把“Lightness”的值调整为0,然后点击Apply就可以了。
这样的设置能够保证背景和实体的充分显示,能满足截图打印的要求。
文件类型×.db数据库文件,binary×.db.bkup数据库备份文件,binary×.ses.nn会话文件,ASCII×.db.jou日志文件,ASCII×.bdf Nastran输入文件,ASCII*.log也是日志文件,对分析进程的记录,ASCII*.xdb结果数据库文件,ASCII*.op2 是nastran的计算结果文件。
(二进制)×.f04 一般包含nastran运行时的一些系统文件操作的信息*.f06 是结果文件(文本)。
*.MASTER *.dball ??都是中间文件,包含nastran运算时的中间结果,如刚阵、质量阵,以及重启动所需的信息。
print file指的是*.f06文件punch file指的是*.pch文件pro/e导入patran的问题要设置环境变量啊,MSCP_PROE_CMD=你的proe的可执行文件的路径。
第○章引言1.有限元FEM产品设计时,为使产品不会损坏,需要进行应力分析;为使产品不会屈曲,需要进行屈曲分析;为使产品不会疲劳破坏,应进行疲劳分析;为使产品不产生共振,需要进行振动分析;为使产品不产生大的变形,需要进行位移、挠度分析。
网格划分:模拟实际物体的几何形状单元属性:真正模拟物体的物理属性(要求解的也是物理量)约束和载荷:相当于“因“求解结果:由于“因”,通过系统产生的“果”。
2.Nastran分析功能Solution type:Normal modes正交模态分析Complex eigenvalue复特征值分析:直接法,模态法Frequency response频率响应分析:直接法,模态法Transient response瞬态响应分析:直接法,模态法Nonlinear transientImplicit nonlinearDDAM solution3.教程学习4.分析流程用MSC进行工程分析的一般流程是:建立分析模型→递交分析→后处理建立分析模型的过程如下图示:第一章基本操作1.视图和显示2.符号表示3.Group和List3.1Group组成:几何元素和单元元素目的:为了方便复杂的建模和后处理操作作用:操作大型模型时很有用,把一个模型分成几部分,进行编辑。
说明:(1)名字叫“default_group”的组是建立新的数据库时自动创建的,新生成的元素会自动放置在当前组中。
组在数据库中永久存在。
(2)Current group当前组:创建新的元素时放在此组中,每次只有一个组为当前组,当前组总是显示(posted)。
(3)Target group目标组:操作起作用的组。
(4)Posted group显示的组:组在视图窗口中显示,一个组可以张贴到多个视窗中,一个视窗可以张贴多个组。
(5)载荷, 边界条件, 坐标系, 场, 工况和结果不是组的成员。
(6)当前组总是显示。
选择Group/Post, 或在组窗口中将Action 设为Post,从而选择那些组被张贴到当前视窗中。
软件安装说明By Zuo2009-12-3本说明主要针对水工专业常用的几种数值模拟软件,对他们的安装方法进行了详细的介绍与说明。
推荐按照下文中出现的先后顺序安装各种软件。
Patran:软件版本:Patran 2007 r2。
(不建议使用Patran 2005 r2,该版本属内部测试版本,与其他程序不兼容)安装文件:光盘镜像文件“m-patrr2.iso”。
安装方法:1、首先了解本计算机名,在“我的电脑——属性——计算机名”中的“完整的计算机名称”查找,为了后面安装的方便,在这里可以点击更改计算机名,建议取个简单的名字,例如myhost或xndss。
(注:更改后一定要重启。
)2、载入镜像文件,光盘自动弹出欢迎界面,点击Patran 2007 r2。
3、点选“next”N次。
注意:在选择安装目录的时候,最好就用它的默认目录,装在C盘较好。
4、装好后,在选择默认文件夹时直接点next就可以。
5、接着程序提示输入license文件。
我们先进入光盘,拷贝光盘下的MAGNiTUDE文件夹到C:\ MSC.Software 里面(默认),并将文件夹更名为license,打开该文件夹,用记事本程序打开license.dat 文件,其第一行应为:SERVER thishost 007330757468 1700将里面的”thishost”更改成本计算机名。
6、运行文件夹中的lmtools程序,点击Config Services选项卡,将里面的Service Name改为MSC,Path to the Imgrd.exe file 一项中浏览选择当前文件夹下的Imgrd.exe。
Path to the license file 一项中浏览中选择license.dat(文件类型选择.txt)。
Path to the debug log file 一项中浏览,并在文件名一栏中手动填入license.log。
7、勾选Use Services,并勾选Start Server at Power Up。
1、 Q:Patran为何我的FEM选单中不会出现Hybrid Mesh?请在系统的环境变数中增加以下变数:A: PATRAN_USE_HYBRID_SURFACE_MESHER值设定为 TRUE , 这样在surface mesh处, 除了Iso Mesh跟Paver Mesh外,就会看到另外一个Hybrid Mesh的选项.2、Q:MSC多解析任务批处理的方法A:如果仅有一台机器可以进行解析运算,有时候任务比较多的时候会时间来不及.提交模型让机器计算之后只能在旁边傻看着,什么也做不了. 其实有一种比较好一点的方法.可以用批处理文件让机器连续自动处理,下班时运行披处理文件,第二天早上来看结果.方法如下:比如有3个模型,S1.MOD,S2.MOD,S3.MOD1. 分别将上诉3个模型导出为DAT文件2.建立批处理c:\mscvn4w2002\solver\bin\nastran S1.datc:\mscvn4w2002\solver\bin\nastran S2.datc:\mscvn4w2002\solver\bin\nastran S3.dat3. 双击4. 下班5. 上班6. 导入解析结果.3、 Q:在 Patran里如何Move 一组Points 的位置 , 而不改变这组 Points 的 ID 编号?A:Group/Transform/Translate的功能, 这样不但编号不会变, 连property跟边界条件都会保留.4、Q:Patran如何执行多次Undo?A:所有Patran的操作步骤, 都记录在最新的一个patran.ses.xx中,如果需要多次undo, 可以刪除最后不需要的步骤指令行, 再利用 File -> Session -> Pl ay 的方式, 执行改过的patran.ses.xx , 这样可以无限制的undo。
5、Q:Patran中如何定义杆件之间的铰接?A:用的是rod元素,不需要定义铰接,因为rod元间本身就是以铰接形式连接。
patran单位制“patran中单位是封闭的在patran,nastran中,单位制由用户自己确定,只要使用一套自封闭的单位制系统即可。
例如,全部使用国际单位制:m,s,kg,N,Pa,kg/m^3,m/s,m/s^2等。
输入各种参数时,用户按照自己确定的单位制将参数换成该单位制下的相应数值直接输入,而不必连带单位。
但是,当存在惯性力而进行动力或模态分析时,由于加速度的存在,单位的使用一定要注意,不要因为单位制产生错误。
如果一定要使用非封闭单位制,例如长度用mm,而其他均采用国际单位,那么,可以用nastran 的参数“WTMASS"来调节(ANALYSIS->Solution Type->Solution Parameters->Wt.-Mass Conversion)。
具体到这里(长度用mm,其他均采用国际单位),则要取WTMASS=103。
如果只做静力分析,那么mm,N,MPa正好是封闭的可以使用。
”wt.-mass Conversion的含义引用jiankelan大侠的帖子:“wt.-mass Conversion,是重度和密度之间的系数.在要求输入密度的地方,你可以给密度,也可以给重度.如果给重度的话,就要给出wt.-mass Conversion,就是1/g.具体是多少根据你采用的单位制确定,比如你采用国标的话,就是1/9.8=0.10204.如果你给的直接就是密度,wt.-mass Conversion就是1, ”还有涉及到单位的地方是模型导入的时候,patran默认导入模型的单位是英寸,如果你要导入的模型单位不是英寸,先要设置菜单栏中的preferences->geometry->geometry scale factor,选择你所导入的模型的单位是英制、米制还是毫米制。
我也搞不太懂,上论坛翻以往的帖子得到一些印象,有理解错的地方请指正。
PATRAN的一些精华小技巧Patran是一种广泛使用的有限元前处理软件,它允许用户构建和修改有限元模型。
它具有许多实用和高效的功能,能够极大地提高用户的工作效率。
以下是一些Patran的精华小技巧,帮助用户更好地使用该软件。
1. 快速构建模型:在Patran中,可以利用快捷键和鼠标操作来快速构建模型。
比如,可以使用鼠标中键进行平移操作,使用滚轮进行缩放操作,使用Ctrl键进行选择多个实体等。
这些操作可以大大提高模型的构建速度。
3. 使用图层管理:在Patran中,可以使用图层管理功能来管理显示图形。
通过将实体分配到不同的图层,可以在不同的情况下快速控制图形的显示或隐藏。
点击"View"菜单中的"Layer Manager"可以打开图层管理对话框,可以通过设置不同的属性来配置图层。
4.利用组和装配:在建立大型模型时,可以使用组和装配来管理模型。
可以将相似的实体组合在一起形成一个组,或者将多个组组合在一起形成一个装配。
这样可以更好地组织模型,并且可以更方便地对模型进行修改和分析。
5. 使用网格划分器:在Patran中,可以使用网格划分器来自动划分网格。
只需选择要划分的曲线或表面,然后选择网格划分器,设置相应的参数,即可自动生成网格。
这样可以节省大量的时间和劳动力。
6. 使用模型检查器:在Patran中,有一个强大的模型检查器,可以帮助用户检查模型的几何和拓扑错误。
只需点击菜单栏上的"Analysis",然后选择"Model Checker",即可打开模型检查器对话框。
在这里,可以选择要检查的类型,并查找模型中的错误。
8. 利用Patran的接口功能:Patran具有与其他有限元软件的接口功能,可以与Nastran、Abaqus等软件进行数据的传递。
通过使用接口功能,可以方便地在不同的软件之间传递模型和结果数据。
以上是一些Patran的精华小技巧,希望对用户能够更好地使用该软件提供帮助。
MSC.Patran PCL HandbookIn a Nutshell (7)What is PCL? (7)What can PCL be used for? (8)How does PCL work? (9)All you really need to know is on this page! (10)Documentation (10)PCL for Everyone (11)Entering Equations (11)Entering Data (12)Session Files (13)Rebuilding Models (14)PCL for the More Adventurous (17)Parametric Modeling (17)Adding a Graphical User Interface, GUI (21)Exercise 1: Session Files (22)PCL Programming Basics (24)Overview (24)PCL Expressions (26)Expressions, Comments, Syntax Tips (26)Identifiers (28)Naming Conventions (28)Variable / Function Scope (29)Structure of a PCL Function (30)Function Basics (30)Simple PCL function Example (31)Exercise 2: Hello World! (33)Exercise 3: Effective PCL (34)PCL Operators (35)String comparisons (35)PCL Variables and Constants (36)Datatypes (36)Variable Scope (37)Directly Allocated Arrays (38)Virtual arrays (39)Virtual strings (41)Loop Control Statements (42)For Loop (42)While Loop (42)Repeat Loop (43)BREAK (44)CONTINUE (45)Exercise 4: Writing Files (46)Exercise 5: Reading Files (48)Conditional Control Statements (49)IF Statement (49)SWITCH Statement (50)Structure of a PCL Function (51)Compiling and Linking PCL Functions (54)Primary PCL Directives (55)Compiling PCL outside of MSC.Patran (59)Linking Compiled Libraries (60)Other PCL Directives (61)Start Up Files (62)Exercise 6: p3epilog.pcl (63)Debugging (64)Debugging Compile Errors (64)Debugging Runtime Errors (65)Accessing PCL Functions (67)From The Command Line (67)From Any MSC.Patran Form (68)PCL Functions with Field Variables (69)MSC.Patran Built-In Functions (70)Naming Conventions for Applications (71)Naming Conventions for Other Operations (72)Exercise 7: Group Elements By Shape (74)Graphical User Interface (75)The PCL Class Statement (76)PCL Widgets (77)Required Functions for Building/Displaying a Form (78)The init() Function (78)The display() Function (79)Widget Callbacks (82)What Are They? (82)What Are They Used For? (83)Callback Arguments (Widget Function Data) (83)Widget Placement (85)Widget Variables (87)Modifying Widgets (88)Getting Data from Widgets (89)Putting it all Together (Example) (90)Exercise 8: Simple Form (92)The C-Preprocessor and Include Files (93)Make Files (94)Exercise 9: Callbacks (96)Handling Errors and Messaging (98)Errors from Built-In Functions (98)Custom Error Messages (99)Using User Messages Database (99)Without a Messages Database (100)Taking Advantage of the UNDO Feature (102)Select Mechanism (103)Select Mechanism GUI Mechanics (103)Select Databoxes, Select Frames, and Select Menus (103)GUI PCL Example (105)List Processor (106)List Processor Mechanics (106)All You Really Need to Know (107)Exercise 10: Form to Group Elms By Shape (110)Executing Programs Outside of MSC.Patran (112)Spawning Remote Processes (112)Locking a database (114)Using C and Fortran executables to access a MSC.Patran database directly. (115)External Access of an MSC.Patran Database (116)Special Widgets (118)File Widget (118)Spreadsheet Widget (121)Exercise 11: File Widget (122)Adding Help/Description to your PCL (123)Percent Complete (124)Functions (124)Example (124)Event Manager (125)General (125)Functions (126)Example (126)Primitive Graphics (127)Graphic Objects (127)Graphic Segments (128)Example (129)Another Example (130)Exercise 12: Primitive Graphics (131)MSC.Patran Customization (132)Adding Utility Programs to the Main Menu (132)Example (133)Example: p3_user_menu.my_menu.def (134)Customizing the MSC.Patran Toolbar (135)Exercise 13: Pulldown Menu (138)Exercise 14: Toolbar (139)Some Final Thoughts (141)Appendix A (144)Built-in Function Examples (144)Documentation for a typical MSC.Patran built-in function. (145)To get all the nodes and their global coordinates (146)To get the topology of every element (147)To get the shape of every element (148)To get all the element connectivity for all elements (149)To get the elements associated to a particular element property set (150)To get an element property value (shell thickness) for a specific element (151)To get a material property value (153)To get a list of all groups (154)To get the nodes and elements associated to the current group (154)To get result values for specified elements (155)Appendix B (164)Strings & String Functions (164)Declaration (165)Initialization (165)String Comparisons (165)Functions (166)Appendix C (174)Noteworthy Functions (174)sys_mov e_raw(...) (175)mth_array_search(...). (176)mth_sort(...) . (177)mth_sort_row(...).. (178)mth_sort_column(...) . (178)fem_geom_edge_length(...) .. (179)fem_geom_face_area(...). (179)fem_geom_elem_volume(...). (179)fem_geom_elem_location(...) .. (180)Appendix D (181)Form Spacing Parameters (appforms.p) (181)* SPACING (182)Appendix E (205)MSC.Patran Architecture (205)Appendix F (207)Shareware Compiling Functions (207)Appendix G (210)Parametric Patran (210)Appendix H (216)Additional List Processor Notes (216)List Processor Mechanics (217)List Processor Functions (217)List Processor Sublist Functions (219)List Processor Attribute Functions (220)Miscellaneous List Processor Functions (220)List Processor Examples (222)Easy to Use List Processor Functions (226)Appendix I (227)Key Mapping (227)Appendix J (230)Widget Classification (230)Appendix K (233)User Defined AOM (233)In a NutshellWhat is PCL?❑PCL stands for Patran Command Language❑Comprehensive, fully functional computer programming language❑Specifically and uniquely suited for MCAE applications ❑Delivered as a part of MSC.Patran❑Versatile and easy to useWhat can PCL be used for?❑Integrate application or site-specific programs with the MSC.Patran user interface and database❑Generate parametric/variational models for design/optimization ❑Integrate commercial and/or in-house analysis codes with MSC.Patran❑Display custom graphics❑Access the MSC.Patran database❑Create new and/or enhanced MSC.Patran functionality❑Database management for analysis files❑Eliminate tedious, repetitive proceduresHow does PCL work?❑All MSC.Patran commands are first interpreted by the PCL command interpreter❑PCL expressions are interpreted by a C program❑PCL functions can be compiled into libraries (more efficient binary representation) and “linked” with a MSC.Patran session❑“Built-in” PCL functions are written in C or FORTRAN❑MSC.Patran forms and menus can be created via PCL calls to Xlib, the X-window function library❑FORTRAN and C functions can be “linked” with MSC.Patran through PCLAll you really need to know is on this page! Documentation❑PCL and Customization - General programming guide for PCL.How to build forms, compile, manage libraries, access thedatabase, read/write files, etc.❑PCL Reference – Description of functions written to the session file.❑Develop: The MSC.Patran Toolkit – Documentation of additional functions for database access, etc.PCL for Everyone Entering EquationsUse of PCL when creating spatial fields:‘X + ‘X**2 –sinr(‘X)The PCL interpreter interprets anythingimmediately following a ‘ symbo l as afield variable as opposed to a PCLfunction, such as, sinr().Entering DataUse of PCL when entering geometric coordinates: [ `5./16.` 0 0 ]The PCL interpreter “evaluates” expressions enclosed in back tics, “`”.Other examples:[ `radius/length` 0 0 ]< `cosr(theta)` 1 1 >[ `MyFunction(radius)` 0 1 ]Session FilesSession and journal files are comprised entirely of PCL commands. Model changes (dimensions, mesh density, etc.) can be made quickly by editing and then replaying the session or journal files.$# Session file patran.ses.01 started recording at 16-Aug-01 14:33:54$# Recorded by: MSC.Patran 2001STRING asm_create_patch_xy_created_ids[VIRTUAL]asm_const_patch_xyz( "1", "<10 10 0>", "[0 0 0]", "Coord 0", @asm_create_patch_xy_created_ids )$# 1 Patch created: Patch 1STRING sgm_edit_surface_add_h_edit_ids[VIRTUAL]sgm_edit_surface_add_hole( 1, 1., TRUE, "", "[5 5 0]", "", "Surface 1", @sgm_edit_surface_add_h_edit_ids )$# 1 Surface Edited: Surface 1$# Session file patran.ses.01 stopped recording at 16-Aug-01 14:34:52Rebuilding ModelsThe following session file creates a trimmed surface, 10” x10”with a 1” diameter hole at the center. Note that the parameter that controls the diameter of the hole is indicated below.$# Session file patran.ses.01 started recording at 16-Aug-01 14:33:54$# Recorded by: MSC.Patran 2001STRING asm_create_patch_xy_created_ids[VIRTUAL]asm_const_patch_xyz( "1", "<10 10 0>", "[0 0 0]", "Coord 0", @asm_create_patch_xy_created_ids )$# 1 Patch created: Patch 1STRING sgm_edit_surface_add_h_edit_ids[VIRTUAL]sgm_edit_surface_add_hole( 1, 1., TRUE, "", "[5 5 0]", "", "Surface 1", @ sgm_edit_surface_add_h_edit_ids )$# 1 Surface Edited: Surface 1$# Session file patran.ses.01 stopped recording at 16-Aug-01 14:34:52In the session file below, the previous session file is edited to change the hole diameter from 1” to 4”$# Session file patran.ses.01 started recording at 16-Aug-01 14:33:54$# Recorded by: MSC.Patran 2001STRING asm_create_patch_xy_created_ids[VIRTUAL]asm_const_patch_xyz( "1", "<10 10 0>", "[0 0 0]", "Coord 0", @asm_create_patch_xy_created_ids )$# 1 Patch created: Patch 1STRING sgm_edit_surface_add_h_edit_ids[VIRTUAL]sgm_edit_surface_add_hole( 1, 4., TRUE, "", "[5 5 0]", "", "Surface 1", @ sgm_edit_surface_add_h_edit_ids )$# 1 Surface Edited: Surface 1$# Session file patran.ses.01 stopped recording at 16-Aug-01 14:34:52Session files can be executed or “played” by selecting File/Session/Play … from the top menu.PCL for the More Adventurous Parametric Modeling❑Session files can be parameterized by defining and using variables during the MSC.Patran session❑First, variables are declared and initialized via the MSC.Patran command lineSecond, the variables are used as input into the appropriate MSC.Patran forms (note the use of ` `, back tics)Upon application, the PCL interpreter evaluates `radius` (i.e., sets it equal to 1.0 in this example) and creates the curve. Note that the variable is passed to the session file in its unevaluatedBy using variables as parameters during MSC.Patran input, it is very easy to edit and change dimensions, mesh parameters, etc. in the session file.PCL for the more Adventurous Adding a Graphical User Interface, GUIThe next step might be to create a user interface to run the plate session file!Exercise 1: Session FilesUse MSC.Patran to create a parameterized session file that createsa rectangular surface with an arbitrarily located hole.1) Create variables for the dimensions shown below.2) Steps:a) Create variables using MSC.Patran’s command lineb) Create/Surface/XYZ (use variables length and width)c) Edit/Surface/Add Hole (use x_center, y_center, and diameter) Extra credit: Include error checking, i.e., it doesn’t make sensefor the hole to be outside the surface boundary.IF (x_center + diameter/2.0 > length) THEN RETURNExtra credit: Include meshing, boundary conditions, elementproperties, etc.Extra credit: Use ui_read_real(prompt) to enter the variablevalues interactivelyExtra credit: Turn your session file into a PCL FUNCTION.Exercise 1 Below is an image showing an MSC.Patran form allowing the interactive creation of the model for this exercise.NB – See Appendix G for notes about Parametric Patran.1) Variables and macros are defined interactively via a GUI2) Variables and macros are persistent3) Plus, more. See Appendix G for the detailsPCL Programming Basics Overview❑PCL is a full-featured programming language.❑Operators for arithmetic, relational, and string expressions.Examples include:❑Variables with type, scope, and dimension attributes INTEGER i, j, status, NodeIds(1000)LOGICAL flagREAL xyz(1000, 3), pressure(100), timeGLOBAL STRING my_group[32], all_groups[32](100)❑Dynamically allocated virtual strings and arraysINTEGER node_ids(VIRTUAL)STRING groups[32](VIRTUAL), MyString[VIRTUAL]❑Intrinsic functions for math, string manipulation, etc.sinr(angle)cosd(angle)mth_abs(MyVal)mth_sort(MyArray, CompactDuplicates, NumLeft)mth_array_search(MyArray, Look4, Sorted)str_length(MyString)str_substr(MyString, Position, SubStringLength)str_index(StringToSearchIn, StringToSearchFor)str_token(MyString, Delimiter, TokenNumber, [Compress])PCL Programming Basics ❑Loop control features, such as, WHILE, FOR, REPEAT, and LIST❑Conditional control structure, such as, IF-THEN-ELSE and SWITCH-CASE❑Subroutine (procedure) and function (command) calls❑Class grouping of related functions❑Read/write access to external ASCII and/or binary filestext_open(FileName, Options, 0, 0, FileId)text_read_string(FileId, InString, InStringLength)text_write_string(FileId, OutString)text_read(FileId, Format, MyIntegers, MyReals, MyChar)text_write(FileId, Format, MyIntegers, MyReals, MyChar)text_close(FileId, Options)file_exists(FileSpec, Options)file_delete(FileSpec)❑Access to MSC.Patran “built-in” functions that allow for direct access to the MSC.Patran database, geometry creation,drawing graphic primitives,db_count_nodes(NumNodes)db_get_node_ids(NumNodes, NodeIds)asm_const_grid_xyz(output_ids, coordinates_list, coord_frame, @created_ids)PCL Expressions Expressions, Comments, Syntax Tips❑Sample PCL expressions include:theta = 360.0 – MTH_ASIND(MyAngle)IF (radius >= 20.0) THEN radius = 20.0length = str_length(MyString)build_gear_geometry(30., 56., 3)❑PCL comments begin with a “/*” and end with a “*/”/*This is a comment.Look Ma, I’m making comments in PCL!Has anyone seen or heard from Elvis lately?*/a = 2 /* set mysterious factor equal to 2 */❑Alternatively, single line comments may begin with “$”$ Don’t you just hate to comment your programs?❑More than one PCL expression can co-exist on a line using a semi-colon, “;”alpha = 30.0; beta = 120.0❑PCL expressions can be continued on subsequent lines by using the “@” symbolui_wid_set(main_form, @“HEIGHT”, @NewHeight)ui_wid_set( /* widget_id */ main_form, @/* parameter */ “HEIGHT”, @/* value */ NewHeight)PCL Expressions ❑Don’t break expressions in the middle of a keyword, constant, or identifier❑Multiple blanks are the same as a single blank space❑Lines beginning with “!” (bang operator) are echoed to the xterm (UNIX) or command window (NT), but are not executedIn MSC.Patran type: !`i` nodes createdIn the xterm you see: %27 nodes created❑PCL expressions beginning with “>” are echoed to the session file❑PCL expressions can be typed directly into MSC.Patran at the command line❑PCL expressions may also be created with an editor in a text file and directed into MSC.Patran as a session file or by using the PCL directive !!INPUTIdentifiersNaming Conventions❑Function names and/or variable names are called identifiers ❑Can be up to 32 characters long❑Must begin with a non-digit❑Case insensitive (as is all of PCL)❑Cannot be a reserved keyword, i.e., FOR, IF, etc.❑Valid identifierscurrent_groupCurrentGroupMyString❑Invalid identifiersa_very_very_very_very_very_very_very_very_long_name 95abclistIdentifiers Variable / Function Scope❑Global variable names and functions share the same name space❑When two function names or two variable names conflict, the most recent addition supercedes the previous❑When function names and variable names conflict, the variable name takes precedence❑When compiling functions, PCL will indicate if a function name is superceded by writing “Cleared memory function” to thehistory window❑Hint: Use a unique prefix to keep function definitions separate,i.e au_do_this_and_that.pclStructure of a PCL Function Function Basics❑PCL functions begin with a FUNCTION statement and end with an END FUNCTION statement.❑The FUNCTION statement may contain an argument list to be passed in or out of the function.❑An optional RETURN statement can be used to return a calculated value from the function to the calling statement.❑Processing of the function terminates at either the END FUNCTION statement or a RETURN statement.❑There may be multiple RETURN statements within a single function.Simple PCL function Exampleanother_simple_function(29)$#My favorite number is 29$#My least favorite number is 13Sample output. The ui_write functions writetext to the history window, the session file(patran.ses.##), and the journal file(model.db.jou)Exercise 2: Hello World!Write and execute a PCL function that accepts a single real number argument and echoesHello World, my favorite number is ….to the MSC.Patran session file and history window.Your function will use either the ui_write(…),ui_writef(…), or ui_writec(…) functions.If you use the ui_writef(…) and ui_writec(…) functions, refer to the documentation for the correct format specifiers.Extra credit: How would this function change if you wanted to echo your favorite 10 numbers to the session file? Extra credit: How would this function change if you wanted to echo your favorite color to the session file?Exercise 3: Effective PCLWrite an essay on how the effective use of PCL could:a) Help create a lasting world peaceb) Eliminate world hungerc) Conquer the common coldd) Stop global warmingExtra credit: How could PCL be used to find Elvis?PCL OperatorsExamplesDist = mth_sqrt((x2-x1)**2 + (y2-y1)**2 + (z2-z1)**2) MyString3 = MyString2//”hijk”IF (a == b) THEN c = dIF (a == b && a == c) THEN ui_write(“Equilibrium”)x += 1 (this is equivalent to x = x +1)String comparisons❑The string comparison operators are special in that they ignore trailing blanks and uppercase and lowercase. Therefore, all of the following expressions are TRUE“ABC” == “ABC ““ABC” == “abc”❑Leading blanks are compared, i.e., “TEST” != “ TEST”❑To perform case sensitive comparisons use the str_equal() function, i.e.,IF (str_equal(GroupName1, GroupName2)) THEN RETURN 0PCL Variables and Constants Datatypes❑LOGICAL Boolean value: TRUE or FALSELOGICAL done, created31-1)❑INTEGER Value between +/- (2INTEGER i, num_nodes, node_id❑REAL Single precision floating value between 1.0E-30 and1.0E+30 (positive or negative)REAL x, y, z, force, pressure❑STRING Character string surrounded by double quotes, “Have you seen Elvis?”. Size or string length is defined with brackets, [ ]STRING FileName[80], GroupName[32]❑WIDGET Value is assigned by calls toUI_WIDGET_NAME_CREATE(…), used to create andmanipulate forms, etc.WIDGET main_form, MyButton, group_lboxVariable Scope❑GLOBAL Available to all functions during the MSC.Patransession❑LOCAL Default, only visible within the defining function ❑STATIC Same as LOCAL, but retains its value betweencalls❑CLASSWIDE Available to all functions in the CLASS andretains its value during the MSC.Patran sessionDirectly Allocated Arrays❑Directly allocated arrays can have any number of subscripts (dimensions), defined within parentheses ()❑Assigned upper and lower bounds, ArrayName(Lower:Upper)INTEGER MyArray(2:10)❑ Default lower bound is 1 (not 0) ❑ Available for all datatypes❑Row major (unlike Fortran which is column major)INTEGER MyArray(2, 3) = 1, 2, 3, 4, 5, 6❑Array dimensions are inherited from the argument list, i.e., PCL passes by reference❑Declaration ExamplesREAL displacements(6, 200) STRING group_names[32](20) INTEGER ids(0:2, 0:4, 0:10) LOGICAL exists(12)Virtual arrays❑Any variable can be defined as a VIRTUAL array instead of a directly allocated array. Virtual arrays do not have storagelocations assigned to them at program initialization. The size and amount of storage is allocated as requested and can bereused for other virtual arrays.❑To declare a virtual array, use the keyword VIRTUAL in place of the subscripts for the declaration, i.e.,REAL MyVals(VIRTUAL)INTEGER NodeIds(VIRTUAL)❑Storage is allocated using the function, sys_allocate_array(), or sys_allocate_array(MyVals, 1, 300)sys_allocate_array(MyVals, 1, 300, 1, 3)sys_allocate_array(MyVals, 1, 300, 1, 3, 0, 5)etc.❑Storage may be reallocated using the function,sys_reallocate_array(),sys_reallocate_array(MyVals, 1, 300, 1, 3)❑Storage may be freed using the function, sys_free_array(), sys_free_array(MyVals)Virtual array examplePCL Variables and Constants Virtual strings❑Any string variable can be defined as a VIRTUAL length string instead of a fixed length string. Virtual length strings do nothave storage locations assigned to them at programinitialization. The string length is allocated as requested and can be reused.❑To declare a virtual length string, use the keyword in place of the subscripts for the declaration, i.e.,STRING picklist[VIRTUAL]❑The string length is allocated using the sys_allocate_string() functionsys_allocate_string(picklist, 1000)❑The string length may be modified using thesys_reallocate_string() functionsys_reallocate_string(picklist, 2000)❑The string storage may be freed using the sys_free_string() functionsys_free_string(picklist)❑ A virtual length string can also be a virtual array, i.e., STRING picklists[VIRTUAL](VIRTUAL)Loop Control StatementsFor Loop❑SyntaxFOR (var=numeric_expr TO numeric_exprnumeric_expr label statements … END FOR❑ExampleAvgTemp = 0.0FOR (i = 1 TO NumNodes) AvgTemp += NodalTemp(i) END FORAvgTemp = AvgTemp/NumNodesWhile Loop❑SyntaxWHILE (logical_expression ) [label ] statements … END WHILE❑ExampleAvgTemp = 0.0 i = 1WHILE (i <= NumNodes)AvgTemp += NodalTemp(i) i += 1 END WHILEAvgTemp = AvgTemp/NumNodesRepeat LoopThis is similar to a WHILE Loop except that it will always be executed at least once. Only use REPEAT loops if you want to ALWAYS execute the loop at least once, otherwise us a WHILE loop.❑SyntaxREPEAT [label]statements …UNTIL (logical_expression)❑ExampleAvgTemp = 0.0i = 1REPEATAvgTemp += NodalTemp(i)i += 1UNTIL (i > NumNodes)AvgTemp = AvgTemp/NumNodesBREAKThe BREAK statement is used to exit a loop prior to its normal termination. It can be used in any of the loop statements.BREAK [❑END WHILE…❑Example 2 (nested loops, using labels)WHILE (i <= NumNodes) MainLoopWHILE (j <= 100) AnotherLoopWHILE (k <= 200) InnerLoopIF (status != 0) THEN BREAK MainLoopIF (status != 0) THEN BREAK AnotherLoopIF (status != 0) THEN BREAKIF (status != 0) THEN BREAK InnerLoopEND WHILEEND WHILEEND WHILECONTINUEThe CONTINUE statement is used to skip to the end of the loop ❑SyntaxCONTINUE [label]❑Example 1 (reading a text file)INTEGER file_id, lengthSTRING read_str[80]/* read grid information */WHILE (text_read_string(file_id, read_str, length) == 0)END WHILE❑Example 2 (nested loop, using labels)WHILE (i <= NumNodes) MainLoopREPEAT InnerLoopCONTINUE MainLoopBREAK InnerLoopCONTINUECONTINUE InnerLoopUNTIL (j > 1000)END WHILEstatements …Exercise 4: Writing FilesCreate a PCL function to write nodal data to a user-defined file. 1) The function should have a single argument, the filename to becreated, i.e., FUNCTION write_nodes_to_file(FileName)2) The data should be written to the file as a table, i.e.,Node Id x-coordinate y-coordinate z-coordinate3) Use virtual arrays4) Use the following built-in functions:db_count_nodes(NumNodes)db_get_node_ids(NumNodes, NodeIds)db_get_nodes(NumNodes, NodeIds, rcids, acids, NodeXYZ)text_open(FileName, Options, idum, idum, FileId)text_close(FileId, Options)text_write(FileId, Format, Ints, Reals, Chars)text_write_string(FileId, OutString)5) Use the documentation if you have questions about thearguments to the built-in functions.6) Think about your choice for the format argument in thetext_write(…) function. Will your file be comma or spacedelimited? Will it be fixed or free format?7) Sample code outline:a) Declare variablesb) Count nodes in the databasec) Allocate arraysd) Get node Idse) Get node coordinatesf) Open fileg) Write data to the file with a looph) Close filei) Be sure to include a message that the file output is completeWriting Files Extra credit: Include a header line at the top of the file thatincludes the filename and the total number of nodeswritten to the file.Exercise 5: Reading FilesWrite a function to read the file created in Exercise 4.1) The function should accept a single argument, i.e., the filenameto be read.FUNCTION ReadFile(FileName)2) Use the data in the file to create nodes with the following built-in function from the PCL Reference Manual:fem_create_nodes_1(RefCIDList, AnalysisCIDList, GeomFlag, @NodeIDList, XYZList, NodesCreatedList)3) Use the following built-in functions:text_open(FileName, Options, idum, idum, FileId)text_close(FileId, Options)text_read(FileId, Format, Ints, Reals, Chars)4) Sample code outline:a) Declare variablesb) Open the filec) Read the file within a loopd) Create new nodes as the file is read within the loope) Close the fileExtra credit: What if a node ID to be created already exists in the database?Extra credit: What if the file to be read doesn’t exist? Whatfunction can be used to determine if a file exists? Extra credit: Searching the documentation reveals anotherfunction that can be used to create nodes, i.e.,db_create_nodes(num_nodes, rcids, acids, xyz, group_id,node_ids, node_exists). Why might you use thisfunction versus fem_create_nodes_1(…)?Conditional Control Statements IF Statement❑SyntaxIF (logical_expression) THENstatements …ELSE IF (logical_expression) THENstatements …ELSEstatements …END IF❑ExampleIF (MyKeyWord == “CBAR” || MyKeyWord == “CBEAM”) THEN statements …ELSE IF (MyKeyWord == “CTRIA” || MyKeyWord == “CQUAD”) THEN statements …ELSE IF (MyKeyWord == “GRID”) THENstatements …ELSEstatements …END IF。
patran路径-回复您好!针对您提到的主题"patran路径",我将为您撰写一篇1500-2000字的文章来一步一步回答。
请您耐心阅读,希望对您有所帮助。
标题:深入了解Patran路径正文:导言:在现代工程设计过程中,计算机辅助工程(CAE)软件具有重要作用,可以大幅提高工作效率和准确性。
而Patran作为最受欢迎的CAE前后处理软件之一,其路径设置是一个关键的环节。
本文将深入讨论Patran路径的基础知识、设置方法以及一些常见问题的解决方法,帮助您更好地理解和使用Patran软件。
一、Patran路径的基础知识准备工作非常重要,所以首先我们将了解一些Patran路径的基本知识。
Patran路径是指软件在计算机上的目录结构,包括可执行文件、库文件、设置和临时文件等。
1. 可执行文件路径:Patran的可执行文件通常位于一个特定的目录中。
在安装Patran软件时,可以选择将其安装在系统的某个路径下,而这个路径就是Patran的可执行文件路径。
2. 库文件路径:Patran使用的库文件一般位于一个固定的目录中,这些库文件包含了Patran软件的各种功能和算法。
对于用户而言,了解库文件路径可以方便地定位到需要的库文件,进行自定义设置和扩展功能。
3. 设置文件路径:Patran有许多配置选项和参数,这些设置文件存储在特定的目录中。
用户可以通过修改这些设置文件,来自定义和优化软件的表现和功能。
4. 临时文件路径:在运行Patran时,软件会生成一些临时文件。
这些文件可以包含计算结果、中间数据和临时文件等。
了解临时文件路径可以帮助我们定期清理不需要的临时文件,以释放磁盘空间。
二、设置Patran路径的方法要正确设置Patran的路径,首先需要找到相关的安装目录和配置文件。
下面将一步一步介绍如何设置Patran的路径。
1. 找到可执行文件路径:打开计算机资源管理器或命令提示符窗口,在搜索栏中输入"Patran.exe"(根据Patran的实际可执行文件名进行搜索)。
课程 1. 入门目的:本次练习中,学习内容如下:⏹进入MSC/PATRAN并运行一个过程文件⏹对窗口和框架进行移动、调整尺寸及图标化操作⏹熟悉屏幕拾取⏹熟悉在线帮助的使用模型描述:本练习中,将学习如何进入MSC/PATRAN、生成一个MSC/PATRAN数据库及运行一个已存在的过程文件以生成一个用于这次练习的MSC/PATRAN模型。
还将练习对图形窗口和主框架进行移动、调整尺寸及图标化操作。
此外,还要学习如何使用在线帮助。
由于本次练习的重点是学习MSC/PATRAN的基本知识,因此,在练习的过程中穿插讨论了一些MSC/PATRAN的通用命令格式及操作。
练习过程:1.在X—窗口中键入patran。
此窗口中将会显示有关状态信息。
之后MSC/PATRAN主框架将出现。
Main Form如下图:最初,除File菜单外,主框架中的其它菜单都是灰色的。
通常,为利于操作,MSC/PATRAN将把不可能执行的选项设成灰色。
例如,移动鼠标光标到Main Form的File上,单击鼠标左键。
在下拉式菜单中,只出现与数据库有关的操作。
因为运行MSC/PATRAN之后的第一件事是创建或打开一个数据库。
建立一个新的数据库并命名为exereise_1.db。
File/NewNew Database Name:片刻之后,出现绘图窗口。
当建立一个新数据库时,将出现New Model Preferences对话框。
选择框中容差区的不同选项,可使MSC/PATRAN以两种不同方式区分模型中相邻的两个点。
在Tolerance中选Based on Model时,是以模型中最大尺寸的0.05%做为容差,若选Default,则以缺省值0.005作为模型的容差。
在这个练习中,选择Default选项。
在New Model Preferences对话框中,还可以选择Analysis Code 和Analysis Type,它们将影响建模期间各种对话框的内容。
Patran操作步骤仅供参考,照搬的切小JJ3.1.1创建数据库文件1)任务栏中点【File】,选择New,文件名输入yuan,点。
2)会出现如图3-1这样的一个选择项,Analysis Code下选项选择MSC.Nastran,Analysis Type下的选项选择Structural,点。
图3-1 创建文件选择区3.1.2创建几何模型1)任务栏中点【Geometry】,Action→Create,Object→Solid,Method→Primitive,点击按钮,弹出如图3-2所示菜单:图3-2 创建平板菜单栏2)设定长宽高X Length list→60, Y Length list→40, Z Length list→1, 选择基点Base Origin Point List→[-30 -20 0],点,得到如图3-3所示平板。
图3-3 创建平板3)创建圆柱:点击按钮,出现如图3-4所示菜单:图3-4 创建圆柱菜单栏4)设定圆柱高Height List→5,半径Radius List→2,基点Base Origin Point List →[0 0 0],点。
得到如图3-5所示模型:图3-5 带圆柱板5)【Geometry】菜单栏中,Action→Edit,Object→Solid,Method→Boolean,点击按钮,弹出如图3-6所示菜单:图3-6 Boolean菜单6)选中Target Solid下的命令框,左键单击平板,选中Subtracting Solid List 下命令框,左键单击圆柱,点,得到图3-7所示带圆孔板:图3-7 带圆孔板模型3.1.3有限元网络划分1)任务栏中点【Meshing】,Action→Create,Object→Mesh,Type→Solid,弹出如图3-8所示菜单:图3-8 有限元网络划分2)这里我们选用四面体自动划分网格Elem Shape→Ted, Mesher→TetMesh, Topology→Ted4, Input List→Solid 1,取消Automatic Calculation选项前的√,在Value后的命令框中输入1.0,点,得到图3-9模型。
PATRAN的一些精华小技巧1、在 Patran里如何Move一组Poin ts 的位置, 而不改变这组 Points的ID 编号? Group/Transf orm/Transl ate的功能,这样不但编号不会变, 连prope rty跟边界条件都会保留2、Patran如何执行多次Undo?所有Patr an的操作步骤, 都记录在最新的一个pa tran.ses.xx中,如果需要多次undo,可以刪除最后不需要的步骤指令行,再利用 File -> Sessio n -> Play 的方式, 执行改过的p atran.ses.xx ,这样可以无限制的und o。
3、Patran中如何定义杆件之间的铰接?用的是rod元素,不需要定义铰接,因为rod元间本身就是以铰接形式连接。
如果用bar或是bea m,需在prop ertie s里的Pi nnedDOFs @ Node 1/2定义铰接。
4、Patran如何把不小心Equiv alenc e的nod e分开用Utilit y/FEM-Elemen ts/Separa te Elemen ts在equiv alenc e时, 可以將选项切换为"List",只选择特定某些节点作e quiva lence, 可以避免不小心的失誤。
5、Patran如何將Tr i3单元转换为Tri6单元在Patra n -> Elemen t -> Modify/Elemen t/Edit , 將Type选项打勾,在Shape中选Tri, New Shape选Tri6,最后选取想要改变的Tr i3单元,6、Patran如何定义材料库Patran除了可以直接读取MS C.Mvisio n的材料材料库外,还可利用执行Sessi on File的方式,直接使用以前已经定义过的材料。
目录第一章 Patran基础知识 (2)第二章悬臂梁的有限元建模与变形分析 (12)第三章受热载荷作用的薄板的有限元建模与温度场求解 (20)第四章带孔平板的受力分析(平面) (23)第五章厚壁圆筒的受内压作用时的应力分析 (27)第六章受压力载荷作用时板的受力分析 (31)第七章板的模态分析 (34)第八章板的瞬态响应分析 (37)第九章板的频率响应分析 (40)第十章提取车架中性面的模态分析 (43)第一章 Patran 基础知识一.Patran 的用户界面介绍Patran 具有良好的用户界面,清晰、简单、易于使用且方便记忆,其用户界面如图1-1所示。
图1-1 patran 界面按照各部分的功能,可将Patran 界面划分为四个区域:菜单和工具栏区、操作面板区、图形编辑区、信息显示和命令行输入区。
下面,就分别对这几个区域进行介绍。
1.菜单和工具栏区如图1-2所示,patran 的界面上有一行菜单,两行工具栏。
图1-2 菜单工具栏Patran 的菜单是该软件的重要组成部分,使用菜单项,可以完成多设置和操作。
本来,菜单与各种工具是配合使用的,两者是不能独立区分的。
这里对菜单栏进行简单的介绍,一般情况下,Patran 有九个主菜单项,如图1-2所示,文件菜单栏应用菜单按钮工具栏管理(File)菜单主要用于Patran数据库文件的打开/关闭,同时也用来从其他CAD系统输入模型;组(Group)菜单主要用于组的操作,作用类似CAD系统中的“层”;视窗管理(Viewport)菜单用于视窗设置;视图操作(Viewing)菜单用于图形显示设置,包括了工具栏中一些工具的功能;元素显示管理(Display)菜单用于设置各种元素的显示方式;参数设置(Preferences)菜单用于选择求解器,定制用户自己的环境等操作;工具选项(Tools)菜单中提供了许多非常有用的工具;在线帮助(Help)菜单为使用者提供在线帮助。
Patran 操作中文手册欢迎同行来论坛进行交流科研中国收集整理版权归原作者所有科研中国翱翔论坛/bbs翱翔科技服务中心 2005年8月17日制作目录课程1. 入门课程2. 从IGES文件输入几何体课程3. 连柄的几何模型课程4. U形夹的三维几何模型课程5. U形夹的三维视图课程6. 显示练习课程7. U形夹的三维有限元模型课程8. 另一种U形夹的三维有限元网格课程9. 验证及属性设置课程 10. 随空间和时间变化的载荷课程 11. 在三维U形夹上加载荷和边界条件课程 12. 定义材料特性课程12a. 用材料选择器获得材料特性课程 13. 与空间相关的物理特性课程 14 . 静态分析的建立课程 15. 组群和列表的使用课程 16. 位移结果的后处理课程 17. 应力结果的后处理课程 18. 瞬态响应结果的后处理课程 19. 后处理透视图课程 20. 瞬态和模态的动画课程 21. 与时间相关的结果课程 22. 将PATRAN2.5的模型输入到PATRAN 3 中课程 4. U形夹的三维几何模型目的:生成一个新的数据库生成几何体改变图形显示模型描述:本练习是通过MSC/PATRAN的点、线、面、体建立一个几何模型, 熟悉PATRAN 的几何建模过程,模型的几何尺寸见下图。
练习过程1.新生成一个数据库并命名为clevis.dbFile/New Database…New Database Name clevis.dbOKNew Model PreferenceTolerance DefaultOK2. 把几何参数选择改为PATRAN 2方式。
PATRAN 2 Convention 代表着一个特点的参数化几何类别。
这个操作可以使用户产生一个几何体,该几何体可以通过PATRAN 2的中性文件和IGES文件输入或输出到PATRAN 3中。
Preference/Geometry…Geometric Representation Patran 2 ConventionSolid Origin Location P3/PATRAN ConventionApplyCancel3. 生成一个位于U形夹孔内半径上的点。
开头先讲几句题外话吧,版内的讨论应该是各个层次的,有新手上路的,进阶的,也有一些专题讨论,版主已经整理了一些不错的帖子。
作为我个人来说,学习软件是为了解决工程问题的;否则就成技术支持了。
我想大多数人还是为了解决工程问题需要,才学习的吧。
我们的目的很明确,是希望借助软件去了解一些问题,最终的目的是为了验证产品是否合理。
因此在做cae的人们,我们别舍本求末,了解问题本身是前提。
言归正传总结下这段时间用patran时发现的一些错误提示,本人新手,如表述中有错误,大家指出,不要客气。
(1)提交计算时出现Some elements in the model have no types or properties defined. Do you wish to continue with thetranslation?开始接触时经常出现这个提示,用show-element查看单元时,也看到很多单元没有属性;觉得奇怪,因为属性已经定义给实体的,怎么会没有呢?因为实体和网格没完全关联好,所以某些单元就没有属性了。
特别是经常修改网格后,常出现这种问题。
现在我一般每次划分网格时,直接把属性定义进去;或者在属性里直接赋予给单元,基本就不会有这个错误了。
(2)Please ensure your P3_TRANS.INI or site_setup file correctly points to the solver executable or that you have correctly set the proper environment variables to do the same.Error executing subprogram. Reason (errno) = 2.Nosuch file or directory开始碰到时,也没注意,因为有时候有提示,有时候又没有,可以得到bdf,然后到nastran计算。
PATRAN的一些小技巧作为PATRAN软件的高级用户,我有一些小技巧可以与您分享,以便更好地使用软件。
以下是一些我在使用PATRAN时发现的一些小技巧。
1. 使用快捷键:PATRAN 可以使用许多快捷键来加快操作速度。
例如,按下 "Ctrl+S" 可以保存当前模型,按下 "Ctrl+Z" 可以撤消上一步操作。
您可以在帮助文档中找到完整的快捷键列表。
2.使用图标工具栏:PATRAN的界面包含各种工具栏,这些工具栏上有一些常用的图标,可以直接点击进行操作。
您可以自定义图标工具栏,根据自己的需求添加或删除图标。
4. 使用功能:PATRAN 中有一个功能,可以帮助您快速查找特定的命令或功能。
只需按下 "Ctrl+F",然后输入您要查找的关键字即可。
软件会自动定位并显示相关选项。
5. 使用视图功能:PATRAN 提供了多种视图模式,可以让您从不同的角度查看模型。
例如,您可以使用 "Left", "Right", "Front" 和"Back" 视图查看模型的不同侧面。
另外,您还可以使用 "Iso" 视图查看模型的立体效果。
通过使用这些视图功能,您可以更好地理解和操作模型。
7. 使用颜色和线型:PATRAN 允许您自定义模型显示的颜色和线型。
只需选择 "Display" 菜单中的 "Color" 或 "Line" 选项,然后选择您喜欢的颜色或线型即可。
通过使用这些选项,您可以更好地区分和识别不同的图元。
9. 使用网格划分功能:在进行有限元分析时,您可能需要对模型进行网格划分。
PATRAN 提供了一些网格划分工具,可以快速而精确地进行网格划分。
您可以使用 "Mesh" 菜单中的选项,选择适合您的网格划分需求的工具。
多点约束(MPC)多点约束(MPC,Multi-Point Constraint)是对节点的一种约束,即将某节点的依赖自由度定义为其它若干节点独立自由度的函数。
例如,将节点1的X方向位移定义为节点2、节点3和节点4X方向位移的函数。
多点约束常用于表征一些特定的物理现象,比如刚性连接、铰接、滑动等,多点约束也可用于不相容单元间的载荷传递,是一项重要的有限元建模技术。
但是,建立明确的、能够正确描述各种现象的多点约束方程是非常不容易的。
对应于不同的分析解算器和分析类型,Patran支持的多点约束类型是不同的。
这里以Nastran的结构分析为例,则共有12种类型的多点约束,这里就以Explicit为例来介绍。
Explicit:用于定义某节点的位移与其它若干节点位移的函数关系,该函数是一个多项式。
如图所示,在“Explicit”的面板上,可以明确地看到,其对应的分析解算“MSC.Nastran”,而分析类型是“Structural”。
除过“Cyclic Symmetry”和“Sliding surface”,其它所有的多点约束类型创建界面都很类似,每个面板上都有按钮,单击它,可打开不同的【define Terms】面板,用于不同多点约束的定义,Explicit对应的【define Terms 】面板如右图所示。
该【define Terms 】面板用于将一个节点某方向上的位移定义为若干个节点位移的一次多项式函数。
有“Dependent Terms”、“Independent Terms”项、“Coefficient”项、“Node List”项、“DOFs”项和四个操作项(“Create Dependent”、“Create Independent”、“Modify”和“Delete”),自由度项“DOFs”有六个选项:“UX”、“UY”、“UZ”、“RX”、“RY”和“RZ”,分别表示节点的六个位移自由度。
Nastran Adams的应用-生成mnf文件单位
作者:Simwe 来源:MSC发布时间:2011-08-29 【收藏】【打印】复制连接【大中小】我来说两句:(0) 逛逛论坛
相对于Nastran中各物理量无指定单位(只需要各物理量的单位统一),Adams中物理量单位需要人为指定,在Nastran中生成Adams的MNF文件时,存在单位如何转换的问题。
通过Nastran中的WTMASS和DTI UNITS关键字的设置实现MNF文件单位统一。
下面以Nastran单位为Tone,mm,N,Adams单位采用kg,mm,N为列来说明具体设置方法:
1. 导入CAD文件的设置
在Patran中导入Parasolid文件时,设置为mm单位
2.材料参数设置
以steel为例:弹性模量2e5MPa,泊松比0.3,密度7.8e-6kg/mm3(注:密度单位与生成MNF文件时Adams output Units单位设置保持一致)
3.求解设置Patran中的设置:
对应的Nastran Bulk Data:
PAR AM WTMASS 0.001(将质量由kg转换为Tone保证Nastran中单位统一封闭)
DTI UNITS 1 KG N MM S (设置Adams Output Uni t s)
4. 算例验证
以一个杆件为算例验证上述设置方法
杆件质量为1.065kg,长度单位为mm,材料为steel,在Nastran中采用封闭单位求解其自由模态的第一阶非零的固有频率为1903.9Hz。
由于在Adams中采用的是mm,kg,N,s的单位,因此用上述设置方法进行重新设置,生成MNF文件。
最终得到的结果为:
Nastran计算结果为1093.9Hz
MNF文件导入到Adams中的结果为1093.85Hz
Adams中得到杆的重量为10.65N
1.正确的单位设置(前提是adams中的单位设置是默认的:Kg N mm s)
很多朋友在用patran输出mnf文件的时候发现adams中显示的频率与patran中显示的不一致,做了几个case的对比,觉得正确的单位设置应该是:t N mm s
如果单位是KG N mm S 将mnf导入adams中显示的频率是patran中的31.6倍,也就是1000开2次方的倍数;
如果将长度单位改为M的话,那就更不对了,因为将mnf文件导入adams中后零件尺寸放大
了,与实际不相符.
2.如何得到有应力应变信息的mnf
在设置结果文件输出的时候,正确的方法应该是选择advanced-Direct,这
样才能够得到含有应力应变信息的mnf文件。
如果选择Both,用nastran计算将无mnf文件生成;
如果选择principal,用nastran计算能生成mnf文件
特别是对于模型中有体单元的时候,一定要设置subcase->output requests->adavanced->ouptut->volume output->direct
如果不设的话,缺省为both有可能会导致体单元无法输出,对于面单元则没有必要进行这样设置。
具体还是看附件中的patran_nastran_adams(update).ppt吧,是在坛友的基础上稍微有些更新而已,在次要感谢PPT的原作者了,如有错误欢迎指正...。