版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
MSC.PatranPCLHandbook
PropertiesyLoadcasesFieldsAnalysisR
F77TIItY~~11~Ytl[iFVl彳XSectionPropertyv4.2
Help...
pened.
1-Jan-0013:09:33
rDisplaysectionPlot
FUNCTIONinit()selectMethod:
八
WIDGETidStandardsection
vArbitrarySection
INTEGERizstatus
REALx_loc,y_loc,form_width,form_height
REALframe_width
REALf_width,half_space
STRINGversion[3]
STRINGmethod_opt[NAME_LENGTH],method[NAME_LENGTH]
form_width=FORM_WID_SML
SelectSymmetryCondition:
frame_width=form_width-FORM_L_MARGIN-FORM_R_MARGIN
f_width=frame_width-FRAME_L_MARGIN-@八symmetricxunsym.
FRAME_R_MARGIN-FRAME_2EDGE
half_space=INTER_WIDGET_SPACE/2.0
settings.pcl
p3prolog.pcl
p3midilog.pcl
p3epilog.pcl
.Patran.EventMaps
InaNutshell7
WhatisPCL?7
WhatcanPCLbeusedfor?8
HowdoesPCLwork?9
Allyoureallyneedtoknowisonthispage!10
Documentation10
PCLforEveryone11
EnteringEquations11
EnteringData12
SessionFiles13
RebuildingModels14
PCLfortheMoreAdventurous17
ParametricModeling17
AddingaGraphicalUserInterface,GUI21
Exercise1:SessionFiles22
PCLProgrammingBasics24
Overview24
PCLExpressions26
Expressions,Comments,SyntaxTips26
Identifiers28
NamingConventions28
Variable/FunctionScope29
StructureofaPCLFunction30
FunctionBasics30
SimplePCLfunctionExample31
Exercise2:HelloWorld!33
Exercise3:EffectivePCL34
PCLOperators35
Stringcomparisons35
PCLVariablesandConstants36
Datatypes36
VariableScope37
DirectlyAllocatedArrays38
Virtualarrays39
Virtualstrings41
LoopControlStatements42
MSC.PatranPCLWorkshopNotes08/10/15
2/236
ForLoop42
WhileLoop42
RepeatLoop43
BREAK44
CONTINUE45
Exercise4:WritingFiles46
Exercise5:ReadingFiles48
ConditionalControlStatements49
IFStatement49
SWITCHStatement50
StructureofaPCLFunction51
CompilingandLinkingPCLFunctions54
PrimaryPCLDirectives55
CompilingPCLoutsideofMSC.Patran59
LinkingCompiledLibraries60
OtherPCLDirectives61
StartUpFiles62
Exercise6:p3epilog.pcl63
Debugging64
DebuggingCompileErrors64
DebuggingRuntimeErrors65
AccessingPCLFunctions67
FromTheCommandLine67
FromAnyMSC.PatranForm68
PCLFunctionswithFieldVariables69
MSC.PatranBuilt-InFunctions70
NamingConventionsforApplications71
NamingConventionsforOtherOperations72
Exercise7:GroupElementsByShape74
GraphicalUserInterface75
ThePCLClassStatement76
PCLWidgets77
RequiredFunctionsforBuilding/DisplayingaForm78
Theinit()Function78
ThedisplayOFunction79
WidgetCallbacks82
WhatAreThey?82
WhatAreTheyUsedFor?83
MSC.PatranPCLWorkshopNotes08/10/15
3/236
CallbackArguments(WidgetFunctionData)83
WidgetPlacement85
WidgetVariables87
ModifyingWidgets88
GettingDatafromWidgets89
PuttingitallTogether(Example)90
Exercise8:SimpleForm92
TheC-PreprocessorandIncludeFiles93
Exercise9:Callbacks
HandlingErrorsandMessaging
ErrorsfromBuilt-InFunctions
CustomErrorMessages
UsingUserMessagesDatabase
WithoutaMessagesDatabase
TakingAdvantageoftheUNDOFeature96
98
98
SelectMechanism99
SelectMechanismGUIMechanics,99
SelectDataboxes,SelectFrames,andSelectMenus..…100
GUIPCLExample02
ListProcessor03
ListProcessorMechanics03
AllYouReallyNeedtoKnow103
105
l1a06
Exercise10:FormtoGroupElmsByShape.106
107
110
12
ExecutingProgramsOutsideofMSC.PatranJ
SpawningRemoteProcesses12
UsingCandFortranexecutablestoaccessaMSC.Patrandatabasedirectly.115
ExternalAccessofanMSC.PatranDatabase116
SpecialWidgets118
FileWidget118
SpreadsheetWidget121
Exercise11:FileWidget122
AddingHelp/DescriptiontoyourPCL123
PercentComplete124
Functions124
Example124
EventManager125
MSC.PatranPCLWorkshopNotes08/10/15
4/236
General125
Functions126
Example126
PrimitiveGraphics127
GraphicObjects127
GraphicSegments128
Example129
AnotherExample130
Exercise12:PrimitiveGraphics131
MSC.PatranCustomization132
AddingUtilityProgramstotheMainMenu132
Example133
Example:p3_user_menu.my_menu.def134
CustomizingtheMSC.PatranToolbar135
Exercise13:PulldownMenu138
Exercise14:Toolbar139
SomeFinalThoughts141
AppendixA144
Built-inFunctionExamples144
DocumentationforatypicalMSC.Patranbuilt-infunction145
Togetallthenodesandtheirglobalcoordinates146
Togetthetopologyofeveryelement147
Togettheshapeofeveryelement148
Togetalltheelementconnectivityforallelements149
Togettheelementsassociatedtoaparticularelementpropertyset150
Togetanelementpropertyvalue(shellthickness)foraspecificelement151
Togetamaterialpropertyvalue153
Togetalistofallgroups154
Togetthenodesandelementsassociatedtothecurrentgroup154
Togetresultvaluesforspecifiedelements155
AppendixB164
Strings&StringFunctions164
Declaration165
Initialization165
StringComparisons165
Functions166
AppendixC174
NoteworthyFunctions174
sys_move_raw(...)175
mth_array_search(...)176
mth_sort(...)177
mth_sort_row(...)178
mth_sort_column(...)178
MSC.PatranPCLWorkshopNotes08/10/15
5/236
fem_geom_edgejength(...)179
fem_geom_face_area(...)179
fem_geom_elem_volume(...)179
fem_geom_elem_location(...)180
AppendixD181
FormSpacingParameters(appforms.p)181
*SPACING182
AppendixE207
MSC.PatranArchitecture207
AppendixF209
SharewareCompilingFunctions209
AppendixG212
ParametricPatran212
AppendixH218
AdditionalListProcessorNotes218
ListProcessorMechanics219
ListProcessorFunctions220
ListProcessorSublistFunctions221
ListProcessorAttributeFunctions222
MiscellaneousListProcessorFunctions223
ListProcessorExamples224
EasytoUseListProcessorFunctions228
Appendix1229
KeyMapping229
AppendixJ232
WidgetClassification232
AppendixK235
UserDefinedAOM235
MSC.PatranPCLWorkshopNotes08/10/15
6/236
InaNutshell
WhatisPCL?
□PCLstandsforPatranCommandLanguage
□Comprehensive,fullyfunctionalcomputerprogramming
language
□SpecificallyanduniquelysuitedforMCAEapplications
□DeliveredasapartofMSC.Patran
□Versatileandeasytouse
MSC.PatranPCLWorkshopNotes08/10/15
7/236
InaNutshell
WhatcanPCLbeusedfor?
□Integrateapplicationorsite-specificprogramswiththe
MSC.Patranuserinterfaceanddatabase
□Generateparametric/variationalmodelsfordesign/optimization
□Integratecommercialand/orin-houseanalysiscodeswith
MSC.Patran
□Displaycustomgraphics
□AccesstheMSC.Patrandatabase
□Createnewand/orenhancedMSC.Patranfunctionality
□Databasemanagementforanalysisfiles
□Eliminatetedious,repetitiveprocedures
MSC.PatranPCLWorkshopNotes08/10/15
8/236
InaNutshell
HowdoesPCLwork?
□AllMSC.PatrancommandsarefirstinterpretedbythePCL
commandinterpreter
□PCLexpressionsareinterpretedbyaCprogram
□PCLfunctionscanbecompiledintolibraries(moreefficient
binaryrepresentation)and“linked”withaMSC.Patransession
□ttBuilt-in^^PCLfunctionsarewritteninCorFORTRAN
□MSC.PatranformsandmenuscanbecreatedviaPCLcallsto
Xlib,theX-windowfunctionlibrary
□FORTRANandCfunctionscanbe"linked”withMSC.Patran
throughPCL
MSC.PatranPCLWorkshopNotes08/10/15
9/236
InaNutshell
Allyoureallyneedtoknowisonthispage!
Documentation
□PCLandCustomization-GeneralprogrammingguideforPCL.
Howtobuildforms,compile,managelibraries,accessthe
database,read/writefiles,etc.
□PCLReference-Descriptionoffunctionswrittentothe
sessionfile.
□Develop:TheMSC.PatranToolkit-Documentationof
additionalfunctionsfordatabaseaccess,etc.
ProgrammingTaskDocumentationComments
BasicprogrammingPCL&Customization,chaptersMathfunctions,string
2&3functions,fileaccess
functions,compiling,library
management,etc.
GraphicaluserinterfacePCL&Customization,chapter5Functionsforcreatingforms
ListprocessorPCL&Customization,chapterFunctionsforparsingastring
5.5orpicklist,i.e.,"Elm1:9:2"
Applications,sessionfile,PCLReferenceGuideAllfunctionswrittentothe
resultutilitiessessionfile
GraphicsPCL&Customization,chapterFunctionsfordrawinggraphic
3.2primitivessuchaslines,
arrows,text,etc.
DatabasefunctionsPCL&Customization,chapter8Functionstoaccessdatain
thedatabase(i.e.,node
coordinates,element
connectivity,element
properties,etc.)
ArchitecturePCL&Customization,chaptersFunctionsforcreating
6&7analysispreferences
MSC.PatranPCLWorkshopNotes08/10/15
10/236
PCLforEveryone
EnteringEquations
□UseofPCLwhencreatingspatialfields:"iddtHEES
Action:Create
X+X**2-sinr('X)object:Spatial-I
MethodPCLFunction
ThePCLinterpreterinterpretsanythingExistingFields
immediatelyfollowinga'symbolasa△
J
fieldvariableasopposedtoaPCLu
____u
function,suchas,sinr().FieldName
Imy_fiel(f
FieldType
—X+X**2-
scalarVector
CoordinatesystemType
Parametric
100
CoordinateSystem
80
Coord应
60
ScalarFunction
40双+*2-sinrfxj
IndonondftntVj»riAhlo<
20
MSC/PATRANVersion8,011-Jan-OO10:16:101.11+002
Fringe:ScalarPressurePlot1D3+002
9.58+001
8.84+001
8.11+001
7.37+001
663+001
5.90+001
5.16+001
4.42+001
368+001
2.95+001
221+001
1.47+001
737+000
1.43-005
defaultFringe:
Max1.11+002@Elm202
Min0.@Elm
MSC.PatranPCLWorkshopNotes08/10/15
11/236
PCLforEveryone
EnteringData
□UseofPCLwhenenteringgeometriccoordinates:
[5/16.'00]
ThePCLinterpreter“evaluates”expressionsenclosedinback
ties,"、':
Otherexamples:
[radius/length'00]
<'cosr(theta)>11>
['MyFunction(radius)'01]
MSC.PatranPCLWorkshopNotes08/10/15
12/236
PCLforEveryone
SessionFiles
□SessionandjournalfilesarecomprisedentirelyofPCL
commands.Modelchanges(dimensions,meshdensity,etc.)
canbemadequicklybyeditingandthenreplayingthesession
orjournalfiles.
$#Sessionfilepatran.ses.01startedrecordingat16-Aug-0114:33:54
$#Recordedby:MSC.Patran2001
STRINGasm_create_patch_xy_created_ids[VIRTUAL]
asm_const_patch_xyz(“1","<10100>",n[000]”,"Coord0",@
asm_create_patch_xy_created_ids)
$#1Patchcreated:Patch1
STRINGsgm_edit_surface_add_h_edit_ids[VIRTUAL]
n
sgm_edit_surface_add_hole(1,1.,TRUE,""r**[550]"z","Surface1",@
sgm_edit_surface_add_h_edit_ids)
$#1SurfaceEdited:Surface1
$#Sessionfilepatran.ses.01stoppedrecordingat16-Aug-0114:34:52
MSC/PATRANVersion8.0
File|groupViewportv^iewi
|丝einents.
i势AM、,、
Close
Save
Saveacopy...
utilities
import...
Export...
Session
Print...
Report...
MSC.PatranPCLWorkshopNotes08/10/15
13/236
PCLforEveryone
RebuildingModels
□Thefollowingsessionfilecreatesatrimmedsurface,10“x10”
witha1"diameterholeatthecenter.Notethattheparameter
thatcontrolsthediameteroftheholeisindicatedbelow.
7I$#Sessionfilepatran.ses.01startedrecordingat16-Aug-0114:33:54
|k$#Recordedby:MSC.Patran2001
\STRINGasm_create_patch_xy_created_ids[VIRTUAL]
nn
asm_const_patch_xyz(”1","<10100>z[000],"Coord0",@
asm_create_patch_xy_created_ids)
$#1Patchcreated:Patch1
STRINGsgm_edit_surface_add_h^e3^tids[VIRTUAL]
sgm_edit_surface_add_hole(1(1.)TRUE,"","[550]","","Surface1",@
sgm_edit_surface_add_h_edit_ia8^^
$#1SurfaceEdited:Surface1
$#Sessionfilepatran.ses.01stoppedrecordingat16-Aug-0114:34:52
A.Create/Surface/XYZ
B.Edit/Surface/AddHole
MSC.PatranPCLWorkshopNotes08/10/15
14/236
PCLforEveryone
□Inthesessionfilebelow,theprevioussessionfileiseditedto
changetheholediameterfrom155to4”
$#Sessionfilepatran.ses.01startedrecordingat16-Aug-0114:33:54
$#Recordedby:MSC.Patran2001
STRINGasm_create_patch_xy_created_ids[VIRTUAL]
asm_const_patch_xyz(“1","<10100>",**[000]","Coord0",@
asm_create_patch_xy_created_ids)
$#1Patchcreated:Patch1
STRINGsgm_edit_surface_add_h^e3^fcids[VIRTUAL]
sgm_edit_surface_add_hole(114.)TRUE,"","[550]","","Surface1",@
sgm_edit_surface_add_h_edit_ia8^^
$#1SurfaceEdited:Surface1
$#Sessionfilepatran.ses.01stoppedrecordingat16-Aug-0114:34:52
MSC.PatranPCLWorkshopNotes08/10/15
15/236
PCLforEveryone
□Sessionfilescanbeexecutedor“played”byselecting
File/Session/Play...fromthetopmenu.
[><MSC/PAIRANVmsion8.0
File|groupViewportv^iewi
I髻5”
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 二零二五年度农场农业生态修复及保护合同3篇
- 2025年度土地入股文化产业合作经营合同范本
- 2025年度环保型木工材料采购与劳务分包合同书4篇
- 2025年度农民工住宿及饮食服务合同
- 2025版木工材料供应链采购与配送合同4篇
- 二零二五年度办公楼智能化装修与系统集成合同2篇
- 二零二五年度土地租赁权居间服务合同样本
- 二零二五年度木门安装与室内绿化养护合同3篇
- 2025年度竞业禁止员工合同续签及竞业限制解除程序合同
- 2025年度购房合同转让及附属设施使用协议
- 河北省承德市2023-2024学年高一上学期期末物理试卷(含答案)
- 高中物理斜面模型大全(80个)
- 012主要研究者(PI)职责药物临床试验机构GCP SOP
- 2024年个人车位租赁合同经典版(二篇)
- 农耕研学活动方案种小麦
- 2024年佛山市劳动合同条例
- 污水管网规划建设方案
- 城镇智慧排水系统技术标准
- 采购管理制度及流程采购管理制度及流程
- 五年级美术下册第9课《写意蔬果》-优秀课件4人教版
- 节能降耗课件
评论
0/150
提交评论