Just new in this community, please be patient to read what I'm looking for.
According to the last release of Openseespy manual, downloadable from here
Code: Select all
https://buildmedia.readthedocs.org/media/pdf/openseespydoc/latest/openseespydoc.pdf
So, my proposal is: could someone post a .py code to solve this basic problem?
Code: Select all
Given:
* a beam between two simple supports, span L= 4 m
* charged with a distributed load w= 5 kN/m
* having the following geo-mechanics parameters
E= 2e11 pascal # steel modulus of elasticity
I=1.6e-5 m^4 # beam inertial moment
# Neglected section area
Find:
* elastica diagram (plot and deformation values)
spanned 10% (or more) of length L
EDIT: what I'm expecting from Openseespy
Code: Select all
# ---- elastica.py -------
L= 4.0 # m
w= 5.0 # kN/m
E= 2e11 # pascal
I= 1.6e-5 # m^4
#
max_displ= 5/384*w*L**4/(E*I) # Elasticity theory
print('\n Max_displacement at midspan= {:.4e}'.format(max_displ), 'm \n')
Nsteps=17
#
print('{:>7}{:>10}'.format('x', 'eta'))
print('{:>22}'.format('------------------'))
for k in range(Nsteps):
eta= 1.0/(E*I)*(w*(k/L)**4/24 - w*L*(k/L)**3/12 + w*L**3*(k/L)/24 )
print ('{:>9.2f}{:>12.4e}'. format(k/L, eta) )
print('{:>22}'.format('------------------'))
# EOF: elastica.py
'''
Max_displacement at midspan= 5.2083e-06 m
x eta
------------------
0.00 0.0000e+00
0.25 1.0338e-06
0.50 2.0223e-06
0.75 2.9259e-06
1.00 3.7109e-06
1.25 4.3500e-06
1.50 4.8218e-06
1.75 5.1109e-06
2.00 5.2083e-06
2.25 5.1109e-06
2.50 4.8218e-06
2.75 4.3500e-06
3.00 3.7109e-06
3.25 2.9259e-06
3.50 2.0223e-06
3.75 1.0338e-06
4.00 0.0000e+00
------------------
'''