FEM: calculix unit tests, add beam cross section tests
This commit is contained in:
@@ -322,6 +322,9 @@ SET(FemTestsCcx_SRCS
|
||||
femtest/data/calculix/box.FCStd
|
||||
femtest/data/calculix/ccx_buckling_flexuralbuckling.dat
|
||||
femtest/data/calculix/ccx_buckling_flexuralbuckling.inp
|
||||
femtest/data/calculix/ccx_cantilever_beam_circle.inp
|
||||
femtest/data/calculix/ccx_cantilever_beam_pipe.inp
|
||||
femtest/data/calculix/ccx_cantilever_beam_rect.inp
|
||||
femtest/data/calculix/ccx_cantilever_ele_hexa20.inp
|
||||
femtest/data/calculix/ccx_cantilever_ele_quad4.inp
|
||||
femtest/data/calculix/ccx_cantilever_ele_quad8.inp
|
||||
|
||||
@@ -103,6 +103,30 @@ class TestSolverCalculix(unittest.TestCase):
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_beam_circle(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_beam_circle import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_beam_pipe(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_beam_pipe import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_beam_rect(
|
||||
self
|
||||
):
|
||||
from femexamples.ccx_cantilever_beam_rect import setup
|
||||
setup(self.document, "calculix")
|
||||
self.input_file_writing_test(get_namefromdef("test_"))
|
||||
|
||||
# ********************************************************************************************
|
||||
def test_ccx_cantilever_ele_hexa20(
|
||||
self
|
||||
|
||||
135
src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_circle.inp
Normal file
135
src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_circle.inp
Normal file
@@ -0,0 +1,135 @@
|
||||
** written by FreeCAD inp file writer for CalculiX,Abaqus meshes
|
||||
** highest dimension mesh elements only.
|
||||
|
||||
** Nodes
|
||||
*Node, NSET=Nall
|
||||
1, 0, 500, 500
|
||||
2, 8000, 500, 500
|
||||
3, 1600, 500, 500
|
||||
4, 3200, 500, 500
|
||||
5, 4800, 500, 500
|
||||
6, 6400, 500, 500
|
||||
7, 800, 500, 500
|
||||
8, 2400, 500, 500
|
||||
9, 4000, 500, 500
|
||||
10, 5600, 500, 500
|
||||
11, 7200, 500, 500
|
||||
|
||||
|
||||
** Edge elements
|
||||
*Element, TYPE=B32, ELSET=Eedges
|
||||
1, 1, 7, 3
|
||||
2, 3, 8, 4
|
||||
3, 4, 9, 5
|
||||
4, 5, 10, 6
|
||||
5, 6, 11, 2
|
||||
|
||||
** Define element set Eall
|
||||
*ELSET, ELSET=Eall
|
||||
Eedges
|
||||
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Element sets for materials and FEM element type (solid, shell, beam, fluid)
|
||||
*ELSET,ELSET=M0B0RstdD0
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
|
||||
***********************************************************
|
||||
** constraints fixed node sets
|
||||
** ConstraintFixed
|
||||
*NSET,NSET=ConstraintFixed
|
||||
1,
|
||||
|
||||
***********************************************************
|
||||
** Materials
|
||||
** see information about units at file end
|
||||
** FreeCAD material name: Calculix-Steel
|
||||
** MechanicalMaterial
|
||||
*MATERIAL, NAME=MechanicalMaterial
|
||||
*ELASTIC
|
||||
210000,0.3
|
||||
|
||||
***********************************************************
|
||||
** Sections
|
||||
*BEAM SECTION, ELSET=M0B0RstdD0, MATERIAL=MechanicalMaterial, SECTION=CIRC
|
||||
1000
|
||||
-0, 1, 0
|
||||
|
||||
***********************************************************
|
||||
** At least one step is needed to run an CalculiX analysis of FreeCAD
|
||||
*STEP
|
||||
*STATIC
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Fixed Constraints
|
||||
** ConstraintFixed
|
||||
*BOUNDARY
|
||||
ConstraintFixed,1
|
||||
ConstraintFixed,2
|
||||
ConstraintFixed,3
|
||||
ConstraintFixed,4
|
||||
ConstraintFixed,5
|
||||
ConstraintFixed,6
|
||||
|
||||
|
||||
***********************************************************
|
||||
** constraints force node loads
|
||||
*CLOAD
|
||||
** ConstraintForce
|
||||
** node load on shape: CantileverLine:Vertex2
|
||||
2,3,-9.0000000000000E+06
|
||||
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Outputs --> frd file
|
||||
*NODE FILE, OUTPUT=2d
|
||||
U
|
||||
*EL FILE
|
||||
S, E
|
||||
** outputs --> dat file
|
||||
** reaction forces for Constraint fixed
|
||||
*NODE PRINT, NSET=ConstraintFixed, TOTALS=ONLY
|
||||
RF
|
||||
|
||||
|
||||
***********************************************************
|
||||
*END STEP
|
||||
|
||||
***********************************************************
|
||||
** CalculiX Input file
|
||||
** written by --> FreeCAD 0.20.25432 (Git)
|
||||
** written on --> Wed Aug 4 22:12:24 2021
|
||||
** file name -->
|
||||
** analysis name --> Analysis
|
||||
**
|
||||
**
|
||||
***********************************************************
|
||||
** About units:
|
||||
** See ccx manual, ccx does not know about any unit.
|
||||
** Golden rule: The user must make sure that the numbers he provides have consistent units.
|
||||
** The user is the FreeCAD calculix writer module ;-)
|
||||
**
|
||||
** The unit system which is used at Guido Dhondt's company: mm, N, s, K
|
||||
** Since Length and Mass are connected by Force, if Length is mm the Mass is in t to get N
|
||||
** The following units are used to write to inp file:
|
||||
**
|
||||
** Length: mm (this includes the mesh geometry)
|
||||
** Mass: t
|
||||
** TimeSpan: s
|
||||
** Temperature: K
|
||||
**
|
||||
** This leads to:
|
||||
** Force: N
|
||||
** Pressure: N/mm^2 == MPa (Young's Modulus has unit Pressure)
|
||||
** Density: t/mm^3
|
||||
** Gravity: mm/s^2
|
||||
** Thermal conductivity: t*mm/K/s^3 == as W/m/K == kW/mm/K
|
||||
** Specific Heat: mm^2/s^2/K = J/kg/K == kJ/t/K
|
||||
**
|
||||
135
src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_pipe.inp
Normal file
135
src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_pipe.inp
Normal file
@@ -0,0 +1,135 @@
|
||||
** written by FreeCAD inp file writer for CalculiX,Abaqus meshes
|
||||
** highest dimension mesh elements only.
|
||||
|
||||
** Nodes
|
||||
*Node, NSET=Nall
|
||||
1, 0, 500, 500
|
||||
2, 8000, 500, 500
|
||||
3, 1600, 500, 500
|
||||
4, 3200, 500, 500
|
||||
5, 4800, 500, 500
|
||||
6, 6400, 500, 500
|
||||
7, 800, 500, 500
|
||||
8, 2400, 500, 500
|
||||
9, 4000, 500, 500
|
||||
10, 5600, 500, 500
|
||||
11, 7200, 500, 500
|
||||
|
||||
|
||||
** Edge elements
|
||||
*Element, TYPE=B32, ELSET=Eedges
|
||||
1, 1, 7, 3
|
||||
2, 3, 8, 4
|
||||
3, 4, 9, 5
|
||||
4, 5, 10, 6
|
||||
5, 6, 11, 2
|
||||
|
||||
** Define element set Eall
|
||||
*ELSET, ELSET=Eall
|
||||
Eedges
|
||||
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Element sets for materials and FEM element type (solid, shell, beam, fluid)
|
||||
*ELSET,ELSET=M0B0RstdD0
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
|
||||
***********************************************************
|
||||
** constraints fixed node sets
|
||||
** ConstraintFixed
|
||||
*NSET,NSET=ConstraintFixed
|
||||
1,
|
||||
|
||||
***********************************************************
|
||||
** Materials
|
||||
** see information about units at file end
|
||||
** FreeCAD material name: Calculix-Steel
|
||||
** MechanicalMaterial
|
||||
*MATERIAL, NAME=MechanicalMaterial
|
||||
*ELASTIC
|
||||
210000,0.3
|
||||
|
||||
***********************************************************
|
||||
** Sections
|
||||
*BEAM GENERAL SECTION, ELSET=M0B0RstdD0, MATERIAL=MechanicalMaterial, SECTION=PIPE
|
||||
500,100
|
||||
-0, 1, 0
|
||||
|
||||
***********************************************************
|
||||
** At least one step is needed to run an CalculiX analysis of FreeCAD
|
||||
*STEP
|
||||
*STATIC
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Fixed Constraints
|
||||
** ConstraintFixed
|
||||
*BOUNDARY
|
||||
ConstraintFixed,1
|
||||
ConstraintFixed,2
|
||||
ConstraintFixed,3
|
||||
ConstraintFixed,4
|
||||
ConstraintFixed,5
|
||||
ConstraintFixed,6
|
||||
|
||||
|
||||
***********************************************************
|
||||
** constraints force node loads
|
||||
*CLOAD
|
||||
** ConstraintForce
|
||||
** node load on shape: CantileverLine:Vertex2
|
||||
2,3,-9.0000000000000E+06
|
||||
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Outputs --> frd file
|
||||
*NODE FILE, OUTPUT=2d
|
||||
U
|
||||
*EL FILE
|
||||
S, E
|
||||
** outputs --> dat file
|
||||
** reaction forces for Constraint fixed
|
||||
*NODE PRINT, NSET=ConstraintFixed, TOTALS=ONLY
|
||||
RF
|
||||
|
||||
|
||||
***********************************************************
|
||||
*END STEP
|
||||
|
||||
***********************************************************
|
||||
** CalculiX Input file
|
||||
** written by --> FreeCAD 0.20.25432 (Git)
|
||||
** written on --> Wed Aug 4 22:13:20 2021
|
||||
** file name -->
|
||||
** analysis name --> Analysis
|
||||
**
|
||||
**
|
||||
***********************************************************
|
||||
** About units:
|
||||
** See ccx manual, ccx does not know about any unit.
|
||||
** Golden rule: The user must make sure that the numbers he provides have consistent units.
|
||||
** The user is the FreeCAD calculix writer module ;-)
|
||||
**
|
||||
** The unit system which is used at Guido Dhondt's company: mm, N, s, K
|
||||
** Since Length and Mass are connected by Force, if Length is mm the Mass is in t to get N
|
||||
** The following units are used to write to inp file:
|
||||
**
|
||||
** Length: mm (this includes the mesh geometry)
|
||||
** Mass: t
|
||||
** TimeSpan: s
|
||||
** Temperature: K
|
||||
**
|
||||
** This leads to:
|
||||
** Force: N
|
||||
** Pressure: N/mm^2 == MPa (Young's Modulus has unit Pressure)
|
||||
** Density: t/mm^3
|
||||
** Gravity: mm/s^2
|
||||
** Thermal conductivity: t*mm/K/s^3 == as W/m/K == kW/mm/K
|
||||
** Specific Heat: mm^2/s^2/K = J/kg/K == kJ/t/K
|
||||
**
|
||||
135
src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_rect.inp
Normal file
135
src/Mod/Fem/femtest/data/calculix/ccx_cantilever_beam_rect.inp
Normal file
@@ -0,0 +1,135 @@
|
||||
** written by FreeCAD inp file writer for CalculiX,Abaqus meshes
|
||||
** highest dimension mesh elements only.
|
||||
|
||||
** Nodes
|
||||
*Node, NSET=Nall
|
||||
1, 0, 500, 500
|
||||
2, 8000, 500, 500
|
||||
3, 1600, 500, 500
|
||||
4, 3200, 500, 500
|
||||
5, 4800, 500, 500
|
||||
6, 6400, 500, 500
|
||||
7, 800, 500, 500
|
||||
8, 2400, 500, 500
|
||||
9, 4000, 500, 500
|
||||
10, 5600, 500, 500
|
||||
11, 7200, 500, 500
|
||||
|
||||
|
||||
** Edge elements
|
||||
*Element, TYPE=B32, ELSET=Eedges
|
||||
1, 1, 7, 3
|
||||
2, 3, 8, 4
|
||||
3, 4, 9, 5
|
||||
4, 5, 10, 6
|
||||
5, 6, 11, 2
|
||||
|
||||
** Define element set Eall
|
||||
*ELSET, ELSET=Eall
|
||||
Eedges
|
||||
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Element sets for materials and FEM element type (solid, shell, beam, fluid)
|
||||
*ELSET,ELSET=M0B0RstdD0
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
|
||||
***********************************************************
|
||||
** constraints fixed node sets
|
||||
** ConstraintFixed
|
||||
*NSET,NSET=ConstraintFixed
|
||||
1,
|
||||
|
||||
***********************************************************
|
||||
** Materials
|
||||
** see information about units at file end
|
||||
** FreeCAD material name: Calculix-Steel
|
||||
** MechanicalMaterial
|
||||
*MATERIAL, NAME=MechanicalMaterial
|
||||
*ELASTIC
|
||||
210000,0.3
|
||||
|
||||
***********************************************************
|
||||
** Sections
|
||||
*BEAM SECTION, ELSET=M0B0RstdD0, MATERIAL=MechanicalMaterial, SECTION=RECT
|
||||
400,1250
|
||||
-0, 1, 0
|
||||
|
||||
***********************************************************
|
||||
** At least one step is needed to run an CalculiX analysis of FreeCAD
|
||||
*STEP
|
||||
*STATIC
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Fixed Constraints
|
||||
** ConstraintFixed
|
||||
*BOUNDARY
|
||||
ConstraintFixed,1
|
||||
ConstraintFixed,2
|
||||
ConstraintFixed,3
|
||||
ConstraintFixed,4
|
||||
ConstraintFixed,5
|
||||
ConstraintFixed,6
|
||||
|
||||
|
||||
***********************************************************
|
||||
** constraints force node loads
|
||||
*CLOAD
|
||||
** ConstraintForce
|
||||
** node load on shape: CantileverLine:Vertex2
|
||||
2,3,-9.0000000000000E+06
|
||||
|
||||
|
||||
|
||||
***********************************************************
|
||||
** Outputs --> frd file
|
||||
*NODE FILE, OUTPUT=2d
|
||||
U
|
||||
*EL FILE
|
||||
S, E
|
||||
** outputs --> dat file
|
||||
** reaction forces for Constraint fixed
|
||||
*NODE PRINT, NSET=ConstraintFixed, TOTALS=ONLY
|
||||
RF
|
||||
|
||||
|
||||
***********************************************************
|
||||
*END STEP
|
||||
|
||||
***********************************************************
|
||||
** CalculiX Input file
|
||||
** written by --> FreeCAD 0.20.25432 (Git)
|
||||
** written on --> Wed Aug 4 22:14:46 2021
|
||||
** file name -->
|
||||
** analysis name --> Analysis
|
||||
**
|
||||
**
|
||||
***********************************************************
|
||||
** About units:
|
||||
** See ccx manual, ccx does not know about any unit.
|
||||
** Golden rule: The user must make sure that the numbers he provides have consistent units.
|
||||
** The user is the FreeCAD calculix writer module ;-)
|
||||
**
|
||||
** The unit system which is used at Guido Dhondt's company: mm, N, s, K
|
||||
** Since Length and Mass are connected by Force, if Length is mm the Mass is in t to get N
|
||||
** The following units are used to write to inp file:
|
||||
**
|
||||
** Length: mm (this includes the mesh geometry)
|
||||
** Mass: t
|
||||
** TimeSpan: s
|
||||
** Temperature: K
|
||||
**
|
||||
** This leads to:
|
||||
** Force: N
|
||||
** Pressure: N/mm^2 == MPa (Young's Modulus has unit Pressure)
|
||||
** Density: t/mm^3
|
||||
** Gravity: mm/s^2
|
||||
** Thermal conductivity: t*mm/K/s^3 == as W/m/K == kW/mm/K
|
||||
** Specific Heat: mm^2/s^2/K = J/kg/K == kJ/t/K
|
||||
**
|
||||
Reference in New Issue
Block a user