!pip install PyniteFEA[all]
# Import `FEModel3D` from `Pynite`
from Pynite import FEModel3D
# Create a new finite element model
model = FEModel3D()
# Add nodes (unit: meter)
model.add_node('N1', 0, 0, 0)
model.add_node('N2', 5, 0, 0)
# Define a material
E = 30000*1000 # Modulus of elasticity (MPa->kN/m2)
G = 11200*1000 # Shear modulus of elasticity (MPa->kN/m2)
nu = 0.3 # Poisson's ratio
rho =2500 # Density (kg/m3)
model.add_material('Concrete', E, G, nu, rho)
# Add a section with the following properties:
# A = 0.09 m^2, Iy = 0.000675 m^4, Iz = 0.000675 m^4, J = 0.000975 m^4
A = 0.09; Iy = 0.000675; Iz = 0.000675; J = 0.000975
model.add_section('MySection', A, Iy, Iz, J) # add_section(name: str, A: float, Iy: float, Iz: float, J: float)
#Add a member
model.add_member('M1', 'N1', 'N2', 'Concrete', 'MySection')
# DX, DY, DZ, RX, RY, RZ
# Provide simple supports
model.def_support('N1', True, True, True, True, False, True)
model.def_support('N2', False, True, True, True, False, True)
# Add a uniform load of 10kN/m to the beam (from 0 m to 5 m)
model.delete_loads()
model.add_member_dist_load('M1', 'Fz', -10, -10, 0, 5, case='S')
model.add_load_combo('S', {'S': 1.0})
#model.add_node_load('N2', direction='FZ', P=-5.0, case='D')
# Analyze the beam
model.analyze()
# Print reactions at each end of the beam
print(f"Left Support Reaction: { {k: float(v) for k, v in model.nodes['N1'].RxnFZ.items()} }")
print(f"Right Support Reaction: { {k: float(v) for k, v in model.nodes['N2'].RxnFZ.items()} }")
# Print the shear, moment, and deflection diagrams
model.members['M1'].plot_shear('Fz', 'S')
model.members['M1'].plot_moment('My', 'S')
model.members['M1'].plot_deflection('dz', 'S')
print(model.members['M1'].max_moment('My', 'S'))
print(model.members['M1'].min_moment('My', 'S'))
print(model.members['M1'].min_deflection('dz', 'S'))
계산값 비교
w=10; L=5
(w*L**2)/8
(5*w*L**4)/(384*E*Iy)