Skip to content

Commit 72ee7ca

Browse files
authored
Merge pull request #366 from Dlubal-Software/heet-lineReleaseTypeUpdate
Heet line release type update
2 parents c0dd8d5 + c143aa5 commit 72ee7ca

5 files changed

Lines changed: 53 additions & 5 deletions

File tree

RFEM/TypesForSpecialObjects/lineReleaseType.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def __init__(self,
3939
negative/positive zone = [negative/positive zone type, slippage, force]
4040
for translational_release_ux/y/z_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_DIAGRAM:
4141
translational_release_ux/y/z_nonlinearity = [nonlinearity type Diagram, [symmetric(bool), LineReleaseDiagram Enumeration(start), LineReleaseDiagram Enumeration(end)], [[displacement, force],...]]
42+
for translational_release_ux/y/z_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1/NONLINEARITY_TYPE_FRICTION_DIRECTION_2/NONLINEARITY_TYPE_FRICTION_DIRECTION_1_2:
43+
translational_release_n/vy/vz_nonlinearity = [nonlinearity type Friction Direction, [friction coefficient(float)]]
44+
for translational_release_ux/y/z_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_PLUS_2:
45+
translational_release_n/vy/vz_nonlinearity = [nonlinearity type Friction Direction, [friction coefficient 1(float), friction coefficient 2(float)]]
4246
rotational_release_phi_x_nonlinearity (list of lists): Nonlinearity Parameter for Rotational Release around X Direction
4347
for rotational_release_phi_x_nonlinearity[0] == RotationalReleaseNonlinearity.NONLINEARITY_TYPE_PARTIAL_ACTIVITY:
4448
rotational_release_phi_x_nonlinearity = [nonlinearity type Partial_Activity, negative zone, positive zone]
@@ -88,6 +92,38 @@ def __init__(self,
8892
clientObject.translational_release_u_z_nonlinearity = translational_release_uz_nonlinearity[0].name
8993
clientObject.rotational_release_phi_x_nonlinearity = rotational_release_phi_x_nonlinearity[0].name
9094

95+
# Line Release Nonlinearity Parameters for Friction
96+
# For translational_release_u_x_nonlinearity
97+
if translational_release_ux_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1 \
98+
or translational_release_ux_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_2 \
99+
or translational_release_ux_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_2:
100+
clientObject.friction_coefficient_x = translational_release_ux_nonlinearity[1][0]
101+
102+
elif translational_release_ux_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_PLUS_2:
103+
clientObject.friction_coefficient_xy = translational_release_ux_nonlinearity[1][0]
104+
clientObject.friction_coefficient_xz = translational_release_ux_nonlinearity[1][1]
105+
106+
# For translational_release_u_y_nonlinearity
107+
if translational_release_uy_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1 \
108+
or translational_release_uy_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_2 \
109+
or translational_release_uy_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_2:
110+
print('fsdfsf')
111+
clientObject.friction_coefficient_y = translational_release_uy_nonlinearity[1][0]
112+
113+
elif translational_release_uy_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_PLUS_2:
114+
clientObject.friction_coefficient_yx = translational_release_uy_nonlinearity[1][0]
115+
clientObject.friction_coefficient_yz = translational_release_uy_nonlinearity[1][1]
116+
117+
# For translational_release_u_z_nonlinearity
118+
if translational_release_uz_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1 \
119+
or translational_release_uz_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_2 \
120+
or translational_release_uz_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_2:
121+
clientObject.friction_coefficient_z = translational_release_uz_nonlinearity[1][0]
122+
123+
elif translational_release_uz_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_PLUS_2:
124+
clientObject.friction_coefficient_zx = translational_release_uz_nonlinearity[1][0]
125+
clientObject.friction_coefficient_zy = translational_release_uz_nonlinearity[1][1]
126+
91127
# Line Release Nonlinearity Parameters for Partial Activity
92128
# For translational_release_u_x_nonlinearity
93129
if translational_release_ux_nonlinearity[0] == TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_PARTIAL_ACTIVITY:

RFEM/TypesForSpecialObjects/nodalReleaseType.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ def __init__(self,
5050
for translational_release_n/vy/vz_nonlinearity[0] == NodalReleaseTypeReleaseNonlinearity.NONLINEARITY_TYPE_DIAGRAM:
5151
translational_release_n/vy/vz_nonlinearity = [nonlinearity type Diagram, [symmetric(bool), NodalReleaseTypeDiagram Enumeration(start), NodalReleaseTypeDiagram Enumeration(end)], [[displacement, force],...]]
5252
for translational_release_n/vy/vz_nonlinearity[0] == NodalReleaseTypeReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1/NONLINEARITY_TYPE_FRICTION_DIRECTION_2/NONLINEARITY_TYPE_FRICTION_DIRECTION_1_2:
53-
translational_release_n/vy/vz_nonlinearity = [nonlinearity type Diagram, [friction coefficient(float)]]
53+
translational_release_n/vy/vz_nonlinearity = [nonlinearity type Friction Direction, [friction coefficient(float)]]
5454
for translational_release_n/vy/vz_nonlinearity[0] == NodalReleaseTypeReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_PLUS_2:
55-
translational_release_n/vy/vz_nonlinearity = [nonlinearity type Diagram, [friction coefficient 1(float), friction coefficient 2(float)]]
55+
translational_release_n/vy/vz_nonlinearity = [nonlinearity type Friction Direction, [friction coefficient 1(float), friction coefficient 2(float)]]
5656
rotational_release_mt_nonlinearity (list/list of lists): Nonlinearity Parameter for Rotational Release around X Direction
5757
rotational_release_my_nonlinearity (list/list of lists): Nonlinearity Parameter for Rotational Release around Y Direction
5858
rotational_release_mz_nonlinearity (list/list of lists): Nonlinearity Parameter for Rotational Release around Z Direction

RFEM/enums.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,14 +2271,17 @@ class TranslationalReleaseNonlinearity(Enum):
22712271
Translational Release Nonlinearity Enumeration
22722272
'''
22732273
NONLINEARITY_TYPE_NONE, NONLINEARITY_TYPE_FAILURE_IF_NEGATIVE, NONLINEARITY_TYPE_FAILURE_IF_POSITIVE, \
2274-
NONLINEARITY_TYPE_DIAGRAM, NONLINEARITY_TYPE_PARTIAL_ACTIVITY = range(5)
2274+
NONLINEARITY_TYPE_DIAGRAM, NONLINEARITY_TYPE_PARTIAL_ACTIVITY, NONLINEARITY_TYPE_FRICTION_DIRECTION_1, \
2275+
NONLINEARITY_TYPE_FRICTION_DIRECTION_2, NONLINEARITY_TYPE_FRICTION_DIRECTION_1_2, \
2276+
NONLINEARITY_TYPE_COUPLED_DIAGRAM_PERMANENT_RELEASE, NONLINEARITY_TYPE_FRICTION_DIRECTION_1_PLUS_2 = range(10)
22752277

22762278
class RotationalReleaseNonlinearity(Enum):
22772279
'''
22782280
Rotational Release Nonlinearity Enumeration
22792281
'''
22802282
NONLINEARITY_TYPE_NONE, NONLINEARITY_TYPE_FAILURE_IF_NEGATIVE, NONLINEARITY_TYPE_FAILURE_IF_POSITIVE, \
2281-
NONLINEARITY_TYPE_DIAGRAM, NONLINEARITY_TYPE_PARTIAL_ACTIVITY, NONLINEARITY_TYPE_FORCE_MOMENT_DIAGRAM = range(6)
2283+
NONLINEARITY_TYPE_DIAGRAM, NONLINEARITY_TYPE_PARTIAL_ACTIVITY, NONLINEARITY_TYPE_FORCE_MOMENT_DIAGRAM, \
2284+
NONLINEARITY_TYPE_COUPLED_DIAGRAM_PERMANENT_RELEASE = range(7)
22822285

22832286
class LineReleaseLocalAxisSystem(Enum):
22842287
'''

UnitTests/test_LineReleaseType.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ def test_LineReleaseType():
3232
LineReleaseLocalAxisSystem.E_LOCAL_AXIS_SYSTEM_TYPE_HELP_NODE, [0.3, 1, LocalAxisSystemObjectInPlane.LOCAL_AXIS_SYSTEM_IN_PLANE_XY], 'Type 2'
3333
)
3434

35+
LineReleaseType(3, [0, 0, 0, 0], [TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1, [0.12]], [TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_2, [0.54]], \
36+
[TranslationalReleaseNonlinearity.NONLINEARITY_TYPE_FRICTION_DIRECTION_1_PLUS_2, [0.25, 0.85]])
37+
38+
3539
Model.clientModel.service.finish_modification()
3640

3741
lrt_1 = Model.clientModel.service.get_line_release_type(1)
@@ -47,3 +51,8 @@ def test_LineReleaseType():
4751
assert lrt_2.force_moment_diagram_around_x_end == "FORCE_MOMENT_DIAGRAM_ENDING_TYPE_YIELDING"
4852
assert lrt_2.force_moment_diagram_around_x_table[0][0].row['force'] == 1500
4953
assert lrt_2.force_moment_diagram_around_x_table[0][2].row['max_moment'] == 450
54+
55+
lrt_3 = Model.clientModel.service.get_line_release_type(3)
56+
assert lrt_3.translational_release_u_z_nonlinearity == "NONLINEARITY_TYPE_FRICTION_DIRECTION_1_PLUS_2"
57+
assert round(lrt_3.friction_coefficient_x, 2) == 0.12
58+
assert round(lrt_3.friction_coefficient_zy, 2) == 0.85

pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi
1717
- [ ] Attached examples
1818

1919
**Test Configuration**:
20-
* RFEM / RSTAB version:
20+
* RFEM version:
2121
* Python version:
2222

2323

0 commit comments

Comments
 (0)