Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3.  
  4. def fea_solve(Kpp, Kpf, Kfp, Kff, xp, Ff, M):
  5. xf = my_triangular_solve(M, Ff - np.matmul(Kfp, xp))
  6. return xf
  7.  
  8.  
  9. M = my_lu(Kff)
  10. xf_1 = fea_solve(Kpp, Kpf, Kfp, Kff, xp, Ff[:, 0], M)
  11. xf_2 = fea_solve(Kpp, Kpf, Kfp, Kff, xp, Ff[:, 1], M)
  12.  
  13. image_xf_1 = plot_truss(xf_1)
  14. image_xf_2 = plot_truss(xf_2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement