0x
005364
2023-03-23

Multilayer Composition with Python

How can I create a multilayer composition using the Python program?


Answer:

Use <code>SetAddonStatus(Model.clientModel, AddOn.timber_design_active, True)</code> to activate the Multilayer Surfaces add-on.

In the next step, an orthotropic material is created. For this, it is necessary to use user-defined parameters when creating the material. They are first saved in Dictionary <code>p</code> and then transferred as the <code>params</code> parameter.

Use Thickness.Layers(1, 'CLT', [[0, 1, 0.012, 0.0], [0, 1, 0.010, 90]]) to apply the thickness. A nested list is transferred as parameters after the number and the name. Each entry in the list represents a layer. If isotropic material is created, the list for a layer must contain three entries—the type of layer, material number, and layer thickness. If the material is orthotropic, as in this case, the list must also include a fourth entry, the angle of rotation. Please note! The angle of rotation is given in DEG and not in RAD, as is customary.


from RFEM.initModel import *
from RFEM.BasicObjects.material import Material
from RFEM.BasicObjects.thickness import Thickness

Model(new_model=True, model_name="MyModel")
Model.clientModel.service.begin_modification()
Model.clientModel.service.delete_all()

SetAddonStatus(Model.clientModel, AddOn.timber_design_active, True)
addonLst = Model.clientModel.service.get_addon_statuses()
addonLst["multilayer_surfaces_design_active"] = True
Model.clientModel.service.set_addon_statuses(addonLst)

p = {
        "material_type": "TYPE_TIMBER",
        "material_model": "MODEL_ORTHOTROPIC_2D",
        "application_context": "TIMBER_DESIGN",
        "stiffness_modification": True,
        "stiffness_modification_type": "STIFFNESS_MODIFICATION_TYPE_DIVISION"
}
Material(1, 'CL26E11.8 | Hasslacher', params=p)

Thickness.Layers(1, 'CLT', [[0, 1, 0.012, 0.0], [0, 1, 0.010, 90]])

Model.clientModel.service.finish_modification()
Model.clientModel.service.close_connection()

Author

Mr. Faulstich is responsible for the quality assurance of the RFEM program and provides customer support.



;