Skip to content

Commit 1260c2d

Browse files
committed
cmp - clean up
1 parent d34200d commit 1260c2d

File tree

4 files changed

+1006
-14
lines changed

4 files changed

+1006
-14
lines changed

content/en/examples/FrameVecXZ/index.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,33 @@ description: This example demonstrates how to orient beam elements in 3D.
44
thumbnail: img/examples/vecxz.png
55
downloads:
66
Python: ["requirements.txt", "orient.py"]
7+
Tcl: ["orient.tcl"]
78
---
89

9-
![Portal frame with 2nd coordinate vertical](img/image-2.png)
10+
<!--
11+
12+
{{< image caption="Portal frame with 2nd coordinate vertical" src="img/image-2.png" wrapper="mx-auto w-25" >}}
13+
14+
-->
15+
1016
<!-- ![Portal frame with 3rd coordinate vertical](img/image-3.png) -->
1117

1218
The objective of this example is to demonstrate how to orient beam elements in 3D space.
1319
The model we'll build is a simple 3-element portal frame with wide-flange sections.
20+
21+
{{% render orient.glb %}}
22+
1423
Only certain relevant pieces of code will be shown in detail, but the full example script can
1524
be downloaded from the link above.
1625
In order to cover a wide range of cases, we'll orient the first column, element `1`, such that the strong axis of it's section bends *outside* the plane of the portal, the strong axis of the second column, element `3`, will resist bending *inside* the portal plane (See the image above).
17-
We'll build two variations of the model; one where the 2nd coordinate is vertical, and another
18-
with the 3rd coordinate vertical.
26+
We'll build two variations of the model; one where the 2nd coordinate \(X_2\) is vertical, and another
27+
with the 3rd coordinate \(X_3\) vertical.
28+
In both cases we begin by initializing a `Model` in `ndm=3` dimensions with `ndf=6` degrees of freedom per node:
29+
```python
30+
import xara
31+
model = xara.Model(ndm=3, ndf=6)
32+
```
33+
1934
For the first case with \(X_2\) vertical we have:
2035
```python
2136
model.node(1, ( 0, 0, 0))
@@ -44,6 +59,8 @@ Everything else is identical for both cases. The material is a simple
4459
to build a fiber discretization of a wide-flange:
4560

4661
```python
62+
from xara.units.fps import inch
63+
from shps.shapes import WideFlange
4764
model.material("ElasticIsotropic", 1, 29e3, 0.3)
4865

4966
shape = WideFlange(d=8*inch, b=6.5*inch, tw=0.5*inch, tf=0.5*inch)
44.4 KB
Binary file not shown.

content/en/examples/FrameVecXZ/orient.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import xara
22
from opensees.units.fps import foot, inch
33
import veux
4-
from shps.shapes import WideFlange, Angle
5-
from veux.utility.alpha_shape import alpha_shape
4+
from shps.shapes import WideFlange
65

7-
def create_angle(vertical = 2):
6+
def create_portal(vertical = 2):
87

9-
# shape = WideFlange(d=8*inch, b=6.5*inch, t=0.28*inch)
108
shape = WideFlange(d=8*inch, b=6.5*inch, tw=0.5*inch, tf=0.5*inch)
119

1210
height = 6*foot
@@ -43,13 +41,14 @@ def create_angle(vertical = 2):
4341
model.element("MixedFrame", 3, (3,4), section=1, transform=2) # girder
4442
model.element("MixedFrame", 4, (4,1), section=1, transform=3) # column
4543

46-
artist = veux.create_artist(model, vertical=vertical)
47-
artist.draw_origin()
48-
artist.draw_sections()
44+
if False:
45+
artist = veux.create_artist(model, vertical=vertical)
46+
artist.draw_origin()
47+
artist.draw_sections()
4948

50-
artist.draw_axes(extrude=True)
51-
artist.save("orient.glb")
52-
veux.serve(artist, viewer="three-170", port=8080)
49+
artist.draw_axes(extrude=True)
50+
artist.save("orient.glb")
51+
veux.serve(artist, viewer="three-170", port=8080)
5352

5453
if __name__ == "__main__":
55-
create_angle(vertical=3)
54+
create_portal(vertical=3)

0 commit comments

Comments
 (0)