close

Вход

Забыли?

вход по аккаунту

?

Fem Programming With Mathematica

код для вставкиСкачать
 -
1
Introduction
1–1
Chapter 1:INTRODUCTION
1–2
§1.1SUMMARY
ThisreportpresentsthefirstcompleteimplementationoftheFiniteElementMethod(FEM)using
theMathematicalanguage.Thereportfocusesondatastructures,dataflowandprogramming
modulesforlinearstructuralmechanics.
ThematerialcollectedhereindirectlysupportsmostofthesyllabusofthecourseFiniteElement
ProgrammingwithMathematica(ASEN5519).Theprogrammingmodulesarealsousedto
supportcomputerhomeworkinthecourseIntroductiontoFiniteElementMethods(ASEN
5007);however,thelogicofthosemodulesisnotstudied.
Thepresentimplementationhasbeendesignedwiththefollowingextensionsinmind:
² Parallelcomputation
² Dynamicanalysis,bothtransientandmodal
² Nonlinearanalysis
² Multiphysicsproblems
Extensibilityisachievedbypresentingdatastructuresthatarelikelytochangeinlistform.Lists
arehighlyflexiblebecausetheycanaccomodateobjectsofanytypeinanarbitrarynumberof
hierarchicallevels.Someliststructurescan(andshould)bereadilyimplementedasarraysto
increaseprocessingefficiencyincomputationalintensivetasks,whereasothersmaybeimplemented
asderiveddatatypesinlanguagessuchasC,C++orFortran90.
Source
Data
Computational
Data
Result
Data
Figure1.1.HighleveldataflowinaFiniteElementprogram.
§1.2ORGANIZATIONOFAFEMPROGRAM
§1.2.1DataFlow
ThehighleveldataflowinanyFEMprogramisschematizedinFigure1.1.Thisflowsnaturally
suggeststhegroupingofdatastructuresintothreeclasses:
SourceDataStructures.ThesebearacloserelationtotheFEmodelastheuserdefinedit.For
example,atableofnodecoordinates.
1–2
1–3§
1.2 ORGANIZATION OF A FEM PROGRAM
ComputationalDataStructures.Asthenamesuggests,theseareorganizedwithprocessingeffi-
ciencyinmind.Theuseofarraysisimportantforthisgoal.Examplearesparselystoredcoefficient
matrices,andpartitionedsolutionvectors.
ResultDataStructures.Thesecontaincomputedresultsagainorganizedinaformatthatbearsclose
relationtotheFEmodel.Examplesarecompletednodedisplacementvectorsandelementstress
tables.
ThefeedbackofresultsintosourcedepictedinFigure1.1,isoneofthefundamentalguidesof
thepresentstudy.Theunderlyingphilosophyistoviewresultsasdatathat,onreturnfromthe
computationalphase,completestheunknownportionsofsourcestructures.Thisideahasunifying
powerbecause:
² Itsimplifiesthemergingofpre-andpostprocessorssothattheuserdealswithonlyone
program.
² Itisanaturalwaytoorganizesavesandrestartsinlongremotecomputations.
² Itallowsapainlessextensionoflinearintononlinearanalysisthroughaseamlesscycle.
Source
Data
Computational
Data
Result
Data
Front End (local)
Kernel (local or remote)
Figure1.2.SeparationofFEMsystemintoFrontEndandKernel.
§1.2.2FrontEndandKernelPrograms
TosimplifyprogramoperationitisconvenienttoseparatetheFEMsystemintothetwoparts
diagrammedinFigure1.2:
FrontEnd.Thisprogram,orsuiteofprograms,definesthemodelbydirectinputorgeneration
ofsourcedata,preparesinputsandcontrolinformationforthecomputationalkernel,andhandles
visualizationofinputdataaswellasanalysisresults.Itrunsonalocalmachinesuchasaworkstation
orpersonalcomputerwithadequategraphicfacilities.
1–3
Chapter 1:INTRODUCTION
1–4
Front End
Kernel
Front End
and Kernel
Visualization
User commands
Graphical
display
Model
definition
and
generation
Source
Data
Result
Data
Domain
decomposer
Model
recomposer
Partitioned
Source
Data
Partitioned
Result
Data
Resource
mapper &
scheduler
Data
Manager
Computational
Data
Processors
Save/restart
handler
Figure1.3.FurtherbreakdownofdataflowinFEManalysissystem.
ComputationalKernel.Alsosimplycalledkernel.Thisprogram,orsuiteofprograms,handles
theprocessingstepsthatrequireheavynumbercrunching.Thekernelcanruneitheronthelocal
computeroronaremoteone.Here“remote”isusedinthesenseoflogicallyseparatedfromthe
local,anddoesnotnecessarilyimplyphysicaldistance.Physicallyremoteprocessingispresently
therule,however,inthecaseoflarge-scalerunsonmassivelyparallelplatforms.
Evenifallrunscouldbedoneonthesamemachine,(forexamplealocal,medium-levelparal-
lelcomputersuchasaSGIOnyx),thefront-end/kernelseparationisstronglyrecommendedfor
modularityreasons.Ifrunningonhigh-endparallelsupercomputersisoneofthemainobjectives
theseparationismandatorysincesuchsystemsaretypicallybatch-orientedandnotdesignedfor
time-sharedlocalsupport.
Afinalconsiderationthatsupportsseparationistheabilitytousedifferentprogramminglanguages.
Thefrontendisbestimplementedwithanobject-orientedlanguagesuchasC++.Ontheother
handthatlanguagemaybeoverkill(orbeunavailableonsomemassivelyparallelplatforms)inthe
caseofthekernel,forwhichC,orFortran90,orCmixedwithFortran77,maysuffice.
§1.2.3FurtherDataFlowBreakdown
Figure1.3breaksdownthedataflowintoadditionalstepsandidentifiestheprogramcomponents
thatperformspecificfunctions.Someofthesecomponentsdeservecomment.
CommercialFEMsystemsusuallydistinguishbetweenpre-processors,whichdefinetheproblem
andcarryoutmeshgenerationfunctions,frompost-processors,whichreportanddisplayresults.
Thisdistinctionhashistoricalroots.Theseparationhasbeeneliminatedinthepresentorganization
byfeedingbackallresultsintosourcedatastructures.Asaconsequencethereisnoartificial
distinctionbetweeninputsandoutputsattheleftmostendofFigure1.1.
Theprogramcomponentlabeled“domaindecomposer”isafixtureoftask-parallelparallelprocess-
ing.Itsfunctionistobreakdownthemodelintosubdomainsbyelementgrouping.Usuallyeach
subdomainisassignedtoaprocessor.Itsoutputiscalledpartitionedsourcedata,whichissupplied
1–4
1–5§
1.3 REPORT ORGANIZATION AND TERMINOLOGY
asinputtothekernel.Theresultsdeliveredbythekernelareusuallypartitionedbysubdomain,
andmustbereorganizedthroughareconstitutionprocessbeforebeingmergedbackintothesource
data.
§1.3REPORTORGANIZATIONANDTERMINOLOGY
§1.3.1Coverage
Thereportisorganizedasfollows.Chapter1isanoverviewofdesignprinciples,programorgani-
zation,dataclassification,andnomenclature.Chapters2through7dealwithsourcedatastructures
associatedwithnodes,elements,degreesoffreedomandloads.Chapters8,9and10dealwith
auxiliarydatastructuresconstructedinpreparationforthecomputationalphases.Chapters11,12
and13dealwithsolutiondatastructures.Chapter14offersconclusionsandrecommendations.
Sectionscontainingadvancedmaterialthatmaybeomittedonfirstreadingareidentifiedbyan
asterisk.
Thedesignofresultdatastructuresisomittedbecauseoftimeconstraints.Itwillbeincorporated
duringtheofferingofthecourse.
§1.3.2Objects,Lists,Table,DataSets
Adatastructureisanobjectorcollectionofobjectsthatstorerelatedinformation,andisidentified
byauniquename.
Datastructureidentifiersarecasesensitive:force isnotthesameasForce.
Anobjectisanyprimitiveorcompositeentityrepresentableincomputermemoryandoptionally
identifiedbyaname.Objectsmaybeprimitiveitems,suchastheinteger3,acomplicatedcomposite
itemsuchasacompletePostScriptgraphicfile,afunctiondefinition,oracompositionofsimpler
objects.
Aliststructureisanamedsequenceofobjects.Itisidentifiedenclosingtheobjects,separatedby
commas,withcurlybraces.Forexample:
A = f a,b,c,d g.1:1/
HerelistA isadefinedasthesequenceoffourobjectsnameda,b,c andd.
Listsmaybeembeddedwithinliststhroughanydepth.Forexample:
B = f a,b,f 1,2,3,cuatro g,d g.1:2/
B isatwo-levellistifa,b,cuatro andd arenotlists.Inpracticelistsofmorethanthreelevelsare
rarelyneededforthepresentstudy.
Alistcontainedwithinalistiscalledasublist.
Atableisalistthatisenteredbyaprimitivekeyattribute,suchasanodenumberoranelement
name,andreturnsasublistassociatedwiththatkey.
1–5
Chapter 1:INTRODUCTION
1–6
Adatasetisacollectionorgroupingofdatathatpertainstoageneralorspecificactivity.For
example,“nodedefinitiondataset”meansallthedatathatpertainstothedefinitionofnodalpoints.
Adatasetgenerallyisacollectionofrelatedlists,anddoesnotnecessarilyneedsanameidentifier.
§1.3.3Arrays
Aone-dimensionalarray,orsimplyarray,isalistofobjectsofthesametype,eachofwhichuses
exactlythesamestoragespace.Forexample:
Squares = f 1,4,9,16,25 g.1:3/
isanintegerarray.Thismaybeefficientlyimplementedasaprimitivedatatypeinmostprogram-
minglanguages.Atwo-dimensionalarrayisalistofone-dimensionalarraysofidenticallength
andtype,andsoon.
Arraysareoftenrelatedtomatrixobjects.Toemphasizetherelationshipmatrix/vectornotation
maybeused.Inthatcasebracketsaredelimitersandcommaseparatorsareomitted.Thus(1.3)
canbealsodisplayedas
Squares =
[
1491625
]
.1:4/
Whenarraydatastructuresareintimatelyconnectedtoformulas,thenamemaybeamatrixor
vectorsymbol,whichisalwayswritteninboldface.Forexample:
g
T
D
[
g
1
g
2
g
3
]
.1:5/
definesa3-componentcolumnvectorg.
§1.3.4NamingConventions
Threekindofnamesareassociatedwitheachofthemajordatastructurespresentedhere:
Completenames.Forexample,MasterNodeDefinitionTable.Suchnamesaremnemonicbutoften
toolongforconcisedescriptionsaswellasprogramming.
Shortnames.Foraliststructurethisisanacronymnormallyformedwiththeinitialsofthecomplete
name.Forexample,MNDTforMasterNodeDefinitionTable.Lettersareinupperorlowercase
followingtheconventionsofTable1.1.Forarraystructuresthatcorresponddirectlytovectoror
matrixobjects,thematrixorvectorsymbol,suchasK
b
oru,mayserveasshortname.
Programnames.Theseareusedinthecomputerimplementation.Theyarealwaysshownin
typewriter font.Inthisdocument,programnamesareusuallytakentobethesameasshort
names,butthisisamatterofconvenience.Programmersareofcoursefreetomaketheirown
choices;seeRemarkbelow.
REMARK 1.1
Aprogram-namingconventionthatgreatlyfacilitatescodemaintenanceistouseatleastoneCAPITAL LETTER
formajordatastructures,whilereservingalllower case namesforlessimportantentitiessuchasindices,
1
–
6
1–7§
1.3 REPORT ORGANIZATION AND TERMINOLOGY
temporaryvariablesandthelike.Thestylemayofcoursevarywiththeimplementationlanguage.For
example,herearesomechoicesfortheMasterNodeDefinitionTable:
MNDT M
node
def
tab MasterNodeDefinitionTable.1:6/
Thefirstwouldbeacceptedbyanyprogramminglanguage,whereasthelastoneismostmnemonic.
Inthepresentimplementationthefirstchoice(all-capsacronyms)isusedbecauseofitsconcisenessand
portability.Longeridentifiersareusedinthenamingofmodules.
§1.3.5Qualifiers
Sometabledatastructuresareprefixedbythequalifiermaster.Forexample,theMasterElement
DefinitionTableorMEDT.Thequalifiermeansthatthetablecontainssufficientinformationto
reconstruct,byitselforwiththehelpofotherMasterTables,thepropertiesoftheindicateddataset.
InthecaseoftheMEDT,thattabledefinestheelementsofacompleteFEmodel.
The“master”propertyisobviouslycriticalastodecidingwhichdatamustbesavedandmoved
fromoneruntoanother,orfromonecomputertoanother,withoutlossofinformation.
Alldatastructureswhicharenotqualifiedasmastermaybeviewedasauxiliaryorsubordinate.
Thosedatastructuresarederived,directlyorindirectly,frommastertables.Butaqualifiersuch
as“auxiliary”or“subordinate”neednotbespecificallygivenaspartofthetitle.Theabsenceof
“master”issufficient.Non-masterdatastructuresmaynormallybedeletedwithoutharmafterthey
haveservedtheirpurpose.
Thetermstateappearsinsomedatastructures,andthishasmoreofatechnicalconnotation.A
FEmodelisadiscretesystem.Thestateofadiscretesystemisasetofvariablesfromwhichthe
internalbehaviorofthesystematanypointinspacecanbecomputedwiththehelpofthatand
otherinformation.Datastructuresthatcontainthosevariablesarequalifiedbythetermstatein
theirtitle.
Asarelevantexample,thenodaldisplacementsofadisplacement-basedFEmodelformasetof
statevariables.Thestressat,say,anelementcentercanbeobtainedfromthestatevariablesfor
thatelement,pluselementdefinitiondatasuchasconstitutiveandfabricationpropertiesobtained
fromMasterTables.Thedatastructurethatcontainsallnodedisplacements(andotherdatasuch
asnodeforces)isinfactcalledtheMasterNodeStateTableorMNST.
SourceandresultsdatastructuresorganizedaccordingtothepartitionoftheFEMmodelinto
subdomainsarequalifiedbythetermslocalorpartitioned.AnexampleistheLocalElement
DefinitionTable,orLEDT.
Theoppositeofpartitionedorlocalmodelistheglobalorsourcemodel.Whenthereisneedfor
explicituseofaqualifiertoidentifyaglobaldatastructure,thetermglobalisusedandthenameis
prefixedbyG.
1–7
Chapter 1:INTRODUCTION
1–8
Table1.1ConventionsforShortNameAcronyms
LetterMeaning
A Activity,Address,Arrangement,Assembly
a Acceleration(vector)
B Bandwidth,Boundary,Built-in
b Bodyforce(vector)
C Configuration,Connection,Constitutive,Constraint
c Constitutive(individual)
D Definition
d Deformation(vector)
E Element
e Element(individual)
F Fabrication,Freedom,Flexibility,Fluid
f Freedom(individual),Fabrication(individual)
G Global,Generalized
g Gradient(vector)
H Heat,History
I Identity,Initial,Individual,Interface
i Internal
J Energy
¤¤
j Jump
K Stiffness
k Conductivity
L Local,Load
M Mass,Master,Matrix,Multiplier
m Moment(vector),Multiplier(individual)
N Node,Nonlinear
n Node(individual)
O Object
P Partition,Potential,Property
p Partition(individual),Momentum(vector),pointer
Q Forceasfreedomconjugate
¤
q Force(vector)
R Response,Rigid
r Rotation(vector)
S Shock,Skyline,Spectrum,State,Structure,Subdomain
s Subdomain(individual)
T Table,Tag,Tangent,Temperature,Time
t Translation(vector)
U Unconstrained,Unified
u Displacement(vector)
V Valency,Vector,Vibration,Visualization
v Velocity(vector)
W Weight,Width
w Frequencies
¤
X Eigenvectors
¤¤
x External
Y Strain
¤¤¤¤
Z Stress
¤¤¤¤
*ToavoidclashwithFreedometal.
**ToavoidclashwithElement.
***ToavoidclashwithPartitionetal.
****ToavoidclashwithStructureetal.
1
–
8
1–9§
1.4 WHAT'S UNIQUE ABOUT
MATHFET
§1.3.6ImplementationLanguages
Theeaseofimplementationofflexibledatastructuresdependsontheimplementationlanguage.Generally
thereisatradeoffeffectbetweencomputationalefficiencyandhumaneffort,anditisimportanttobalancethe
tworequirements.Twogeneralrequirementsare:
² Manycomputationaldatastructurescanbeimplementedasarrays,butthesizeisonlyknownatrun
time.Thus,anyconventionalprogramminglanguagethatsupportsdynamicstoragemanagementmay
beused.
² Sourcedatastructuresmaybebestimplementedaslistsformaximumflexibilityandtofacilitateprogram
evolution,becauseforthefrontendcomputationalefficiencyisnotusuallyamajorissue.
FollowingisabriefreviewofvariousprogramminglanguagesforimplementingFEMapplications.
C,C++,Fortran90.Theselanguagesdirectlysupportarraysasprimitiveobjectsaswellasdynamicstorage
allocation.Listsarenotdirectlysupportedasprimitivesandmustbeimplementedasprogrammer-defined
datatypes:structuresinC,classesinC++,derivedtypesinFortran90.
Matlab,Fortran77.Theselanguagesdonotsupportlistsorthecreationofderiveddatatypes,althoughMatlab
handlesdynamicstorageallocation.Fortran77maybeconsideredinkernelimplementationsifcalledfrom
masterCroutinesthathandledynamicresourceallocation.Thishastheadvantageofreuseofthelargebase
ofexistingFEcode.However,mixedlanguageprogrammingcanrunintoserioustransportabilityproblems.
Mathematica.Becausethislanguagesupportsprimitiveanddynamiclistoperationsatruntime,theimple-
mentationofalldatastructuresdescribedhereisstraightforward.Thissimplicityispaidbyruntimepenalties
oforder100-10000.HenceMathematicadeservesconsiderationasaninstructionalandrapidprototyping
tool,butshouldnotbeviewedasaproductionvehicle.Itisinthisspiritthatthepresentlyimplementationis
offered.
Java.Thislanguagedeservesconsiderationasnetworkprogrammingbecomesthedominantmodeinthe
future.Butithasnotapparentlybeenregardedasacontenderinthescientificprogrammingareabecauseof
itsinterpretivenature.
AutomatictranslationfromMathematicatoJavamayoffertheultimatesolutiontoacombinationofarapid
prototypinglanguageforinstructionandresearchexploration,withahighlyportableandreasonablyefficient
languagefornumericalcomputation.
§1.4WHAT’SUNIQUEABOUTMATHFET
ThepresentreportdiscussesanimplementationofthefiniteelementmethodusingMathematica.
TheimplementationiswrittenasasetofmodulescollectivelycallMathFETwhichisanacronym
forMathematicaimplementationofaFiniteElementToolkit.
Thisisbelievedtobethefirstcompleteimplementationofageneralpurposefiniteelementanalysis
inMathematica.Inaddition,MathFETprovidesthefollowinguniquefeatures:
1.AstricttreatmentofdegreesofTheminimumnumberoffreedomsateachnodeneededto
solvetheproblemisautomaticallyused.Forexample,ifthemodelcontainsonlyflatplate
bendingelements,threedegreesoffreedomarecarriedateachnode.Ifsomenodesofthe
modelrequireanadditionalfreedom,thatfreedomiscarriedthereandnowhereelse.This
approachismadepossiblebecauseoftheuseofliststructures.
2.Thetoolkitapproach.TheuserbuildscustomFEMprogrambycallingtoolkitfunctions.No
uniqueclosedprogramisprovided;justexamples.Sourcecodeisalwaysavailable,andthe
1–9
Chapter 1:INTRODUCTION
1–10
userisencouragedtowriteowncontributions.Thiswhite-boxapproachensuresthatprograms
canalwayscontainthelatesttechnology,avoidingtheobsolescencetypicaloffiniteelement
blackboxes.
3.Symboliccapabilities.Toolkitcomponentsmaybeusedtoconductsymbolicstudiesuseful
incertainapplications.
1–10
-
2
Nodes
2–1
Chapter 2:NODES
2–2
§2.1GENERALDESCRIPTION
Nodepointsornodesareselectedspacelocationsthatservetwofunctions:
(i)Todefinethegeometryoftheelementsandhencethatofthefiniteelementmodel.
(ii)Toprovide“residentlocations”forthedegreesoffreedom.Thesefreedomsspecifythestate
ofthefiniteelementmodel.
NodesaredefinedbygivingtheircoordinateswithrespecttoarectangularCartesiancoordinate
system.x;y;z/calledtheglobalsystem.SeeFigure2.1.
Attachedtoeachnoden thereisalocalCartesiancoordinatesystemf Nx
n
;Ny
n
;Nz
n
g,whichisusedto
specifyfreedomdirectionsandiscalledtheFreedomCoordinateSystemorFCS.Thedefinition
oftheFCSisnotpartofthedatastructuresintroducedinthisChapter,becausethatinformation
pertainstothefreedomdatastructures.Itistreatedin§7.2.5.
Nodesareclassifiedintoprimaryandauxiliary.PrimarynodesorP-nodesdodoubleduty:spec-
ificationofelementgeometryaswellasresidencefordegreesoffreedom.Auxiliarynodesor
A-nodesareusedonlyforgeometricpurposesandbearnodegreesoffreedom.
§2.1.1PositionandDirectionNodes
Anotherclassificationofnodesdistinguishesbetweenpositionandorientationordirectionnodes.
Theformerarepointswithfinitecoordinates.Thelatteraredirectionsor“pointsatinfinity”which
areoftenusedtodefinelocalcoordinatesystems.Inthedatastructuresdescribedhereposition
andorientationnodesareplacedinthesametableandaretreatedbythesamemethods.This
unificationispossiblethankstotheuseofhomogeneousnodalcoordinates:fournumbersmaybe
giveninsteadofthree.
Althoughorientationnodesareusuallyofauxiliarytype,sometimestheycarrydegreesoffreedom
andthusarecategorizedasprimary.Thissituationoccursinthedefinitionofinfiniteelements(in
topictreatedinAdvancedFiniteElementMethods),whichhavenodepointsatinfinity.
§2.1.2ExternalIdentification
Nodesaredefinedbytheuser.Theyareidentifiedbyuniquepositivenumbersintherange
1 throughlaxnod.2:1/
wherelaxnod,whichstandsforlargestexternalnode,isaproblemparameter.Theseidentifiers
arecalledexternalnodenumbers.Allcommunicationwiththeuseremploysexternalnumbers.
Whenitisimportanttodistinguishexternalnodenumbersfromtheinternalnodenumbersdefined
below,theformerwillbeshownasboldfacenumbers,asintheexamples(2.2)and(2.4).
Externalnodenumbersneednotbeconsecutive.Thatis,“gaps”mayappear.Forexample,theuser
maydefine6nodesnumbered
2,4,5,8,14,18.2:2/
2–2
2–3
§
2.1 GENERAL DESCRIPTION
n
x
y
z
n
y
_
n
x
_
n
z
_
position vector
node
Figure2.1.Locationofanoden in3Dspacex;y;z.
Thenlaxnod is18butthenumberofdefinednodes,callednumnod,is6.Inprogramming,external
nodenumbersareconsistentlyidentifiedbysymbols
xnode (asvariable),xn (aslooporarrayindex).2:3/
§2.1.3InternalIdentification
Externalnodesarestoredconsecutivelyintablesforusebytheprogram.Theindexfortable
retrievaliscalledinternalnodenumber.Forthepreviousexample:
External:24581416
Internal:1 2 3 4 5 6
.2:4/
Internalnodenumbersareusuallyidentifiedinprogramsby
inode orin (asvariable),n (aslooporarrayindex).2:5/
§2.1.4*NodeTypes
Primarynodescanbefurtherclassifiedaccordingtotheirrelationshipwithelementgeometries:
CornernodesorC-nodes.Locatedatcornersoftwo-andthree-dimensionalelements.Endnodesofone-
dimensionalelementsandthesinglenodeofzero-dimensionalelementsareconventionallyclassifiedascorner
nodes.
SidenodesorS-nodes.Locatedonedgesoftwo-andthree-dimensionalelements.Midpointnodesofone-
dimensionalelementsareconventionallyclassifiedassidenodes.Zero-dimensionalelementshavenoside
nodes.
FacenodesorF-nodes.Locatedonfacesofthree-dimensionalelements.Interiornodesoftwo-dimensional
elementsareconventionallyclassifiedasfacenodes,althoughintwodimensionalanalysistheywouldbemore
logicallyclassifiedasdisconnectednodes.One-andzero-dimensionalelementshavenofacenodes.
2
–
3
Chapter 2:NODES
2–4
Table2.1Nodetypeidentifiers
Letter Meaning
missing Typeisunknown
A Auxiliarynode
C Cornernode
S Sidenode
F Facenode
D Disconnectednode
DisconnectednodesorD-nodes.Locatedintheinteriorofthree-dimensionalelements.Two-,one-and
zero-dimensionalelementshavenodisconnectednodes.
Thisclassificationassignseachnodeanattributecalledtype.Nodesareusually,butnotalways,definedbefore
elements.Thetypeclassificationcannotbecompleteduntiltheelementinformationisavailable.Untilthatis
done,thenodetypeissaidtobeunknown.
ThenodetypeisidentifiedbyaletterasshowninTable2.1.Thetypeissettoblankuntiltheelement
informationisavailable.
§2.2THEMASTERNODEDEFINITIONTABLE
§2.2.1Configuration
TheMasterNodeDefinitionTableorMNDT,definesthelocationofeachnodethroughthecoordinates
storedinthetable.Italsohasslotsforstoringnodetypes.Thisdatastructureisalistofnumnod
sublistitems:
MNDT = f nDL(1),nDL(2):::nDL(n):::nDL(numnod) g
EachoftheMNDT componentsisalistcalledtheIndividualNodeDefinitionListornDL.ThenDL
ofinternalnoden isthen
th
itemintheMNDT.
§2.2.2TheIndividualNodeDefinitionTable
ThenDL(n) isathree-itemlist:
f nx,clist,typeg.2:6/
Thesecondandthirditemsarelistswiththeconfiguration
clist = f x
n
;y
n
;z
n
g orf x
n
;y
n
;z
n
;w
n
g.2:7/
type = f g orf typeg orf type,pMSGTg.2:8/
wheretheitemsshownarenowprimitivewiththepossibleexceptionofpMSGT.Themeaningof
thoseitemsisasfollows.
nx Theexternalnodenumberfortheinternalnoden.
2–4
2–5§
2.3 AUXILIARY DATA STRUCTURES
Table2.2NodeTypeConfiguration
type Meaning
f g Typeisundefined
f type g TypeasperTable2.1,coordinatesgiven
f type,pMSGTg TypeasperTable2.1,coordinatesacquiredfromMSGT
¤
¤
pMSGT isapointertoaMaster-SlaveGeometricTable,seeSection2.3.2
1 (12,12)
2
3 (12,0)
4
5
6
7 (24,12)
8
9 (24,0)
x
y
Figure2.2.Meshfornodedefinitionexample.
x
n
;y
n
;z
n
;w
n
Homogeneouspositioncoordinatesofinternalnoden.Ifw
n
isgivenandis
nonzero,thenodecoordinatesarex
n
=w
n
,y
n
=w
n
andz
n
=w
n
.Ifw
n
isomitted,
asintheformf x
n
;y
n
;z
n
g,w
n
D 1isassumed.Ifw
n
appearsandiszerothe
nodeislocatedatinfinityandx
n
;y
n
;z
n
specifyitsdirectioncoordinates.
type ConfigurationdefinedinTable2.2.
EXAMPLE 2.1
Considerthe9-noderegular2DmeshshowninFigure2.2.Beforethenodetypeisknown,theMNDT hasthe
form
MNDT = f f 1,f 12,12,0g,f g g,f 2,f 12,6,0g,f g g,f 3,f 12,0,0g,f g g,
f 4,f 18,12,0g,f g g,f 5,f 18,6,0g,f g g,f 6,f 18,0,0g,f g g,
f 7,f 24,12,0g,f g g,f 8,f 24,6,0g,f g g,f 9,f 24,0,0g,f g g g
.2:9/
Aftertheelementdataisprocessedallnodesareknowntobeofcornertype.ConsequentlytheMNDT becomes
MNDT = f f 1,f 12,12,0g,f"C"g g,f 2,f 12,6,0g,f"C"g g,f 3,f 12,0,0g,f"C"g g,
f 4,f 18,12,0g,f"C"g g,f 5,f 18,6,0g,f"C"g g,f 6,f 18,0,0g,f"C"g g,
f 7,f 24,12,0g,f"C"g g,f 8,f 24,6,0g,f"C"g g,f 9,f 24,0,0g,f"C"g g g
.2:10/
2–5
Chapter 2:NODES
2–6
§2.3AUXILIARYDATASTRUCTURES
§2.3.1TheExternalToInternalNodeMappingTable
Givenaninternalnodenumbern,theexternalnumberxnmaybeimmediatelyextractedfrom
nDL(n).Oftenitisnecessarytoperformtheinverseoperation:getn givennx.Thatis:givenan
externalnodenumber,finditsslotintheMNDT.
SearchingtheMNDT wouldbeinefficient,becausetheusernumbersthereinarenotnecessarily
ordered.Thusabinarysearchisexcludedandatime-consuminglinearsearchwouldberequired.
Itisthereforeconvenienttoprepareaseparatetablethatdirectlymapsexternaltointernalnodes.
ThistableisanarraycalledNx2i,whichcontainslaxnod integerentries:
Nx2i = f Nx2i(1):::Nx2i(laxnod) g.2:11/
suchthatn = Nx2i(nx).Ifexternalnodenumbernx isundefined,azeroisreturned.
ThistableisnormallykeptseparatefromtheMNDT.Inlanguagesthatsupportdynamicstorage
allocation,Nx2i maybeconstructed“onthefly”onentrytoasubroutineormodulewheresuch
mappingisnecessary.Onexitthestorageisreleased.
EXAMPLE 2.2
Forthecorrespondence(2.8):
Nx2i = f 0,1,0,2,3,0,0,4,0,0,0,0,0,5,0,6 g.2:12/
§2.3.2*TheMaster-SlaveGeometricTable
InadvancedFEMimplementationsnodesmaybeclassifiedintomasterorslavesasregardtheirgeometrical
definition.Coordinatesofmasternodesarespecifieddirectly.Coordinatesofslavenodesarecomputed
indirectly,asfunctionsofthecoordinatesofmasternodes.
Togiveanexample,supposethatnodes2and3areatthethirdpointsofthelinesegmentdefinedbyendnodes
1and4.Once1and4aredefined,thecoordinatesof2and3canbecomputedaccordingtotherules
x
2
D
1
3
x
1
C
2
3
x
4
;y
2
D
1
3
y
1
C
2
3
y
4
;z
2
D
1
3
z
1
C
2
3
z
4
;w
2
D
1
3
w
1
C
2
3
w
4
;
x
3
D
2
3
x
1
C
1
3
x
4
;y
3
D
2
3
y
1
C
1
3
y
4
;z
3
D
2
3
z
1
C
1
3
z
4
;w
3
D
2
3
w
1
C
1
3
w
4
;
.2:13/
SuchrulesarespecifiedintheMasterSlaveGeometricTableorMSGT,andareactivatedthroughthepointer(s)
intype.TheconfigurationoftheMSGT isnotdefinedinthisdocumentbecauseitisanadvancedfeaturenot
requiredforaninitialFEMimplementation.
2–6
2–7§
2.4 IMPLEMENTATION OF MNDT OPERATIONS
Cell2.1DefinitionofIndividualNode
DefineIndividualNode[MNDT_,nDL_]:= Module [
{ndt=MNDT,n,nn,numnod,xn},
numnod=Length[ndt];xn=nDL[[1]];nn=0;
Do [ If [MNDT[[n,1]]==xn,nn=n;Break[] ],{n,1,numnod}];
If [nn==0,AppendTo[ndt,nDL],ndt[[nn]]=nDL];
Return[ndt];
];
MNDT= {};
MNDT= DefineIndividualNode[MNDT,{1,{1,2,-3.,1.},{}} ];
MNDT= DefineIndividualNode[MNDT,{4,{64,4,-8.,1},{}} ];
MNDT= DefineIndividualNode[MNDT,{12,{1,1,1,1},{}} ];
MNDT= DefineIndividualNode[MNDT,{4,{x4,4,-8.,1},{}} ];
MNDT= DefineIndividualNode[MNDT,{2,{1,2,1,0},{}} ];
Print["MNDT=",MNDT//InputForm];
PrintMasterNodeDefinitionTable[MNDT];
(*
nmax=100;MNDT={};Nx2i=Table[0,{nmax}];
Print[Timing[Do [
MNDT= DefineIndividualNode[MNDT,{n,{N[n-1],0,0},{}}],
{n,1,nmax}]]];
PrintMasterNodeDefinitionTable[MNDT];*)
Cell2.2OutputfromtheProgramofCell2.1
MNDT={{1,{1,2,-3.,1.},{}},{4,{x4,4,-8.,1},{}},
{12,{1,1,1,1},{}},{2,{1,2,1,0},{}}}
Xnode x y z w typ pMSGT
1 1.00000 2.00000 -3.00000
4 x4 4.00000 -8.00000
12 1.00000 1.00000 1.00000
2 1.00000 2.00000 1.00000 0.00000
§2.4IMPLEMENTATIONOFMNDTOPERATIONS
ThissectionpresentsMathematicamodulesthatimplementbasicoperationspertainingtofinite
elementnodesandtheMNDT.
§2.4.1DefininganIndividualNode
2–7
Chapter 2:NODES
2–8
Cell2.3ExternaltoInternalNodeMapping
MakeNodeExternalToInternal[MNDT_]:= Module[
{laxnod,n,Nx2i,numnod=Length[MNDT],xn},
If [numnod==0,Return[{}]];
laxnod=0;Do [laxnod=Max[laxnod,MNDT[[n,1]]],{n,1,numnod}];
Nx2i=Table[0,{laxnod}];
Do [xn=MNDT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
Return[Nx2i]
];
MNDT={{17,{1./81,3,4,1},{""}},{6,{1234,69.5678,-134.8,0},{"D"}},
{12,{.1234,.2345,.4567},{"C"}}};
Print[MakeNodeExternalToInternal[MNDT]];
Cell2.4OutputfromtheProgramofCell2.3
{0,0,0,0,0,2,0,0,0,0,0,3,0,0,0,0,1}
ModuleDefineIndividualNode isdisplayedinCell2.1.Itdefinesanewnodebyinsertingits
nDL intheMNDT.Iftheexternalnodenumberisalreadyinthattable,theinformationisreplaced
bythenewone;elseitisappendedtothetable.TheinputargumentsaretheexistingMNDT andthe
eNL.ThemodulereturnstheupdatedMNDT.
ThestatementsfollowingDefineIndividualNode inCell2.1testthemodulebybuildingatable
withseveralnodes,whichisthenprintedwiththemodulePrintMasterNodeDefinitionTable
describedbelow.TheoutputisshowninCell2.2.
§2.4.2ExternaltoInternalNodeMapping
ModuleMakeNodeExternalToInternal,listedinCell2.3,constructstheExternalToInternal
NodeMappingTableNx2i describedin§2.3.2.ItreceivestheMNDT asinputandreturnsNx2i.
Thecodeistestedbythestatementsthatfollowthemodule,andtheresultsofrunningthetest
programareshowninCell2.4.
Inpracticethismoduleisrarelyusedasanindividualentity,asisjustaseasyto“inline”thecode
intothemodulesthatneedtoconstructNx2i onthefly.Itisshownhereforinstructionalpurposes
only.
2–8
2–9§
2.4 IMPLEMENTATION OF MNDT OPERATIONS
Cell2.5PrintingtheMasterNodeDefinitionTable
PrintMasterNodeDefinitionTable[MNDT_]:= Module[
{numnod=Length[MNDT],t,n,xn,xnd,c,typlist,type},
t=Table["",{numnod+1},{7}];
Do [xn=MNDT[[n,1]];
c=MNDT[[n,2]];If [Length[c]==3,c=AppendTo[c,1]];
typlist=MNDT[[n,3]];
t[[n+1,1]]=ToString[xn];
t[[n+1,2]]=PaddedForm[c[[1]]//FortranForm,{6,5}];
t[[n+1,3]]=PaddedForm[c[[2]]//FortranForm,{6,5}];
t[[n+1,4]]=PaddedForm[c[[3]]//FortranForm,{6,5}];
If [c[[4]]!=1,t[[n+1,5]]=PaddedForm[c[[4]]//FortranForm,{6,5}]];
If [Length[typlist]>0,t[[n+1,6]]=typlist[[1]]];
If [Length[typlist]>1,t[[n+1,7]]=ToString[typlist[[2]] ]],
{n,1,numnod}];
t[[1]] = {"Xnode","x","y","z","w","typ","pMSGT"};
Print[TableForm[t,TableAlignments->{Right,Right},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MNDT={{17,{1./81,3,4,1},{"?"}},{2,{123456,69345.5678,-134567.8,0},
{"D"}},
{1513,{.1234,.2345,.4567},{"C"}}};
PrintMasterNodeDefinitionTable[MNDT];
Cell2.6OutputfromtheProgramofCell2.5
Xnode x y z w typ pMSGT
17 0.01235 3.00000 4.00000?
2 123456.00000 69345.60000 -134568.00000 0.00000 D
1513 0.12340 0.23450 0.45670 C
§2.4.3PrintingtheMNDT
ModulePrintMasterNodeDefinitionTable,listedinCell2.5,printstheMNDT inatabular
format.ItsonlyinputargumentistheMNDT.Themoduleistestedbythestatementsthatfollowit,
whichbuildanMNDTdirectlyandprintit.
UnlikeconventionallanguagessuchasFortranorC,printingdatastructuresinatabularformatis
quiteinvolvedinMathematicabecauseofthetendencyofthelanguagetoprintinfree-field.Thusif
oneattemptstoprinttheMNDT nodebynode,non-aligneddisplayofcoordinatesislikelytohappen.
2–9
Chapter 2:NODES
2–10
Cell2.7SettingtheTypeAttributeintheMNDT
SetTypeInMasterNodeDefinitionTable[MNDT_,MEDT_]:= Module[
{ndt=MNDT,e,i,k,knl,lenenl,lenknl,n,nodtyp,numele,numnod,nx2i,xn},
numnod=Length[ndt];k=0;
Do [k=Max[k,ndt[[n,1]]];If [Length[ndt[[n,3]]]==0,ndt[[n,3]]={""}],
{n,1,numnod}];
nx2i=Table[0,{k}];Do [xn=ndt[[n,1]];nx2i[[xn]]=n,{n,1,numnod}];
nodtyp={"C","M","F","I"};numele=Length[MEDT];
Do [If [MEDT[[e,2,1]]=="MFC",Continue[]];
enl=MEDT[[e,3]];lenenl=Length[enl];
Do [knl=enl[[k]];lenknl=Length[knl];
Do [xn=knl[[i]];If [xn<=0,Continue[]];n=nx2i[[xn]];
If [n>0,ndt[[n,3,1]]=nodtyp[[k]]],
{i,1,lenknl}],
{k,1,lenenl}],
{e,1,numele}];
Return[ndt];
];
MNDT={{1,{x1,y1,z1},{"?"}},{3,{x3,y3,z3},{""}},
{6,{x6,y6,z6},{""}},{8,{x8,y8,z8},{""}},
{2,{x2,y2,z2},{""}},{11,{x11,y11,z11},{"U"}},
{5,{x5,y5,z5},{""}},{7,{x7,y7,z7},{""}}};
PrintMasterNodeDefinitionTable[MNDT];
MEDT={ {"S.1",{"QUAD.4"},{{1,3,8,6},{2,11,5,7},{},{}},{5,2}}};
MNDT=SetTypeInMasterNodeDefinitionTable[MNDT,MEDT];
PrintMasterNodeDefinitionTable[MNDT];
Cell2.8OutputfromtheProgramofCell2.7
Xnode x y z w typ pMSGT
1 x1 y1 z1?
3 x3 y3 z3
6 x6 y6 z6
8 x8 y8 z8
2 x2 y2 z2
11 x11 y11 z11 U
5 x5 y5 z5
7 x7 y7 z7
Xnode x y z w typ pMSGT
1 x1 y1 z1 C
3 x3 y3 z3 C
6 x6 y6 z6 C
8 x8 y8 z8 C
2 x2 y2 z2 M
11 x11 y11 z11 M
5 x5 y5 z5 M
7 x7 y7 z7 M
2–10
2–11§
2.4 IMPLEMENTATION OF MNDT OPERATIONS
ThisaccountsfortheratherelaboratecodeshowninCell2.5.Essentiallyacharactercopyofthe
completeMNDT isbuiltinarrayt,whichisthendisplayedinMathematica’sTableForm.
§2.4.4SettingNodeTypes
ThelastmodulepresentedhereisSetTypeInMasterNodeDefinitionTable,whichislistedin
Cell2.7.Itstoresthenodetypeattributediscussedin§2.3.2,intheMNDT.Settingupthatattribute
requireselementdefinitioninformation;specificallytheMasterElementDefinitionTableorMEDT,
whichissuppliedassecondargument.Thus,executionofthismodulecannotbedoneuntilboth
theMNDT andMEDT areconcurrentlyavailable.
ThemoduleistestedbythestatementsshowninCell2.6,whichbuiltaMNDTandaMEDT,
executethemoduleandprinttheMNDTbeforeandafterexecution.TheoutputsareshowninCell
2.8.
2–11
-
3
Individual
Elements
3–1
Chapter 3:INDIVIDUAL ELEMENTS
3–2
ElementsarethefundamentalentitiesintheFiniteElementMethod.Theyspecifythetopological,
constitutiveandfabricationpropertiesofafiniteelementmodel.
Unlikenodes,thereisagreatvarietyofdataassociatedwithelements.Becauseofthatvariety,the
coverageofelementdatastructuresisspreadoverthreeChapters:3,4and5.ThisChapterdealswith
theidentificationofindividualelements.Thisdatacanbegroupedintofivepieces:identifier,type,
nodes,material,andproperties.Thesearedescribedinthefollowingsubsections.
§3.1ELEMENTIDENTIFICATION
Eachelementhasanexternalidentifier,whichisassignedbytheuser,andaninternalidentifier,which
isassignedbytheprogram.
§3.1.1ExternalIdentifiers
Elementsareexternallyidentifiedbya(name,number)pair:anobjectname,andanexternalnumber.
Thelatterisrequiredwhiletheformermaybeblank.
Theobjectnameisacharacterstringthatspecifiesthestructuralobjecttowhichtheelementbelongs.
Forexample:
"RightWing""RightWing.Flap4".3:1/
Thischaracterstringshouldhaveaconvenientmaximumlengthtoaccomodatereadabledescriptions;
forexample80characters.Itiscasedependent:"wing"isnotthesameas"Wing".Sometimesitis
usefultonameobjectswithinobjects.Thisisdonebywritingstringsseparatedbyperiods.Inthe
secondexample,"RightWing.Flap4"isacompositeobjectinwhich"Flap4"isacomponent,in
thesubstructuresensediscussedbelow,of"RightWing".
Forsimplestructuresaseparationintoobjectsmaynotbenecessary.Ifsothischaracterstringmay
beleftemptyandonlyanelementexternalnumbergiven.
Theexternalelementnumberisanintegerintherange
1 throughmaxele.3:2/
wheremaxele isaprogramparameterthatspecifiesthemaximumelementnumberwhichmaybe
assignedtoanobject.Thisnumberisdenotedbyxe orxele inprogramming.Theelementsequence
mayhavegaps.Forexample,supposethatsixelementsforobjectname"RightWing.Flap4"are
definedwithnumbers
1,4,5,6,11,12.3:3/
Therearetwogaps:2–3,and7–10,inthesequenceforthe"RightWing.Flap4"object.Thelast
elementnumberdefined,here12,iscalledthelastexternalelementforaparticularobjectandis
usuallycalledlaxele inprogramming.
§3.1.2InternalElementNumbers
Aseachelementisdefined,itisassignedaninternalelementnumber.Thisisanintegerintherange
1 throughnumele.3:4/
3–2
3–3
§
3.1 ELEMENT IDENTIFICATION
Chapter 3:INDIVIDUAL ELEMENTS
3–4
§3.1.4*Subdomains
Tofacilitateefficientprocessingonparallelcomputers,elementsaregroupedintosetscalledsubdomains,which
arecreatedbysoftwaretoolscalleddomaindecomposers.Subdomainsmayspanobjectsandalsobeempty,that
is,devoidofelements.Subdomainsmayoverlap;thatis,anelementmaybelongtomorethanonesubdomain.
Asubdomainisidentifiedbyapositiveintegerintherange
1 throughnumsub.3:5/
wherenumsub isthenumberofsubdomains.Thissequencehasnogaps.Thesubdomainnumberisusually
carriedinvariables
s (insubscriptsorloops),sub (otherwise).3:6/
Individualelementswithinanon-emptysubdomainareidentifiedbyansubdomainelementnumberintherange
1 throughnelsub(s).3:7/
wherenelsub(s) isthenumberofelementsinsubdomains.Againthissequencehasnogaps.Ifthes
th
subdomainisempty,nelsub(s)=0.
Thesubdomainelementnumberisusuallycarriedinvariables
se inarraysorloops,sele otherwise.3:8/
Theconnectionbetweenexternalandsubdomainidentifiersiseffectedthroughtheinternalelementnumber,as
describedinChapter3.
REMARK 3.1
Theconceptsofsubdomainsandsubstructureshashadhistoricallymanypointsincommon,andmostauthors
regardthemasidentical.Inthepresentexpositionalogicaldistinctionisestablished:asubstructureisan
externalconceptwhereasasubdomainisaninternalconcept.Morespecifically:
1.Substructuresaredefinedbytheuserthroughspecificationofacommonobjectname.Thiskindofgrouping
isusefulforreportingandvisualization.
2.Subdomainsaredefinedbydomaindecomposersonthebasisofefficiencyforparallelprocessing.This
breakdownmayhavetoobeycertainrulesdictatedbythesolutionprocedure.Forexample,FETIsolution
methodsmayrequirethatsubdomainscannothavezero-energymodesotherthanrigid-bodymotions.
Anecessary(butnotsufficient)conditiontofulfillthisrequirementisthatsubdomainelementsmustbe
connected.Ontheotherhand,substructurescancontainanycombinationofelementswhatsoever,whether
connectedornot.
3.Domaindecomposersmaybeforcedtorespectobjectboundaries.Thisiscommonincoupledfieldanalysis,
sincedecompositionsofdifferentfield,suchasfluidandstructure,maybedirectedtodifferentsolvers.
3–4
3–5§
3.2 ELEMENT TYPE
Application Dimension Model Formulation Shape Node-Conf DOF-Conf EXTERNAL INTERNAL
Element Type Descriptor
ISOQ4 STM 2 LAMINA ISO QU1 1000 110000
Element
Type Id
MELT
Figure3.2.Elementtypenameanddescriptor:(a)thenameisexternal
andspecifiedbytheuserwhereasthedescriptorisinternal
andonlyseenbytheprogram;(b)anexample.
§3.2ELEMENTTYPE
TheelementtypedescribesitsfunctioninsufficientdetailtotheFEprogramsothatitcanprocess
theelementthroughtheappropriatemodulesorsubroutines.
Theelementtypeisconciselydefinedbytheuserthroughanelementtypename.Anamemaybe
viewedasanexternalrepresentationofthetype.Legaltypenamesarepairedtroughaninternaltable
calledtheMasterElementLibraryTableorMELT,withwithaninternallistofattributescollectively
calledtheelementtypedescriptor.
§3.2.1ElementTypeName
Theelementtypename,orsimplyelementname,isacharacterstringthroughwhichtheuserspecifies
thefunctionoftheelement,aswellassomedistinguishingcharacteristics.
ThecomplexityofthisnamedependsonthelevelofgeneralityoftheunderlyingFEcode.Asan
extremecase,considerasimplecodethatusesoneandonlyoneelementtype.Nonameisthen
required.
Mostfiniteelementcodes,however,implementseveralelementtypesandnamesappear.Some
ancientprogramsusenumericcodessuchas103 or410.Morecommonnowadaysistheuseof
characterstringswithsomemnemonictouches,suchas"QUAD9"or"BEAM2".
Inthepresentschemeanelementtypenameisassumed.Thechoiceofnamesisuptotheprogram
developer.Thenameimplicitlydefinetheelementtypedescriptor,asillustratedinFigure3.1.
TheconnectionofthetypenameintheMEDT andandthedescriptorintheMELT iseffectedthrough
atypeindex,whichisapointertotheappropriateentryoftheMELT.
§3.2.2ElementTypeDescriptor
Theelementtypedescriptororsimplyelementdescriptorisalistthatcontainssevencomponents
3–5
Chapter 3:INDIVIDUAL ELEMENTS
3–6
Table3.1Applicationspecificationinelementtypedescriptor(examples)
IdentifierApplication
"ACF"Acousticfluid
"EMM"Electromagneticmedium
"EUF"Eulerfluid
"NSF"Navier-Stokesfluid
"RBM"Rigidbodymechanics
"STM"Structuralmechanics
"THM"Thermomechanical
thatcollectivelyclassifytheelementinsufficientdetailtoberouted,duringtheprocessingphases,to
theappropriateelementformationroutines.Thedescriptordoesnotincludeinformationprocessed
withintheroutine,suchasnodecoordinates,materialsandfabricationdata.
Thesevencomponentsareeitheritemsorsublists,andappearinthefollowingorder:
descriptor = f application,dimensionality,model,formulation,
geometric-shape,node-configuration,freedom-configuration g
.3:9/
SeeFigure3.2.Inprogramming,thesemaybeidentifiedbynamessuchas:
eDL = f eDapp,eDdim,eDmod,eDfrm,eDsha,eDnod,eDdof g.3:10/
orsimilarconventions.
Asnotedabove,theconnectionbetweenelementtypenamesanddescriptorisdonethroughabuilt-in
datastructurecalledtheMasterElementLibraryTableorMELT.Thisdatastructureisupdatedbythe
programdeveloperaselementsareaddedtothelibrary.TheorganizationoftheMELT isdescribedin
Chapter4.
§3.2.2.1Application
Theapplicationitemisa3-characteridentificationtagthatexplainswhatkindofphysicalproblem
theelementisusedfor.ThemostimportantonesarelistedinTable3.1.Thedatastructuresdescribed
hereemphasizeStructuralMechanicselements,withtag"STM".However,manyoftheattributes
applyequallytotheotherapplicationsofTable3.1,ifmodeledbythefiniteelementmethod.
§3.2.2.2Dimensionality
Thedimensionalityitemisanintegerthatdefinesthenumberofintrinsicspacedimensionsofa
mechanicalelement:0,1,2or3.Multipointcontraintandmultifreedomconstraintelementsare
conventionallyassignedadimensionalityof0.
3–6
3–7§
3.2 ELEMENT TYPE
Table3.2StructuralMechanicsmodelspecificationinelementtypedescriptor
ApplDimIdentifierMathematicalmodel
"STM"0"POINT"Point
"STM"0"CON"Multipointconstraint
"STM"0"CON"Multifreedomconstraint
"STM"1"BAR"Bar
"STM"1"PBEAM0"C
0
planebeam
"STM"1"PBEAM1"C
1
planebeam
"STM"1"SBEAM0"C
0
spacebeam
"STM"1"SBEAM1"C
1
spacebeam
"STM"1"CABLE"Cable
"STM"1"ARCH"Arch
"STM"1"FRUST0"C
0
axisymmetricshell
"STM"1"FRUST1"C
1
axisymmetricshell
"STM"2"LAMIN"Planestress(membrane)
"STM"2"SLICE"Planestrainslice
"STM"2"RING"Axisymmetricsolid
"STM"2"PLATE0"C
0
(Reissner-Mindlin)plate
"STM"2"PLATE1"C
1
(Kirchhoff)plate
"STM"2"SHELL0"C
0
shell
"STM"2"SHELL1"C
1
shell
"STM"3"SOLID"Solid
Thisattributeshouldnotbeconfusedwithspatialdimensionality,whichis2or3for2Dor3D
analysis,respectively.Spatialdimensionalityisthesameforallelements.Forexampleabarorbeam
elementhasintrinsicdimensionalityof1butmaybeusedina2Dor3Dcontext.
§3.2.2.3Model
Themodelitemislinkedtotheapplicationanddimensionalityattributestodefinethemathematical
modelusedintheelementderivation.Itisspecifiedbyacharacterstringcontainingupto6characters.
SomecommonmodelsusedinStructuralMechanicsapplicationsarealphabeticallylistedinTable
3.2.
InthatTable,0/1afterbendingmodelsidentifiestheso-calledC
0
andC
1
formulations,respectively.
Forexample"PLATE1"isanothermonikerforKirchhoffplateorthinplate."LAMINA"and"SLICE"
arenamesfor2Delementsinplanestressandplanestrain,respectively."FRUS0"and"FRUS1"
areaxisymmetricshellelementsobtainedbyrotatingC
0
andC
1
beams,respectively,360degrees.
"RING"isanaxisymmetricsolidelement.
Othermathematicalmodelidentifierscanofcoursebeaddedtothelistasprogramcapabilitiesexpand.
Onecommonexpansionisthroughtheadditionofcompositeelements;forexampleastiffenedshell
oragirderbox.
3–7
Chapter 3:INDIVIDUAL ELEMENTS
3–8
Table3.3StructuralMechanicsformulationspecificationinelementtypedescriptor
IdentifierFormulation
"ANS"AssumedNaturalStrain
"AND"AssumedNaturalDeviatoricStrain
"EFF"ExtendedFreeFormulation
"EXT"Externallysupplied:usedforMFCs
"FRF"FreeFormulation
"FLE"Flexibility(assumedforce)
"HET"Heterosis
"HYB"Hybrid
"HYP"Hyperparametric
"ISO"Isoparametric
"MOM"MechanicsofMaterials
"SEM"Semi-Loof
"TEM"Template(mostgeneralofall)
"TMX"TransferMatrix
§3.2.2.4Formulation
Theformulationitemindicates,throughathree-letterstring,themethodologyusedforderivingthe
element.SomeofthemostcommonformulationidentifiersarelistedinTable3.3.
§3.2.2.5GeometricShape
Thegeometricshape,inconjunctionwiththeintrinsicdimensionalityattribute,identifiestheelement
geometrybya3-characterstring.Allowableidentifiers,pairedwithelementdimensionalities,are
listedinTable3.4.
Notmuchgeometricalvarietycanbeexpectedofcoursein0and1dimensions.Actuallytherearetwo
possibilityforzerodimension:"DOT"identifiesapointelement(forexample,aconcentratedmassor
aspring-to-ground)whereas"CON"appliestoMPC(MultiPointConstraint)andMFC(MultiFreedom
Constraint)elements.
Intwodimensionstrianglesandquadrilateralsarepossible,withidentifiers"TR"and"QU"respec-
tively,followedbyanumber.Inthreedimensionsthechoiceisbetweentetrahedra,wedgesand
bricks,whichareidentifiedby"TE","WE"and"BR",respectively,alsofollowedbyanumber.The
numberfollowingtheshapeidentifierspecifieswhethertheelementisconstructedasaunit,orasa
macroelementassembly.
The"ARB"identifierisintendedasacatch-allforshapesthataretoocomplicatedtobedescribedby
oneword.
3–8
3–9
§
3.2 ELEMENT TYPE
Table3.4Shapespecificationinelementtypedescriptor
DimIdentifierGeometricshape
0"DOT"Point;e.g.aconcentratedmass
0"CON"Constraintelement(conventionally)
1"SEG"Segment
2"TR1"Triangle
2"QU1"Quadrilateral
2"QU2"Quadrilateralbuiltof2triangles
2"QU4"Quadrilateralbuiltof4triangles
3"TE1"Tetrahedron
3"WE1"Wedge
3"WE3"Wedgebuiltof3tetrahedra
3"BR1"Brick
3"BR5"Brickbuiltof5tetrahedra
3"BR6"Brickbuiltof6tetrahedra
2-3"VOR"Voronoicell
1-3"ARB"Arbitraryshape:definedbyotherattributes
§3.2.2.6ElementNodalConfiguration
Thenodeconfigurationoftheelementisspecifiedbyalistoffourintegeritems:
node-configuration:= f eCNX,eSNX,eFNX,eINX g.3:11/
HereeCNX,eSNX,eFNX andeINX,areabbreviationsforelement-corner-node-index,element-side-
node-index,element-face-node-indexandelement-internal-node-index,respectively.Theirvalue
rangesfrom0through2withthemeaningexplainedinTable3.5.Forstorageanddisplayconvenience,
thefourindicesareoftendecimallypackedasoneinteger:
eCSFIX = 1000*eCNX + 100*eSNX + 10*eFNX + eINX.3:12/
Notethatthefullsetofindicesonlyappliestoelementswithintrinsicdimensionalityof3.If
dimensionalityis2orless,eINX isignored.Ifdimensionalityis1orless,eFNX andeINX are
ignored.Finallyifdimensionalityis0,allexcepteCNX areignored.Somespecificexamples:
20-nodetriquadraticbrickECSFI=1100
27-nodetriquadraticbrickECSFI=1111
64-nodetricubicbrickECSFI=1222 (64=8*1+12*2+6*4+8)
8-nodeserendipityquadECSFI=1100
9-nodebiquadraticquadECSFI=1110
10-nodecubiclamina(planestress)triangleECSFI=1210 (10=3*1+3*2+1)
3
–
9
Chapter 3:INDIVIDUAL ELEMENTS
3–10
Table3.5Nodeconfigurationinelementtypedescriptor
DimIndicesMeaning/remarks
1–3eCNX=0,1 elementhaseCNX nodespercorner
1–3eSNX=0,1,2 elementhaseSNX nodesperside
2–3eFNX=0,1,2 ifeFNX=0,nofacenodes
ifeFNX=1,onenodeperface
ifeFNX=2,asmanyfacenodesasfacecorners
3eFNX=0,1,2 ifeINX=0,nofacenodes
ifeINX=1,onenodeperface
ifeINX=2,asmanyfacenodesasfacecorners
0eCSFIX=1000 allnodesaretreatedascorners
Someexoticnodeconfigurationsareomitted;cf.Remark3.2
REMARK 3.2
Notethatthemeaningof”interiornodes”heredoesnotagreewiththeusualFEMdefinitionexceptfor3D
elements.AplanestresselementwithonecenternodehaseFNX=1 andeINX=0 insteadofeFNX=0 andeINX=1.
Inotherwords,thatcenternodeisconsideredafacenode.Similarlyabarorbeamelementwithtwonodesat
itsthird-pointshaseSNX=2,eFNX=eINX=0;thatis,thosenodesareconsideredsidenodes.Asexplainednext,
thereasonforthisconventionismixability.
Whyuseindicesinsteadofactualnodecounts?Mixabilitytests(connectingdifferentelementstogether)are
considerablysimplifiedusingthisitem.Morespecifically,elementswithsameapplication,model,formulation,
eCNX,eSNX,eFNX,(in3D)andeCNX,eSNX (in2D)canbemixedif,inaddition,somegeometriccompatibility
conditionsaremet,whiledimensionalityandgeometricshapeattributesmaybedifferent.[NotethateINX and
eFNX areirrelevantin3Dand2D,respectively.]Twoexamples:
(i)TwosolidelementswithECSFI=1220,1221and1222arecandidatesformixingbecauseinteriornodes
areirrelevanttosuchmating.Thisistrueregardlessofwhetherthoseelementsarebricks,wedgesor
tetrahedra.Ofcoursethecommonfacesmusthavethesamegeometricshape;thisrepresentsanotherpart
ofthemixabilitytest.
(ii)Mixabilityacrossdifferentdimensionalitiesisoftenofinterest.Forexample,a3-nodebarwith
ECSFI=1100attachedalongtheedgeofaquadrilateralortriangularlaminawithECSFI=1100 or1110.
Similarlya2-nodebeam,whichhasECSFI=1000,maybeattachedtoaplatewithECSFI=1000 butnotto
onewithECSFI=1100.
ValuesotherthanthoselistedinTable3.5arereservedforexoticconfigurations.Forexample,elementswith
”doublecornernodes”(eCNX=2)areoccassionallyusefultorepresentsingularitiesinfracturemechanics.
§3.2.2.7ElementFreedomConfiguration
Theelementfreedomconfigurationdefinesthedefaultfreedomassignationatelementnodes.Here
“default”meansthattheassignationmaybeovewridenonanodebynodebasisbytheFreedom
DefinitiondatastudiedinChapter7.Abriefintroductiontotheconceptoffreedomassignmentis
neededhere.Moredetailsaregiveninthatchapter.ThediscussionbelowislimitedtoStructural
Mechanicselements.
3–10
3–11§
3.3 ELEMENT NODE LIST
Table3.6FreedomSignaturesinelementdescriptor
SignatureMeaning
0Freedomisnotassigned(“off”)
1Freedomisassigned(“on”)
AteachnodenalocalCartesianreferencesystem.Nx
n
;Ny
n
;Nz
n
/maybeusedtodefinefreedomdirec-
tions.SeeFigure2.1.Ifthesedirectionsarenotexplicitlyspecified,theyareassumedtocoincide
withtheglobalsystem.x;y;z/.(Thisisinfactthecaseinthepresentimplementation).
Inprincipleuptosixdegreesoffreedomcanbeassignedatanode.Theseareidentifiedbythe
symbols
tx,ty,tz,rx,ry,rz.3:13/
Symbolstx,ty andtz denotetranslationsalongaxesNx
n
,Ny
n
andNz
n
,respectively,whereasrx,ry
andrz denotestherotationsaboutthoseaxes.Ifaparticularfreedom,sayrz,appearsinthefinite
elementequationsoftheelementitissaidtobeassigned.Otherwiseitisunassigned.Forexample,
consideraflatthinplateelementlocatedintheglobal.x;y/plane,withalllocalreferencesystems
alignedwiththatsystem.Thentz,rx,andry areassignedwhereastx,ty andrz arenot.
Thefreedomconfigurationatcorner,side,faceandinteriornodesofanelementisdefinedbyfour
integersdenotedby
eFS = f eFSC,eFSS,eFSF,eFSI g.3:14/
whicharecalledelementfreedomsignatures.Omittedvaluesareassumedzero.
Eachoftheintegersin(3.14)isformedbydecimallypackingsixindividualfreedomsignaturevalues:
eFSC D 100000*txC + 10000*tyC + 1000*tzC + 100*rxC + 10*ryC + rzC
eFSS D 100000*txS + 10000*tyS + 1000*tzS + 100*rxS + 10*ryC + rzS
eFSF D 100000*txF + 10000*tyF + 1000*tzF + 100*rxF + 10*ryC + rzF
eFSI D 100000*txI + 10000*tyI + 1000*tzI + 100*rxI + 10*ryC + rzI
.3:15/
ThefreedomsignaturetxC isassociatedwiththetranslationtx atcornernodes.Similarly,rxS is
associatedwiththerotationrx atsidenodes.Andsoon.Thesignaturevaluespecifieswhetherthe
associatedfreedomisonoroff,asindicatedinTable3.6.Signaturesotherthan0or1areusedinthe
MasterFreedomDefinitionTabledescribedinChapter7toincorporatetheattributecalledfreedom
activity.
REMARK 3.3
Iftheelementlacksnodeofacertaintypethecorrespondingsignatureiszero.Forexample,iftheelementhas
onlycornernodes,eFSS = eFSF = eFSI = 0,andthesemaybeomittedfromthelist(3.14).
REMARK 3.4
ForanMFCelementthesignatures,ifgiven,areconventionallysettozero,sincethenodeconfigurationis
obtainedfromotherinformation.
3–11
Chapter 3:INDIVIDUAL ELEMENTS
3–12
§3.3ELEMENTNODELIST
Thelistofnodenumbersoftheelementissuppliedbytheuser.Thisinformationisgroupedinto
foursublists,atleastoneofwhichisnonempty:
nodelist = f cornernodes,sidenodes,facenodes,internalnodes g.3:16/
Thefirstlist,cornernodes,liststhecornernodesoftheelementbyexternalnodenumber.Ifthe
elementhasonlycornernodesallotherlistsareempty.Iftheelementhassidenodes,theyarelisted
insidenodes,andsoon.
Inprogrammingthefollowingvariablenamesareoftenusedfortheselists:
eXNL = f eFXNL,eSXNL,eFXNL,eILNL g.3:17/
inwhichtheletterX emphasizesthattheseareexternalnodenumbers.IftheX isdropped,asineNL,
itimpliesthatinternalnodenumbersappear.
Cornernodesmustbeorderedaccordingtotheconventionsapplicabletoeachgeometricelement
shape.Allcornernodenumbersmustbenonzeroandpositive.
Negativeorzeronodenumbersareacceptableforthelastthreelists.Azeronumberidentifiesa
”hierarchicallyconstrained”nodeorH-nodeusedincertaintransitionelements;suchfreedomsdo
notappearintheassembledequations.AnegativenumberidentifiesanunconnectednodeorU-node,
whosedegreesoffreedomarenotconnectedtothoseofanotherelement.Inlinearstaticanalysis
thosefreedomsmaybestaticallycondensedattheelementlevel.I-nodesarealwaysU-nodes.
7
8
9
24
25
26
39
40
41
Figure3.3.ExampleelementtoillustratetheconfigurationoftheelementnodelisteXNL.
EXAMPLE 3.1
Theelementnodelistofthe9-nodequadrilateralelementshowninFigure3.3followingtheusual
counterclockwise-numberingconventionsofmostFEMcodes,is
eXNL = f f 7,9,41,39g,f 8,26,40,24g,f 25g g.3:18/
REMARK 3.5
Thereare2D“fluxelements”thatcontainnocornernodes.Theyareconnectedthroughmidsidenodesin2D
andfacenodesin3D.Thespecificationoftheirnodelistisabitunusualinthatthefirstlistisemptyin2D
whereasthefirsttwolistsareemptyin3D.SuchelementsarenotcommonlyusedinStructuralMechanics,
however.
3–12
3–13§
3.5 INDIVIDUAL ELEMENT DEFINITION LIST
§3.4ELEMENTCODES
Theelementcodesareintegersthatindirectlyspecifyindividualelementpropertiesbypointingto
constitutiveandfabricationtables.Uptothreecodesmaybelisted:
element-codes = f constitutive,fabrication,template g.3:19/
Thevariablenamesoftenusedfortheseitemsare
eCL = f cc,fc,tc g orf ccod,fcod,tcod g.3:20/
Ofthesethefirsttwocodesmustappearexplicitly,althoughvaluesofzeroareacceptabletoindicate
a“null”orvoidpointer.Thelastoneisoptional.
§3.4.1ConstitutiveCode
ThisisapointertotheConstitutivetablesthatspecifymaterialproperties.Theformatofthesetables
ispresentedinChapter4.
Someelements(forexample,constraintelements)maynotrequireconstitutiveproperties,inwhich
casethecodeiszero.
§3.4.2FabricationCode
ThisisapointertotheFabricationtablesthatspecifyfabricationproperties.Thesepropertiesinclude
geometricinformationsuchasthicknessesorareas.Forconstraintelementsfabricationtablesare
usedtospecifycoefficientsinmultipointormultifreedomconstraints.Theformatofthesetablesis
presentedinChapter5.
Someelements(forexample,solidelements)maynotrequirefabricationproperties,inwhichcase
thecodeiszero.
§3.4.3TemplateCode
ThisisapointertotheTemplatetablesthatspecifynumericalcoefficientsapplicabletotheconstruc-
tionofcertainclassesofelementsthatfallundertheTEM Formulation.Iftheelementdoesnotpertain
tothatclass,thiscodecanbeleftoutorsettozero.
EXAMPLE 3.2
Iftheconstitutivecodeis3andthefabricationcodeis4,theelementcodelistis
eCL = f 3,4 g.3:21/
3–13
Chapter 3:INDIVIDUAL ELEMENTS
3–14
Individual
Element
Definition List
Constitution Fabrication Template
CornerNodes SideNodes FaceNodes InternalNodes
Application Dimension Model Formulation
Object External
Name Number
Geometric Nodal Freedom
Shape Configuration Configutation
stored in MEDT
stored in MEDT
stored in MEDT
via MELT
Element
Identifier
Element
Type
Descriptor
Element
Nodes
Element
Codes
Figure3.4.ConfigurationoftheIndividualElementDefinitionList.
§3.5INDIVIDUALELEMENTDEFINITIONLIST
TheIndividualElementDefinitionListoreDL definesthepropertiesofanindividualelementThis
eDL isalistoffourcomponentsthathavebeenpreviouslydescribedin§3.1through§3.4:
eDL:= f identifier,type,nodes,codes g.3:22/
Thevariablenamesoftenusedfortheseitemsare
eDL = f eleident,eletype,elenodes,elecodes g.3:23/
Asdescribedabove,eachoftheeDTcomponentsisalist,oralistoflists.ThecompleteeDL
configurationissummarizedinFigure3.4.
TheeDLsofallelementsarestackedtobuilttheMasterElementDefinitionTabledescribedinChapter
4.
3–14
-
4
Element
Grouping
4–1
Chapter 4:ELEMENT GROUPING
4–2
Chapter3discussedthedatathatdefinesanindividualelement.ThisChaptershowshowthatdata
isgroupedtoformaMasterElementDefinitionTable.
Unlikenodes,theelementdatacanbearrangedinseveralwaystomeettheneedsoftheuseror
program.Threeimportantarrangements,qualifiedasMaster,VisualandLocal,aredescribedhere.
Althoughthesecertainlydonotexhaustallpossibilities,theyillustratethethreemostimportant
arrangementsofelementdata.
FamiliaritywiththeconceptsandterminologyofChapter3isessential.
§4.1THEMASTERELEMENTDEFINITIONTABLE
§4.1.1GeneralDescription
TheMasterElementDefinitionTableorMEDT isaflatdatastructurethatlistallindividualfinite
elementsofadiscretemodel.Thequalifier“flat”meansthatforexample,theelementwithinternal
number42isthe42
th
objectinthetable.
Thequalifier“Master”meansthattheotherelementdatastructuresdescribedinthisChapter:the
VisualElementDefinitionTableorVEDT,andtheLocalSubdomaintoElementConnectionTable
orLSECT canbebuiltfromtheMEDT.ConsequentlyVEDT andLSECT arereferredtoassubordinat
datastructures.
Ontheotherhand,theMEDT cannotbereconstructedfromitssubordinates.Hencetheproperway
totransferthefiniteelementmodelfromacomputertoanotheristomovetheMEDT.
§4.1.2Configuration
TheMEDT issimplythecollectionofallIndividualElementDefinitionListsoreDL definedin§3.5:
MEDT = f eDL(1),eDL(2),:::eDL(e),:::eDL(numele)g.4:1/
wherenumele isthetotalnumberofdefinedelements.ListeDL(e) definespropertiesofthee
th
individualelement,wheree istheinternalelementnumber.
ThisconfigurationoftheMEDT hasadvantagesandshortcomings.Iftheinternalelementnumber
isknown,extractionofthedataforthatelementisimmediate.SeeFigure4.1(a).Accessbyany
otherattributeislessefficientinthatitwillgenerallyrequireatablesearch.
§4.2THEVISUALIZATIONELEMENTDEFINITIONDATA
TheVisualizationElementDefinitionDataorVEDT isorganizedaccordingtoobjectname.Itthus
providerapidaccesstoallelementsthatpertaintoonesubstructure.Itisalsowellsuitedtoextract
theeDL giventheexternalelementidentifier;seeFigure4.1(b).
4–2
4–3§
4.2 THE VISUALIZATION ELEMENT DEFINITION DATA
e
(a)
(b)
IEDT(e)
MEDT
e
IEDT(e)
MEDT
VEDT
external
identifier
(c)
e
IEDT(e)
MEDT
LSECT
internal identifier
Figure4.1.ElementaccessoperationsusingMEDT,VEDT,andLSECT.
A.1
B.1
B.2
B.3
C.1
C.3
C.2
A.2A.3
A.4
Figure4.2.Meshconfigurationforexample(4.1).
§4.2.1OneLevelSubstructures
TheorganizationoftheVEDT forone-levelsubstructuresisbestillustratedbyanexample.Suppose
thattenelementspertainingtosubstructuresA,B andC ofthe2DmeshofFigure4.2havebeen
definedinthefollowingsequence:
A:1 B:1 A:4 C:3 B:2 A:3 C:2 A:2 C:1 B:3
1 2 3 4 5 6 7 8 9 10
.4:2/
wherethenumberinthesecondrowistheinternalelementnumber.ForthiscasetheVEDTmay
beorganizedasatwo-leveldatastructurethatlistssubstructurenamesfollowedbyinternalelement
4–3
Chapter 4:ELEMENT GROUPING
4–4
A.L.1
B.1
B.2
B.3
C.1
C.3
C.2
A.L.2A.R.1
A.R.2
Figure4.3.Meshconfigurationforexample(4.3).
numbers:
VEDT= f f A,f 1,3,6,8g g,f B,f 2,5,10g g,f C,f 4,7,9g g g.4:3/
Notethatsubstructurenameshavebeenalphabeticallyordered.Thispermitsfastaccesstoa
particularnamebybinarysearchoftheVEDT.ThisversionoftheVEDT iscalledobjectsortedor
namesorted.
Internalelementnumbersarealsoorderedinsequencebutthatdoesnotguaranteelikeordering
ofusernumbers.Forexample,C.1 andC.2 haveinternalnumbers9 and7,respectively.Thus
thearrangementillustratedby(4.3)issuitablewhenaccesstoallelementsofasubstructure,inno
particularsequence,isdesirable.Thisiscommoningraphicoperations.
Iffastaccesstoanamedindividualelements,sayC.3,isimportant,theinternalelementnumber
listsshouldbereorderedinthesenseofincreasingexternalelementnumbers.ThisalternativeVEDT
form,calledfullysorted,is
VEDT = f f A,f 1,8,6,3g g,f B,f 2,5,10g g,f C,f 9,7,4g g g.4:4/
Nowbinarysearchcanbeusedforelementnumberstoo.
§4.2.2MultipleLevelSubstructures
Formultiplelevelsubstructuring,theVEDT acquiresadditionallistlevels.Figure4.3illustratesa
simplemodificationofthepreviousexample,inwhichA containssub-substructuresL andR (“left”
and“right”),whereasB andC remainthesame,conveystheidea:
A:L:1 B:1 A:R:2 C:3 B:2 A:L:2 C:2 A:R:1 C:1 B:3
1 2 3 4 5 6 7 8 9 10
.4:5/
Theobject-sortedVEDTis
VEDT = f f A,f L,f 1,6g g,f R,f 3,8g g g,f B,f 2,5,10g g,f C,f 4,7,9g g g.4:6/
4–4
4–5
§
4.3 *LOCAL SUBDOMAIN TO ELEMENT CONNECTION TABLE
1.1
2.1
2.2
2.3
3.1
3.3
3.2
1.2
1.3
1.4
Figure4.4.Meshconfigurationforexample(4.5).
whereasthefully-sortedformis
VEDT = f f A,f L,f 1,6g g,f R,f 8,3g g g,f B,f 2,5,10g g,f C,f 9,7,4g g g.4:7/
Manyvariationsofthesebasicarrangementsthatsortelementsbytypeorotherattributescanbe
imagined.Sincethenumberofsuchpossibilitiesisverygreat,andmanyarrangementsarelikelyto
becustomizedtomakeoptimaluseofunderlyinghardware,thereislittlepointindescribingmore
variantshere.
§4.3*LOCALSUBDOMAINTOELEMENTCONNECTIONTABLE
TheLocalSubdomaintoElementConnectionTableorLSECT,isadatastructurethatdefinesthepartitionofthe
finiteelementmodelintosubdomainstofacilitateparallelprocessing.TheLSECT istheprimarydatastructure
producedbyaDomainDecomposer.ItiswellsuitedtoextracttheeDL giventhesubdomainidentifier;see
Figure4.1.
EXAMPLE 4.1
Letusreusetheexample(4.2)withonechange.SupposethatsubstructuresA,B andC becomesubdomains1,
2 and3,respectively,asillustratedinFigure4.4:
1:1 2:1 1:4 1:3 2:2 1:3 3:2 1:2 3:1 2:3
1 2 3 4 5 6 7 8 9 10
.4:8/
wherethenotations.se identifiesthese
th
elementofthes
th
subdomain.TheconfigurationoftheLSECT is
LSECT = f f 1,3,6,8g,f 2,5,10g,f 4,7,9g g.4:9/
ConparingthistotheVEDT(4.5)itiscanobservedthat(4.9)issimplerasonlyatwo-levellistisnecessary.
Thisisbecausesubdomainsareidentifiedbynumberandnotbyname.Thustoaccessallelementsthat
belongto,saysubdomain2,onesimplyextractsthesecondsublist:f 2,5,10g,from(4.9).Fromtheinternal
elementnumbersthenonecanimmediatelygettheeDL,asschematizedinFigure4.1(c).Theexternalelement
identifierisnotinvolvedinthesemanipulations.
4
–
5
Chapter 4:ELEMENT GROUPING
4–6
Cell4.1DefinitionofIndividualElement
DefineIndividualElement[MEDT_,eDL_]:= Module [
{edt=MEDT,name,numele,m},
name=eDL[[1]];numele=Length[edt];m=0;
Do [If [name==edt[[e,1]],m=e;Break[]],{e,1,numele}];
If [m==0,AppendTo[edt,eDL],edt[[m]]=eDL];
Return[edt];
];
eDL1={"RightWing.Flap.67",{"QLAM.4"},{{2,6,5,4},{1,3,5,8}},{3,5}};
eDL2={"RightWing.Spar.211",{"SPAR.2"},{{65,79}},{4,12}};
eDL3={"RightWing.Spar.211",{"SPAR.2"},{{65,101}},{4,12}};
MEDT={};
MEDT=DefineIndividualElement[MEDT,eDL1];
MEDT=DefineIndividualElement[MEDT,eDL2];
PrintMasterElementDefinitionTable[MEDT];
MEDT=DefineIndividualElement[MEDT,eDL3];
PrintMasterElementDefinitionTable[MEDT];
Cell4.2OutputfromtheProgramofCell4.1
ElemId Type Nodelist Codes
RightWing.Flap.67 QLAM.4 {{2,6,5,4},{1,3,5,8}} {3,5}
RightWing.Spar.211 SPAR.2 {{65,79}} {4,12}
ElemId Type Nodelist Codes
RightWing.Flap.67 QLAM.4 {{2,6,5,4},{1,3,5,8}} {3,5}
RightWing.Spar.211 SPAR.2 {{65,101}} {4,12}
REMARK 4.1
Thedatastructurespresentedin§4.1and§4.2arecalledMasterandVisualizationElementDefinitionTables,
respectively.Tomaintainconsistency,theLSECT shouldhavebeenchristenedLocalElementDefinition
Table.However,thisparticulardatastructureturnsouttomoreproperlybelongtotheclassofconnectivity
datastructuresdiscussedinChapter9.Thisfactmotivatesitsmoreconvolutedname.
§4.4THEMASTERELEMENTLIBRARYTABLE
TheMasterElementLibraryTableorMELT wasdescribedinChapter3asaninternaldatastructure
thatlinkselementtypenameswithelementtypedescriptors.ThepurposeoftheMELT istobuffer
theuserfromelementdefinitiondetails.Forexample,todefinea2-nodebarelementtheuser
simplygivesthetype"BAR2"withoutbotheringaboutthefineprintcontainedinthedescriptor.
“Internal”meansthatMELT isnotdefinedbytheuserbutbythecodedeveloper.Thecontentsof
MELT provideaninventoryofwhatelementsareavailabletotheuser.Thereisoneentryinthe
4–6
4–7§
4.5 IMPLEMENTATION OF MEDT OPERATIONS
Cell4.3ExternaltoInternalNodeMapping
PrintIndividualElementDefinitionList[eDL_]:= Module[
{t},
t=Table["",{4}];
t[[1]]=eDL[[1]];t[[2]]=eDL[[2,1]];
t[[3]]=ToString[eDL[[3]]];t[[4]]=ToString[eDL[[4]]];
Print[TableForm[t,TableAlignments->{Left,Right},
TableDirections->Row,TableSpacing->{2}]];
];
eDL={"RightWing.Flap.67",{"QLAM.4"},{{2,6,5,4},{}},{3,5}};
PrintIndividualElementDefinitionList[eDL];
Cell4.4OutputfromtheProgramofCell4.3
RightWing.Flap.67 QLAM.4 {{2,6,5,4},{}} {3,5}
tableforeachelementintheprogram.Thetableisnotmodifiedunlessnewelementsareaddedor
existingelementsremoved.
Section4.5belowprovidesaspecificexampleoftheconfigurationofthistable.
§4.5IMPLEMENTATIONOFMEDTOPERATIONS
ThissectionlistsmodulespertainingtothemanipulationanddisplayoftheMasterElementDefi-
nitionTable(MEDT).Theyarelistedinalphabeticorder.
§4.5.1DefininganIndividualElement
ModuleDefineIndividualElementisdisplayedinCell4.1.Itdefinesanewelementbyinserting
itsnDL intheMEDT.Iftheexternalelementnameisalreadyinthattable,theinformationisreplaced
bythenewone;elseitisappended.TheinputargumentsaretheexistingMEDT andtheeDL.The
modulereturnstheupdatedMEDT.
ThestatementsfollowingDefineIndividualElement inCell4.1testthemodulebybuildingata-
blewithseveral,whichisthenprintedwiththemodulePrintMasterElementDefinitionTable
describedbelow.TheoutputisshowninCell4.2.
§4.5.2PrintingIndividualNodeDefinitionList
ModulePrintIndividualNodeDefinitionList,listedinCell4.3,printtheeDLofanindividual
element.
4–7
Chapter 4:ELEMENT GROUPING
4–8
Thecodeistestedbythestatementsthatfollowthemodule,andtheresultsofrunningthetest
programareshowninCell4.4.
§4.5.3PrintingtheMEDT
ModulePrintMasterElementDefinitionTable,listedinCell4.5,printstheMEDT inatabular
format.ItsonlyinputargumentistheMEDT.Themoduleistestedbythestatementsthatfollowit,
whichbuildanMEDTdirectlyandprintit.
Cell4.5PrintingtheMasterNodeDefinitionTable
PrintMasterElementDefinitionTable[MEDT_]:= Module[
{e,numele,t},
numele=Length[MEDT];t=Table["",{numele+1},{4}];
Do [
t[[e+1,1]]=MEDT[[e,1]];
t[[e+1,2]]=MEDT[[e,2,1]];
t[[e+1,3]]=ToString[MEDT[[e,3]]];
t[[e+1,4]]=ToString[MEDT[[e,4]]],
{e,1,numele}];
t[[1]] = {"ElemId","Type","Nodelist","Codes"};
Print[TableForm[t,TableAlignments->{Left},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MEDT={{"RightWing.Flap.67",{"QLAM.4"},{{2,6,5,4},{1,3,5,8}},{3,5}},
{"RightWing.Spar.211",{"SPAR.2"},{{65,79}},{4,12}}};
PrintMasterElementDefinitionTable[MEDT];
Cell4.6OutputfromtheProgramofCell4.5
ElemId Type Nodelist Codes
RightWing.Flap.67 QLAM.4 {{2,6,5,4},{1,3,5,8}} {3,5}
RightWing.Spar.211 SPAR.2 {{65,79}} {4,12}
§4.5.4PrintingtheTypeIndexedMEDT
ModulePrintIndexedMasterElementDefinitionTable islistedinCell4.7.Thismodule
receivesasargumenttheMEDT.
ItprintsthetablelikethemodulePrintMasterElementDefinitionTable withonedifference:
thetypeindexisprintedinsteadofthetypename.Thisisusefulforcarryingouttestsafterthe
MELT hasbeenmodified,butisoflittleconecrntotheuser.
ThemoduleistestedbythestatementsshowninCell4.6,whichbuiltaMEDT,storetypeindices,
printtheMEDT beforeandafterexecution.TheoutputsareshowninCell4.8.
4–8
4–9§
4.5 IMPLEMENTATION OF MEDT OPERATIONS
Cell4.7PrintingaTypeIndexedMEDT
PrintTypeIndexedMasterElementDefinitionTable[MEDT_]:= Module[
{e,numele,t,type},
numele=Length[MEDT];t=Table["",{numele+1},{4}];
Do [
t[[e+1,1]]=MEDT[[e,1]];type=MEDT[[e,2]];
If [Length[type]>1,t[[e+1,2]]=ToString[type[[2]]]];
t[[e+1,3]]=ToString[MEDT[[e,3]]];
t[[e+1,4]]=ToString[MEDT[[e,4]]],
{e,1,numele}];
t[[1]] = {"ElemId","Tix","Nodelist","Codes"};
Print[TableForm[t,TableAlignments->{Left},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MEDT={{"RightWing.Flap.67",{"QLAM.4",91},{{2,6,5,4},{1,3,5,8}},{3,5}},
{"RightWing.Spar.211",{"SPAR.2"},{{65,79}},{4,12}}};
PrintTypeIndexedMasterElementDefinitionTable[MEDT];
Cell4.8OutputfromtheProgramofCell4.7
ElemId Tix Nodelist Codes
RightWing.Flap.67 91 {{2,6,5,4},{1,3,5,8}} {3,5}
RightWing.Spar.211 {{65,79}} {4,12}
§4.5.5SettingtheTypeIndexintheMEDT
ModuleSetTypeIndexInMasterElementDefinitionTable islistedinCell4.9.Thismodule
receivesasinputargumentstheMEDT andtheMELT.ForeachelementfoundintheMEDT itscans
theMELT toverifythatalinkageexistsandifsoitstoresthetypeindex.Ifnolinkageisfoundthe
indexfieldremainsempty.
ThemoduleistestedbythestatementsshowninCell4.9,whichdirectlybuiltaMEDT andMELT,
storetypeindices,printtheMEDT beforeandafterexecution.TheoutputsareshowninCell4.10.
4–9
Chapter 4:ELEMENT GROUPING
4–10
Cell4.9SettingUpTypeIndicesinMEDT
SetTypeIndexInMasterElementDefinitionTable[MEDT_,MELT_]:= Module[
{edt=MEDT,e,i,itype,jtype,numele,type,typnam},
numele=Length[edt];numtyp=Length[MELT];itype=jtype=1;
Do [type=MEDT[[e,2]];typnam=type[[1]];
If [typnam!=MELT[[jtype,1]],itype=0;
Do [If[typnam==MELT[[i,1]],itype=i;Break[]],{i,1,numtyp}]
];
jtype=itype;edt[[e,2]]={typnam,jtype};jtype=Max[jtype,1],
{e,1,numele}];
Return[edt];
];
MELT={{"BAR2D.2","STM",2,"BAR","MOM","SEG",1000,{110000}},
{"BAR3D.2","STM",3,"BAR","MOM","SEG",1000,{111000}},
{"QLAM.4","STM",2,"LAMINA","ISO","QU1",1000,{110000}},
{"SPAR.2","STM",2,"SPAR","MOM","SEG",1000,{111000}},
{"MFC","STM",2,"CON","EXT","ARB",1000,{0,0,0,0}}};
eDL1={"RightWing.Flap.67",{"QLAM.4"},{{2,6,5,4},{1,3,5,8}},{3,5}};
eDL2={"RightWing.Spar.211",{"SPAR.2"},{{65,79}},{4,12}};
eDL3={"RightWing.Spar.214",{"BAR2D.2"},{{65,101}},{4,12}};
eDL4={"RightWing.MFC.20",{"MFC"},{{2,65}},{0,1}};
MEDT={};
MEDT=DefineIndividualElement[MEDT,eDL1];
MEDT=DefineIndividualElement[MEDT,eDL2];
MEDT=DefineIndividualElement[MEDT,eDL3];
MEDT=DefineIndividualElement[MEDT,eDL4];
PrintMasterElementDefinitionTable[MEDT];
MEDT=SetTypeIndexInMasterElementDefinitionTable[MEDT,MELT];
PrintTypeIndexedMasterElementDefinitionTable[MEDT];
Cell4.10OutputfromtheProgramofCell4.9
ElemId Type Nodelist Codes
RightWing.Flap.67 QLAM.4 {{2,6,5,4},{1,3,5,8}} {3,5}
RightWing.Spar.211 SPAR.2 {{65,79}} {4,12}
RightWing.Spar.214 BAR2D.2 {{65,101}} {4,12}
RightWing.MFC.20 MFC {{2,65}} {0,1}
ElemId Tix Nodelist Codes
RightWing.Flap.67 3 {{2,6,5,4},{1,3,5,8}} {3,5}
RightWing.Spar.211 4 {{65,79}} {4,12}
RightWing.Spar.214 1 {{65,101}} {4,12}
RightWing.MFC.20 5 {{2,65}} {0,1}
4–10
4–11§
4.6 IMPLEMENTATION OF MELT OPERATIONS
Cell4.11ConstructingtheMasterElementLibraryTable
MakeMasterElementLibraryTable[]:= Module [ {MELT},
MELT ={
{"Bar2D.2","STM",2,"BAR","MOM","SEG",1000,{110000}},
{"MFC","STM",2,"CON","EXT","ARB",1000,{0,0,0,0}}
};
Return[MELT];
];
PrintMasterElementLibraryTable[MakeMasterElementLibraryTable[]];
Cell4.12OutputfromtheProgramofCell4.11
TypeId App Dim Model Form Sha Nod-con DOF-con
Bar2D.2 STM 2 BAR MOM SEG 1000 {110000}
MFC STM 2 CON EXT ARB 1000 {0,0,0,0}
§4.6IMPLEMENTATIONOFMELTOPERATIONS
ThissectionpresentsanimplementationoftheMasterElementLibraryTableorttMELT.The
materialbelongsmoreproperlywiththatintheChapterdealingwithelementimplementations.
Themakeandprintoperationsarepresentedhere,however,becausetheyarealsointerweavedwith
theelementdefinition.
§4.6.1ConstructingtheMELT
ModuleMakeElementLibraryTable,listedinCell4.11,constructstheMELT.Thismoduleis
changedonlybytheprogramdeveloperandmustbecalledatprogramstarttoinitializethattable.
Testingstatementsfollowtoprintthecontentsusingthemoduledescribedbelow.Theoutputis
showninCell4.12.
§4.6.2PrintingtheMELT
Cell4.13listsmodulePrintMasterElementLibraryTable,whichlistsacompleteMELTsupplied
asargument.
TheoutputfromtheteststatementsisshowninCell4.14.
4–11
Chapter 4:ELEMENT GROUPING
4–12
Cell4.13PrintingtheMELT
PrintMasterElementLibraryTable[MELT_]:= Module[
{numtyp=Length[MELT],t,n},
t=Table["",{numtyp+1},{8}];
Do [
t[[n+1,1]]=MELT[[n,1]];
t[[n+1,2]]=MELT[[n,2]];
t[[n+1,3]]=ToString[MELT[[n,3]] ];
t[[n+1,4]]=MELT[[n,4]];
t[[n+1,5]]=MELT[[n,5]];
t[[n+1,6]]=MELT[[n,6]];
t[[n+1,7]]=ToString[MELT[[n,7]] ];
t[[n+1,8]]=ToString[MELT[[n,8]] ],
{n,1,numtyp}];
t[[1]] = {"TypeId","App","Dim","Model","Form","Sha",
"Nod-con","DOF-con"};
Print[TableForm[t,TableAlignments->{Left,Left},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MELT={{"BAR2D.2","STM",2,"BAR","MOM","SEG",1000,{110000}},
{"BAR3D.2","STM",3,"BAR","MOM","SEG",1000,{111000}},
{"QLAM.4","STM",2,"LAMINA","ISO","QU1",1000,{110000}}};
PrintMasterElementLibraryTable[MELT];
Cell4.14OutputfromtheProgramofCell4.13
TypeId App Dim Model Form Sha Nod-con DOF-con
BAR2D.2 STM 2 BAR MOM SEG 1000 {110000}
BAR3D.2 STM 3 BAR MOM SEG 1000 {111000}
QLAM.4 STM 2 LAMINA ISO QU1 1000 {110000}
4–12
-
5
Element
Constitutive
Properties
5–1
Chapter 5:ELEMENT CONSTITUTIVE PROPERTIES
5–2
ThisChaptercontinuesthestudyofelement-levelinformationbyexplaininghowconstitutive
propertiesareassignedtoindividualelements.
§5.1GENERALDESCRIPTION
Constitutivepropertiesdefinetheelementmaterialbehaviorofanindividualelementasspecified
byitsconstitutiveequations.Thesepropertiesareusedbyelementprocessingroutinesforthe
computationofstiffnessmatrices,massmatrices,internalloadsandstresses.
Thereisawiderspectrumofcomplexityinconstitutivepropertycomputationsthanofanyaspect
offiniteelementcomputations,Thisreflectsthehugerangeofconstitutivemodelsproposedand
validatedoverthepast130yearsbyengineersandmaterialscientists.
Inthesequelthetermhomogeneouselementidentifiesonewhosemacroscopicconstitutivelaw
isthesamethroughoutitsdomain.Ontheotherhand,thetermheterogeneouselementidentifies
onethatisfabricatedfromwithdifferentconstitutivelaws.Fiber-reinforcedlayeredcomposites
andsandwichplatesarecommonsourcesofheterogeneouselementsinaerospaceengineering
structures.
Theterm“heterogeneous”,however,doesnotapplyifaneffectiveorintegratedconstitutivemodel
isspecifiedfromtheoutset.Forexample,thelinearstiffnessconstitutivebehaviorofalaminated
plateorareinforcedconcretebeammaybedescribedbymoment/curvatureandaxial-force/stretch
relationsobtainedbypre-integrationthroughthethicknessorcrosssectionarea,respectively.Such
elementsarecalledhomogeneousfromthestandpointofstiffnessandstress-resultantcalculations.
§5.2*EFFECTOFCONSTITUTIVEMODELONMODULARITY
Thissectiondiscussesthegraduallossofprogrammodularityinaccessingmaterialpropertiesastheconstitutive
lawincreasesincomplexity.Becausethisphenomenoncanbethecauseofextremegriefasanalysiscapabilities
areexpanded,itmustbewellunderstoodbyFEMprogramarchitects.
ConsiderfirstasimpleFEMprogramrestrictedtohomogeneouselementsandisotropiclinearelasticmaterials.
Elasticityisdescribedbytwocoefficients:Eandº,thermoelasticitybyone:®,andmasspropertiesbythe
density½.ThesefournumbersmaybestoredintheMasterConstitutivePropertyTable(MCPT)described
belowandidentifiedbyaconstitutivepropertycode.Theprocessingofaroutinesimplyusesthatcode,
extractedfromtheIndividualElementDefinitionListoreDL,toaccessthematerialproperties,asschematized
inFigure5.1.
Asasecondscenario,considerahomogeneouselementfabricatedofaaelotropic(non-isotropic)linearelas-
ticmaterial.Nowtheconstitutivepropertiesdependuponorientation.Forexample,thepropertiesofan
orthotropicmaterial(9elasticconstants,3dilatationcoefficients,andonedensity)arenormallystoredwith
referencetothreepreferreddirections.Theorientationofthoseso-calledmaterialdirectionswithrespectto
anelementorglobalsystemisageometricpropertyandnotaconstitutiveone,becauseitdependsontheway
theuserselectsreferenceaxes.Itfollowsthattheelementroutinesmustuseboththeconstitutiveandthe
fabricationpropertycodestoaccessconstitutivedata.Thedatadependenciesforthiscaseareillustratedin
Figure5.2.
Asamorecomplexthirdscenario,considernowaheterogeneouselement,thecomponentsofwhichdisplay
materialbehaviormodeledbylinearaelotropicconstitutiverelations.Nowtheelementprocessingroutineneeds
toknowtheextentandlocationofthedifferentmaterialregions.Forexample,thefabricationoflaminated
compositeplatedescribedinalayer-by-layerfashionisgeometricallyspecifiedbythelayerthicknesses.Those
5
–
2
5–3
§
5.2 *EFFECT OF CONSTITUTIVE MODEL ON MODULARITY
Constitutive properties
Constitutive
property code Master
Constitutive
Property
Table
Individual
Element
Definition
Table
Linear Isotropic Material Model
Homogeneous Element
Element
Processing
Routines
Figure5.1.Accessofconstitutiveelementpropertiesforahomogeneouselement
characterizedbyalinearelasticisotropicmaterialmodel.
Constitutive properties
Constitutive
property code Fabrication
property
code
Master
Constitutive
Property
Table
Master
Fabrication
Property
Table
Individual
Element
Definition
Table
Orientation
data Linear Aelotropic Material Model
Homogeneous Element
Element
Processing
Routines
Figure5.2.Accessofconstitutiveelementpropertiesforahomogeneouselement
characterizedbyalinearelasticaelotropic(non-isotropic)materialmodel.
extentpropertiesaregeometricinnatureandmustbeprocuredfromthefabricationpropertytables.Thedata
dependenciesforthiscaseisillustratedinFigure5.3.Ifallmaterialregionsexhibitisotropicbehavior,the
orientationdataisomittedbuttheextentdataisstillberequired.
Finally,ifthematerialbehaviorbecomesnonlinear,moredifficultiesarise.ThisisillustratedinFigures5.4
through5.6,whichcorrespondtothethreecasespreviouslyexamined.[Thequalifier“nonlinearisotropic”is
somewhatofamisnomerbecauseallnonlinearmodelsintroduceanisotropy;itmeansthatsuchanisotropyis
stateinduced.]Thecomplexityisduetotheeffectofstatevariablessuchastemperatures,stresses,strains
andstrainrates,ontheconstitutivelaw.Thisbringsupseveralundesirablecomplications:
1.Accessingandpassingstatevariablesintoconstitutivecomputationsgreatlyraisesthelevelofprogram
complexity.Initializationandfeedbackeffectsappear,anddetrimentaleffectsonmodularityincrease
thechancesforerrors.
2.Retrievalbysimpletablelookupisnolongerfeasible.Constitutivefunctions,whichcanbecomequite
complex,arerequired.
3.Forconstitutivemodelsthatrequireaccesstopriorhistory,asinnonlinearviscoelasticity,thestatedata
canbebecomequitevoluminous.
5
–
3
Chapter 5:ELEMENT CONSTITUTIVE PROPERTIES
5–4
Constitutive properties
Constitutive
property code Fabrication
property
code
Master
Constitutive
Property
Table
Master
Fabrication
Property
Table
Individual
Element
Definition
Table
Extent &
orientation
data Linear Aelotropic Material Model
Heterogeneous Element
Element
Processing
Routines
Figure5.3.Accessofconstitutiveelementpropertiesforaheterogeneouselement
characterizedbylinearelasticaelotropicmaterialmodels.
Constitutive properties
Constitutive
property code State
data
Master
Constitutive
Property
Table
Individual
Element
Definition
Table
Nonlinear Isotropic Material Model
Homogeneous Element
Element
Processing
Routines
Individual
Element
State
Table
Figure5.4.Accessofconstitutiveelementpropertiesforahomogeneouselement
characterizedbynonlinearisotropicmaterialmodel.
ThereisaclassofFEMprograms,commoninaerospaceapplications,thatconsideronlylinearmaterial
responsebutbringintheeffectoftemperature(andocassionallyothernon-mechanicalstatevariables,suchas
moistureincomposites)onmaterialproperties.Forthesethelinkagetostateinformationtakesonadifferent
meaning,becausethetemperaturedistributionmaycomefromthesolutionofanauxiliaryproblem,orsimply
fromtheusersloadinput.ThecouplingsdisplayedinFigures5.3and5.4,however,arestilltypicalforthose
programs,if“statedata”isinterpretedtocoverthermomechanics.
Thelessonthatcanbegatheredfromthesecasebycaseexaminationisthattheimplementationandprocessing
ofconstitutiveinformationhasbecarefullythoughtouteveninlinearprograms.Thisisparticularlytrueif
thereisachanceforfutureexpansiontotreatnonlinearorstate-dependentmaterialbehavior.
5–4
5–5§
5.3 NAMES VERSUS CODES
Constitutive properties
Constitutive
property code Fabrication
property
code
Master
Constitutive
Property
Table
Master
Fabrication
Property
Table
Individual
Element
Definition
Table
Orientation
data Nonlinear Aelotropic Material Model
Homogeneous Element
Element
Processing
Routines
State
data
Individual
Element
State
Table
Figure5.5.Accessofconstitutiveelementpropertiesforahomogeneouselement
characterizedbynonlinearaelotropicmaterialmodel.
Constitutive properties
Constitutive
property code Fabrication
property
code
Master
Constitutive
Property
Table
Master
Fabrication
Property
Table
Individual
Element
Definition
Table
Extent &
orientation
data Nonlinear Aelotropic Material Model
Heterogeneous Element
Element
Processing
Routines
State
data
Individual
Element
State
Table
Figure5.6.Accessofconstitutiveelementpropertiesforaheterogeneouselement
characterizedbynonlinearaelotropicmaterialmodels.
5–5
Chapter 5:ELEMENT CONSTITUTIVE PROPERTIES
5–6
§5.3NAMESVERSUSCODES
Akeyimplementationdecisionrespondstothequestion:shouldmaterialsbeidentifybynameor
numericcodes?
Amaterialnameisanidentifierthatreferstopredefineddataforspecificandwidelyusedmaterials.
Forexample"Al-7075"forstructuralelementsand"Water"forfluidelements.Allnecessary
constitutivedataandprocessingfunctionsfortheconstitutivemodelsofsuchmaterialsarebuiltin.
Materialnamesareconvenientforusers.Ifusedexclusively,however,theflexibilityoftheprogram
iscompromised.Anotherdifficultyisthatuseofnamesmayforcetheuseofcertainphysicalunits
thatmaynotfittheproblemor,worse,induceerrorsbecauseofusersmisunderstanding.[This
problem,however,maybecircumventedbythe“physical-unitkeyword”deviceexplainedinthe
nextsection.]Furthermore,thepossibilityofdoingwhat-ifparameterstudiesinwhichmaterial
propertiesaresystematicallyvariedisprecluded.
Theuseofnumericconstitutivecodesprovidesmoreflexibilitybutrequiresmoreinputworkfrom
theuser.Forlinearstate-independentconstitutivemodelstheinputworkislightasdatacanbe
easilypickedupfromtechnicalreferencemanuals.Fornonlinearandstate-dependentmodelsthe
increasedpreparationburdenmaytiltthescalestowardtheuseofmaterialnames.
Itisrecommendedherethatconstitutivecodesbealwaysmadeavailableasthestandardmethod,
butthepossibiltyofuseofbuilt-inmaterialsbekeptinmind.Theeasiestwaytoprepareforthat
eventualityistoreserveagroupofconstitutivecodes.Thesimplestchoiceistoreservenegative
codenumbersforbuilt-ins,e.g.thename"Al-7075"maybeassociatedwithcode¡15,andto
branchaccordinglyinthetablelookupprocessdiscussedbelow.
Acodeofzeroisreservedforelementsthatdonotneedconstitutiveproperties.Thisisthecasefor
MultiFreedomConstraint(MFC)elements.
Theconstitutivepropertycodeisusuallydesignatedbycpc orcc inprogramming.
§5.4THEMASTERCONSTITUTIVEPROPERTYTABLE
TheMasterConstitutivePropertyTable,orMCPT,definestheconstitutivepropertiesofallmaterials
thatappearinthefiniteelementmodel.
§5.4.1ConfigurationoftheMCPT
Assumingforsimplicitythatnobuilt-inmaterialsaredefined(acaseconsideredinthefollowing
subsection),thesimplestconfigurationoftheMCPT isaflattable:
MCPT:= f cPL(1),cPL(2),....,cPL(lascpc)g.5:1/
wherecPL areliststhatdefineindividualmaterials.Thepropertiesformaterialwithcodecpc ¸ 1
arestoredincPL(cpc).Variablelascpc designatesthelargestconstitutivecodedefined.Ifcode
1· cpc < lascpc hasnotbeendefinedbytheuser,anemptylistisstoredasagapplaceholder.
Asexplainedabove,theconfigurationofacPL mayrangefromasimplelistoffewnumbersfor
state-independentlinearmodels,uptohighlyelaboratedmultileveltablesdefiningdependenceof
5–6
5–7§
5.4 THE MASTER CONSTITUTIVE PROPERTY TABLE
nonlinearconstitutivemodelsonstatevariablessuchastemperature,moisture,stressleveland
strainrate.Oneadvantageofuseofaliststructureisthatsuchcomplexityishiddenbehindthe
scenesand(5.1)stillapplies.
ThecPL configurationassumedinthefollowingexampleis
cPL:= f Model-name,Physical-units,Property-values g.5:2/
Thefirsttwoitemsarekeywordsidentifyingtheconstitutivemodelandthephysicalunits,respec-
tively.Thisisfollowedbyapropertyvaluelistwhoseconfigurationdependsontheconstitutive
model.
EXAMPLE 5.1
TogiveanexampleofanactualMCPT,supposethattwostate-independentlinearelasticmaterialsappearin
thefiniteelementmodel.Code1isisotropicwithED 21£10
6
,º D 0:30,® D 1:2£10
¡6
and½ D 453:6in
thesystemofphysicalunits(MKSC)chosenbytheuser.Code4isorthotropic,withE
1
D E
2
D 12:5£10
6
,
E
3
D 4:3£ 10
6
,º
12
D 0:15,º
23
D º
31
D 0:28,G
12
D 5:2£ 10
6
,G
13
D G
23
D 1:8£ 10
6
,®
1
D ®
2
D
0:83£10
¡6
,®
3
D 1:35£10
¡6
and½ D 230:7inthesameunitsystem.TheconfigurationofaMCPTthat
obeysthestyle(5.1)-(5.2)is
MCPT = f f"Isot.L.E.C","MKSC",f 21.E6,0.30,1.2E-6,453.6g g;f g;f g,
f"Orth.L.E.C","MKSC",f 12.5E6,12.5E6,4.3E6,0.15,0.28,0.28,
5.2E6,1.8E6,1.8E6,0.83E-6,0.83E-6,1.35E-6,230.7g g g
.5:3/
inwhichthetwomaterialmodeshavebeenspecifiedby
cPL(1) = f"Isot.L.E.C","MKSC",f 21.E6,0.30,1.2E-6,453.6g g
cPL(4) = f"Orth.L.E.C","MKSC",f 12.5E6,12.5E6,4.3E6,0.15,0.28,0.28,
5.2E6,1.8E6,1.8E6,0.83E-6,0.83E-6,1.35E-6,230.7g g
.5:4/
Someexplanatorycommentsfor(5.3)-(5.4)areinorder.
ConstitutivemodelsareidentifiedbythefirstkeywordfoundinthecPL.Forexample"Isot.L.E.C"
identifiesanisotropiclinear-elasticcontinuummaterialmodel.
Thisisfollowedbyakeywordexpressingthesystemofphysicalunitsinwhichthepropertyvalues
arerecorded.Thisisimportantforreuseofmaterialpropertieswhenthesystemofunitschosenby
theuserchanges,becausetheprogramshouldbeabletoeffectthenecessarytransformations(orat
leastissueanerrormessage).Theorganizationalsohelpsinsettingupinvariantbuilt-inproperty
tablesfornamedmaterials,asdiscussedinthenextsubsection.
Alistofnumericalpropertiesfollows.Intheexampleaflatpositionalstructureofthepropertylist
isassumed.Forexample,forthe"Isot.L.E.C"modelthevaluesareexpectedintheorder
E;º;®;½.5:5/
5–7
Chapter 5:ELEMENT CONSTITUTIVE PROPERTIES
5–8
Constitutive properties
User-defined
(positive)
constitutive
property code Reserved
(negative)
constitutive
property code Named
material Built-in
materials
Name -to-
Code
Translation
Table
User-defined
materials
Individual
Element
Definition
List (eDL)
[Extent & orientation data] Element
Processing
Routines
Individual
Constitutive
Property
List (cPL)
[State data]
empty list
grows by
prepending
grows by
appending
MCPT
MEDT
Figure5.7.Accessingconstitutivepropertieswhennamedbuilt-inmaterialsareimplemented.
Thesourceofextent,orientationandstatedataisomittedtoavoidclutter.
whereasforthe"Orth.L.E.C"modelthevaluesareexpectedintheorder
E
1
;E
2
;E
3
;º
12
;º
23
;º
31
;G
12
;G
23
;G
31
;®
1
;®
2
;®
3
;½:.5:6/
Moreelaboratedstorageschemesusingmultilevelpropertysublistscanofcoursebedevised.Such
schemesbecomeessentialwhendependenceonstatevariablesliketemperatureisconsidered.
Thosemoreelaborateformatswillnotbestudiedhere.
REMARK 5.1
Theidentificationofpropertylistssuchas(5.5)and(5.6)as“continuummodels”isusefultoestablisha
distinctionfromsection-integratedorthickness-integratedconstitutivemodels,whensuchmodelsarespecified
fromtheoutset.Forexample,theconstitutivebehaviorofbeams,platesandshellsisoftendescribedthrough
moment/curvatureandaxial-force/stretchrelations.
§5.4.2Built-inMaterialPropertyTables
Asmentionedabove,propertiesforcommonlyusedstructuralmaterialsmaybepredefinedonceand
forall,permittingtheuseofmnemonicmaterialnamesinlieuofnumericalconstitutiveproperty
codes.Thisreducesinputpreparationandthechanceforerrors.
Itwasnotedthattheimplementationshouldalwaysallowuseofcodesfromthestart.Topermit
thegradualimplementationofpredefinedmaterials,itisappropriatetoreserveagroupofmaterial
codesforbuilt-ins.Reservingnegativeintegersismostconvenientbecauseitdoesnotinterfere
withthenaturaluseofpositiveintegersforuser-definedconstitutivecodes.
5–8
5–9§
5.5 IMPLEMENTATION OF CONSTITUTIVE OPERATIONS
Cell5.1DefininganIndividualMaterial
DefineIndividualMaterial[MCPT_,cPL_,ccod_]:= Module [
{cc,CPT=MCPT,i,lenCPT,numres},
If [Length[CPT]==0,CPT={{}}];lenCPT=Length[CPT];numres=0;
Do [If [Length[CPT[[cc]]]==0,Break[]];numres++,{cc,1,lenCPT}];
If [ccod==0,CPT=Insert[CPT,cPL,numres+1];Return[CPT]];
Do [AppendTo[CPT,{}],{i,lenCPT+1,ccod+numres+1}];
CPT[[ccod+numres+1]]=cPL;Return[CPT];
];
cPL1={"General",{"Isot.L.E.C","symb"},{E,nu,alpha,rho}};
cPL2={"Steel",{"Isot.L.E.C","MKSF"},{21000,.3,.0014,6.65}};
cPL3={"Water",{"Isot.L.E.C","MKSF"},{0,.5,0.,1.45}};
cPL4={"Phonium",{"Isot.L.E.C","MKSF"},{10000,.25,.000145,213.}};
MCPT={};
MCPT=DefineIndividualMaterial[MCPT,cPL1,8];
MCPT=DefineIndividualMaterial[MCPT,cPL2,0];
MCPT=DefineIndividualMaterial[MCPT,cPL3,0];
MCPT=DefineIndividualMaterial[MCPT,cPL4,1];
(* Print["MCPT=",MCPT];*)
PrintMasterConstitutivePropertyTable[MCPT];
Cell5.2OutputfromtheProgramofCell5.1
Ccod Name Model Units Properties
-2 Steel Isot.L.E.C MKSF {21000,0.3,0.0014,6.65}
-1 Water Isot.L.E.C MKSF {0,0.5,0.,1.45}
1 Phonium Isot.L.E.C MKSF {10000,0.25,0.000145,213.}
8 General Isot.L.E.C symb {E,nu,alpha,rho}
Ifnegativecodesareusedforpredefinedmaterialproperties,itisrecommendedthattheseproperties
bestoredinareservedregionoftheMCDT ratherthaninaseparatetable.Thispermitsthesame
modulestobeusedforbothuser-definedandbuilt-inmaterials,simplifyingprogrammaintenance.
Intheimplementationdescribedbelow,thisisdonebyallowingtheMCDT togrowatbothends,as
illustratedininFigure5.7.Thatis,anewmaterialisprependedifitisbuilt-in,andappendedifit
isuser-defined.Thetworegionsareseparatedbyanempty-listmarker,whichmaybethoughtas
belongingtocodezero.ThisstrategymakestheMCDT completelyself-contained,whichisabonus
whendoingsavesandrestarts,ormovingdatabetweencomputers.
5–9
Chapter 5:ELEMENT CONSTITUTIVE PROPERTIES
5–10
Cell5.3RetrievingthePropertiesofanIndividualMaterial
GetIndividualMaterial[MCPT_,ccod_]:= Module [
{cc,lenCPT=Length[MCPT],numres},numres=0;
Do [If [Length[MCPT[[cc]]]==0,Break[]];numres++,{cc,1,lenCPT}];
Return[MCPT[[ccod+numres+1]]];
];
MCPT={{"General",{"Isot.L.E.C","symb"},{E,nu,alpha,rho}},
{"Steel",{"Isot.L.E.C","MKSF"},{21000,.3,.0014,6.65}},
{"Water",{"Isot.L.E.C","MKSF"},{0,.5,0.,1.45}},
{},
{"Phonium",{"Isot.L.E.C","MKSF"},{10^6,.25,.000145,213.}}};
Print[GetIndividualMaterial[MCPT,-2]];
Print[GetIndividualMaterial[MCPT,1]];
Cell5.4OutputfromtheProgramofCell5.3
{Steel,{Isot.L.E.C,MKSF},{21000,0.3,0.0014,6.65}}
{Phonium,{Isot.L.E.C,MKSF},{1000000,0.25,0.000145,213.}}
§5.5IMPLEMENTATIONOFCONSTITUTIVEOPERATIONS
Thissectionlistsmodulespertainingtothecreation,accessanddisplayoftheMasterConstitutive
PropertyTable(MCFT).Modulesarelistedinalphabeticorder.
§5.5.1DefininganIndividualMaterial
ModuleDefineIndividualMaterial isdisplayedinCell5.1.Itdefinesanewmaterialby
insertingitsmaterialpropertylistcPL intheMCPT.
TheargumentsaretheincomingMCPT,thecPL andaconstitutivecodeccod.Thelattermaybe
positiveorzero.Ifpositive,e.g.5,thematerialistobeaccessedbythatnumericcode.Ifzero,the
materialistobeaccessedbythenameprovidedasfirstiteminthecPL,forexample"Steel",and
anegativeconstitutivecodeisinternallyassigned.Thisdeviceassumesthatnegativecodenumbers
arereservedforbuilt-inmaterials,whichdefinedbytheFEMprogramandnottheuser.
Iftheconstitutivecodeisalreadyinuse,theexistingcPL isreplacedbythenewone.Elsethe
incomingcPL isappendedorprepended,dependingonwhetherthematerialisuserdefinedor
built-in,respectively.Theinternalconstitutivecodeofzeroisconventionallyrepresentedbyan
emptyePL,whichisusedinthetableaccesslogicas“barrier”thatseparatesnegativefrompositive
codenumbers.SeeFigure5.5.ThemodulereturnstheupdatedMCPT.
ThestatementsfollowingDefineIndividualMaterial inCell5.1testthemoduleby
5–10
5–11§
5.5 IMPLEMENTATION OF CONSTITUTIVE OPERATIONS
Cell5.5PrintingConstitutivePropertiesofIndividualMaterial
PrintIndividualConstitutivePropertyList[cPL_]:= Module[
{t},
t=Table["",{4}];
t[[1]]=cPL[[1]];
t[[2]]=cPL[[2,1]];
t[[3]]=cPL[[2,2]];
t[[4]]=ToString[cPL[[3]]];
Print[TableForm[t,TableAlignments->{Left,Right},
TableDirections->Row,TableSpacing->{2}]];
];
cPL={"name",{"Isot.L.E.C","symb"},{E,nu,alpha,rho}};
PrintIndividualConstitutivePropertyList[cPL];
Cell5.6OutputfromtheProgramofCell5.5
name Isot.L.E.C symb {E,nu,alpha,rho}
buildingaMCPT withseveralmaterials.Thetableisthenprintedwiththemodule
PrintMasterConstitutivePropertyTable describedbelow.ThetestoutputisshowninCell
5.2.
§5.5.2GettingIndividualMaterialProperties
ModuleGetIndividualMaterial,listedinCell5.3,retrievesthecPL ofanindividualmaterial
giventhecodenumber.TheargumentsaretheMCPT andccod,andthefunctionreturnsthe
appropriatecPL ifthematerialexists.
Notethatinthecaseofabuilt-inmaterial,accessisbyitsnegativecodenumber.Thisassumes
thatamappingfromthematerialnametoitscodehasbeeneffected.
Thecodeistestedbythestatementsthatfollowthemodule,andtheresultsofrunningthetest
programareshowninCell5.4.
Inpractice,GetIndividualMaterial israrelyusedasafunction,astheretrievaloperationis
usuallydoneinlineforefficiency.Itisprovidedheretoillustratethetableaccesslogic,whichis
herecomplicatedbythepresenceofpositiveandnegativecodes.
§5.5.3PrintingIndividualConstitutiveProperties
ModulePrintIndividualConstitutivePropertyList islistedinCell5.5.Thismoduleprint
aIndividualConstitutivePropertyListorCPL,whichissuppliedreceivesasargument.
5–11
Chapter 5:ELEMENT CONSTITUTIVE PROPERTIES
5–12
Cell5.7PrintingtheMasterConstitutivePropertyTable
PrintMasterConstitutivePropertyTable[MCPT_]:= Module[
{cc,lenCPT,m,nummat,numres,reserve,t},
lenCPT=Length[MCPT];nummat=numres=0;reserve=True;
Do [If [Length[MCPT[[cc]]]==0,reserve=False;Continue[]];
nummat++;If [reserve,numres++],
{cc,1,lenCPT}];
t=Table["",{nummat+1},{5}];m=0;
Do [ If [Length[MCPT[[cc]]]==0,Continue[]];m++;
t[[m+1,1]]=ToString[cc-numres-1];
t[[m+1,2]]=MCPT[[cc,1]];
t[[m+1,3]]=MCPT[[cc,2,1]];
t[[m+1,4]]=MCPT[[cc,2,2]];
t[[m+1,5]]=ToString[MCPT[[cc,3]]],
{cc,1,lenCPT}];
t[[1]] = {"Ccod","Name","Model","Units","Properties"};
Print[TableForm[t,TableAlignments->{Right,Left},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MCPT={{"General",{"Isot.L.E.C","symb"},{E,nu,alpha,rho}},
{"Steel",{"Isot.L.E.C","MKSF"},{21000,.3,.0014,6.65}},
{"Water",{"Isot.L.E.C","MKSF"},{0,.5,0.,1.45}},
{},
{"Phonium",{"Isot.L.E.C","MKSF"},{10^6,.25,.000145,213.}}};
PrintMasterConstitutivePropertyTable[MCPT];
Cell5.8OutputfromtheProgramofCell5.7
Ccod Name Model Units Properties
-3 General Isot.L.E.C symb {E,nu,alpha,rho}
-2 Steel Isot.L.E.C MKSF {21000,0.3,0.0014,6.65}
-1 Water Isot.L.E.C MKSF {0,0.5,0.,1.45}
1 Phonium Isot.L.E.C MKSF {1000000,0.25,0.000145,213.}
ThemoduleistestedbythestatementsshowninCell5.5,whichbuiltaMCPT,storetypeindices,
printtheMCPT beforeandafterexecution.TheoutputsareshowninCell5.6.
§5.5.4PrintingtheCompleteMCPT
ModulePrintMasterConstitutivePropertyTable,listedinCell5.7,printsthecompleteMCPT
inatabularformat.ItsonlyinputargumentistheMCPT.
Themoduleistestedbythestatementsthatfollowit,whichbuildasampletabledirectlyandprint
it.TheoutputfromtheteststatementsisshowninCell5.8.
5–12
-
6
Element
Fabrication
Properties
6–1
Chapter 6:ELEMENT FABRICATION PROPERTIES
6–2
ThisChapterconcludesthediscussionofelement-levelinformationbystudyinghowfabrication
propertiesaredefinedandassignedtoindividualelements.
§6.1GENERALDESCRIPTION
Thetermfabricationpropertiesisusedherewiththefollowingmeaning:anyproperty,usuallyof
geometricnatureororigin,thatcannotbededuced,directlyorindirectly,fromtheinformationin
nodedefinitiontablesandfromotherelementtables.Becausethisdefinitionoperatesbyexclusion,
itmayconfusefiniteelementusers.Henceitsmeaningisbestconveyedthroughsomeexamples.
§6.1.1ExtentandOrientationProperties
Considerasolidelement,suchasabrickortetrahedron,madeupofahomogeneousisotropiclinear
material.Allthesocalledextentpropertiesofsuchelement(shapeandgeometricdimensions)are
definedbythenodecoordinates.AndasillustratedinFigure6.1,orientationdataisnotrequiredfor
thespecificationofconstitutiveproperties.Weconcludethatnofabricationpropertiesarerequired
forthiselementtype.Andindeeditsfabricationpropertylistisempty,or(alternatively)theelement
fabricationcodeiszero.
Nowsupposethematerialofthesolidelementisorthotropic.Theextentpropertiesarestilldefined
bythenodecoordinates.However,thedirectionofthepreferredorthotropicmaterialdirections
x
m
;y
m
;y
m
withrespecttotheglobalsystemx;y;zmustbeknownfortheelementprocessing
routinestowork,assketchedinFigure6.2.Thisorientationdataisnotavailablefromother
sources.Henceitbelongsinthefabricationpropertytables.
Nextconsidera2-nodelinearbar(truss)element.Theaxialrigidityneededbytheelementstiffness
computationroutineisEA=L.TheelasticmodulusEcanberetrievedfromtheconstitutivetables,
andthelengthLcalculatedfromthenodecoordinates.ButthecrosssectionalareaAisnotavailable
elsewhere.ThusAclearlypertainstothefabricationpropertytable,whereitisstoredasextent
information.
§6.1.2FabricationofHeterogeneousElements
Manyelementsrequirebothextentandorientationproperties.Aclassicalexampleisaspacebeam.
Crosssectionpropertiessuchasareasandmomentsofinertiaclearlybelongtotheextentproperty
list.Buthowabouttheorientationofthecrosssectionaxes?Thisinformationbelongstothe
orientationpropertylist.
Plateandshellelementsprovideagreatvarietyofpossibilities.Thesimplestcasewouldbe
ahomogeneousplateorshellelementwithsolidwallconstruction,anddescribedbyalinear
isotropicmaterialmodel.Theonlyextentpropertyisthethicknessh,andnoorientationproperties
areneeded.Iftheplateorshellisstillhomogeneousbutorthotropic,orientationdataisrequired.
Asafairlycomplexexampleconsideralaminatedplatebuiltupof8layersoforthotropiccomposite
materials.AsolidelementmodelisillustratedinFigure6.2.The8layerthicknessesmustbestored
asfabricationextentproperties.And8setsofmaterialdirectionsdata(whichinmostpractical
caseswouldconsistofonerotationangle)mustbestoredasfabricationorientationdata.
6–2
6–3§
6.2 THE INDIVIDUAL FABRICATION PROPERTY LIST
z
x
y
x
m
y
m
z
m
Figure6.1.Principalmaterialdirectionsfx
m
;y
m
;z
m
g foraorthothropicsolidelement.
Thespecificationofthedirectionsoffx
m
;y
m
;z
m
g withrespecttofx;y;zg
mustbepartoftheorientationfabricationpropertiesoftheelement.
z
x
y
x
ml
y
ml
z
ml
layer thickness t
l
Figure6.2.Anexampleofheterogenouselementusedtomodelan8-orthotropic-layerplate.
§6.2THEINDIVIDUALFABRICATIONPROPERTYLIST
Theforegoingdiscussionmakesclearthatelementfabricationpropertiescanbeclassifiedintotwo
groups:extentandorientation.Extentpropertiesdefinedimensionalgeometricentitiessuchas
lengths,areasandarea-moments.Thelatterdefineelement-relatedcoordinatesystems.
Tocoverallbasesitisconvenienttointroduceathirdcategorycalledmiscellaneous,whereone
candepositanypieceofinformationthatdoesnotclearlyfitintotheprecedingones.Thelastclass
isinfactquiteusefultotakecareofMultiFreedomConstraint(MFC)elements,whichotherwise
mayappearasmisfits.
WearenowreadytointroducetheIndividualFabricationPropertyListorfPL.ThereisonefPL
foreachdefinedgeometricpropertycode.ThefPL configurationresemblesthatofitsconstitutive
cousincPL discussedinthepreviousChapter:
fPL:= f Fabrication-id,Physical-units,Property-values g.6:1/
Thefirsttwoitemsarekeywords.Fabrication-idsteerstheprocessingandinterpretationofthe
6–3
Chapter 6:ELEMENT FABRICATION PROPERTIES
6–4
propertyvaluelist,andcanprovidevaluablecrosschecksagainstelementdefinitiondata.For
example,"Isot.Hm.C1.Plate"maybeusedtoindicatethatthepropertytableisforanisotropic
homogeneousC
1
plateelement,whereas"MFC"identifiespropertiesappropriatetoaMultiFreedom
Constraintelement.Iftheusermistakinglyhasdefined,say,abarelementwithapropertycode
thatencountersoneofthesekeywords,anerrorshouldbereported.ThePhysical-unitskeyword
identifiesthephysicalunitsysteminthesamewayexplainedforconstitutiveproperties.
TheProperty-valueslistcontainsuptothreesublists:
Property-values:= f Extent,Orientation,Miscellanea g.6:2/
whereunusedtrailingsublistscanbeomitted.Emptylistsmayberequiredifleadinginformation
ismissing.Forexample,propertiesforanMFCelementareplacedinthemiscellaneousproperty
list,inwhichcasetheextentandorientationlistsmustbepresentbutempty.
EXAMPLE 6.1
Anisotropic,homogeneous,C
1
platehasathicknessof0.25ftinafoot-pound-second-
±
Fsystemofunits:
fPL = f"Isot.Hm.C1.Plate","FPSF",f f 0.25g g g.6:3/
EXAMPLE 6.2
AMFCelementlinksthreedegreesoffreedom,u
x4
,u
x5
andµ
z8
bythehomogeneousconstraint
0:2341u
x4
¡1:608u
x5
¡µ
z8
D 0.6:4/
againinthecustomaryEnglishunitsystem.ThecoefficientsofthisrelationareplacedinthefPLofthat
element:
fPL = f"MFC.L.Hm","FPSF",f f g,f g,f 0.2341,-1.608,-1.0g g g.6:5/
Notethattheextentandorientationlistsmustbeexplicitlyspecifiedasempty.TheMFCkeywordmodifiers
"L.Hm"saythattheconstraintislinearandhomogeneous,andconsequentlythezeroontheright-handside
of(6.4)neednot(andmustnot)bestored.Theidentificationofthefreedomsthatappearin(6.4)isobtained
fromothersources.
EXAMPLE 6.3
ConsiderthefPL foranorthotropichomogeneoussolidelementsuchasabrickortetrahedron.Onlythe
orientationofthe3preferredmaterialdirectionswithrespecttotheglobalaxesisneeded.Supposethatsuch
orientationisspecifiedindirectlybythreenodenumbers(seeChapter1):45,68and21.Then
fPL = f"Solid.Hm.Orth","",f f g,f 45,68,21g g g.6:6/
Thephysical-unitsystemkeyworkisblankedoutheresincetheinformationisnotunitdependent.
6–4
6–5§
6.3 THE FABRICATION PROPERTY CODE
Fabrication
properties
User-defined
(positive)
fabrication
property code Reserved
(negative)
fabrication
property code Named
fabrication
Built-in
fabrication
Name -to-
Code
Translation
Table
User-defined
fabrication
Individual
Element
Definition
List (eDL)
Element
Processing
Routines
Individual
Fabrication
Property
List (fPL)
empty list
grows by
prepending
grows by
appending
MFPT
MEDT
Figure6.3.Accessingfabricationpropertieswhennamedbuilt-infabricationsareallowed.
ThisimplementationmimicsthatoftheMCPT showninFigure5.7.
REMARK 6.1
Themostgeneralwaytospecifythefabricationofaone-dimensionalstructuralmembersuchasabeamor
stiffenerisbyatwo-dimensionalfiniteelementmeshthatdefinesthecrosssection.Thiskindof“FEwithin
FE”descriptionisparticularlyusefulforcompositefabrication.Althoughitcanbeaccomodatedinthepresent
framework,itintroducesadditionallevelsofindirection,whichistriggeredbyappropriatekeywords.Because
thiscapabilityisofadvancednature,itwillnotbedescribedhere.
§6.3THEFABRICATIONPROPERTYCODE
IndividualelementsarelinkedtotheirfPLs throughthegeometricpropertycodeintroducedin
Chapter3.Thisisapositiveintegerintherange1throughlasfpc,wherelasfpc denotesthe
largestdefinedfabricationcode.
Thealternativeuseof“geometricnames”or“fabricationnames”doesnotseemtobeasattractive
asinthecaseofconstitutiveproperties.Onereasonisthatpropertyliststendtobeshortand
model-specific,whereasthepropertiesof,forexample,steelorwaterareuniversalandtrascend
specificapplications.
Nevertheless,acasecouldbemadeforbuilt-intabulationofcommercialcrosssectionsofstructural
memberssuchasbeams,cablesorpanels,iftheareaofprogramapplicationwarrantssuchextra
work.Ifthisisdone,negativegeometriccodesmightbereservedtofacilitatetheimplementation.
Analternativebutmoreelaborateproceduremightbetobranchonencounteringakeywordwithin
afPL sublist.
Theimplementationreportedbelowmakesallowanceforthecaseofbuilt-infabrications.These
areassignednegativefabricationcodes.TheimplementationtomakeuptheMFCT isdiagrammed
6–5
Chapter 6:ELEMENT FABRICATION PROPERTIES
6–6
inFigure6.4.ThiscloselymimicsthatoftheMCPT,ascanbeobservedbycomparingthiswith
Figure5.7.
§6.3.1TheMasterFabricationPropertyTable
TheMasterFabricationPropertyTableorMFPT isconstructedsimplyasalistofallfPLs,arranged
bygeometricpropertycodes:
MFPT:= f fPL(1),fPL(2),....,fPL(lasfpc)g.6:7/
EXAMPLE 6.4
IfthefPLsgivenin(6.1),(6.3)and(6.5)aredefinedwithfabricationcodes1,3and4,respectively,themaster
tablebecomes
MFPT = f f"Isot.Hm.C1.Plate","FPSF",f f 0.25g g g,f g;
f"MFC.L.Hm","FPSF",f f g,f g,f 0.2341,-1.608,-1.0g g g
f"Solid.Hm.Orth","",f f g,f 45,68,21g g g g
.6:8/
whereitmaybenoticedthatcode2isempty.
§6.3.2*ProcessingModularity
AccessoftheMFPTbyelementprocessingroutinesisusuallystrightforwardandmodular,followingthe
dataflowschematizedinFigure6.1.Thecommunicationcomplexitiesthatcanaffectconstitutiveprocessing,
discussedinthepreviousChapter,shouldnotoccurifproperdesignisfollowed.Twominordeviationsfrom
theidealsituationshouldbenoted:
1.Constitutiveprocessingmayrequireorientationand/orextentdata,asillustratedinFigures5.2through
5.6.Formodularityreasonsitisimportanttoprecludeconstitutiveprocessorsfromdirectlyreferencing
fabricationpropertytables;suchoperationshouldbecontrolledbyelementprocessingroutines.Thus
thearrowsinthosefiguresshouldnotbeinterpretedliterally.
2.ComputationoforientationpropertiesmayneedtoaccesstheMasterNodeDefinitionTableifdirections
arespecifiedindirectlythroughnodelocations.
§6.3.3*AFlatterImplementation
Analternativeimplementationofthefabricationdatasetdeservesstudy.Itconsistofseparatingtheextent,
orientationandmiscellaneouspropertiesintothreeseparatetables,whichareaccessedthroughthreeproperty
codesratherthanone.Themiscellaneouspropertytablecanthenbemergedwiththemorerarelyusedtemplate
table.
Thisorganization“flattens”theconfigurationoftheindividualpropertytablesatthecostofadditionalcodes
intheMEDT.Therelativeadvantagesofthisimplementationasopposedtotheoneshownabovemaydepend
onthecomplexityoftheelementlibrary.Ifaprogramgrowsuptocontainaverylargenumberofelements
andelementversions,thiskindofflatteningmaybeadvantageousasregardsthesimplificationofthemodel
processinglogic.
6–6
6–7§
6.4 IMPLEMENTATION OF FABRICATION OPERATIONS
Cell6.1DefininganIndividualFabrication
DefineIndividualFabrication[MFPT_,fPL_,fcod_]:= Module [
{fc,ftp=MFPT,i,lenFPT,numres},
If [Length[ftp]==0,ftp={{}}];lenFPT=Length[ftp];numres=0;
Do [If [Length[ftp[[fc]]]==0,Break[]];numres++,{fc,1,lenFPT}];
If [fcod==0,ftp=Insert[ftp,fPL,numres+1];Return[ftp]];
Do [AppendTo[ftp,{}],{i,lenFPT+1,fcod+numres+1}];
ftp[[fcod+numres+1]]=fPL;Return[ftp];
];
fPL1={"GenThick",{"Thickness","MKFS"},{h}};
fPL2={"GenArea",{"Area","MKSF"},{A}};
fPL3={"GenLam",{"Thickness","MKSF"},{h1,h2,h3,h4}};
fPL4={"GenOrient",{"Angle",""},{},{phi}};
fPL5={"GenMFC",{"MFC","MKSF"},{},{},{{n1,f1,c1}}};
MFPT={};
MFPT=DefineIndividualFabrication[MFPT,fPL1,3];
MFPT=DefineIndividualFabrication[MFPT,fPL2,15];
MFPT=DefineIndividualFabrication[MFPT,fPL3,0];
MFPT=DefineIndividualFabrication[MFPT,fPL4,1];
MFPT=DefineIndividualFabrication[MFPT,fPL5,6];
PrintMasterFabricationPropertyTable[MFPT];
Cell6.2OutputfromtheProgramofCell6.1
fcod Name Model Units Extent Orient MFC-coeff
-1 GenLam Thickness MKSF {h1,h2,h3,h4}
1 GenOrient Angle {} {phi}
3 GenThick Thickness MKFS {h}
6 GenMFC MFC MKSF {} {} {{n1,f1,c1}}
15 GenArea Area MKSF {A}
§6.4IMPLEMENTATIONOFFABRICATIONOPERATIONS
Thissectionlistsmodulespertainingtothecreation,accessanddisplayoftheMasterFabrication
PropertyTable(MFPT).Modulesarelistedinalphabeticorder.
§6.4.1DefininganIndividualFabrication
ModuleDefineIndividualFabrication isdisplayedinCell6.1.Itdefinesanewmaterialby
insertingitsmaterialpropertylistcPL intheMFPT.
TheargumentsaretheincomingMFPT,thecPL andafabricationcodeccod.Thelattermaybe
positiveorzero.Ifpositive,e.g.5,thematerialistobeaccessedbythatnumericcode.Ifzero,the
6–7
Chapter 6:ELEMENT FABRICATION PROPERTIES
6–8
Cell6.3RetrievingthePropertiesofanIndividualFabrication
GetIndividualFabrication[MFPT_,fcod_]:= Module [
{fc,lenFPT=Length[MFPT],numres},numres=0;
Do [If [Length[MFPT[[fc]]]==0,Break[]];numres++,{fc,1,lenFPT}];
Return[MFPT[[fcod+numres+1]]];
];
MFPT={{"GenLam",{"Thickness","MKSF"},{h1,h2,h3,h4}},{},
{"GenOrient",{"Angle",""},{},{phi}},{},
{"GenThick",{"Thickness","MKFS"},{h}},{},{},
{"GenMFC",{"MFC","MKSF"},{},{},{{n1,f1,c1}}},{},{},{},{},
{},{},{},{},{"GenArea",{"Area","MKSF"},{A}}};
Print[GetIndividualFabrication[MFPT,6]];
Print[GetIndividualFabrication[MFPT,-1]];
Cell6.4OutputfromtheProgramofCell6.3
{GenMFC,{MFC,MKSF},{},{},{{n1,f1,c1}}}
{GenLam,{Thickness,MKSF},{h1,h2,h3,h4}}
materialistobeaccessedbythenameprovidedasfirstiteminthecPL,forexample"Steel",and
anegativefabricationcodeisinternallyassigned.Thisdeviceassumesthatnegativecodenumbers
arereservedforbuilt-inmaterials,whichdefinedbytheFEMprogramandnottheuser.
Ifthefabricationcodeisalreadyinuse,theexistingcPL isreplacedbythenewone.Elsethe
incomingcPL isappendedorprepended,dependingonwhetherthematerialisuserdefinedor
built-in,respectively.Theinternalfabricationcodeofzeroisconventionallyrepresentedbyan
emptyePL,whichisusedinthetableaccesslogicas“barrier”thatseparatesnegativefrompositive
codenumbers.ThemodulereturnstheupdatedMFPT.
ThestatementsfollowingDefineIndividualFabrication inCell6.1testthemodule
bybuildingaMFPT withseveralmaterials.Thetableisthenprintedwiththemodule
PrintMasterFabricationPropertyTable describedbelow.ThetestoutputisshowninCell
6.2.
§6.4.2GettingIndividualFabricationProperties
ModuleGetIndividualFabrication,listedinCell6.3,retrievesthecPLofanindividualmaterial
giventhecodenumber.TheargumentsaretheMFPT andccod,andthefunctionreturnsthe
appropriatecPL ifthematerialexists.
Notethatinthecaseofabuilt-inmaterial,accessisbyitsnegativecodenumber.Thisassumes
6–8
6–9§
6.4 IMPLEMENTATION OF FABRICATION OPERATIONS
Cell6.5PrintingPropertiesofIndividualFabrication
PrintFabricationPropertyList[fPL_]:= Module[
{t,p,lp,lfPL},
t=Table["",{6}];lfPL=Length[fPL];
t[[1]]=fPL[[1]];
t[[2]]=fPL[[2,1]];
t[[3]]=fPL[[2,2]];
If [lfPL>2,t[[4]]=ToString[fPL[[3]]]];
If [lfPL>3,t[[5]]=ToString[fPL[[4]]]];
If [lfPL>4,t[[6]]=ToString[fPL[[5]]]];
Print[TableForm[t,TableAlignments->{Left,Right},
TableDirections->Row,TableSpacing->{2}]];
];
fPL={"GenLam",{"Thickness","MKSF"},{h1,h2,h3,h4}};
PrintFabricationPropertyList[fPL];
Cell6.6OutputfromtheProgramofCell6.5
GenLam Thickness MKSF {h1,h2,h3,h4}
thatamappingfromthematerialnametoitscodehasbeeneffected.
Thecodeistestedbythestatementsthatfollowthemodule,andtheresultsofrunningthetest
programareshowninCell6.4.
Inpractice,GetIndividualFabrication israrelyusedasafunction,astheretrievaloperation
isusuallydoneinlineforefficiency.Itisprovidedheretoillustratethetableaccesslogic,whichis
herecomplicatedbythepresenceofpositiveandnegativecodes.
§6.4.3PrintingIndividualFabricationProperties
ModulePrintIndividualFabricationPropertyList islistedinCell6.5.Thismoduleprint
aIndividualFabricationPropertyListorfPL,whichissuppliedreceivesasargument.
ThemoduleistestedbythestatementsshowninCell6.5,whichbuiltaMFPT,storetypeindices,
printtheMFPT beforeandafterexecution.TheoutputsareshowninCell6.6.
§6.4.4PrintingtheCompleteMFPT
ModulePrintMasterFabricationPropertyTable,listedinCell6.7,printsthecompleteMFPT
inatabularformat.ItsonlyinputargumentistheMFPT.
6–9
Chapter 6:ELEMENT FABRICATION PROPERTIES
6–10
Cell6.7PrintingtheMasterFabricationPropertyTable
PrintMasterFabricationPropertyTable[MFPT_]:= Module[
{fc,lenFPT,m,numfab,numres,reserve,lfPL,t},
lenFPT=Length[MFPT];numfab=numres=0;reserve=True;
Do [If [Length[MFPT[[fc]]]==0,reserve=False;Continue[]];
numfab++;If [reserve,numres++],
{fc,1,lenFPT}];
t=Table["",{numfab+1},{7}];m=0;
Do [lfPL=Length[MFPT[[fc]]];If [lfPL==0,Continue[]];m++;
t[[m+1,1]]=ToString[fc-numres-1];
t[[m+1,2]]=MFPT[[fc,1]];
t[[m+1,3]]=MFPT[[fc,2,1]];
t[[m+1,4]]=MFPT[[fc,2,2]];
If [lfPL>2,t[[m+1,5]]=ToString[MFPT[[fc,3]]]];
If [lfPL>3,t[[m+1,6]]=ToString[MFPT[[fc,4]]]];
If [lfPL>4,t[[m+1,7]]=ToString[MFPT[[fc,5]]]],
{fc,1,lenFPT}];
t[[1]] = {"fcod","Name","Model","Units","Extent","Orient","MFC-coeff"};
Print[TableForm[t,TableAlignments->{Right,Left},
TableDirections->{Column,Row},TableSpacing->{0,1}]];
];
fPL1={"GenThick",{"Thickness","MKFS"},{h}};
fPL2={"GenArea",{"Area","MKSF"},{A}};
fPL3={"GenLam",{"Thickness","MKSF"},{h1,h2,h3,h4}};
fPL4={"GenOrient",{"Angle",""},{},{phi}};
fPL5={"GenMFC",{"MFC","MKSF"},{},{},{{18,4,-2.0}}};
MFPT={{},fPL1,fPL2,fPL3,fPL4,fPL5};
PrintMasterFabricationPropertyTable[MFPT];
Cell6.8OutputfromtheProgramofCell6.8
fcod Name Model Units Extent Orient MFC-coeff
1 GenThick Thickness MKFS {h}
2 GenArea Area MKSF {A}
3 GenLam Thickness MKSF {h1,h2,h3,h4}
4 GenOrient Angle {} {phi}
5 GenMFC MFC MKSF {} {} {{18,4,-2.}}
Themoduleistestedbythestatementsthatfollowit,whichbuildasampletabledirectlyandprint
it.TheoutputfromtheteststatementsisshowninCell6.8.
6–10
-
7
Freedom
Assignment
7–1
Chapter 7:FREEDOM ASSIGNMENT
7–2
Thissectiondescribeshowdegreesoffreedomareassignedtonodes,andtheiractivitydescribed.
§7.1GENERALDESCRIPTION
Degreesoffreedomorsimplyfreedomsaretheprimaryvariablesthatcollectivelydefinethestate
ofafiniteelementmodel.TheyaresometimesabbreviatedtoDOFinthesequel.Associatedwith
eachfreedomisaconjugatequantitygenerallyknownasforce.Afreedomanditsassociatedforce
formadualitypair.
Infiniteelementmodelsfreedomsarespecificinnature.Theyarephysicalquantitiesassigned(or
assignable)atnodes.Forexamplethedisplacementofacornerpointorthepressureatthecenter
ofanelement.Consequentlyfreedomsandnodesareinterwinedinthedatastructuresdescribed
here.
FromChapter2itshouldberecalledthatnotallnodespossessfreedoms.Thosethatdoareknown
asstatenodes.Nodesusedforgeometricpurposesonlyaresimplycalledgeometricnodes.Inthe
finiteelementmodelscommonlyusedinpractice,nodesdoadoubleduty.InthisChaptertheterm
nodeisusedinthesenseofstatenode
§7.2FREEDOMATTRIBUTES
Threeattributesoffreedomsmustbeconsideredwhendesigningdatastructures:identification,
configurationandactivity.Thesearedefinedanddiscussedinthefollowingsubsections.
Masterdatastructuresforfreedoms,andinparticulartheMasterNodeFreedomTableorMNFT
definedlater,arenodebased.Thismeansthatfreedomsaredefinedbynodenumberandfreedom
indexratherthanbyafreedomnumber.ThisisinaccordancewiththewayaFEMuseristrainedto
thinkaboutfreedoms.Itismorenaturaltosay“they-displacementcomponentatnode56iszero”
than“freedom332iszero.”
MostdatastructuresusedintheassemblyandsolutionoftheFEMequationsarefreedombased.
Thesearenotsourcedatastructures,however;theyarederivedbypost-processingthemaster
freedomandelementdefinitiontables.
Aconsequenceofthenode-by-nodeorganizationisthatconfigurationandactivityattributesare
actuallyintermixedandcannotbedivorcedfromthestandpointofstoragerepresentation.For
pedagogicpurposesitisconvenienttoassume,however,thattheyarelogicallyseparated.This
trackisfollowedinthefollowingsections.
§7.2.1FreedomIdentifiers
Freedomsinthedatastructuresstudiedhereareexternallyknownbyshortmnemonicnames.For
exampletx alwaysdenotesthetranslationaboutthenodalfreedomaxisNx
n
whereasry always
denotestherotationaboutthenodalfreedomaxisNy
n
.Theterm“nodalfreedomaxis”isexplained
later.
Whenitisusefultoassociateafreedomidentifierwithaspecificorgenericnodewhoseinternal
numberisn,twonotationsareavailable.Thenodenumberisenclosedinparenthesis,asintx(n)
orry(n).Orisseparatedbyadot,asintx.n orry.n.Eachnotationhasitsuses.
7–2
7–3§
7.2 FREEDOM ATTRIBUTES
Table7.1LinkageBetweenFreedomIdentifiersandFreedomIndices
IntendedFreedomConjugateFreedomPhysicalDOF
ApplicationIdentifiersIdentifiersindicesDescription
Structurestx,ty,tz qx,qy,qz 1,2,3TranslationsaboutNx
n
,Ny
n
,Nz
n
Structuresrx,ry,rz mx,my,mz 4,5,6RotationsaboutNx
n
,Ny
n
,Nz
n
TBDTBDTBD7–24Reservedforfutureusein
structuralormultiphysicsmodels
Note:f Nx
n
;Ny
n
;Nz
n
g isthelocalFreedomCoordinateSystem(FCS)fornoden;see§7.2.5.
InthepresentimplementationtheFCSisassumedtocoincidewithfx;y;zg ateachnode.
Twoadditionalnotationaldevicesshouldbenoted.Associatedwith,say,freedomtx,thereisan
integercalledatag,whichisdenotedbytxt.Thereisalsoavalue,whichisdenotedbytxv.
Thesemaybeassociatedwithspecificnodesbywritingtxt(n) ortxt.n andtxv(n) ortxv.n.
§7.2.2FreedomConfigurationIndices
Freedomsassignedtonodesfillfreedomslotsmarkedbypositiveintegerscalledthefreedom
indices.Theconfigurationattributespecifieswhichfreedomidentifiercorrespondstoeachindex,
andwhetherthefreedomisassignedornot.
Tomakemattersspecific,thepresentstudyassumesthateachstatenodemayhaveuptoamaximum
of24freedomslots.Ofthesethefirstsixarethestandarddisplacementfreedomsofstructural
mechanics:threetranslationsandthreerotations.Theother18arereservedforfutureapplications
ineitherstructuralmechanics(forexample,pressurefreedomsinincompressiblemedia)orcoupled
systemanalysis.SeeTable7.1.
Inthesequelonlystandardstructuralfreedomswillbeconsidered.Pairedwitheachfreedomare
conjugatenodalloadquantitiesidentifiedinTable7.2:qx,qy andqz arenodalforcesconjugateto
tx,ty andtz,whilemx,my andmz arenodalmomentsconjugatetorx,ry andrz,respectively.
REMARK 7.1
Theforegoingimplementationnamesvaryfromstandardmatrixnotationfordisplacementandforcevectors,
whichareusuallydenotedbyuandf,respectively.Useoftx andrx hastheadvantageofbeingmore
mnemonicindistinguishingbetweentranslationalandrotationalfreedoms.Useoffx,fy andfz forforcesis
precludedbytheletter“f”beingreservedforfreedom.Thenotationalscheme,however,isalsotentativeand
issubjecttochange.
§7.2.3FreedomConfigurationTags
Althoughtheconnectionbetweenfreedomindexandidentifiercannotbebroken,itisnotnecessary
tocarryalongallpossiblefreedomsateachnode.Forexample,inastructuralprobleminvolving
onlysolidelements,onlythethreetranslationalfreedomstx,ty andtz participate.Thissituation
canbehandledbysayingthatfreedomindices1,2and3areassignedorpresent.Thethreeothers:
7–3
Chapter 7:FREEDOM ASSIGNMENT
7–4
Table7.2FreedomConfigurationTagValues
TagSignatureAssignmentActivityMeaning
¡10UnassignedFreedomisabsentfromFEMequations
01AssignedActiveFreedomvalueisunknown
12AssignedPassiveFreedomvalueisknown
2–83–9AssignedCoactiveFreedomvalueappearsinn
c
¸ 1MultiFreedom
Constraintsthatinvolveotherfreedoms.
Tagissettomin.1Cn
c
;8/
4,5and6,areunassignedorabsent.Unsassignedfreedomsareignoredintheformationofthe
FEMequationsdiscussedinfutureChapters.
ThepresenceorabsenceofafreedomisindicatedbyanFreedomConfigurationTagorfCT.This
isanintegerwhichmaytakethevaluesshowninTable7.2.Ifthetagisnonnegativethefreedomis
presentandabsentotherwise.TheFreedomSignatureorfS isobtainedbyaddingonetothefCT.
Thedistinctionbetweenassignedtagvaluesisexplainedinthefollowingsubsection.
Configurationtagsforfreedomsofaspecificnodearecollectedinadatastructurecalledthenode
FreedomConfigurationTag,whichisarrangedas
nFCT = f txt,tyt,tzt,rxt,ryt,rzt g.7:1/
ThenodeFreedomSignatureTagsareobtainedbyaddingonetoeachoftheabove:
nFST = f txt+1,tyt+1,tzt+1,rxt+1,ryt+1,rzt+1 g.7:2/
ToconservememorythisisstoredasadecimallypackedintegercalledtheNodeFreedomSignature
ornFS:
nFS = 100000*(txt+1) + 10000*(tyt+1) + 1000*(tzt+1)
+ 100*(rxt+1) + 10*(ryt+1) + (rzt+1)
.7:3/
Thisintegerdisplaysasa6-digitnumbersuchas110420,whichisthepackingofFCTs
f 0,0,-1,3,1,-1g.Thisisthereasonforrestrictingtagvaluestotherange¡1through8.
§7.2.4FreedomActivity
Wehaveseenthattheconfigurationtag—oralternativelythesignature—indicateswhethera
freedomisassigned(present)orunassigned(absent).Ifafreedomispresent,ithasanactivity
attribute.Thisclassifieseachfreedomintooneofthreepossibilities:active,passiveorcoactive.
ThemeaningoftheseattributesisgiveninTable7.2.
REMARK 7.2
Thefirsttwopossibilitiesarestandardpartofanyfiniteelementcode.Anactivefreedomisretainedinthelist
ofunknownssubmittedtotheequationsolver.
7
–
4
7–5
§
7.2 FREEDOM ATTRIBUTES
Table7.3SpecificationsforFreedomCoordinateSystem
HowFCS-listFCSconstruction
blankignoredSameasglobaldirections
"N"n1,n2,n3 Orientby3nodesasfollows:x
n
definedbyn1!n2;y
n
normal
tox
n
andintheplanedefinedbyn1,n2 andn3 withpositive
projectiononn3;andz
n
D x
n
£ y
n
formingaRHsystem.
Heren1,n2,n3 areexternalnodenumbers.
"E"e1,e2,e3,e4 Orientbythe4Eulerparametersoffx
n
;y
n
;z
n
g wrtfx;y;zg
"S"pST>0pSTpointstoanSideTable;usedforSideNodes
insomebendingelements
"F"pfL>0pFLpointstoaFaceTable;usedforFaceNodes
insomesolidandshellelements
Thethirdpossibilityoccurswhenthefreedomispartofamultifreedomconstraint(MFC).Forexample,
supposethatthez-translationsofnodes21and33arelinkedbythealgebraicconstraint2u
z21
¡3u
z33
D 1:75,
whichtranslatedintoexternalfreedomnotationis
2 tz(21) - 3 tz(33) = 1.75.7:4/
AsdiscussedinChapters3and4,thisinformationisrepresentedasthedefinitionofaconstraintelement.As
farasfreedomtablesisconcerned,theactivityoftz(21) andtz(33) becomesanissue.Theycannotbe
classifiedaspassivebecausetheirvalueisnotknownapriori.Theycannotbecalledactivebecausethevalue
oftheconjugateforcesisnotknown.Theyarecloser,however,tothelatterbecausethefreedomsareretained
inthediscreteequationswhenaMFCistreatedbypenaltyfunctionofLagrangemultipliermethods.Hence
thetermco-active.
REMARK 7.3
NotethatnothingprohibitsafreedomfromappearinginseveralMultifreedomConstraints,aslongasthese
arelinearlyindependent.Ifthatnumberis1through7,itcanbedirectlyobtainedfromthefCT bysubtracting
one;forexampleatagof4meansthatthefreedomappearsinthreeMFCs.Ifthefreedomappearsin8or
moreMFCs,whichisahighlyunlikelyoccurrence,thetagvalueis8.
§7.2.5*FreedomDirections
Attachedtoeachnoden thereisaFreedomCoordinateSystem(FCS),denotedbyf Nx
n
;Ny
n
;Nz
n
g.Thisisalocal
RectangularCartesiansystemthatspecifiesthedirectionsalongwhichthefreedomsaredefined.Formany
applicationsthisisexactlythesame,exceptfororigin,astheglobalCartesianreferencesystemfx;y;zg at
eachnode.Andindeedthatisthedefault.
Forsomeapplications,however,itisconvenienttohavetheabilitytoorientFCSatsomeorallnodes.Since
thoseapplicationsaretheexceptionratherthantherule,thissubsectionhasbeenmarkedasadvancedandmay
beignoredonfirstreading.
ThefollowingsituationsfavortheuseofnodalFCSdifferentfromtheglobalsystem:
1.Skewor“oblique”boundaryconditions.Thesearecommoninsystemswithcurvedmembersandin
shellstructures.OnlytheFCSatboundarynodesneedtobeadjusted.
7
–
5
Chapter 7:FREEDOM ASSIGNMENT
7–6
2.Problemsthataremorenaturallydescribedincylindricalorsphericalcoordinates.Becausetheglobal
systemisalwaysofCartesiantype,onesimplewaytoaccomodatethosegeometriesistheabilityto
attachalocalsystemateachnode.
3.Somerefinedelementshavefreedomsetsthatarenaturallyexpressedinlocaldirectionsrelatedtothe
elementgeometry.Ifthosefreedomsetsareincomplete(forexample,therotation-about-side-direction
insomeplatebendingandshellelements)itisnecessarytoassemblesuchfreedomsinalocalsystem
definedbythegeometryofnode-attachedelements.
ThereareseveralwaysinwhichtheFCSorientationcanbedefined.Themostnaturalorconvenientwayis
problemdependentandalsomayvaryfromnodetonode.Toaccomodatethevarietyadatastructurecalleda
NodeFreedomDirectionSelectorornFDS isavailable:
nFDS = f How,FCS-list g.7:5/
HereHow isaletterthatspecifieshowtoconstructtheFCS,andFCS-list isalistofcoefficientsorapointer
toaGeometricObjectTable.SomecombinationsarenotedinTable7.3.Thisinformationisplacedinthe
MasterNodeFreedomTabledescribedbelow.
§7.3FREEDOMDATASTRUCTURESFORNODESANDMFCS
§7.3.1TheIndividualNodeFreedomList
Wenowexaminefreedomdatastructuresforindividualnodes.Therearetwo:theIndividualNode
FreedomListornFL,andtheIndividualNodeStateListornSL.Theformerisdescribedbelow.
ThelatterisdiscussedinthefollowingChapter,whichdealswithstatedata.
TheIndividualNodeFreedomList,ornFL,recordsthefreedomassignment,activityanddirection
atspecificnodesofaFEMmodel.ThereisonenFL pernode.Thisdatastructurehasthefollowing
configuration:
nFL(n) = f xn,nFS(n),ndof(n),nFDS(n) g
.7:6/
Herexn istheexternalnodenumber,n theinternalnodenumber,nFS isthedecimallypackedNode
FreedomSignature(7.3),ndof isthecountofassignedfreedomsatthenode,andnFDS theNode
FreedomDirectionSelector(7.5).ThenFDS maybealtogetheromittedifthefreedomdirections
arealignedwiththeglobaldirections.
EXAMPLE 7.1
AllelementsofaFEMmodelaresolidelements(bricksortetrahedra)withcornernodesonly.Allfreedom
directionsarealignedwiththeglobalsystem,andconsequentlythenFDS maybeomitted.Atypicalnodehas
threeassignedfreedoms,whicharethethreedisplacementcomponentslabeledtx,ty andtz.ThenFL ofall
unconstrainednodes(nodesnotsubjectedtodisplacementBCsorMFCs)is
f xn,111000,3 g.7:7/
wherexn istheexternalnodenumber.
7
–
6
7–7
§
7.3 FREEDOM DATA STRUCTURES FOR NODES AND MFCS
EXAMPLE 7.2
AllelementsofaFEMmodelareplatebendingelementswithcornernodesonly.Allfreedomdirections
arealignedwiththeglobalsystem,andconsequentlythenFDS maybeagainomitted.Atypicalnodehas
threeassignedfreedoms,whicharethethreedisplacementcomponentslabeledtz,rx andry.ThenFL ofall
unconstrainednodesis
f xn,001110,3 g.7:8/
wherexn istheexternalnodenumber.
EXAMPLE 7.3
Node67ofashell-plate-beamFEMmodelwithsixfreedomspernodeissubjecttoskewsimply-support
boundaryconditions(BC).TosimplifytheBCspecificationwithoutusingMFCs,afreedomcoordinate
systemf Nx
67
;Ny
67
;Nz
67
g isspecifiedwithEulerparameters0:7;0:1;¡0:1;0:7withrespectto.x;y;z/.Inthis
FCSalltranslationsarezeroandsoistherotationaboutNy
67
buttheothertworotationsarefree.ThenFL for
thisnodeis
f 67,222121,6,f"E",0.7,0.1,-0.1,0.7 g g.7:9/
§7.3.2TheIndividualMultiplierFreedomList
IfMultiFreedomConstraints(MFCs)arespecifiedandthesearetreatedbyLagrangemultipliers,a
datastructurecalledtheIndividualMultiplierFreedomListormFL appears.ThereisonemFL for
eachMFC.
ThisconfigurationofthisdatastructureforaMFCdefinedbyelemente andinvolvingnummfc
freedomsis
mFL(n) = f e,f nfc(1),...nfc(mfcdof) g g
.7:10/
Heree istheinternalelementnumber,andthenfc(i) arethree-itemnode-freedom-coefficient
sublists:
nfc(i) = f xn(i),f(i),c(i) g.7:11/
wherexn(i),f(i) andc(i) arethei
th
externalnodenumber,freedomindex,andcoefficient,
respectively,incolvedintheconstraint.Notethatthelistfollowinge in(7.10)isexactlythesame
asthatstoredintheMFPT,cf.Chapter6.
EXAMPLE 7.4
SupposethatthefollowingMFC,whereparenthesizednumbersareexternalnodenumbers,
4.5 tx(41) - 3.2 tz(11) + 5.9 rz(72) = 0.7:12/
isassignedtoelementwithinternalnumber48.Theconstraintsinvolvesthreenodes:41,11and72.The
freedomindicesare1,3and6,andthecoefficientsare4.5,¡3:2and5.9,respectively.ThemFL is
mFL(48) = f 48,f f 41,1,4.5 g,f 11,3,-3.2 g,f 72,6,5.9 g g.7:13/
7
–
7
Chapter 7:FREEDOM ASSIGNMENT
7–8
Element nodal freedom
arrangements
Element nodal lists
MultiFreedom
Constraints
Master
Element
Definition
Table
MELT
MNDT
MFPT
Master
Node
Freedom
Table
Initialized
Master
Node
Freedom
Table
Displacement
boundary
conditions
Local
freedom
directions
STAGE 1
STAGE 2
Figure7.1.ConstructionoftheMasterNodeFreedomTableasatwostageprocess.
REMARK 7.4
NotethatthisinformationcannotbeassignedtoindividualnodesbecauseMFCsaredefinedaselements.Thus
itisnecessarytokeepnFL andmFL separate.
AlsonotethatinternalelementnumbersarecarriedinthemFLswhereasexternalnodenumbersarecarriedin
thenFLs.Thisisdictatedbythenaturalstructureofthemastertablesdefinedbelow.Inthosetablesthereisa
nFL foreachdefinednodebutthereisnomFL foreachdefinedelement.
§7.4MASTERFREEDOMTABLES
§7.4.1TheMasterNodeFreedomTable
TheMasterNodeFreedomTable,orMNFT,isaflatlistoftheIndividualNodeFreedomListsofall
nodesintheFEMmodel,organizedbyascendinginternalnodenumbers:
MNFT = f nFL(1),nFL(2),...nFL(numnod) g
.7:14/
Thenumberinparenthesisistheinternalnodenumbern andnottheexternalnodenumber.Thus
theMNFT hasexactlythesamearrangementastheMNDT.ThisallowsthenFL forinternalnoden to
beaccessedsimplyasnFL(n).
TheMNFT isformedintwostagesdiagrammedinFigure7.1:
Initialization.AninitializedMNFTisconstructedfrominformationextractedfromfourmastertables:
MNDT,MEDT,MELT andMFPT.ThisoperationrecordsfreedomassignmentsaswellasMultifreedom
Constraintinformation,becausetheMFCsaredefinedaselements.Thefreedomdirectionsateach
nodeareassumedtobethesameasglobaldirections.
Update.User-specifiedDisplacementBoundaryConditions(DBC)areincorporatedbytagging
appropriatefreedomsaspassive.Freedomdirectioninformationthatdeviatesfromthedefaultis
inserted.
7–8
7–9
§
7.4 MASTER FREEDOM TABLES
beam
beam
bar
bar
bar
bar
bar
{110000}{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110001}
{110001}
{110001}
{110001}
{110001}
{110001}
{110001}
x
y
1
1
2
2
3
3
4
4
5
1
2
3
4
5
5
(a)
(b)
(c)
(d)
disassembly
assembly
FEM idealization
(1)
(2)
(3)
(4)
(5)
(6)
(7)
Figure7.2.ExampleillustratinginitializationoftheMNFT throughtherule(7.15).
Numbersinparenthesisin(c)areinternalelementnumbers.
EXAMPLE 7.5
Theinitializationstageisbestexplainedgraphicallythroughthesimpletwo-dimensionalexampledepicted
inFigure7.2.Aplanebeammemberisreinforcedbyfiveplanebar(truss)members,asshownin(a).The
structurecanonlydisplacedinthefx;yg planebutisotherwisefree.
Thefiniteelementmodelidealizationshownin(b)hasfivenodesandsixelements:twobeamsandfourbars.
Themodelisdisassembledintoindividualelementsasshownin(c).Thestandardnodalfreedomassignments
forthedisconnectednodesareshownasnodefreedomsignaturesenclosedincurlybraces;aonemeans
assignedorpresentwhereasazeromeansunassignedorabsent.Forexample,aplanebeamcornernodehas
assignedfreedomstx,ty andrz,whichencodestothesignature110001.
Thestructureisthenreassembledasillustratedin(d).Nodalfreedomsareconstructedbythelocal-to-global
freedomconservationrule:
Ifafreedomisassignedattheelementlevel,itappearsassuchattheassemblylevel
.7:15/
Applicationofthisruleshowsthatthesignatureofnodes1,2and3is110001 whereasthatofnodes4and5
is110000.TheinitializedMNFT is
f f 1,110001,3g,f 2,110001,3g,f 3,110001,3g,f 4,110000,2g,f 5,110000,2g g.7:16/
Consequentlythemodelhas13D 3C3C3C2C2assignedfreedoms,whichintheusualfiniteelement
notationformthenodefreedomvector
u
T
D
[
u
x1
u
y1
µ
z1
u
x2
u
y2
µ
z2
u
x3
u
y3
µ
z3
u
x4
u
y4
u
x5
u
y5
]
.7:17/
7
–
9
Chapter 7:FREEDOM ASSIGNMENT
7–10
1
2
3
45
7200
7200
(a)
(b)
FEM idealization
{110000}
{110000}
{220001}
{110001}
{120001}
1
2
3
4
5
upon applying support BCs
(c)
Figure7.3.SupportconditionsandappliedforcesontheexamplestructureofFigure7.2.
EXAMPLE 7.6
Sofarthestructureisunsupported.ThedisplacementboundaryconditionsindicatedinFigure7.3areu
x1
D
u
y1
D u
y3
D 0,whichrendersfreedomstx(1),ty(1) andty(3) passive.Uponmarkingthesesupport
conditions,theMNFT becomes
f f 1,220001,3g,f 2,110001,3g,f 3,120001,3g,f 4,110000,2g,f 5,110000,2g g.7:18/
EXAMPLE 7.7
ToillustratetheeffectofapplyingMultiFreedomConstraints(MFCs)ontheMNFT ofthestructureofFigure
7.2,supposethattheuserspecifiesthatthatboththexandydisplacementsofnodes4and5mustbethesame.
Mathematically,u
x4
D u
x5
andu
y4
D u
y5
.Infreedomidentifiernotationthisis
tx(4) ¡ tx(5) = 0,ty(4) ¡ ty(5) = 0..7:19/
WeassumethatthetwoMFCs(7.19)arespecifiedintheMasterElementDefinitionTableas“MFCelements”
withinternalnumbers7and8,respectively.SeeFigure7.4(a).
Theresultsofapplyingtherule(7.15)andtheMFC-markingconventionofTable7.2isshownontherightof
Figure7.4.TheinitializedMNFT becomes
MNFT = f f 110001g,f 110001g,f 110001g,f 330000g,f 330000g g.7:20/
7
–
10
7–11
§
7.4 MASTER FREEDOM TABLES
{110000}{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{440000}
{440000}
{110000}
{110001}
{110001}
{110001}
{110001}
{110001}
{110001}
{110001}
{010000}
{010000}
1
2
3
4
1
2
3
4
5
{440000}
{440000}
{220001}
{110001}
{120001}
1
2
3
4
5
5
(8): MFC
(9): MFC
upon MNFT initialization
upon applying support BCs
u
x4
=u
x5
u
y4
=u
y5
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(a)
(b)
(c)
Figure7.4.ExampleillustratinginitializationoftheMNFT whentheMultiFreedom
Constraints(7.19)arepresent.ThesearespecifiedasMFCelements
withinternalnumbers8and9thatlinknodes4and5.
Notethatasignaturedigitof3meansthatthefreedomparticipatesinoneMFCs.Thisisthecaseherebecause
eachfreedomassignedtonodes4and5appearsexactlyoncein(7.16).
AssumingthatthesamesupportconditionsofFigure7.3apply,wegetfinally
MNFT = f f 220001g,f 110001g,f 120001g,f 330000g,f 330000g g.7:21/
InadditiontothesechangesintheMNFT,thepresenceofMFCstratedbyLagrangemultiplierspromptthe
emergenceofanotherdatastructure,calledtheMasterMultiplierFreedomTable,whichcollectsthemMLs
describedin§7.3.2.IfMFCsaretreatedbypenaltyfunctionmethods,noadditionaltablesappear.
§7.4.2TheMasterMultiplierFreedomTable
Ifnummfc>0 MFCsarepresentandtheyaretreatedbyLagrangemultipliers,adatastructurecalled
theMasterMultiplierFreedomTableorMMFT isformedbystackingtheIndividualMultiplier
FreedomListofallMFCs:
MMFT = f mFL(1),.....mFL(nummfc) g
.7:22/
wherethenumbersinparenthesisin(7.22)areconstraintindices.
7
–
11
Chapter 7:FREEDOM ASSIGNMENT
7–12
EXAMPLE 7.8
ForthestructureofFigure7.4underthetwoMFCs(7.19):
MMFT = f f 8,f 4,1,1g,f 5,1,-1g g,f 9,f 4,2,1g,f 5,2,-1g g g.7:23/
REMARK 7.5
TheMMFT containssimplyasubsetofinformationalreadypresentintheMEDT andMFPT.Thusitsuseisnot
strictlynecessaryshouldthosetablesareavailable.Itisdefinedasamatterofconveniencetoheadsituations
inwhichaccesstothecompleteelementtablesisprecludedbecauseitwouldwastestorage.Thisisthecasein
parallelsolutionprocedures,inwhichtheMEDT isbrokenupintopiecesforindividualprocessors,oraltogether
unavailable.Ontheotherhand,theMMFT istypicallycompactandcanbereplicatedineachprocessorwithout
seriousstoragepenalties.
§7.5IMPLEMENTATIONOFFREEDOMASSIGNMENTOPERATIONS
Thissectionlistsmodulespertainingtothecreation,accessanddisplayoftheMasterFreedom
Tablefornodes(theMNFT)andformultipliers(theMMFT).Modulesareroughlylistedintheirorder
ofappearanceintheMathematica fileFreedomTables.ma.
§7.5.1InitializingtheMNFT
ModuleInitializeMasterNodeFreedomTable isdisplayedinCell7.1.ItinitializestheMNFT
fortheassembledFEMmodelbyassigningappropriatefreedomstonodes.Theinitializedtable
doesnotmarkforpassivefreedomsduetodisplacementboundaryconditions,butitdoesaccount
forMultiFreedomConstraints(MFCs).
Themodulereceivesfourmastertablesasarguments:MNDT,MEDT,MELT andMFPT.Thelatteris
usedtoextractMFCinformation.TheoutputistheinitializedMNFT.
AsisevidentfromaglanceatCell7.1,thecodeismorecomplexthatanythingpresentedsofar,
becauseoftworeasons.First,thepresentimplementationstrivesforminimalfreedomassignement,
thatis,onlytheminimalnumberrequiredtogetthesolutionandnothingmore.Thisgoalrequires
moreelaboratelogicthantheusualFortranimplementationsthatassumeafixednumberofDOFs
pernode,becausedynamicdatastructuresmustbeused.Secons,thepresenceofMFCrequiresa
secondpassovertheelementtables.
ThemodulecallstheutilityfunctionsUnpackNodeFreedomTags,PackNodeFreedomTags and
CountAssignedNodeFreedoms.Thesearedescribedin§7.5.4.
TeststatementsforInitializeMasterNodeFreedomTable areshownseparatelyinCell7.2
becauseoftheirlength.Thesestatementspreparethenecessarydataforthebar-beamfiniteelement
modelofFigures7.2–7.4,undertheMFCs(7.19).TheresultofexecutingtheprograminCells
7.1–7.2(withthesupportoftheutilityfunctionsnotedabove)islistedinCell7.3.
§7.5.2FixingFreedomsintheMNFT
TheinitializedMNFTdoesnotaccountfordisplacementboundaryconditionsonindividualfreedoms.
ThoseconditionscancanbeappliedthroughthemoduleFixFreedomInMasterNodeFreedomTable,
whichislistedinCell7.4.
7–12
7–13§
7.5 IMPLEMENTATION OF FREEDOM ASSIGNMENT OPERATIONS
Cell7.1InitializingtheMasterNodeFreedomTable
InitializeMasterNodeFreedomTable[MNDT_,MEDT_,MELT_,MFPT_]:=
Module[{e,eCL,ef,efp,efx,emfcl,eNL,i,itype,j,k,kNL,leneCL,leneNL,
lenfpt,lenkNL,lenmfc,m,n,nf,nfp,NFT,nj,numele=Length[MEDT],
numnod=Length[MNDT],numres,Nx2i,xn},
NFT=Table[{0,0,0,{}},{numnod}];emfcl={};
k=0;Do [xn=MNDT[[n,1]];k=Max[k,xn];NFT[[n,1]]=xn,{n,1,numnod}];
Nx2i=Table[0,{k}];Do [xn=MNDT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
Do [If [MEDT[[e,2,1]]=="MFC",AppendTo[emfcl,e];Continue[]];
itype=MEDT[[e,2,2]];eNL=MEDT[[e,3]];
leneNL=Length[eNL];efx=MELT[[itype,8]];
Do [kNL=eNL[[k]];lenkNL=Length[kNL];If [lenkNL==0,Continue[]];
efp=efx[[k]];ef=UnpackNodeFreedomTags[efp];
Do [xn=kNL[[i]];If [xn<=0,Continue[]];
n=Nx2i[[xn]];If [n<=0,Continue[]];nfp=NFT[[n,2]];
If [nfp==efp,Continue[]];nf=UnpackNodeFreedomTags[nfp];
Do [nf[[j]]=Max[nf[[j]],ef[[j]]],{j,1,6}];
nfp=PackNodeFreedomTags[nf];NFT[[n,2]]=nfp;
NFT[[n,3]]=CountAssignedNodeFreedoms[nfp],
{i,1,lenkNL}],
{k,1,leneNL}],
{e,1,numele}];(*Print["emfcl=",emfcl];*)
lenmfc=Length[emfcl];If [lenmfc==0,Return[NFT]];
lenfpt=Length[MFPT];numres=0;
Do [If [Length[MFPT[[fc]]]==0,Break[]];numres++,{fc,1,lenfpt}];
Do [e=emfcl[[m]];fc=MEDT[[e,4,2]];eCL=MFPT[[fc+numres+1,5]];
leneCL=Length[eCL];
Do [xn=eCL[[k,1]];If [xn<=0,Continue[]];
n=Nx2i[[xn]];If [n<=0,Continue[]];
nf=UnpackNodeFreedomTags[NFT[[n,2]]];
j=eCL[[k,2]];nj=nf[[j]];nf[[j]]=Min[Max[2,nj+1],8];
nfp=PackNodeFreedomTags[nf];NFT[[n,2]]=nfp;
NFT[[n,3]]=CountAssignedNodeFreedoms[nfp],
{k,1,leneCL}],
{m,1,lenmfc}];
Return[NFT];
];
ThemodulereceivesasargumentstheinitializedMNFT andalistcalledfFL.Thisdescribesm
specifieddisplacementsthroughm sublistsxn,i,wherexn istheexternalnodenumberandi the
freedomindex.ForexamplethefFL
f f 1,1g,f 1,2g,f 3,2g g.7:24/
declaresthatfreedomstx(1),ty(2) andty(3) arefixed.Thisimplementsthesupportconditions
u
x1
D u
y1
D u
y3
D 0ofExample7.6.
7–13
Chapter 7:FREEDOM ASSIGNMENT
7–14
Cell7.2TestStatementsforModuleofCell7.2
MNDT= {{1,{0,0,0}},{2,{5,0,0}},{3,{10,0,0}},{4,{-3,3,0}},{5,{-3,7,0}}};
MEDT= {{"Beam.1",{"Beam2D.2",2},{{1,2},{},{},{}},{1,1}},
{"Beam.2",{"Beam2D.2",2},{{2,3},{},{},{}},{1,1}},
{"Bar.1",{"Bar.2D",1},{{1,4},{},{},{}},{2,2}},
{"Bar.2",{"Bar.2D",1},{{2,4},{},{},{}},{2,2}},
{"Bar.3",{"Bar.2D",1},{{4,5},{},{},{}},{2,2}},
{"Bar.4",{"Bar.2D",1},{{2,5},{},{},{}},{2,2}},
{"Bar.5",{"Bar.2D",1},{{3,5},{},{},{}},{2,2}},
{"MFC.1",{"MFC",3},{{4,5},{},{},{}},{0,3}},
{"MFC.2",{"MFC",3},{{4,5},{},{},{}},{0,4}}};
MELT={{"Bar2D.2","STM",2,"BAR","MOM","SEG",1000,{110000}},
{"Beam2D.2","STM",3,"BEAM","MOM","SEG",1000,{110001}},
{"MFC","STM",2,"CON","EXT","ARB",1000,{0,0,0,0}}};
fPL1={"2DBeam",{"Xsec","MKFS"},{A},{Iz},{}};
fPL2={"2DBar",{"Xsec","MKSF"},{A},{},{}};
fPL3={"GenMFC",{"MFC","MKSF"},{},{},{{4,1,1},{5,1,-1}}};
fPL4={"GenMFC",{"MFC","MKSF"},{},{},{{4,2,1},{5,2,-1}}};
MFPT={{},fPL1,fPL2,fPL3,fPL4};
MNFT=InitializeMasterNodeFreedomTable[MNDT,MEDT,MELT,MFPT];
Print["MNFT=",MNFT];
Cell7.3OutputfromtheProgramofCells7.1and7.2
MNFT={{1,110001,3,{}},{2,110001,3,{}},{3,110001,3,{}},
{4,330000,2,{}},{5,330000,2,{}}}
ThemodulereturnstheMNFT withthepassivefreedomsmarked.Itshouldbenoticedthat
FixFreedomInMasterNodeFreedomTable willrefusemarkingunassignedfreedoms.
Thecodeistestedbythestatementsthatfollowthemodule.TheinitializedMNFT ofCell7.3is
usedasinput.ThedisplacementBCsu
x1
D u
y1
D u
y3
D 0describedby(7.24)areapplied.The
resultsofrunningthetestprogramareshowninCell7.5.
§7.5.3PrintingtheCompleteMasterNodeFreedomTable
ModulePrintMasterNodeFreedomtable,listedinCell7.6,printsthecompleteMasterNode
FreedomTablesuppliedasargument.ThismoduleistestedusingtheMNFT ofCell7.5.Theoutput
fromtheprintroutineisshowninCell7.7.
§7.5.4ConstructingtheMasterMultiplierFreedomTable
ModuleMakeMasterMultiplierFreedomTable,listedinCell7.8,buildstheMasterMultiplier
7–14
7–15§
7.5 IMPLEMENTATION OF FREEDOM ASSIGNMENT OPERATIONS
Cell7.4FixingFreedomsintheMNFT
FixFreedomInMasterNodeFreedomTable[MNFT_,fFL_]:= Module [
{NFT=MNFT,i,j,k,n,nf,Nx2i,numnod=Length[MNFT],xn},
k=0;Do [k=Max[k,NFT[[n,1]]],{n,1,numnod}];Nx2i=Table[0,{k}];
Do [xn=NFT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
Do [{xn,j}=fFL[[i]];n=Nx2i[[xn]];If [n<=0,Continue[]];
nf=UnpackNodeFreedomTags[NFT[[n,2]]];Print["j=",j,"nf=",nf];
If[nf[[j]]>=0,nf[[j]]=1];
NFT[[n,2]]=PackNodeFreedomTags[nf],
{i,1,Length[fFL]}];
Return[NFT];
];
MNFT={{1,110001,3,{}},{2,110001,3,{}},{3,110001,3,{}},
{4,330000,2,{}},{5,330000,2,{}}};
Print[FixFreedomInMasterNodeFreedomTable[MNFT,{{1,1},{1,2},{3,2}}]];
Cell7.5OutputfromtheProgramofCell7.4
{{1,220001,3,{}},{2,110001,3,{}},{3,120001,3,{}},
{4,330000,2,{}},{5,330000,2,{}}}
FreedomTablefrominformationprovidedinitstwoarguments:MEDT andMFPT.TheMMFT is
returnedasfunctionvalue.IftherearenoMFCs,anemptylistisreturned.
Themoduleistestedbythestatementsshownafterthemodule.ThetestoutputislistedinCell7.9.
§7.5.5PrintingtheMasterMultiplierFreedomTable
ModulePrintMasterMultiplierFreedomTable,listedinCell7.10,printsthecompleteMaster
MultiplierFreedomTableprovidedasargument.
Themoduleistestedbythestatementsshownafterthemodule,whichinputtheMMFT outputin
Cell7.9.ThetestoutputislistedinCell7.11.
§7.5.6FCTManipulationUtilities
Cell7.12showfourutilityfunctionsthatimplementfrequentoperationsonpackedandunpacked
freedomconfigurations.ThesefunctionsarealsousedbymodulesdescribedinotherChapters.
PackNodeFreedomTags receivesasinputsixFreedomConfigurationTagsandreturnsthepacked
NodeFreedomSignature.
7–15
Chapter 7:FREEDOM ASSIGNMENT
7–16
Cell7.6PrintingtheMasterNodeFreedomTable
PrintMasterNodeFreedomTable[MNFT_]:= Module[
{numnod=Length[MNFT],t,n},
t=Table["",{numnod+1},{4}];
Do [t[[n+1,1]]=ToString[MNFT[[n,1]]];
t[[n+1,2]]=ToString[MNFT[[n,2]]];
t[[n+1,3]]=ToString[MNFT[[n,3]]];
t[[n+1,4]]=ToString[MNFT[[n,4]]],
{n,1,numnod}];
t[[1]] = {"Xnode","Signature","DOF#","DOF-directions"};
Print[TableForm[t,TableAlignments->{Bottom,Right},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MNFT={{1,220001,3,{}},{2,110001,3,{}},{3,120001,3,{}},
{4,330000,2,{}},{5,330000,2,{}}};
PrintMasterNodeFreedomTable[MNFT];
Cell7.7OutputfromtheProgramofCell7.6
Xnode Signature DOF#DOF-directions
1 220001 3 {}
2 110001 3 {}
3 120001 3 {}
4 330000 2 {}
5 330000 2 {}
UnpackNodeFreedomTags doesthereverseoperation:receivesthepackedNodeFreedomSigna-
tureandreturnsthesixFreedomConfigurationtags.
UnpackAssignedNodeFreedomTags receivesthepackedNodeFreedomSignatureandreturns
twoitems:thesixFreedomConfigurationtags,andalistofsixintegersf fx1,...fx6g.Ifthei-th
freedomisassigned,fxi returnsitsordinalinthecumulativecountofassignednodefreedoms,
elsezero.
CountAssignedNodeFreedoms receivesthepackedNodeFreedomSignatureasinputandreturns
thecountoffreedomsassignedtothenode.
TheteststatementsshownatthebottomofCell7.12exercisethefourutilityfunctions.Theresults
fromexecutingthesestatementsisshowninCell7.13.
7–16
7–17§
7.5 IMPLEMENTATION OF FREEDOM ASSIGNMENT OPERATIONS
Cell7.8ConstructingtheMasterMultiplierFreedomTable
MakeMasterMultiplierFreedomTable[MEDT_,MFPT_]:= Module[
{e,fc,lenFPT=Length[MFPT],MFT,numele=Length[MEDT],numrfc},
MFT={};numrfc=0;
Do [If [Length[MFPT[[fc]]]==0,Break[]];numrfc++,{fc,1,lenFPT}];
Do [If [MEDT[[e,2,1]]=="MFC",fc=MEDT[[e,4,2]];
AppendTo[MFT,{e,MFPT[[fc+numrfc+1,5]]}]],
{e,1,numele}];
Return[MFT]
];
MNDT= {{1,{0,0,0}},{2,{5,0,0}},{3,{10,0,0}},{4,{-3,3,0}},{5,{-3,7,0}}};
MEDT= {{"Beam.1",{"Beam2D.2",2},{{1,2},{},{},{}},{1,1}},
{"Beam.2",{"Beam2D.2",2},{{2,3},{},{},{}},{1,1}},
{"Bar.1",{"Bar.2D",1},{{1,4},{},{},{}},{2,2}},
{"Bar.2",{"Bar.2D",1},{{2,4},{},{},{}},{2,2}},
{"Bar.3",{"Bar.2D",1},{{4,5},{},{},{}},{2,2}},
{"Bar.4",{"Bar.2D",1},{{2,5},{},{},{}},{2,2}},
{"Bar.5",{"Bar.2D",1},{{3,5},{},{},{}},{2,2}},
{"MFC.1",{"MFC",3},{{4,5},{},{},{}},{0,3}},
{"MFC.2",{"MFC",3},{{4,5},{},{},{}},{0,4}}};
MELT={{"Bar2D.2","STM",2,"BAR","MOM","SEG",1000,{110000}},
{"Beam2D.2","STM",3,"BEAM","MOM","SEG",1000,{110001}},
{"MFC","STM",2,"CON","EXT","ARB",1000,{0,0,0,0}}};
fPL1={"2DBeam",{"Xsec","MKFS"},{A},{Iz},{}};
fPL2={"2DBar",{"Xsec","MKSF"},{A},{},{}};
fPL3={"GenMFC",{"MFC","MKSF"},{},{},{{4,1,1},{5,1,-1}}};
fPL4={"GenMFC",{"MFC","MKSF"},{},{},{{4,2,1},{5,2,-1}}};
MFPT={{},fPL1,fPL2,fPL3,fPL4};
MMFT=MakeMasterMultiplierFreedomTable[MEDT,MFPT];
Print["MMFT=",MMFT];
Cell7.9OutputfromtheProgramofCell7.8
MMFT={{8,{{4,1,1},{5,1,-1}}},{9,{{4,2,1},{5,2,-1}}}}
7–17
Chapter 7:FREEDOM ASSIGNMENT
7–18
Cell7.10PrintingtheMasterMultiplierFreedomTable
PrintMasterMultiplierFreedomTable[MMFT_]:= Module[
{nummul=Length[MMFT],t,n},
t=Table["",{nummul+1},{2}];
Do [t[[n+1,1]]=PaddedForm[MMFT[[n,1]],4];
t[[n+1,2]]=ToString[MMFT[[n,2]]],
{n,1,nummul}];
t[[1]] = {"Ielem","Node-freedom-coefficient list"};
Print[TableForm[t,TableAlignments->{Right,Right},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MMFT={{8,{{4,1,1},{5,1,-1}}},{9,{{4,2,1},{5,2,-1}}}};
PrintMasterMultiplierFreedomTable[MMFT];
Cell7.11OutputfromtheProgramofCell7.10
Ielem Node-freedom-coefficient list
8 {{4,1,1},{5,1,-1}}
9 {{4,2,1},{5,2,-1}}
7–18
7–19§
7.5 IMPLEMENTATION OF FREEDOM ASSIGNMENT OPERATIONS
Cell7.12FreedomConfigurationTag(FCT)UtilityFunctions
PackNodeFreedomTags[f_]:= Module[{},
Return[ 100000*(f[[1]]+1)+10000*(f[[2]]+1)+1000*(f[[3]]+1)+
100*(f[[4]]+1) +10*(f[[5]]+1) +(f[[6]]+1) ];
];
UnpackNodeFreedomTags[p_]:= Module[{f1,g2,f2,g3,f3,g4,f4,g5,f5,f6},
If [p==0,Return[{-1,-1,-1,-1,-1,-1}]];f1=Floor[p/100000];
g2=p -100000*f1;f2=Floor[g2/10000];g3=g2-10000*f2;
f3=Floor[g3/1000];g4=g3-1000*f3;f4=Floor[g4/100];
g5=g4-100*f4;f5=Floor[g5/10];f6=g5-10*f5;
Return[{f1,f2,f3,f4,f5,f6}-1];
];
UnpackAssignedNodeFreedomTags[p_]:= Module[
{f1,g2,f2,g3,f3,g4,f4,g5,f5,f6,f,fx,i,j},
fx={0,0,0,0,0,0};If [p==0,Return[{fx-1,fx}]];f1=Floor[p/100000];
g2=p -100000*f1;f2=Floor[g2/10000];g3=g2-10000*f2;
f3=Floor[g3/1000];g4=g3-1000*f3;f4=Floor[g4/100];
g5=g4-100*f4;f5=Floor[g5/10];f6=g5-10*f5;
f={f1,f2,f3,f4,f5,f6};j=1;Do [If [f[[i]]>0,fx[[i]]=j++],{i,1,6}];
Return[{f-1,fx}];
];
CountAssignedNodeFreedoms[p_]:= Module[{f1,g2,f2,g3,f3,g4,f4,g5,f5,f6},
If [p==0,Return[0]];f1=Floor[p/100000];
g2=p -100000*f1;f2=Floor[g2/10000];g3=g2-10000*f2;
f3=Floor[g3/1000];g4=g3-1000*f3;f4=Floor[g4/100];
g5=g4-100*f4;f5=Floor[g5/10];f6=g5-10*f5;
Return[Min[1,f1]+Min[1,f2]+Min[1,f3]+Min[1,f4]+Min[1,f5]+Min[1,f6]];
];
p=PackNodeFreedomTags[{1,-1,0,-1,0,3}];Print["p=",p];
f=UnpackNodeFreedomTags[p];Print["f=",f];
Print["p again=",PackNodeFreedomTags[f]];
Print["c=",CountAssignedNodeFreedoms[p]];
Print["a=",UnpackAssignedNodeFreedomTags[p]];
Cell7.13OutputfromtheProgramofCell7.12
p=201014
f={1,-1,0,-1,0,3}
p again=201014
c=4
a={{1,-1,0,-1,0,3},{1,0,2,0,3,4}}
7–19
-
8
Nodal State
8–1
Chapter 8:NODAL STATE
8–2
ThisChapterdiscussestheconfigurationandinitializationofthestatetables.Familiaritywiththe
contentsofChapter7isessential.
§8.1GENERALDESCRIPTION
Chapter7describeshownodaldisplacementfreedomsareassignedandtheiractivityspecified.But
itdoesnotexplainhowthevalueofthosedisplacementsandtheirconjugateforcesisset.These
(force,displacement)pairscollectivelyformthenodal state,whichisstoredinaMasterNode
StateTableorMNST.Onehalfofthisinformationisknownfromforceanddisplacementboundary
conditions.Theotherhalfisinitializedwithzero-entryplaceholders,andiscompletedbythe
equationsolver.
IfMultiFreedomConstraints(MFCs)arespecified,theassociatedLagrangemultipliersbecome
partofthestate.Becausemultipliersareassociatedwithelementsandnotnodes,theyareheldin
theirownseparateMasterMultiplierStateTables.
§8.2INDIVIDUALSTATELISTS
§8.2.1TheIndividualNodeStateList
TheIndividualNodeStateTable,ornSL,recordsthenumericalvaluesofassignedfreedomsand
theirconjugateforcesataspecificnode,astwosublists,withunassignedfreedomsskipped.There
isonenSL pernode.ThenumberofitemsineachnSL istwicethenumberofassignedfreedoms.
ToclarifytheconfigurationofanSL,supposethatonlythethreetranslationfreedoms,asinasolid
model,areassigned.ThenSL configurationforatypicalnoden withexternalnodenumberxn is
nSL(n) = f xn,f qxv(xn),qyv(xn),qzv(xn) g,f txv(xn),tyv(xn),tzv(xn) g g
.8:1/
Forcesappearfirst,thendisplacements.Observethatvaluespertainingtonodalrotationsand
momentsareleftoutof(8.1)becausetheyareunassigned.
Ifavalueisunknown,azeroisenteredasaplaceholder.ThisofcoursehappensbeforetheFEM
equationsaresolved.Uponsolutiontheplaceholdersarereplacedbynumeric(orsymbolic)values
deliveredbythesolver.Thesevaluesaresaidtodefinethestateofthenode.Thestateofallnodes
definesthestateofthecompleteFEMmodel.
EXAMPLE 8.1
Considerexternalnode46ofaplate-bendingFEMmodel,atwhichonlythethreefreedomstz,rx andry,
alignedwiththeglobalaxes,areassigned.Thecorrespondingconjugateforcesareqz,mx andmy.Assume
thatqzv(46) = 42.5 andmy(46) = 0.808 areknownforcesandmoments,whilerx(46) = -0.0293 is
aknownrotation.Theirthreeconjugatevaluesareunknown.Thenthefreedomsignatureandstatelistare
nFS(46) = 001210,nST(46) = f 46,f 42.5,0,0.808 g,f 0,-0.0293,0 g g.8:2/
8–2
8–3§
8.3 THE MASTER NODE STATE TABLE(S)
REMARK 8.1
Intime-domaindynamicanalysis,theconfigurationofthenSL hastobeextendedtoincludevelocitiesand
momenta,becausethesearepartoftheinitialconditions.Alternatively,thesemaybeplacedinaseparate
table.
§8.2.2TheIndividualMultiplierStateList
IfMultiFreedomConstraints(MFCs)arespecified,andtheyaretreatedbyLagrangemultiplier
adjunction,foreachconstraintwedefineadatastructurecalledtheIndividualMultiplierStateList,
ormSL.ThereisonemSL foreachMFC.Itconsistsoftwoitems:
mSL = f crhs,lambda g.8:3/
Herecrhs isthegivenrighthandsideoftheMFC,andlambda isaslotreservedfortheLagrange
multipliervalue.UponsolvingtheFEMequationsthecomputedmultipliervalueisstoredinthe
lastitemof(8.3).
Thisdatastructureisintroducedherebecauseisiscloselyrelatedtothestatetablesdefinedbelow.
REMARK 8.2
IfMFCsaretreatedbypenaltyelementtechniques,thisdatastructureandthoseconstructedfromitare
unnecessary.InthepresentimplementationofMathFET,atreatmentbyLagrangemultipliersisused.
§8.3THEMASTERNODESTATETABLE(S)
TheMasterNodeStateTable,orMNST,isaflatlistoftheIndividualNodeStateListsofallnodes
intheFEMmodel,orderedbyinternalnodenumber:
MNST = f nSL(1),nSL(2),...nSL(numnod) g.8:4/
TheMNST isconstructedinseveralstagesasdescribedbelow,andisnotcompleteuntiltheFEM
equationsaresolved.
Theprecedingdefinitionappliestoalinearstaticanalysiswithasingleloadcase.MuchoftheFEM
analysisdoneinpractice,however,isconcernedwithcomputingasequenceofstates.Examples
includestaticlinearanalyseswithmultipleloadcases,eigenvalueanalysesforvibrationfrequencies
andmodes,nonlinearanddynamicanalyses.
Thesesituationsarehandledbyusingmultiplestatetables,inwhichtheresultsofeachanalysis
arerecorded.Forexample,ifastaticanalysisinvolves420loadcases,420MNSTsarecreated.In
atransientdynamicanalysisusing2500stepsofdirecttimeintegration,2501MNSTsarecreated,
withtheextraoneaccountingfortheinitialconditions.
REMARK 8.3
Forlarge-scalemodels,theefficienthandlingofthousandsofstatetablescanbecomeasignificantdata
managementproblem.Thistopic,howver,isbeyondthescopeofthepresentimplementation.
8–3
Chapter 8:NODAL STATE
8–4
Node freedom
configuration
Master
Node
State
Table
Master
Node
Freedom
Table
Initialized
Master
Node
State
Table
Specified
nodal
forces
Specified
nodal
displacements
STAGE 1
STAGE 2
Figure8.1.ConstructionoftheMasterNodeStateTableasatwostageprocess.
1
2
3
45
7200
7200
Figure8.2.Theexamplestructureunderloadsandsupports.
beambeam
bar
{110000}{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{130000}
{130000}
{110000}
{110001}
{110001}
{110001}
{110001}
{110001}
{110001}
{110001}
bar
barbar
{010000}
{010000}
bar
1
2
3
4
1
2
3
4
5
5
MFC
Figure8.3.TheexamplestructurewithadditionalMFCs.
§8.3.1ConstructionofMasterNodeStateTable
Thisisdoneintwostages.SeeFigure8.1.AninitializedMNST isconstructedinnode-bynode
fashionfromtheMNFT byreservingnST spacefortheassignedfreedomsandassociatedforces.
Thesereservedentriesaresettozero.Theninformationonspacifiednodedisplacementsandnode
forcesisobtainedfromuserinputandplacedintheappropriateslots.
8
–
4
8–5§
8.4 IMPLEMENTATION OF STATE OPERATIONS
EXAMPLE 8.2
FortheexamplestructureofFigure8.2thefirststageyieldstheinitializedtable
MNST = f f f 0,0,0g,f 0,0,0g g,f f 0,0,0g,f 0,0,0g g,
f f 0,0,0g,f 0,0,0g g,f f 0,0g,f 0,0g g,f f 0,0g,f 0,0g g g
.8:5/
IncorporationofthesupportandappliedforceconditionsofFigure8.3changestheaboveto
MNST = f f f 0.,0.,0g,f 0,0,0.g g,f f 0,0,0g,f 0.,-7200.,0.g g,
f f 0,0.,0g,f 0.,0.,0.g g,f f 0,0g,f 0.,0.g g,f f 0,0g,f 0.,0.g g g
.8:6/
inwhichthe13MNFT entriesthatareknownareshownasfloating-pointnumbers.Thevalueoftheremaining
13unknownsistobeprovidedeventuallybytheFEMequationsolver.
REMARK 8.4
Itwouldbeeleganttobeabletosettheunknownentriestoan“indefinite”value,butthatkindofvalueisnot
supporteduniformlybyprogramminglanguages.
§8.3.2TheMasterMultiplierTables
IfthereareNc > 0MultiFreedomConstraints,themFLsoftheMFCsarecollectedinadatastructure
calledtheMasterMultiplierStateTable,orMMST,orderedbyincreasingMFCnumber:
MMST = f mST(1),mST(2),...mST(Nc) g.8:7/
wherethemSLsareconfiguredaccordingto(8.3).Thisdatastructureissimilarinfunctiontothe
MNST.
§8.3.3AccountingforMFCLagrangeMultipliers
IfaMFCsuchas(8.6)isimplementedthroughLagrangemultiplieradjunction,thevectorofFEM
unknownsgainsoneextracomponent:
u
T
D
[
u
x1
u
y1
µ
z1
u
x2
u
y2
µ
z2
u
x3
u
y3
µ
z3
u
x4
u
y4
u
x5
u
y5
¸
7
]
.8:8/
Here¸
7
isthemultiplierfortheMFC,becausetheMFCisassumedtohavebeenspecifiedthrough
anelementwithglobalnumber7.
Tofacilitatethetreatmentofthemultiplier,thetwomasterdatastructuresdescribedin§8.4.3are
constructed.Forthiscasetheyare
MMFT = f 7 g.8:9/
MMST = f f 0.,0 g g.8:10/
Iftheconstraint(8.6)hasanonzerorighthandside,say
ty(4) ¡ty(5) D 0:24.8:11/
thelasttablewouldbecome
MMST = f f 0.24,0 g g.8:12/
8–5
Chapter 8:NODAL STATE
8–6
Cell8.1InitializingtheMasterNodeStateTable
InitializeMasterNodeStateTable[MNFT_]:= Module[
{c,NST,numnod=Length[MNFT],xn},
If [numnod==0,Return[{}]];
NST=Table[{MNFT[[n,1]],{},{}},{n,1,numnod}];
Do [c=MNFT[[n,3]];
If [c>0,NST[[n,2]]=NST[[n,3]]=Table[0.,{c}]],
{n,1,numnod}];
Return[NST]
];
MNFT={{1,110001,3,{}},{2,110001,3,{}},{3,110001,3,{}},
{4,330000,2,{}},{5,330000,2,{}}};
MNST=InitializeMasterNodeStateTable[MNFT];
Print["Initialized MNST=",MNST//InputForm];
Cell8.3OutputfromtheProgramofCell8.1
Initialized MNST={{1,{0.,0.,0.},{0.,0.,0.}},
{2,{0.,0.,0.},{0.,0.,0.}},{3,{0.,0.,0.},{0.,0.,0.}},
{4,{0.,0.},{0.,0.}},{5,{0.,0.},{0.,0.}}}
§8.4IMPLEMENTATIONOFSTATEOPERATIONS
Thissectionlistsmodulespertainingtothecreation,accessanddisplayoftheMasterStateTable
fornodes(theMNST)andformultipliers(theMMST).Modulesareroughlylistedintheirorderof
appearanceintheMathematica fileStateTables.ma.
§8.4.1InitializingtheMNFT
ModuleInitializeMasterNodeStateTable isdisplayedinCell8.1.ItinitializestheMNST for
theassembledFEMmodel.
ThemodulereceivestheMNFT asargument,andtheoutputistheinitializedMNST.
TeststatementsforInitializeMasterNodeStateTable followthemodule.Thesesetupthe
datastructuresforthesameteststructureusedinthelastChapter.Theresultofexecutingthe
programinCell8.1islistedinCell8.2.
§8.4.2SettingUpForceandDisplacementValuesintheMNFT
NonzeroforcesarespecifiedthroughmoduleSetForcesInMasterNodeStateTable,whichis
listedinCell8.3.TheoutputoftheteststatementisshowninCell8.4.
8–6
8–7§
8.4 IMPLEMENTATION OF STATE OPERATIONS
Cell8.3SettingForceValuesintheMNST
SetForcesInMasterNodeStateTable[MNST_,forces_,MNFT_]:= Module[
{ft,fx,i,j,k,lenfor=Length[forces],n,NST=MNST,
numnod=Length[MNFT],Nx2i,val,xn},
k=0;Do [k=Max[k,MNFT[[n,1]]],{n,1,numnod}];Nx2i=Table[0,{k}];
Do [xn=MNFT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
Do [{xn,j,val}=forces[[i]];
n=Nx2i[[xn]];If [n<=0,Continue[]];
{ft,fx}=UnpackAssignedNodeFreedomTags[MNFT[[n,2]]];
k=fx[[j]];If [ft[[j]]!=1,NST[[n,2,k]]=val],
{i,1,lenfor}];
Return[NST]
];
MNFT={{1,110001,3,{}},{2,110001,3,{}},{3,110001,3,{}},
{4,330000,2,{}},{5,330000,2,{}}};
MNST={{1,{0.,0.,0.},{0.,0.,0.}},
{2,{0.,0.,0.},{0.,0.,0.}},{3,{0.,0.,0.},{0.,0.,0.}},
{4,{0.,0.},{0.,0.}},{5,{0.,0.},{0.,0.}}};
forces= {{2,2,-7200},{3,1,4500},{5,2,-6000}};
MNST=SetForcesInMasterNodeStateTable[MNST,forces,MNFT];
Print["MNST=",MNST];PrintMasterNodeStateTable[MNST];
Cell8.4OutputfromtheProgramofCell8.3
MNST={{1,{0.,0.,0.},{0.,0.,0.}},
{2,{0.,-7200,0.},{0.,0.,0.}},{3,{4500,0.,0.},{0.,0.,0.}},
{4,{0.,0.},{0.,0.}},{5,{0.,-6000},{0.,0.}}}
Xnode Node-forces Node-displacements
1 {0.,0.,0.} {0.,0.,0.}
2 {0.,-7200,0.} {0.,0.,0.}
3 {4500,0.,0.} {0.,0.,0.}
4 {0.,0.} {0.,0.}
5 {0.,-6000} {0.,0.}
Nonzeroprescribeddisplacementsarespecifiedthroughmodule
SetForcesInMasterNodeStateTable,whichislistedinCell8.5.Theoutputoftheteststatement
isshowninCell8.6.
§8.4.3PrintingtheCompleteMasterNodeStateTable
8–7
Chapter 8:NODAL STATE
8–8
Cell8.5SettingDisplacementValuesintheMNST
SetDisplacementsInMasterNodeStateTable[MNST_,disp_,MNFT_]:= Module[
{ft,fx,i,j,k,lendis=Length[disp],n,NST=MNST,
numnod=Length[MNFT],Nx2i,val,xn},
k=0;Do [k=Max[k,MNFT[[n,1]]],{n,1,numnod}];Nx2i=Table[0,{k}];
Do [xn=MNFT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
Do [{xn,j,val}=disp[[i]];
n=Nx2i[[xn]];If [n<=0,Continue[]];
{ft,fx}=UnpackAssignedNodeFreedomTags[MNFT[[n,2]]];
k=fx[[j]];If [ft[[j]]==1,NST[[n,3,k]]=val],
{i,1,lendis}];
Return[NST]
];
MNFT={{1,220001,3,{}},{2,110001,3,{}},{3,120001,3,{}},
{4,330000,2,{}},{5,330000,2,{}}};
MNST={{1,{0.,0.,0.},{0.,0.,0.}},{2,{0.,-7200,0.},
{0.,0.,0.}},{3,{4500,0.,0.},{0.,0.,0.}},
{4,{0.,0.},{0.,0.}},{5,{0.,-6000},{0.,0.}}};
disp= {{3,2,0.00274},{1,1,-.00168}};
MNST=SetDisplacementsInMasterNodeStateTable[MNST,disp,MNFT];
Print["MNST=",MNST//InputForm];PrintMasterNodeStateTable[MNST];
Cell8.6OutputfromtheProgramofCell8.5
MNST={{1,{0.,0.,0.},{-0.00168,0.,0.}},
{2,{0.,-7200,0.},{0.,0.,0.}},
{3,{4500,0.,0.},{0.,0.00274,0.}},{4,{0.,0.},{0.,0.}},
{5,{0.,-6000},{0.,0.}}}
Xnode Node-forces Node-displacements
1 {0.,0.,0.} {-0.00168,0.,0.}
2 {0.,-7200,0.} {0.,0.,0.}
3 {4500,0.,0.} {0.,0.00274,0.}
4 {0.,0.} {0.,0.}
5 {0.,-6000} {0.,0.}
ModulePrintMasterNodeStateTable,listedinCell8.7,printsthecompleteMasterNodeState
Tablesuppliedasargument..TheoutputfromtheteststatementsisshowninCell8.8.
§8.4.4InitializingtheMasterMultiplierStateTable
8–8
8–9§
8.4 IMPLEMENTATION OF STATE OPERATIONS
Cell8.7PrintingtheMasterNodeStateTable
PrintMasterNodeStateTable[MNST_]:= Module[
{numnod=Length[MNST],t,n},
t=Table["",{numnod+1},{3}];
Do [t[[n+1,1]]=PaddedForm[MNST[[n,1]],4];
t[[n+1,2]]=ToString[MNST[[n,2]]];
t[[n+1,3]]=ToString[MNST[[n,3]]],
{n,1,numnod}];
t[[1]] = {"Xnode","Node-forces","Node-displacements"};
Print[TableForm[t,TableAlignments->{Left,Left},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MNST={{1,{0.,0.,0.},{-0.00168,0.,0.}},
{2,{0.,-7200,0.},{0.,0.,0.}},
{3,{4500,0.,0.},{0.,0.00274,0.}},{4,{0.,0.},{0.,0.}},
{5,{0.,-6000},{0.,0.}}};
PrintMasterNodeStateTable[MNST];
Cell8.8OutputfromtheProgramofCell8.7
Xnode Node-forces Node-displacements
1 {0.,0.,0.} {-0.00168,0.,0.}
2 {0.,-7200,0.} {0.,0.,0.}
3 {4500,0.,0.} {0.,0.00274,0.}
4 {0.,0.} {0.,0.}
5 {0.,-6000} {0.,0.}
ModuleInitMasterMultiplierStateTable,listedinCell8.9,initializestheMasterMultiplier
StateTablefrominformationprovidedinitsarguments.Themoduleistestedbythestatements
shownafterthemodule.ThetestoutputislistedinCell8.10.
§8.4.5SeetingGapsintheMasterMultiplierStateTable
ModuleSetGapsInMasterMultiplierStateTable,listedinCell8.11,storestheconstraint
RHSvalues(“gaps”)intheMasterMultiplierStateTable.Themoduleistestedbythestatements
shownafterthemodule.ThetestoutputislistedinCell8.12.
§8.4.6PrintingtheMasterMultiplierStateTable
ModulePrintMasterMultiplierStateTable,listedinCell8.13,printsthecompleteMaster
MultiplierStateTableprovidedasargument.Themoduleistestedbythestatementsshownafter
8–9
Chapter 8:NODAL STATE
8–10
Cell8.9InitializingtheMasterMultiplierStateTable
InitializeMasterMultiplierStateTable[MEDT_]:= Module[
{e,MST,numele=Length[MEDT]},
MST={};
Do [If [MEDT[[e,2,1]]=="MFC",AppendTo[MST,{e,{0,0}}]],
{e,1,numele}];
Return[MST]
];
MEDT= {{"Beam.1",{"Beam2D.2",2},{{1,2},{},{},{}},{1,1}},
{"Beam.2",{"Beam2D.2",2},{{2,3},{},{},{}},{1,1}},
{"Bar.1",{"Bar.2D",1},{{1,4},{},{},{}},{2,2}},
{"Bar.2",{"Bar.2D",1},{{2,4},{},{},{}},{2,2}},
{"Bar.3",{"Bar.2D",1},{{4,5},{},{},{}},{2,2}},
{"Bar.4",{"Bar.2D",1},{{2,5},{},{},{}},{2,2}},
{"Bar.5",{"Bar.2D",1},{{3,5},{},{},{}},{2,2}},
{"MFC.1",{"MFC",3},{{4,5},{},{},{}},{0,3}},
{"MFC.2",{"MFC",3},{{4,5},{},{},{}},{0,4}}};
MMST=InitializeMasterMultiplierStateTable[MEDT];
Print["MMST=",MMST];
Cell8.10OutputfromtheProgramofCell8.9
MMST={{8,{0,0}},{9,{0,0}}}
themodule.ThetestoutputislistedinCell8.14.
8–10
8–11§
8.4 IMPLEMENTATION OF STATE OPERATIONS
Cell8.11SettingGapsintheMasterMultiplierStateTable
SetGapsInMasterMultiplierStateTable[MMST_,gaps_]:= Module[
{e,i,k,lengap=Length[gaps],MST=MMST,m,nummul=Length[MMST],Ei2m,val},
k=0;Do [k=Max[k,MST[[m,1]]],{m,1,nummul}];Ei2m=Table[0,{k}];
Do [e=MST[[m,1]];Ei2m[[e]]=m,{m,1,nummul}];
Do [{e,val}=gaps[[i]];m=Ei2m[[e]];If [m>0,MST[[m,2,1]]=val],
{i,1,lengap}];
Return[MST]
];
MMST={{8,{0,0}},{9,{0,0}}};
MMST=SetGapsInMasterMultiplierStateTable[MMST,{{9,3.5},{8,-0.671}}];
PrintMasterMultiplierStateTable[MMST];
Cell8.12OutputfromtheProgramofCell8.11
Ielem MFC-gap MFC-multiplier
8 -0.671 0
9 3.5 0
8–11
Chapter 8:NODAL STATE
8–12
Cell8.13PrintingtheCompleteMasterMultiplierStateTable
PrintMasterMultiplierStateTable[MMST_]:= Module[
{nummul=Length[MMST],t,n},
t=Table["",{nummul+1},{3}];
Do [t[[n+1,1]]=PaddedForm[MMST[[n,1]],4];
t[[n+1,2]]=ToString[MMST[[n,2,1]]];
t[[n+1,3]]=ToString[MMST[[n,2,2]]],
{n,1,nummul}];
t[[1]] = {"Ielem","MFC-gap","MFC-multiplier"};
Print[TableForm[t,TableAlignments->{Right,Right},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MMST={{8,{0,0}},{9,{3.5,0}},{12,{0.671,0}}};
PrintMasterMultiplierStateTable[MMST];
Cell8.14OutputfromtheProgramofCell8.13
Ielem MFC-gap MFC-multiplier
8 0 0
9 3.5 0
12 0.671 0
8–12
-
10
Global
Connectivity
10–1
Chapter 10:GLOBAL CONNECTIVITY
10–2
§10.1GENERALDESCRIPTION
Globalconnectivitydatastructuresspecifyinformationaboutthelinkagebetweennodes,elements
andfreedomsoftheglobalFiniteElementmodel.Thisinformationisneededtosetupefficient
computationaldatastructuresforbothsequentialandparallelprocessing.Theinformationispurely
topologicalinnaturebecauseitdoesnotdependonmodelgeometry,fabricationorconstitutive
properties.
Ascanbeexpected,theprincipalattributereflectedbythesedatastructuresisconnectioninthe
senseof“attachedto”or“belongsto.”Thisproperty,whichisdefinedmorepreciselyinthenext
subsection,characterizesthesparsenessofmatricesandvectorsthatappearindirectanditerative
solutionmethods.
ThisChapterintroducesdatastructuresthatpreciselydefineconnectionattributesfortheglobal
(source)model.Thesearesufficientforsequentialprocessing.Partitionedversions,whichare
suitableforparallelprocessing,aretreatedinChapter15.
§10.1.1Connections
Theconnectionattributeidentifiesattachmentrelationshipsbetweentwofiniteelementobjects.In
thefollowingdefinitions,internalnodenumbersandinternalelementnumbersareused.
ThestructuralmodelsofFigures10.1and10.2willbeoftenusedtoillustrateconnectivityconcepts
andtableconfiguration.Inthismodelsexternalandinternalnodenumbersaretakentobethe
sameforsimplicity,andtheinternalelementnumbersareshownenclosedinparentheseswithinthe
elements.Elementnamesarenotshownastheyplaynoroleinthefollowingoperations.
Anoden isconnectedtoelemente ifthenodeappearsinthenodelistoftheelement.Intheexample
ofFigure10.1,nodes3and5areconnectedtoelement8.
Twonodes,niandnj,areconnectediftheyareconnectedtothesameelement.Anodeisconnected
toitself.IntheexampleofFigure10.1,nodes2and5areconnected.
Twoelements,ei andej areconnectediftheyhaveatleastonecommonnode.Anelementis
connectedtoitself.IntheexampleofFigure10.2(a),elements8and10areconnectedbecausethey
sharenode6.
Twodegreesoffreedomfi andfj aresaidtobeconnectediftheybelongtotwoconnectednodes,
ortothesamenode.
Theoppositeattributeisdisconnection.Twoobjectsthatarenotconnectedinthestatedsensestated
abovearesaidtobedisconnected.Forexample,inthemodelofFigure10.2(a),nodes6and10,
andelements2and4,aredisconnected.
ThepresenceofMultiFreedomConstraintsdoesnotchangethosedefinitionsifeachMFCisregarded
asanelement(andindeed,thatishowtheyaredefined).InthemodelofFigure10.2(b),wherethe
addedMFCisintroducedaselement(11),nodes6and10arenowconnected,andsoareelements
1and3.
10–2
10–3§
10.2 NODE TO ELEMENT CONNECTIONS
Beam.1
Beam.2
Bar.1
Bar.2
Bar.3
Bar.4
Bar.5
1
23
4
5
(a)
(b)
(1)
(2)
(3)
(5)
(4)
(6)
(7)
(8): MFC
(9): MFC
u
x4
=u
x5
u
y4
=u
y5
Figure10.1.PlaneskeletalstructurewithtwoMFCsforconnectivityexamples.
Externalandinternalnodenumbercoincide.Internalelement
numbersareshowninparenthesisalongsideelementnames.
MFC (11)
(1)
(2)
(5)
(10)
(9)
(4)
(7)
(8)
(6)
(3)
6
4
2
1
3
5
7
8
9
10
11
12
13
14
15
(1)
(2)
(5)
(10)
(9)
(4)
(7)
(8)
(6)
(3)
6
4
2
1
3
5
7
8
9
10
11
12
13
14
15
(a)(b)
Figure10.2.Continuumstructuremodelforconnectivityexamples:(a)contains
onlystandardelements,whereas(b)hasaMFC,labeledas
element11,thatlinksfreedomsofnodes6,7,8and9.
REMARK 10.1
Forsometableformsstudiedbelow,MFCelementsaresupposedtobeignoredasregardsconnectivity.Such
formsarecalledeXcludedMFCversionsorXversionsforshort.TheyareidentifiedbyappendinganX tothe
tablename.XversionsareusefulforcertainstoragepreallocationtaskswhenMFCsaretreatedbyLagrange
multipliers.
§10.2NODETOELEMENTCONNECTIONS
§10.2.1TheIndividualElement-NodeList
TheIndividualElement-NodeList,oreNL,ofanindividualelementisalistofallnodesconnected
tothatelement,specifiedbyinternalnodenumber.Foraspecificelemente wewriteeNL(e).
10–3
Chapter 10:GLOBAL CONNECTIVITY
10–4
ThelistisreadilyconstructedfromtheinformationonelementnodesstoredintheIndividual
ElementDefinitionListoreDL discussedinChapter3.3.Recallthattheinformationwasstoredas
atwo-levellistcalledeXNL.TheconstructionoftheeNL involvesthefollowingoperations:
1.TheeXNL isflattenedbecausenodistinctionneedstobemadebetweencorner,side,faceand
internalnodes.
2.Externalnodenumbersaremappedtointernalones.
3.Optionally,nodesaresortedbyincreasingsequence.
Theexamplebelow,whichincludesseveralnodetypes,illustratestheprocedure.
7!3
8!4
9!5
24!11
25!12
26!13
39!19
40!20
41!21
Figure10.3.ExampleelementtoillustratetheconstructionoftheIndividual
ElementNodeList.Externalnodenumbersappearinboldface
ontheleft,andinternalnodenumbersontheright.
EXAMPLE 10.1
Theelement-nodes listintheeDL ofthe9-nodequadrilateralelementshowninFigure10.3is
eXNL = f f 7,9,41,39g,f 8,26,40,24g,f 25g g.10:1/
Thelistisflattened:
eXNL = f 7,9,41,39,8,26,40,24,25g.10:2/
andtheexternalnodenumbersreplacedbyinternalones:
eNL = f 3,5,21,19,4,13,20,11,12 g.10:3/
Thereplacement(10.2)!(10.3)canbeefficientlydonethroughthemappingarrayNx2i describedin§2.3.
Finally,thenodenumbersin(10.3)mayoptionallybesorted:
eNL = f 3,4,5,11,12,13,19,20,21 g.10:4/
whichspeedsupsomedownstreamoperations.
10–4
10–5§
10.2 NODE TO ELEMENT CONNECTIONS
External to
Internal
Node
Mapping
Master
Node
Definition
Table
Master
Element
Definition
Table
Individual
Element
Node Lists
Global
Element to Node Connection
Table
Figure10.4.ConstructionoftheGENCT.
§10.2.2TheGlobalElementToNodeConnectionTable
TheGlobalElement-to-NodeConnectionTable,orGENCT,isthesequentiallistofalleNL(e):
GENCT = f eNL(1),eNL(2),...eNL(numele) g.10:5/
ThisdatastructureisobtainedbyconstructingtheeNLsasdescribedin§10.2.1,inaloopover
elements.TheschematicsisillustratedinFigure10.4.
Forsubsequentuseofthisdatastructureintheallocationofstoragespaceforcertainsolution
procedures,itisconvenienttodefineanalternativeversionofGENCT,calledthe“eXcluded-MFC
version”or“Xversion”andabbreviatedtoGENCTX.TheXversionassumesthatMFCelementsare
nodelessandtheireNLsareempty.Inotherwords,MFCelementsareviewedasdisconnectedfrom
theFEMmodel.ThemainuseoftheXversionisinthepreparationforskylinesolverprocessing,
asdescribedinChapter14.
EXAMPLE 10.2
ForthestructureofFigure10.1:
GENCT = f f 1,2g,f 2,3g,f 1,4g,f 2,4g,f 4,5g,f 2,5g,f 3,5g,f 4,5g,f 4,5g g.10:6/
whereas
GENCTX = f f 1,2g,f 2,3g,f 1,4g,f 2,4g,f 4,5g,f 2,5g,f 3,5g,f g,f g g.10:7/
becausethelasttwoelements(8and9)areMFCs.
§10.2.3TheIndividualNode-ElementList
TheinverseoftheeNL specifiesallelementsconnectedtoanindividualnode.Boththenodeand
theelementsareidentifiedbyinternalnumbers.ThisdatastructureiscalledtheIndividualNode
ElementList,ornEL.Foraspecificnoden wewritenEL(n).
10–5
Chapter 10:GLOBAL CONNECTIVITY
10–6
Global
Element to Node
Connection
Table
Individual
Element
Node Lists
Global Node
to Element
Connection
Table
Master
Node
Definition
Table
GNECT length
Figure10.5.SchematicsofconstructionoftheGNECT.
EXAMPLE 10.3
ForthemodelofFigure10.2(b):
nEL(1) = f 2g,nEL(4) = f 1,8g,nEL(11) = f 1,3,6,8 g.10:8/
Inthisexample,internalelementnumbersaresortedbyascendingorderineacheNL,butthisarrangement,
whileconvenient,isanimplementationoption.
§10.2.4TheGlobalNodetoElementConnectionTable
TheGlobalNode-to-ElementConnectionTable,orGNECT,isthesequentiallistofallnEL(n):
GNECT = f nEL(1),nEL(2),...nEL(numnod) g.10:9/
ThisdatastructureisderivedfromtheMEDT andNx2i.TheeNLsareconstructedelementby
element,andtheGNECT builtbyaggregationnodebynode.Figure10.5schematizesthetable
constructionprocess.
TheXversionofGNECT,calledGNECTL,isobtainedbystartingfromtheGENCTX insteadofthe
GENCT.ThisversionignoresallMFCelements.
EXAMPLE 10.4
FortheexamplemodelofFigure10.1
GNECT = f f 1,3g,f 1,2,4,6g,f 2,7g,f 3,4,5,8,9g,f 5,6,7,8,9g g.10:10/
GNECTX = f f 1,3g,f 1,2,4,6g,f 2,7g,f 3,4,5g,f 5,6,7g g.10:11/
EXAMPLE 10.5
FortheexamplemodelofFigure10.2(a)
GNECT = f f 2g,f 2,5,8g,f 2,5,6g,f 1,8g,f 3,6g,...f 4,7g,f 4g g.10:12/
ThisisalsotheGNECTX forFigure10.2(b).
10–6
10–7
§
10.3 NODE TO NODE CONNECTIONS
§10.3NODETONODECONNECTIONS
§10.3.1TheIndividualNode-NodeList
ThelistofallnodesconnectedtoagivennodeiscalledtheIndividualNode-NodeList,ornNL.All
nodesareidentifiedbyinternalnumbers.Foragivennoden wewritenNL(n).Althoughanodeis
connectedtoitself,n isusuallyexcludedfromthelist.
EXAMPLE 10.6
InthemodelofFigure10.1,node2isconnectedto4othernodes:
nNL(2) = f 1,3,4,5 g.10:13/
EXAMPLE 10.7
InthemodelofFigure10.2(a),node7isconnectedtofourothernodes:
nNL(8) = f 2,4,6,8 g.10:14/
whereasinthemodelofFigure10.2(b),node7isconnectedtosixothernodes:
nNL(8) = f 2,4,6,8,10,11 g.10:15/
becauseofthepresenceoftheMFCelement11.
§10.3.2TheGlobalNodetoNodeConnectionTable
TheGlobalNodetoNodeConnectionTable,orGNNCT,issimplythesequentiallistofallnNLs:
GNNCT = f nNL(1),nNL(2),...nNL(numnod) g.10:16/
ThisdatastructurecanbeconstructeddirectlyfromtheGNECT.SeeFigure10.6.
TheXversion,calledGNNCTX,isobtainedbystartingfromtheGNECTX;thisversionignores
connectionsduetoMFCs.
EXAMPLE 10.8
FortheexamplemodelofFigure10.1
GNNCT = f f 2,4g,f 1,3,4,5g,f 2,5g,f 1,2,5g,f 2,3,4g g.10:17/
TheGNNCTX isidentical.
10
–
7
Chapter 10:GLOBAL CONNECTIVITY
10–8
Element to
Element
Connection
Table
Node to
Node
Connection
Table
Global Node
to Element
Connection
Table
Figure10.6.Schematicsoftheconstruction
oftheGNNCT andGEECT connectiondatastructures.
EXAMPLE 10.9
FortheexamplemodelofFigure10.1(b)
GNNCT = f f 2,3g,f 1,3,7,8,9g,f 1,2,5,8,9,10g,...f 12,13,14g g.10:18/
TheGNNCTX isdifferentintheeNLsofnodes7through10.
REMARK 10.2
TheGNNCT configurationillustratedintheaboveexamplerecordseachconnectionrelationbetweentwonodes
ni andnj twice,onceinnNL(ni) andagaininnNL(nj).Itispossibletoeliminatethisredundancyby
recordinginnNL(n) onlytheinternalnodessmaller(orgreater)thann.AlthoughthiscutsdownontheGNNCT
storagebyonehalf,itmayleadtoprocessinginefficienciesinsomeoperations.
§10.4ELEMENTTOELEMENTCONNECTIONS
§10.4.1TheIndividualElement-ElementList
Forsomesparsematrixalgorithmsitisusefultohavethelistofallelementsconnectedtoagiven
element.ThisiscalledtheIndividualElement-ElementListoreEL.Internalnumbersareusedfor
allelements.Forelemente wewriteeEL(e).Althoughanelementisbydefinitionconnectedto
itself,e isusuallyexcludedfromthelist.
EXAMPLE 10.10
InthemodelofFigure10.1,element1isconnectedtotwootherelements:
eEL(1) = f 2,3 g.10:19/
EXAMPLE 10.11
InthemodelofFigure10.2(a),element6isconnectedtofiveotherelements:
eEL(6) = f 2,3,5,7,10g.10:20/
InthemodelofFigure10.2(b),theMultifreedomConstraintelement11isconnectedtofourotherelements:
eEL(11) = f 1,3,6,8g.10:21/
10–8
10–9§
10.5 IMPLEMENTATION OF GLOBAL CONNECTION TABLE CONSTRUCTION
§10.4.2TheGlobalElementtoElementConnectionTable
TheGlobalElementtoElementConnectionTable,orGEECT,issimplythesequentiallistofall
IndividualElement-ElementLists::
GEECT = f eEL(1),eEL(2),...eEL(numele) g.10:22/
ThisdatastructureiseasilyconstructedfromtheGNECT.SeeFigure10.5.TheXversion,called
GEECTX,isobtainedbystartingfromtheGNECTX.
EXAMPLE 10.12
InthemodelofFigure10.1,
GEECT D f f 2,3,4,6g,f 1,4,6,7g,f 1,4,5,8,9g,f 1,2,3,5,6,8,9g,f 3,4,6,7,8,9g,
f 1,2,4,5,7,8,9g,f 2,5,6,8,9g,f 3,4,5,6,7,9g,f 3,4,5,6,7,8g g
.10:23/
GEECTX D f f 2,3,4,6g,f 1,4,6,7g,f 1,4,5g,f 1,2,3,5,6g,f 3,4,6,7g,
f 1,2,4,5,7g,f 2,5,6g,f g,f g g
.10:24/
EXAMPLE 10.13
IntheexamplemodelofFigure10.1(a)therearetenelements,and
GEECT = f f 8g,f 5,6,8g,...f 4,5,6,7,8,9g g.10:25/
§10.5IMPLEMENTATIONOFGLOBALCONNECTIONTABLECONSTRUCTION
ThissectionlistsseveralmodulesthatbuiltGlobalConnectionTables.Modulesareroughlylisted
intheirorderofappearanceintheMathematica fileGlobalConnectionTables.ma.
§10.5.1BuildingtheGlobalElementToNodeConnectionTable
ModuleMakeGlobalNodeToElementConnectionTable,listedinCell10.1,buildstheGlobal
ElementToNodeConnectionTableorGENCT.
ModuleMakeGlobalElementToNodeConnectionTableX,alsolistedinthatCell,buildstheX
versionorGENCTX,whicheXcludesnodesofMFCelements.Moreprecisely,ife isanMFC
element,eNL(e) isconsideredempty.TheXversionisusefulforcertainpre-skylineoperations
whenMFCsaretreatedviaLagrangemultipliers.BothmodulesreceiveasargumentsMEDT and
MNDT andreturntheconnectiontableasfunctionvalue.
ThismoduleisexercisedbytheteststatementsshowninCell10.1,whichpertaintothebeam-bar
structureof§7.6,augmentedwiththetwoconstraints(7.19)betweenfreedomsatnodes4and5.
ThisstructureisreproducedinFigure10.6forconvenience.
ThetestoutputofbothversionsislistedinCell10.2.NotethatinthesecondformofGENCT element
8,whichistheinternalnumberoftheMFC,hasanemptyeNL.
10–9
Chapter 10:GLOBAL CONNECTIVITY
10–10
Cell10.1MakingtheGlobalElementToNodeConnectionTable
MakeGlobalElementToNodeConnectionTable[MEDT_,MNDT_]:= Module[
{e,eNLf,GENCT,k,n,numele=Length[MEDT],numnod=Length[MNDT],Nx2i,xn},
GENCT=Table[{},{numele}];k=0;
Do [k=Max[k,MNDT[[n,1]]],{n,1,numnod}];Nx2i=Table[0,{k}];
Do [xn=MNDT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
Do [eNLf=Flatten[MEDT[[e,3]]];
Do [xn=eNLf[[i]];If[xn>0,eNLf[[i]]=Nx2i[[xn]]],
{i,1,Length[eNLf]}];GENCT[[e]]=InsertionSort[eNLf],
{e,1,numele}];
Return[GENCT]
];
MakeGlobalElementToNodeConnectionTableX[MEDT_,MNDT_]:= Module[
{e,eNLf,GENCT,k,n,numele=Length[MEDT],numnod=Length[MNDT],Nx2i,xn},
GENCT=Table[{},{numele}];k=0;
Do [k=Max[k,MNDT[[n,1]]],{n,1,numnod}];Nx2i=Table[0,{k}];
Do [xn=MNDT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
Do [If [MEDT[[e,2,1]]=="MFC",Continue[]];
eNLf=Flatten[MEDT[[e,3]]];
Do [xn=eNLf[[i]];If[xn>0,eNLf[[i]]=Nx2i[[xn]]],
{i,1,Length[eNLf]}];GENCT[[e]]=InsertionSort[eNLf],
{e,1,numele}];
Return[GENCT]
];
MNDT= {{1,{0,0,0}},{2,{5,0,0}},{3,{10,0,0}},{4,{-3,3,0}},{5,{-3,7,0}}};
MEDT= {{"Beam.1",{"Beam2D.2",2},{{1,2},{},{},{}},{1,1}},
{"Beam.2",{"Beam2D.2",2},{{2,3},{},{},{}},{1,1}},
{"Bar.1",{"Bar.2D",1},{{1,4},{},{},{}},{2,2}},
{"Bar.2",{"Bar.2D",1},{{2,4},{},{},{}},{2,2}},
{"Bar.3",{"Bar.2D",1},{{4,5},{},{},{}},{2,2}},
{"Bar.4",{"Bar.2D",1},{{2,5},{},{},{}},{2,2}},
{"Bar.5",{"Bar.2D",1},{{3,5},{},{},{}},{2,2}},
{"MFC.1",{"MFC",3},{{4,5},{},{},{}},{0,3}},
{"MFC.2",{"MFC",3},{{4,5},{},{},{}},{0,4}}};
GENCT=MakeGlobalElementToNodeConnectionTable[MEDT,MNDT];
Print["GENCT=",GENCT];
GENCTX=MakeGlobalElementToNodeConnectionTableX[MEDT,MNDT];
Print["GENCTX=",GENCTX];
Cell10.2OutputfromtheProgramofCell10.1
GENCT= {{1,2},{2,3},{1,4},{2,4},{4,5},{2,5},{3,5},
{4,5},{4,5}}
GENCTX={{1,2},{2,3},{1,4},{2,4},{4,5},{2,5},{3,5},{},{}}
10–10
10–11§
10.5 IMPLEMENTATION OF GLOBAL CONNECTION TABLE CONSTRUCTION
Cell10.3MakingtheGlobalNodeToElementConnectionTable
MakeGlobalNodeToElementConnectionTable[GENCT_,MNDT_]:= Module[
{e,eNL,found,GNECT,lenenl,lennel,
i,j,n,nEL,numele=Length[GENCT],numnod=Length[MNDT]},
GNECT=Table[{},{numnod}];
Do [eNL=GENCT[[e]];lenenl=Length[eNL];
Do [n=eNL[[i]];If [n<=0,Continue[]];
nEL=GNECT[[n]];lennel=Length[nEL];found=False;
Do [If [e==nEL[[j]],found=True;Break[]],{j,1,lennel}];
If [found,Continue[]];
If [lennel==0,GNECT[[n]]={e},AppendTo[GNECT[[n]],e] ],
{i,1,lenenl}],
{e,1,numele}];
(*Do [GNECT[[n]]=InsertionSort[GNECT[[n]]],
{n,1,numnod}];*) (* not needed I think *)
Return[GNECT]
];
MNDT= {{1,{0,0,0}},{2,{5,0,0}},{3,{10,0,0}},{4,{-3,3,0}},{5,{-3,7,0}}};
GENCT= {{1,2},{2,3},{1,4},{2,4},{4,5},{2,5},{3,5},{4,5},{4,5}};
GNECT=MakeGlobalNodeToElementConnectionTable[GENCT,MNDT];
Print["GNECT=",GNECT//InputForm];
GENCTX={{1,2},{2,3},{1,4},{2,4},{4,5},{2,5},{3,5},{},{}};
GNECTX=MakeGlobalNodeToElementConnectionTable[GENCTX,MNDT];
Print["GNECTX=",GNECTX//InputForm];
Cell10.4OutputfromtheProgramofCell10.3
GNECT= {{1,3},{1,2,4,6},{2,7},{3,4,5,8,9},{5,6,7,8,9}}
GNECTX={{1,3},{1,2,4,6},{2,7},{3,4,5},{5,6,7}}
§10.5.2BuildingtheGlobalNodeToElementConnectionTable
ModuleMakeGlobalNodeToElementConnectionTable,listedinCell10.3,receivesasargu-
mentsGENCT andMNDT andreturnstheGlobalNodeToElementConnectionTableorGNECT.
ToproducetheXversionofthistable,simplysupplyGENCTX,producedbyMakeGlobalElementToNodeConnec
t
asfirstargument.
ThismoduleisexercisedbytheteststatementsshowninCell10.3.ThetestoutputislistedinCell
10.4.
§10.5.3ConstructionoftheGlobalNodeToNodeConnectionTable
10–11
Chapter 10:GLOBAL CONNECTIVITY
10–12
Cell10.5MakingtheGlobalNodeToNodeConnectionTable
MakeGlobalNodeToNodeConnectionTable[GNECT_,GENCT_]:= Module[
{e,ee,eNL,found,i,j,GNNCT,lenenl,lennel,lennnl,n,nn,
nEL,nNL,numele=Length[GENCT],numnod=Length[GNECT]},
GNNCT=Table[{},{numnod}];
Do [nEL=GNECT[[nn]];lennel=Length[nEL];
Do [e=nEL[[ee]];eNL=GENCT[[e]];lenenl=Length[eNL];
Do [n=eNL[[i]];nNL=GNNCT[[nn]];lennnl=Length[nNL];
If [n==nn,Continue[]];found=False;
Do [If [n==nNL[[j]],found=True;Break[]],{j,1,lennnl}];
If [found,Continue[]];
If [lennnl==0,GNNCT[[nn]]={n},AppendTo[GNNCT[[nn]],n]],
{i,1,lenenl}],
{ee,1,lennel}];
GNNCT[[nn]]=InsertionSort[GNNCT[[nn]]],
{nn,1,numnod}];
Return[GNNCT]
];
GENCT= {{1,2},{2,3},{1,4},{2,4},{4,5},{2,5},{3,5},{4,5},{4,5}};
GNECT= {{1,3},{1,2,4,6},{2,7},{3,4,5,8,9},{5,6,7,8,9}};
GNNCT=MakeGlobalNodeToNodeConnectionTable[GNECT,GENCT];
Print["GNNCT=",GNNCT];
GENCTX={{1,2},{2,3},{1,4},{2,4},{4,5},{2,5},{3,5},{},{}};
GNECTX={{1,3},{1,2,4,6},{2,7},{3,4,5},{5,6,7}};
GNNCTX=MakeGlobalNodeToNodeConnectionTable[GNECTX,GENCTX];
Print["GNNCTX=",GNNCTX];
Cell10.6OutputfromtheProgramofCell10.5
GNNCT= {{2,4},{1,3,4,5},{2,5},{1,2,5},{2,3,4}}
GNNCTX={{2,4},{1,3,4,5},{2,5},{1,2,5},{2,3,4}}
ModuleMakeGlobalNodeToNodeToConnectionTable,listedinCell10.3,receivesasarguments
GENCT andGNECT andreturnstheGlobalNodeToNodeConnectionTableorGNNCT.
ToproducetheXversion,supplytheXversionsofGENCT andGNECT asargumentstothismodule.
ThismoduleisexercisedbytheteststatementsshowninCell10.5.ThetestoutputislistedinCell
10.6.
10–12
10–13§
10.5 IMPLEMENTATION OF GLOBAL CONNECTION TABLE CONSTRUCTION
Cell10.7MakingtheGlobalElementToElementConnectionTable
MakeGlobalElementToElementConnectionTable[GNECT_,GENCT_]:= Module[
{e,ee,eEL,found,GEECT,i,j,leneEL,lenenl,lennel,n,nn,nEL,
numnod=Length[GNECT],numele=Length[GENCT]},
GEECT=Table[{},{numele}];
Do [eNL=GENCT[[ee]];lenenl=Length[eNL];
Do [n=eNL[[nn]];nEL=GNECT[[n]];lennel=Length[nEL];
Do [e=nEL[[i]];eEL=GEECT[[ee]];leneEL=Length[eEL];
If [e==ee,Continue[]];found=False;
Do [If [e==eEL[[j]],found=True;Break[]],{j,1,leneEL}];
If [found,Continue[]];
If [leneEL==0,GEECT[[ee]]={e},AppendTo[GEECT[[ee]],e]],
{i,1,lennel}],
{nn,1,lenenl}];
GEECT[[ee]]=InsertionSort[GEECT[[ee]]],
{ee,1,numele}];
Return[GEECT]
];
GENCT= {{1,2},{2,3},{1,4},{2,4},{4,5},{2,5},{3,5},{4,5},{4,5}};
GNECT= {{1,3},{1,2,4,6},{2,7},{3,4,5,8,9},{5,6,7,8,9}};
GEECT=MakeGlobalElementToElementConnectionTable[GNECT,GENCT];
Print["GEECT=",GEECT];
GENCTX={{1,2},{2,3},{1,4},{2,4},{4,5},{2,5},{3,5},{},{}};
GNECTX={{1,3},{1,2,4,6},{2,7},{3,4,5},{5,6,7}};
GEECTX=MakeGlobalElementToElementConnectionTable[GNECTX,GENCTX];
Print["GEECTX=",GEECTX];
Cell10.8OutputfromtheProgramofCell10.7
GEECT= {{2,3,4,6},{1,4,6,7},{1,4,5,8,9},
{1,2,3,5,6,8,9},{3,4,6,7,8,9},{1,2,4,5,7,8,9},
{2,5,6,8,9},{3,4,5,6,7,9},{3,4,5,6,7,8}}
GEECTX={{2,3,4,6},{1,4,6,7},{1,4,5},{1,2,3,5,6},
{3,4,6,7},{1,2,4,5,7},{2,5,6},{},{}}
§10.5.4ConstructionoftheGlobalElementToElementConnectionTable
ModuleMakeGlobalElementToElementToConnectionTable,listedinCell10.3,receivesas
argumentsGENCT andGNECT andreturnstheGEECT.ToproducetheXversion,supplyXversions
ofGENCT andGNECT asarguments.
10–13
Chapter 10:GLOBAL CONNECTIVITY
10–14
Cell10.9InsertionSortUtility
InsertionSort[b_]:= Module[ {i,ii,j,jump,n,aj,a},
n=Length[b];a=b;
Do [aj=a[[j]];jump=False;
Do [i=ii;If [a[[i]]<aj,jump=True;Break[],
a[[i+1]]=a[[i]]],{ii,j-1,1,-1}];
If [Not[jump],i=0];a[[i+1]]=aj,
{j,2,n}];
Return[a];
];
Print[InsertionSort[{9,3,2,1,0,5,7,8,4,6}]];
Cell10.10OutputfromtheProgramofCell10.9
{0,1,2,3,4,5,6,7,8,9}
ThismoduleisexercisedbytheteststatementsshowninCell10.7.ThetestoutputislistedinCell
10.8.
10–14
10–15§
10.5 IMPLEMENTATION OF GLOBAL CONNECTION TABLE CONSTRUCTION
§10.5.5SortUtility
UitilitymoduleInsertionSort,listedinCell10.9,sortsitsintegerargumentlistinascending
sequenceusingtheinsertionsortalgorithm.
ThisfunctionisusedbythemodulesMakeGlobalElementToNodeConnectionTable and
MakeGlobalElementToNodeConnectionTableX tosorttheIndividualElementNodeLists.Itis
anefficientsortmethodforshortlists,asisthecasewiththeeNLs.
ThisutilitymoduleisexercisedbytheteststatementshowninCell10.9.Thetestoutputislisted
inCell10.10.
10–15
-
11
Pre-Skyline
Processing
11–1
Chapter 11:PRE-SKYLINE PROCESSING
11–2
ThisChapterdescribestheconstructionofdatastructuresthatsupportaskylinesparse-storage
arrangementtosolvethefiniteelementequations.Sincethesedatastructuresalsoinfluencethe
assemblyofthemasterstiffnessequation,presentationatthisstageisappropriate.Theformation
ofthedatastructuresreceivesthenamepre-skylineprocessingorPSP.
§11.1GENERALDESCRIPTION
TheGlobalConnectionTablesdescribedinChapter10areusefulasstartingpointsforanysolution
process,insequentialorparallelmachines,usingeitherdirectanditerativesolvers.
ThepresentimplementationofMathFETassumesthataskyline(alsocalledprofile)solverisused
forsequentialprocessing.Thealgorithmicdetailsofthatsolutionprocedurearepresentedinthe
followingChapter.Hereweareconcernedwithapreparatorystage,calledpre-skylineprocessing
orPSP,thatdefinesthestoragearrangementforthemasterstiffnessequations.
PSPstartsfromtheGlobalNodeToNodeConnectionTableorGNNCT describedin10.4,andbuilds
severaldatastructuresalongtheway.Threeofthemarenodebased,one(formedifthereareMFCs
treatedbyLagrangemultipliers)ismultiplierbased,andthelastone,calledtheGlobalSkyline
DiagonalLocationTableorGSDLT isfreedombased.TheGSDLT representsthefinalresultofthe
PSPinthatitcompletelydefinestheconfigurationofasymmetricskylinematrix.Acoupleofother
freedomaddresstables,withacronymsGNFAT andGMFAT,areusefulintheassemblyprocess.
Thefourdatastructuresarepresentedasone-level(flat)lists,whichreflectstheirimplementation
inMathematica.InalowerlevellanguagesuchasCorFortrantheyshouldbeimplementedas
integerarraysforcomputationalefficiency.
TheexamplestructuresintroducedinpreviousChapters,onecontinuousandtheotherskeletal,are
againusedforillustration.TheyarereproducedinFigures11.1and11.2forconvenienceofthe
reader.
§11.2THEGLOBALNODEBANDWIDTHTABLE
TheGlobalNodeBandwidthTable,orGNBT isanintegerlistwithnumnod entries.Givenanode
withinternalnumbern,letnlow bethelowestinternalnodenumberconnectedton,includingn
itself.ThensetGNBT(n)=nlow.
ThisdatastructureobviouslyisasubsetoftheinformationinGNNCT.Itmaybeeasilyformedfrom
theGNNCT ifavailable,orindirectlystartingfromthemasterelementandnodedefinitiontables.
Theimplementationdisplayedin§11.4assumestheformercase.
ThereisasecondversionoftheGNBT,knownasthe“eXcludedMFCversion”or“Xversion”,
whichisabbreviatedtoGNBTX.ThisversionignoresnodeconnectivitiesduetoMFCs,andmustbe
usediftheMFCsaretreatedbyLagrangemultipliers,asinthepresentimplementationofMathFET.
ItisgeneratedbystartingfromtheGNNCTX assourcetable.
EXAMPLE 11.1
FortheskeletalstructureofFigure11.1,
GNBT=f 1,1,2,1,2g.11:1/
11
–
2
11–3§
11.3 THE GLOBAL NODE FREEDOM COUNT TABLE
Beam.1
Beam.2
Bar.1
Bar.2
Bar.3
Bar.4
Bar.5
1
23
4
5
(a)
(b)
(1)
(2)
(3)
(5)
(4)
(6)
(7)
(8): MFC
(9): MFC
u
x4
=u
x5
u
y4
=u
y5
Figure11.1.ExampleskeletalstructurewithtwoMFCsconnectingnodes4and5.
Externalandinternalnodenumbercoincide.Internal
elementnumbersareshowninparenthesisalongsideelementnames.
MFC (11)
(1)
(2)
(5)
(10)
(9)
(4)
(7)
(8)
(6)
(3)
6
4
2
1
3
5
7
8
9
10
11
12
13
14
15
(1)
(2)
(5)
(10)
(9)
(4)
(7)
(8)
(6)
(3)
6
4
2
1
3
5
7
8
9
10
11
12
13
14
15
(a)(b)
Figure11.2.Examplecontinuumstructuralmodel:(a)contains
onlystandardplanestresselements,whereas(b)hasaMFC,
labeledaselement11,thatlinksfreedomsofnodes6,7,8and9.
InthiscasetheGNBTX isidenticaltotheGNCT becausetheMFCsconnectnodes4and5,whicharealsolinked
byabarmemberanyway.
EXAMPLE 11.2
ForthecontinuumstructureofFigure11.2(a),
GNBT=f 1,1,1,2,3,4,5,2,3,2,3,10,12,10,10,12g.11:2/
REMARK 11.1
IfMFCsaretreatedbypenaltyfunctions,theMFCsshouldbeconsideredasdirectnodeconnectors,andthe
standardGNBT used.
11–3
Chapter 11:PRE-SKYLINE PROCESSING
11–4
§11.3THEGLOBALNODEFREEDOMCOUNTTABLE
TheGlobalNodeFreedomCountTable,orGNFCT,holdsthenumberofdegreesoffreedomassigned
ateachnode.Thecountignoresactivity.
EXAMPLE 11.3
FortheskeletalstructureofFigure11.1,
GNFCT = f 3,3,3,2,2g.11:3/
EXAMPLE 11.4
IfthemodelofFigure11.2representsaplanestressidealization,all15entriesofGNFCT are2.Ifitisa
plate-bendingidealizationallentriesare3.Ifitisashellstructureallentriesareeither5or6,dependingon
thedegreesoffreedomconfigurationofthemembranecomponent.
REMARK 11.2
Thefreedom-countinformationiscarriedintheMNFT,asthirditemofeachnFL.Consequentlythisdata
structureisredundantifMNFT isavailable,andinfactisnotusedinthepresentimplementationofMathFET
asaseparateentity.Itispresentedhereforinstructionalconvenience.
§11.4THEGLOBALFREEDOMADDRESSTABLES
GlobalFreedomAddressTablessupplybaseaddressesforaccessingassembledequationsfrom
nodeandmultiplierindices.Therearetwotablesofthisnature.Oneisassociatedwithnodes,and
alwaysexists.Theotherisassociatedwithmultipliers,andexistsonlyifthereareMFCsandthese
aretreatedwithLagrangemultipliers.
§11.4.1TheGlobalNodeFreedomAddressTable
TheGlobalNodeFreedomAddressTable,orGNFAT,suppliesbaseaddressesforcalculationof
globalfreedomaddressesfromnodalinformation.Theglobaladdressofthej
th
assignedfreedom
atnoden isGNFAT(n)+j forj = 1,2,...GNFCT(n).Thetableactuallycontainsnumnod+1
entries.Thelastentryissetas:GNFAT(numnod+1)=numdof,wherenumdof isthetotalnumberof
assignedfredoms.
ThetableisconstructedbysimplyaccumulatingtheentriesofGNFCT,astheexamplebelow
illustrates.
Thistable,inconjunctionwithGNFCT,isoffundamentalimportanceintheassembly ofthemaster
stifnessequationsfortheDirectStiffnessMethod.
EXAMPLE 11.5
TheskeletalexamplestructureofFigure11.1hasfivenodes.ConsequentlytheGNFAT containssixentries:
GNFAT = f 0,3,6,9,11,13 g.11:4/
Thisiseasilybuiltfrom(11.3).
11
–
4
11–5§
11.5 THE GLOBAL SKYLINE DIAGONAL LOCATION TABLE
EXAMPLE 11.6
ForthecontinuumstructureofFigure11.2andassumingtwofreedomspernode:
GNFAT = f 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30g.11:5/
§11.4.2TheGlobalMultiplierFreedomAddressTable
ThisdatastructureisonlygeneratedwhenthereareMultiFreedomConstraintstreatedwithLagrange
multipliers,asinthepresentMathFETimplementation.Iftherearenomultipliersthistableisempty.
TheGlobalMultiplierFreedomAddressTable,orGMFAT,suppliesinformationforcalculationof
globalfreedomaddressesgiventwopiecesofinformation:themultiplierindexandthefreedom
index.Iftherearenummul>0 Lagrangemultipliers,theconfigurationoftheGMFAT is
f mFA(1),...mFA(nummul) g.11:6/
wheremFAareIndividualMultiplierFreedomAddresslists.Ifthem
th
multiplierinvolveskfreedoms,
mFA(m) = f j1,j2,...jk g.11:7/
wherej1,j2,...aretheglobalfreedomaddressescalculatedthroughtheGNFAT,sortedin
ascendingorder.
EXAMPLE 11.7
FortheskeletalexamplestructureofFigure11.1,whichhastwoconstraints:
GMFAT = f f 10,12g,f 11,13g g.11:8/
Explanationforthefirstconstraint,whichistx(4)=tx(5).Thisinvolvestwofreedomstx(4) andtx(5),
whoseglobaladdressesareGNFAT(4)+1=10 andGNFAT(5)+1=12,respectively;see(11.4).Likewiseforthe
secondconstraintty(4)=ty(5).
§11.5THEGLOBALSKYLINEDIAGONALLOCATIONTABLE
TheGlobalSkylineDiagonalLocationTableorGSDLT containsthediagonaladdressesofasym-
metricsparsematrixstoredinaone-dimensionalskylinearray.Hereonlytheconfigurationof
GMDLT willbeexplainedinenoughdetailtopermititsconstruction.Furtherdetailsasregardsthe
assemblyandsolutionofthemasterstiffnessequationsareprovidedinsubsequentChapters.
§11.5.1TheGlobalEquations
ThepresentimplementationofMathFET treatsMultiFreedomConstraints(MFCs)byLagrange
multipliers.Thesemultipliersareplacedatthebottomofthesolutionvector.Thisleadstomaster
stiffnessequationsoftheform
11–5
Chapter 11:PRE-SKYLINE PROCESSING
11–6
·
KC
T
C0
¸·
u
¸
¸
D
·
f
g
¸
.11:9/
wherethesecondmatrixequation:C¸ D grepresentstheMFCs.Thisoverallequationfitsthe
form
AxD b.11:10/
whereAisasymmetricsparsematrix.Thismatrixisstoredinaskylinesparseformatdescribedin
detailinthefollowingChapter.
§11.5.2ConfigurationoftheGSDLT
TheGSDLT receivestheaddressesofthediagonalsofA.Itcontainsnumdof+nummul+1 entries,
wherenumdof isthetotalnumberofassigneddegreesoffreedomandnummul thenumberof
Lagrangemultipliers.Thefirstentry,GSDLT(1),isconventionallyzero.
LetA(i,j) bethe(i,j)
th
entryofAfortheglobalmodel.Iftheentryisinsidetheskyline,itis
locatedataddressS(k),k = GSDLT(i+1)+(j-i);elsetheentryiszero.Thistable(actuallyan
array)isbuiltfromthethreepreviousdatastructures.
IfthereareMFCs,alookat(11.9)showsthatGSDLT splitsintotwoparts.Thefirstparthas
numdof+1 entriesandtracksthediagonallocationsofK.ThisiscalledthenodalpartofGSLDT
becauseitisassociateddirectlywithnodalfreedoms.Thesecondpartcontainsnummul entriesand
keepstrackoftheremainingdiagonallocations.ThisiscalledthemultiplierpartofGSLDT because
itisassociatedwiththe¸ portionofthesolutionvector.
ItfollowsthatingeneraltheGSDLT isconstructedintwophases:
1.ThenodalpartofGSDLT isconstructedfromtheinformationinGNBT andGNFAT.
2.IfthereareMFCs,themultiplierportionisconstructedfrominformationinGNFAT andGMFAT.
Algorithmicproceduresaredescribedintheimplementationsectionbelow.
EXAMPLE 11.8
FortheskeletalstructureofFigure11.1
GSDLT = f 0,1,3,6,10,15,21,25,30,36,46,57,66,76,81,86 g.11:11/
Thefirst13+1=14entriesarethenodalpartoftheGSDLT.Entries15and16pertaintothemultiplierpart.
§11.6IMPLEMENTATIONOFGLOBALCONNECTIONTABLECONSTRUCTION
Thissectionlistsseveralmodulesthatbuiltthepre-skylinedatastructures.Modulesareroughly
listedintheirorderofappearanceintheMathematica filePreSkyTables.ma.
11–6
11–7§
11.6 IMPLEMENTATION OF GLOBAL CONNECTION TABLE CONSTRUCTION
Cell11.1MakingtheGlobalNodeBandwidthTable
MakeGlobalNodeBandwidthTable[GNNCT_]:= Module[
{GNBT,n,nlow,numnod=Length[GNNCT]},
GNBT=Table[0,{numnod}];
Do [If [Length[GNNCT[[n]]]==0,nlow=n,nlow=Min[n,GNNCT[[n]]]];
GNBT[[n]]=nlow,
{n,1,numnod}];
Return[GNBT]
];
GNNCTX= {{2,4},{1,3,4,5},{2,5},{1,2,5},{2,3,4}};
GNBTX=MakeGlobalNodeBandwidthTable[GNNCTX];Print["GNBTX=",GNBTX];
Cell11.2OutputfromtheProgramofCell11.1
GNBTX= {1,1,2,1,2}
§11.6.1BuildingtheNodeBandwidthTable
ModuleMakeGlobalNodeBandwidthTable,listedinCell11.1,buildstheGlobalNodeBandwidth
TableorGNBT fromtheGNNCT.
ToproducetheXversionofthistableorGNBTX,whichignoresMFCconnections,useGNNCTX as
inputargument.TheXversionistheoneneededforMathFET.
ThismoduleisexercisedbytheteststatementsshowninCell11.1,whichpertaintotheexample
structureofFigure11.1.
§11.6.2BuildingtheGlobalFreedomAddressTable
ModuleMakeGlobalNodeFreedomAddressTable,listedinCell11.3,receivesasargumentsMNFT
andreturnstheGlobalNodeFreedomAddressTableorGNFAT.
ThismoduleisexercisedbytheteststatementsshowninCell11.3.ThetestoutputislistedinCell
11.4.
§11.6.3BuildingtheGlobalMultiplierFreedomAddressTable
ModuleMakeGlobalMultiplierFreedomAddressTable,listedinCell11.3,receivesasargu-
mentsMMFT,MNDT andGNFAT,andreturnstheGlobalMultiplierFreedomAddressTableorGMFAT.
ThismoduleisexercisedbytheteststatementsshowninCell11.5.ThetestoutputislistedinCell
11.6.
11–7
Chapter 11:PRE-SKYLINE PROCESSING
11–8
Cell11.3MakingtheGlobalNodeFreedomAddressTable
MakeGlobalNodeFreedomAddressTable[MNFT_]:= Module[
{c,GNFAT,n,numnod=Length[MNFT]},
GNFAT=Table[0,{numnod+1}];
Do [If [Length[MNFT[[n]]]==0,Continue[]];c=MNFT[[n,3]];
GNFAT[[n+1]]=GNFAT[[n]]+c,
{n,1,numnod}];
Return[GNFAT]
];
MNFT={{1,110001,3,{}},{1,110001,3,{}},{1,110001,3,{}},{1,110000,2,{}},
{1,110000,2,{}}};
GNFAT=MakeGlobalNodeFreedomAddressTable[MNFT];
Print["GNFAT=",GNFAT//InputForm];
Cell11.4OutputfromtheProgramofCell11.3
GNFAT={0,3,6,9,11,13}
Cell11.5MakingtheGlobalMultiplierFreedomAddressTable
MakeGlobalMultiplierFreedomAddressTable[MMFT_,MNDT_,GNFAT_]:= Module[
{coef,e,GMFAT,i,j,k,lenmCL,m,mCL,mf,n,
nummul=Length[MMFT],numnod=Length[MNDT],Nx2i,xn},
GMFAT=Table[{},{nummul}];k=0;
Do [k=Max[k,MNDT[[n,1]]],{n,1,numnod}];Nx2i=Table[0,{k}];
Do [xn=MNDT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
Do [mCL=MMFT[[m,2]];lenmCL=Length[mCL];
mf=Table[0,{lenmCL}];
Do [{xn,j,coef}=mCL[[i]];n=Nx2i[[xn]];mf[[i]]=GNFAT[[n]]+j,
{i,1,lenmCL}];
GMFAT[[m]]=InsertionSort[mf],
{m,1,nummul}];
Return[GMFAT]
];
MMFT={{8,{{4,1,1},{5,1,-1}}},{9,{{4,2,1},{5,2,-1}}}};
MNDT= {{1,{0,0,0}},{2,{5,0,0}},{3,{10,0,0}},{4,{-3,3,0}},{5,{-3,7,0}}};
GNFAT={0,3,6,9,11,13};
GMFAT=MakeGlobalMultiplierFreedomAddressTable[MMFT,MNDT,GNFAT];
Print["GMFAT=",GMFAT//InputForm];
11–8
11–9§
11.6 IMPLEMENTATION OF GLOBAL CONNECTION TABLE CONSTRUCTION
Cell11.6OutputfromtheProgramofCell11.5
GMFAT={{10,12},{11,13}}
Cell11.7MakingtheNodalPartoftheGlobalSkylineDiagonalLocationTable
MakeNPartOfGlobalSkymatrixDiagonalLocationTable[GNBT_,GNFAT_]:= Module[
{c,GSDLT,i,j,k,n,nn,numdof,numnod=Length[GNBT]},
numdof=GNFAT[[numnod+1]];GSDLT=Table[0,{numdof+1}];
Do [c=GNFAT[[n+1]]-GNFAT[[n]];nn=GNBT[[n]];
k=GNFAT[[nn]];m=GNFAT[[n]];
Do [GSDLT[[m+i+1]]=GSDLT[[m+i]]+m-k+i,{i,1,c}],
{n,1,numnod}];
Return[GSDLT]
];
GNBTX= {1,1,2,1,2};
GNFAT= {0,3,6,9,11,13};
GSDLTX=MakeNPartOfGlobalSkymatrixDiagonalLocationTable[GNBTX,GNFAT];
Print["GSDLTX=",GSDLTX//InputForm];
Cell11.8OutputfromtheProgramofCell11.7
GSDLTX={0,1,3,6,10,15,21,25,30,36,46,57,66,76}
§11.6.4BuildingtheNodalPartoftheGlobalSkylineDiagonalLocationTable
ModuleMakeNPartOfGlobalSkylineDiagonalLocationTable,listedinCell11.7,receivesas
argumentsGNBTX andGNFAT andreturnsthenodalpartoftheGlobalSkylineDiagonalLocation
Table.ThisiscalledGSDLTX toemphasizethatitexcludesMFCs.Inthisregardnotethatthefirst
argumentmustbeGNBTX andnotGNBT.
ThismoduleisexercisedbytheteststatementsshowninCell11.7.ThetestoutputislistedinCell
11.8.
§11.6.5BuildingtheMultiplierPartoftheGlobalSkylineDiagonalLocationTable
ModuleMakeMPartOfGlobalSkylineDiagonalLocationTable,listedinCell11.9,receivesas
argumentsGSDLTX andGMFAT,whereGSDLTX isproducedbythemoduledescribedintheprevious
subsection.Itproceedstoappendthemultiplier-relatedportionofthediagonallocationsofthe
11–9
Chapter 11:PRE-SKYLINE PROCESSING
11–10
Cell11.9MakingtheMultiplierPartoftheGlobalSkylineDiagonalLocationTable
MakeMPartOfGlobalSkymatrixDiagonalLocationTable[GSDLTX_,GMFAT_]:=
Module[{k,m,numdof,nummul=Length[GMFAT],p},
If [nummul==0,Return[GSDLTX]];
numdof=Length[GSDLTX]-1;p=Join[GSDLTX,Table[0,{nummul}]];
Do [k=numdof+m;p[[k+1]]=p[[k]]+k-GMFAT[[m,1]]+1,
{m,1,nummul}];
Return[p]
];
GMFAT= {{10,12},{11,13}};
GSDLTX= {0,1,3,6,10,15,21,25,30,36,46,57,66,76};
GSDLT=MakeMPartOfGlobalSkymatrixDiagonalLocationTable[GSDLTX,GMFAT];
Print["GSDLT=",GSDLT//InputForm];
numdof=Length[GSDLT]-1;numsky=GSDLT[[numdof+1]];
SymmSkyMatrixUpperTriangleMap[{GSDLT,Table[1.,{numsky}]}];
Cell11.10OutputfromtheProgramofCell11.9
GSDLT={0,1,3,6,10,15,21,25,30,36,46,57,66,76,81,86}
1 1 1 1 1 1
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
1 + + + + + + + +
2 + + + + + + +
3 + + + + + +
4 + + + + + + + + + +
5 + + + + + + + + +
6 + + + + + + + +
7 + + + + + + +
8 + + + + + +
9 + + + + +
10 + + + + +
11 + + + + +
12 + + + +
13 + + +
14 + +
15 +
masterequations.ItreturnsthecompleteGlobalSkylineDiagonalLocationTableorGSDLT as
argument.
ThismoduleisexercisedbytheteststatementsshowninCell11.9,whichproducethecomplete
GSDLT forthestructureofFigure11.1.ThetestoutputislistedinCell11.10.Theexpressionof
11–10
11–11§
11.6 IMPLEMENTATION OF GLOBAL CONNECTION TABLE CONSTRUCTION
GSDLT agreeswith(11.11).
AlsoshowninCell11.10isthe“skylinemap”oftheassembled15£15globalcoefficientmatrix
(11.9)fortheexamplestructure.Thisisdonebybuildingafictitiousskymatrixarrayofallones,
andcallingSymmSkyMatrixUpperTriangleMap whichisoneoftheskymatrixutilityroutines
describedinthefollowingChapter.
11–11
-
12
Symmetric
Skyline
Solver
12–1
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–2
§12.1MOTIVATIONFORSPARSESOLVERS
IntheDirectStiffnessMethod(DSM)offiniteelementanalysis,theelementstiffnessmatricesand
consistentnodalforcevectorsareimmediatelyassembledtoformthemasterstiffnessmatrixand
masterforcevector,respectively,bytheprocesscalledmerge.Thebasicrulesthatgovernthemerge
processaredescribedinChapters2through6oftheIFEMcourse.Forsimplicitythedescription
thatfollowsassumesthatnoMultiFreedomConstraints(MFCs)arepresent;theireffectisstudied
in§12.6.
Theendresultoftheassemblyprocessarethemasterstiffnessequations
KuD f.12:1/
whereKisthemasterstiffnessmatrix,fthevectorofnodeforcesanduthevectorornode
displacements.Uponimposingthedisplacementboundaryconditions,thesystem(12.1)issolved
fortheunknownnodedisplacements.ThesolutionconcludesthemainphaseofDSMcomputations.
Inpracticalapplicationstheorderofthestiffnesssystem(12.1)canbequitelarge.Systemsof
order1000to10000areroutinelysolvedincommercialsoftware.Largerones(sayupto100000
equations)arenotuncommonandevenmillionsofequationsarebeingsolvedonsuoercomputers.
InlinearFEManalysisthecostofsolvingthissystemofequationsrapidlyoverwhelmsother
computationalphases.Muchattentionhasthereforegiventomatrixprocessingtechniquesthat
economizestorageandsolutiontimebytakingadvantageofthespecialstructureofthestiffness
matrix.
Themasterforcevectorisstoredasaconventionalone-dimensionalarrayoflengthequaltothe
numberNofdegreesoffreedom.Thisstoragearrangementpresentsnoparticulardifficultieseven
forverylargeproblemsizes.Handlingthemasterstiffnessmatrix,however,presentscomputational
difficulties.
§12.1.1TheCurseofFullness
IfKisstoredandprocessedasifitwereafullmatrix,thestorageandprocessingtimeresources
rapidlybecomesprohibitiveasNincreases.ThisisillustratedinTable12.1,whichsummarizes
thestorageandfactor-timerequirementsforordersND 10
4
,10
5
and10
6
.
Asregardsmemoryneeds,afullsquarematrixstoredwithouttakingadvantageofsymmetry,
requiresstorageforN
2
entries.Ifeachentryisan8-byte,doubleprecisionfloating-pointnumber,
therequiredstorageis8N
2
bytes.Thus,amatrixoforderND 10
4
wouldrequire8£10
8
bytesor
800MegaBytes(MB)forstorage.
ForlargeNthesolutionof(12.1)isdominatedbythefactorizationofK,anoperationdiscussedin
§12.2.ThisoperationrequiresapproximatelyN
3
=6floatingpointoperationunits.[Afloating-point
operationunitisconventionallydefinedasa(multiply,add)pairplusassociatedindexinganddata
movementoperations.]Nowafastworkstationcantypicallydo10
7
oftheseoperationspersecond,
whereasasupercomputermaybeabletosustain10
9
ormore.Thesetimesassumethattheentire
matrixiskeptinhigh-speedmemory;forotherwisetheelapsedtimemayincreasebyfactorsof10or
moreduetoI/Otransferoperations.TheelaspsedtimedestimatedgiveninTable12.1illustratethat
forpresentcomputerresources,ordersabove10
4
wouldposesignificantcomputationaldifficulties.
12–2
12–3§
12.1 MOTIVATION FOR SPARSE SOLVERS
Table12.1Storage&SolutionTimeforaFully-StoredStiffnessMatrix
MatrixStorageFactorFactortimeFactortime
orderN(doubleprec)op.unitsworkstationsupercomputer
10
4
800MB10
12
=63hrs2min
10
5
80GB10
15
=64mos30hrs
10
6
8TB10
18
=6300yrs3yrs
Table12.2Storage&SolutionTimeforaSkylineStoredStiffnessMatrix
AssumingBD
p
N
MatrixStorageFactorFactortimeFactortime
orderN(doubleprec)op.unitsworkstationsupercomputer
10
4
8MB10
8
=25sec0.05sec
10
5
240MB10
10
=28min5sec
10
6
8000MB10
12
=215hrs8min
§12.1.2TheAdvantagesofSparsity
FortunatelyaveryhighpercentageoftheentriesofthemasterstiffnessmatrixKarezero.Such
matricesarecallsparse.Therearecleverprogrammingtechniquesthattakeadvantageofsparsity
thatfitcertainpatterns.Althoughacomprehensivecoverageofsuchtechniquesisbeyondthescope
ofthiscourse,weshallconcentrateonaparticularformofsparseschemethatiswidelyuseinFEM
codes:skylinestorage.Thisschemeissimpletounderstand,manageandimplement,whilecutting
storageandprocessingtimesbyordersofmagnitudeastheproblemsgetlarger.
Theskylinestorageformatisageneralizationofitswidelyusedpredecessorcalledthebandstorage
scheme.Amatrixstoredinaccordancewiththeskylineformatwillbecalledaskymatrixforshort.
Onlysymmetricskymatriceswillbveconsideredhere,sincethestiffnessmatricesinlinearFEM
aresymmetric.
IfaskymatrixoforderNcanbestoredinSmemorylocations,theratioBD S=Niscalledthe
meanbandwidth.Iftheentriesare,asusual,8-bytedouble-precisionfloating-pointnumbers,the
storagerequirementis8NBbytes.Thefactorizationofaskymatrixrequiresapproximately
1
2
NB
2
floating-pointoperationunits.Intwo-dimensionalproblemsBisoftheorderof
p
N.Underthis
assumption,storagerequirementsandestimatedfactorizationtimesforND 10
4
,ND 10
5
and
ND 10
6
arereworkedinTable12.2.Itisseenthatbygoingfromfulltoskylinestoragesignificant
reductionsincomputerresourceshavebeenachieved.Forexample,nowND 10
4
iseasyona
workstationandtrivialonasupercomputer.Evenamillionequationsdonotlookfar-fetchedona
supercomputeraslongasenoughmemoryisavailable.
InpreparationforassemblingKasaskymatrixonehastosetupseveralauxiliaryarraysrelatedto
12–3
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–4
nodesandelements.TheseauxiliaryarraysaredescribedinthepreviousChapter.Knowledgeof
thatmaterialisusefulforunderstandingthefollowingdescription.
§12.2SPARSESOLUTIONOFSTIFFNESSEQUATIONS
§12.2.1SkylineStorageFormat
TheskylinestoragearrangementforKisbestillustratedthroughasimpleexample.Considerthe
6£6stiffnessmatrix
KD
2
6
6
6
6
6
6
4
K
11
0K
13
00K
16
K
22
0K
24
00
K
33
K
34
00
K
44
0K
46
K
55
K
56
symmK
66
3
7
7
7
7
7
7
5
.12:2/
Sincethematrixissymmetriconlyonehalf,theuppertriangleintheabovedisplay,needtobe
shown.
NextwedefinetheenvelopeofKasfollows.Fromeachdiagonalentrymoveupthecorresponding
columnuntilthelastnonzeroentryisfound.Theenvelopeseparatesthatentryfromtherestofthe
uppertriangle.Theremainingzeroentriesareconventionallyremoved:
KD
2
6
6
6
6
6
6
4
K
11
K
13
K
16
K
22
0K
24
0
K
33
K
34
0
K
44
K
46
K
55
K
56
symmK
66
3
7
7
7
7
7
7
5
.12:3/
Whatisleftconstitutetheskylineprofileofskylinetemplateofthematrix.Asparsematrixthat
canbeprofitablystoredinthisformiscalledaskymatrixforbrevity.Noticethattheskylineprofile
mayincludezeroentries.Duringthefactorizationstepdiscussedbelowthesezeroentrieswillin
generalbecomenonzero,aphenomenonthatreceivesthenamefill-in.
Thekeyobservationisthatonlytheentriesintheskylinetemplateneedtobestored,because
fill-ininthefactorizationprocesswillnotoccuroutsidetheenvelope.Tostoretheseentriesitis
convenienttouseaone-dimensionalskylinearray:
s:
[
K
11
;K
22
;K
13
;0;K
33
;K
24
;K
34
;K
44
;K
55
;K
16
;0;0;K
46
;K
56
;K
66
]
.12:4/
Thisarrayiscomplementedbya.NC 1/integerarrayp thatcontainsaddressesofdiagonal
locations.ThearrayhasNC1entries.The.iC1/
th
entryofp hasthelocationofthei
th
diagonal
entryofKins.Fortheexamplematrix:
p:
[
0;1;2;5;8;9;15
]
.12:5/
12–4
12–5§
12.2 SPARSE SOLUTION OF STIFFNESS EQUATIONS
InthepreviousChapter,thisarraywascalledtheGlobalSkylineDiagonalLocationTable,orGSDLT.
Equationsforwhichthedisplacementcomponentisprescribedareidentifiedbyanegativediagonal
locationvalue.Forexampleifu
3
andu
5
areprescribeddisplacementcomponentsinthetest
example,then
p:
[
0;1;2;¡5;8;¡9;15
]
.12:6/
REMARK 12.1
InFortranitisconvenienttodimensionthediagonallocationarrayasp(0:n) sothatindexingbeginsatzero.
InCthisisthestandardindexing.
§12.2.2Factorization
Thestiffnessequations(12.1)aresolvedbyadirectmethodthatinvolvestwobasicphases:factor-
izationandsolution.
Inthefirststage,theskyline-storedsymmetricstiffnessmatrixisfactoredas
KD LDUD LDL
T
D U
T
DU;.12:7/
whereLisaunitlowertriangularmatrix,Disanonsingulardiagonalmatrix,andUandLarethe
transposeofeachother.TheoriginalmatrixisoverwrittenbytheentriesofD
¡1
andU;detailsmay
befollowedintheprogramimplementation.Nopivotingisusedinthefactorizationprocess.This
factorizationiscarriedoutbyMathematicamoduleSymmSkyMatrixFactor,whichisdescribed
laterinthisChapter.
§12.2.3Solution
OnceKhasbeenfactored,thesolutionuforagivenrighthandsidefisobtainedbycarryingout
threestages:
Forwardreduction:LzD f;.12:8/
Diagonalscaling:DyD z;.12:9/
Backsubstitution:UuD y;.12:10/
whereyandzareintermediatevectors.ThesestagesarecarriedoutbyMathematicamodules
SymmSkyMatrixVectorSolve,whichisdescribedlater.
§12.2.4TreatingMFCswithLagrangeMultipliers
InthepresentimplementationofMathFET,MultiFreedomConstraints(MFCs)aretreatedwith
Lagrangemultiplier.Thereisonemultiplierforeachconstraint.Themultipliersareplacedatthe
endofthesolutionvector.
12–5
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–6
Specifically,letthenummul>0 MFCsberepresentedinmatrixformasCuD g,whereCandgare
given,andletthenummul multipliersbecollectedinavector¸.Themultiplier-augmentedmaster
stiffnessequationsare
·
KC
T
C0
¸·
u
¸
¸
D
·
f
g
¸
.12:11/
or
AxD b:.12:12/
wherethesymmetricmatrixA,calledastiffness-borderedmatrix,isofordernumdof+nummul.
Thestiffnessborderedmatrixisalsostoredinskylineform,andtheprevioussolutionprocedure
applies,aslongastheskylinearrayisproperlyconstructedasdescribedinthepreviousChapter.
Themaindifferencewithrespecttotheno-MFCcaseisthat,becauseoftheconfiguration(12.11),
Acannolongerbepositivedefinite.Inprinciplepivotingshouldbeusedduringthefactorization
ofAtoforestallpossiblenumericalinstabilities.Pivotingcanhaveadetrimentaleffectonsolution
efficiencybecauseentriescanmoveoutsideoftheskylinetemplate.However,byplacingthe¸ at
theendsuchdifficultieswillnotbeencounteredifKispositivedefinite,andtheconstraintsare
linearlyindependent(thatis,Chasfullrank).Thuspivotingisnotnecessary.
§12.3ASKYSOLVERIMPLEMENTATION
TheremainingsectionsofthisrevisedChapterdescribearecentimplementationoftheskyline
solverandrelatedroutinesinMathematicaforMathFET.ThishasbeenbasedonsimilarFortran
codesusedsince1967.
§12.3.1SkymatrixRepresentation
InwhatfollowsthecomputerrepresentationinMathematicaofasymmetricskymatrixwillbe
generallydenotedbythesymbolS.Sucharepresentationconsistsofalistoftwonumericobjects:
S = f p,s g.12:13/
Herep=GSDLT istheGlobalSkylineDiagonalLocationTableintroducedin§11.6,ands isthearray
ofskymatrixentries,arrangedasdescribedintheprevioussection.Thisarrayusuallyconsistsof
floating-pointnumbers,butitmayalsocontainexactintegersorfactions,orevensymbolicentries.
Forexample,supposethatthenumericalentriesofthe6£6skymatrix(12.10)areactually
KD
2
6
6
6
6
6
6
4
111316
220240
33340
4446
5556
symm66
3
7
7
7
7
7
7
5
.12:14/
12–6
12–7§
12.3 A SKYSOLVER IMPLEMENTATION
Cell12.1FactorizationofaSymmetricSkyMatrix
SymmSkyMatrixFactor[S_,tol_]:= Module[
{p,a,fail,i,j,k,l,m,n,ii,ij,jj,jk,jmj,d,s,row,v},
row=SymmSkyMatrixRowLengths[S];s=Max[row];
{p,a}=S;n=Length[p]-1;v=Table[0,{n}];fail=0;
Do [jj=p[[j+1]];If [jj<0|row[[j]]==0,Continue[]];d=a[[jj]];
jmj=Abs[p[[j]]];jk=jj-jmj;
Do [i=j-jk+k;v[[k]]=0;ii=p[[i+1]];
If [ii<0,Continue[]];m=Min[ii-Abs[p[[i]]],k]-1;
ij=jmj+k;v[[k]]=a[[ij]];
v[[k]]-=Take[a,{ii-m,ii-1}].Take[v,{k-m,k-1}];
a[[ij]]=v[[k]]*a[[ii]],
{k,1,jk-1}];
d-=Take[a,{jmj+1,jmj+jk-1}].Take[v,{1,jk-1}];
If [Abs[d]<tol*row[[j]],fail=j;a[[jj]]=Infinity;Break[] ];
a[[jj]]=1/d,
{j,1,n}];
Return[{{p,a},fail}]
];
SymmSkyMatrixRowLengths[S_]:= Module[
{p,a,i,j,n,ii,jj,m,d,row},
{p,a}=S;n=Length[p]-1;row=Table[0,{n}];
Do [ii=p[[i+1]];If [ii<0,Continue[]];m=ii-i;row[[i]]=a[[ii]]^2;
Do [If [p[[j+1]]>0,d=a[[m+j]]^2;row[[i]]+=d;row[[j]]+=d],
{j,Max[1,Abs[p[[i]]]-m+1],Min[n,i]-1}],
{i,1,n}];Return[Sqrt[row]];
];
ItsMathematicarepresentation,usingthesymbols(12.13)is
p= f 0,1,2,5,8,9,15g;
s= f 11,22,13,0,33,24,34,44,55,16,0,0,46,56,66g;
S= f p,sg;
.12:15/
ormoredirectly
S=f f 0,1,2,5,8,9,15g,f 11,22,13,0,33,24,34,44,55,16,0,0,46,56,66g g;
.12:16/
§12.3.2SkymatrixFactorization
ModuleSymmSkyMatrixFactor,listedinCell12.1,factorsasymmetricskymatrixintotheproduct
LDUwhereListhetransposeofU.Nopivotingisused.Themoduleisinvokedas
12–7
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–8
Cell12.2FactorizationTestInput
ClearAll[n];n=5;SeedRandom[314159];
p=Table[0,{n+1}];Do[p[[i+1]]=p[[i]]+
Max[1,Min[i,Round[Random[]*i]]],{i,1,n}];
a=Table[1.,{i,1,p[[n+1]]}];
Print["Mean Band=",N[p[[n+1]]/n]];
S={p,a};
Sr=SymmSkyMatrixLDUReconstruct[S];
Print["Reconstructed SkyMatrix:"];SymmSkyMatrixLowerTrianglePrint[Sr];
SymmSkyMatrixLowerTriangleMap[Sr];
Print["eigs=",Eigenvalues[SymmSkyMatrixConvertToFull[Sr]]];
x=Table[{N[i],3.,(-1)^i*N[n-i]},{i,1,n}];
Print["Assumed x=",x];
b=SymmSkyMatrixColBlockMultiply[Sr,x];
(*x=Transpose[x];b=SymmSkyMatrixRowBlockMultiply[Sr,x];*)
Print["b=Ax=",b];
Print[Timing[{F,fail}=SymmSkyMatrixFactor[Sr,10.^(-12)]]];
If [fail!=0,Print["fail=",fail];Abort[]];
Print["F=",F];Print["fail=",fail];
Print["Factor:"];
SymmSkyMatrixLowerTrianglePrint[F];
x=SymmSkyMatrixColBlockSolve[F,b];
(*x=SymmSkyMatrixRowBlockSolve[F,b];*)
Print["Computed x=",x//InputForm];
f Sf,failg = SymmSkyMatrixFactor[S,tol]
Theinputargumentsare
S Theskymatrixtobefactored,storedasthetwo-objectlistf p,sg;seeprevious
subsection.
tol Toleranceforsingularitytest.Theappropriatevalueoftol dependsonthekindof
skymatrixentriesstoredins.
Iftheskymatrixentriesarefloating-pointnumbershandledbydefaultindouble
precisionarithmetic,tol shouldbesetto8£ or10£ themachineprecisionin
thatkindofarithmetic.Thefactorizationabortsif,whenprocessingthej-th row,
d
j
· tol¤r
j
,whered
j
isthecomputedj
th
diagonalentryofD,andr
j
istheEuclidean
normofthej
th
skymatrixrow.
Iftheskymatrixentriesareexact(integers,fractionsorsymbols),tol shouldbeset
tozero.Inthiscaseexactsingularityisdetectable,andthefactorizationabortsonly
onthatcondition.
Theoutputsare:
12–8
12–9§
12.3 A SKYSOLVER IMPLEMENTATION
Cell12.3OutputfromProgramofCells12.1and12.2
Mean Band=1.6
Reconstructed SkyMatrix:
Col 1 Col 2 Col 3 Col 4 Col 5
Row 1 1.0000
Row 2 1.0000
Row 3 1.0000 2.0000
Row 4 1.0000
Row 5 1.0000 1.0000 3.0000
1 2 3 4 5
1 +
2 +
3 + +
4 +
5 + + +
eigs={3.9563,2.20906,1.,0.661739,0.172909}
Assumed x={{1.,3.,-4.},{2.,3.,3.},{3.,3.,-2.},{4.,3.,1.},
{5.,3.,0}}
b=Ax={{1.,3.,-4.},{5.,6.,1.},{13.,12.,-1.},{9.,6.,1.},
{22.,15.,-1.}}
{0.0666667 Second,{{{0,1,2,4,5,8},
{1.,1.,1.,1.,1.,1.,1.,1.}},0}}
F={{0,1,2,4,5,8},{1.,1.,1.,1.,1.,1.,1.,1.}}
fail=0
Factor:
Col 1 Col 2 Col 3 Col 4 Col 5
Row 1 1.0000
Row 2 1.0000
Row 3 1.0000 1.0000
Row 4 1.0000
Row 5 1.0000 1.0000 1.0000
Computed x={{1.,3.,-4.},{2.,3.,3.},{3.,3.,-2.},{4.,3.,1.},
{5.,3.,0.}}
Sf Iffail iszeroonexit,Sf isthecomputedfactorizationofS.Itisatwo-objectlist
f p,dug,wheredu storestheentriesofD
¡1
inthediagonallocations,andofUin
itsstrictuppertriangle.
fail Asingularitydetectionindicator.Azerovalueindicatesthatnosingularitywas
12–9
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–10
Cell12.4SolvingforaSingleRHS
SymmSkyMatrixVectorSolve[S_,b_]:= Module[
{p,a,n,i,j,k,m,ii,jj,bi,x},
{p,a}=S;n=Length[p]-1;x=b;
If [n!=Length[x],Print["Inconsistent matrix dimensions in",
"SymmSkyMatrixVectorSolve"];Return[Null]];
Do [ii=p[[i+1]];If [ii>=0,Continue[]];ii=-ii;k=i-ii+Abs[p[[i]]]+1;
bi=x[[i]];If [bi==0,Continue[]];
Do [jj=p[[j+1]],If [jj<0,Continue[]];
m=j-i;If [m<0,x[[j]]-=a[[ii+m]]*bi;Break[]];
ij=jj-m;If [ij>Abs[p[[j]]],x[[j]]-=a[[ij]]*bi],
{j,k,n}],
{i,1,n}];
Do [ii=p[[i+1]];If [ii<0,x[[i]]=0;Continue[]];
imi=Abs[p[[i]]];m=ii-imi-1;
x[[i]]-=Take[a,{imi+1,imi+m}].Take[x,{i-m,i-1}],
{i,1,n}];
Do [ii=Abs[p[[i+1]]];x[[i]]*=a[[ii]],{i,1,n}];
Do [ii=p[[i+1]];If [ii<0,x[[i]]=b[[i]];Continue[]];
m=ii-Abs[p[[i]]]-1;
Do [ x[[i-j]]-=a[[ii-j]]*x[[i]],{j,1,m}],
{i,n,1,-1}];
Return[x]
];
detected.Iffail returnsj>0,thefactorizationwasabortedatthej-th row.Inthis
caseSf returnstheabortedfactorizationwith1storedind
j
.
AtestofSymmSkyMatrixFactor onthematrix(12.14)isshowninCells12.2and12.3.The
modulesthatprintandproduceskylinemapsusedinthetestprogramaredescribedlaterinthis
Chapter.
§12.3.3EquationSolving
ModuleSymmSkyMatrixVectorSolve,listedinCell12.4,solvesthelinearsystemAxD bforx,
followingthefactorizationofthesymmetricskymatrixAbySymmSkyMatrixFactor.Themodule
isinvokedas
x = SymmSkyMatrixVectorSolve[Sf,b]
Theinputargumentsare
Sf ThefactoredmatrixreturnedbySymmSkyMatrixFactor.
b Theright-handsidevectortobesolvedfor,storedasasingle-level(onedimensional)
12–10
12–11§
12.3 A SKYSOLVER IMPLEMENTATION
Cell12.5SolvingforaBlockofRighHandSides
SymmSkyMatrixColBlockSolve[S_,b_]:= Module[
{p,a,n,nrhs,i,j,k,m,r,ii,jj,bi,x},
{p,a}=S;n=Length[p]-1;x=b;
If [n!=Dimensions[x][[1]],Print["Inconsistent matrix dimensions in",
"SymmSkyMatrixBlockColSolve"];Return[Null]];nrhs = Dimensions[x][[2]];
Do [ii=p[[i+1]];If [ii>=0,Continue[]];ii=-ii;k=i-ii+Abs[p[[i]]]+1;
Do [bi=x[[i,r]];If [bi==0,Continue[]];
Do [jj=p[[j+1]],If [jj<0,Continue[]];
m=j-i;If [m<0,x[[j,r]]-=a[[ii+m]]*bi;Break[]];
ij=jj-m;If [ij>Abs[p[[j]]],x[[j,r]]-=a[[ij]]*bi],
{j,k,n}],
{r,1,nrhs}],
{i,1,n}];
Do [ii=p[[i+1]];If [ii<0,Do[x[[i,r]]=0,{r,1,nrhs}];Continue[]];
imi=Abs[p[[i]]];m=ii-imi-1;
Do [ Do [ x[[i,r]]-=a[[imi+j]]*x[[i-m+j-1,r]],{j,1,m}],{r,1,nrhs}],
{i,1,n}];
Do [ii=Abs[p[[i+1]]];Do[x[[i,r]]*=a[[ii]],{r,1,nrhs}],{i,1,n}];
Do [ii=p[[i+1]];If [ii<0,Do[x[[i,r]]=b[[i,r]],{r,1,nrhs}];Continue[]];
m=ii-Abs[p[[i]]]-1;
Do [ Do [ x[[i-j,r]]-=a[[ii-j]]*x[[i,r]],{j,1,m}],{r,1,nrhs}],
{i,n,1,-1}];
Return[x]
];
SymmSkyMatrixRowBlockSolve[S_,b_]:= Module[
{p,a,n,nrhs,i,j,k,m,r,ii,jj,bi,x},
{p,a}=S;n=Length[p]-1;x=b;
If [n!=Dimensions[x][[2]],Print["Inconsistent matrix dimensions in",
"SymmSkyMatrixBlockRowSolve"];Return[Null]];nrhs = Dimensions[x][[1]];
Do [ii=p[[i+1]];If [ii>=0,Continue[]];ii=-ii;k=i-ii+Abs[p[[i]]]+1;
Do [bi=x[[r,i]];If [bi==0,Continue[]];
Do [jj=p[[j+1]],If [jj<0,Continue[]];
m=j-i;If [m<0,x[[j,r]]-=a[[ii+m]]*bi;Break[]];
ij=jj-m;If [ij>Abs[p[[j]]],x[[r,j]]-=a[[ij]]*bi],
{j,k,n}],
{r,1,nrhs}],
{i,1,n}];
Do [ii=p[[i+1]];If [ii<0,Do[x[[r,i]]=0,{r,1,nrhs}];Continue[]];
imi=Abs[p[[i]]];m=ii-imi-1;
Do [ Do [ x[[r,i]]-=a[[imi+j]]*x[[r,i-m+j-1]],{j,1,m}],{r,1,nrhs}],
{i,1,n}];
Do [ii=Abs[p[[i+1]]];Do[x[[r,i]]*=a[[ii]],{r,1,nrhs}],{i,1,n}];
Do [ii=p[[i+1]];If [ii<0,Do[x[[r,i]]=b[[r,i]],{r,1,nrhs}];Continue[]];
m=ii-Abs[p[[i]]]-1;
Do [ Do [ x[[r,i-j]]-=a[[ii-j]]*x[[r,i]],{j,1,m}],{r,1,nrhs}],
{i,n,1,-1}];
Return[x]
];
12–11
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–12
Cell12.6MultiplyingSkymatrixbyIndividualVector
SymmSkyMatrixVectorMultiply[S_,x_]:= Module[
{p,a,n,i,j,k,m,ii,b},
{p,a}=S;n=Length[p]-1;
If [n!=Length[x],Print["Inconsistent matrix dimensions in",
"SymmSkyMatrixVectorMultiply"];Return[Null]];
b=Table[a[[ Abs[p[[i+1]]] ]]*x[[i]],{i,1,n}];
Do [ii=Abs[p[[i+1]]];m=ii-Abs[p[[i]]]-1;If [m<=0,Continue[]];
b[[i]]+=Take[a,{ii-m,ii-1}].Take[x,{i-m,i-1}];
Do [b[[i-k]]+=a[[ii-k]]*x[[i]],{k,1,m}],
{i,1,n}];
Return[b]
];
(*
ClearAll[n];n=10;SeedRandom[314159];
p=Table[0,{n+1}];Do[p[[i+1]]=p[[i]]+
Max[1,Min[i,Round[Random[]*i]]],{i,1,n}];
a=Table[1.,{i,1,p[[n+1]]}];
Print["Mean Band=",N[p[[n+1]]/n]];
S={p,a};
Sr=SymmSkyMatrixLDUReconstruct[S];
Print["Reconstructed SkyMatrix:"];SymmSkyMatrixLowerTrianglePrint[Sr];
SymmSkyMatrixLowerTriangleMap[Sr];
x=Table[1.,{i,1,n}];
b=SymmSkyMatrixVectorMultiply[Sr,x];
Print["b=Ax=",b];*)
list.Ifthei-th entryofx isprescribed,theknownvaluemustbesuppliedinthis
vector.
Theoutputsare:
x Thecomputedsolutionvector,storedasasingle-level(one-dimensional)list.Pre-
scribedsolutioncomponentsreturnthevalueoftheentryinb.
Sometimesitisnecessarytosolvelinearsystemsformultiple(m> 1)righthandsides.Oneway
todothatistocallSymmSkyMatrixVectorSolve repeatedly.Alternatively,ifmrighthandsides
arecollectedascolumnsofarectangularmatrixB,moduleSymmSkyMatrixColBlockSolve may
beinvokedas
X = SymmSkyMatrixVectorSolve[Sf,B]
toprovidethesolutionXofSXD B.ThismoduleislistedinCell12.5.Theinputarguments
andfunctionreturnshavethesamefunctionasthosedescribedforSymmSkyMatrixVectorSolve.
ThemaindifferenceisthatB andX arematrices(two-dimensionallists)withtherigh-handsideand
12–12
12–13§
12.3 A SKYSOLVER IMPLEMENTATION
Cell12.7MultiplyingSkymatrixbyVectorBlock
SymmSkyMatrixColBlockMultiply[S_,x_]:= Module[
{p,a,n,nrhs,i,j,k,m,r,ii,aij,b},
{p,a}=S;n=Length[p]-1;
If [n!=Dimensions[x][[1]],Print["Inconsistent matrix dimensions in",
"SymmSkyMatrixColBlockMultiply"];Return[Null]];
nrhs = Dimensions[x][[2]];b=Table[0,{n},{nrhs}];
Do [ii=Abs[p[[i+1]]];m=ii-Abs[p[[i]]]-1;
Do [b[[i,r]]=a[[ii]]*x[[i,r]],{r,1,nrhs}];
Do [j=i-k;aij=a[[ii-k]];If [aij==0,Continue[]];
Do [b[[i,r]]+=aij*x[[j,r]];b[[j,r]]+=aij*x[[i,r]],{r,1,nrhs}],
{k,1,m}],
{i,1,n}];
Return[b]
];
SymmSkyMatrixRowBlockMultiply[S_,x_]:= Module[
{p,a,n,nrhs,i,j,k,m,r,ii,aij,b},
{p,a}=S;n=Length[p]-1;
If [n!=Dimensions[x][[2]],Print["Inconsistent matrix dimensions in",
"SymmSkyMatrixRowBlockMultiply"];Return[Null]];
nrhs = Dimensions[x][[1]];b=Table[0,{nrhs},{n}];
Do [ii=Abs[p[[i+1]]];m=ii-Abs[p[[i]]]-1;
Do [b[[r,i]]=a[[ii]]*x[[r,i]],{r,1,nrhs}];
Do [j=i-k;aij=a[[ii-k]];If [aij==0,Continue[]];
Do [b[[r,i]]+=aij*x[[r,j]];b[[r,j]]+=aij*x[[r,i]],{r,1,nrhs}],
{k,1,m}],
{i,1,n}];
Return[b]
];
solutionvectorsascolumns.ThereisasimilarmoduleSymmSkyMatrixRowBlockSolve,notlisted
here,whichsolvesformultiplerighthandsidesstoredasrowsofamatrix.
§12.3.4Matrix-VectorMultiply
Forvariousapplicationsitisnecessarytoformthematrix-vectorproduct
bD Sx.12:17/
whereSisasymmetricskymatrixandxisgiven.
ThisisdonebymoduleSymmSkyMatrixVectorMultiply,whichislistedinCell12.6.Itsargu-
mentsaretheskymatrixS andthevectorx.ThefunctionreturnsSxinb.
ModuleSymmSkyMatrixColBlockMultiply implementsthemultiplicationbyablockofvectors
12–13
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–14
storedascolumnsofarectangularmatrixX:
BD SX.12:18/
ThismoduleislistedinCell12.7.ItsargumentsaretheskymatrixS andtherectangularmatrixX.
ThefunctionreturnsSXinB.
ThereisasimilarmoduleSymmSkyMatrixRowBlockMultiply,alsolistedinCell12.7,which
postmultipliesavectorblockstoredasrows.
§12.4PRINTINGANDMAPPING
ModuleSymmSkyMatrixUpperTrianglePrint,listedinCell12.8,printsasymmetricskymatrix
inuppertriangleform.Isisinvokedas
SymmSkyMatrixUpperTrianglePrint[S]
whereS istheskymatrixtobeprinted.ForanexampleofuseseeCells122-3.
TheprintformatresemblestheconfigurationdepictedinSection12.1.Thiskindofprintisuseful
forprogramdevelopmentanddebuggingalthoughofcourseitshouldnotbeattemptedwithavery
largematrix.
1
ThereisasimilarmodulecalledSymmSkyMatrixLowerTrianglePrint,whichdisplaysthesky-
matrixentriesinlowertriangularform.ThismoduleisalsolistedinCell12.8.
Sometimesoneisnotinterestedintheactualvaluesoftheskymatrixentriesbutonlyonhowthe
skylinetemplatelookslike.Suchdisplays,calledmaps,canbedonewithjustonesymbolperentry.
ModuleSymmSkyMatrixUpperTriangleMap,listedinCell12.9,producesamapofitsargument.
Itisinvokedas
SymmSkyMatrixUpperTriangleMap[S]
Theentrieswithintheskylinetemplatearedisplayedbysymbols+,- and0,dependingonwhether
thevalueispositive,negativeorzero,respectively.Entriesoutsidetheskylinetemplateareblank.
Asinthecaseoftheprintmodule,thereismoduleSymmSkyMatrixLowerTriangleMap whichis
alsolistedinCell12.9.
1
Computerorientedreadersmaynoticethatthecodefortheprintingroutineissubstantiallymorecomplexthanthose
ofthecomputationalmodules.ThisisprimarilyduetotheinadequaciesofMathematica inhandlingtabularformat
output.ThecorrespondingFortranorCimplementationswouldbesimplerbecausethoselanguagesprovidemuch
bettercontroloverlow-leveldisplay.
12–14
12–15§
12.4 PRINTING AND MAPPING
Cell12.8SkymatrixPrinting
SymmSkyMatrixLowerTrianglePrint[S_]:= Module[
{p,a,cycle,i,ii,ij,it,j,jj,j1,j2,jref,jbeg,jend,jt,kcmax,kc,kr,m,n,c,t},
{p,a}=S;n=Dimensions[p][[1]]-1;kcmax=5;jref=0;
Label[cycle];Print[""];
jbeg=jref+1;jend=Min[jref+kcmax,n];kc=jend-jref;
t=Table["",{n-jref+1},{kc+1}];
Do [If [p[[j+1]]>0,c="",c="*"];
t[[1,j-jref+1]]=StringJoin[c,"Col",ToString[PaddedForm[j,3]]],
{j,jbeg,jend}];it=1;
Do [ii=Abs[p[[i+1]]];m=ii-Abs[p[[i]]]-1;j1=Max[i-m,jbeg];j2=Min[i,jend];
kr=j2-j1+1;If [kr<=0,Continue[]];If [p[[i+1]]>0,c="",c="*"];
it++;t[[it,1]]=StringJoin[c,"Row",ToString[PaddedForm[i,3]]];
jt=j1-jbeg+2;ij=j1+ii-i;
Do[t[[it,jt++]]=PaddedForm[a[[ij++]]//FortranForm,{7,4}],{j,1,kr}],
{i,jbeg,n}];
Print[TableForm[Take[t,it],TableAlignments->{Right,Right},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
jref=jend;If[jref<n,Goto[cycle]];
];
SymmSkyMatrixUpperTrianglePrint[S_]:= Module[
{p,a,cycle,i,ij,it,j,j1,j2,jref,jbeg,jend,kcmax,k,kc,m,n,c,t},
{p,a}=S;n=Dimensions[p][[1]]-1;kcmax=5;jref=0;
Label[cycle];Print[""];
jbeg=jref+1;jend=Min[jref+kcmax,n];kc=jend-jref;
t=Table["",{jend+1},{kc+1}];
Do [If [p[[j+1]]>0,c="",c="*"];
t[[1,j-jref+1]]=StringJoin[c,"Col",ToString[PaddedForm[j,3]]],
{j,jbeg,jend}];it=1;
Do [it++;If [p[[i+1]]>0,c="",c="*"];
t[[it,1]]=StringJoin[c,"Row",ToString[PaddedForm[i,3]]];j=jref;
Do [j++;If [j<i,Continue[]];ij=Abs[p[[j+1]]]+i-j;
If [ij<=Abs[p[[j]]],Continue[]];
t[[it,k+1]]=PaddedForm[a[[ij]]//FortranForm,{7,4}],
{k,1,kc}],
{i,1,jend}];
Print[TableForm[Take[t,it],TableAlignments->{Right,Right},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
jref=jend;If[jref<n,Goto[cycle]];
];
Sr={{0,1,3,6},{1.,2.,7.,4.,23.,97.}};
SymmSkyMatrixLowerTrianglePrint[Sr];SymmSkyMatrixUpperTrianglePrint[Sr];
12–15
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–16
Cell12.9SkymatrixMapping
SymmSkyMatrixLowerTriangleMap[S_]:=Module[
{p,a,cycle,i,ii,ij,it,itop,j,jj,j1,j2,jref,jbeg,jend,jt,kcmax,kc,kr,m,n,c,t},
{p,a}=S;n=Dimensions[p][[1]]-1;kcmax=40;jref=0;
Label[cycle];Print[""];
jbeg=jref+1;jend=Min[jref+kcmax,n];kc=jend-jref;
itop=2;If[jend>9,itop=3];If[jend>99,itop=4];If[jend>999,itop=5];
t=Table["",{n-jref+itop},{kc+1}];it=0;
If [itop>=5,it++;Do [m=Floor[j/1000];
If[m>0,t[[it,j-jref+1]]=ToString[Mod[m,10]]],{j,jbeg,jend}]];
If [itop>=4,it++;Do [m=Floor[j/100];
If[m>0,t[[it,j-jref+1]]=ToString[Mod[m,10]]],{j,jbeg,jend}]];
If [itop>=3,it++;Do [m=Floor[j/10];
If[m>0,t[[it,j-jref+1]]=ToString[Mod[m,10]]],{j,jbeg,jend}]];
it++;Do[t[[it,j-jref+1]]=ToString[Mod[j,10]],{j,jbeg,jend}];
it++;Do[If[p[[j+1]]<0,t[[it,j-jref+1]]="*"],{j,jbeg,jend}];
Do [ii=Abs[p[[i+1]]];m=ii-Abs[p[[i]]]-1;j1=Max[i-m,jbeg];j2=Min[i,jend];
kr=j2-j1+1;If [kr<=0,Continue[]];If [p[[i+1]]>0,c="",c="*"];
it++;t[[it,1]]=StringJoin[ToString[PaddedForm[i,2]],c];
jt=j1-jbeg+2;ij=j1+ii-i;
Do [ c="0";If[a[[ij]]>0,c="+"];If[a[[ij++]]<0,c="-"];
t[[it,jt++]]=c,{j,1,kr}],
{i,jbeg,n}];
Print[TableForm[Take[t,it],TableAlignments->{Right,Right},
TableDirections->{Column,Row},TableSpacing->{0,0}]];
jref=jend;If[jref<n,Goto[cycle]];
];
SymmSkyMatrixUpperTriangleMap[S_]:=Module[
{p,a,cycle,i,ij,it,itop,j,j1,j2,jref,jbeg,jend,kcmax,k,kc,m,n,c,t},
{p,a}=S;n=Dimensions[p][[1]]-1;kcmax=40;jref=0;
Label[cycle];Print[""];
jbeg=jref+1;jend=Min[jref+kcmax,n];kc=jend-jref;
itop=2;If[jend>9,itop=3];If[jend>99,itop=4];If[jend>999,itop=5];
t=Table["",{jend+itop},{kc+1}];it=0;
If [itop>=5,it++;Do [m=Floor[j/1000];
If[m>0,t[[it,j-jref+1]]=ToString[Mod[m,10]]],{j,jbeg,jend}]];
If [itop>=4,it++;Do [m=Floor[j/100];
If[m>0,t[[it,j-jref+1]]=ToString[Mod[m,10]]],{j,jbeg,jend}]];
If [itop>=3,it++;Do [m=Floor[j/10];
If[m>0,t[[it,j-jref+1]]=ToString[Mod[m,10]]],{j,jbeg,jend}]];
it++;Do[t[[it,j-jref+1]]=ToString[Mod[j,10]],{j,jbeg,jend}];
it++;Do[If[p[[j+1]]<0,t[[it,j-jref+1]]="*"],{j,jbeg,jend}];
Do [it++;If [p[[i+1]]>0,c="",c="*"];
t[[it,1]]=StringJoin[ToString[PaddedForm[i,2]],c];j=jref;
Do [j++;If [j<i,Continue[]];ij=Abs[p[[j+1]]]+i-j;
If [ij<=Abs[p[[j]]],Continue[]];c="0";
If[a[[ij]]>0,c="+"];If[a[[ij++]]<0,c="-"];t[[it,k+1]]=c,
{k,1,kc}],
{i,1,jend}];
Print[TableForm[Take[t,it],TableAlignments->{Right,Right},
TableDirections->{Column,Row},TableSpacing->{0,0}]];
jref=jend;If[jref<n,Goto[cycle]];
];
ClearAll[S,Sr];
S={{0,1,3,6,10,11,17,-20,22,30,-36},Table[1000.*i,{i,1,36}]};
SymmSkyMatrixLowerTriangleMap[S];SymmSkyMatrixUpperTriangleMap[S];
12–16
12–17§
12.4 PRINTING AND MAPPING
Cell12.10SkymatrixReconstructionfromFactors
SymmSkyMatrixLDUReconstruct[S_]:= Module[
{p,ldu,a,v,n,i,ii,ij,j,jj,jk,jmj,k,m},
{p,ldu}=S;a=ldu;n=Length[p]-1;v=Table[0,{n}];
Do [jmj=Abs[p[[j]]];jj=p[[j+1]];If [jj<0,Continue[]];
jk=jj-jmj;v[[jk]]=ldu[[jj]];
Do [ij=jmj+k;i=j+ij-jj;ii=p[[i+1]];If [ii<0,v[[k]]=0;Continue[]];
If [i!=j,v[[k]]=ldu[[ij]]*ldu[[ii]]];
m=Min[ii-Abs[p[[i]]],k];a[[ij]]= v[[k]];
a[[ij]]+=Take[ldu,{ii-m+1,ii-1}].Take[v,{k-m+1,k-1}],
{k,1,jk}],
{j,1,n}];Return[{p,a}];
];
SymmSkyMatrixLDinvUReconstruct[S_]:= Module[
{p,ldu,a,v,n,i,ii,ij,j,jj,jk,jmj,k,m},
{p,ldu}=S;a=ldu;n=Length[p]-1;v=Table[0,{n}];
Do [jmj=Abs[p[[j]]];jj=p[[j+1]];If [jj<0,Continue[]];
jk=jj-jmj;v[[jk]]=1/ldu[[jj]];
Do [ij=jmj+k;i=j+ij-jj;ii=p[[i+1]];If [ii<0,v[[k]]=0;Continue[]];
If [i!=j,v[[k]]=ldu[[ij]]/ldu[[ii]]];
m=Min[ii-Abs[p[[i]]],k];a[[ij]]= v[[k]];
a[[ij]]+=Take[ldu,{ii-m+1,ii-1}].Take[v,{k-m+1,k-1}],
{k,1,jk}],
{j,1,n}];Return[{p,a}];
];
p={0,1,2,5,8,9,15};s={11,22,13,0,33,24,34,44,55,16,0,0,46,56,66};
S={p,s};
Sr=SymmSkyMatrixLDinvUReconstruct[S];Print[Sr//InputForm];
Print[SymmSkyMatrixFactor[Sr,0]];
§12.4.1ReconstructionofSkyMatrixfromFactors
Intestingfactorizationandsolvingmodulesitisconvenienttohavemodulesthatperformthe
“inverseprocess”ofthefactorization.Morespecifically,supposethatU,D(orD
¡1
)aregiven,and
theproblemistoreconstructtheskymatrixthathavethemasfactors:
SD LDU;orSD LD
¡1
U.12:19/
inwhichLD U
T
.ModulesSymmSkyMatrixLDUReconstruction and
SymmSkyMatrixLDinvUReconstruction performthoseoperations.Thesemodulesarelistedin
Cell12.10.TheirargumentisafactoredformofS:UandDinthefirstcase,andUandD
¡1
inthe
secondcase.
12–17
Chapter 12:SYMMETRIC SKYLINE SOLVER
12–18
Cell12.11MiscellaneousSkymatrixUtilities
SymmSkyMatrixConvertToFull[S_]:= Module[
{p,a,aa,n,j,jj,jmj,k},
{p,a}=S;n=Length[p]-1;aa=Table[0,{n},{n}];
Do [jmj=Abs[p[[j]]];jj=Abs[p[[j+1]]];aa[[j,j]]=a[[jj]];
Do [aa[[j,j-k]]=aa[[j-k,j]]=a[[jj-k]],{k,1,jj-jmj-1}],
{j,1,n}];Return[aa];
];
SymmSkyMatrixConvertUnitUpperTriangleToFull[S_]:= Module[
{p,ldu,aa,n,j,jj,jmj,k},
{p,ldu}=S;n=Length[p]-1;aa=Table[0,{n},{n}];
Do [jmj=Abs[p[[j]]];jj=Abs[p[[j+1]]];aa[[j,j]]=1;
Do [aa[[j-k,j]]=ldu[[jj-k]],{k,1,jj-jmj-1}],
{j,1,n}];Return[aa];
];
SymmSkyMatrixConvertDiagonalToFull[S_]:= Module[
{p,ldu,aa,n,i,j,jj,jmj,k},
{p,ldu}=S;n=Length[p]-1;aa=Table[0,{n},{n}];
Do [jj=Abs[p[[j+1]]];aa[[j,j]]=ldu[[jj]],
{j,1,n}];Return[aa];
];
§12.4.2MiscellaneousUtilities
Finally,Cell12.11liststhreemiscellaneousmodules.Themostusefuloneisprobably
SymmSkyMatrixConvertToFull,whichconvertsitsskymatrixargumenttoafullystoredsym-
metricmatrix.Thisisusefulforthingslikeaquickanddirtycomputationofeigenvalues:
Print[Eigenvalues[SymmSkyMatrixConvertToFull[S]]];
becauseMathematicabuilt-ineigensolversrequirethatthematrixbesuppliedinfullstorageform.
12–18
-
13
Skyline
Assembly
13–1
Section 13:SKYLINE ASSEMBLY
13–2
§13.1INTRODUCTION
TheprevioustwoChaptersexplainedpreparatoryoperationsforskylinesolution,andthesolution
processitself.Sandwichedbetweenpreparationandsolutionthereistheassemblyprocess,inwhich
themasterstiffnessequationsareconstructed.
ThisChapterpresentsdetailsoftheassemblyprocessofthemasterstiffnessmatrixKusingthe
skylineformatanddescribestheMathFETimplementationinMathematica.
§13.1.1RecapitulationofMainDSMSteps
Figure13.1summarizesthebasicstepsoftheDirectStiffnessMethodusingaskylinedirectsolver
forthemasterstiffnessequations.Chapters12and13dealtwiththeskylinepreprocessingstage
andthesolution,respectively.ThisChapterdealswiththematrixassemblyprocess.
Assemblyisthemostcomplexstageofafiniteelementprogramintermsofthedataflow.The
complexityisnotduetotheassemblyperse,buttothecombinedeffectofformationofindividual
elementsandmerge..Forminganelementrequiresaccesstonode,element,constitutiveand
fabricationdata.Mergerequiresaccesstothefreedomandconnectiondata.Weseethatthisstage
usesupalloftheinformationstudiedinChapters2through12.Thusitscoveragehere.
ThecentralroleoftheassemblerisdisplayedinFigure13.1.
Element Stiffness Matrices
Model definition
tables:
geometry
element
freedom
connectivity
Element Mass Matrices
Assembler
Solvers &
Eigensolvers
K and M
K
M
(e)
(e)
Figure13.1.RoleofassemblerinFEMprogram.
13–2
13–3
§
13.2 STRUCTURAL ASSEMBLY EXAMPLE
3 m
4 m
4 m
E=200000 MPa, A=0.003 m
2
E=200000 MPa, A=0.001 m
2
E=200000 MPa, A=0.001 m
2
2
E=30000 MPa, A=0.02 m , I=0.0004 m
4
SI Physical Units: m, MPa, s, C
o Figure13.2.Samplestructuretoillustrateassemblyprocess.
Beam.1
Beam.2
Bar.1
Bar.2
Bar.3
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110001}
{110001}
{110001}
{110001}
{110001}
{110001}
{110001}
1
1
1
2
2
2
2
3
3
3
4
4
4
4
1
2
3
4
(a)
(b)
(c)
(d)
disassembly
assembly
FEM idealization
(1)
(2)
(3)
(4)
(5)
Figure13.3.Finiteelementdiscretization,disassemblyandassemblyofexamplestructure.
§13.2STRUCTURALASSEMBLYEXAMPLE
WeillustratetheassemblyprocesswiththestructureshowninFigure13.2.Thefiniteelementdiscretization,
disassemblyintoelementsandassemblyareillustratedinFigure13.3(a,b,c,d).
Theassembledstructurehas11degreesoffreedom,3atnodes1,2and3,and2atnode3.Theyareordered
13
–
3
Section 13:SKYLINE ASSEMBLY
13–4
asfollows:
GDOF#:1234567891011
DOF:u
x1
u
y1
µ
z1
u
x2
u
y2
µ
z2
u
x3
u
y3
µ
z3
u
x4
u
y4
.13:1/
Thepositionofeachfreedom,asidentifiedbythenumbersinthefirstrow,iscalledtheglobalfreedomnumber.
Wenowproceedtogoovertheassemblyprocessbyhand.ThemasterstiffnessKwillbedisplayedasafully
storedmatrixforvisualizationconvenience.TheprocessbegingbyinitializationofKD 0.
Element(1),”Beam.1”.Thisisaplanebeam-columnelementwithfreedoms
123456
u
x1
u
y1
µ
z1
u
x2
u
y2
µ
z2
.13:2/
anditsstiffnessmatrixis
K
.1/
D
2
6
6
6
6
4
150:0:0:¡150:0:0:
0:22:545:0:¡22:545:
0:45:120:0:¡45:60:
¡150:0:0:150:0:0:
0:¡22:5¡45:0:22:5¡45:
0:45:60:0:¡45:120:
3
7
7
7
7
5
.13:3/
ThemappingbetweentheelementandglobalfreedomsisspecifiedbytheElementFreedomMappingTable
oreFMT:
element:123456
assembly:123456
.13:4/
Uponmergingthiselementthemasterstiffnessmatrixbecomes
KD
2
6
6
6
6
6
6
6
6
6
6
6
6
6
4
150:0:0:¡150:0:0:00000
0:22:545:0:¡22:545:00000
0:45:120:0:¡45:60:00000
¡150:0:0:150:0:0:00000
0:¡22:5¡45:0:22:5¡45:00000
0:45:60:0:¡45:120:00000
00000000000
00000000000
00000000000
00000000000
00000000000
3
7
7
7
7
7
7
7
7
7
7
7
7
7
5
.13:5/
Element(2),”Beam.2”.Thisisaplanebeam-columnelementwithfreedoms
123456
u
x2
u
y2
µ
z2
u
x3
u
y3
µ
z3
.13:6/
TheelementstiffnessmatrixK
.2/
isidenticalto(13.3).Themappingbetweentheelementandglobalfreedoms
isspecifiedbytheeFMT:
element:123456
assembly:456789
.13:7/
13
–
4
13–5
§
13.2 STRUCTURAL ASSEMBLY EXAMPLE
Uponmergethemasterstiffnessmatrixbecomes
KD
2
6
6
6
6
6
6
6
6
6
6
6
6
6
4
150:0:0:¡150:0:0:00000
0:22:545:0:¡22:545:00000
0:45:120:0:¡45:60:00000
¡150:0:0:300:0:0:¡150:0:0:00
0:¡22:5¡45:0:45:0:0:¡22:545:00
0:45:60:0:0:240:0:¡45:60:00
000¡150:0:0:150:0:0:00
0000:¡22:5¡45:0:22:5¡45:00
0000:45:60:0:¡45:120:00
00000000000
00000000000
3
7
7
7
7
7
7
7
7
7
7
7
7
7
5
.13:8/
Element(3),”Bar.1”.Thisisaplanebarelementwithfreedoms
1234
u
x1
u
y1
u
x4
u
y4
.13:9/
Theelementstiffnessmatrixis
K
.3/
D
2
6
4
25:619:2¡25:6¡19:2
19:214:4¡19:2¡14:4
¡25:6¡19:225:619:2
¡19:2¡14:419:214:4
3
7
5
.13:10/
ThemappingbetweentheelementandglobalfreedomsisspecifiedbytheeFMT:
element:1234
assembly:121011
.13:11/
Uponmergethemasterstiffnessmatrixbecomes
KD
2
6
6
6
6
6
6
6
6
6
6
6
6
6
4
175:619:20:¡150:0:0:000¡25:6¡19:2
19:236:945:0:¡22:545:000¡19:2¡14:4
0:45:120:0:¡45:60:00000
¡150:0:0:300:0:0:¡150:0:0:00
0:¡22:5¡45:0:45:0:0:¡22:545:00
0:45:60:0:0:240:0:¡45:60:00
000¡150:0:0:150:0:0:00
0000:¡22:5¡45:0:22:5¡45:00
0000:45:60:0:¡45:120:00
¡25:6¡19:2000000025:619:2
¡19:2¡14:4000000019:214:4
3
7
7
7
7
7
7
7
7
7
7
7
7
7
5
.13:12/
Element(4),”Bar.2”.Thisisaplanebarelementwithfreedoms
1234
u
x2
u
y2
u
x4
u
y4
.13:13/
13
–
5
Section 13:SKYLINE ASSEMBLY
13–6
Theelementstiffnessmatrixis
K
.4/
D
2
6
4
0000
0200:0¡200:
0000
0¡200:0200:
3
7
5
.13:14/
ThemappingbetweentheelementandglobalfreedomsisspecifiedbytheeFMT:
element:1234
assembly:451011
.13:15/
Uponmergethemasterstiffnessmatrixbecomes
KD
2
6
6
6
6
6
6
6
6
6
6
6
6
6
4
175:619:20:¡150:0:0:000¡25:6¡19:2
19:236:945:0:¡22:545:000¡19:2¡14:4
0:45:120:0:¡45:60:00000
¡150:0:0:300:0:0:¡150:0:0:00
0:¡22:5¡45:0:245:0:0:¡22:545:0¡200:
0:45:60:0:0:240:0:¡45:60:00
000¡150:0:0:150:0:000
0000:¡22:5¡45:0:22:5¡45:00
0000:45:60:0:¡45:120:00
¡25:6¡19:2000000025:619:2
¡19:2¡14:400¡200:000019:2214:4
3
7
7
7
7
7
7
7
7
7
7
7
7
7
5
.13:16/
Element(5),”Bar.3”.Thisisaplanebarelementwithfreedoms
1234
u
x2
u
y2
u
x4
u
y4
.13:17/
Theelementstiffnessmatrixis
K
.4/
D
2
6
4
25:6¡19:2¡25:619:2
¡19:214:419:2¡14:4
¡25:619:225:6¡19:2
19:2¡14:4¡19:214:4
3
7
5
.13:18/
ThemappingbetweentheelementandglobalfreedomsisspecifiedbytheeFMT:
element:1234
assembly:781011
.13:19/
13
–
6
13–7
§
13.2 STRUCTURAL ASSEMBLY EXAMPLE
Uponmergethemasterstiffnessmatrixbecomes
KD
2
6
6
6
6
6
6
6
6
6
6
6
6
6
4
175:619:20:¡150:0:0:000¡25:6¡19:2
19:236:945:0:¡22:545:000¡19:2¡14:4
0:45:120:0:¡45:60:00000
¡150:0:0:300:0:0:¡150:0:0:00
0:¡22:5¡45:0:245:0:0:¡22:545:0¡200:
0:45:60:0:0:240:0:¡45:60:00
000¡150:0:0:175:6¡19:20:¡25:619:2
0000:¡22:5¡45:¡19:236:9¡45:19:2¡14:4
0000:45:60:0:¡45:120:00
¡25:6¡19:20000¡25:619:2051:20:
¡19:2¡14:400¡200:019:2¡14:400:228:8
3
7
7
7
7
7
7
7
7
7
7
7
7
7
5
.13:20/
Forstorageasaskylinematrixtheconnectionbetweennodes1and3wouldbeoutoftheskylineenvelope.
Omittingthelowertriangletheskylinetemplatelookslike
KD
2
6
6
6
6
6
6
6
6
6
6
6
6
6
4
175:619:20:¡150:0:0:¡25:6¡19:2
36:945:0:¡22:545:¡19:2¡14:4
120:0:¡45:60:00
300:0:0:¡150:0:0:00
245:0:0:¡22:545:0¡200:
240:0:¡45:60:00
175:6¡19:20:¡25:619:2
36:9¡45:19:2¡14:4
120:00
51:20:
symm228:8
3
7
7
7
7
7
7
7
7
7
7
7
7
7
5
.13:21/
Thediagonallocationof(13.21)aredefinedbythetable
DLT = f 0,1,3,6,10,15,21,25,30,36,46,57 g.13:22/
Examinationoftheskylinetemplate(13.21)revealsthatsomeadditionalzeroentriescouldberemovedfrom
thetemplate;forexampleK
13
.Thefactthatthoseentriesareexactlyzerois,however,fortuitous.Itcomes
fromthefactthatsomeelementssuchasthebeamsarealignedalongx,whichdecouplesaxialandbending
stiffnesses.
§13.2.1ImposingaMultiFreedomConstraint
ToseetheeffectofimposinganMFContheconfigurationofthemasterstiffnessmatrix,supposethatthe
examplestructureissubjectedtotheconstraintthatnodes1and3mustmoveverticallybythesameamount.
Thatis,
u
y1
D u
y3
oru
y1
¡u
y3
D 0:.13:23/
Theconstraint(13.23)isdefinedasasixthelement,named"MFC.1",andappliedbytheLagrangeMultiplier
method.Thedegreesoffreedomoftheassembledstructureincreasebyoneto12,whichareorderedas
follows:
13
–
7
Section 13:SKYLINE ASSEMBLY
13–8
Beam.1
Beam.2
Bar.1
MFC.1
Bar.2
Bar.3
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110000}
{110001}
{130001}
{110001}
{130001}
{110001}
{110001}
{010000}
{010000}
{110001}
1
1
1
2
2
2
2
3
3
3
4
4
4
4
1
2
3
4
(a)
(b)
(c)
(d)
disassembly
assembly
FEM idealization
(1)
(2)
(3)
(4)
(5)
(6)
Figure13.4.Finiteelementdiscretization,disassemblyandassemblyofexamplestructurewithMFCu
y1
D u
y3
.
GDOF#:123456789101112
DOF:u
x1
u
y1
µ
z1
u
x2
u
y2
µ
z2
u
x3
u
y3
µ
z3
u
x4
u
y4
¸
.6/
.13:24/
Theassemblyofthefirstfiveelementproceedsasbefore,andproducesthesamemasterstiffnessas(13.20),
exceptforanextrazerorowandcolumn.Processingthesixthelementyields
KD
2
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
4
175:619:20:¡150:0:0:000¡25:6¡19:20
19:236:945:0:¡22:545:000¡19:2¡14:41:
0:45:120:0:¡45:60:000000
¡150:0:0:300:0:0:¡150:0:0:000
0:¡22:5¡45:0:245:0:0:¡22:545:0¡200:0
0:45:60:0:0:240:0:¡45:60:000
000¡150:0:0:175:6¡19:20:¡25:619:20
0000:¡22:5¡45:¡19:236:9¡45:19:2¡14:4¡1:
0000:45:60:0:¡45:120:000
¡25:6¡19:20000¡25:619:2051:20:0
¡19:2¡14:400¡200:019:2¡14:400:228:80
01:00000¡1:0000
3
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
5
.13:25/
inwhichthecoefficients1and¡1associatedwiththeMFC(13.23)endupinthelastrowandcolumn.The
13
–
8
13–9§
13.2 STRUCTURAL ASSEMBLY EXAMPLE
asembledstiffness(13.25)canberepresentedasthesymmetricskymatrix:
KD
2
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
4
175:619:20:¡150:0:0:¡25:6¡19:2
36:945:0:¡22:545:¡19:2¡14:41:
120:0:¡45:60:000
300:0:0:¡150:0:0:000
245:0:0:¡22:545:0¡200:0
240:0:¡45:60:000
175:6¡19:20:¡25:619:20
36:9¡45:19:2¡14:4¡1:
120:000
51:20:0
228:80
symm0
3
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
5
.13:26/
Thediagonallocationsof(13.26)aredefinedbythetable
DLT = f 0,1,3,6,10,15,21,25,30,36,46,57,68 g.13:27/
13–9
Section 13:SKYLINE ASSEMBLY
13–10
Cell13.1AssemblingtheMasterStiffnessMatrix
MakeSkylineStiffnessMatrix[MNDT_,MEDT_,MELT_,MCPT_,MFPT_,
MNFT_,MMST_,GNFAT_,GSDLT_]:= Module[
{a,c,cc,ccold,coef,dimeNL,dofNL,e,eCL,edofNL,eFL,eNFAL,eNL,
ename,eqsNL,eTL,fc,fcold,i,ii,j,jj,k,m,mfc,mFCL,
n,numdof,numele=Length[MEDT],numeNL,numeqs,
numfab=Length[MFPT],nummat=Length[MCPT],nummul=Length[MMST],
numnod=Length[MNDT],numrcc,numrfc,Nx2i,p,s,tc,tcold,xn,
cNL,ef,eFMT,etag,etagold,neldof,nf,ntag,ntagold},
(* Initialization *)
p=GSDLT;numeqs=Length[p]-1;numdof=numeqs-nummul;
lensky=Abs[p[[numeqs+1]]];s=Table[0,{lensky}];
k=0;Do [k=Max[MNDT[[n,1]],k],{n,1,numnod}];
Nx2i=Table[0,{k}];Do [xn=MNDT[[n,1]];Nx2i[[xn]]=n,{n,1,numnod}];
numrcc=numrfc=0;
Do [If [Length[MCPT[[cc]]]==0,Break[]];numrcc++,{cc,1,nummat}];
Do [If [Length[MFPT[[fc]]]==0,Break[]];numrfc++,{fc,1,numfab}];
tcold=ccold=fcold=mfc=0;eCL=eFL=eNL=eTL={};
(* Cycle over elements *)
Do [
(* Gather element data structures *)
ename= MEDT[[e,1]];
{etype,tc}= MEDT[[e,2]];
If [tc==0,Continue[]];(* do nothing element *)
eNL= MEDT[[e,3]];
{cc,fc}= MEDT[[e,4]];(* NB:zero codes retrieve {} *)
eNLf= Flatten[eNL];
If [tc!=tcold,eTL=MELT[[tc]];tcold=tc];
If [cc!=ccold,eCL=MCPT[[cc+numrcc+1]];ccold=cc];
If [fc!=fcold,eFL=MFPT[[fc+numrfc+1]];fcold=fc];
numeNL=Length[eNLf];
xyzNL=dirNL=dofNL=edofNL=eNFAL=Table[0,{numeNL}];
Do [xn=eNLf[[i]];If [xn<=0,Continue[]];
n=Nx2i[[xn]];
xyzNL[[i]]=MNDT[[n,2]];dirNL[[i]]=MNFT[[n,4]];
dofNL[[i]]=MNFT[[n,2]];eNFAL[[i]]=GNFAT[[n]],
{i,1,numeNL}];
deNL= {0,0,0,0};
Do [deNL[[i]]=Length[eNL[[i]]],{i,1,Length[eNL]}];k=0;
Do [Do [edofNL[[++k]]=eTL[[8,i]],{j,1,deNL[[i]]}],{i,1,4}];
13–10
13–11§
13.3 IMPLEMENTATION IN MATHFET
§13.3IMPLEMENTATIONINMATHFET
ModuleMakeSkylineStiffnessMatrix assemblesthemasterstiffnessmatrixofanarbitrary
linearstructure.Thecodeisfairlylengthlycomparedwithothermodules,andissplitlistedin
Cells13.1and1a.Themodulebeginsbyperformingvariousinitializations,includingthatofthe
skylinestoredmasterstiffnessarray.Thenitloopsovertheelements,getselementstiffnesses
fromMakeSkylineStiffnessMatrix,formstheEFMT andmergesitintothemasterstiffness.
MultiFreedomConstraints(MFC),whicharetreatedasspecialelements
MakeSkylineStiffnessMatrix interfaceswithelementstiffnessformationmodulesthrough
GetLinearElementStiffness,whichislistedinCell13.2.
TheteststatementfortheexamplestructureofFigures13.2-3areshowninCell3,andthosefor
theexamplestructurewithanMFCinCell4.
FortheexamplestructuretheelementstiffnessofthebarandbeamcolumndiscussedinChapter
15areused.ThesearereproducedinCell5forconvenience.
Theassemblerusescertainutilitymodulestopackandunpackfreedomtags,alreadycoveredin
Chapter7.ThesemodulesarelistedinCell6.Alsoshowninthiscellisastand-alonemodulecalled
ElementFreedomMapTable,whichbuildstheeFMT thatmapslocaltoglobalfreedoms.Thelogic
ofthismoduleisintricatebecauseitcoversmanypossibilities,inclkuding
1.Differentassignedfreedomspernode
2.Elementfreedomshasno“receiver”globalfreedoms
3.Globalfreedomshavenocontributingelementfreedom
Astandaloneconfigurationforthismoduleisconvenientfortesting.However,thelogicof
ElementFreedomMapTable hasbeenactuallyinlinedintotheassemblermodulelistedinCells
13.1-1aforefficiency.(TheinlinedstatementsappearinCell1a.)
Cell7liststwoutilityskymatrixmodulesusedbythetestprograms.fordisplayingKinskymatrix
format,andforconvertingaskymatrixtoafullmatrix.
Finally,Cell8reproducestheMELT builderdiscussedinChapter14.Thisisusedtobuilta3-entry
MELT,whichisprintedinInputForm andtransported,viacutandpaste,tothetestprogramsof
Cells13.3andchapno.4.
13–11
Section 13:SKYLINE ASSEMBLY
13–12
Cell13.1aAssemblingtheMasterStiffnessMatrix(continued)
(* MultiFreedom Constraint needs special processing *)
If [etype=="MFC",mfc++;k=numdof+mfc;
mFCL=eFL[[5]];m=Length[mFCL];ii=p[[k+1]];
Print["mfc=",mfc,"mFCL=",mFCL];
Do [{xn,j,coef}=mFCL[[i]];n=Nx2i[[xn]];
a=GNFAT[[n]]+j;s[[ii-k+a]]=coef,
{i,1,m}];
Continue[]
];
(* Ordinary element:form element stiffness matrix *)
Ke=GetLinearElementStiffness[ename,etype,eTL,deNL,eNLf,
xyzNL,dirNL,eCL,eFL];
(* Form element to global addressing table:
MakeElementFreedomTable inlined for efficiency *)
c=neldof=etagold=ntagold=0;ef=nf={0,0,0,0,0,0};
cNL=Table[0,{numeNL}];
Do[etag=edofNL[[i]];
If [etag!=etagold,c=CountAssignedNodeFreedoms[etag];
etagold=etag];cNL[[i]]=c;neldof=neldof+c,
{i,numeNL}];
eFMT=Table[0,{neldof}];k=etagold=0;
Do [c=cNL[[i]];a=eNFAL[[i]];etag=edofNL[[i]];ntag=dofNL[[i]];
If [etag==ntag,Do [eFMT[[++k]]=++a,{j,1,c}];Continue[]];
If [etag!=etagold,ef=UnpackNodeFreedomTags[etag];etagold=etag];
If [ntag!=ntagold,nf=UnpackNodeFreedomTags[ntag];ntagold=ntag];
Do [If [nf[[j]]!=0,a++];
If [ef[[j]]!=0,k++;If [nf[[j]]!=0,eFMT[[k]]=a]],
{j,1,6}],
{i,1,numeNL}];
Print["eFMT=",eFMT];
(* Merge into global master stiffness *)
Do [jj=eFMT[[j]];If[jj==0,Continue[]];
k=Abs[p[[jj+1]]]-jj;
Do [ii=eFMT[[i]];If [ii==0 || jj<ii,Continue[]];
s[[k+ii]]+=Ke[[i,j]],
{i,1,neldof}],
{j,1,neldof}],
{e,1,numele}];
Return[{p,s}];
];
13–12
13–13§
13.3 IMPLEMENTATION IN MATHFET
Cell13.2AssemblerInterfacetoElementStiffnessModules
GetLinearElementStiffness[ename_,etype_,eTL_,deNL_,eNLf_,
xyzNL_,dirNL_,eCL_,eFL_]:= Module[{Ke},
(*Print["\nEnter GetLinearElementStiffness"];
Print["ename=",ename];
Print["etype=",etype];
Print["descriptor eTL=",eTL];
Print["deNL=",deNL];
Print["flattened eNL=",eNLf];
Print["xyzNL=",xyzNL];
Print["dirNL=",dirNL];
Print["constitution eCL=",eCL];
Print["fabrication fCL=",eFL];*)
If [etype=="Bar2D.2",
Ke=Stiffness2DBar[{Take[xyzNL[[1]],2],Take[xyzNL[[2]],2]},
{eCL[[3,1]],eCL[[3,3]]},{eFL[[3,1]]} ];
Print["Ke of",ename,"is",Ke//TableForm];
Return[Ke]
];
If [etype=="BeamC2D.2",
Ke=Stiffness2DBeamColumn[{Take[xyzNL[[1]],2],Take[xyzNL[[2]],2]},
eCL[[3]],eFL[[3]]];
Print["Ke of",ename,"is",Ke//TableForm];
Return[Ke]
];
Print["*** GetLinearElementStiffness:unknown element type",
etype];Abort[];
];
13–13
Section 13:SKYLINE ASSEMBLY
13–14
Cell13.3AssemblingtheUncnstrainedExampleStructureofFigures13.2-3
MNDT={{1,{0,0,0},{}},{2,{4,0,0},{}},{3,{8,0,0},{}},{4,{4,3,0},{}}};
MNFT={{1,110001,3,{}},{2,110001,3,{}},{3,110001,3,{}},{4,110000,2,{}}};
MEDT={{"Beam.1",{"BeamC2D.2",2},{{1,2}},{1,1}},
{"Beam.2",{"BeamC2D.2",2},{{2,3}},{1,1}},
{"Bar.1",{"Bar2D.2",1},{{1,4}},{2,2}},
{"Bar.2",{"Bar2D.2",1},{{2,4}},{2,3}},
{"Bar.3",{"Bar2D.2",1},{{3,4}},{2,2}}};
MELT={{"Bar2D.2","STM",1,"BAR","MOM","SEG",1000,{110000}},
{"BeamC2D.2","STM",1,"PBEAC1","MOM","SEG",1000,{110001}},
{"MFC","STM",0,"CON","EXT","ARB",1000,{0}}};
MCPT={ {},
{"Concrete",{"Isot.L.E.S","SI"},{ 30000,.15,2320.,.000010}},
{"ASTM-Steel",{"Isot.L.E.S","SI"},{200000,.30,7860.,.000012}}
};
MFPT={{},{"DeckBeam",{"A.Iz","SI"},{.02,.004}},
{"BarDiags",{"A","SI"},{.001,.0004}},
{"BarStrut",{"A","SI"},{.003,.0004}}};
MMST={};
GNFAT={0,3,6,9,11};
GSDLTX={0,1,3,6,10,15,21,25,30,36,46,57};
{p,s}=MakeSkylineStiffnessMatrix[MNDT,MEDT,MELT,MCPT,MFPT,
MNFT,MMST,GNFAT,GSDLTX];
Print["\ndiag locators=",p];
Print["s=",s];
SymmSkyMatrixUpperTrianglePrint[{p,s}];
Print["\nEigenvalues of K=",Chop[Eigenvalues[
SymmSkyMatrixConvertToFull[{p,s}]],10.^(-12)]];
Print["\nFull K=",SymmSkyMatrixConvertToFull[{p,s}]];
13–14
13–15§
13.3 IMPLEMENTATION IN MATHFET
Cell13.4AssemblingtheConstrainedExampleStructureofFigure13.4
MNDT={{1,{0,0,0},{}},{2,{4,0,0},{}},{3,{8,0,0},{}},{4,{4,3,0},{}}};
MNFT={{1,110001,3,{}},{2,110001,3,{}},{3,110001,3,{}},{4,110000,2,{}}};
MEDT={{"Beam.1",{"BeamC2D.2",2},{{1,2}},{1,1}},
{"Beam.2",{"BeamC2D.2",2},{{2,3}},{1,1}},
{"Bar.1",{"Bar2D.2",1},{{1,4}},{2,2}},
{"Bar.2",{"Bar2D.2",1},{{2,4}},{2,3}},
{"Bar.3",{"Bar2D.2",1},{{3,4}},{2,2}},
{"MFC.1",{"MFC",3},{{1,3}},{0,4}}};
MELT={{"Bar2D.2","STM",1,"BAR","MOM","SEG",1000,{110000}},
{"BeamC2D.2","STM",1,"PBEAC1","MOM","SEG",1000,{110001}},
{"MFC","STM",0,"CON","EXT","ARB",1000,{0}}};
MCPT={ {},
{"Concrete",{"Isot.L.E.S","SI"},{ 30000,.15,2320.,.000010}},
{"ASTM-Steel",{"Isot.L.E.S","SI"},{200000,.30,7860.,.000012}}};
MFPT={{},{"DeckBeam",{"A.Iz","SI"},{.02,.004}},
{"BarDiags",{"A","SI"},{.001,.0004}},
{"BarStrut",{"A","SI"},{.003,.0004}},
{"ty1=ty3",{"MFC","SI"},{},{},{{1,2,1.0},{3,2,-1.0}}}};
MMST={{6,0,0}};
GNFAT={0,3,6,9,11,12};
GSDLTX={0,1,3,6,10,15,21,25,30,36,46,57,68};
{p,s}=MakeSkylineStiffnessMatrix[MNDT,MEDT,MELT,MCPT,MFPT,
MNFT,MMST,GNFAT,GSDLTX];
Print["\ndiag locators=",p];
Print["s=",s];
SymmSkyMatrixUpperTrianglePrint[{p,s}];
Print["\nEigenvalues of K=",Chop[Eigenvalues[
SymmSkyMatrixConvertToFull[{p,s}]],10.^(-12)]];
Print["\nFull K=",SymmSkyMatrixConvertToFull[{p,s}]];
13–15
Section 13:SKYLINE ASSEMBLY
13–16
Cell13.5BaeandBeamElementStiffnessModulesUsedinAssemblerTest
Stiffness2DBar[{{x1_,y1_},{x2_,y2_}},{Em_,rho_},{A_}]:= Module[
{dx,dy,len3,Ke},dx=x2-x1;dy=y2-y1;
len3=(dx^2+dy^2)*PowerExpand[Sqrt[dx^2+dy^2]];
Ke=(Em*A/len3)*{{ dx^2,dx*dy,-dx^2,-dx*dy},
{ dx*dy,dy^2,-dy*dx,-dy^2},
{-dx^2,-dy*dx,dx^2,dy*dx},
{-dy*dx,-dy^2,dy*dx,dy^2}};
Return[Ke]
];
Ke=Stiffness2DBar[{{0,0},{L,0}},{Em,rho},{A}];
Print[Ke//MatrixForm];
Stiffness2DBeamColumn[{{x1_,y1_},{x2_,y2_}},{Em_,nu_,rho_,alpha_},
{A_,Iz_}]:= Module[{dx,dy,c,s,L,LL,ra,rb,Kebar,Ke},
dx=x2-x1;dy=y2-y1;LL=dx^2+dy^2;L=PowerExpand[Sqrt[LL]];
c=dx/L;s=dy/L;ra=Em*A/L;rb= Em*Iz/L^3;
Kebar= ra*{
{ 1,0,0,-1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},
{-1,0,0,1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}} +
rb*{
{ 0,0,0,0,0,0},{0,12,6*L,0,-12,6*L},{0,6*L,4*LL,0,-6*L,2*LL},
{ 0,0,0,0,0,0},{0,-12,-6*L,0,12,-6*L},{0,6*L,2*LL,0,-6*L,4*LL}};
T={{c,s,0,0,0,0},{-s,c,0,0,0,0},{0,0,1,0,0,0},
{0,0,0,c,s,0},{0,0,0,-s,c,0},{0,0,0,0,0,1}};
Ke=Transpose[T].Kebar.T;
Return[Ke]
];
Ke=Stiffness2DBeamColumn[{{0,0},{0,L}},{Em,nu,rho,alpha},{A,Iz}];
Print[Ke];
13–16
13–17§
13.3 IMPLEMENTATION IN MATHFET
Cell13.6UtilityModulesUsedbyAssembler
UnpackNodeFreedomTags[p_]:= Module[{f1,g2,f2,g3,f3,g4,f4,g5,f5,f6},
If [p==0,Return[{0,0,0,0,0,0}]];
f1=Floor[p/100000];
g2=p -100000*f1;f2=Floor[g2/10000];g3=g2-10000*f2;
f3=Floor[g3/1000];g4=g3-1000*f3;f4=Floor[g4/100];
g5=g4-100*f4;f5=Floor[g5/10];f6=g5-10*f5;
Return[{f1,f2,f3,f4,f5,f6}];
];
UnpackAssignedNodeFreedomTags[p_]:= Module[
{f1,g2,f2,g3,f3,g4,f4,g5,f5,f6,f,fx,i,j},
If [p==0,Return[{}]];
f1=Floor[p/100000];
g2=p -100000*f1;f2=Floor[g2/10000];g3=g2-10000*f2;
f3=Floor[g3/1000];g4=g3-1000*f3;f4=Floor[g4/100];
g5=g4-100*f4;f5=Floor[g5/10];f6=g5-10*f5;
f={f1,f2,f3,f4,f5,f6};fx={0,0,0,0,0,0};
j=1;Do [If [f[[i]]>0,fx[[i]]=j++],{i,1,6}];
Return[{f,fx}];
];
CountAssignedNodeFreedoms[p_]:= Module[{f1,g2,f2,g3,f3,g4,f4,g5,f5,f6},
If [p==0,Return[0]];
f1=Floor[p/100000];
g2=p -100000*f1;f2=Floor[g2/10000];g3=g2-10000*f2;
f3=Floor[g3/1000];g4=g3-1000*f3;f4=Floor[g4/100];
g5=g4-100*f4;f5=Floor[g5/10];f6=g5-10*f5;
Return[Min[1,f1]+Min[1,f2]+Min[1,f3]+Min[1,f4]+Min[1,f5]+Min[1,f6]];
];
ElementFreedomMapTable[edofNL_,dofNL_,eNFAL_]:= Module[
{a,c,cNL,ef,eFMT,etag,etagold,i,j,k,
numeNL=Length[edofNL],neldof,nf,ntag,ntagold},
c=neldof=etagold=ntagold=0;ef=nf={0,0,0,0,0,0};cNL=Table[0,{numeNL}];
Do[etag=edofNL[[i]];
If [etag!=etagold,c=CountAssignedNodeFreedoms[etag];
etagold=etag];cNL[[i]]=c;neldof=neldof+c,
{i,numeNL}];
eFMT=Table[0,{neldof}];k=etagold=0;
Do [c=cNL[[i]];a=eNFAL[[i]];etag=edofNL[[i]];ntag=dofNL[[i]];
If [etag==ntag,Do [eFMT[[++k]]=++a,{j,1,c}];Continue[]];
If [etag!=etagold,ef=UnpackNodeFreedomTags[etag];etagold=etag];
If [ntag!=ntagold,nf=UnpackNodeFreedomTags[ntag];ntagold=ntag];
Do [If [nf[[j]]!=0,a++];
If [ef[[j]]!=0,k++;If [nf[[j]]!=0,eFMT[[k]]=a]],
{j,1,6}],
{i,1,numeNL}];
Return[eFMT]
];
13–17
Section 13:SKYLINE ASSEMBLY
13–18
Cell13.7SkymatrixUtilityModulesUsedinAssemblerTest
SymmSkyMatrixUpperTrianglePrint[S_]:= Module[
{p,a,cycle,i,ij,it,j,j1,j2,jref,jbeg,jend,kcmax,k,kc,m,n,c,t},
{p,a}=S;n=Dimensions[p][[1]]-1;kcmax=5;jref=0;
Label[cycle];Print[""];
jbeg=jref+1;jend=Min[jref+kcmax,n];kc=jend-jref;
t=Table["",{jend+1},{kc+1}];
Do [If [p[[j+1]]>0,c="",c="*"];
t[[1,j-jref+1]]=StringJoin[c,"Col",ToString[PaddedForm[j,3]]],
{j,jbeg,jend}];it=1;
Do [it++;If [p[[i+1]]>0,c="",c="*"];
t[[it,1]]=StringJoin[c,"Row",ToString[PaddedForm[i,3]]];j=jref;
Do [j++;If [j<i,Continue[]];ij=Abs[p[[j+1]]]+i-j;
If [ij<=Abs[p[[j]]],Continue[]];
t[[it,k+1]]=PaddedForm[a[[ij]]//FortranForm,{7,4}],
{k,1,kc}],
{i,1,jend}];
Print[TableForm[Take[t,it],TableAlignments->{Right},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
jref=jend;If[jref<n,Goto[cycle]];
];
SymmSkyMatrixConvertToFull[S_]:= Module[
{p,a,aa,n,j,jj,jmj,k},
{p,a}=S;n=Length[p]-1;aa=Table[0,{n},{n}];
Do [jmj=Abs[p[[j]]];jj=Abs[p[[j+1]]];aa[[j,j]]=a[[jj]];
Do [aa[[j,j-k]]=aa[[j-k,j]]=a[[jj-k]],{k,1,jj-jmj-1}],
{j,1,n}];Return[aa];
];
13–18
13–19§
13.3 IMPLEMENTATION IN MATHFET
Cell13.8ModuletoGeneratetheMELTUsedinAssemblerTest
DefineElementType[MELT_,type_,descriptor_]:= Module [
{elt=MELT,etype,t,tt=0,numtyp},
etype=Prepend[descriptor,type];
Do [ If [elt[[t,1]]==type,tt=t;Break[] ],{t,1,Length[elt]}];
If [tt==0,AppendTo[elt,etype],elt[[tt]]=etype];
Return[elt];
];
MELT= {};
MELT= DefineElementType[MELT,
"Bar2D.2",{"STM",1,"BAR","MOM","SEG",1000,{110000}}];
MELT= DefineElementType[MELT,
"BeamC2D.2",{"STM",1,"PBEAC1","MOM","SEG",1000,{110001}}];
MELT= DefineElementType[MELT,
"MFC",{"STM",0,"CON","EXT","ARB",1000,{000000}}];
Print["MELT=",MELT//InputForm];
13–19
-
14
The Master
Element
Library
14–1
Chapter 14:THE MASTER ELEMENT LIBRARY
14–2
AllfiniteelementsavailabletotheprogramaredescribedthroughaMasterElementLibraryTable,
orMELT.ThepresentChapterdescribestheformatofthistable,andhowitisconstructed.
§14.1THEMASTERELEMENTLIBRARYTABLE
TheMELT isabuilt-intablepreparedbytheprogramdeveloper.Itmaybeviewedasacatalogof
elementsavailabletotheprogram.
§14.2ELEMENTTYPE
TheelementtypedescribesitsfunctioninsufficientdetailtotheFEprogramsothatitcanprocess
theelementthroughtheappropriatemodulesorsubroutines.
TheMELT hastheconfigurationsketchedinFigure14.1.Itconsistsof(type,descriptor)pairs.There
isonepairforeachdefinedelementtype.
Element Type 1 Element Descriptor 1
Element Type 2 Element Descriptor 2
Element Type 3 Element Descriptor 3
..... ..... Master Element Library Table (MELT)
Figure14.1.ConfigurationoftheMasterElementLibraryTableorMELT.
Theelementtypeisconciselydefinedbytheuserthroughanelementtypename.Thisnamespecifies
theelementexternally.Itservesasanidentifierbytheusertospecifywhichelementistobeused.
Thedescriptorisaninternalrepresentationoftheelement.Thefollowingsubsectionsspecifythese
twoobjectsinmoredetail.
§14.2.1ElementTypeName
Theelementtypename,orsimplyelementname,isacharacterstringthroughwhichtheuserspecifies
thefunctionoftheelement.
ThecomplexityofthisnamedependsonthelevelofgeneralityoftheunderlyingFEcode.Asan
extremecase,considerasimplecodethatusesoneandonlyoneelementtype.Nonameisthen
required.
Mostfiniteelementcodes,however,implementseveralelementtypesandnamesappear.Some
ancientprogramsusenumericcodessuchas103 or410.Morecommonnowadaysistheuseof
characterstringswithsomemnemonictouches,suchas"QUAD9"or"BEAM2".
Inthepresentschemeanelementtypenameisassumed.Thechoiceofnamesisuptotheprogram
developer.Thenameimplicitlydefinetheelementtypedescriptor,asillustratedinFigure14.2.
14–2
14–3§
14.2 ELEMENT TYPE
Application Dimension Model Formulation Shape Node-Conf DOF-Conf EXTERNAL INTERNAL
Element Type Descriptor
ISOQ4 STM 2 LAMINA ISO QU1 1000 110000
(a)
(b)
Element
Type Name
Figure14.2.Elementtypenameanddescriptor:(a)thenameisexternal
andspecifiedbytheuserwhereasthedescriptorisinternal
andonlyseenbytheprogram;(b)anexample.
Table14.1Applicationspecificationinelementtypedescriptor(examples)
IdentifierApplication
"ACF"Acousticfluid
"EMM"Electromagneticmedium
"EUF"Eulerfluid
"NSF"Navier-Stokesfluid
"RBM"Rigidbodymechanics
"STM"Structuralmechanics
"THM"Thermomechanical
§14.2.2ElementTypeDescriptor
Theelementtypedescriptororsimplyelementdescriptorisalistthatcontainssevencomponents
thatcollectivelyclassifytheelementinsufficientdetailtoberouted,duringtheprocessingphases,to
theappropriateelementformationroutines.Thedescriptordoesnotincludeinformationprocessed
withintheroutine,suchasnodecoordinates,materialsandfabricationdata.
Thesevencomponentsareeitheritemsorsublists,andappearinthefollowingorder:
14–3
Chapter 14:THE MASTER ELEMENT LIBRARY
14–4
descriptor = f application,dimensionality,model,formulation,
geometric-shape,node-configuration,freedom-configuration g
.14:1/
SeeFigure14.2.Inprogramming,thesemaybeidentifiedbynamessuchas:
eDL = f eDapp,eDdim,eDmod,eDfrm,eDsha,eDnod,eDdof g.14:2/
orsimilarconventions.
Asnotedabove,theconnectionbetweenelementtypenamesanddescriptorisdonethroughabuilt-in
datastructurecalledtheMasterElementLibraryTableorMELT.Thisdatastructureisupdatedbythe
programdeveloperaselementsareaddedtothelibrary.TheorganizationoftheMELT isdescribedin
Chapter4.
§14.2.2.1Application
Theapplicationitemisa3-characteridentificationtagthatexplainswhatkindofphysicalproblemthe
elementisusedfor.ThemostimportantonesarelistedinTable14.1.Thedatastructuresdescribed
hereemphasizeStructuralMechanicselements,withtag"STM".However,manyoftheattributes
applyequallytotheotherapplicationsofTable14.1,ifthoseapplicationsaredmodeledbythefinite
elementmethod.
§14.2.2.2Dimensionality
Thedimensionalityitemisanintegerthatdefinesthenumberofintrinsicspacedimensionsofa
mechanicalelement:0,1,2or3.Multipointcontraintandmultifreedomconstraintelementsare
conventionallyassignedadimensionalityof0.
Thisattributeshouldnotbeconfusedwithspatialdimensionality,whichis2or3for2Dor3D
analysis,respectively.Spatialdimensionalityisthesameforallelements.Forexampleabarorbeam
elementhasintrinsicdimensionalityof1butmaybeusedina2Dor3Dcontext.
§14.2.2.3Model
Themodelitemislinkedtotheapplicationanddimensionalityattributestodefinethemathematical
modelusedintheelementderivation.Itisspecifiedbyacharacterstringcontainingupto6characters.
SomecommonmodelsusedinStructuralMechanicsapplicationsarealphabeticallylistedinTable
14.1.
InthatTable,0/1afterbendingmodelsidentifiestheso-calledC
0
andC
1
formulations,respectively.
Forexample"PLATE1"isanothermonikerforKirchhoffplateorthinplate."LAMINA"and"SLICE"
arenamesfor2Delementsinplanestressandplanestrain,respectively."FRUS0"and"FRUS1"
areaxisymmetricshellelementsobtainedbyrotatingC
0
andC
1
beams,respectively,360degrees.
"RING"isanaxisymmetricsolidelement.
Othermathematicalmodelidentifierscanofcoursebeaddedtothelistasprogramcapabilitiesexpand.
Onecommonexpansionisthroughtheadditionofcompositeelements;forexampleastiffenedshell
oragirderbox.
14–4
14–5§
14.2 ELEMENT TYPE
Table14.1StructuralMechanicsmodelspecificationinelementtypedescriptor
ApplDimIdentifierMathematicalmodel
"STM"0"POINT"Point
"STM"0"CON"Multipointconstraint
"STM"0"CON"Multifreedomconstraint
"STM"1"BAR"Bar
"STM"1"PBEAM0"C
0
planebeam
"STM"1"PBEAM1"C
1
planebeam
"STM"1"PBEAC0"C
0
planebeam-column
"STM"1"PBEAC1"C
1
planebeam-column
"STM"1"SBEAM0"C
0
spacebeam
"STM"1"SBEAM1"C
1
spacebeam
"STM"1"CABLE"Cable
"STM"1"ARCH"Arch
"STM"1"FRUST0"C
0
axisymmetricshell
"STM"1"FRUST1"C
1
axisymmetricshell
"STM"2"LAMIN"Planestress(membrane)
"STM"2"SLICE"Planestrainslice
"STM"2"RING"Axisymmetricsolid
"STM"2"PLATE0"C
0
(Reissner-Mindlin)plate
"STM"2"PLATE1"C
1
(Kirchhoff)plate
"STM"2"SHELL0"C
0
shell
"STM"2"SHELL1"C
1
shell
"STM"3"SOLID"Solid
§14.2.2.4Formulation
Theformulationitemindicates,throughathree-letterstring,themethodologyusedforderivingthe
element.SomeofthemostcommonformulationidentifiersarelistedinTable14.2.
§14.2.2.5GeometricShape
Thegeometricshape,inconjunctionwiththeintrinsicdimensionalityattribute,identifiestheelement
geometrybya3-characterstring.Allowableidentifiers,pairedwithelementdimensionalities,are
listedinTable14.3.
Notmuchgeometricalvarietycanbeexpectedofcoursein0and1dimensions.Actuallytherearetwo
possibilityforzerodimension:"DOT"identifiesapointelement(forexample,aconcentratedmassor
aspring-to-ground)whereas"CON"appliestoMPC(MultiPointConstraint)andMFC(MultiFreedom
Constraint)elements.
Intwodimensionstrianglesandquadrilateralsarepossible,withidentifiers"TR"and"QU"respec-
tively,followedbyanumber.Inthreedimensionsthechoiceisbetweentetrahedra,wedgesand
bricks,whichareidentifiedby"TE","WE"and"BR",respectively,alsofollowedbyanumber.The
14–5
Chapter 14:THE MASTER ELEMENT LIBRARY
14–6
Table14.2StructuralMechanicsformulationspecificationinelementtypedescriptor
IdentifierFormulation
"ANS"AssumedNaturalStrain
"AND"AssumedNaturalDeviatoricStrain
"EFF"ExtendedFreeFormulation
"EXT"Externallysupplied:usedforMFCs
"FRF"FreeFormulation
"FLE"Flexibility(assumedforce)
"HET"Heterosis
"HYB"Hybrid
"HYP"Hyperparametric
"ISO"Isoparametric
"MOM"MechanicsofMaterials
"SEM"Semi-Loof
"TEM"Template(mostgeneralofall)
"TMX"TransferMatrix
numberfollowingtheshapeidentifierspecifieswhethertheelementisconstructedasaunit,orasa
macroelementassembly.
The"ARB"identifierisintendedasacatch-allforshapesthataretoocomplicatedtobedescribedby
ashortsequence.
14–6
14–7
§
14.2 ELEMENT TYPE
Table14.3Shapespecificationinelementtypedescriptor
DimIdentifierGeometricshape
0"DOT"Point;e.g.aconcentratedmass
0"CON"Constraintelement(conventionally)
1"SEG"Linesegment
2"TR1"Triangle
2"QU1"Quadrilateral
2"QU2"Quadrilateralbuiltof2triangles
2"QU4"Quadrilateralbuiltof4triangles
3"TE1"Tetrahedron
3"WE1"Wedge
3"WE3"Wedgebuiltof3tetrahedra
3"BR1"Brick
3"BR5"Brickbuiltof5tetrahedra
3"BR6"Brickbuiltof6tetrahedra
2-3"VOR"Voronoicell
1-3"ARB"Arbitraryshape:definedbyotherattributes
§14.2.2.6ElementNodalConfiguration
Thenodeconfigurationoftheelementisspecifiedbyalistoffourintegeritems:
node-configuration:= f eCNX,eSNX,eFNX,eINX g.14:3/
HereeCNX,eSNX,eFNX andeINX,areabbreviationsforelement-corner-node-index,element-side-
node-index,element-face-node-indexandelement-internal-node-index,respectively.Theirvalue
rangesfrom0through2withthemeaningexplainedinTable14.4.Forstorageanddisplayconve-
nience,thefourindicesareoftendecimallypackedasoneinteger:
eCSFIX = 1000*eCNX + 100*eSNX + 10*eFNX + eINX.14:4/
Notethatthefullsetofindicesonlyappliestoelementswithintrinsicdimensionalityof3.If
dimensionalityis2orless,eINX isignored.Ifdimensionalityis1orless,eFNX andeINX are
ignored.Finallyifdimensionalityis0,allexcepteCNX areignored.Somespecificexamples:
20-nodetriquadraticbrickECSFI=1100
27-nodetriquadraticbrickECSFI=1111
64-nodetricubicbrickECSFI=1222 (64=8*1+12*2+6*4+8)
8-nodeserendipityquadECSFI=1100
9-nodebiquadraticquadECSFI=1110
10-nodecubiclamina(planestress)triangleECSFI=1210 (10=3*1+3*2+1)
14
–
7
Chapter 14:THE MASTER ELEMENT LIBRARY
14–8
Table14.4Nodeconfigurationinelementtypedescriptor
DimIndicesMeaning/remarks
1–3eCNX=0,1 elementhaseCNX nodespercorner
1–3eSNX=0,1,2 elementhaseSNX nodesperside
2–3eFNX=0,1,2 ifeFNX=0,nofacenodes
ifeFNX=1,onenodeperface
ifeFNX=2,asmanyfacenodesasfacecorners
3eFNX=0,1,2 ifeINX=0,nofacenodes
ifeINX=1,onenodeperface
ifeINX=2,asmanyfacenodesasfacecorners
0eCSFIX=1000 allnodesaretreatedascorners
Someexoticnodeconfigurationsareomitted;cf.Remark14.2
REMARK 14.1
Notethatthemeaningof”interiornodes”heredoesnotagreewiththeusualFEMdefinitionexceptfor3D
elements.AplanestresselementwithonecenternodehaseFNX=1 andeINX=0 insteadofeFNX=0 andeINX=1.
Inotherwords,thatcenternodeisconsideredafacenode.Similarlyabarorbeamelementwithtwonodesat
itsthird-pointshaseSNX=2,eFNX=eINX=0;thatis,thosenodesareconsideredsidenodes.Asexplainednext,
thereasonforthisconventionismixability.
Whyuseindicesinsteadofactualnodecounts?Mixabilitytests(connectingdifferentelementstogether)are
considerablysimplifiedusingthisitem.Morespecifically,elementswithsameapplication,model,formulation,
eCNX,eSNX,eFNX,(in3D)andeCNX,eSNX (in2D)canbemixedif,inaddition,somegeometriccompatibility
conditionsaremet,whiledimensionalityandgeometricshapeattributesmaybedifferent.[NotethateINX and
eFNX areirrelevantin3Dand2D,respectively.]Twoexamples:
(i)TwosolidelementswithECSFI=1220,1221and1222arecandidatesformixingbecauseinteriornodes
areirrelevanttosuchmating.Thisistrueregardlessofwhetherthoseelementsarebricks,wedgesor
tetrahedra.Ofcoursethecommonfacesmusthavethesamegeometricshape;thisrepresentsanotherpart
ofthemixabilitytest.
(ii)Mixabilityacrossdifferentdimensionalitiesisoftenofinterest.Forexample,a3-nodebarwith
ECSFI=1100attachedalongtheedgeofaquadrilateralortriangularlaminawithECSFI=1100 or1110.
Similarlya2-nodebeam,whichhasECSFI=1000,maybeattachedtoaplatewithECSFI=1000 butnotto
onewithECSFI=1100.
ValuesotherthanthoselistedinTable14.5arereservedforexoticconfigurations.Forexample,elementswith
”doublecornernodes”(eCNX=2)areoccassionallyusefultorepresentsingularitiesinfracturemechanics.
§14.2.2.7ElementFreedomConfiguration
Theelementfreedomconfigurationdefinesthedefaultfreedomassignationatelementnodes.Here
“default”meansthattheassignationmaybeovewridenonanodebynodebasisbytheFreedom
DefinitiondatastudiedinanotherChapter.Abriefintroductiontotheconceptoffreedomassignment
isneededhere.Moredetailsaregiveninthatchapter.ThediscussionbelowislimitedtoStructural
Mechanicselements.
14–8
14–9§
14.3 MATHEMATICA MODULES FOR BUILDING THE MELT
Table14.6FreedomSignaturesinelementdescriptor
SignatureMeaning
0Freedomisnotassigned(“off”)
1Freedomisassigned(“on”)
AteachnodenalocalCartesianreferencesystem.Nx
n
;Ny
n
;Nz
n
/maybeusedtodefinefreedomdirec-
tions.Ifthesedirectionsarenotexplicitlyspecified,theyareassumedtocoincidewiththeglobal
system.x;y;z/.(Thisisinfactthecaseinthepresentimplementation).
Inprincipleuptosixdegreesoffreedomcanbeassignedatanode.Theseareidentifiedbythe
symbols
tx,ty,tz,rx,ry,rz.14:5/
Symbolstx,ty andtz denotetranslationsalongaxesNx
n
,Ny
n
andNz
n
,respectively,whereasrx,ry
andrz denotestherotationsaboutthoseaxes.Ifaparticularfreedom,sayrz,appearsinthefinite
elementequationsoftheelementitissaidtobeassigned.Otherwiseitisunassigned.Forexample,
consideraflatthinplateelementlocatedintheglobal.x;y/plane,withalllocalreferencesystems
alignedwiththatsystem.Thentz,rx,andry areassignedwhereastx,ty andrz arenot.
Thefreedomconfigurationatcorner,side,faceandinteriornodesofanelementisdefinedbyfour
integersdenotedby
eFS = f eFSC,eFSS,eFSF,eFSI g.14:6/
whicharecalledelementfreedomsignatures.Omittedvaluesareassumedzero.
Eachoftheintegersin(14.6)isformedbydecimallypackingsixindividualfreedomsignaturevalues:
eFSC D 100000*txC + 10000*tyC + 1000*tzC + 100*rxC + 10*ryC + rzC
eFSS D 100000*txS + 10000*tyS + 1000*tzS + 100*rxS + 10*ryC + rzS
eFSF D 100000*txF + 10000*tyF + 1000*tzF + 100*rxF + 10*ryC + rzF
eFSI D 100000*txI + 10000*tyI + 1000*tzI + 100*rxI + 10*ryC + rzI
.14:7/
ThefreedomsignaturetxC isassociatedwiththetranslationtx atcornernodes.Similarly,rxS is
associatedwiththerotationrx atsidenodes.Andsoon.Thesignaturevaluespecifieswhetherthe
associatedfreedomisonoroff,asindicatedinTable14.6.Signaturesotherthan0or1areusedinthe
MasterFreedomDefinitionTabledescribedinChapter7toincorporatetheattributecalledfreedom
activity.
REMARK 14.2
Iftheelementlacksnodeofacertaintypethecorrespondingsignatureiszero.Forexample,iftheelementhas
onlycornernodes,eFSS = eFSF = eFSI = 0,andthesemaybeomittedfromthelist(14.6).
REMARK 14.3
ForanMFCelementthesignatures,ifgiven,areconventionallysettozero,sincethenodeconfigurationis
obtainedfromotherinformation.
14–9
Chapter 14:THE MASTER ELEMENT LIBRARY
14–10
Cell14.1DefininganElementTypeinMELT
DefineElementType[MELT_,type_,descriptor_]:= Module [
{elt=MELT,etype,t,tt=0,numtyp},
etype=Prepend[descriptor,type];
Do [ If [elt[[t,1]]==type,tt=t;Break[] ],{t,1,Length[elt]}];
If [tt==0,AppendTo[elt,etype],elt[[tt]]=etype];
Return[elt];
];
MELT= {};
MELT= DefineElementType[MELT,
"Bar2D.2",{"STM",1,"BAR","MOM","SEG",1000,{110000}}];
MELT= DefineElementType[MELT,
"BeamC2D.2",{"STM",1,"PBEAC1","MOM","SEG",1000,{110001}}];
MELT= DefineElementType[MELT,
"MFC",{"STM",0,"CON","EXT","ARB",1000,{000000}}];
Print["MELT=",MELT//InputForm];
PrintMasterElementLibraryTable[MELT];
Cell14.2OutputfromtheProgramofCell14.1
MELT={{"Bar2D.2","STM",1,"BAR","MOM","SEG",1000,{110000}},
{"BeamC2D.2","STM",1,"PBEAC1","MOM","SEG",1000,{110001}},
{"MFC","STM",0,"CON","MOM","ARB",1000,{0}}}
TypeId App Dim Model Form Sha Nod-con DOF-con
Bar2D.2 STM 1 BAR MOM SEG 1000 {110000}
BeamC2D.2 STM 1 PBEAC1 MOM SEG 1000 {110001}
MFC STM 0 CON MOM ARB 1000 {0}
§14.3MATHEMATICAMODULESFORBUILDINGTHEMELT
§14.3.1DefininganIndividualNode
ModuleDefineElementType isdisplayedinCell14.1.ItentersanewelementtypeintotheMELT.
Itisinvokedasfollows:
MELT = DefineElementType [MELT,Type,Descriptor]
TheinputargumentsaretheexistingMELT,theelementtypename,andtheelementdescriptor.The
14–10
14–11§
14.3 MATHEMATICA MODULES FOR BUILDING THE MELT
Cell14.5PrintingtheMasterNodeDefinitionTable
PrintMasterElementLibraryTable[MELT_]:= Module[
{numtyp=Length[MELT],t,n},
t=Table["",{numtyp+1},{8}];
Do [
t[[n+1,1]]=MELT[[n,1]];
t[[n+1,2]]=MELT[[n,2]];
t[[n+1,3]]=ToString[MELT[[n,3]] ];
t[[n+1,4]]=MELT[[n,4]];
t[[n+1,5]]=MELT[[n,5]];
t[[n+1,6]]=MELT[[n,6]];
t[[n+1,7]]=ToString[MELT[[n,7]] ];
t[[n+1,8]]=ToString[MELT[[n,8]] ],
{n,1,numtyp}];
t[[1]] = {"TypeId","App","Dim","Model","Form","Sha",
"Nod-con","DOF-con"};
Print[TableForm[t,TableAlignments->{Left},
TableDirections->{Column,Row},TableSpacing->{0,2}]];
];
MELT={{"BAR2D.2","STM",1,"BAR","MOM","SEG",1000,{110000}},
{"BAR3D.2","STM",1,"BAR","MOM","SEG",1000,{111000}},
{"QLAM.4","STM",2,"LAMINA","ISO","QU1",1000,{110000}}};
PrintMasterElementLibraryTable[MELT];
Cell14.4OutputfromtheProgramofCell14.3
TypeId App Dim Model Form Sha Nod-con DOF-con
BAR2D.2 STM 1 BAR MOM SEG 1000 {110000}
BAR3D.2 STM 1 BAR MOM SEG 1000 {111000}
QLAM.4 STM 2 LAMINA ISO QU1 1000 {110000}
latterissuppliedasalistofsevenitems.Beforeenteringthefirstelementtype,theMELT shouldbe
initializedbyastatementsuchasMELT=f g.
ThestatementsfollowingDefineIndividualNode inCell14.1testthemodulebybuildingaMELT
withseveralelementtypes,whichisthenprintedwiththemodulePrintMasterElementLibraryTable
describedbelow.TheoutputisshowninCell14.2.
§14.3.2PrintingtheMELT
ModulePrintMasterElementLibraryTable,listedinCell14.3,printstheMELT inatabular
14–11
Chapter 14:THE MASTER ELEMENT LIBRARY
14–12
format.ItsonlyinputargumentistheMELT.Themoduleistestedbythestatementsthatfollowit,
whichbuildanMNDTdirectlyandprintit.
14–12
-
15
Implementation of
One-Dimensional
Elements
15–1
Chapter 15:IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS
15–2
ThepresentChapterillustrates,throughspecificexamples,theprogrammingofone-dimensional
elements:barsandbeams,usingMathematicaasimplementationlanguage.
§15.12DBARELEMENT
Thetwo-node,prismatic,two-dimensionalbarelementisshowninFigure15.1.Ithastwonodes
andfourdegreesoffreedom.Theelementnodedisplacementsandcongugateforcesare
u
.e/
D
2
6
4
u
x1
u
y1
u
x2
u
y2
3
7
5
;f
.e/
D
2
6
4
f
x1
f
y1
f
x2
f
y2
3
7
5
:.15:1/
Theelementgeometryisdescribedbythecoordinatesx
i
;y
i
,iD 1;2ofthetwoendnodes.Thetwo
materialpropertiesinvolvedinthestiffnessandmasscomputationsarethemodulusofelasticityE
andthemassdensityperunitvolume½.Theonlyfabricationpropertyrequiredisthecrosssection
areaA.Allofthesepropertiesareconstantovertheelement.
E, A, y
x
2 (x , y )
22
1 (x , y )
1
1
y
x
Figure1.Planebarelement.
§15.1.1ElementFormulation
Theelementstiffnessmatrixforthe2Bbarelementisgivenby(cf.IFEMChapter3):
K
.e/
D
EA
`
2
6
4
c
2
sc¡c
2
¡sc
scs
2
¡sc¡s
2
¡c
2
¡scc
2
sc
¡sc¡s
2
scs
2
3
7
5
D
E
.e/
A
.e/
`
3
2
6
4
1x
2
1x1y¡1x
2
¡1x1y
1x1y1y
2
¡1x1y¡1y
2
¡1x
2
¡1x1y1x
2
1x1y
¡1x1y¡1y
2
1x1y1y
2
3
7
5
:
.15:2/
HerecD cosÁ D 1x=`,sD sinÁ D 1y=`,inwhich1xD x
2
¡ x
1
,1yD y
2
¡ y
1
,`D
p
1x
2
C1y
2
,andÁ istheangleformedbyNxandx,measuredfromxpositivecounterclockwise
15–2
15–3§
15.1 2D BAR ELEMENT
Cell15.1MathematicaModulestoFormStiffnessandMassMatrices
ofa2-Node,2DPrismaticBarElement
Stiffness2DBar[{{x1_,y1_},{x2_,y2_}},{Em_,rho_},{A_}]:= Module[
{dx,dy,len3,Ke},dx=x2-x1;dy=y2-y1;
len3=(dx^2+dy^2)*PowerExpand[Sqrt[dx^2+dy^2]];
Ke=(Em*A/len3)*{{ dx^2,dx*dy,-dx^2,-dx*dy},
{ dx*dy,dy^2,-dy*dx,-dy^2},
{-dx^2,-dy*dx,dx^2,dy*dx},
{-dy*dx,-dy^2,dy*dx,dy^2}};
Return[Ke]
];
ConsistentMass2DBar[{{x1_,y1_},{x2_,y2_}},{Em_,rho_},{A_}]:= Module[
{dx,dy,len,Me},dx=x2-x1;dy=y2-y1;
len=PowerExpand[Sqrt[dx^2+dy^2]];
Me=(rho*A*len/6)*{{2,0,1,0},{0,2,0,1},{1,0,2,0},{0,1,0,2}};
Return[Me]
];
LumpedMass2DBar[{{x1_,y1_},{x2_,y2_}},{Em_,rho_},{A_}]:= Module[
{dx,dy,len,Me},dx=x2-x1;dy=y2-y1;
len=PowerExpand[Sqrt[dx^2+dy^2]];
Me=(rho*A*len/2)*{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}};
Return[Me]
];
(seeFigure15.1).Thelastmatrixexpressionisusefulinsymbolicwork,becauseitenhances
simplificationpossibilities.
Theconsistentandlumpedmassmatrixaregivenby
M
.e/
C
D
½`
6
2
6
4
2010
0201
1020
0102
3
7
5
;M
.e/
L
D
½`
2
2
6
4
1000
0100
0010
0001
3
7
5
;.15:3/
Bothmassmatricesareindependentoftheorientationoftheelement.Forthederivationsee,e.g.,
thebookbyPrzemieniecki,MatrixStructuralAnalysis,Dover,1968.
§15.1.2ElementFormationModules
Cell15.1liststhreeMathematicamodules:
Stiffness2DBar returnstheelementstiffnessmatrixK
.e/
ofa2-node,2-dimensional,prismatic
barelement,givenby(15.2).
15–3
Chapter 15:IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS
15–4
Cell15.2Testof2DBarElementModuleswithNumericalInputs
Ke= Stiffness2DBar[{{0.,0.},{10.,10.}},{1000.,1/6},{2*Sqrt[2.]}];
Print["\nNumerical Elem Stiff Matrix:\n"];Print[Ke//TableForm];
Print["Eigenvalues of Ke=",Chop[Eigenvalues[N[Ke]]]];
Print["Symmetry check=",Simplify[Transpose[Ke]-Ke]];
MeC= ConsistentMass2DBar[{{0.,0.},{10.,10.}},{1000.,1/6},{2*Sqrt[2.]}];
Print["\nNumerical Consistent Mass Matrix:\n"];Print[MeC//TableForm];
Print["Eigenvalues of MeC=",Eigenvalues[MeC]];
Print["Symmetry check=",Simplify[Transpose[MeC]-MeC]];
MeL= LumpedMass2DBar[{{0.,0.},{10.,10.}},{1000.,1/6},{2*Sqrt[2.]}];
Print["\nNumerical Lumped Mass Matrix:\n"];Print[MeL//TableForm];
Print["Eigenvalues of MeL=",Eigenvalues[MeL]];
Cell15.3OutputfromTestStatementsofCell15.2
Numerical Elem Stiff Matrix:
100.100.-100.-100.
100.100.-100.-100.
-100.-100.100.100.
-100.-100.100.100.
Eigenvalues of Ke={400.,0,0,0}
Symmetry check={{0.,0.,0.,0.},{0.,0.,0.,0.},{0.,0.,0.,0.},
{0.,0.,0.,0.}}
Numerical Consistent Mass Matrix:
2.22222 0 1.11111 0
0 2.22222 0 1.11111
1.11111 0 2.22222 0
0 1.11111 0 2.22222
Eigenvalues of MeC={3.33333,3.33333,1.11111,1.11111}
Symmetry check={{0.,0.,0.,0.},{0.,0.,0.,0.},{0.,0.,0.,0.},
{0.,0.,0.,0.}}
Numerical Lumped Mass Matrix:
3.33333 0 0 0
0 3.33333 0 0
0 0 3.33333 0
0 0 0 3.33333
Eigenvalues of MeL={3.33333,3.33333,3.33333,3.33333}
15–4
15–5§
15.1 2D BAR ELEMENT
Cell15.4Testof2DBarElementModuleswithSymbolicInputs
Ke= Stiffness2DBar[{{0,0},{L,0}},{Em,rho},{A}];Ke=Simplify[Ke];
Print["Symbolic Elem Stiff Matrix:\n"];Print[Ke//InputForm];
Print["Eigenvalues of Ke=",Eigenvalues[Ke]//InputForm];
MeC= ConsistentMass2DBar[{{0,0},{L,0}},{Em,rho},{A}];MeC= Simplify[MeC];
Print["\nSymbolic Consistent Mass Matrix:\n"];Print[MeC//InputForm];
Print["\nEigenvalues of MeC=",Eigenvalues[MeC]//InputForm];
Print["Squared frequencies=",Simplify[Eigenvalues[Inverse[MeC].Ke]]//
InputForm];
MeL= LumpedMass2DBar[{{0,0},{L,0}},{Em,rho},{A}];MeL= Simplify[MeL];
Print["\nSymbolic Lumped Mass Matrix:\n"];Print[MeL//InputForm];
Print["\nEigenvalues of MeL=",Eigenvalues[MeL]//InputForm];
Print["Squared frequencies=",Simplify[Eigenvalues[Inverse[MeL].Ke]]//
InputForm];
Cell15.5OutputfromTestStatementsofCell15.4
Symbolic Elem Stiff Matrix:
{{(A*Em)/L,0,-((A*Em)/L),0},{0,0,0,0},
{-((A*Em)/L),0,(A*Em)/L,0},{0,0,0,0}}
Eigenvalues of Ke={0,0,0,(2*A*Em)/L}
Symbolic Consistent Mass Matrix:
{{(A*L*rho)/3,0,(A*L*rho)/6,0},{0,(A*L*rho)/3,0,(A*L*rho)/6},
{(A*L*rho)/6,0,(A*L*rho)/3,0},{0,(A*L*rho)/6,0,(A*L*rho)/3}}
Eigenvalues of MeC={(A*L*rho)/6,(A*L*rho)/6,(A*L*rho)/2,(A*L*rho)/2}
Squared frequencies={0,0,0,(12*Em)/(L^2*rho)}
Symbolic Lumped Mass Matrix:
{{(A*L*rho)/2,0,0,0},{0,(A*L*rho)/2,0,0},{0,0,(A*L*rho)/2,0},
{0,0,0,(A*L*rho)/2}}
Eigenvalues of MeL={(A*L*rho)/2,(A*L*rho)/2,(A*L*rho)/2,(A*L*rho)/2}
Squared frequencies={0,0,0,(4*Em)/(L^2*rho)}
15–5
Chapter 15:IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS
15–6
ConsistentMass2DBar returnstheconsistentmassmatrixM
.e/
C
ofa2-node,2-dimensional,pris-
maticbarelement,givenby(15.3).
LumpedMass2DBar returnsthelumpedmassmatrixM
.e/
L
ofa2-node,2-dimensional,prismaticbar
element,givenby(15.3).
Theargumentsequenceofthethreemodulesisthesame:
[ f f x1,y1g,f x2,y2g g,f Em,rhog,f Ag ]
Herex1,y1 andx2,y2 arethecoordinatesoftheendnodes,andEm,rho andA standforE,½ and
A,respectively.Notethattheargumentsaregroupedintothreelists:
coordinates,materialproperties,fabricationproperties
Thisarrangementwillbeconsistentfollowedforotherelements.
§15.1.3TestingtheBarElementModules
ThemodulesaretestedbythestatementscollectedinCells15.2and15.4.
Cell15.2testsanumericallydefinedelementwithendnodeslocatedat.0;0/and.10;10/,with
ED 1000,AD 2
p
2and½ D 1=6.ExecutingthestatementsinCell15.2producestheresults
listedinCell15.3.Thetestsconsistofthefollowingoperations:
TestingK
.e/
.ThestiffnessmatrixreturnedinKe isprinted.Itsfoureigenvaluesarecomputed
andprinted.Asexpectedthreeeigenvalues,whichcorrespondtothethreeindependentrigidbody
motionsoftheelement,arezero.TheremainingeigenvalueispositiveandequaltoEA=`.The
symmetryofKE isalsochecked.
TestingM
.e/
C
.TheconsistentmassmatrixreturnedinMeL isprinted.Itsfoureigenvaluesare
computedandprinted.Asexpectedtheyareallpositiveandformtwopairs.Thesymmetryisalso
checked.
TestingM
.e/
L
.ThelumpedmassmatrixreturnedinMeL isprinted.Thisisadiagonalmatrixand
consequentlyitseigenvaluesarethesameasthediagonalentries.
Cell15.4testsasymbolicallydefinedelementwithendnodeslocatedat.0;0/and.L;0/,which
isalignedwiththexaxis.TheelementpropertiesE,½ andAarekeptsymbolic.Executingthe
statementsinCell15.4producestheresultsshowninCell15.5.
Thesequenceoftestsonthesymbolicelementisessentiallythesamecarriedoutbefore,buta
frequencytesthasbeenadded.Thisconsistsofsolvingtheone-elementvibrationeigenproblem
K
.e/
v
i
D!
2
i
M
.e/
C
v
i
;K
.e/
v
i
D!
2
i
M
.e/
L
v
i
;.15:4/
where!
i
arecircularfrequenciesandv
i
theassociatedeigenvectorsorvibrationmodeshapes.
Sincethe3rigidbodymodesaresolutionof(15.4),threezerofrequenciesareexpected,which
isbornedoutbythetests.Thesinglepositivenonzerofrequency!
a
> 0correspondstothe
vibrationmodeofaxialextensionandcontraction.Theconsistentmassyields!
2
a
D 12E=.½L
2
/
whereasthelumpedmassyields!
2
a
D 4E=.½L
2
/.Theexactcontinuumsolutionforthisaxial
modeis!
2
a
D ¼
2
E=.½L
2
/.Hencetheconsistentmassoverestimatesthetruefrequencywhereas
thelumpedmassunderestimatesit.
15–6
15–7§
15.2 2D BEAM-COLUMN ELEMENT
1
`
2
E, A, I, u
x1
u
y1
u
x2
u
y2
µ
z1
µ
z2
y
x
Figure15.2.Planebeam-columnelementinitslocalsystem.
1 (x , y )
2 (x , y )
y
y
x
x
22
1
1
Figure15.3.Planebeam-columnelementintheglobalsystem.
§15.1.4MELTDefinition
The2DbarelementisenteredintheMasterElementLibraryTable(MELT)describedinChapter
20,bythestatement
MELT = DefineElementType[MELT,"Bar2D.2"
f"STM",1,"BAR","MOM","SEG",1000,f 110000g g];
Theelementtypenameis"Bar2D.2".Thedescriptorfieldsspecify:
"STM"elementisofstructuraltype
1 intrinsicdimensionalityisone
"BAR"mathematicalmodel
"MOM"formulationisbyMechanicsofMaterials
"SEG"geometryislinesegment
1000 elementhascornernodesonly
f 110000g initializedfreedomsignatureforcornernodes
15–7
Chapter 15:IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS
15–8
§15.22DBEAM-COLUMNELEMENT
Beam-columnelementsmodelstructuralmembersthatresistbothaxialandbendingactions.This
isthecaseinskeletalstructuressuchasbuildings.Aplanebeam-columnelementisacombination
ofaplanebar(suchasthatconsideredin§20.1),andaplanebeam.
Weconsidersuchanelementinitslocalsystem.Nx;Ny/asshowninFigure15.2,andthenintheglobal
system.x;y/asshowninFigure15.3.TheelementThesixdegreesoffreedomandconjugate
nodeforcesoftheelementsare:
N
u
.e/
D
2
6
6
6
6
6
6
4
Nu
x1
Nu
y1
µ
z1
Nu
x2
Nu
y2
µ
z2
3
7
7
7
7
7
7
5
;
N
f
.e/
D
2
6
6
6
6
6
6
4
N
f
x1
N
f
y1
m
z1
Nu
x2
Nu
y2
m
z2
3
7
7
7
7
7
7
5
;u
.e/
D
2
6
6
6
6
6
6
4
u
x1
u
y1
µ
z1
u
x2
u
y2
µ
z2
3
7
7
7
7
7
7
5
;f
.e/
D
2
6
6
6
6
6
6
4
f
x1
f
y1
m
z1
f
x2
f
y2
m
z2
3
7
7
7
7
7
7
5
:.15:5/
Therotationanglesµ andthenodalmomentsmarethesameinthelocalandtheglobalsystems.
Theelementgeometryisdescribedbythecoordinatesx
i
;y
i
,iD 1;2ofthetwoendnodes.Thetwo
materialpropertiesinvolvedinthestiffnessandmasscomputationsarethemodulusofelasticityE
andthemassdensityperunitvolume½.Thefabricationpropertiesrequiredarethecrosssection
areaAandthebendingmomentofinertiaI.Allofthesepropertiesaretakentobeconstantover
theelement.
§15.2.1ElementFormulation
ThestiffnessmatrixofprismaticbeamcolumnelementinthelocalsystemNx,Nyisgivenby
N
K
.e/
D
EI
`
3
2
6
6
6
6
6
6
4
000000
126`0¡126`
4`
2
0¡6`2`
2
000
12¡6`
symm4`
2
3
7
7
7
7
7
7
5
C
EA
`
2
6
6
6
6
6
6
4
100¡100
00000
0000
100
00
symm0
3
7
7
7
7
7
7
5
.15:6/
Thefirstmatrixontherightisthecontributionfromthebending(beam)stiffness,asderivedin
IFEMChapter12,andthesecondisthecontributionfromthebarstiffness.
TheconsistentmassmatrixinthelocalsystemNx,Ny
N
M
.e/
C
D
½A`
420
2
6
6
6
6
6
6
4
000000
15622`054¡13`
4`
2
013`¡3`
2
000
156¡22`
symm4`
2
3
7
7
7
7
7
7
5
C
½A`
6
2
6
6
6
6
6
6
4
200100
00000
0000
200
00
symm0
3
7
7
7
7
7
7
5
.15:7/
15–8
15–9§
15.2 2D BEAM-COLUMN ELEMENT
Cell15.6MathematicaModulestoFormStiffnessandMassMatrices
ofa2-Node,2DPrismaticBeam-ColumnElement
Stiffness2DBeamColumn[{{x1_,y1_},{x2_,y2_}},{Em_,nu_,rho_,alpha_},
{A_,Iz_}]:= Module[{dx,dy,c,s,L,LL,ra,rb,Kebar,Ke},
dx=x2-x1;dy=y2-y1;LL=dx^2+dy^2;L=PowerExpand[Sqrt[LL]];
c=dx/L;s=dy/L;ra=Em*A/L;rb= Em*Iz/L^3;
Kebar= ra*{
{ 1,0,0,-1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},
{-1,0,0,1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}} +
rb*{
{ 0,0,0,0,0,0},{0,12,6*L,0,-12,6*L},{0,6*L,4*LL,0,-6*L,2*LL},
{ 0,0,0,0,0,0},{0,-12,-6*L,0,12,-6*L},{0,6*L,2*LL,0,-6*L,4*LL}};
T={{c,s,0,0,0,0},{-s,c,0,0,0,0},{0,0,1,0,0,0},
{0,0,0,c,s,0},{0,0,0,-s,c,0},{0,0,0,0,0,1}};
Ke=Transpose[T].Kebar.T;
Return[Ke]
];
ConsistentMass2DBeamColumn[{{x1_,y1_},{x2_,y2_}},{Em_,nu_,rho_,alpha_},
{A_,Iz_}]:= Module[{dx,dy,c,s,L,LL,m,MeCbar,MeC},
dx=x2-x1;dy=y2-y1;LL=dx^2+dy^2;L=PowerExpand[Sqrt[LL]];
c=dx/L;s=dy/L;m=rho*L*A;
MeCbar= (m/6)*{
{2,0,0,1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},
{1,0,0,2,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}+
+(m/420)*{
{0,0,0,0,0,0},{0,156,22*L,0,54,-13*L},{0,22*L,4*LL,0,13*L,-3*LL},
{0,0,0,0,0,0},{0,54,13*L,0,156,-22*L},{0,-13*L,-3*LL,0,-22*L,4*LL}};
T={{c,s,0,0,0,0},{-s,c,0,0,0,0},{0,0,1,0,0,0},
{0,0,0,c,s,0},{0,0,0,-s,c,0},{0,0,0,0,0,1}};
MeC=Transpose[T].MeCbar.T;
Return[MeC]
];
LumpedMass2DBeamColumn[{{x1_,y1_},{x2_,y2_}},{Em_,nu_,rho_,alpha_},
{A_,Iz_}]:= Module[{dx,dy,dxdx,dxdy,dydy,L,MeL},
dx=x2-x1;dy=y2-y1;L=PowerExpand[Sqrt[dx^2+dy^2]];
MeL=(rho*A*L/2)*{{1,0,0,0,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},
{0,0,0,1,0,0},{0,0,0,0,1,0},{0,0,0,0,0,0}};
Return[MeL]
];
ThefirstmatrixontheRHSisthecontributionfromthebending(beam)inertiaandthesecondfrom
theaxial(bar)inertia.TheseexpressionsaregiveninPrzemieniecki,loccit..
15–9
Chapter 15:IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS
15–10
Cell15.7Testof2DBeam-ColumnElementModuleswithNumericalInputs
geom={{0,0},{5,0}};mat={200,0,1/30,0};fab={1/4,3};
Ke= Stiffness2DBeamColumn[geom,mat,fab];
Print["\nNumerical Elem Stiff Matrix:\n"];Print[Ke//InputForm];
Print["Eigenvalues of Ke=",Chop[Eigenvalues[N[Ke]]]];
Print["Symmetry check=",Simplify[Transpose[Ke]-Ke]];
MeC= ConsistentMass2DBeamColumn[geom,mat,fab];
Print["\nNumerical Consistent Mass Matrix:\n"];Print[MeC//InputForm];
Print["Eigenvalues of MeC=",Eigenvalues[N[MeC]]];
Print["Squared vibration frequencies (consistent)=",
Chop[Eigenvalues[Inverse[MeC].N[Ke]],10^(-7)]];
Print["Symmetry check=",Simplify[Transpose[MeC]-MeC]];
MeL= LumpedMass2DBeamColumn[geom,mat,fab];
Print["\nNumericaL Lumped Mass Matrix:\n"];Print[MeL//InputForm];
Print["Eigenvalues of MeL=",Eigenvalues[N[MeL]]];
MeL[[3,3]]=MeL[[6,6]]=1/10000000;
Print["Squared vibration frequencies (lumped)=",
Chop[Eigenvalues[Inverse[MeL].N[Ke]],10^(-7)]];
Thedisplacementtransformationmatrixbetweenlocalandglobalsystemis
N
u
.e/
D
2
6
6
6
6
6
6
4
Nu
x1
Nu
y1
µ
z1
u
x2
Nu
y2
µ
z2
3
7
7
7
7
7
7
5
D
2
6
6
6
6
6
6
4
cs0cs0
¡sc0¡sc0
001001
cs0cs0
¡sc0¡sc0
001001
3
7
7
7
7
7
7
5
2
6
6
6
6
6
6
4
u
x1
u
y1
µ
z1
u
x2
u
y2
µ
z2
3
7
7
7
7
7
7
5
D Tu
.e/
.15:8/
wherecD cosÁ,sD sinÁ,andÁ istheanglebetweenNxandx,measuredpositive-counterclockwise
fromx;seeFigure15.3.Thestiffnessandconsistentmassmatrixintheglobalsystemareobtained
throughthecongruentialtransformationK
.e/
D T
T
N
K
.e/
T;M
.e/
C
D T
T
N
M
.e/
T.
Thelumpedmassmatrixisdiagonalandisthesameinthelocalandglobalsystems:
M
.e/
L
D
N
M
.e/
L
D
½`
2
2
6
6
6
6
6
6
4
100000
010000
000000
000100
000010
000000
3
7
7
7
7
7
7
5
:.15:9/
Thisformhaszerorotationalmassandhencesingular.SometimesitisdesirabletoinvertM
.e/
L
explicitly.Ifsoitisusefultoreplacethezerosinlocations.3;3/and.6;6/byasmallnumber².
15–10
15–11§
15.2 2D BEAM-COLUMN ELEMENT
Cell15.8OutputfromTestStatementsofCell15.7
Numerical Elem Stiff Matrix:
{{5058/125,-2856/125,-576/5,-5058/125,2856/125,-576/5},
{-2856/125,3392/125,432/5,2856/125,-3392/125,432/5},
{-576/5,432/5,480,576/5,-432/5,240},
{-5058/125,2856/125,576/5,5058/125,-2856/125,576/5},
{2856/125,-3392/125,-432/5,-2856/125,3392/125,-432/5},
{-576/5,432/5,240,576/5,-432/5,480}}
Eigenvalues of Ke={835.2,240.,20.,0,0,0}
Symmetry check={{0,0,0,0,0,0},{0,0,0,0,0,0},
{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},
{0,0,0,0,0,0}}
Numerical Consistent Mass Matrix:
{{313/21000,-2/2625,-11/1260,83/14000,2/2625,13/2520},
{-2/2625,911/63000,11/1680,2/2625,803/126000,-13/3360},
{-11/1260,11/1680,5/504,-13/2520,13/3360,-5/672},
{83/14000,2/2625,-13/2520,313/21000,-2/2625,11/1260},
{2/2625,803/126000,13/3360,-2/2625,911/63000,-11/1680},
{13/2520,-13/3360,-5/672,11/1260,-11/1680,5/504}}
Eigenvalues of MeC={0.0365449,0.0208333,0.0121748,0.00694444,
0.00164952,0.000424401}
Squared vibration frequencies (consistent)=
{967680.,82944.,2880.,0,0,0}
Symmetry check={{0,0,0,0,0,0},{0,0,0,0,0,0},
{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},
{0,0,0,0,0,0}}
NumericaL Lumped Mass Matrix:
{{1/48,0,0,0,0,0},{0,1/48,0,0,0,0},{0,0,0,0,0,0},
{0,0,0,1/48,0,0},{0,0,0,0,1/48,0},{0,0,0,0,0,0}}
Eigenvalues of MeL={0.0208333,0.0208333,0.0208333,0.0208333,0.,0.}
Squared vibration frequencies (lumped)=
9 9
{7.20001 10,2.4 10,960.,0,0,0}
§15.2.2ElementFormationModules
Cell15.6liststhreeMathematicamodules:
Stiffness2DBarColumn returnstheelementstiffnessmatrixK
.e/
ofa2-node,2-dimensional,
prismaticbarelement,givenby(15.8).
ConsistentMass2DBarColumn returnstheconsistentmassmatrixM
.e/
C
ofa2-node,2-
dimensional,prismaticbarelement,givenby(15.9).
LumpedMass2DBarColumn returnsthelumpedmassmatrixM
.e/
L
ofa2-node,2-dimensional,pris-
maticbarelement,givenby(15.9).
15–11
Chapter 15:IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS
15–12
Cell15.9Testof2DBeam-ColumnElementModuleswithSymbolicInputs
ClearAll[L,Em,rho,A,Iz];
geom={{0,0},{L,0}};mat={Em,0,rho,0};fab={A,Iz};
Ke= Stiffness2DBeamColumn[geom,mat,fab];Ke=Simplify[Ke];
Print["Symbolic Elem Stiff Matrix:\n"];Print[Ke//InputForm];
Print["Eigenvalues of Ke=",Eigenvalues[Ke]//InputForm];
MeC= ConsistentMass2DBeamColumn[geom,mat,fab];MeC= Simplify[MeC];
Print["\nSymbolic Consistent Mass Matrix:\n"];Print[MeC//InputForm];
Print["\nEigenvalues of MeC=",Eigenvalues[MeC]//InputForm];
Print["Squared frequencies=",Simplify[Eigenvalues[Inverse[MeC].Ke]]//
InputForm];
MeL= LumpedMass2DBeamColumn[geom,mat,fab];
MeL= Simplify[MeL];MeL[[3,3]]=MeL[[6,6]]=eps;
Print["\nSymbolic Lumped Mass Matrix:\n"];Print[MeL//InputForm];
Print["\nEigenvalues of MeL=",Eigenvalues[MeL]//InputForm];
Print["Squared frequencies=",Simplify[Eigenvalues[Inverse[MeL].Ke]]//
InputForm];
Theargumentsequenceofthethreemodulesisthesame:
[ f f x1,y1g,f x2,y2g g,f Em,nu,rho,alphag,f A,Izg ]
Herex1,y1 andx2,y2 arethecoordinatesoftheendnodes,andEm,nu,rho,alpha A andIz
standforE,º,½,® AandI,respectively.Ofthesenu andalpha arenotusedbutareincludedfor
futureuse.Asusualtheargumentsaregroupedintothreelists:
coordinates,materialproperties,fabricationproperties
Thisarrangementisconsistentfollowedforallelements.
§15.2.3TestingtheBar-ColumnElementModules
ThemodulesaretestedbythestatementscollectedinCells15.7and15.9.
Cell15.7testsanumericallydefinedelementwithendnodeslocatedat.0;0/and.5;0/respectivelt,
withED 200,½ D 1=30,AD 1=4andID 3.ExecutingthestatementsinCell15.7producesthe
resultslistedinCell15.8.Thetestsconsistofthefollowingoperations:
TestingK
.e/
.ThestiffnessmatrixreturnedinKe isprinted.Its6eigenvaluesarecomputedand
printed.Asexpectedthreeeigenvalues,whichcorrespondtothethreeindependentrigidbody
motionsoftheelement,arezero.Theremainingthreeeigenvaluesarepositive.Thesymmetryof
Ke isalsochecked.
TestingM
.e/
C
.TheconsistentmassmatrixreturnedinMeC isprinted.Itssymmetryischecked.The
15–12
15–13§
15.2 2D BEAM-COLUMN ELEMENT
Cell15.10OutputfromTestStatementsofCell15.9
Symbolic Elem Stiff Matrix:
{{(A*Em)/L,0,0,-((A*Em)/L),0,0},
{0,(12*Em*Iz)/L^3,(6*Em*Iz)/L^2,0,(-12*Em*Iz)/L^3,(6*Em*Iz)/L^2},
{0,(6*Em*Iz)/L^2,(4*Em*Iz)/L,0,(-6*Em*Iz)/L^2,(2*Em*Iz)/L},
{-((A*Em)/L),0,0,(A*Em)/L,0,0},
{0,(-12*Em*Iz)/L^3,(-6*Em*Iz)/L^2,0,(12*Em*Iz)/L^3,
(-6*Em*Iz)/L^2},{0,(6*Em*Iz)/L^2,(2*Em*Iz)/L,0,(-6*Em*Iz)/L^2,
(4*Em*Iz)/L}}
Eigenvalues of Ke={0,0,0,(2*A*Em)/L,(2*Em*Iz)/L,
(6*Em*Iz*(4 + L^2))/L^3}
Symbolic Consistent Mass Matrix:
{{(A*L*rho)/3,0,0,(A*L*rho)/6,0,0},
{0,(13*A*L*rho)/35,(11*A*L^2*rho)/210,0,(9*A*L*rho)/70,
(-13*A*L^2*rho)/420},{0,(11*A*L^2*rho)/210,(A*L^3*rho)/105,0,
(13*A*L^2*rho)/420,-(A*L^3*rho)/140},
{(A*L*rho)/6,0,0,(A*L*rho)/3,0,0},
{0,(9*A*L*rho)/70,(13*A*L^2*rho)/420,0,(13*A*L*rho)/35,
(-11*A*L^2*rho)/210},{0,(-13*A*L^2*rho)/420,-(A*L^3*rho)/140,0,
(-11*A*L^2*rho)/210,(A*L^3*rho)/105}}
Eigenvalues of MeC={(A*L*rho)/6,(A*L*rho)/2,
(-(A*L*(-2040 - 20*L^2)*rho) -
(-33600*A^2*L^4*rho^2 + A^2*L^2*(-2040 - 20*L^2)^2*rho^2)^(1/2))/
16800,(-(A*L*(-2040 - 20*L^2)*rho) +
(-33600*A^2*L^4*rho^2 + A^2*L^2*(-2040 - 20*L^2)^2*rho^2)^(1/2))/
16800,(-(A*L*(-360 - 12*L^2)*rho) -
(-2880*A^2*L^4*rho^2 + A^2*L^2*(-360 - 12*L^2)^2*rho^2)^(1/2))/1440,
(-(A*L*(-360 - 12*L^2)*rho) +
(-2880*A^2*L^4*rho^2 + A^2*L^2*(-360 - 12*L^2)^2*rho^2)^(1/2))/1440}
Squared frequencies={0,0,0,(720*Em*Iz)/(A*L^4*rho),
(8400*Em*Iz)/(A*L^4*rho),(12*Em)/(L^2*rho)}
Symbolic Lumped Mass Matrix:
{{(A*L*rho)/2,0,0,0,0,0},{0,(A*L*rho)/2,0,0,0,0},
{0,0,eps,0,0,0},{0,0,0,(A*L*rho)/2,0,0},
{0,0,0,0,(A*L*rho)/2,0},{0,0,0,0,0,eps}}
Eigenvalues of MeL={eps,eps,(A*L*rho)/2,(A*L*rho)/2,(A*L*rho)/2,
(A*L*rho)/2}
Squared frequencies={0,0,0,(2*Em*Iz)/(eps*L),(4*Em)/(L^2*rho),
(6*Em*Iz)/(eps*L) + (48*Em*Iz)/(A*L^4*rho)}
sixeigenvaluesarecomputedandprinted.Asexpectedtheyareallpositive.Afrequencytestis
alsocarriedout.
TestingM
.e/
L
.ThelumpedmassmatrixreturnedinMeL isprinted.Thisisadiagonalmatrixand
consequentlyitseigenvaluesarethesameasthediagonalentries.Afrequencytestiscarriedout.
15–13
Chapter 15:IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS
15–14
Cell15.9testsasymbolicallydefinedelementwithendnodeslocatedat.0;0/and.L;0/,whichis
alignedwiththexaxis.TheelementpropertiesE,½,AandIarekeptinsymbolicform.Executing
thestatementsinCell15.9producestheresultsshowninCell15.10.
ThesequenceoftestsonthesymbolicelementissimilartothatinCell15.7.Thevibration
eigenproblemsare
K
.e/
v
i
D!
2
i
M
.e/
C
v
i
;K
.e/
v
i
D!
2
i
M
.e/
L
v
i
;.15:10/
where!
i
arecircularfrequenciesandv
i
theassociatedeigenvectorsorvibrationmodeshapes.
Becausethe3rigidbodymodesaresolutionof(15.10),threezerofrequenciesareexpectedfor
theconsistentmasseigenproblem,whichisbornedoutbythetests.Thethreepositivenonzero
frequenciescorrespondstoonefree-freeaxialandtwofree-freebendingmodes.Theconsistentmass
yieldsforthelatter!
2
D 720EI=.½AL
4
/and!
2
D 8400EI=.½AL
4
/whereastheexactcontinuum
solutionforthefirsttwofree-freebendingfrequenciesare502EI=.½AL
4
/and1382EI=.½AL
4
/.
Thelumpedmassvibrationeigenproblemyieldsthreezerofrequencies,twoinfinitefrequencies
(associatedwithzerorotationalmass)andonefinitepositiveaxialvibrationfrequency,whichisthe
sameasthatprovidedbythebarelement.Nofinitefrequencybendingmodesareobtained;that
requiresadiscretizationoftwoormoreelements.
§15.2.4MELTDefinition
The2Dbeam-columnelementisenteredintheMasterElementLibraryTable(MELT)describedin
Chapter20,bythestatement
MELT = DefineElementType[MELT,"BeamC2D.2",
f"STM",1,"PBEAC1","MOM","SEG",1000,f 110001g g];
Theelementtypenameis"BeamCol2D.2".Thedescriptorfieldsspecify:
"STM"elementisofstructuralmechanicstype
1 intrinsicdimensionalityisone
"PBEAC1"mathematicalmodel:C
1
planebeam-column
"MOM"formulationisbyMechanicsofMaterials
"SEG"geometryislinesegment
1000 elementhascornernodesonly
f 110001g initializedfreedomsignatureforcornernodes
15–14
ASEN4519/5519SecIVFiniteElementProgrammingwithMathematica
HomeworkAssignmentforChapters1-2
DueMondaySeptember22,1997
Seebackofthispageforhomeworkguidelinesandcoursematerialaccess.
EXERCISE1
ReadChapter1,concentratingonthedescriptionofdatastructures.Explainwhyalist,asusedforexample
inMathematica,ismoregeneralthanaFortranorCarray.
EXERCISE2Note:DothisonebeforeMondaySep14toshowmehowitworksattheITLLduringclass
DownloadfromtheWeb(seehomepageaddressontheback)theNotebookfilesforChapter2.*Executethe
programsinCells2.1,2.3,and2.5oftheNotes,whichareonseparateNotebookcells,andverifythatthe
answeristhatgiveninCells2.2,2.4and2.6.[Don’tpayattentionto2.7-2.8].Asanswertothisexercise
documentanyproblemsorglitchesyoumayhaveexperiencedintheprocess.
EXERCISE3
WriteaMathematicamoduleGenerateTwoDimNodeLattice[a,b,m,n] thatgeneratestheMasterNode
DefinitionTable(MNDT)foraregularm£ntwo-dimensionallatticegridthatlookslike
m nodes this way (in the figure, m=7)
n nodes this way
(in the figure, n=3)
b
a
1
4
52
3
x
y
z
Placethecoordinateaxesandnumberthenodesasillustratedinthediagram.Oncethemoduleworks,runit
foraD 18,bD 6,mD 7,nD 3andprinttheMNDT bycallingPrintMasterNodeDefinitionTable.
ThenwriteamodulePlotTwoDimNodeLattice[MNDT] thatplotsthegridbymarkingthelocationofthe
nodesassmallcircles,asinthefigureabove.[UseofListPlot isrecommended].Runittoproduceagrid
plotforthepreviousnumericalvalues.
OVER
*
TheformatofNotebooksforMathematica2.2and3.0isincompatible,althoughversion3.0canconvert2.2Notebooks.
Sincesomeofyoumayhaveversion2.2onyourPCorMac,bothformatswillbepostedontheWeb.
HOMEWORKGUIDELINES
NormallyoneassignmentwillbegiveneverytwoweeksonMondays,anditwillbeduetwoweeksfromthe
assignmentdate.
StapleHWsolutionssecurely,andwriteyourinitialsoneachpage.AttachtheHWassignmentpageascover,
withfullname(s).
GROUPHOMEWORKISENCOURAGED.Thegroupmaycontain2or3students.Homeworkdoneasa
groupwillbegradedasagroup.Submitonlyonesolutionpergroup,witheverybody’snameonit.
LATEHOMEWORKSWILLNOTBEACCEPTEDFORCREDIT.Thisisaconsequenceofthefactthat
grouphomeworkistherule.IfyouexpecttomissaclasswhenaHWisdue,pleasemakeappropriate
arrangementswiththeinstructorfordeliveringtheHWontime.Ifyouareinagroup,thissituationshould
rarelyhappen.
PRESENTATIONOFCOMPUTERRESULTS.Resultsfromcomputerworkshouldbesubmittedon8.5x11
printedpagesstapledtotherestofthehomework.Becauseallinputandoutputforthecomputercoursework
willbestoredinMathematicaNotebookfiles,youwillneedtogetfamiliarwithproceduresforprinting
selectedcellsandgraphics.If,asoftenhappens,theexpectedoutputisvoluminoustheHWassignmentwill
specifywhichpartisessentialforpresentation.
ACCESSINGTHECOURSEMATERIAL
Allcoursematerial,includinghomeworkassignmentsandsolutions,willbepostedontheWebatthehomepage:
http://caswww.colorado.edu/courses.d/MIFEM.d/Home.html
Clickontheappropriateentry.YouwillneedaPDFviewer,forexamplethatsuppliedwithNetscape3.0,to
viewandprintthefiles.
HomeworkassignmentswillalsobepostedontheWeb,withlinksfromtheabovehomepage.
ASEN4519/5519SecIVFiniteElementProgrammingwithMathematica
HomeworkAssignmentforChapters3-6
DueMondayOctober6,1997
EXERCISE1
WriteacoupleofparagraphsexplainingtheMEDT andtheMELT,andwhatkindofinformationis
storedthere.Detailsregardingelementdescriptorsaswellasconstitutiveandfabricationproperties
neednotbeincluded.
EXERCISE2
DownloadfromtheWebtheNotebookfilesforChapters4,5and6.*Executetheprogramsinthe
inputCellsofChapters4,5and6oftheNotes,whichareonseparateNotebookcells,andverifythat
theansweristhatgivenintheoutputCells.Reportbye-mailanydiscrepanciesordifficulties.
EXERCISE3
WriteaMathematicaprogramthatdefinesthenodesandelementsoftheplanerooftrussdepictedin
Figure1,andprinttheMNDT,MEDT andMELT datastructures.Gettheelasticmodulifrommanuals.
YouwillneedtobuiltaMELT thataccomododatesthiselementtype(the2-nodebar),followingthe
guidelinesoftheNotes.Calltheelementtype"BAR2D.2".
Geometricandmember-fabricationpropertiesofthetrussareshownintheFigure.Donotworry
aboutsupportconditionsfornow;thesewillbehandledaspartofthefreedomdata(Chapter7).
1
2
3
4
5
6
7
8
9
10
11
12
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)(9)
(10)(11)
(12)
(13)
(14)
(19)
(15)
(20)
(21)
(17)
(22)
(18)
Numbers enclosed in parentheses are element numbers. Use
"Bar.1" as external name for member (1), etc.
Member fabrication:
1- 12 Douglas fir rectangular section: 2 in x 6 in
13-18 (struts) Douglas fir rectangular section: 2 in x 4 in
19-22 (diagonals) ASTM A-36 steel full circular section: 1/2 in diameter 288 in, 6 equal subspans
54 in
Figure1.TrussstructureforExercise3.
OVER
*
Theformatof“.ma”NotebooksforMathematica2.2and“.nb”Notebooks3.0isincompatible,althoughversion3.0
canconvert2.2Notebooks.Becausesomeofyoumayhaveversion2.2onyourPCorMac,bothformatsarepostedon
theWeb.
EXERCISE4
WriteaMathematicamoduleGenerateTwoDimElementLattice[a,b,me,ne] thatgeneratesthe
MasterElementDefinitionTable(MEDT)fortheregularm
e
£n
e
meshof4-nodequadrilateralplane-
stresselementsillustratedinFigure2.CalltheelementtypeQUAD4.LAM.Allelementsareidentical.
Identifythemas"QUAD.1",”QUAD.2",etc.Leavetheconstitutiveandfabricationpropertiesin
symbolicform,accessibleviaconstitutiveandfabricationcodesof1.
x
y
z
elements this way (in the figure, = 6)
nodes this way
(in the figure, = 2)
b
a
1
4
5
2
3
e
m
e
m
e
n
e
n
(1)
(3)
(5)
(4)
(2)
Figure2.MeshforExercise4.
Placetheaxes,andnumberelementandnodesasillustratedinthediagram.Oncethemoduleworks,
runitforaD 18,bD 6,m
e
D 7,n
e
D 3andprinttheMEDT andMNDT.[Forthelatterusethe
moduledevelopedintheprevioushomework;notethatm=me+1 andn=ne+1.]Thenwriteamodule
PlotTwoDimElemLattice[MEDT,MELT,MNDT]thatdrawsthemeshelementbyelementanddepicts
theelementsidesnodes.YouwillneedtouseMathematicagraphicprimitivesforthistask.
ASEN4519/5519SecIVFiniteElementProgrammingwithMathematica
HomeworkAssignmentforChapter7andcompletionoflastone
DueMondayOctober20,1997
EXERCISE0(notgraded)
DownloadfromtheWebtheNotebookfilesofChapter7.ExecutetheinputCells,andverifythatthe
answeristhatgivenintheoutputCellsoftheNotes.Reportanydiscrepanciesordifficulties.
EXERCISE1
Fortheplanetrussstructureofthesecondhomework,constructrealisticConstitutiveandFabrication
Tables(useanyformatyoulikeforthepropertylists),andincludeatableprintout.
EXERCISE2
Fortheplanetrussstructureofthesecondhomework,reusetheMNDT andMEDT fromthatExerciseand
theMFPT fromtheaboveone.AlsoconstructanappropriateMELT thatincludesthedefinitionofatruss
element.
FeedintoMNFT=InitializeMasterNodeFreedomTable[MNDT,MEDT,MELT,MFPT] andprintthe
MNFT.Allnodesshouldcomeupwithsignature110000.Iftheydont,workbackwardstofixthe
inputtablesuntilthathappens.
EXERCISE3
UseGenerateToDimNodeLattice[a,b,ne+1,me+1] ofthefirsthomeworktobuildtheMNDTand
GenerateTwoDimElementLattice[a,b,me,ne] ofthesecondhomeworktobuildtheMEDT ofa
regularFEquadmeshforaD 18,bD 6,m
e
D 7,n
e
D 3.
FeedtoMNFT=InitializeMasterNodeFreedomTable[MNDT,MEDT,MELT,MFPT].Allnodesshould
comeoutwithfreedomsignatureof110000.
Writeamodulethatfixesthetwoassignedfreedomstx andty ofthen
e
nodes1,2,...ne+1 ofthe
leftend,andprescribesauniformloadofw D 120(forceperunitlength)actinginthexdirectionon
then
e
nodesoftherightend.Youwillneedtocomputethenodeforcesbylumpingthecontributions
wb=n
e
ofeachelementtothosenodes.VerifythesettingsbyprintingtheMNFT andMNST.
EXERCISE4
InvestigatewhetherMathematicacoulddrawsymbolsnearnodestomarkboundaryconditionsof2D
problemsgiventhenDL andfDL ofthatnode.Forexample,symbolsshowninthefigurebelow.Think
ofotherpossiblesymbolsthatmayshowbetterand/ormaybeeasiertodraw.[Letyouimaginationrun
wild].
¯
Translation tx known (two
possible symbols)
Rotation rx known (two
possible symbols)
Moment rx known and nonzero (two
possible symbols)
Force qx known and
nonzero (two
possible symbols)
ASEN4519/5519SecIVFiniteElementProgrammingwithMathematica
HomeworkAssignmentforMasterStiffnessAssembler-Chapter13
DueMondayNovember24,1997-Noteoneweekspan!
Forthefollowingexercises,usethefilespostedintheWebsiteforChapter13andrelatedMathe-
maticafiles.
EXERCISE1
TesttheassemblermoduleforthestructureofFigures13.2-3,andcheckthatitproducestheanswers
obtainedbyhandcomputationsin§13.2.
EXERCISE2
Asabove,forthestructureofFigure13.4,whichincludestheMFCu
y1
D u
y3
.
EXERCISE3
AddasecondMFCtothestructureofFigure13.4:u
x1
C u
x2
C u
x3
C u
x4
C u
x5
D 0,which
expressesthefactthatthemeanhorizontaldisplacementiszero.Thisconstraintconnectsallnodes.
Thenumberofglobalfreedomsincreaseto13.Theskylinearraysizeincreasesto68C13D 81.
IncorporatethatconstraintintheMEDT andMFCT,adjusttheotherconnectivitytablesaccordingly,*
runtheassemblerandreportresults.
*Forthisyouneedtostudytheinputsoftheassembler
ASEN4519/5519SecIVFiniteElementProgrammingwithMathematica
HomeworkAssignmentforRunningCompleteBeam-TrussProblem-Chapter16
DueMondayDecember1,1997-Noteoneweekspan!
Forthefollowingexercises,downloadtheMathematica2.2orMathematica3.0Notebookfile
CompleteProgBeamTruss.ma orCompleteProgBeamTruss.nb postedinthecourseWebsiteas
partofChapter16.
EXERCISE1
Commentontheoverallprogramorganization,especiallythatofthelast3inputcells.
EXERCISE2
ConverttoMathematica3.0ifnecessary,andruntheproblembyexecutingthelastinputcell(all
precedingmodulecellsmustbeinitialized).
EXERCISE3
Commentonthesolutionoutputprintoutproducedinthelastoutputcell.
ASEN4519/5519SecIVFiniteElementProgrammingwithMathematica
HomeworkAssignmentforBeam-TrussVibrationAnalysis-Chapter17
DueMondayDecember8,1997-LastHomeworkAssignment
Forthefollowingexercises,downloadtheMathematica2.2orMathematica3.0Notebookfile
ComplProgBeamTrussVibration.ma orComplProgBeamTrussVibration.nb postedinthe
courseWebsiteaspartofChapter17.
EXERCISE1
CommentonhowthevibrationeigenproblemhasbeensetupandsolvedusingtheMathematica
built-inEigensystem function.
EXERCISE2
Theanimationofvibrationmodeshapesonlyworksifonedisplaysasinglemode(modenumber10
inthesampleNotebook).Ifonetriedtodisplay2modes,say10and11,thesequenceof6graphic
cellsgetsintermixedwhenonetriestoanimateagroup.Isthereawaytoseparatetheanimations?
TakeHomeExam
Iwillconsultontheformofthetake-homeexamtobeassignedonDecember8th.Thismaybe
postedtotheWebearlier.
Автор
dima202
dima202579   документов Отправить письмо
Документ
Категория
Наука
Просмотров
174
Размер файла
1 535 Кб
Теги
fem, mathematica
1/--страниц
Пожаловаться на содержимое документа