Skip to content

Commit 4c1aca2

Browse files
committed
format
1 parent 547acc5 commit 4c1aca2

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

src/compas_fea2/model/elements.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ def plot_section(self):
368368
self.section.plot()
369369

370370
def plot_stress_distribution(self, step: "Step", end: str = "end_1", nx: int = 100, ny: int = 100, *args, **kwargs): # noqa: F821
371-
""" Plot the stress distribution along the element.
372-
371+
"""Plot the stress distribution along the element.
372+
373373
Parameters
374374
----------
375375
step : :class:`compas_fea2.model.Step`
@@ -424,8 +424,8 @@ def forces(self, step: "Step") -> "Result":
424424
return r.forces
425425

426426
def moments(self, step: "_Step") -> "Result": # noqa: F821
427-
""" Get the moments result for the element.
428-
427+
"""Get the moments result for the element.
428+
429429
Parameters
430430
----------
431431
step : :class:`compas_fea2.model.Step`

src/compas_fea2/model/model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from pathlib import Path
99
from typing import Optional
1010
from typing import Set
11-
from typing import Union
1211
from typing import Tuple
12+
from typing import Union
1313

1414
from compas.datastructures import Graph
1515
from compas.geometry import Box
@@ -1478,10 +1478,11 @@ def extract_interfaces(self, max_origin_distance=0.01, tol=1e-6) -> list[Tuple[P
14781478
List of interfaces extracted from the model.
14791479
14801480
"""
1481-
from compas.geometry import distance_point_plane_signed
14821481
import itertools
14831482
from typing import List
14841483

1484+
from compas.geometry import distance_point_plane_signed
1485+
14851486
# --- Nested helper function to check coplanarity ---
14861487
def _are_two_planes_coplanar(pln1: Plane, pln2: Plane, tol: float) -> bool:
14871488
"""Checks if two COMPAS planes are geometrically the same."""

src/compas_fea2/problem/steps/step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ def add_gravity_load(self, parts=None, g=9.81, x=0.0, y=0.0, z=-1.0, load_case=N
594594
try:
595595
parts = parts or self.model.parts
596596
except Exception:
597-
raise AttributeError('You need to register the problem to the model first')
597+
raise AttributeError("You need to register the problem to the model first")
598598
nodes = []
599599
loads = []
600600
for part in parts:

tests/test_materials.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
import unittest
22
from compas_fea2.model import Concrete
33
from compas_fea2.units import units
4+
45
u = units("SI_mm")
56

67
# Concrete properties based on Eurocode 2 (EN 1992-1-1:2004)
78
concrete_properties = {
8-
"C12/15": {"fck": 12*u.MPa, "fck_cube": 15*u.MPa, "fcm": 20*u.MPa, "fctm": 1.57*u.MPa, "Ecm": 27.085*u.Gpa},
9-
"C16/20": {"fck": 16*u.MPa, "fck_cube": 20*u.MPa, "fcm": 24*u.MPa, "fctm": 1.90*u.MPa, "Ecm": 28.608*u.Gpa},
10-
"C20/25": {"fck": 20*u.MPa, "fck_cube": 25*u.MPa, "fcm": 28*u.MPa, "fctm": 2.21*u.MPa, "Ecm": 29.962*u.Gpa},
11-
"C25/30": {"fck": 25*u.MPa, "fck_cube": 30*u.MPa, "fcm": 33*u.MPa, "fctm": 2.56*u.MPa, "Ecm": 31.476*u.Gpa},
12-
"C30/37": {"fck": 30*u.MPa, "fck_cube": 37*u.MPa, "fcm": 38*u.MPa, "fctm": 2.90*u.MPa, "Ecm": 32.837*u.Gpa},
13-
"C35/45": {"fck": 35*u.MPa, "fck_cube": 45*u.MPa, "fcm": 43*u.MPa, "fctm": 3.21*u.MPa, "Ecm": 34.077*u.Gpa},
14-
"C40/50": {"fck": 40*u.MPa, "fck_cube": 50*u.MPa, "fcm": 48*u.MPa, "fctm": 3.51*u.MPa, "Ecm": 35.220*u.Gpa},
15-
"C45/55": {"fck": 45*u.MPa, "fck_cube": 55*u.MPa, "fcm": 53*u.MPa, "fctm": 3.80*u.MPa, "Ecm": 36.283*u.Gpa},
16-
"C50/60": {"fck": 50*u.MPa, "fck_cube": 60*u.MPa, "fcm": 58*u.MPa, "fctm": 4.07*u.MPa, "Ecm": 37.278*u.Gpa},
17-
"C55/67": {"fck": 55*u.MPa, "fck_cube": 67*u.MPa, "fcm": 63*u.MPa, "fctm": 4.21*u.MPa, "Ecm": 38.214*u.Gpa},
18-
"C60/75": {"fck": 60*u.MPa, "fck_cube": 75*u.MPa, "fcm": 68*u.MPa, "fctm": 4.35*u.MPa, "Ecm": 39.100*u.Gpa},
19-
"C70/85": {"fck": 70*u.MPa, "fck_cube": 85*u.MPa, "fcm": 78*u.MPa, "fctm": 4.61*u.MPa, "Ecm": 40.743*u.Gpa},
20-
"C80/95": {"fck": 80*u.MPa, "fck_cube": 95*u.MPa, "fcm": 88*u.MPa, "fctm": 4.84*u.MPa, "Ecm": 42.244*u.Gpa},
21-
"C90/105": {"fck": 90*u.MPa, "fck_cube": 105*u.MPa, "fcm": 98*u.MPa, "fctm": 5.04*u.MPa, "Ecm": 43.631*u.GPa},
9+
"C12/15": {"fck": 12 * u.MPa, "fck_cube": 15 * u.MPa, "fcm": 20 * u.MPa, "fctm": 1.57 * u.MPa, "Ecm": 27.085 * u.Gpa},
10+
"C16/20": {"fck": 16 * u.MPa, "fck_cube": 20 * u.MPa, "fcm": 24 * u.MPa, "fctm": 1.90 * u.MPa, "Ecm": 28.608 * u.Gpa},
11+
"C20/25": {"fck": 20 * u.MPa, "fck_cube": 25 * u.MPa, "fcm": 28 * u.MPa, "fctm": 2.21 * u.MPa, "Ecm": 29.962 * u.Gpa},
12+
"C25/30": {"fck": 25 * u.MPa, "fck_cube": 30 * u.MPa, "fcm": 33 * u.MPa, "fctm": 2.56 * u.MPa, "Ecm": 31.476 * u.Gpa},
13+
"C30/37": {"fck": 30 * u.MPa, "fck_cube": 37 * u.MPa, "fcm": 38 * u.MPa, "fctm": 2.90 * u.MPa, "Ecm": 32.837 * u.Gpa},
14+
"C35/45": {"fck": 35 * u.MPa, "fck_cube": 45 * u.MPa, "fcm": 43 * u.MPa, "fctm": 3.21 * u.MPa, "Ecm": 34.077 * u.Gpa},
15+
"C40/50": {"fck": 40 * u.MPa, "fck_cube": 50 * u.MPa, "fcm": 48 * u.MPa, "fctm": 3.51 * u.MPa, "Ecm": 35.220 * u.Gpa},
16+
"C45/55": {"fck": 45 * u.MPa, "fck_cube": 55 * u.MPa, "fcm": 53 * u.MPa, "fctm": 3.80 * u.MPa, "Ecm": 36.283 * u.Gpa},
17+
"C50/60": {"fck": 50 * u.MPa, "fck_cube": 60 * u.MPa, "fcm": 58 * u.MPa, "fctm": 4.07 * u.MPa, "Ecm": 37.278 * u.Gpa},
18+
"C55/67": {"fck": 55 * u.MPa, "fck_cube": 67 * u.MPa, "fcm": 63 * u.MPa, "fctm": 4.21 * u.MPa, "Ecm": 38.214 * u.Gpa},
19+
"C60/75": {"fck": 60 * u.MPa, "fck_cube": 75 * u.MPa, "fcm": 68 * u.MPa, "fctm": 4.35 * u.MPa, "Ecm": 39.100 * u.Gpa},
20+
"C70/85": {"fck": 70 * u.MPa, "fck_cube": 85 * u.MPa, "fcm": 78 * u.MPa, "fctm": 4.61 * u.MPa, "Ecm": 40.743 * u.Gpa},
21+
"C80/95": {"fck": 80 * u.MPa, "fck_cube": 95 * u.MPa, "fcm": 88 * u.MPa, "fctm": 4.84 * u.MPa, "Ecm": 42.244 * u.Gpa},
22+
"C90/105": {"fck": 90 * u.MPa, "fck_cube": 105 * u.MPa, "fcm": 98 * u.MPa, "fctm": 5.04 * u.MPa, "Ecm": 43.631 * u.GPa},
2223
}
2324

2425

0 commit comments

Comments
 (0)