import elle.numeric
import matplotlib.pyplot as plt
"typewriter") plt.style.use(
import anon.conf
'jax_disable_jit', True)
anon.conf.config.update('jax_enable_x64', True)
anon.conf.config.update(import anabel
import anon
import jax
import anon.atom as anp
import elle.sections
import elle.beam2d
import elle.springs
import anabel as em
= elle.springs.isokin.no1(3600.0,4.0,H0=3.0)
mat # mat = elle.springs.gmp.no5(60.0,29e3)
= anabel.sections.Tee
GirderSec = anabel.sections.Rectangle
ColumnSec = elle.beam2d.transform_no2(elle.beam2d.geom_no2)
geom_template = elle.beam2d.resp_no6 beam_template
An Assembler
is an object with an .assemble()
and optionally a .compose()
method
# Create a model Assembler
= em.SkeletalModel(ndm=2,ndf=3)
model
# Define problem parameters
= model.param("P1")
P1
# Define model components
= GirderSec(d=24.0, bf=60.0, tf=6.0, tw=18.0, mat=mat).assemble()
girder_section = ColumnSec(d=30.0, b=30.0,mat=mat).assemble()
column_section = beam_template(*[girder_section]*4, quad={"n": 4, "rule": "lobatto"})
basic_girder # basic_column = beam_template(*[column_section]*8, quad={"n": 4, "rule": "mid"})
= elle.beam2d.resp_no1(A=30.0**2,E=3600.0,I=30**4/12)
basic_column
= geom_template(basic_girder)
girder = geom_template(basic_column) column
WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
# Set up nodes
= 12.
ft = 30.*ft, 13.*ft
B, H "1", 0., 0.)
model.node("2", 0., H )
model.node("3", B/2, H )
model.node("4", B , H )
model.node("5", B , 0.)
model.node(
"a", "1", "2", elem=column)
model.beam("b", "2", "3", elem=girder)
model.beam("c", "3", "4", elem=girder)
model.beam("d", "4", "5", elem=column)
model.beam(
"1", [1,1,1])
model.boun("5", [1,1,1])
model.boun(
"2", P1, dof="x")
model.load("2", -2.0, dof="y")
model.load("2", -2.0, dof="y")
model.load(
; em.plot_skeletal(model)
model.dofs
[[9, 10, 11], [0, 1, 2], [3, 4, 5], [6, 7, 8], [12, 13, 14]]
= model.compose_displ() f
0, 0, 3000, 10,2,0)
model.cycle(= model.build_load_path(0) P
= elle.numeric.accumulate(f) F
= F(P) X, Y, S
0/18
1/18
2/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
3/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
4/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
5/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
6/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
7/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
8/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
9/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
10/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
11/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
12/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
13/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
14/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
15/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
16/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
17/18
/home/claudio/elle/numeric/elle/numeric/inverse.py:149: UserWarning: Function inversion failed to converge.
warnings.warn("Function inversion failed to converge.")
0,:],P[:,0,:]) plt.plot(Y[:,
[<matplotlib.lines.Line2D at 0x7f988409aac0>]
model.dofs
[[9, 10, 11], [0, 1, 2], [3, 4, 5], [6, 7, 8], [12, 13, 14]]