Skip to content

Commit eb22356

Browse files
Temporary fix for load combinations
1 parent 54a2085 commit eb22356

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

Examples/SteelDesign/SteelDesignExcel.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
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
2729
from RFEM.LoadCasesAndCombinations.loadCase import LoadCase
2830
from RFEM.LoadCasesAndCombinations.staticAnalysisSettings import StaticAnalysisSettings
2931
from RFEM.Loads.nodalLoad import NodalLoad
@@ -376,6 +378,9 @@ def main():
376378
LoadCase.StaticAnalysis(4, 'Wind-Load_x', True, 1, ActionCategoryType.ACTION_CATEGORY_WIND_QW, [False])
377379
LoadCase.StaticAnalysis(5, 'Wind-Load_y', True, 1, ActionCategoryType.ACTION_CATEGORY_WIND_QW, [False])
378380

381+
DesignSituation(1, DesignSituationType.DESIGN_SITUATION_TYPE_EQU_PERMANENT_AND_TRANSIENT)
382+
LoadCombination(1, AnalysisType.ANALYSIS_TYPE_STATIC, 1, '', 1)
383+
379384
# Creating Loads for LC2:Live Load
380385
n, k, l = 0, 0, 0
381386
for j in range(frame_number):
@@ -431,7 +436,7 @@ def main():
431436

432437
# Calculation
433438
print("Calculation started...")
434-
Model.clientModel.service.generate_load_cases_and_combinations()
439+
#Model.clientModel.service.generate_load_cases_and_combinations()
435440
Calculate_all()
436441
print("Done!")
437442

@@ -447,7 +452,7 @@ def main():
447452
nodeSupportForce_x, nodeSupportForce_y, nodeSupportForce_z, nodeMoment_x, nodeMoment_y, nodeMoment_z = [], [], [], [], [], []
448453

449454
for j in range(nodes):
450-
dispTab = ResultTables.NodesDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, j+1)
455+
dispTab = ResultTables.NodesDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, j+1)
451456
nodisp_abs = GetMaxValue(dispTab, 'displacement_absolute') * 1000
452457
nodisp_x = GetMaxValue(dispTab, 'displacement_x') * 1000
453458
nodisp_y = GetMaxValue(dispTab, 'displacement_y') * 1000
@@ -467,7 +472,7 @@ def main():
467472
nodeType = '-'
468473
if (j+1) in nodes_no:
469474
nodeType = 'Hinged'
470-
supportForceTab = ResultTables.NodesSupportForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, j+1)
475+
supportForceTab = ResultTables.NodesSupportForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, j+1)
471476
nodesupforce_x = GetMaxValue(supportForceTab, 'support_force_p_x')
472477
nodesupforce_y = GetMaxValue(supportForceTab, 'support_force_p_y')
473478
nodesupforce_z = GetMaxValue(supportForceTab, 'support_force_p_z')
@@ -508,7 +513,7 @@ def main():
508513

509514
k = 1
510515
for j in range(beam_column):
511-
dispTable = ResultTables.MembersLocalDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, object_no=k)
516+
dispTable = ResultTables.MembersLocalDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, object_no=k)
512517
maxDisp_abs = GetMaxValue(dispTable, 'displacement_absolute') * 1000
513518
maxDisp_x = GetMaxValue(dispTable, 'displacement_x') * 1000
514519
maxDisp_y = GetMaxValue(dispTable, 'displacement_y') * 1000
@@ -518,7 +523,7 @@ def main():
518523
maxDisplacement_y.append(round(maxDisp_y, 3))
519524
maxDisplacement_z.append(round(maxDisp_z, 3))
520525

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

523528
if abs(GetMaxValue(momentTable, 'internal_force_n')) > abs(GetMinValue(momentTable, 'internal_force_n')):
524529
maxFor_n = GetMaxValue(momentTable, 'internal_force_n') / 1000
@@ -584,7 +589,7 @@ def main():
584589
maxMoment_my = np.array([maxMoment_my]).T
585590
maxMoment_mz = np.array([maxMoment_mz]).T
586591

587-
summary = ResultTables.Summary(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7)
592+
summary = ResultTables.Summary(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1)
588593
df = pd.DataFrame(summary)
589594
new_df = df.loc[:,['description', 'value', 'units', 'notes']]
590595

0 commit comments

Comments
 (0)