




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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“l(fā)inked”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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年軍隊文職人員(漢語言文學類)考前必練題庫-附答案
- 《十二生肖》課件-1
- 《哈利路亞》課件
- 2025屆四川省會理縣第一中學高三下學期期中統(tǒng)一考試數(shù)學試題
- 物聯(lián)網(wǎng)應用技術課程介紹
- 2025年安順b2貨運資格證考試題庫
- 清明節(jié)傳統(tǒng)文化知識主題班會12
- 醫(yī)院醫(yī)學醫(yī)療護理報告模板70
- 腹腔鏡術后護理查房
- 商標注冊合同范例
- 電信行業(yè)用戶欠費催收策略與措施
- 銀行資格考試分析與策略試題及答案
- 多式聯(lián)運風險管理與優(yōu)化-全面剖析
- 岳樓小學建立學校年級班級家長四級防控工作聯(lián)系網(wǎng)絡實施方案
- 病人走失應急預案
- 2025年中國鐵塔考試試題及答案
- 2025年博士思政面試題及答案
- 廣東省深圳市深圳實驗學校等校聯(lián)考2024-2025學年九年級下學期開學考試語文試題(含答案)
- 2025年浙江安防職業(yè)技術學院單招職業(yè)傾向性測試題庫1套
- 《園林景觀手繪技法表現(xiàn)》課件-項目2 景觀元素的表現(xiàn)技法
- 2024-2025學年人教版英語七年級下冊Unit 5 Here and now Section A Grammar教案
評論
0/150
提交評論