Skip to content

Commit

Permalink
cmp - rebuild site
Browse files Browse the repository at this point in the history
  • Loading branch information
claudioperez committed Jun 26, 2024
1 parent 19f5c23 commit e8d8878
Show file tree
Hide file tree
Showing 67 changed files with 6,986 additions and 686 deletions.
4 changes: 2 additions & 2 deletions categories/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ <h6 class="text-muted link-underline">
<a href="https://stairlab.github.io/opensees-gallery/examples/example1/">
<div class="card h-100 single-post-card shadow-effect bg-faded-light border">
<div class="card-body">
<h3 class="fw-bold post-title">Example 1: Simple Truss</h3>
<h3 class="fw-bold post-title">Example 1: Linear Truss</h3>


<p class="post-meta">
Expand Down Expand Up @@ -366,7 +366,7 @@ <h6 class="text-muted link-underline">Read More <i class="bi bi-arrow-right"></i
<a href="https://stairlab.github.io/opensees-gallery/examples/example3/">
<div class="card h-100 single-post-card shadow-effect bg-faded-light border">
<div class="card-body">
<h3 class="fw-bold post-title">Example 3: Portal Frame Examples</h3>
<h3 class="fw-bold post-title">Example 3: Inelastic Plane Frame</h3>


<p class="post-meta">
Expand Down
6 changes: 3 additions & 3 deletions categories/basic/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<language>en-us</language>
<atom:link href="https://stairlab.github.io/opensees-gallery/categories/basic/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Example 1: Simple Truss</title>
<title>Example 1: Linear Truss</title>
<link>https://stairlab.github.io/opensees-gallery/examples/example1/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://stairlab.github.io/opensees-gallery/examples/example1/</guid>
Expand All @@ -22,7 +22,7 @@
<description>This example performs a moment-curvature analysis of a reinforced concrete section which is represented by a fiber discretization. Because we are only interested in the response quantities of the cross section, a zero-length element is used to wrap the cross section.</description>
</item>
<item>
<title>Example 3: Portal Frame Examples</title>
<title>Example 3: Inelastic Plane Frame</title>
<link>https://stairlab.github.io/opensees-gallery/examples/example3/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://stairlab.github.io/opensees-gallery/examples/example3/</guid>
Expand All @@ -40,7 +40,7 @@
<link>https://stairlab.github.io/opensees-gallery/examples/example5/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://stairlab.github.io/opensees-gallery/examples/example5/</guid>
<description>Example 5.1 A three-dimensional reinforced concrete rigid frame, is subjected to bi-directional earthquake ground motion.&#xA;Example5.tcl RCsection.tcl Or for Python:</description>
<description>A three-dimensional reinforced concrete rigid frame, is subjected to bi-directional earthquake ground motion.&#xA;Example5.tcl RCsection.tcl Or for Python:&#xA;Example5.py In both cases, the following ground motion records are required:</description>
</item>
<item>
<title>Example 6: Simply Supported Beam</title>
Expand Down
4 changes: 2 additions & 2 deletions categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,11 @@ <h4 class="accordion-header ms-2"> basic
<a href="https://stairlab.github.io/opensees-gallery//categories/basic/" class="post-title list-group-item view-all">View all</a>
<div class="list-group">

<a href="https://stairlab.github.io/opensees-gallery/examples/example1/" class="list-group-item">Example 1: Simple Truss</a>
<a href="https://stairlab.github.io/opensees-gallery/examples/example1/" class="list-group-item">Example 1: Linear Truss</a>

<a href="https://stairlab.github.io/opensees-gallery/examples/example2/" class="list-group-item">Example 2: Moment-Curvature</a>

<a href="https://stairlab.github.io/opensees-gallery/examples/example3/" class="list-group-item">Example 3: Portal Frame Examples</a>
<a href="https://stairlab.github.io/opensees-gallery/examples/example3/" class="list-group-item">Example 3: Inelastic Plane Frame</a>

<a href="https://stairlab.github.io/opensees-gallery/examples/example4/" class="list-group-item">Example 4: Multibay Two Story Frame</a>

Expand Down
168 changes: 168 additions & 0 deletions examples/Example8/Example8.1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# OpenSees -- Open System for Earthquake Engineering Simulation
# Pacific Earthquake Engineering Research Center
# http://opensees.berkeley.edu/
#
# Cantilever Beam Example 8.1
# ---------------------------
# Cantilever beam modeled with
# three dimensional brick elements
#
# Example Objectives
# ------------------
# test different brick elements
# free vibration analysis starting from static deflection
#
# Units: kips, in, sec
#
# Written: Andreas Schellenberg ([email protected])
# Date: September 2017

# import the OpenSees Python module
import opensees.openseespy as ops

# ----------------------------
# Start of model generation
# ----------------------------

# create ModelBuilder (with three-dimensions and 3 DOF/node)
model = ops.Model(ndm=3, ndf=3)

# set default units
# defaultUnits("-force", "kip", "-length", "in", "-time", "sec", "-temp", "F")

# Define the material
# -------------------
# matTag E nu rho
model.nDMaterial("ElasticIsotropic", 1, 100.0, 0.25, 1.27)

# Define geometry
# ---------------
Brick = "stdBrick"
#Brick = "bbarBrick"
#Brick = "SSPbrick"

nz = 6
nx = 2
ny = 2

nn = int((nz+1)*(nx+1)*(ny+1))

# mesh generation
# numX numY numZ startNode startEle eleType eleArgs? coords?
model.block3D(nx, ny, nz, 1, 1,
Brick, 1,
1, -1.0, -1.0, 0.0,
2, 1.0, -1.0, 0.0,
3, 1.0, 1.0, 0.0,
4, -1.0, 1.0, 0.0,
5, -1.0, -1.0, 10.0,
6, 1.0, -1.0, 10.0,
7, 1.0, 1.0, 10.0,
8, -1.0, 1.0, 10.0)

# boundary conditions
model.fixZ(0.0, (1, 1, 1))

# Define point load (3 steps)
# 1) First we create a linear time series which describes
# how the loading scales over pseudo time
# create a Linear time series
model.timeSeries("Linear", 1)

# 2) Next we create a "Plain" load pattern which serves as a
# container for the loads
p = 0.10
model.pattern("Plain", 1, 1, fact=1.0)

# 3) Finally, create the nodal load and assign it to the
# pattern we just created
model.load(nn, p, p, 0.0, pattern=1)

# print model
#printModel()
model.printModel("-JSON", "-file", "Example8.1.json")

# -----------------------
# End of model generation
# -----------------------


# ------------------------
# Start of static analysis
# ------------------------

# Load control with variable load steps
# init Jd min max
model.integrator("LoadControl", 1.0, 1)

# Convergence test
# tolerance maxIter displayCode
model.test("NormUnbalance", 1.0E-10, 20, 0)

# Solution algorithm
model.algorithm("Newton")

# DOF numberer
model.numberer("RCM")

# Constraint handler
model.constraints("Plain")

# System of equations solver
model.system("ProfileSPD")

# Analysis for gravity load
model.analysis("Static")

# Perform the analysis
model.analyze(5)

# --------------------------
# End of static analysis
# --------------------------


# ----------------------------
# Start of recorder generation
# ----------------------------

model.recorder("Node", "-file", "Node.out", "-time", "-node", nn, "-dof", 1, "disp")
model.recorder("Element", "-file", "Elem.out", "-time", "-eleRange", 1, 10, "material", "1", "strains")
#recorder("plot", "Node.out", "CenterNodeDisp", 625, 10, 625, 450, "-columns", 1, 2)

# --------------------------
# End of recorder generation
# --------------------------


# ---------------------------------------
# Create and Perform the dynamic analysis
# ---------------------------------------

# Remove the static analysis & reset the time to 0.0
model.wipeAnalysis()
model.setTime(0.0)

# Now remove the loads and let the beam vibrate
model.remove("loadPattern", 1)

# add some mass proportional damping
model.rayleigh(0.01, 0.0, 0.0, 0.0)

# Create the transient analysis
model.test("EnergyIncr", 1.0E-10, 20, 0)
model.algorithm("Newton")
model.numberer("RCM")
model.constraints("Plain")
model.system("ProfileSPD")
model.integrator("Newmark", 0.5, 0.25)
model.analysis("Transient")

# record once at time 0
model.record()

# Perform the transient analysis (20 sec)
# numSteps dt
model.analyze(1000, 1.0)


6 changes: 0 additions & 6 deletions examples/archdynamicsnap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -703,12 +703,6 @@ <h3 id="references">References</h3>



<li class="list-group-item ms-auto b-0 p-0">
<a type="button" class="btn btn-dark" role="button" href="https://stairlab.github.io/opensees-gallery/examples/status/"
data-toggle="tooltip" data-placement="top" title="">Next Post
&rarr;</a>
</li>

</ul>

</div>
Expand Down
4 changes: 3 additions & 1 deletion examples/buildingmodes/cantilever_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def make_model():
# Beam-column elements are defined between each pair of nodes,
# simulating the columns of a building
for i in range(numFloors):
model.element("ElasticBeamColumn", i + 1, i + 1, i + 2, A, E, I, 1)
nodes = (i + 1, i + 2)
model.element("ElasticBeamColumn", i + 1, nodes, A, E, I, 1)

# Define mass
# Mass is assigned to each node (excluding the fixed base),
Expand Down Expand Up @@ -99,6 +100,7 @@ def plot_modes(model, numFloors, floorHeight):
coord_i = model.nodeCoord(nodeTag_i) # Get the coordinates of the i-th node
coord_j = model.nodeCoord(nodeTag_j) # Get the coordinates of the j-th node
ax[mode + 1].plot([coord_i[0], coord_j[0]], [coord_i[1], coord_j[1]], '-o', color='gray')

# get modal displacement and floor number for each node
all_modal_displacements[mode] = {}
# Scale deformation to the node coordinates for easy visualization
Expand Down
8 changes: 6 additions & 2 deletions examples/buildingmodes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"headline": "Building Modes",
"description" : "A building is modeled as a cantilever, and the first three mode shapes are plotted.",
"inLanguage" : "en",
"wordCount": 1018 ,
"wordCount": 1023 ,
"datePublished" : "0001-01-01T00:00:00",
"dateModified" : "0001-01-01T00:00:00",
"image" : "https:\/\/stairlab.github.io\/opensees-gallery\/",
Expand Down Expand Up @@ -531,6 +531,8 @@ <h1 class="fw-semibold display-5 lh-1 mb-3">
</span><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">181
</span><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">182
</span><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">183
</span><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">184
</span><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">185
</span></code></pre></td>
<td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
<pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#998;font-style:italic"># Import the opensees package for finite element analysis</span>
Expand Down Expand Up @@ -581,7 +583,8 @@ <h1 class="fw-semibold display-5 lh-1 mb-3">
</span></span><span style="display:flex;"><span> <span style="color:#998;font-style:italic"># Beam-column elements are defined between each pair of nodes, </span>
</span></span><span style="display:flex;"><span> <span style="color:#998;font-style:italic"># simulating the columns of a building</span>
</span></span><span style="display:flex;"><span> <span style="font-weight:bold">for</span> i <span style="font-weight:bold">in</span> <span style="color:#999">range</span>(numFloors):
</span></span><span style="display:flex;"><span> model<span style="font-weight:bold">.</span>element(<span style="color:#b84">&#34;ElasticBeamColumn&#34;</span>, i <span style="font-weight:bold">+</span> <span style="color:#099">1</span>, i <span style="font-weight:bold">+</span> <span style="color:#099">1</span>, i <span style="font-weight:bold">+</span> <span style="color:#099">2</span>, A, E, I, <span style="color:#099">1</span>)
</span></span><span style="display:flex;"><span> nodes <span style="font-weight:bold">=</span> (i <span style="font-weight:bold">+</span> <span style="color:#099">1</span>, i <span style="font-weight:bold">+</span> <span style="color:#099">2</span>)
</span></span><span style="display:flex;"><span> model<span style="font-weight:bold">.</span>element(<span style="color:#b84">&#34;ElasticBeamColumn&#34;</span>, i <span style="font-weight:bold">+</span> <span style="color:#099">1</span>, nodes, A, E, I, <span style="color:#099">1</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span style="color:#998;font-style:italic"># Define mass</span>
</span></span><span style="display:flex;"><span> <span style="color:#998;font-style:italic"># Mass is assigned to each node (excluding the fixed base), </span>
Expand Down Expand Up @@ -634,6 +637,7 @@ <h1 class="fw-semibold display-5 lh-1 mb-3">
</span></span><span style="display:flex;"><span> coord_i <span style="font-weight:bold">=</span> model<span style="font-weight:bold">.</span>nodeCoord(nodeTag_i) <span style="color:#998;font-style:italic"># Get the coordinates of the i-th node</span>
</span></span><span style="display:flex;"><span> coord_j <span style="font-weight:bold">=</span> model<span style="font-weight:bold">.</span>nodeCoord(nodeTag_j) <span style="color:#998;font-style:italic"># Get the coordinates of the j-th node</span>
</span></span><span style="display:flex;"><span> ax[mode <span style="font-weight:bold">+</span> <span style="color:#099">1</span>]<span style="font-weight:bold">.</span>plot([coord_i[<span style="color:#099">0</span>], coord_j[<span style="color:#099">0</span>]], [coord_i[<span style="color:#099">1</span>], coord_j[<span style="color:#099">1</span>]], <span style="color:#b84">&#39;-o&#39;</span>, color<span style="font-weight:bold">=</span><span style="color:#b84">&#39;gray&#39;</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span style="color:#998;font-style:italic"># get modal displacement and floor number for each node</span>
</span></span><span style="display:flex;"><span> all_modal_displacements[mode] <span style="font-weight:bold">=</span> {}
</span></span><span style="display:flex;"><span> <span style="color:#998;font-style:italic"># Scale deformation to the node coordinates for easy visualization</span>
Expand Down
Loading

0 comments on commit e8d8878

Please sign in to comment.