From 2244a167904d0727a7bd6555be536e08854ca3fa Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Mon, 1 Sep 2025 06:28:56 +0200 Subject: [PATCH] FEM: Add defined temperature field with CalculiX (*TEMPERATURE) (#23277) * FEM: add write_constraint_finaltemperature.py * FEM: Update CMakeLists.txt * FEM: Update membertools.py * FEM: Update FemConstraintInitialTemperature.cpp * FEM: Update FemConstraintInitialTemperature.h * FEM: Update write_constraint_initialtemperature.py * FEM: Update write_femelement_material.py * FEM: Update writer.py * FEM: Update write_constraint_finaltemperature.py * FEM: Update write_femelement_material.py * FEM: Update write_femelement_material.py * FEM: Update box_static.inp * FEM: Update ccx_cantilever_beam_circle.inp * FEM: Update ccx_cantilever_beam_pipe.inp * FEM: Update ccx_cantilever_beam_rect.inp * FEM: Update ccx_cantilever_ele_hexa20.inp * FEM: Update ccx_cantilever_ele_quad4.inp * FEM: Update ccx_cantilever_ele_quad8.inp * FEM: Update ccx_cantilever_ele_seg2.inp * FEM: Update ccx_cantilever_ele_seg3.inp * FEM: Update ccx_cantilever_ele_tria3.inp * FEM: Update ccx_cantilever_ele_tria6.inp * FEM: Update ccx_cantilever_faceload.inp * FEM: Update ccx_cantilever_nodeload.inp * FEM: Update ccx_cantilever_prescribeddisplacement.inp * FEM: Update constraint_contact_shell_shell.inp * FEM: Update constraint_sectionprint.inp * FEM: Update constraint_selfweight_cantilever.inp * FEM: Update constraint_tie.inp * FEM: Update constraint_transform_beam_hinged.inp * FEM: Update constraint_transform_torque.inp * FEM: Update material_multiple_bendingbeam_fiveboxes.inp * FEM: Update material_multiple_bendingbeam_fivefaces.inp * FEM: Update material_multiple_tensionrod_twoboxes.inp * FEM: Update material_nonlinear.inp * FEM: Update square_pipe_end_twisted_edgeforces.inp * FEM: Update square_pipe_end_twisted_nodeforces.inp * FEM: Update write_constraint_finaltemperature.py * FEM: Update write_femelement_material.py * FEM: Update write_constraint_finaltemperature.py * FEM: Update FemConstraintInitialTemperature.cpp * FEM: Update FemConstraintInitialTemperature.h --- .../App/FemConstraintInitialTemperature.cpp | 2 + .../Fem/App/FemConstraintInitialTemperature.h | 3 +- src/Mod/Fem/CMakeLists.txt | 1 + .../write_constraint_finaltemperature.py | 67 +++++++++++++++++++ .../write_constraint_initialtemperature.py | 2 +- .../calculix/write_femelement_material.py | 18 +++++ src/Mod/Fem/femsolver/calculix/writer.py | 2 + .../Fem/femtest/data/calculix/box_static.inp | 2 + .../calculix/ccx_cantilever_beam_circle.inp | 2 + .../calculix/ccx_cantilever_beam_pipe.inp | 2 + .../calculix/ccx_cantilever_beam_rect.inp | 2 + .../calculix/ccx_cantilever_ele_hexa20.inp | 2 + .../calculix/ccx_cantilever_ele_quad4.inp | 2 + .../calculix/ccx_cantilever_ele_quad8.inp | 2 + .../data/calculix/ccx_cantilever_ele_seg2.inp | 2 + .../data/calculix/ccx_cantilever_ele_seg3.inp | 2 + .../calculix/ccx_cantilever_ele_tria3.inp | 2 + .../calculix/ccx_cantilever_ele_tria6.inp | 2 + .../data/calculix/ccx_cantilever_faceload.inp | 2 + .../data/calculix/ccx_cantilever_nodeload.inp | 2 + .../ccx_cantilever_prescribeddisplacement.inp | 2 + .../constraint_contact_shell_shell.inp | 2 + .../data/calculix/constraint_sectionprint.inp | 2 + .../constraint_selfweight_cantilever.inp | 2 + .../femtest/data/calculix/constraint_tie.inp | 2 + .../constraint_transform_beam_hinged.inp | 2 + .../calculix/constraint_transform_torque.inp | 2 + ...aterial_multiple_bendingbeam_fiveboxes.inp | 6 ++ ...aterial_multiple_bendingbeam_fivefaces.inp | 6 ++ .../material_multiple_tensionrod_twoboxes.inp | 4 ++ .../data/calculix/material_nonlinear.inp | 2 + .../square_pipe_end_twisted_edgeforces.inp | 2 + .../square_pipe_end_twisted_nodeforces.inp | 2 + src/Mod/Fem/femtools/membertools.py | 1 + 34 files changed, 156 insertions(+), 2 deletions(-) create mode 100644 src/Mod/Fem/femsolver/calculix/write_constraint_finaltemperature.py diff --git a/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp b/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp index f4e4b7ad0b..fa7d6ca8f7 100644 --- a/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp +++ b/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp @@ -35,6 +35,8 @@ PROPERTY_SOURCE(Fem::ConstraintInitialTemperature, Fem::Constraint) ConstraintInitialTemperature::ConstraintInitialTemperature() { ADD_PROPERTY(initialTemperature, (300.0)); + ADD_PROPERTY(EnableFinalTemperature, (false)); + ADD_PROPERTY(FinalTemperature, (300.0)); } App::DocumentObjectExecReturn* ConstraintInitialTemperature::execute() diff --git a/src/Mod/Fem/App/FemConstraintInitialTemperature.h b/src/Mod/Fem/App/FemConstraintInitialTemperature.h index 6698a055c0..e735fd6c8b 100644 --- a/src/Mod/Fem/App/FemConstraintInitialTemperature.h +++ b/src/Mod/Fem/App/FemConstraintInitialTemperature.h @@ -42,7 +42,8 @@ public: // Temperature parameters App::PropertyTemperature initialTemperature; - + App::PropertyBool EnableFinalTemperature; + App::PropertyTemperature FinalTemperature; /// recalculate the object App::DocumentObjectExecReturn* execute() override; diff --git a/src/Mod/Fem/CMakeLists.txt b/src/Mod/Fem/CMakeLists.txt index 0c7cc718f3..6a00241619 100755 --- a/src/Mod/Fem/CMakeLists.txt +++ b/src/Mod/Fem/CMakeLists.txt @@ -261,6 +261,7 @@ SET(FemSolverCalculix_SRCS femsolver/calculix/write_constraint_force.py femsolver/calculix/write_constraint_heatflux.py femsolver/calculix/write_constraint_initialtemperature.py + femsolver/calculix/write_constraint_finaltemperature.py femsolver/calculix/write_constraint_planerotation.py femsolver/calculix/write_constraint_pressure.py femsolver/calculix/write_constraint_rigidbody.py diff --git a/src/Mod/Fem/femsolver/calculix/write_constraint_finaltemperature.py b/src/Mod/Fem/femsolver/calculix/write_constraint_finaltemperature.py new file mode 100644 index 0000000000..33bf03af28 --- /dev/null +++ b/src/Mod/Fem/femsolver/calculix/write_constraint_finaltemperature.py @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +# *************************************************************************** +# * Copyright (c) 2025 Jakub Michalski * +# * * +# * This file is part of FreeCAD. * +# * * +# * FreeCAD is free software: you can redistribute it and/or modify it * +# * under the terms of the GNU Lesser General Public License as * +# * published by the Free Software Foundation, either version 2.1 of the * +# * License, or (at your option) any later version. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, but * +# * WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# * Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Lesser General Public * +# * License along with FreeCAD. If not, see * +# * . * +# * * +# *************************************************************************** + +__title__ = "FreeCAD FEM calculix amplitude" +__author__ = "Jakub Michalski" +__url__ = "https://www.freecad.org" + + +def get_analysis_types(): + return ["static"] + + +def get_sets_name(): + return "constraints_initial_temperature_node_sets" + + +def get_constraint_title(): + return "Final temperature constraint" + + +def get_before_write_meshdata_constraint(): + return "" + + +def get_after_write_meshdata_constraint(): + return "" + + +def get_before_write_constraint(): + return "" + + +def get_after_write_constraint(): + return "" + + +def write_constraint(f, femobj, inittemp_obj, ccxwriter): + if inittemp_obj.EnableFinalTemperature: + # floats read from ccx should use {:.13G}, see comment in writer module + + finaltemp = inittemp_obj.FinalTemperature.getValueAs("K") + + f.write("*TEMPERATURE\n") + if inittemp_obj.References: + f.write(f"{inittemp_obj.Name},{finaltemp}\n") + else: + f.write(f"{ccxwriter.ccx_nall},{finaltemp}\n") diff --git a/src/Mod/Fem/femsolver/calculix/write_constraint_initialtemperature.py b/src/Mod/Fem/femsolver/calculix/write_constraint_initialtemperature.py index 5a5b02add0..c94c2f72e2 100644 --- a/src/Mod/Fem/femsolver/calculix/write_constraint_initialtemperature.py +++ b/src/Mod/Fem/femsolver/calculix/write_constraint_initialtemperature.py @@ -29,7 +29,7 @@ from FreeCAD import Units def get_analysis_types(): - return ["thermomech"] + return ["thermomech", "static"] def get_sets_name(): diff --git a/src/Mod/Fem/femsolver/calculix/write_femelement_material.py b/src/Mod/Fem/femsolver/calculix/write_femelement_material.py index 33ce74188f..ce4ee78c15 100644 --- a/src/Mod/Fem/femsolver/calculix/write_femelement_material.py +++ b/src/Mod/Fem/femsolver/calculix/write_femelement_material.py @@ -93,6 +93,20 @@ def write_femelement_material(f, ccxwriter): KV = FreeCAD.Units.Quantity(mat_obj.Material["KinematicViscosity"]) KV_in_mm2s = KV.getValueAs("mm^2/s").Value DV_in_tmms = KV_in_mm2s * density_in_tonne_per_mm3 + if ccxwriter.analysis_type == "static": + if mat_obj.Category == "Solid": + if "ThermalExpansionCoefficient" in mat_obj.Material: + TEC = FreeCAD.Units.Quantity(mat_obj.Material["ThermalExpansionCoefficient"]) + TEC_in_mmK = TEC.getValueAs("mm/mm/K").Value + else: + TEC_in_mmK = 0.0 + if "ThermalExpansionReferenceTemperature" in mat_obj.Material: + RT = FreeCAD.Units.Quantity( + mat_obj.Material["ThermalExpansionReferenceTemperature"] + ) + else: + RT = FreeCAD.Units.Quantity("0 K") + RT_in_K = RT.getValueAs("K").Value if ( ccxwriter.analysis_type == "electromagnetic" and ccxwriter.solver_obj.ElectromagneticMode == "electrostatic" @@ -121,6 +135,10 @@ def write_femelement_material(f, ccxwriter): elif mat_obj.Category == "Fluid": f.write("*FLUID CONSTANTS\n") f.write(f"{SH_in_JkgK:.13G},{DV_in_tmms:.13G}\n") + if ccxwriter.analysis_type == "static": + if mat_obj.Category == "Solid": + f.write(f"*EXPANSION, ZERO={RT_in_K:.13G}\n") + f.write(f"{TEC_in_mmK:.13G}\n") if ( ccxwriter.analysis_type == "electromagnetic" and ccxwriter.solver_obj.ElectromagneticMode == "electrostatic" diff --git a/src/Mod/Fem/femsolver/calculix/writer.py b/src/Mod/Fem/femsolver/calculix/writer.py index 4d766cded2..67952edf73 100644 --- a/src/Mod/Fem/femsolver/calculix/writer.py +++ b/src/Mod/Fem/femsolver/calculix/writer.py @@ -44,6 +44,7 @@ from . import write_constraint_fluidsection as con_fluidsection from . import write_constraint_force as con_force from . import write_constraint_heatflux as con_heatflux from . import write_constraint_initialtemperature as con_itemp +from . import write_constraint_finaltemperature as con_ftemp from . import write_constraint_planerotation as con_planerotation from . import write_constraint_pressure as con_pressure from . import write_constraint_rigidbody as con_rigidbody @@ -204,6 +205,7 @@ class FemInputWriterCcx(writerbase.FemInputWriter): self.write_constraints_meshsets(inpfile, self.member.cons_force, con_force) self.write_constraints_meshsets(inpfile, self.member.cons_pressure, con_pressure) self.write_constraints_propdata(inpfile, self.member.cons_temperature, con_temperature) + self.write_constraints_propdata(inpfile, self.member.cons_finaltemperature, con_ftemp) self.write_constraints_meshsets(inpfile, self.member.cons_heatflux, con_heatflux) self.write_constraints_propdata( inpfile, self.member.cons_electricchargedensity, con_electricchargedensity diff --git a/src/Mod/Fem/femtest/data/calculix/box_static.inp b/src/Mod/Fem/femtest/data/calculix/box_static.inp index b6e81fab79..6daa5e72f2 100644 --- a/src/Mod/Fem/femtest/data/calculix/box_static.inp +++ b/src/Mod/Fem/femtest/data/calculix/box_static.inp @@ -485,6 +485,8 @@ Evolumes *MATERIAL, NAME=MechanicalMaterial *ELASTIC 200000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_circle.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_circle.inp index 283aafffeb..2a2f87483a 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_circle.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_circle.inp @@ -56,6 +56,8 @@ Eedges *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_pipe.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_pipe.inp index 2317d71854..d2054d87dc 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_pipe.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_pipe.inp @@ -56,6 +56,8 @@ Eedges *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_rect.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_rect.inp index 5422b13492..ec54f53f76 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_rect.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_rect.inp @@ -56,6 +56,8 @@ Eedges *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_hexa20.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_hexa20.inp index d9cb1baf3b..f51ce456b9 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_hexa20.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_hexa20.inp @@ -381,6 +381,8 @@ Evolumes *MATERIAL, NAME=FemMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad4.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad4.inp index 2f18b69e33..dd7a237e93 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad4.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad4.inp @@ -81,6 +81,8 @@ Efaces *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad8.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad8.inp index 850d182be7..eb974cf4ba 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad8.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_quad8.inp @@ -69,6 +69,8 @@ Efaces *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_seg2.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_seg2.inp index 287dcc514b..dde84b78b9 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_seg2.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_seg2.inp @@ -198,6 +198,8 @@ Eedges *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_seg3.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_seg3.inp index 76436c4f13..463dd765e7 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_seg3.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_seg3.inp @@ -56,6 +56,8 @@ Eedges *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria3.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria3.inp index 49981bb4a6..e580af82ad 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria3.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria3.inp @@ -1557,6 +1557,8 @@ Efaces *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria6.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria6.inp index c139a51342..a9d12d746a 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria6.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_ele_tria6.inp @@ -287,6 +287,8 @@ Efaces *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_faceload.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_faceload.inp index 28d9a1752c..2aa3d9f39b 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_faceload.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_faceload.inp @@ -355,6 +355,8 @@ Evolumes *MATERIAL, NAME=FemMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_nodeload.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_nodeload.inp index fbcfb15685..7e2c15a7a5 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_nodeload.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_nodeload.inp @@ -355,6 +355,8 @@ Evolumes *MATERIAL, NAME=FemMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_prescribeddisplacement.inp b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_prescribeddisplacement.inp index 24fa7a509a..e5ada530da 100644 --- a/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_prescribeddisplacement.inp +++ b/src/Mod/Fem/femtest/data/calculix/ccx_cantilever_prescribeddisplacement.inp @@ -373,6 +373,8 @@ Evolumes *MATERIAL, NAME=FemMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/constraint_contact_shell_shell.inp b/src/Mod/Fem/femtest/data/calculix/constraint_contact_shell_shell.inp index f3e3da97fe..cb0128a2fe 100644 --- a/src/Mod/Fem/femtest/data/calculix/constraint_contact_shell_shell.inp +++ b/src/Mod/Fem/femtest/data/calculix/constraint_contact_shell_shell.inp @@ -38359,6 +38359,8 @@ Efaces *MATERIAL, NAME=MechanicalMaterial *ELASTIC 72000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/constraint_sectionprint.inp b/src/Mod/Fem/femtest/data/calculix/constraint_sectionprint.inp index 72e170fe3a..35741c512e 100644 --- a/src/Mod/Fem/femtest/data/calculix/constraint_sectionprint.inp +++ b/src/Mod/Fem/femtest/data/calculix/constraint_sectionprint.inp @@ -3397,6 +3397,8 @@ Evolumes *MATERIAL, NAME=Material *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/constraint_selfweight_cantilever.inp b/src/Mod/Fem/femtest/data/calculix/constraint_selfweight_cantilever.inp index 1b0e7f0504..37d4c2b320 100644 --- a/src/Mod/Fem/femtest/data/calculix/constraint_selfweight_cantilever.inp +++ b/src/Mod/Fem/femtest/data/calculix/constraint_selfweight_cantilever.inp @@ -2149,6 +2149,8 @@ Evolumes 210000,0.3 *DENSITY 7.9E-09 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/constraint_tie.inp b/src/Mod/Fem/femtest/data/calculix/constraint_tie.inp index 8d9a250ef4..6335f1155a 100644 --- a/src/Mod/Fem/femtest/data/calculix/constraint_tie.inp +++ b/src/Mod/Fem/femtest/data/calculix/constraint_tie.inp @@ -18602,6 +18602,8 @@ Evolumes *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/constraint_transform_beam_hinged.inp b/src/Mod/Fem/femtest/data/calculix/constraint_transform_beam_hinged.inp index 2621f8463e..0a2c7f15e3 100644 --- a/src/Mod/Fem/femtest/data/calculix/constraint_transform_beam_hinged.inp +++ b/src/Mod/Fem/femtest/data/calculix/constraint_transform_beam_hinged.inp @@ -3626,6 +3626,8 @@ Evolumes *MATERIAL, NAME=FemMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/constraint_transform_torque.inp b/src/Mod/Fem/femtest/data/calculix/constraint_transform_torque.inp index 30b03b5140..ba869ccc0c 100644 --- a/src/Mod/Fem/femtest/data/calculix/constraint_transform_torque.inp +++ b/src/Mod/Fem/femtest/data/calculix/constraint_transform_torque.inp @@ -10970,6 +10970,8 @@ Evolumes *MATERIAL, NAME=MechanicalMaterial *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/material_multiple_bendingbeam_fiveboxes.inp b/src/Mod/Fem/femtest/data/calculix/material_multiple_bendingbeam_fiveboxes.inp index a10956228c..aa8601afec 100644 --- a/src/Mod/Fem/femtest/data/calculix/material_multiple_bendingbeam_fiveboxes.inp +++ b/src/Mod/Fem/femtest/data/calculix/material_multiple_bendingbeam_fiveboxes.inp @@ -27618,16 +27618,22 @@ Evolumes *MATERIAL, NAME=FemMaterial1 *ELASTIC 32000,0.17 +*EXPANSION, ZERO=0 +0 ** FreeCAD material name: PLA ** FemMaterial2 *MATERIAL, NAME=FemMaterial2 *ELASTIC 3640,0.36 +*EXPANSION, ZERO=0 +0 ** FreeCAD material name: Steel-Generic ** FemMaterial3 *MATERIAL, NAME=FemMaterial3 *ELASTIC 200000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/material_multiple_bendingbeam_fivefaces.inp b/src/Mod/Fem/femtest/data/calculix/material_multiple_bendingbeam_fivefaces.inp index 662f656778..5f25f96b7a 100644 --- a/src/Mod/Fem/femtest/data/calculix/material_multiple_bendingbeam_fivefaces.inp +++ b/src/Mod/Fem/femtest/data/calculix/material_multiple_bendingbeam_fivefaces.inp @@ -2529,16 +2529,22 @@ Efaces *MATERIAL, NAME=FemMaterial1 *ELASTIC 32000,0.17 +*EXPANSION, ZERO=0 +0 ** FreeCAD material name: PLA ** FemMaterial2 *MATERIAL, NAME=FemMaterial2 *ELASTIC 3640,0.36 +*EXPANSION, ZERO=0 +0 ** FreeCAD material name: Steel-Generic ** FemMaterial3 *MATERIAL, NAME=FemMaterial3 *ELASTIC 200000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/material_multiple_tensionrod_twoboxes.inp b/src/Mod/Fem/femtest/data/calculix/material_multiple_tensionrod_twoboxes.inp index 757454bd73..70aa1de1c1 100644 --- a/src/Mod/Fem/femtest/data/calculix/material_multiple_tensionrod_twoboxes.inp +++ b/src/Mod/Fem/femtest/data/calculix/material_multiple_tensionrod_twoboxes.inp @@ -1221,11 +1221,15 @@ Evolumes *MATERIAL, NAME=MechanicalMaterialLow *ELASTIC 70000,0.35 +*EXPANSION, ZERO=0 +0 ** FreeCAD material name: Steel-Generic ** MechanicalMaterialUpp *MATERIAL, NAME=MechanicalMaterialUpp *ELASTIC 200000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/material_nonlinear.inp b/src/Mod/Fem/femtest/data/calculix/material_nonlinear.inp index c68f03634c..e835368d79 100644 --- a/src/Mod/Fem/femtest/data/calculix/material_nonlinear.inp +++ b/src/Mod/Fem/femtest/data/calculix/material_nonlinear.inp @@ -19996,6 +19996,8 @@ Evolumes *MATERIAL, NAME=Material_lin *ELASTIC 210000,0.3 +*EXPANSION, ZERO=0 +0 *PLASTIC 240.0, 0.0 270.0, 0.025 diff --git a/src/Mod/Fem/femtest/data/calculix/square_pipe_end_twisted_edgeforces.inp b/src/Mod/Fem/femtest/data/calculix/square_pipe_end_twisted_edgeforces.inp index 1eb8c7b61d..f2978bc266 100644 --- a/src/Mod/Fem/femtest/data/calculix/square_pipe_end_twisted_edgeforces.inp +++ b/src/Mod/Fem/femtest/data/calculix/square_pipe_end_twisted_edgeforces.inp @@ -2555,6 +2555,8 @@ Efaces *MATERIAL, NAME=FemMaterial *ELASTIC 200000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtest/data/calculix/square_pipe_end_twisted_nodeforces.inp b/src/Mod/Fem/femtest/data/calculix/square_pipe_end_twisted_nodeforces.inp index 01494af0ca..725be0898c 100644 --- a/src/Mod/Fem/femtest/data/calculix/square_pipe_end_twisted_nodeforces.inp +++ b/src/Mod/Fem/femtest/data/calculix/square_pipe_end_twisted_nodeforces.inp @@ -2555,6 +2555,8 @@ Efaces *MATERIAL, NAME=FemMaterial *ELASTIC 200000,0.3 +*EXPANSION, ZERO=0 +0 *********************************************************** ** Sections diff --git a/src/Mod/Fem/femtools/membertools.py b/src/Mod/Fem/femtools/membertools.py index 1163861ca3..2a5009a638 100644 --- a/src/Mod/Fem/femtools/membertools.py +++ b/src/Mod/Fem/femtools/membertools.py @@ -275,6 +275,7 @@ class AnalysisMember: self.cons_force = self.get_several_member("Fem::ConstraintForce") self.cons_heatflux = self.get_several_member("Fem::ConstraintHeatflux") self.cons_initialtemperature = self.get_several_member("Fem::ConstraintInitialTemperature") + self.cons_finaltemperature = self.get_several_member("Fem::ConstraintInitialTemperature") self.cons_planerotation = self.get_several_member("Fem::ConstraintPlaneRotation") self.cons_pressure = self.get_several_member("Fem::ConstraintPressure") self.cons_sectionprint = self.get_several_member("Fem::ConstraintSectionPrint")