FEM: Add offset property for CalculiX's shell section (#22385)

* FEM: Update element_geometry2D.py

* FEM: Update write_femelement_geometry.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* FEM: Update ccx_cantilever_ele_quad4.inp

* FEM: Update ccx_cantilever_ele_quad8.inp

* FEM: Update ccx_cantilever_ele_tria3.inp

* FEM: Update ccx_cantilever_ele_tria6.inp

* FEM: Update constraint_contact_shell_shell.inp

* FEM: Update material_multiple_bendingbeam_fivefaces.inp

* FEM: Update square_pipe_end_twisted_edgeforces.inp

* FEM: Update square_pipe_end_twisted_nodeforces.inp

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
FEA-eng
2025-07-14 18:10:00 +02:00
committed by GitHub
parent 6633367997
commit 28e90e668c
10 changed files with 20 additions and 11 deletions

View File

@@ -49,3 +49,11 @@ class ElementGeometry2D(base_femelement.BaseFemElement):
"set thickness of the shell elements",
)
obj.setPropertyStatus("Thickness", "LockDynamic")
obj.addProperty(
"App::PropertyFloat",
"Offset",
"ShellThickness",
"set thickness offset of the shell elements",
)
obj.Offset = 0.0

View File

@@ -114,7 +114,8 @@ def write_femelement_geometry(f, ccxwriter):
elif "shellthickness_obj" in matgeoset: # shell mesh
shellth_obj = matgeoset["shellthickness_obj"]
if ccxwriter.solver_obj.ModelSpace == "3D":
section_def = f"*SHELL SECTION, {elsetdef}{material}\n"
offset = shellth_obj.Offset
section_def = f"*SHELL SECTION, {elsetdef}{material}, OFFSET={offset:.13G}\n"
else:
section_def = f"*SOLID SECTION, {elsetdef}{material}\n"
thickness = shellth_obj.Thickness.getValueAs("mm").Value

View File

@@ -84,7 +84,7 @@ Efaces
***********************************************************
** Sections
*SHELL SECTION, ELSET=MechanicalMaterialThickness, MATERIAL=MechanicalMaterial
*SHELL SECTION, ELSET=MechanicalMaterialThickness, MATERIAL=MechanicalMaterial, OFFSET=0
1000
***********************************************************

View File

@@ -72,7 +72,7 @@ Efaces
***********************************************************
** Sections
*SHELL SECTION, ELSET=MechanicalMaterialThickness, MATERIAL=MechanicalMaterial
*SHELL SECTION, ELSET=MechanicalMaterialThickness, MATERIAL=MechanicalMaterial, OFFSET=0
1000
***********************************************************

View File

@@ -1560,7 +1560,7 @@ Efaces
***********************************************************
** Sections
*SHELL SECTION, ELSET=MechanicalMaterialThickness, MATERIAL=MechanicalMaterial
*SHELL SECTION, ELSET=MechanicalMaterialThickness, MATERIAL=MechanicalMaterial, OFFSET=0
1000
***********************************************************

View File

@@ -290,7 +290,7 @@ Efaces
***********************************************************
** Sections
*SHELL SECTION, ELSET=MechanicalMaterialThickness, MATERIAL=MechanicalMaterial
*SHELL SECTION, ELSET=MechanicalMaterialThickness, MATERIAL=MechanicalMaterial, OFFSET=0
1000
***********************************************************

View File

@@ -38362,7 +38362,7 @@ Efaces
***********************************************************
** Sections
*SHELL SECTION, ELSET=MechanicalMaterialShellThickness, MATERIAL=MechanicalMaterial
*SHELL SECTION, ELSET=MechanicalMaterialShellThickness, MATERIAL=MechanicalMaterial, OFFSET=0
0.5
***********************************************************

View File

@@ -2542,11 +2542,11 @@ Efaces
***********************************************************
** Sections
*SHELL SECTION, ELSET=FemMaterial1ShellThickness, MATERIAL=FemMaterial1
*SHELL SECTION, ELSET=FemMaterial1ShellThickness, MATERIAL=FemMaterial1, OFFSET=0
10
*SHELL SECTION, ELSET=FemMaterial2ShellThickness, MATERIAL=FemMaterial2
*SHELL SECTION, ELSET=FemMaterial2ShellThickness, MATERIAL=FemMaterial2, OFFSET=0
10
*SHELL SECTION, ELSET=FemMaterial3ShellThickness, MATERIAL=FemMaterial3
*SHELL SECTION, ELSET=FemMaterial3ShellThickness, MATERIAL=FemMaterial3, OFFSET=0
10
***********************************************************

View File

@@ -2558,7 +2558,7 @@ Efaces
***********************************************************
** Sections
*SHELL SECTION, ELSET=FemMaterialShellThickness, MATERIAL=FemMaterial
*SHELL SECTION, ELSET=FemMaterialShellThickness, MATERIAL=FemMaterial, OFFSET=0
15
***********************************************************

View File

@@ -2558,7 +2558,7 @@ Efaces
***********************************************************
** Sections
*SHELL SECTION, ELSET=FemMaterialShellThickness, MATERIAL=FemMaterial
*SHELL SECTION, ELSET=FemMaterialShellThickness, MATERIAL=FemMaterial, OFFSET=0
15
***********************************************************