Skip to content
Snippets Groups Projects
Commit f0227492 authored by David Preiss's avatar David Preiss
Browse files

prep for final

parent 5c55761d
Branches
No related tags found
No related merge requests found
...@@ -5,11 +5,11 @@ import matplotlib.animation as animation ...@@ -5,11 +5,11 @@ import matplotlib.animation as animation
from matplotlib.animation import FuncAnimation, writers from matplotlib.animation import FuncAnimation, writers
''' '''
Adapted from: https://polymerfem.com/full-finite-element-solver-in-100-lines-of-python/
6.2) 6.2)
Model the bending of a beam (equation 10.29) under an applied load. Use Hermite polynomial interpolation, Model the bending of a beam (equation 10.29) under an applied load. Use Hermite polynomial interpolation,
and boundary conditions fixing the displacement and slope at one end, and applying a force at the other end. and boundary conditions fixing the displacement and slope at one end, and applying a force at the other end.
V = int(0, L)[0.5*EI * (d^2u/dx^2)^2 - u(x) * f(x)]dx V = int(0, L)[0.5*EI * (d^2u/dx^2)^2 - u(x) * f(x)]dx
Adapted from: https://polymerfem.com/full-finite-element-solver-in-100-lines-of-python/
''' '''
# Supporting functions # Supporting functions
...@@ -115,7 +115,7 @@ plt.axis('equal') ...@@ -115,7 +115,7 @@ plt.axis('equal')
plt.show() plt.show()
# my_dpi = 96 # my_dpi = 96
# f = r"c://Users/david/Desktop/NMM/week5/img/wave_no_damp.gif" # f = r"c://Users/david/Desktop/NMM/week6/img/beam.gif"
# fps2 = 20 # fps2 = 20
# writervideo = animation.FFMpegWriter(fps=fps2, extra_args=['-vcodec', 'libx264']) # writervideo = animation.FFMpegWriter(fps=fps2, extra_args=['-vcodec', 'libx264'])
# anim.save(f, writer='imagemagick', fps=fps2, dpi=my_dpi) # anim.save(f, writer='imagemagick', fps=fps2, dpi=my_dpi)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment