Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary fix for load combinations #404

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Examples/SteelDesign/SteelDesignExcel.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
from RFEM.Imperfections.imperfectionCase import ImperfectionCase
from RFEM.Imperfections.memberImperfection import MemberImperfection
from RFEM.LoadCasesAndCombinations.loadCasesAndCombinations import LoadCasesAndCombinations
from RFEM.LoadCasesAndCombinations.designSituation import DesignSituation
from RFEM.LoadCasesAndCombinations.loadCombination import LoadCombination
from RFEM.LoadCasesAndCombinations.loadCase import LoadCase
from RFEM.LoadCasesAndCombinations.staticAnalysisSettings import StaticAnalysisSettings
from RFEM.Loads.nodalLoad import NodalLoad
Expand Down Expand Up @@ -376,6 +378,9 @@ def main():
LoadCase.StaticAnalysis(4, 'Wind-Load_x', True, 1, ActionCategoryType.ACTION_CATEGORY_WIND_QW, [False])
LoadCase.StaticAnalysis(5, 'Wind-Load_y', True, 1, ActionCategoryType.ACTION_CATEGORY_WIND_QW, [False])

DesignSituation(1, DesignSituationType.DESIGN_SITUATION_TYPE_EQU_PERMANENT_AND_TRANSIENT)
LoadCombination(1, AnalysisType.ANALYSIS_TYPE_STATIC, 1, '', 1)

# Creating Loads for LC2:Live Load
n, k, l = 0, 0, 0
for j in range(frame_number):
Expand Down Expand Up @@ -431,7 +436,7 @@ def main():

# Calculation
print("Calculation started...")
Model.clientModel.service.generate_load_cases_and_combinations()
#Model.clientModel.service.generate_load_cases_and_combinations()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should write some comments like ToDo or these need to be fixed in future after bugfix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug was resolved. Generation of load combinations is working now. (Version 6.08.0010)

Calculate_all()
print("Done!")

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

for j in range(nodes):
dispTab = ResultTables.NodesDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, j+1)
dispTab = ResultTables.NodesDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, j+1)
nodisp_abs = GetMaxValue(dispTab, 'displacement_absolute') * 1000
nodisp_x = GetMaxValue(dispTab, 'displacement_x') * 1000
nodisp_y = GetMaxValue(dispTab, 'displacement_y') * 1000
Expand All @@ -467,7 +472,7 @@ def main():
nodeType = '-'
if (j+1) in nodes_no:
nodeType = 'Hinged'
supportForceTab = ResultTables.NodesSupportForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, j+1)
supportForceTab = ResultTables.NodesSupportForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, j+1)
nodesupforce_x = GetMaxValue(supportForceTab, 'support_force_p_x')
nodesupforce_y = GetMaxValue(supportForceTab, 'support_force_p_y')
nodesupforce_z = GetMaxValue(supportForceTab, 'support_force_p_z')
Expand Down Expand Up @@ -508,7 +513,7 @@ def main():

k = 1
for j in range(beam_column):
dispTable = ResultTables.MembersLocalDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, object_no=k)
dispTable = ResultTables.MembersLocalDeformations(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, object_no=k)
maxDisp_abs = GetMaxValue(dispTable, 'displacement_absolute') * 1000
maxDisp_x = GetMaxValue(dispTable, 'displacement_x') * 1000
maxDisp_y = GetMaxValue(dispTable, 'displacement_y') * 1000
Expand All @@ -518,7 +523,7 @@ def main():
maxDisplacement_y.append(round(maxDisp_y, 3))
maxDisplacement_z.append(round(maxDisp_z, 3))

momentTable = ResultTables.MembersInternalForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7, object_no=k)
momentTable = ResultTables.MembersInternalForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1, object_no=k)

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

summary = ResultTables.Summary(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 7)
summary = ResultTables.Summary(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 1)
df = pd.DataFrame(summary)
new_df = df.loc[:,['description', 'value', 'units', 'notes']]

Expand Down