DOC PREVIEW
Introduction to OpenSees and Tcl

This preview shows page 1-2-3-25-26-27 out of 27 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Frank McKennaUC BerkeleyIntroduction toOpenSees and TclOpenSees Parallel WorkshopBerkeley, CAWhat is OpenSees?• A software framework for developing sequential, paralleland grid-enabled finite element applications in earthquakeengineering.• It is written primarily in the object-oriented programminglanguage C++.• C++ wrappers are provided so that legacy and newprocedures (elements, materials, numerical routines)written in other languages C, Fortran can be used.• Funding for OpenSees has been provided by:– PEER (Pacific Earthquake Enginering Research Center)– NEES (George E. Brown, Jr. Network for Earthquake EngineeringSimulation) through NEESit.– NSF (National Science Foundation)The Open System for Earthquake Engineering Simulation is:What is a Software Framework?• A framework is NOT an executable.• A framework IS a set of cooperating software components forbuilding applications in a specific domain.• In object-oriented terms, a framework is a collection ofabstract and concrete classes. The abstract classes define howthe classes interact, the concrete classes are classes users canuse to build applications.• A framework dictates the architecture of the application. Agood design will cover the majority of applications within thedomain.• Loose-coupling of components within the framework isessential for extensibility and re-usability of the applications.• In object-oriented programming, theprogram is seen as a collection ofobjects. Each object is capable ofreceiving messages, processing data, andsending messages to other objects.• Each object is of a particular type orClass. The class defines the data andmethods of an object.• 3 basic relationships between classes1. IS-A (Truss is an Element)2. KNOWS-A (Truss knows a Node)3. HAS-A (Truss has a Material)Object-Oriented Programming TrussgetTangent()getResidual()A ElementgetTangent()getResidual()NodeMaterial1234Simulation FrameworkConceptual Approach for SimulationInformationTechnologySoftware framework,Databases, Visualization,Internet/grid computationComputationAlgorithms & Solvers(Sequential, Parallel, Distribued)ModelsMaterial &Element ModelsMain Abstractions in OpenSeesDomainModelBuilder AnalysisRecorderConstructs the objectsin the model and addsthem to the domain.Monitors user definedparameters in themodel during theanalysisMoves the modelfrom state at time t tostate at time t + dtHolds the state of the modelat time t and (t + dt)iRecorderElementRecorderNodeRecorderEnvelopeNodeRecorderEnvelopElementRecordrRecorder Types in OpenSeesFileMySQLOracleNEESDatabaseDataOutputHandlerStreamHandlerFileHandlerDatabaseHandler}Renderer}X11OpenGLVRMLDatebaseRecorderFilePlotterDisplayDomainElement MP_Constraint SP_ConstraintNode LoadPattern TimeSeriesElementalLoad NodalLoad SP_ConstraintTrussZeroLengthElasticBeamColumnNonlinearBeamColumn(force, displacement)BeamWithHingesQuad(std, bbar, enhanced, u-p)ShellBrick(std, bbar, 20node, u-p, u-p-U)JointGenericClientExperimentalElementConstantLinearRectangularSinePathWhat is in a Domain?Some Other Classes associated with Elements:GeomTransformationLinearPdeltaCorotationalElement in Global SystemElement in Basic SystemGeometric TransformationUvqPOther Classes associated with Elements:MaterialUniaxialElasticElasticPPHardeningConcreteSteelHystereticPY-TZ-QZParallelSeriesGapFatiguenDElasticJ2TemplateElasto-PlastoFluidSolidPorousPressureMultiYield(dependent, independent)SectionElasticFiberAnalysisCHandler AnalysisModel SolnAlgorithmNumberer IntegratorPenaltyLagrangeTransformationEquiSolnAlgoLinearNewtonRaphsonModifiedNewtonBroydenBFGSKrylovNewtonNewtonLineSearchRCMMinDegreeStaticIntegratorLoadControlDispControlArcLength…TransientIntegratorNewmarkHHTCentralDifferenceNewmarkExplicitHHT_ExplicitBandGeneralBandSPDProfileSPDSparseGeneralSparseSymmetricSystemOfEqnCTestStaticAnalysisTransientAnalysisWhat is an Analysis?AlphaOSHow Do People Use Framework?• Provide their own main() function in C++ andlink to framework.• Use OpenSees interpreterS. These areextensions of the Tcl interpreter for finiteelement analysis which use the framework.OpenSees.exe• OpenSees.exe is an extension of the Tclinterpreter for finite element analysis whichuses this framework. It is an example of anapplication that can be developed using theframework.What is Tcl• Tcl is a programming language.• It is a string based command language.• Variables and variable substitution• Expression evaluation• Basic control structures (if , while, for, foreach)• Procedures• File manipulation• Sourcing other files.• Comand syntax:command arg1 arg2 …• Help1. http://dev.scriptics.com/scripting/primer.html2. Practical Programming in Tcl and Tk, Brent B. Welch.Tcl Interpreters• wish and tclsh are tcl interpreters.• Interpreters (Perl, Matlab, Ruby) are programs that executeprograms written in a programming language immediately.• There is no separate compilation & linking.• An interpreted program runs slower than a compiled one.puts “sum of 2 and 3 is [expr $2 + $3]”sum of 2 and 3 is 5Example Tcl>source Example1.tcl•sourcing other files>set a 1>1>set b a>a>set b $a>1•variables & variable substitution>set fileId [open tmp w]>??>puts $fileId “hello”>close $fileID>type tmphello•file manipulation•expression evaluation>expr 2 + 3> 5>set b [expr 2 + $b]> 3for {set i 1} {$i < 10} {incr i 1} {puts “i equals $i”}set sum 0foreach value {1 2 3 4} { set sum [expr $sum + $value]}set $sum>10>proc guess {value} { global sum if {$value < $sum} { puts “too low” } else { if {$value > $sum} { puts “too high” } else { puts “you got it!”} }} > guess 9too low•procedures & control structuresCommands to Tcl for OpenSees• For OpenSees we have added commands to Tcl forfinite element analysis:1. Modeling – create nodes, elements, loads and constraints2. Analysis – specify the analysis procedure.3. Output specification – specify what it is you want to monitorduring the analysis.Model Generation:*Adds the modelling commands to the interpreter.•BasicBuildermodel Basic –ndm ndm? <-ndf ndf?>This command now adds the following commands to the interpreter:nodeelementpatternfixequalDOFpatternloadeleLoadspmassfixfixXfixYfixZuniaxialMaterialnDMaterialsectiongeomTransfblock2Dblock3DpatchlayerfiberAnalysisCHandler AnalysisModel SolnAlgorithmNumberer


Introduction to OpenSees and Tcl

Download Introduction to OpenSees and Tcl
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to OpenSees and Tcl and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to OpenSees and Tcl 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?