Sei sulla pagina 1di 46

QuakeCoRE OpenSees

Training Workshop 2017


Pre- and Post-Processing
Tools for Model Generation
and Visualisation
Pre/Post-Processing Tools
As we have seen in the previous modules, OpenSees is almost exclusively a finite
element analysis platform. There are some limited visualization capabilities, but
there is not an integrated graphical user interface (GUI) to aid in model-building
tasks or post-processing activities.
o Model-building tasks (pre-processing) are the steps that need to occur
before running a simulation.
o Post-processing tasks include visualization of model results and the steps
that may be necessary to format OpenSees output and/or compute more
useful terms from the output.

This module will present some pre- and post-processing tools/strategies for
working with OpenSees.
o There are many options available, so this isn’t meant to be a
comprehensive list, but rather a starting point that demonstrates what
can be done with tcl scripting and third-party pre/post-processing tools.
Pre/Post-Processing Tools
Pre-processing tasks:

o Mesh generation
o Arguably the most important part of creating a finite element model
o In terms of the model file, this step includes everything from the
specification of the model domain, to the creation of the elements
o Boundary and loading condition application
o For large/complex models, it may be difficult to visualize how or
where boundary and loading conditions should be applied, or we
may want to optimize this step
o Model verification
o It is often useful to use a mesh visualization tool to examine the
mesh, boundary, and loading conditions for a model before starting
the analysis
Pre/Post-Processing Tools
Post-processing tasks:

o Analysis of the output


o The entire point of running finite element simulations is to obtain
and interpret the recorded output to learn more about a problem
o In most cases, we will be computing things from the output that
cannot be directly recorded
o Visualization of results
o To aid in our analysis/interpretation of the recorded output, we will
take advantage of visualization tools
o This can be as simple as plotting the time history at a single node, or
it may involve more complex visualizations such as contour plots of
stresses and strains in a body
o Model verification
o It is just as important to assess the overall model results after the
analysis is over as it is to verify the model before analysis
Pre-Processing Tools
What types of tools can we use for pre-processing?

o A good text editor for working with model files


o Notepad++ (https://notepad-plus-plus.org/)
o gvim
o emacs
o others…
o Tcl scripting and OpenSees commands
o Tcl language tutorial
(http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html)
o OpenSees-specific tools such as:
o OpenSees Navigator (http://openseesnavigator.berkeley.edu/)
o BuildingTcl (http://opensees.berkeley.edu/wiki/index.php/BuildingTcl)
o BridgePBEE (http://peer.berkeley.edu/bridgepbee/)
o Third-party mesh-generation tools such as
o gmsh (http://gmsh.info/)
o Cubit (https://cubit.sandia.gov/)
o GiD (http://www.gidhome.com)
Pre-Processing Tools
A good text editor is a valuable tool for working with OpenSees model files. A
basic text editor is fine, but things like syntax highlighting and advanced text
manipulation features make it easier to read and work with these files.
Pre-Processing Tools
Take advantage of tcl scripting to make model creation simpler.
The example shown here demonstrates an example of what we can do with a
simple for loop, some variables, and an if statement.

o This example is the node creation


script for a lateral pile pushover
analysis using p-y curves (the file
called staticBNWsingle.tcl in the
Geotechnical examples
o We define the number of nodes we
want in the pile, the element size,
and the length/height of the pile
o We can then loop through the total
number of nodes, determine the z-
coordinate based on the element
size, and create the nodes as long as
our z-coordinate is less than the pile
height
Pre-Processing Tools
Take advantage of tcl scripting to make model creation simpler.
A similar scheme could easily be extended and applied to different types of
problems. Other examples included in the previous modules demonstrate other
applications of tcl scripting

o We can use tcl commands to aid in


node, material, section, and
element creation
o We can create tcl procedures for
common tasks (e.g. rectangular
reinforced concrete fiber sections)
that can be called from model files
o We can source in tcl files to our
main model file
o Many other possibilities…
Pre-Processing Tools
Consider another example. We want to perform an effective stress
site-response analysis using the 9_4_QuadUP element to
considered a coupled fluid-solid response
o Example usage for 9_4_QuadUP element
element 9_4_QuadUP $tag $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $thick $matTag
$bulk $fmass $hPerm $vPerm <$b1 $b2>

Nodes 1, 3, 5, and 7 must be created with 3 dof, while nodes 2, 4, 6, 8, and 9


must be created with 2 dof. This requires two separate domains (i.e. need
to specify model BasicBuilder … twice in the model file)
Pre-Processing Tools
Creating the nodes for a column of these elements may look complicated, but
once the script is written, we can create models without any further effort
Pre-Processing Tools
There are a number of OpenSees commands that can be used to simplify mesh
and model creation.
The block2D command creates the nodes and elements for a rectangular patch
of quadrilateral elements (or shell elements in 3D)
Pre-Processing Tools
There are a number of OpenSees commands that can be used to simplify mesh
and model creation.
The block3D command creates the nodes and elements for a rectangular prism
of hexadedral elements in 3D
Pre-Processing Tools
There are a number of OpenSees commands that can be used to simplify mesh
and model creation.
The region command can be used to label different regions (by node or by
element) such that different Rayleigh damping parameters can be assigned to
different parts of the model
Pre-Processing Tools
There are a number of OpenSees commands that can be used to simplify mesh
and model creation.
The fixX, fixY, and fixZ commands can be used to apply single point constraints to
all of the nodes within a specified distance of a given x-, y-, or z-coordinate

o fixX $xCoordinate $constraintValues <-tol $tol>

o $xCoordinate is the desired x-coordinate


o $constraintValues are the constraints (0 or 1) in each dof
o $tol is an optional tolerance (default is 1.0e-10)

o example usage: fixX 0.0 1 1 1


o This applies constraints in all three dof for all nodes within 1.0e-10 units
of the y-z plane
Pre/Post-Processing Tools
Pre/Post-Processing Tools

Schellenberg, Yang, and Kohama (2013)


Pre/Post-Processing Tools

Schellenberg, Yang, and Kohama (2013)


Pre/Post-Processing Tools

Schellenberg, Yang, and Kohama (2013)


Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre/Post-Processing Tools
Pre-Processing Example - GiD
Create geometry and apply boundary conditions
Pre-Processing Example - GiD
Assign materials to the geometry
Pre-Processing Example - GiD

Generate mesh and OpenSees input file


Pre-Processing Example - GiD

A GiD problemType is a set of files that


defines the conditions and materials
that can be assigned to a geometry or
mesh, and instructions for GiD to
create an input file for use in analysis.

This is an example of the commands


that instruct GiD how to create a model
file for OpenSees.
Pre-Processing Example - GiD

A GiD problemType is a set of


files that defines the
conditions and materials that
can be assigned to a geometry
or mesh, and instructions for
GiD to create an input file for
use in analysis.

This is an example of the


commands that instruct GiD
how to create a model file for
OpenSees.
Post-Processing Example - GiD

By making a few changes to


the 5storeyFrame.tcl and
ApplyGMexcitation.tcl files
we looked at previously, we
can use GiD to visualize some
of the results.
Here we are adding some
lines to create a mesh file so
GiD knows what the mesh
looks like.
Post-Processing Example - GiD

By making a few changes to


the 5storeyFrame.tcl and
ApplyGMexcitation.tcl files
we looked at previously, we
can use GiD to visualize some
of the results.
Here we are adding some
lines to create a mesh file so
GiD knows what the mesh
looks like.
Post-Processing Example - GiD

The mesh file that can be


read by GiD looks like this.

This is the product of the new


lines we added to the model
file for our structure.
Post-Processing Example - GiD
Here we are slightly changing
the displacement recorder so
that the displacements in the
x- and y-direction are sent to
a single file instead of the two
separate files we had
specified in the original
example.
Post-Processing Example - GiD
GiD reads the output in a
different format that that
created by the OpenSees
recorders.
We ca write a simple MATLAB
script to post-process the
recorded displacements and
create a file to be read by GiD
Post-Processing Example - GiD

This is an example of the


format that GiD requires for
reading in data on nodes.
Post-Processing Example - GiD

Now we can open GiD, and


read in our processed
results and mesh files.
In this case, they are the
files called:
5storeyFrame.post.msh
and 5storeyFrame.post.res
Post-Processing Example - GiD

Once the results have been


loaded into GiD, we can
visualize different things, for
example the displaced
shape at different time
steps.
Post-Processing Example - GiD

We can also create graphs of


the variation in different
quantities at different nodal
locations.
Thank you!

www.quakecore.nz

Potrebbero piacerti anche