bugfix of SurfaceStiffnessModification assignment to StructureModific… #315
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When I try to run it with the current customer version and the current Python High Level Library (current main branch), I get an error message in modify_stiffnesses_surface_table. The problem is related to the correction of bug 99736. The Python High Level Library does not seem to be adapted to the correction yet.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist:
=====
_#Testing stiffness modification in RFEM
#Status as of 20 September 2023 - not working correctly
rfem_file="Test_001.rf6"
import os
import sys
baseName = os.path.basename(file)
dirName = os.path.dirname(file)
print('basename: ', baseName)
print('dirname: ', dirName)
sys.path.append(dirName + r'/../..')
from RFEM.initModel import Model
from RFEM.LoadCasesAndCombinations.loadCase import LoadCase
from RFEM.LoadCasesAndCombinations.loadCombination import LoadCombination
from RFEM.enums import AnalysisType
from RFEM.BasicObjects.node import Node
from RFEM.BasicObjects.line import Line
from RFEM.BasicObjects.surface import Surface
from RFEM.TypesForSurfaces.surfaceStiffnessModification import SurfaceStiffnessModification, SurfaceStiffnessModificationType
from RFEM.SpecialObjects.structureModification import StructureModification
from RFEM.baseSettings import GlobalAxesOrientationType, BaseSettings, LocalAxesOrientationType
from RFEM.Calculate.meshSettings import GetModelInfo
#create new model
CurrModel = Model(True, model_name=rfem_file, delete=False, delete_all=False)
BaseSettings(
global_axes_orientation=GlobalAxesOrientationType.E_GLOBAL_AXES_ORIENTATION_ZUP,
local_axes_orientation=LocalAxesOrientationType.E_LOCAL_AXES_ORIENTATION_ZUP)
generate simple test structure 5x5 Surface
Node(1, 0, 0, 0)
Node(2, 5, 0, 0)
Node(3, 5, 5, 0)
Node(4, 0, 5, 0)
Line(1, '1 2')
Line(2, '2 3')
Line(3, '3 4')
Line(4, '4 1')
Surface(1, '1 2 3 4')
LoadCase.StaticAnalysis(
no=1,
name="EG",
to_solve=True,
analysis_settings_no=1,
self_weight=[True, 0, 0, -1],
model=CurrModel)
#generate surface stiffness modification factors - this works
SurfaceStiffnessModification(
no=1,
type=SurfaceStiffnessModificationType.TYPE_TOTAL_STIFFNESS_FACTOR,
factors=[0.5],
model=CurrModel)
SurfaceStiffnessModification(
no=2,
type=SurfaceStiffnessModificationType.TYPE_TOTAL_STIFFNESS_FACTOR,
factors=[0.75],
model=CurrModel)
#the following command does not work
#it creates the structure modification in RFEM, applies the "surface modfication", but does not fill the table
StructureModification(
no=1,
modify_stiffnesses={
'modify_stiffnesses_gamma_m': False,
'modify_stiffnesses_materials': False,
'modify_stiffnesses_sections': False,
'modify_stiffnesses_members': False,
'modify_stiffnesses_surfaces': True,
'modify_stiffnesses_member_hinges': False,
'modify_stiffnesses_line_hinges': False,
'modify_stiffnesses_nodal_supports': False,
'modify_stiffnesses_line_supports': False,
'modify_stiffnesses_member_supports': False,
'modify_stiffnesses_surface_supports': False,
'modify_stiffness_member_reinforcement': False,
'modify_stiffness_surface_reinforcement': False,
'modify_stiffness_timber_members_due_moisture_class': False,
'nonlinearities_disabled_material_nonlinearity_models': False,
'nonlinearities_disabled_material_temperature_nonlinearities': False,
'nonlinearities_disabled_line_hinges': False,
'nonlinearities_disabled_member_types': False,
'nonlinearities_disabled_member_nonlinearities': False,
'nonlinearities_disabled_solid_types_contact_or_surfaces_contact': False,
'nonlinearities_disabled_member_hinges': False,
'nonlinearities_disabled_nodal_supports': False,
'nonlinearities_disabled_line_supports': False,
'nonlinearities_disabled_member_supports': False,
'nonlinearities_disabled_surface_supports': False,
'deactivate_members_enabled': False},
modify_stiffnesses_surfaces_list=[{'no': 1, 'surface_modification': 1, 'surfaces': '1', 'comment': 'Test1'}],
model=CurrModel)_