FEM: Thermal expansion reference temperature for CalculiX analyses (#19285)

* FEM: Update task_material_common.py

* FEM: Update write_femelement_material.py

* FEM: Update Material.ui

* Fem: Enable material expansion reference temperature

* FEM: Update thermomech_bimetal.py

* FEM: Update thermomech_bimetal.inp

---------

Co-authored-by: marioalexis <mario.passaglia@gmail.com>
This commit is contained in:
FEA-eng
2025-01-29 13:37:02 +01:00
committed by GitHub
parent 07b2c87f0a
commit 456106910e
5 changed files with 88 additions and 171 deletions

View File

@@ -81,6 +81,10 @@ def write_femelement_material(f, ccxwriter):
if mat_obj.Category == "Solid":
TEC = FreeCAD.Units.Quantity(mat_obj.Material["ThermalExpansionCoefficient"])
TEC_in_mmK = TEC.getValueAs("mm/mm/K").Value
RT = FreeCAD.Units.Quantity(
mat_obj.Material["ThermalExpansionReferenceTemperature"]
)
RT_in_K = RT.getValueAs("K").Value
elif mat_obj.Category == "Fluid":
KV = FreeCAD.Units.Quantity(mat_obj.Material["KinematicViscosity"])
KV_in_mm2s = KV.getValueAs("mm^2/s").Value
@@ -100,7 +104,7 @@ def write_femelement_material(f, ccxwriter):
if mat_obj.Category == "Solid":
f.write("*CONDUCTIVITY\n")
f.write(f"{TC_in_WmK:.13G}\n")
f.write("*EXPANSION\n")
f.write(f"*EXPANSION, ZERO={RT_in_K:.13G}\n")
f.write(f"{TEC_in_mmK:.13G}\n")
f.write("*SPECIFIC HEAT\n")
f.write(f"{SH_in_JkgK:.13G}\n")