FEM: unit test, change load and pressure to some more reasonable values

This commit is contained in:
Bernd Hahnebach 2016-03-11 07:07:34 +01:00 committed by wmayer
parent 4e407ac4d6
commit 0ffb412aaf
3 changed files with 62 additions and 62 deletions

View File

@ -97,7 +97,7 @@ class FemTest(unittest.TestCase):
def create_new_material(self):
self.new_material_object = MechanicalMaterial.makeMechanicalMaterial('MechanicalMaterial')
mat = self.new_material_object.Material
mat['Name'] = "Steel"
mat['Name'] = "Steel-Generic"
mat['YoungsModulus'] = "200000 MPa"
mat['PoissonRatio'] = "0.30"
mat['Density'] = "7900 kg/m^3"
@ -109,16 +109,16 @@ class FemTest(unittest.TestCase):
def create_force_constraint(self):
self.force_constraint = self.active_doc.addObject("Fem::ConstraintForce", "FemConstraintForce")
self.force_constraint.References = [(self.box, "Face2")]
self.force_constraint.Force = 10.000000
self.force_constraint.References = [(self.box, "Face6")]
self.force_constraint.Force = 40000.0
self.force_constraint.Direction = (self.box, ["Edge5"])
self.force_constraint.Reversed = True
def create_pressure_constraint(self):
self.pressure_constraint = self.active_doc.addObject("Fem::ConstraintPressure", "FemConstraintPressure")
self.pressure_constraint.References = [(self.box, "Face2")]
self.pressure_constraint.Pressure = 10.000000
self.pressure_constraint.Reversed = True
self.pressure_constraint.Pressure = 1000.0
self.pressure_constraint.Reversed = False
def force_unix_line_ends(self, line_list):
new_line_list = []

View File

@ -472,7 +472,7 @@ Eall
** Materials
** written by write_materials function
** Young's modulus unit is MPa = N/mm2
**FreeCAD material name: Steel
**FreeCAD material name: Steel-Generic
*MATERIAL, NAME=MechanicalMaterial
*ELASTIC
200000 , 0.300

View File

@ -477,7 +477,7 @@ Eall
** Materials
** written by write_materials function
** Young's modulus unit is MPa = N/mm2
**FreeCAD material name: Steel
**FreeCAD material name: Steel-Generic
*MATERIAL, NAME=MechanicalMaterial
*ELASTIC
200000 , 0.300
@ -515,48 +515,48 @@ FemConstraintFixed,3
** written by write_constraints_force function
*CLOAD
** FemConstraintForce
** node loads on element Face: Box:Face2
5,3,-0.0000000000000E+00
** node loads on element Face: Box:Face6
2,3,-0.0000000000000E+00
4,3,-0.0000000000000E+00
6,3,-0.0000000000000E+00
7,3,-0.0000000000000E+00
8,3,-0.0000000000000E+00
21,3,-0.0000000000000E+00
22,3,-2.0833333333333E-01
23,3,-2.0833333333333E-01
24,3,-0.0000000000000E+00
25,3,-2.0833333333333E-01
26,3,-2.0833333333333E-01
27,3,-0.0000000000000E+00
28,3,-2.0833333333333E-01
29,3,-2.0833333333333E-01
18,3,-0.0000000000000E+00
19,3,-8.3333333333333E+02
20,3,-8.3333333333333E+02
30,3,-0.0000000000000E+00
31,3,-2.0833333333333E-01
32,3,-2.0833333333333E-01
70,3,-0.0000000000000E+00
71,3,-0.0000000000000E+00
72,3,-0.0000000000000E+00
73,3,-0.0000000000000E+00
74,3,-0.0000000000000E+00
75,3,-4.1666666666667E-01
76,3,-4.1666666666667E-01
77,3,-4.1666666666667E-01
78,3,-4.1666666666667E-01
79,3,-4.1666666666667E-01
80,3,-4.1666666666667E-01
81,3,-4.1666666666667E-01
82,3,-4.1666666666667E-01
83,3,-4.1666666666667E-01
84,3,-4.1666666666667E-01
85,3,-4.1666666666667E-01
86,3,-4.1666666666667E-01
87,3,-4.1666666666667E-01
88,3,-4.1666666666667E-01
89,3,-4.1666666666667E-01
90,3,-4.1666666666667E-01
91,3,-4.1666666666667E-01
92,3,-4.1666666666667E-01
93,3,-4.1666666666667E-01
94,3,-4.1666666666667E-01
31,3,-8.3333333333333E+02
32,3,-8.3333333333333E+02
36,3,-0.0000000000000E+00
37,3,-8.3333333333333E+02
38,3,-8.3333333333333E+02
42,3,-0.0000000000000E+00
43,3,-8.3333333333333E+02
44,3,-8.3333333333333E+02
170,3,-0.0000000000000E+00
171,3,-0.0000000000000E+00
172,3,-0.0000000000000E+00
173,3,-0.0000000000000E+00
174,3,-0.0000000000000E+00
175,3,-1.6666666666667E+03
176,3,-1.6666666666667E+03
177,3,-1.6666666666667E+03
178,3,-1.6666666666667E+03
179,3,-1.6666666666667E+03
180,3,-1.6666666666667E+03
181,3,-1.6666666666667E+03
182,3,-1.6666666666667E+03
183,3,-1.6666666666667E+03
184,3,-1.6666666666667E+03
185,3,-1.6666666666667E+03
186,3,-1.6666666666667E+03
187,3,-1.6666666666667E+03
188,3,-1.6666666666667E+03
189,3,-1.6666666666667E+03
190,3,-1.6666666666667E+03
191,3,-1.6666666666667E+03
192,3,-1.6666666666667E+03
193,3,-1.6666666666667E+03
194,3,-1.6666666666667E+03
@ -565,22 +565,22 @@ FemConstraintFixed,3
** written by write_constraints_pressure function
*DLOAD
** Load on face Face2
635,P1,-10.0
638,P3,-10.0
641,P2,-10.0
668,P1,-10.0
670,P1,-10.0
688,P1,-10.0
693,P3,-10.0
699,P2,-10.0
700,P3,-10.0
707,P2,-10.0
708,P4,-10.0
710,P4,-10.0
711,P2,-10.0
722,P3,-10.0
737,P3,-10.0
757,P3,-10.0
635,P1,1000.0
638,P3,1000.0
641,P2,1000.0
668,P1,1000.0
670,P1,1000.0
688,P1,1000.0
693,P3,1000.0
699,P2,1000.0
700,P3,1000.0
707,P2,1000.0
708,P4,1000.0
710,P4,1000.0
711,P2,1000.0
722,P3,1000.0
737,P3,1000.0
757,P3,1000.0
***********************************************************
** Outputs --> frd file