Forces in stack of axis (beam)#

This notebook goes together with Basics : Forces

from DAVE import *
from DAVE.jupyter import *
DAVEcore version = 2.0 from c:\python\miniconda3\envs\book\Lib\site-packages\DAVEcore.cp311-win_amd64.pyd
! Blender not found - Blender can be installed from the microsoft windows store.   if you have blender already and want to be able to use blender then please either:
   - configure windows to open .blend files with blender automatically 
   - add the folder containing blender-launcher.exe to the PATH variable.
s = Scene()
a = s.new_frame('axis_0')
for i in range(10):
    a = s.new_frame(f'axis_{i+1}', parent = a, position = (1,0,0))
p = s.new_point('point',parent=a)
f = s.new_force('force', parent = p)
f.force = (0,0,-5)
show(s, camera_pos = (7.120972238813686, -15.59726683922203, 0.7170462426406728), lookat = (5.597812229842809, 5.030382818599853, -0.31770605518614115))
../_images/3470827789d549ee32db51a371021d8459164be56f812c6c1e8ff743541715ab.png
s.print_node_tree()
axis_0 [Frame]
 |-> axis_1 [Frame]
 |    |-> axis_2 [Frame]
 |    |    |-> axis_3 [Frame]
 |    |    |    |-> axis_4 [Frame]
 |    |    |    |    |-> axis_5 [Frame]
 |    |    |    |    |    |-> axis_6 [Frame]
 |    |    |    |    |    |    |-> axis_7 [Frame]
 |    |    |    |    |    |    |    |-> axis_8 [Frame]
 |    |    |    |    |    |    |    |    |-> axis_9 [Frame]
 |    |    |    |    |    |    |    |    |    |-> axis_10 [Frame]
 |    |    |    |    |    |    |    |    |    |    |-> point [Point]
 |    |    |    |    |    |    |    |    |    |    |    |-> force [Force]

Update() calculates the forces in the model

s.update()

Get all the axis-type nodes from the scene.

For each of them, obtain the global positon, shear and the moment about the y-axis.

From this we can plot the moment and shear lines of the beam.

x = []
my = []
fz = []

for a in s.nodes_of_type(Frame):
    x.append(a.global_position[0])
    fz.append(a.applied_force[2])# python is zero based, so 0=fx, 1=fy, 2=fz, 3=mx, 4=my
    my.append(a.applied_force[4])  

And now plot them

import matplotlib.pyplot as plt
plt.plot(x,my, label = 'my')
plt.plot(x,fz, label = 'fz')
plt.legend()
plt.xlabel('position [m]')
plt.ylabel('moment [kN*m] or force [kN]');
../_images/0eda562648761cbd9f1805405fdfa59f4d23fb83cb295888d6a48ad9e6a971e3.png

The equilibrium error#

Release the connection of axis_6 about the Y-axis

s['axis_6'].fixed = (True,True,True,True,   False,   True)

Updating the model will calculate the forces the for current positions and rotations but will not solve statics. So an equilibrium error will be present about the released dof of axis_6

s.update()
s['axis_6'].equilibrium_error
(0.0, 0.0, 0.0, 0.0, 20.0, 0.0)

If we solve the model then the geometry will be updated such that the equilibrium errors are all zero.

s.solve_statics()
True
s['axis_6'].equilibrium_error
(0.0, 0.0, 0.0, 0.0, 3.09698442602091e-05, 0.0)
show(s, camera_pos = (7.120972238813686, -15.59726683922203, -2.7170462426406728), lookat = (5.597812229842809, 5.030382818599853, -2.31770605518614115), force_do_normalize = True, force_scale = 1.6, cog_scale = 0.25)
../_images/a3dea375c454807e05b32191bbef544908fe2420f388aa381a1cd0d72296a24a.png