Skip to content

BUG: UserDefinedMaterial not added correctly #397

@peter-v-w

Description

@peter-v-w

Describe the bug
When I add a material to my RFEM model using Material.UserDefinedMaterial, elasticity_modulus and shear_modulus are not added to the model. Also when I try to add it as material_type=MaterialType.TYPE_CONCRETE I get the following error: suds.WebFault: b"Server raised fault: 'Object: Material No. 2\nAttribute: Material type\nError: Invalid value.'"

To Reproduce
Steps to reproduce the behavior:

  1. Defined the follwoing function to add materials:
    def add_materials(self) -> None:
        """Add materials to the model."""
        Material(no=1, name="C30/37 | EN 1992-1-1:2004/A1:2014")
        Material.UserDefinedMaterial(
            no=2,
            material_type=MaterialType.TYPE_BASIC,
            name="C30/37 cracked",
            elasticity_modulus=11000,
            shear_modulus=13750,
            thermal_expansion_coefficient=0.00001,
            poisson_ratio=0.2,
            mass_density=2500,
            definition_type=MaterialDefinitionType.E_G_NU,
        )
        Material(no=3, name="S355")
  1. Adding it to my model:
        self.model = Model(new_model=True, model_name="concrete_through_girder_bridge.rf6", delete=True, delete_all=True)
        self.model.clientModel.service.begin_modification()
  1. Looking at material section RFEM:
    image

Expected behavior
I expect the E and G moduli to be added correctly to the RFEM model, but they are skipped. The rest of the props are added correctly.

Desktop:

  • Version of WIN11 OS: [WIN 11 23H2]
  • Version of RFEM6.07.0002
  • Version of python 3.10.8

Additional context:
When I add print: print(Material.GetMaterial(2).temperature[0][0].row['elasticity_modulus_global']) 11000 gets printed as expected, however it is not in the model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugExisting feature isn't working properly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions