Skip to content

Commit

Permalink
rebuild site
Browse files Browse the repository at this point in the history
  • Loading branch information
claudioperez committed Aug 23, 2024
1 parent 3e6019f commit b45e5ed
Show file tree
Hide file tree
Showing 33 changed files with 5,429 additions and 173 deletions.
52 changes: 52 additions & 0 deletions examples/SpaceTruss/space_truss.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import numpy as np
import opensees.openseespy as ops

def space_truss(ns, Ro, Ri, H):
"""Generate a 3D truss"""

model = ops.Model(3,3)
m1 = model.material('default', 1.0)
s1 = model.xsection('default', 1.0, 1.0)

# Specify node coordinates for support points
# angle for supports
phi = np.arange(ns)/ns*2*np.pi

# Coordinates for support points
X = np.cos(phi)*Ro
Y = np.sin(phi)*Ro
# Generate support points with height Z of 0
for i in range(ns):
model.node(i+1, X[i], Y[i], 0.0)

# Angles for upper ring (offset by pi/ns degrees from supports)
phi = phi+np.pi/ns

# Coordinates for upper ring
X = np.append(X, np.cos(phi)*Ri)
Y = np.append(Y, np.sin(phi)*Ri)

# Generate coordinates for upper ring with height H
for i in np.arange(ns, 2*ns):
model.node(i+1, X[i], Y[i], H)

for i, j, k in zip(np.arange(ns), np.arange(0, ns), np.arange(ns, 2*ns)):
model.element("Truss", i+1, j, k, m1, s1)

model.element("Truss", alpha[ns+1], 0, 2*ns-1, m1, s1)

for i, j, k in zip(np.arange(ns+1, 2*ns), np.arange(1, ns), np.arange(ns, 2*ns-1)):
model.element("Truss", i+1, j, k, m1, s1)

for i, j, k in zip(np.arange(2*ns, 3*ns-1), np.arange(ns, 2*ns-1), np.arange(ns+1, 2*ns)):
model.element("Truss", i+1, j, k, m1, s1)

model.element("Truss", 3*ns, ns, 2*ns-1, m1, s1)


# boundary conditions
for node in range(ns):
model.fix(node, (1, 1, 1))


return model
56 changes: 28 additions & 28 deletions examples/chopra-10.4/index.html

Large diffs are not rendered by default.

104 changes: 52 additions & 52 deletions examples/example1/index.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions examples/example2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ <h2 id="modeling">Modeling</h2>


<a class="nav-link active "
id="bfedca-tab" data-bs-toggle="tab" data-bs-target="#bfedca"
id="fdebca-tab" data-bs-toggle="tab" data-bs-target="#fdebca"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="abdfec-tab" data-bs-toggle="tab" data-bs-target="#abdfec"
id="cdaebf-tab" data-bs-toggle="tab" data-bs-target="#cdaebf"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -392,7 +392,7 @@ <h2 id="modeling">Modeling</h2>



<div class="tab-pane fade show active " id="bfedca" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="fdebca" role="tabpanel" aria-labelledby="nav-1">

<ol>
<li><a href="Example2.py"><code>Example2.py</code></a></li>
Expand All @@ -406,7 +406,7 @@ <h2 id="modeling">Modeling</h2>



<div class="tab-pane fade show " id="abdfec" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="cdaebf" role="tabpanel" aria-labelledby="nav-1">

<ol>
<li><a href="Example2.tcl"><code>Example2.tcl</code></a></li>
Expand Down Expand Up @@ -445,13 +445,13 @@ <h2 id="modeling">Modeling</h2>


<a class="nav-link active "
id="ebfdac-tab" data-bs-toggle="tab" data-bs-target="#ebfdac"
id="cfabed-tab" data-bs-toggle="tab" data-bs-target="#cfabed"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="adecfb-tab" data-bs-toggle="tab" data-bs-target="#adecfb"
id="aedfcb-tab" data-bs-toggle="tab" data-bs-target="#aedfcb"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -467,7 +467,7 @@ <h2 id="modeling">Modeling</h2>



<div class="tab-pane fade show active " id="ebfdac" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="cfabed" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><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>model<span style="font-weight:bold">.</span>section(<span style="color:#b84">&#34;Fiber&#34;</span>, <span style="color:#099">1</span>)
</span></span><span style="display:flex;"><span><span style="color:#998;font-style:italic"># Create the concrete core fibers</span>
Expand All @@ -490,7 +490,7 @@ <h2 id="modeling">Modeling</h2>



<div class="tab-pane fade show " id="adecfb" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="aedfcb" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-Tcl" data-lang="Tcl"><span style="display:flex;"><span><span style="color:#008080">section</span> Fiber <span style="color:#099">1</span> <span style="font-weight:bold">{</span>
</span></span><span style="display:flex;"><span>
Expand Down
56 changes: 28 additions & 28 deletions examples/example3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,13 @@ <h1 class="fw-semibold display-5 lh-1 mb-3">


<a class="nav-link active "
id="ebfcda-tab" data-bs-toggle="tab" data-bs-target="#ebfcda"
id="adbefc-tab" data-bs-toggle="tab" data-bs-target="#adbefc"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="acbdfe-tab" data-bs-toggle="tab" data-bs-target="#acbdfe"
id="abcfed-tab" data-bs-toggle="tab" data-bs-target="#abcfed"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -390,7 +390,7 @@ <h1 class="fw-semibold display-5 lh-1 mb-3">



<div class="tab-pane fade show active " id="ebfcda" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="adbefc" role="tabpanel" aria-labelledby="nav-1">

<ol>
<li><a href="portal.py"><code>portal.py</code></a></li>
Expand All @@ -404,7 +404,7 @@ <h1 class="fw-semibold display-5 lh-1 mb-3">



<div class="tab-pane fade show " id="acbdfe" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="abcfed" role="tabpanel" aria-labelledby="nav-1">

<ol>
<li><a href="portal.tcl"><code>portal.tcl</code></a></li>
Expand Down Expand Up @@ -466,13 +466,13 @@ <h2 id="create_portal"><code>create_portal</code></h2>


<a class="nav-link active "
id="ebfdca-tab" data-bs-toggle="tab" data-bs-target="#ebfdca"
id="bedcfa-tab" data-bs-toggle="tab" data-bs-target="#bedcfa"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="cbfead-tab" data-bs-toggle="tab" data-bs-target="#cbfead"
id="dfceba-tab" data-bs-toggle="tab" data-bs-target="#dfceba"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -488,7 +488,7 @@ <h2 id="create_portal"><code>create_portal</code></h2>



<div class="tab-pane fade show active " id="ebfdca" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="bedcfa" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><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"># create ModelBuilder (with two-dimensions and 3 DOF/node)</span>
</span></span><span style="display:flex;"><span>model <span style="font-weight:bold">=</span> ops<span style="font-weight:bold">.</span>Model(ndm<span style="font-weight:bold">=</span><span style="color:#099">2</span>, ndf<span style="font-weight:bold">=</span><span style="color:#099">3</span>)
Expand All @@ -513,7 +513,7 @@ <h2 id="create_portal"><code>create_portal</code></h2>



<div class="tab-pane fade show " id="cbfead" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="dfceba" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-tcl" data-lang="tcl"><span style="display:flex;"><span><span style="font-weight:bold">set</span> width <span style="color:#099">360</span>
</span></span><span style="display:flex;"><span><span style="font-weight:bold">set</span> height <span style="color:#099">144</span>
Expand Down Expand Up @@ -553,13 +553,13 @@ <h2 id="create_portal"><code>create_portal</code></h2>


<a class="nav-link active "
id="fcaedb-tab" data-bs-toggle="tab" data-bs-target="#fcaedb"
id="fcebda-tab" data-bs-toggle="tab" data-bs-target="#fcebda"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="dfebac-tab" data-bs-toggle="tab" data-bs-target="#dfebac"
id="ecdabf-tab" data-bs-toggle="tab" data-bs-target="#ecdabf"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -575,7 +575,7 @@ <h2 id="create_portal"><code>create_portal</code></h2>



<div class="tab-pane fade show active " id="fcaedb" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="fcebda" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><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"># Define materials for nonlinear columns</span>
</span></span><span style="display:flex;"><span><span style="color:#998;font-style:italic"># ------------------------------------------</span>
Expand All @@ -600,7 +600,7 @@ <h2 id="create_portal"><code>create_portal</code></h2>



<div class="tab-pane fade show " id="dfebac" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="ecdabf" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-tcl" data-lang="tcl"><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#998;font-style:italic"># Define materials for nonlinear columns
Expand Down Expand Up @@ -640,13 +640,13 @@ <h2 id="create_portal"><code>create_portal</code></h2>


<a class="nav-link active "
id="bcaedf-tab" data-bs-toggle="tab" data-bs-target="#bcaedf"
id="dcebfa-tab" data-bs-toggle="tab" data-bs-target="#dcebfa"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="bfeacd-tab" data-bs-toggle="tab" data-bs-target="#bfeacd"
id="bdaecf-tab" data-bs-toggle="tab" data-bs-target="#bdaecf"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -662,7 +662,7 @@ <h2 id="create_portal"><code>create_portal</code></h2>



<div class="tab-pane fade show active " id="bcaedf" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="dcebfa" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><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"># Define cross-section for nonlinear columns</span>
</span></span><span style="display:flex;"><span> <span style="color:#998;font-style:italic"># ------------------------------------------</span>
Expand Down Expand Up @@ -697,7 +697,7 @@ <h2 id="create_portal"><code>create_portal</code></h2>



<div class="tab-pane fade show " id="bfeacd" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="bdaecf" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-tcl" data-lang="tcl"><span style="display:flex;"><span><span style="color:#998;font-style:italic"># Define cross-section for nonlinear columns
</span></span></span><span style="display:flex;"><span><span style="color:#998;font-style:italic"># ------------------------------------------
Expand Down Expand Up @@ -754,13 +754,13 @@ <h2 id="gravity_analysis"><code>gravity_analysis</code></h2>


<a class="nav-link active "
id="fbeacd-tab" data-bs-toggle="tab" data-bs-target="#fbeacd"
id="decbfa-tab" data-bs-toggle="tab" data-bs-target="#decbfa"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="bfadec-tab" data-bs-toggle="tab" data-bs-target="#bfadec"
id="cbefda-tab" data-bs-toggle="tab" data-bs-target="#cbefda"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -776,7 +776,7 @@ <h2 id="gravity_analysis"><code>gravity_analysis</code></h2>



<div class="tab-pane fade show active " id="fbeacd" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="decbfa" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><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"># Create the model</span>
</span></span><span style="display:flex;"><span>model <span style="font-weight:bold">=</span> create_portal()
Expand All @@ -792,7 +792,7 @@ <h2 id="gravity_analysis"><code>gravity_analysis</code></h2>



<div class="tab-pane fade show " id="bfadec" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="cbefda" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-tcl" data-lang="tcl"><span style="display:flex;"><span><span style="color:#008080">create_portal</span><span style="font-weight:bold">;</span>
</span></span><span style="display:flex;"><span><span style="color:#008080">gravity_analysis</span><span style="font-weight:bold">;</span>
Expand All @@ -817,13 +817,13 @@ <h2 id="gravity_analysis"><code>gravity_analysis</code></h2>


<a class="nav-link active "
id="dfabce-tab" data-bs-toggle="tab" data-bs-target="#dfabce"
id="abcfde-tab" data-bs-toggle="tab" data-bs-target="#abcfde"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="bedfca-tab" data-bs-toggle="tab" data-bs-target="#bedfca"
id="bfeadc-tab" data-bs-toggle="tab" data-bs-target="#bfeadc"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -839,7 +839,7 @@ <h2 id="gravity_analysis"><code>gravity_analysis</code></h2>



<div class="tab-pane fade show active " id="dfabce" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="abcfde" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><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>model<span style="font-weight:bold">.</span>pattern(<span style="color:#b84">&#34;Plain&#34;</span>, <span style="color:#099">1</span>, <span style="color:#b84">&#34;Linear&#34;</span>, loads<span style="font-weight:bold">=</span>{
</span></span><span style="display:flex;"><span><span style="color:#998;font-style:italic"># nodeID xForce yForce zMoment</span>
Expand All @@ -855,7 +855,7 @@ <h2 id="gravity_analysis"><code>gravity_analysis</code></h2>



<div class="tab-pane fade show " id="bedfca" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="bfeadc" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-tcl" data-lang="tcl"></code></pre></div>

Expand Down Expand Up @@ -935,13 +935,13 @@ <h2 id="transient_analysis"><code>transient_analysis</code></h2>


<a class="nav-link active "
id="bceadf-tab" data-bs-toggle="tab" data-bs-target="#bceadf"
id="cbdafe-tab" data-bs-toggle="tab" data-bs-target="#cbdafe"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="afecbd-tab" data-bs-toggle="tab" data-bs-target="#afecbd"
id="eafbdc-tab" data-bs-toggle="tab" data-bs-target="#eafbdc"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -957,7 +957,7 @@ <h2 id="transient_analysis"><code>transient_analysis</code></h2>



<div class="tab-pane fade show active " id="bceadf" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="cbdafe" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><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>model<span style="font-weight:bold">.</span>loadConst(time<span style="font-weight:bold">=</span><span style="color:#099">0.0</span>)
</span></span></code></pre></div>
Expand All @@ -969,7 +969,7 @@ <h2 id="transient_analysis"><code>transient_analysis</code></h2>



<div class="tab-pane fade show " id="afecbd" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="eafbdc" role="tabpanel" aria-labelledby="nav-1">

<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-tcl" data-lang="tcl"><span style="display:flex;"><span><span style="color:#008080">loadConst</span> <span style="font-weight:bold">-</span>time <span style="color:#099">0.0</span>
</span></span></code></pre></div>
Expand Down
8 changes: 4 additions & 4 deletions examples/example4/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,13 @@ <h2 id="example-41">Example 4.1</h2>


<a class="nav-link active "
id="bacedf-tab" data-bs-toggle="tab" data-bs-target="#bacedf"
id="debcaf-tab" data-bs-toggle="tab" data-bs-target="#debcaf"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Python</a>



<a class="nav-link "
id="defbac-tab" data-bs-toggle="tab" data-bs-target="#defbac"
id="afdbec-tab" data-bs-toggle="tab" data-bs-target="#afdbec"
type="button" role="tab" aria-controls="nav-home" aria-selected="true">Tcl</a>


Expand All @@ -374,7 +374,7 @@ <h2 id="example-41">Example 4.1</h2>



<div class="tab-pane fade show active " id="bacedf" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show active " id="debcaf" role="tabpanel" aria-labelledby="nav-1">

<ol>
<li><a href="Example4.py"><code>Example4.py</code></a></li>
Expand All @@ -388,7 +388,7 @@ <h2 id="example-41">Example 4.1</h2>



<div class="tab-pane fade show " id="defbac" role="tabpanel" aria-labelledby="nav-1">
<div class="tab-pane fade show " id="afdbec" role="tabpanel" aria-labelledby="nav-1">

<ol>
<li><a href="Example4.tcl"><code>Example4.tcl</code></a></li>
Expand Down
Binary file modified examples/example7/gravity.glb
Binary file not shown.
Binary file modified examples/example7/model.glb
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/example7/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
)

# sees.serve(artist)
# artist.save("gravity.glb")
artist.save("gravity.glb")

Loading

0 comments on commit b45e5ed

Please sign in to comment.