Skip to content

Commit 8171442

Browse files
committed
cmp
1 parent 244afe6 commit 8171442

File tree

6 files changed

+89
-17
lines changed

6 files changed

+89
-17
lines changed

content/en/examples/Example8/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ model -ndm 3 -ndf 3
2222
{{% /tab %}}
2323
{{% tab name="Python (RT)" %}}
2424
```python
25-
import opensees.openseespy as ops
25+
import xara
2626

27-
model = ops.Model(ndm=3, ndf=3)
27+
model = xara.Model(ndm=3, ndf=3)
2828
```
2929
{{% /tab %}}
3030
{{< /tabs >}}
@@ -43,7 +43,7 @@ The final argument of the `block3D` command is a block specifying the location o
4343
{{% tab name="Tcl" %}}
4444
```tcl
4545
# mesh generation
46-
block3D $nx $ny $nz 1 1 $element $eleArgs {
46+
block3D $nx $ny $nz 1 1 $element $args {
4747
1 -1 -1 0
4848
2 1 -1 0
4949
3 1 1 0
@@ -57,7 +57,7 @@ block3D $nx $ny $nz 1 1 $element $eleArgs {
5757
{{% /tab %}}
5858
{{% tab name="Python (RT)" %}}
5959
```python
60-
model.block3D(nx, ny, nz, 1, 1, Brick, 1, {
60+
model.block3D((nx, ny, nz), (1, 1), "Brick", 1, {
6161
1: [-1.0, -1.0, 0.0],
6262
2: [ 1.0, -1.0, 0.0],
6363
3: [ 1.0, 1.0, 0.0],

content/en/examples/FiniteTension/index.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,29 @@ $$
1515
The deformation gradient is, in coordinates:
1616

1717
$$
18-
\boldsymbol{F}=\left[\begin{array}{lll}
18+
\boldsymbol{F}
19+
=\begin{bmatrix}
1920
\Lambda & 0 & 0 \\
2021
0 & 1 & 0 \\
2122
0 & 0 & 1
22-
\end{array}\right]
23+
\end{bmatrix}
2324
$$
24-
25+
And the Cauchy-Green tensor is
2526
$$
26-
\boldsymbol{C}=\boldsymbol{F}^T \boldsymbol{F}=\left[\begin{array}{ccc}
27+
\boldsymbol{C}=\boldsymbol{F}^T \boldsymbol{F}
28+
= \Lambda^2 \mathbf{e}\otimes\mathbf{e} + \mathbf{e}_{\alpha} \otimes \mathbf{e}_{\alpha}
29+
=\left[\begin{array}{ccc}
2730
\Lambda^2 & 0 & 0 \\
2831
0 & 1 & 0 \\
2932
0 & 0 & 1
3033
\end{array}\right]
3134
$$
32-
furnishing the Green-Lagrange strain \(\boldsymbol{E}\)
35+
furnishing the Green-Lagrange strain $\boldsymbol{E}$
3336
$$
34-
\boldsymbol{E}=\frac{1}{2}(\boldsymbol{C}-\boldsymbol{I})=\left[\begin{array}{ccc}
37+
\boldsymbol{E}
38+
=\frac{1}{2}(\boldsymbol{C}-\boldsymbol{1})
39+
= \frac{1}{2}\left(\Lambda^2-1\right) \mathbf{e}\otimes\mathbf{e}
40+
=\left[\begin{array}{ccc}
3541
\frac{1}{2}\left(\Lambda^2-1\right) & 0 & 0 \\
3642
0 & 0 & 0 \\
3743
0 & 0 & 0
@@ -40,7 +46,7 @@ $$
4046

4147
For a SVK material the 2PK stress is
4248
$$
43-
\boldsymbol{S}=\lambda \operatorname{tr}(\boldsymbol{E}) \boldsymbol{I}+2 \mu \boldsymbol{E}=\left[\begin{array}{ccc}
49+
\boldsymbol{S}=\lambda \operatorname{tr}(\boldsymbol{E}) \boldsymbol{1}+2 \mu \boldsymbol{E}=\left[\begin{array}{ccc}
4450
\left(\Lambda^2-1\right)\left(\frac{\lambda}{2}+\mu\right) & 0 & 0 \\
4551
0 & \frac{\lambda}{2}\left(\Lambda^2-1\right) & 0 \\
4652
0 & 0 & \frac{\lambda}{2}\left(\Lambda^2-1\right)

content/en/examples/FrameVecXZ/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Orienting frames in 3D
3+
weight: 10
34
description: This example demonstrates how to orient beam elements in 3D.
45
thumbnail: img/examples/vecxz.png
56
downloads:
@@ -82,4 +83,4 @@ $$
8283
& \frac{2}{L} EI_g
8384
& \frac{4}{L} EI_g + \frac{4}{H} EI_2 \\
8485
\end{array}\right]
85-
$$
86+
$$

content/en/examples/PlaneFlexure/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ $$
2727

2828
with $R = \tfrac{1}{12} Ed^3$.
2929

30-
<figure>
31-
<img src="img/cross.png" width="40%" >
32-
<img src="img/beam.png" width="40%" >
30+
<figure style="text-align: center">
31+
<img src="img/cross.png" width="45%" >
32+
<img src="img/beam.png" width="45%" >
3333
<figcaption>Deformed cross section from 3D solution of pure flexure.</figcaption>
3434
</figure>
3535

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
2+
import xara
3+
from xara.helpers import find_node, find_nodes
4+
from veux.stress import node_average
5+
6+
def create_ledge(mesh,
7+
thickness=1,
8+
element: str = "LagrangeQuad"):
9+
10+
nx, ny = mesh
11+
12+
# create model in two dimensions with 2 DOFs per node
13+
model = ops.Model(ndm=2, ndf=2)
14+
15+
# Define the material
16+
# -------------------
17+
# tag E nu rho
18+
model.material("ElasticIsotropic", 1, 1000.0, 0.25, 0, "-plane-strain")
19+
20+
# Define geometry
21+
# ---------------
22+
23+
load = 1000.0
24+
angle = 0
25+
b = 30
26+
L = 100.0
27+
r = 15/L
28+
29+
# Create the nodes and elements using the surface command
30+
# {"quad", "enhancedQuad", "tri31", "LagrangeQuad"}:
31+
args = (thickness, "PlaneStrain", 1)
32+
33+
surface = model.surface((nx, ny),
34+
element=element, args=args,
35+
points={
36+
1: [ 0.0, 0.0],
37+
5: [ L/2, 10.],
38+
2: [ L, L*r],
39+
3: [ L, b ],
40+
4: [ 0.0, b ]
41+
})
42+
43+
# Single-point constraints
44+
# x (u1 u2)
45+
for node in find_nodes(model, x=0.0):
46+
print("Fixing node ", node)
47+
model.fix(node, (1, 1))
48+
49+
# Define gravity loads
50+
# create a Plain load pattern with a linear time series
51+
model.pattern("Plain", 1, "Linear")
52+
53+
# # Find the node at the tip center
54+
# place = find_node(model, x=L, y=15.0)
55+
# print(f"Placing load at node {place}")
56+
# force = (1.0, 0.0)
57+
# model.load(place, force, pattern=1)
58+
59+
tip = list(find_nodes(model, x=L))
60+
for node in tip:
61+
model.load(node, (load/len(tip), 0.0), pattern=1)
62+
63+
return model
64+
65+

content/en/examples/Wrench/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For the triangular mesh, the [`Tri31`](https://xara.so/user/manual/model/element
1919
{{% tab name="Quadrilateral" %}}
2020
```python
2121
def create_quads():
22-
model = ops.Model(ndm=2, ndf=2)
22+
model = xara.Model(ndm=2, ndf=2)
2323
model.nDMaterial("ElasticIsotropic", 1, 200e3, 0.25)
2424

2525
for num,block in blocks.items():
@@ -34,7 +34,7 @@ def create_quads():
3434
{{% tab name="Triangle" %}}
3535
```python
3636
def create_tris():
37-
model = ops.Model(ndm=2, ndf=2)
37+
model = xara.Model(ndm=2, ndf=2)
3838
model.nDMaterial("ElasticIsotropic", 1, 200e3, 0.25)
3939

4040
elem = 1

0 commit comments

Comments
 (0)