Skip to content

Commit 619be8c

Browse files
authored
Merge pull request #404 from dlubal-software/Rebecca_bugfix_example
Temporary fix for load combinations
2 parents 0847045 + 1bdb48d commit 619be8c

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Examples/SteelDesign/SteelDesignExcel.py

+13-6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
from RFEM.Imperfections.imperfectionCase import ImperfectionCase
2525
from RFEM.Imperfections.memberImperfection import MemberImperfection
2626
from RFEM.LoadCasesAndCombinations.loadCasesAndCombinations import LoadCasesAndCombinations
27+
from RFEM.LoadCasesAndCombinations.designSituation import DesignSituation
28+
from RFEM.LoadCasesAndCombinations.loadCombination import LoadCombination
29+
from RFEM.LoadCasesAndCombinations.combinationWizard import CombinationWizard
2730
from RFEM.LoadCasesAndCombinations.loadCase import LoadCase
2831
from RFEM.LoadCasesAndCombinations.staticAnalysisSettings import StaticAnalysisSettings
2932
from RFEM.Loads.nodalLoad import NodalLoad
@@ -139,7 +142,8 @@ def main():
139142
if lst:
140143
if 'SteelHallExcel' in lst[0]:
141144
print('Closing old Model...!')
142-
connectionGlobals.client.service.close_model(0, False)
145+
index = lst[0].index('SteelHallExcel')
146+
connectionGlobals.client.service.close_model(index, False)
143147
print('Creating new model...!')
144148
Model(True, 'SteelHallExcel.rf6', delete_all= True)
145149

@@ -376,6 +380,9 @@ def main():
376380
LoadCase.StaticAnalysis(4, 'Wind-Load_x', True, 1, ActionCategoryType.ACTION_CATEGORY_WIND_QW, [False])
377381
LoadCase.StaticAnalysis(5, 'Wind-Load_y', True, 1, ActionCategoryType.ACTION_CATEGORY_WIND_QW, [False])
378382

383+
CombinationWizard(1, consider_imperfection_case=False, params={'structure_modification_enabled':'False'} )
384+
DesignSituation(1, DesignSituationType.DESIGN_SITUATION_TYPE_EQU_PERMANENT_AND_TRANSIENT, params={'combination_wizard': 1})
385+
379386
# Creating Loads for LC2:Live Load
380387
n, k, l = 0, 0, 0
381388
for j in range(frame_number):
@@ -447,7 +454,7 @@ def main():
447454
nodeSupportForce_x, nodeSupportForce_y, nodeSupportForce_z, nodeMoment_x, nodeMoment_y, nodeMoment_z = [], [], [], [], [], []
448455

449456
for j in range(nodes):
450-
dispTab = ResultTables.NodesDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, j+1)
457+
dispTab = ResultTables.NodesDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, j+1)
451458
nodisp_abs = GetMaxValue(dispTab, 'displacement_absolute') * 1000
452459
nodisp_x = GetMaxValue(dispTab, 'displacement_x') * 1000
453460
nodisp_y = GetMaxValue(dispTab, 'displacement_y') * 1000
@@ -467,7 +474,7 @@ def main():
467474
nodeType = '-'
468475
if (j+1) in nodes_no:
469476
nodeType = 'Hinged'
470-
supportForceTab = ResultTables.NodesSupportForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, j+1)
477+
supportForceTab = ResultTables.NodesSupportForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, j+1)
471478
nodesupforce_x = GetMaxValue(supportForceTab, 'support_force_p_x')
472479
nodesupforce_y = GetMaxValue(supportForceTab, 'support_force_p_y')
473480
nodesupforce_z = GetMaxValue(supportForceTab, 'support_force_p_z')
@@ -508,7 +515,7 @@ def main():
508515

509516
k = 1
510517
for j in range(beam_column):
511-
dispTable = ResultTables.MembersLocalDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, object_no=k)
518+
dispTable = ResultTables.MembersLocalDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, object_no=k)
512519
maxDisp_abs = GetMaxValue(dispTable, 'displacement_absolute') * 1000
513520
maxDisp_x = GetMaxValue(dispTable, 'displacement_x') * 1000
514521
maxDisp_y = GetMaxValue(dispTable, 'displacement_y') * 1000
@@ -518,7 +525,7 @@ def main():
518525
maxDisplacement_y.append(round(maxDisp_y, 3))
519526
maxDisplacement_z.append(round(maxDisp_z, 3))
520527

521-
momentTable = ResultTables.MembersInternalForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, object_no=k)
528+
momentTable = ResultTables.MembersInternalForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, object_no=k)
522529

523530
if abs(GetMaxValue(momentTable, 'internal_force_n')) > abs(GetMinValue(momentTable, 'internal_force_n')):
524531
maxFor_n = GetMaxValue(momentTable, 'internal_force_n') / 1000
@@ -584,7 +591,7 @@ def main():
584591
maxMoment_my = np.array([maxMoment_my]).T
585592
maxMoment_mz = np.array([maxMoment_mz]).T
586593

587-
summary = ResultTables.Summary(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7)
594+
summary = ResultTables.Summary(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1)
588595
df = pd.DataFrame(summary)
589596
new_df = df.loc[:,['description', 'value', 'units', 'notes']]
590597

0 commit comments

Comments
 (0)