Skip to content

Commit

Permalink
Merge pull request dlubal-software#115 from Dlubal-Software/OndrejMic…
Browse files Browse the repository at this point in the history
…hal_bug_22810

Ondrej Michal- bug 22810
  • Loading branch information
OndraMichal authored Apr 1, 2022
2 parents e1bfd6a + 4983743 commit a017acd
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 140 deletions.
25 changes: 13 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@
"editor.tabSize": 4,
"editor.insertSpaces": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": [
"--enable=W0614"
],
"python.linting.enabled": true,
"python.linting.pylintArgs": [],
"python.linting.enabled": false,
"python.linting.pydocstyleEnabled": false,
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
"--html=UnitTests\\report.html",
"--self-contained-html",
],
"markdownlint.config": {
"MD028": false,
"MD025": {
"front_matter_title": ""
}
},
"esbonio.server.enabled": false,
"restructuredtext.languageServer.disabled": true
// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": false
},
"editor.formatOnSave": true,
"python.analysis.completeFunctionParens": true,
"python.disableInstallationCheck": true,
"python.linting.banditEnabled": true,
"python.languageServer": "Pylance"
}
52 changes: 10 additions & 42 deletions RFEM/LoadCasesAndCombinations/designSituation.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,23 @@
from RFEM.initModel import Model,clearAtributes
from RFEM.initModel import Model, clearAtributes
from RFEM.enums import DesignSituationType

class DesignSituation():
def __init__(self,
no: int = 1,
user_defined_name: bool = False,
name = None,
design_situation_type = DesignSituationType.DESIGN_SITUATION_TYPE_A_ACCIDENTAL,
active: bool = True,
design_situation_type: int = 6122,
name = None,
comment: str = '',
params: dict = None):

"""
Args:
no (int): Design Situation Tag
user_defined_name (bool): Enable/Disable User-Defined Name
name (str, optional): User-Defined Name (Applicable when user_defined_name = TRUE)
design_situation_type (enum): Design Situation Type
active (bool): Enable/Disable Design Situation Activity
design_situation_type (int): Design Situation Numeric Code (Variable key inputs, dependant on Standards defined in the model)
Applicable to Standard Group EN 1990 with National Annex CEN | 2010-04 (See Model Base Data > Standards I)
6122 = ULS (EQU) - Permanent and transient,
6993 = ULS (EQU) - Accidental - psi-1,1,
6994 = ULS (EQU) - Accidental - psi-2,1,
6997 = ULS (EQU) - Seismic,
7007 = ULS (STR/GEO) - Permanent and transient - Eq. 6.10,
7008 = ULS (STR/GEO) - Permanent and transient - Eq. 6.10a and 6.10b,
7010 = ULS (STR/GEO) - Accidental - psi-1,1,
7011 = ULS (STR/GEO) - Accidental - psi-2,1,
7014 = ULS (STR/GEO) - Seismic,
6193 = SLS - Characteristic,
6194 = SLS - Frequent,
6195 = SLS - Quasi-permanent.
Applicable to Standard Group EN 1990 with National Annex DIN | 2012-08 (See Model Base Data > Standards I)
6122 = ULS (EQU) - Permanent and transient,
6993 = ULS (EQU) - Accidental - psi-1,1,
6994 = ULS (EQU) - Accidental - psi-2,1,
6995 = ULS (EQU) - Accidental - Snow - psi-1,1,
6996 = ULS (EQU) - Accidental - Snow - psi-2,1,
6997 = ULS (EQU) - Seismic,
7007 = ULS (STR/GEO) - Permanent and transient - Eq. 6.10,
7010 = ULS (STR/GEO) - Accidental - psi-1,1,
7011 = ULS (STR/GEO) - Accidental - psi-2,1,
7012 = ULS (STR/GEO) - Accidental - Snow - psi-1,1,
7013 = ULS (STR/GEO) - Accidental - Snow - psi-2,1,
7014 = ULS (STR/GEO) - Seismic,
6193 = SLS - Characteristic,
6194 = SLS - Frequent,
6195 = SLS - Quasi-permanent.
name (str, optional): User-Defined Name
comment (str, optional): Comments
params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary
params (dict, optional): Parameters
"""

# Client model | Design Situation
Expand All @@ -60,17 +30,15 @@ def __init__(self,
clientObject.no = no

# Design Situation Name
clientObject.user_defined_name_enabled = user_defined_name
if user_defined_name:
if name is None:
raise Exception('WARNING: A user defined design situation name was requested. As such, the name parameter cannot be empty.')
if name:
clientObject.user_defined_name_enabled = True
clientObject.name = name

# Design Situation Active
clientObject.active = active

# Design Situation Type
clientObject.design_situation_type = design_situation_type
clientObject.design_situation_type = design_situation_type.name

# Design Situation Comment
clientObject.comment = comment
Expand Down
70 changes: 24 additions & 46 deletions RFEM/LoadCasesAndCombinations/loadCase.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
from RFEM.initModel import Model, clearAtributes
from RFEM.enums import AnalysisType
from RFEM.enums import AnalysisType, ActionCategoryType

DIN_Action_Category = {'1A': 'Permanent | G', '1B': 'Permanent - small fluctuations | G*', '1C': 'Permanent/Imposed | Gq', '2': 'Prestress | P',
'3A': 'Imposed loads - category A: domestic, residential areas | QI A', '3B': 'Imposed loads - category B: office areas | QI B',
'3C': 'Imposed loads - category C: congregation areas | QI C', '3D': 'Imposed loads - category D: shopping areas | QI D',
'3E': 'Imposed loads - category E: storage areas | QI E', '3F': 'Imposed loads - category F: traffic area - vehicle weight <= 30 kN | QI F',
'3G': 'Imposed loads - category G: traffic area - vehicle weight <= 160 kN | QI G', '3H': 'Imposed loads - category H: roofs | QI H',
'4A': 'Snow / Ice loads - H <= 1000 m | Qs', '4B': 'Snow / Ice loads - H > 1000 m | Qs', '5': 'Wind | Qw', '6': 'Temperature (non-fire) | QT',
'7': 'Foundation subsidence | Qf', '8': 'Other actions | Qo', '9': 'Accidental actions | A', '10': 'Seismic actions | AE', 'None': 'None | None'}

class LoadCase():

Expand Down Expand Up @@ -47,21 +40,24 @@ def __init__(self,
clientObject.static_analysis_settings = 1

# Action Category
clientObject.action_category = 'Permanent | G'
clientObject.action_category = ActionCategoryType.ACTION_CATEGORY_PERMANENT_G.name

# Self-weight Considerations
clientObject.self_weight_active = self_weight[0]
if not isinstance(self_weight[0], bool):
raise Exception('WARNING: Entry at index 0 of Self-Weight parameter to be of type bool')
raise Exception(
'WARNING: Entry at index 0 of Self-Weight parameter to be of type bool')
if self_weight[0]:
if len(self_weight) != 4:
raise Exception('WARNING: Self-weight is activated and therefore requires a list definition of length 4. Kindly check list inputs for completeness and correctness.')
raise Exception(
'WARNING: Self-weight is activated and therefore requires a list definition of length 4. Kindly check list inputs for completeness and correctness.')
clientObject.self_weight_factor_x = self_weight[1]
clientObject.self_weight_factor_y = self_weight[2]
clientObject.self_weight_factor_z = self_weight[3]
else:
if len(self_weight) != 1:
raise Exception('WARNING: Self-weight is deactivated and therefore requires a list definition of length 1. Kindly check list inputs for completeness and correctness.')
raise Exception(
'WARNING: Self-weight is deactivated and therefore requires a list definition of length 1. Kindly check list inputs for completeness and correctness.')

# Comment
clientObject.comment = comment
Expand All @@ -76,43 +72,22 @@ def __init__(self,

@staticmethod
def StaticAnalysis(
no: int = 1,
name: str = 'Self-weight',
to_solve: bool = True,
analysis_settings_no: int = 1,
action_category= DIN_Action_Category['1A'],
self_weight = [True, 0.0, 0.0, 10.0],
comment: str = 'Comment',
params: dict = None):
no: int = 1,
name: str = 'Self-weight',
to_solve: bool = True,
analysis_settings_no: int = 1,
action_category=ActionCategoryType.ACTION_CATEGORY_PERMANENT_G,
self_weight=[True, 0.0, 0.0, 10.0],
comment: str = 'Comment',
params: dict = None):
'''
Args:
no (int): Load Case Tag
name (str): Load Case Name
to_solve (bool): Enable/Disbale Load Case Solver Status
analysis_type (enum): Analysis Type Enumeration
analysis_settings_no (int): Analysis Settings Number
action_category (dict): Action Category Key
1A = Permanent | G
1B = Permanent - small fluctuations | G*
1C = Permanent/Imposed | Gq
2 = Prestress | P
3A = Imposed loads - category A: domestic, residential areas | QI A
3B = Imposed loads - category B: office areas | QI B
3C = Imposed loads - category C: congregation areas | QI C
3D = Imposed loads - category D: shopping areas | QI D
3E = Imposed loads - category E: storage areas | QI E
3F = Imposed loads - category F: traffic area - vehicle weight <= 30 kN | QI F
3G = Imposed loads - category G: traffic area - vehicle weight <= 160 kN | QI G
3H = Imposed loads - category H: roofs | QI H
4A = Snow / Ice loads - H <= 1000 m | Qs
4B = Snow / Ice loads - H > 1000 m | Qs
5 = Wind | Qw
6 = Temperature (non-fire) | QT
7 = Foundation subsidence | Qf
8 = Other actions | Qo
9 = Accidental actions | A
10 = Seismic actions | AE
None = None | None
action_category (enum): Action Category enum
self_weight (list): Self-weight Considerations
for self-weight considerations;
self_weight = [True, self_weight_factor_x, self_weight_factor_y, self_weight_factor_z]
Expand Down Expand Up @@ -142,21 +117,24 @@ def StaticAnalysis(
clientObject.static_analysis_settings = analysis_settings_no

# Action Category
clientObject.action_category = action_category
clientObject.action_category = action_category.name

# Self-weight Considerations
clientObject.self_weight_active = self_weight[0]
if not isinstance(self_weight[0], bool):
raise Exception('WARNING: Entry at index 0 of Self-Weight parameter to be of type bool')
raise Exception(
'WARNING: Entry at index 0 of Self-Weight parameter to be of type bool')
if self_weight[0]:
if len(self_weight) != 4:
raise Exception('WARNING: Self-weight is activated and therefore requires a list definition of length 4. Kindly check list inputs for completeness and correctness.')
raise Exception(
'WARNING: Self-weight is activated and therefore requires a list definition of length 4. Kindly check list inputs for completeness and correctness.')
clientObject.self_weight_factor_x = self_weight[1]
clientObject.self_weight_factor_y = self_weight[2]
clientObject.self_weight_factor_z = self_weight[3]
else:
if len(self_weight) != 1:
raise Exception('WARNING: Self-weight is deactivated and therefore requires a list definition of length 1. Kindly check list inputs for completeness and correctness.')
raise Exception(
'WARNING: Self-weight is deactivated and therefore requires a list definition of length 1. Kindly check list inputs for completeness and correctness.')

# Comment
clientObject.comment = comment
Expand Down
Loading

0 comments on commit a017acd

Please sign in to comment.