版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
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應(yīng)
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勢(shì)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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度農(nóng)場(chǎng)農(nóng)業(yè)生態(tài)修復(fù)及保護(hù)合同3篇
- 2025年度土地入股文化產(chǎn)業(yè)合作經(jīng)營(yíng)合同范本
- 2025年度環(huán)保型木工材料采購(gòu)與勞務(wù)分包合同書(shū)4篇
- 2025年度農(nóng)民工住宿及飲食服務(wù)合同
- 2025版木工材料供應(yīng)鏈采購(gòu)與配送合同4篇
- 二零二五年度辦公樓智能化裝修與系統(tǒng)集成合同2篇
- 二零二五年度土地租賃權(quán)居間服務(wù)合同樣本
- 二零二五年度木門安裝與室內(nèi)綠化養(yǎng)護(hù)合同3篇
- 2025年度競(jìng)業(yè)禁止員工合同續(xù)簽及競(jìng)業(yè)限制解除程序合同
- 2025年度購(gòu)房合同轉(zhuǎn)讓及附屬設(shè)施使用協(xié)議
- 河北省承德市2023-2024學(xué)年高一上學(xué)期期末物理試卷(含答案)
- 高中物理斜面模型大全(80個(gè))
- 012主要研究者(PI)職責(zé)藥物臨床試驗(yàn)機(jī)構(gòu)GCP SOP
- 2024年個(gè)人車位租賃合同經(jīng)典版(二篇)
- 農(nóng)耕研學(xué)活動(dòng)方案種小麥
- 2024年佛山市勞動(dòng)合同條例
- 污水管網(wǎng)規(guī)劃建設(shè)方案
- 城鎮(zhèn)智慧排水系統(tǒng)技術(shù)標(biāo)準(zhǔn)
- 采購(gòu)管理制度及流程采購(gòu)管理制度及流程
- 五年級(jí)美術(shù)下冊(cè)第9課《寫(xiě)意蔬果》-優(yōu)秀課件4人教版
- 節(jié)能降耗課件
評(píng)論
0/150
提交評(píng)論