-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
JWock82
authored and
JWock82
committed
Feb 1, 2025
1 parent
9a0dde5
commit 12e3b78
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from PyNite import FEModel3D | ||
import pytest as pt | ||
|
||
# Tests | ||
def test_beam_rotation(): | ||
|
||
beam = FEModel3D() | ||
|
||
beam.add_node('N1', 0, 0, 0) | ||
beam.add_node('N2', 10, 0, 0) | ||
beam.def_support('N1', True, True, True, True, False, False) | ||
beam.def_support('N2', False, True, True, True, True, True) | ||
beam.add_material('Steel', 29000/12**2, 11200/12**2, 0.3, 0.490, 60) | ||
beam.add_section('W12x26', 7.65/12**2, 17.3/12**4, 204/12**4, 0.3/12**4) | ||
beam.add_member('M1', 'N1', 'N2', 'Steel', 'W12x26', 45) | ||
beam.add_member_dist_load('M1', 'FY', 2, 2) | ||
|
||
# Analyze the beam | ||
beam.analyze() | ||
|
||
# Obtain the maximum moment about each axis | ||
Mz = beam.members['M1'].max_moment('Mz') | ||
My = beam.members['M1'].max_moment('My') | ||
|
||
# The moment about each axis should be identical | ||
assert Mz == pt.approx(25, rel=1e-2) | ||
assert My == pt.approx(25, rel=1e-2) |