diff --git a/structuralcodes/sections/_generic.py b/structuralcodes/sections/_generic.py index 0d4ace47..b697bfaf 100644 --- a/structuralcodes/sections/_generic.py +++ b/structuralcodes/sections/_generic.py @@ -179,6 +179,8 @@ def compute_area_moments(geometry, material=None): [0, 1, 0], mesh_size=self.mesh_size, ) + # Change sign due to moment sign convention + iyz *= -1 # Integrate a dummy strain profile for getting first # and second moment respect z axis and product moment ( @@ -192,13 +194,15 @@ def compute_area_moments(geometry, material=None): tri=tri, mesh_size=self.mesh_size, ) + # Change sign due to moment sign convention + izz *= -1 if abs(abs(izy) - abs(iyz)) > 10: error_str = 'Something went wrong with computation of ' error_str += f'moments of area: iyz = {iyz}, izy = {izy}.\n' error_str += 'They should be equal but are not!' raise RuntimeError(error_str) - return abs(sy), abs(sz), abs(iyy), abs(izz), abs(iyz) + return sy, sz, iyy, izz, iyz # Create a dummy material for integration of area moments # This is used for J, S etc, not for E_J E_S etc diff --git a/structuralcodes/sections/section_integrators/_marin_integrator.py b/structuralcodes/sections/section_integrators/_marin_integrator.py index 6050f337..1dabed45 100644 --- a/structuralcodes/sections/section_integrators/_marin_integrator.py +++ b/structuralcodes/sections/section_integrators/_marin_integrator.py @@ -44,7 +44,7 @@ def prepare_input( # and stress coefficients for each part. prepared_input = [] # 1. Rotate section in order to have neutral axis horizontal - angle = atan2(strain[2], strain[1]) + angle = -atan2(strain[2], strain[1]) rotated_geom = geo.rotate(angle) # 2. Get y coordinate of neutral axis in this new CRS