FEM: examples, new lines

This commit is contained in:
Bernd Hahnebach
2020-03-22 08:59:32 +01:00
parent 4f3561af60
commit 89479fd74d
9 changed files with 33 additions and 30 deletions

View File

@@ -31,7 +31,6 @@ box.setup_frequency()
"""
import FreeCAD
import Fem

View File

@@ -33,7 +33,6 @@ canti.setup_cantileverhexa20faceload()
"""
import FreeCAD
import Fem

View File

@@ -21,9 +21,6 @@
# * *
# ***************************************************************************
# contact example shell to shell elements
# https://forum.freecadweb.org/viewtopic.php?f=18&t=42228
# based on https://forum.freecadweb.org/viewtopic.php?f=18&t=42228#p359488
# to run the example use:
"""
from femexamples.constraint_contact_shell_shell import setup
@@ -31,6 +28,9 @@ setup()
"""
# contact example shell to shell elements
# https://forum.freecadweb.org/viewtopic.php?f=18&t=42228
# based on https://forum.freecadweb.org/viewtopic.php?f=18&t=42228#p359488
import FreeCAD

View File

@@ -21,8 +21,6 @@
# * *
# ***************************************************************************
# constraint contact for solid to solid mesh
# https://forum.freecadweb.org/viewtopic.php?f=18&t=20276
# to run the example use:
"""
from femexamples.constraint_contact_solid_solid import setup
@@ -30,6 +28,8 @@ setup()
"""
# constraint contact for solid to solid mesh
# https://forum.freecadweb.org/viewtopic.php?f=18&t=20276
import FreeCAD
from FreeCAD import Rotation

View File

@@ -21,8 +21,6 @@
# * *
# ***************************************************************************
# constraint tie, bond two surfaces together (solid mesh only)
# https://forum.freecadweb.org/viewtopic.php?f=18&t=42783
# to run the example use:
"""
from femexamples.constraint_tie import setup
@@ -30,6 +28,8 @@ setup()
"""
# constraint tie, bond two surfaces together (solid mesh only)
# https://forum.freecadweb.org/viewtopic.php?f=18&t=42783
import FreeCAD
from FreeCAD import Vector

View File

@@ -28,6 +28,21 @@ setup()
"""
"""
Nonlinear material example, plate with hole.
https://forum.freecadweb.org/viewtopic.php?f=24&t=31997&start=30
https://forum.freecadweb.org/viewtopic.php?t=33974&start=90
https://forum.freecadweb.org/viewtopic.php?t=35893
plate: 400x200x10 mm
hole: diameter 100 mm (half cross section)
load: 130 MPa tension
linear material: Steel, E = 210000 MPa, my = 0.3
nonlinear material: '240.0, 0.0' to '270.0, 0.025'
TODO nonlinear material: give more information, use values from harry
TODO compare results with example from HarryvL
"""
import FreeCAD
from FreeCAD import Vector as vec
@@ -48,27 +63,12 @@ def init_doc(doc=None):
def setup(doc=None, solvertype="ccxtools"):
""" Nonlinear material example, plate with hole.
https://forum.freecadweb.org/viewtopic.php?f=24&t=31997&start=30
https://forum.freecadweb.org/viewtopic.php?t=33974&start=90
https://forum.freecadweb.org/viewtopic.php?t=35893
plate: 400x200x10 mm
hole: diameter 100 mm (half cross section)
load: 130 MPa tension
linear material: Steel, E = 210000 MPa, my = 0.3
nonlinear material: '240.0, 0.0' to '270.0, 0.025'
TODO nonlinear material: give more information, use values from harry
TODO compare results with example from HarryvL
"""
# setup model
if doc is None:
doc = init_doc()
# geometry objects
v1 = vec(-200, -100, 0)
v2 = vec(200, -100, 0)
v3 = vec(200, 100, 0)

View File

@@ -28,6 +28,8 @@ setup()
"""
# example from Harry's epic topic: Concrete branch ready for testing
# https://forum.freecadweb.org/viewtopic.php?f=18&t=33106&start=80#p296469
import FreeCAD
from FreeCAD import Vector as vec

View File

@@ -21,17 +21,18 @@
# * *
# ***************************************************************************
"""
from femexamples.thermomech_bimetall import setup
setup()
"""
# thermomechanical bimetall
# https://forum.freecadweb.org/viewtopic.php?f=18&t=43040&start=10#p366664
# analytical solution 7.05 mm deflection in the invar material direction
# see post in the forum link
# this file has 7.15 mm max deflection
# to run the example use:
"""
from femexamples.thermomech_bimetall import setup
setup()
"""
import FreeCAD
from FreeCAD import Rotation

View File

@@ -28,6 +28,8 @@ setup()
"""
# topic about the 1D flow analysis
# https://forum.freecadweb.org/viewtopic.php?f=18&t=20076
import FreeCAD
from FreeCAD import Vector as vec