FEM: examples, code formating, use double quotes whenever it is possible
This commit is contained in:
@@ -72,33 +72,33 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
|
||||
# geometric objects
|
||||
# name is important because the other method in this module use obj name
|
||||
box_obj1 = doc.addObject('Part::Box', 'Box1')
|
||||
box_obj1 = doc.addObject("Part::Box", "Box1")
|
||||
box_obj1.Height = 10
|
||||
box_obj1.Width = 10
|
||||
box_obj1.Length = 20
|
||||
box_obj2 = doc.addObject('Part::Box', 'Box2')
|
||||
box_obj2 = doc.addObject("Part::Box", "Box2")
|
||||
box_obj2.Height = 10
|
||||
box_obj2.Width = 10
|
||||
box_obj2.Length = 20
|
||||
box_obj2.Placement.Base = (20, 0, 0)
|
||||
box_obj3 = doc.addObject('Part::Box', 'Box3')
|
||||
box_obj3 = doc.addObject("Part::Box", "Box3")
|
||||
box_obj3.Height = 10
|
||||
box_obj3.Width = 10
|
||||
box_obj3.Length = 20
|
||||
box_obj3.Placement.Base = (40, 0, 0)
|
||||
box_obj4 = doc.addObject('Part::Box', 'Box4')
|
||||
box_obj4 = doc.addObject("Part::Box", "Box4")
|
||||
box_obj4.Height = 10
|
||||
box_obj4.Width = 10
|
||||
box_obj4.Length = 20
|
||||
box_obj4.Placement.Base = (60, 0, 0)
|
||||
box_obj5 = doc.addObject('Part::Box', 'Box5')
|
||||
box_obj5 = doc.addObject("Part::Box", "Box5")
|
||||
box_obj5.Height = 10
|
||||
box_obj5.Width = 10
|
||||
box_obj5.Length = 20
|
||||
box_obj5.Placement.Base = (80, 0, 0)
|
||||
|
||||
# make a CompSolid out of the boxes, to be able to remesh with GUI
|
||||
j = BOPTools.SplitFeatures.makeBooleanFragments(name='BooleanFragments')
|
||||
j = BOPTools.SplitFeatures.makeBooleanFragments(name="BooleanFragments")
|
||||
j.Objects = [box_obj1, box_obj2, box_obj3, box_obj4, box_obj5]
|
||||
j.Mode = "CompSolid"
|
||||
j.Proxy.execute(j)
|
||||
@@ -108,7 +108,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
for obj in j.ViewObject.Proxy.claimChildren():
|
||||
obj.ViewObject.hide()
|
||||
|
||||
geom_obj = doc.addObject('Part::Feature', 'CompSolid')
|
||||
geom_obj = doc.addObject("Part::Feature", "CompSolid")
|
||||
geom_obj.Shape = j.Shape.CompSolids[0]
|
||||
if FreeCAD.GuiUp:
|
||||
j.ViewObject.hide()
|
||||
@@ -142,33 +142,33 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis.addObject(solver_obj)
|
||||
|
||||
# material
|
||||
material_obj1 = ObjectsFem.makeMaterialSolid(doc, 'FemMaterial1')
|
||||
material_obj1 = ObjectsFem.makeMaterialSolid(doc, "FemMaterial1")
|
||||
material_obj1.References = [(doc.Box3, "Solid1")]
|
||||
mat = material_obj1.Material
|
||||
mat['Name'] = "Concrete-Generic"
|
||||
mat['YoungsModulus'] = "32000 MPa"
|
||||
mat['PoissonRatio'] = "0.17"
|
||||
mat['Density'] = "0 kg/m^3"
|
||||
mat["Name"] = "Concrete-Generic"
|
||||
mat["YoungsModulus"] = "32000 MPa"
|
||||
mat["PoissonRatio"] = "0.17"
|
||||
mat["Density"] = "0 kg/m^3"
|
||||
material_obj1.Material = mat
|
||||
analysis.addObject(material_obj1)
|
||||
|
||||
material_obj2 = ObjectsFem.makeMaterialSolid(doc, 'FemMaterial2')
|
||||
material_obj2 = ObjectsFem.makeMaterialSolid(doc, "FemMaterial2")
|
||||
material_obj2.References = [(doc.Box2, "Solid1"), (doc.Box4, "Solid1")]
|
||||
mat = material_obj2.Material
|
||||
mat['Name'] = "PLA"
|
||||
mat['YoungsModulus'] = "3640 MPa"
|
||||
mat['PoissonRatio'] = "0.36"
|
||||
mat['Density'] = "0 kg/m^3"
|
||||
mat["Name"] = "PLA"
|
||||
mat["YoungsModulus"] = "3640 MPa"
|
||||
mat["PoissonRatio"] = "0.36"
|
||||
mat["Density"] = "0 kg/m^3"
|
||||
material_obj2.Material = mat
|
||||
analysis.addObject(material_obj2)
|
||||
|
||||
material_obj3 = ObjectsFem.makeMaterialSolid(doc, 'FemMaterial3')
|
||||
material_obj3 = ObjectsFem.makeMaterialSolid(doc, "FemMaterial3")
|
||||
material_obj3.References = []
|
||||
mat = material_obj3.Material
|
||||
mat['Name'] = "Steel-Generic"
|
||||
mat['YoungsModulus'] = "200000 MPa"
|
||||
mat['PoissonRatio'] = "0.30"
|
||||
mat['Density'] = "7900 kg/m^3"
|
||||
mat["Name"] = "Steel-Generic"
|
||||
mat["YoungsModulus"] = "200000 MPa"
|
||||
mat["PoissonRatio"] = "0.30"
|
||||
mat["Density"] = "7900 kg/m^3"
|
||||
material_obj3.Material = mat
|
||||
analysis.addObject(material_obj3)
|
||||
|
||||
|
||||
@@ -71,22 +71,22 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# geometric objects
|
||||
# name is important because the other method in this module use obj name
|
||||
# parts
|
||||
face_obj1 = doc.addObject('Part::Plane', 'Face1')
|
||||
face_obj1 = doc.addObject("Part::Plane", "Face1")
|
||||
face_obj1.Width = 10
|
||||
face_obj1.Length = 20
|
||||
face_obj2 = doc.addObject('Part::Plane', 'Face2')
|
||||
face_obj2 = doc.addObject("Part::Plane", "Face2")
|
||||
face_obj2.Width = 10
|
||||
face_obj2.Length = 20
|
||||
face_obj2.Placement.Base = (20, 0, 0)
|
||||
face_obj3 = doc.addObject('Part::Plane', 'Face3')
|
||||
face_obj3 = doc.addObject("Part::Plane", "Face3")
|
||||
face_obj3.Width = 10
|
||||
face_obj3.Length = 20
|
||||
face_obj3.Placement.Base = (40, 0, 0)
|
||||
face_obj4 = doc.addObject('Part::Plane', 'Face4')
|
||||
face_obj4 = doc.addObject("Part::Plane", "Face4")
|
||||
face_obj4.Width = 10
|
||||
face_obj4.Length = 20
|
||||
face_obj4.Placement.Base = (60, 0, 0)
|
||||
face_obj5 = doc.addObject('Part::Plane', 'Face5')
|
||||
face_obj5 = doc.addObject("Part::Plane", "Face5")
|
||||
face_obj5.Width = 10
|
||||
face_obj5.Length = 20
|
||||
face_obj5.Placement.Base = (80, 0, 0)
|
||||
@@ -131,40 +131,40 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
analysis.addObject(solver_obj)
|
||||
|
||||
# shell thickness
|
||||
thickness_obj = ObjectsFem.makeElementGeometry2D(doc, 10, 'ShellThickness')
|
||||
thickness_obj = ObjectsFem.makeElementGeometry2D(doc, 10, "ShellThickness")
|
||||
analysis.addObject(thickness_obj)
|
||||
|
||||
# materials
|
||||
material_obj1 = ObjectsFem.makeMaterialSolid(doc, 'FemMaterial1')
|
||||
material_obj1 = ObjectsFem.makeMaterialSolid(doc, "FemMaterial1")
|
||||
material_obj1.References = [(doc.Face3, "Face1")]
|
||||
mat = material_obj1.Material
|
||||
mat['Name'] = "Concrete-Generic"
|
||||
mat['YoungsModulus'] = "32000 MPa"
|
||||
mat['PoissonRatio'] = "0.17"
|
||||
mat['Density'] = "0 kg/m^3"
|
||||
mat["Name"] = "Concrete-Generic"
|
||||
mat["YoungsModulus"] = "32000 MPa"
|
||||
mat["PoissonRatio"] = "0.17"
|
||||
mat["Density"] = "0 kg/m^3"
|
||||
material_obj1.Material = mat
|
||||
analysis.addObject(material_obj1)
|
||||
|
||||
material_obj2 = ObjectsFem.makeMaterialSolid(doc, 'FemMaterial2')
|
||||
material_obj2 = ObjectsFem.makeMaterialSolid(doc, "FemMaterial2")
|
||||
material_obj2.References = [
|
||||
(doc.Face2, "Face1"),
|
||||
(doc.Face4, "Face1")
|
||||
]
|
||||
mat = material_obj2.Material
|
||||
mat['Name'] = "PLA"
|
||||
mat['YoungsModulus'] = "3640 MPa"
|
||||
mat['PoissonRatio'] = "0.36"
|
||||
mat['Density'] = "0 kg/m^3"
|
||||
mat["Name"] = "PLA"
|
||||
mat["YoungsModulus"] = "3640 MPa"
|
||||
mat["PoissonRatio"] = "0.36"
|
||||
mat["Density"] = "0 kg/m^3"
|
||||
material_obj2.Material = mat
|
||||
analysis.addObject(material_obj2)
|
||||
|
||||
material_obj3 = ObjectsFem.makeMaterialSolid(doc, 'FemMaterial3')
|
||||
material_obj3 = ObjectsFem.makeMaterialSolid(doc, "FemMaterial3")
|
||||
material_obj3.References = []
|
||||
mat = material_obj3.Material
|
||||
mat['Name'] = "Steel-Generic"
|
||||
mat['YoungsModulus'] = "200000 MPa"
|
||||
mat['PoissonRatio'] = "0.30"
|
||||
mat['Density'] = "7900 kg/m^3"
|
||||
mat["Name"] = "Steel-Generic"
|
||||
mat["YoungsModulus"] = "200000 MPa"
|
||||
mat["PoissonRatio"] = "0.30"
|
||||
mat["Density"] = "7900 kg/m^3"
|
||||
material_obj3.Material = mat
|
||||
analysis.addObject(material_obj3)
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
l4 = Part.makeLine((-142.5, 142.5, 0), (-142.5, -142.5, 0))
|
||||
wire = Part.Wire([l1, l2, l3, l4])
|
||||
shape = wire.extrude(Vector(0, 0, 1000))
|
||||
geom_obj = doc.addObject('Part::Feature', 'SquareTube')
|
||||
geom_obj = doc.addObject("Part::Feature", "SquareTube")
|
||||
geom_obj.Shape = shape
|
||||
doc.recompute()
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
l4 = Part.makeLine((-142.5, 142.5, 0), (-142.5, -142.5, 0))
|
||||
wire = Part.Wire([l1, l2, l3, l4])
|
||||
shape = wire.extrude(Vector(0, 0, 1000))
|
||||
geom_obj = doc.addObject('Part::Feature', 'SquareTube')
|
||||
geom_obj = doc.addObject("Part::Feature", "SquareTube")
|
||||
geom_obj.Shape = shape
|
||||
|
||||
points_forces = []
|
||||
@@ -182,9 +182,9 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
points_fixes.append(Part.Vertex(-71.25, 142.5, 1000.0))
|
||||
points_fixes.append(Part.Vertex(-118.75, 142.5, 1000.0))
|
||||
|
||||
geoforces_obj = doc.addObject('Part::Feature', 'Forces')
|
||||
geoforces_obj = doc.addObject("Part::Feature", "Forces")
|
||||
geoforces_obj.Shape = Part.makeCompound(points_forces)
|
||||
geofixes_obj = doc.addObject('Part::Feature', 'Fixes')
|
||||
geofixes_obj = doc.addObject("Part::Feature", "Fixes")
|
||||
geofixes_obj.Shape = Part.makeCompound(points_fixes)
|
||||
|
||||
doc.recompute()
|
||||
@@ -237,59 +237,59 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# constraint fixed
|
||||
con_fixed = ObjectsFem.makeConstraintFixed(doc, "ConstraintFixed")
|
||||
con_fixed.References = [
|
||||
(geofixes_obj, 'Vertex6'),
|
||||
(geofixes_obj, 'Vertex15'),
|
||||
(geofixes_obj, 'Vertex5'),
|
||||
(geofixes_obj, 'Vertex29'),
|
||||
(geofixes_obj, 'Vertex42'),
|
||||
(geofixes_obj, 'Vertex30'),
|
||||
(geofixes_obj, 'Vertex9'),
|
||||
(geofixes_obj, 'Vertex31'),
|
||||
(geofixes_obj, 'Vertex33'),
|
||||
(geofixes_obj, 'Vertex32'),
|
||||
(geofixes_obj, 'Vertex3'),
|
||||
(geofixes_obj, 'Vertex34'),
|
||||
(geofixes_obj, 'Vertex46'),
|
||||
(geofixes_obj, 'Vertex1'),
|
||||
(geofixes_obj, 'Vertex36'),
|
||||
(geofixes_obj, 'Vertex11'),
|
||||
(geofixes_obj, 'Vertex38'),
|
||||
(geofixes_obj, 'Vertex12'),
|
||||
(geofixes_obj, 'Vertex39'),
|
||||
(geofixes_obj, 'Vertex13'),
|
||||
(geofixes_obj, 'Vertex40'),
|
||||
(geofixes_obj, 'Vertex16'),
|
||||
(geofixes_obj, 'Vertex35'),
|
||||
(geofixes_obj, 'Vertex14'),
|
||||
(geofixes_obj, 'Vertex47'),
|
||||
(geofixes_obj, 'Vertex20'),
|
||||
(geofixes_obj, 'Vertex37'),
|
||||
(geofixes_obj, 'Vertex18'),
|
||||
(geofixes_obj, 'Vertex41'),
|
||||
(geofixes_obj, 'Vertex17'),
|
||||
(geofixes_obj, 'Vertex10'),
|
||||
(geofixes_obj, 'Vertex26'),
|
||||
(geofixes_obj, 'Vertex43'),
|
||||
(geofixes_obj, 'Vertex21'),
|
||||
(geofixes_obj, 'Vertex44'),
|
||||
(geofixes_obj, 'Vertex19'),
|
||||
(geofixes_obj, 'Vertex4'),
|
||||
(geofixes_obj, 'Vertex28'),
|
||||
(geofixes_obj, 'Vertex48'),
|
||||
(geofixes_obj, 'Vertex22'),
|
||||
(geofixes_obj, 'Vertex8'),
|
||||
(geofixes_obj, 'Vertex23'),
|
||||
(geofixes_obj, 'Vertex7'),
|
||||
(geofixes_obj, 'Vertex24'),
|
||||
(geofixes_obj, 'Vertex45'),
|
||||
(geofixes_obj, 'Vertex27'),
|
||||
(geofixes_obj, 'Vertex2'),
|
||||
(geofixes_obj, 'Vertex25')]
|
||||
(geofixes_obj, "Vertex6"),
|
||||
(geofixes_obj, "Vertex15"),
|
||||
(geofixes_obj, "Vertex5"),
|
||||
(geofixes_obj, "Vertex29"),
|
||||
(geofixes_obj, "Vertex42"),
|
||||
(geofixes_obj, "Vertex30"),
|
||||
(geofixes_obj, "Vertex9"),
|
||||
(geofixes_obj, "Vertex31"),
|
||||
(geofixes_obj, "Vertex33"),
|
||||
(geofixes_obj, "Vertex32"),
|
||||
(geofixes_obj, "Vertex3"),
|
||||
(geofixes_obj, "Vertex34"),
|
||||
(geofixes_obj, "Vertex46"),
|
||||
(geofixes_obj, "Vertex1"),
|
||||
(geofixes_obj, "Vertex36"),
|
||||
(geofixes_obj, "Vertex11"),
|
||||
(geofixes_obj, "Vertex38"),
|
||||
(geofixes_obj, "Vertex12"),
|
||||
(geofixes_obj, "Vertex39"),
|
||||
(geofixes_obj, "Vertex13"),
|
||||
(geofixes_obj, "Vertex40"),
|
||||
(geofixes_obj, "Vertex16"),
|
||||
(geofixes_obj, "Vertex35"),
|
||||
(geofixes_obj, "Vertex14"),
|
||||
(geofixes_obj, "Vertex47"),
|
||||
(geofixes_obj, "Vertex20"),
|
||||
(geofixes_obj, "Vertex37"),
|
||||
(geofixes_obj, "Vertex18"),
|
||||
(geofixes_obj, "Vertex41"),
|
||||
(geofixes_obj, "Vertex17"),
|
||||
(geofixes_obj, "Vertex10"),
|
||||
(geofixes_obj, "Vertex26"),
|
||||
(geofixes_obj, "Vertex43"),
|
||||
(geofixes_obj, "Vertex21"),
|
||||
(geofixes_obj, "Vertex44"),
|
||||
(geofixes_obj, "Vertex19"),
|
||||
(geofixes_obj, "Vertex4"),
|
||||
(geofixes_obj, "Vertex28"),
|
||||
(geofixes_obj, "Vertex48"),
|
||||
(geofixes_obj, "Vertex22"),
|
||||
(geofixes_obj, "Vertex8"),
|
||||
(geofixes_obj, "Vertex23"),
|
||||
(geofixes_obj, "Vertex7"),
|
||||
(geofixes_obj, "Vertex24"),
|
||||
(geofixes_obj, "Vertex45"),
|
||||
(geofixes_obj, "Vertex27"),
|
||||
(geofixes_obj, "Vertex2"),
|
||||
(geofixes_obj, "Vertex25")]
|
||||
analysis.addObject(con_fixed)
|
||||
|
||||
# con_force1
|
||||
con_force1 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce1")
|
||||
con_force1.References = [(geoforces_obj, 'Vertex1'), (geoforces_obj, 'Vertex14')]
|
||||
con_force1.References = [(geoforces_obj, "Vertex1"), (geoforces_obj, "Vertex14")]
|
||||
con_force1.Force = 5555.56
|
||||
con_force1.Direction = (geom_obj, ["Edge9"])
|
||||
con_force1.Reversed = False
|
||||
@@ -297,7 +297,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
|
||||
# con_force2
|
||||
con_force2 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce2")
|
||||
con_force2.References = [(geoforces_obj, 'Vertex2'), (geoforces_obj, 'Vertex8')]
|
||||
con_force2.References = [(geoforces_obj, "Vertex2"), (geoforces_obj, "Vertex8")]
|
||||
con_force2.Force = 5555.56
|
||||
con_force2.Direction = (geom_obj, ["Edge3"])
|
||||
con_force2.Reversed = False
|
||||
@@ -306,11 +306,11 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# con_force3
|
||||
con_force3 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce3")
|
||||
con_force3.References = [
|
||||
(geoforces_obj, 'Vertex20'),
|
||||
(geoforces_obj, 'Vertex21'),
|
||||
(geoforces_obj, 'Vertex22'),
|
||||
(geoforces_obj, 'Vertex23'),
|
||||
(geoforces_obj, 'Vertex24'), ]
|
||||
(geoforces_obj, "Vertex20"),
|
||||
(geoforces_obj, "Vertex21"),
|
||||
(geoforces_obj, "Vertex22"),
|
||||
(geoforces_obj, "Vertex23"),
|
||||
(geoforces_obj, "Vertex24"), ]
|
||||
con_force3.Force = 27777.78
|
||||
con_force3.Direction = (geom_obj, ["Edge9"])
|
||||
con_force3.Reversed = False
|
||||
@@ -319,11 +319,11 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# con_force4
|
||||
con_force4 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce4")
|
||||
con_force4.References = [
|
||||
(geoforces_obj, 'Vertex9'),
|
||||
(geoforces_obj, 'Vertex10'),
|
||||
(geoforces_obj, 'Vertex11'),
|
||||
(geoforces_obj, 'Vertex12'),
|
||||
(geoforces_obj, 'Vertex13'), ]
|
||||
(geoforces_obj, "Vertex9"),
|
||||
(geoforces_obj, "Vertex10"),
|
||||
(geoforces_obj, "Vertex11"),
|
||||
(geoforces_obj, "Vertex12"),
|
||||
(geoforces_obj, "Vertex13"), ]
|
||||
con_force4.Force = 27777.78
|
||||
con_force4.Direction = (geom_obj, ["Edge3"])
|
||||
con_force4.Reversed = False
|
||||
@@ -332,12 +332,12 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# con_force5
|
||||
con_force5 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce5")
|
||||
con_force5.References = [
|
||||
(geoforces_obj, 'Vertex43'),
|
||||
(geoforces_obj, 'Vertex44'),
|
||||
(geoforces_obj, 'Vertex45'),
|
||||
(geoforces_obj, 'Vertex46'),
|
||||
(geoforces_obj, 'Vertex47'),
|
||||
(geoforces_obj, 'Vertex48'), ]
|
||||
(geoforces_obj, "Vertex43"),
|
||||
(geoforces_obj, "Vertex44"),
|
||||
(geoforces_obj, "Vertex45"),
|
||||
(geoforces_obj, "Vertex46"),
|
||||
(geoforces_obj, "Vertex47"),
|
||||
(geoforces_obj, "Vertex48"), ]
|
||||
con_force5.Force = 66666.67
|
||||
con_force5.Direction = (geom_obj, ["Edge9"])
|
||||
con_force5.Reversed = False
|
||||
@@ -346,12 +346,12 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# con_force6
|
||||
con_force6 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce6")
|
||||
con_force6.References = [
|
||||
(geoforces_obj, 'Vertex31'),
|
||||
(geoforces_obj, 'Vertex32'),
|
||||
(geoforces_obj, 'Vertex33'),
|
||||
(geoforces_obj, 'Vertex34'),
|
||||
(geoforces_obj, 'Vertex35'),
|
||||
(geoforces_obj, 'Vertex36'), ]
|
||||
(geoforces_obj, "Vertex31"),
|
||||
(geoforces_obj, "Vertex32"),
|
||||
(geoforces_obj, "Vertex33"),
|
||||
(geoforces_obj, "Vertex34"),
|
||||
(geoforces_obj, "Vertex35"),
|
||||
(geoforces_obj, "Vertex36"), ]
|
||||
con_force6.Force = 66666.67
|
||||
con_force6.Direction = (geom_obj, ["Edge3"])
|
||||
con_force6.Reversed = False
|
||||
@@ -359,7 +359,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
|
||||
# con_force7
|
||||
con_force7 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce7")
|
||||
con_force7.References = [(geoforces_obj, 'Vertex1'), (geoforces_obj, 'Vertex2')]
|
||||
con_force7.References = [(geoforces_obj, "Vertex1"), (geoforces_obj, "Vertex2")]
|
||||
con_force7.Force = 5555.56
|
||||
con_force7.Direction = (geom_obj, ["Edge11"])
|
||||
con_force7.Reversed = False
|
||||
@@ -367,7 +367,7 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
|
||||
# con_force8
|
||||
con_force8 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce8")
|
||||
con_force8.References = [(geoforces_obj, 'Vertex8'), (geoforces_obj, 'Vertex14')]
|
||||
con_force8.References = [(geoforces_obj, "Vertex8"), (geoforces_obj, "Vertex14")]
|
||||
con_force8.Force = 5555.56
|
||||
con_force8.Direction = (geom_obj, ["Edge6"])
|
||||
con_force8.Reversed = False
|
||||
@@ -376,11 +376,11 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# con_force9
|
||||
con_force9 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce9")
|
||||
con_force9.References = [
|
||||
(geoforces_obj, 'Vertex3'),
|
||||
(geoforces_obj, 'Vertex4'),
|
||||
(geoforces_obj, 'Vertex5'),
|
||||
(geoforces_obj, 'Vertex6'),
|
||||
(geoforces_obj, 'Vertex7'), ]
|
||||
(geoforces_obj, "Vertex3"),
|
||||
(geoforces_obj, "Vertex4"),
|
||||
(geoforces_obj, "Vertex5"),
|
||||
(geoforces_obj, "Vertex6"),
|
||||
(geoforces_obj, "Vertex7"), ]
|
||||
con_force9.Force = 27777.78
|
||||
con_force9.Direction = (geom_obj, ["Edge11"])
|
||||
con_force9.Reversed = False
|
||||
@@ -389,11 +389,11 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# con_force10
|
||||
con_force10 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce10")
|
||||
con_force10.References = [
|
||||
(geoforces_obj, 'Vertex15'),
|
||||
(geoforces_obj, 'Vertex16'),
|
||||
(geoforces_obj, 'Vertex17'),
|
||||
(geoforces_obj, 'Vertex18'),
|
||||
(geoforces_obj, 'Vertex19'), ]
|
||||
(geoforces_obj, "Vertex15"),
|
||||
(geoforces_obj, "Vertex16"),
|
||||
(geoforces_obj, "Vertex17"),
|
||||
(geoforces_obj, "Vertex18"),
|
||||
(geoforces_obj, "Vertex19"), ]
|
||||
con_force10.Force = 27777.78
|
||||
con_force10.Direction = (geom_obj, ["Edge6"])
|
||||
con_force10.Reversed = False
|
||||
@@ -402,12 +402,12 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# con_force11
|
||||
con_force11 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce11")
|
||||
con_force11.References = [
|
||||
(geoforces_obj, 'Vertex25'),
|
||||
(geoforces_obj, 'Vertex26'),
|
||||
(geoforces_obj, 'Vertex27'),
|
||||
(geoforces_obj, 'Vertex28'),
|
||||
(geoforces_obj, 'Vertex29'),
|
||||
(geoforces_obj, 'Vertex30'), ]
|
||||
(geoforces_obj, "Vertex25"),
|
||||
(geoforces_obj, "Vertex26"),
|
||||
(geoforces_obj, "Vertex27"),
|
||||
(geoforces_obj, "Vertex28"),
|
||||
(geoforces_obj, "Vertex29"),
|
||||
(geoforces_obj, "Vertex30"), ]
|
||||
con_force11.Force = 66666.67
|
||||
con_force11.Direction = (geom_obj, ["Edge11"])
|
||||
con_force11.Reversed = False
|
||||
@@ -416,12 +416,12 @@ def setup(doc=None, solvertype="ccxtools"):
|
||||
# con_force12
|
||||
con_force12 = ObjectsFem.makeConstraintForce(doc, name="ConstraintForce12")
|
||||
con_force12.References = [
|
||||
(geoforces_obj, 'Vertex37'),
|
||||
(geoforces_obj, 'Vertex38'),
|
||||
(geoforces_obj, 'Vertex39'),
|
||||
(geoforces_obj, 'Vertex40'),
|
||||
(geoforces_obj, 'Vertex41'),
|
||||
(geoforces_obj, 'Vertex42'), ]
|
||||
(geoforces_obj, "Vertex37"),
|
||||
(geoforces_obj, "Vertex38"),
|
||||
(geoforces_obj, "Vertex39"),
|
||||
(geoforces_obj, "Vertex40"),
|
||||
(geoforces_obj, "Vertex41"),
|
||||
(geoforces_obj, "Vertex42"), ]
|
||||
con_force12.Force = 66666.67
|
||||
con_force12.Direction = (geom_obj, ["Edge6"])
|
||||
con_force12.Reversed = False
|
||||
|
||||
Reference in New Issue
Block a user