Tensoren mit Bezugspunkt
Intro
Ortsvektoren hängen davon ab, von welchem Punkt der Ortsvektor ausgeht.
Auch das von einer Kraft erzeugte Moment hängt vom Bezugspunkt ab.
Der Trägheitstensor und der Flächenträgheitstensor sind Tensoren, die vom gewählten Bezugspunkt abhängen. Die Umrechnung der Komponenten bei Bezugspunktwechsel beschreibt das Parallelachsen-Theorem.
Die Tensor-Komponenten hängen außerdem vom Bezugssytem ab. Die Umrechnung der Komponenten bei Bezugssystemwechsel beschreibt die Passive Transformation.
Trägheitstensor
Parallelachsentheorem = Satz von Steiner
\((x,y,z)\)-Komponenten des Trägheitstensors bezogen auf den Schwerpunkt eines Körpers mit Masse \(m\) (oben). Sowie Komponenten bezogen auf einen beliebigen Punkt berechnet nach Parallelachsen-Theorem (unten).
Spezialfall 2D = Bewegung in der x-y-Ebene
Für Körper in der \((x,y)\)-Ebene gilt Folgendes:
Drehpunkt: Der Drehpunkt eines Körpers, der sich nur in der \((x,y)\)-Ebene drehen kann, ist der Punkt, wo die Drehachse des Körpers die \((x,y)\)-Ebene durchstößt.
Nur genau eine Komponente: Im Drallsatz in 2D erscheint nur eine Komponente des Trägheitstensors. Da die Drehung um eine Achse parallel zur z-Achse stattfindet, geht es um die \(zz\)-Komponente des Trägheitstensors. Diese Komponente wird manchmal auch \(z\)-Komponente genannt. Und manchmal wird diese Komponente auch ohne Index verwendet.
Bezugspunkt-Abhängigkeit: Die Abhängigkeit des Trägheitstensors vom Bezugspunkt gilt auch in 2D. Nicht alle Punkte dürfen als Bezugspunkt verwendet werden, siehe Drallsatz-Bezugspunkt. Oft wird als Bezugspunkt verwendet:
Der Schwerpunkt.
Der Drehpunkt.
Der Abrollpunkt.
Parallelachsen-Theorem = Satz von Steiner: Das Parallelachsen-Theorem lautet \(\Theta_{Ozz} = \Theta_{zz} + m \left( d_x^2 + d_y^2 \right).\) Dieses Theorem wird auch Satz von Steiner genannt.
Bemerkung
Wie bei allen Tensoren gilt die Passive Transformation: Sei \((\bar x, \bar y,\bar z)\) ein Bezugssystem, welches ggü. \((x, y, z)\) gedreht ist. Dann gilt für die \((\bar x, \bar y,\bar z)\)-Komponenten des Trägheitstensors (Bezugspunkt beliebig) nach Tensor: Transformation:
Source Code eines Programms dazu: Programm ausführen? Dazu: Copy: Source Code in die Zwischenablage kopieren. Paste: Source Code ins Eingabefeld hinter Play: Knopf SymPy
from sympy.physics.units import *
from sympy import *
# Units:
(mm, cm) = ( m/1000, m/100 )
kN = 10**3*newton
Pa = newton/m**2
MPa = 10**6*Pa
GPa = 10**9*Pa
deg = pi/180
half = S(1)/2
def iso_round(x, pv):
try:
x = float(x)
tmp = round(x, pv)
except TypeError:
from functools import partial
func = partial(round, ndigits = pv)
tmp = x.applyfunc(func)
return tmp
"""
Input:
1. Inertia Tensor Components wrt (x,y,z) at Centroid:
J: (x,y,z)-Component-Matrix.
2. Mass of body.
3. Vector OS with Components (dx, dy, dz).
4. Rotation axis and rotation angle phi
Only rotations about either x or y or z
are supported.
Output:
1. JO: (x, y, z)-Component-Matrix.
2. JOb: Component-Matrix after Passive Transformation.
"""
# Given symbols:
# var("Jxx, Jyy, Jzz, Jxy, Jxz, Jyz")
# var("dx, dy, dz")
# phi = var("phi")
# mass = var("m")
# 1.
Jxx = 5572.545022 *kg*meter*meter
Jyy = Jxx
Jzz = 1834.862385 *kg*meter*meter
Jxy, Jxz, Jyz = 0, 0, 0
# 2.
mass = 4077.471967 *kg
# 3. Translation:
dx, dy, dz = 0, 0, 0
# 4. Rotation:
# About which axis?
axis = "x"
phi = 315 *deg
# J = Matrix([
# [Jxx, Jxy, Jxz],
# [Jxy, Jyy, Jyz],
# [Jxz, Jyz, Jzz]
# ])
# Translation:
JOxx = Jxx + (dy**2 + dz**2) * mass
JOyy = Jyy + (dx**2 + dz**2) * mass
JOzz = Jzz + (dx**2 + dy**2) * mass
JOxy = Jxy - dx*dy *mass
JOxz = Jxz - dx*dz *mass
JOyz = Jyz - dy*dz *mass
JO = Matrix([
[JOxx, JOxy, JOxz],
[JOxy, JOyy, JOyz],
[JOxz, JOyz, JOzz]
])
# Rotation:
c, s = cos(phi), sin(phi)
if axis == "x":
R = Matrix([
[ 1, 0, 0],
[ 0, c, s],
[ 0, -s, c]
])
elif axis == "y":
R = Matrix([
[ c, 0, -s],
[ 0, 1, 0],
[ s, 0, c]
])
elif axis == "z":
R = Matrix([
[ c, s, 0],
[-s, c, 0],
[ 0, 0, 1]
])
Rt = R.transpose()
JOb = R*JO*Rt
pprint("JO / (kg m²):")
tmp = JO/ (kg *meter*meter)
tmp = iso_round(tmp, 2)
pprint(tmp)
pprint("\nJOb / (kg m²):")
tmp = JOb/ (kg *meter*meter)
tmp = tmp.applyfunc(simplify)
tmp = iso_round(tmp, 2)
pprint(tmp)
[ ]: einfügen.▶ drücken.
Flächenträgheitstensor
Parallelachsentheorem = Satz von Steiner
\((y,z)\)-Komponenten des Flächenträgheitstensors bezogen auf Schwerpunkt S eines Körpers (oben). Sowie Komponenten bezogen auf einen beliebigen Punkt berechnet nach Parallelachsen-Theorem (unten).
Bemerkung
Wie bei allen Tensoren gilt die Passive Transformation: Sei \((\bar y,\bar z)\) ein Bezugssystem, welches ggü. \((y, z)\) um die \(x=\bar x\)-Achse gedreht ist. Dann gilt für die \((\bar y,\bar z)\)-Komponenten des Flächenträgheitstensors (Bezugspunkt beliebig) nach Tensor: Transformation:
Polygon
Grundlagen siehe Wikipedia.
SymPy-Programm zur Berechnung von Momenten von Polygonflächen vorhanden.
Dreieck
Formeln zur Berechnung der Komponenten des Flächenträgheitstensors (bezogen auf Schwerpunkt) für alle Dreiecke, bei denen ein Schenkel parallel zur y-Achse (oben) oder zur z-Achse (unten) ist.
Source Code eines Programms dazu: Programm ausführen? Dazu: Copy: Source Code in die Zwischenablage kopieren. Paste: Source Code ins Eingabefeld hinter Play: Knopf SymPy
from sympy.physics.units import kg, m, s
from sympy import pi, S, pprint, symbols, cos, sin, Matrix, Eq, solve, sqrt, exp, simplify
from sympy import latex
# Units:
N = kg*m/s**2
k, M, G = 10**3, 10**6, 10**9
kN = k*N
Pa = N/m**2
MPa, GPa = M*Pa, G*Pa
deg = pi/180
half = S(1)/2
cm = m/100
mm = m/1000
# Rounding:
def iso_round(x, pv):
try:
x = float(x)
tmp = round(x, pv)
except TypeError:
x = x.evalf()
from functools import partial
func = partial(round, ndigits = pv)
tmp = x.applyfunc(func)
return tmp
# Printing:
def printout(x, unit=1, prec="nil", sub_list=[]):
x = x.subs(sub_list)
x /= unit
try:
x = x.applyfunc(simplify)
# old:
# except:
# new:
except AttributeError:
tmp = x.simplify()
if tmp is not None:
x = tmp
if prec != "nil":
x = iso_round(x, prec)
pprint(x)
return
# --- Start of Input ---
# task = "2.4.1.D"
# task = "2.4.1.G"
# task = "2.4.1.H"
# task = "2.4.4.J"
# task = "2.4.4.K"
# task = "2.4.4.L"
# task = "test"
# task = "y-triangle"
# task = "z-triangle"
task = "u-shape"
pprint("\nTask:")
pprint(task)
assert task in ["2.4.1.D", "2.4.1.G", "2.4.1.H", "2.4.4.J", "2.4.4.K", "test", "y-triangle", "z-triangle", "u-shape"]
a, b, c, h, B, H, t = symbols("a, b, c, h, B, H, t", positive=True)
y2, z2, y3, z3 = symbols("y2, z2, y3, z3", real=True)
if task == "2.4.1.D":
prec = 2
# 2
# + +
# | |\
# | | \
# | | \
# | | \
# h | | \
# | | \
# | | \
# | | \
# | | \
# + 3 +---------+ 1 +
# b |
# y <---+ v z
#
# Polygon Points:
pts = [
(-b, 0 ), # 1
( 0, -h ), # 2
( 0, 0 ), # 3
# The polygon is always closed
# using the very first point.
# Last edge 3-1 is correct.
]
sub_list = [
( b, 4*cm ),
( h, 3*cm ),
]
elif task == "2.4.1.G":
prec = 1
#
# y <---+
#
# + + 1 +
# | /| |
# | / | v z
# | / |
# | / |
# h | / |
# | / |
# | / |
# | / |
# | / |
# + 2 +---------+ 3
# b
#
pts = [
( 0, 0 ), # 1
( b, h ), # 2
( 0, h ), # 3
# The polygon is always closed
# using the very first point.
# Last edge 3-1 is correct.
]
sub_list = [
( b, 4*cm ),
( h, 3*cm ),
]
elif task == "2.4.1.H": # TM2_10_01
prec = 1
# b
# +---------+
#
# y <---+
#
# 2 1
# + + +-------------+ +
# | h | | | 7 |
# | + | +---------+ v z
# | | 8 |
# H | | |
# | | 4 |
# | + +---------+ |
# | h | 3 | |
# + + +-------------*
# 5 6
#
# b
# +---------+
# B
# +-----------------------+
#
# Outside = counterclockwise:
pts = [
( b, 0 ), # 1
( B, 0 ), # 2
( B, H-h ), # 3
( B-b, H-h ), # 4
( B-b, H ), # 5
( 0, H ), # 6
( 0, h ), # 7
( b, h ), # 8
# The polygon is always closed
# using the very first point.
# Last edge 8-1 is correct.
]
sub_list_tm = [
( B, 10*cm ),
( H, 6*cm ),
( b, 2*cm ),
( h, 2*cm ),
]
sub_list_moodle_1 = [
( B, 10*cm ),
( H, 8*cm ),
( b, 2*cm ),
( h, 2*cm ),
]
sub_list_moodle_2 = [
( B, 9*cm ),
( H, 10*cm ),
( b, 3*cm ),
( h, 2*cm ),
]
sub_list = sub_list_tm
# sub_list = sub_list_moodle_1
# sub_list = sub_list_moodle_2
elif task == "2.4.4.J":
prec = 1
# b B b
# +-------+---------------------+-------+
#
# y <---+
# 4 3
# + +-----------------------------+ +
# | | | |
# | | +-----------+ +-------+ 2 v z
# | | | D A | | 1=9
# | | | | |
# H | | | | |
# | | | | |
# | 5 | | C B | |
# | 6 +-------+ +-----------+ |
# | | |
# + +-----------------------------+
# 7 8
#
pts = [
# Outside = counterclockwise:
( 0, t ), # 1
( -b, t ), # 2
( -b, 0 ), # 3
( B, 0 ), # 4
( B, H-t ), # 5
( B+b, H-t ), # 6
( B+b, H ), # 7
( 0, H ), # 8
( 0, t ), # 9=1
# Inside = clockwise:
( t, t ), # A
( t, H-t ), # B
( B-t, H-t ), # C
( B-t, t ), # D
# The polygon is always closed
# using the very first point.
# Last edge D-1 is correct.
]
sub_list = [
( B, 20*mm ),
( H, 20*mm ),
( b, 10*mm ),
( t, 2*mm ),
]
elif task == "2.4.4.K":
prec = 1
hb = half*b
ht = half*t
hh = half*h
# b
# +-----------------------+
#
# y <---+
# .
# 2 | 1=9
# +-----------------------+ +
# | | | |
# + | . | t | +
# | | 4 | 7 | | |
# | +-------+ . +-------+ + v z
# | 3 | | | 8
# | | . |
# h | | | |
# | | . |
# | | | |
# | | . |
# | | | |
# + 5 +-------+ 6
# |
#
# t
# +-------+
pts = [
# Outside = counterclockwise:
( -hb , -ht ), # 1
( hb , -ht ), # 2
( hb , ht ), # 3
( ht , ht ), # 4
( ht , h ), # 5
( -ht , h ), # 6
( -ht , ht ), # 7
( -hb , ht ), # 8
( -hb , -ht ), # 1=9
]
sub_list = [
( h, 3*cm ),
( b, 2*cm ),
( t, S(1)/4*cm ),
]
elif task == "test":
prec = 1
# B
# +---------------------+
#
# y <---+
#
# 2 1=5
# + +---------------------+ +
# | | | |
# | | +-----------+ | V z
# | | | D A | |
# | | | | |
# H | | | | |
# | | | | |
# | | | C B | |
# | | +-----------+ |
# | | |
# + +---------------------+
# 3 4
#
pts = [
# Outside = counterclockwise:
( 0, 0 ), # 1
( B, 0 ), # 2
( B, H ), # 3
( 0, H ), # 4
( 0, 0 ), # 5=1
# Inside = clockwise:
( t, t ), # A
( t, H-t ), # B
( B-t, H-t ), # C
( B-t, t ), # D
( t, t ), # A
# The polygon is always closed
# using the very first point. So
# that point A must be included.
# Last edge A-1 is correct.
]
sub_list = [
( B, 20*mm ),
( H, 20*mm ),
( t, 2*mm ),
]
elif task == "y-triangle":
#
# Triangle with one edge on the y-axis.
#
# y
# 2 = (y2, 0) +--------- <---+ 1 = (0,0)
# \ /|
# \ / v z
# \ /
# \ /
# \ /
# \ /
# \/ 3 = (y3, z3)
#
#
#
# Polygon Points:
pts = [
( 0, 0 ), # 1
( y2, 0 ), # 2
( y3, z3 ), # 3
# The polygon is always closed
# using the very first point.
# Last edge 3-1 is correct.
]
elif task == "z-triangle":
#
# Triangle with one edge on the z-axis.
#
# y
# <---+ 1 = (0,0)
# /|
# / v z
# / |
# / |
# / |
# / |
# 2 = (y2,z2) \ |
# \ |
# \ |
# \ |
# \ |
# \|
# + 3 = (0, z3)
# Polygon Points:
pts = [
( 0, 0 ), # 1
( y2, z2 ), # 2
( 0, z3 ), # 3
# The polygon is always closed
# using the very first point.
# Last edge 3-1 is correct.
]
elif task == "u-shape":
# a a a a
# +----+----+----+----+
#
# y <---+
#
# 6 5 2 1=9
# + +----+ +----+ +
# a | | | 4 3 | | |
# + | +---------+ | V z
# a | | |
# + +-------------------+
# 7 8
#
pts = [
# Outside = counterclockwise:
( 0, 0 ), # 1
( a, 0 ), # 2
( a, a ), # 3
( 3*a, a ), # 4
( 3*a, 0 ), # 5
( 4*a, 0 ), # 6
( 4*a, 2*a ), # 7
( 0, 2*a ), # 8
# The polygon is always closed
# using the very first point.
]
# zS:
# 7⋅a
# ───
# 6
# Iyy:
# 4
# 11⋅a
# ─────
# 6
# --- End of Input ---
y = [ y for y, z in pts ]
z = [ z for y, z in pts ]
def A_CG(y, z):
"""
Input:
Polygon corners.
Output:
Polygon Area: A
Polygon CG coords: dy, dz
Ref:
https://en.wikipedia.org/wiki/Polygon
"""
assert(len(y)==len(z))
npts = len(y)
A = 0
dy, dz = 0, 0
for i in range(npts):
k = i + 1
if k >= npts:
k-=npts
f = y[i]*z[k] - y[k]*z[i]
A += f
dy += ( y[i]+y[k] ) * f
dz += ( z[i]+z[k] ) * f
A /= 2
dy /= 6*A
dz /= 6*A
return (A, dy, dz)
def second_moments_of_area(y, z, wrt=None):
"""
Input:
Polygon corners.
Output:
Second Moments of Area (Iyy, Iyz, Izz).
Ref:
https://en.wikipedia.org/wiki/Second_moment_of_area#Any_polygon
https://en.wikipedia.org/wiki/Shoelace_formula
https://de.wikipedia.org/wiki/Gau%C3%9Fsche_Trapezformel
Excluded/TM-Themen/TM-2/
"""
assert(len(y)==len(z))
npts = len(y)
Iyy, Iyz, Izz = 0, 0, 0
for i in range(npts):
k = i + 1
if k >= npts:
k-=npts
yi, yk = y[i], y[k]
zi, zk = z[i], z[k]
f = yi*zk - yk*zi
fz = zi*zi + zi*zk + zk*zk
fy = yi*yi + yi*yk + yk*yk
fyz = yi*zk + 2*yi*zi + 2*yk*zk + yk*zi
Iyy += f*fz
Iyz += f*fyz
Izz += f*fy
Iyy /= 12
Iyz /= -24
Izz /= 12
if wrt=="CG":
# Parallel Axis Theorem:
(A, dy, dz) = A_CG(y, z)
Iyy -= dz*dz*A
Iyz -= -dy*dz*A
Izz -= dy*dy*A
Iyy = Iyy.simplify()
Iyz = Iyz.simplify()
Izz = Izz.simplify()
return (Iyy, Iyz, Izz)
# Iyy, Iyz, Izz) wrt CG:
moms = second_moments_of_area(y,z, wrt="CG")
Adydz = A_CG(y, z)
if task == "2.4.1.D":
pprint("\n(Iyy, Iyz, Izz) / cm⁴:")
for x in moms:
printout(x, unit=cm**4, prec=2, sub_list=sub_list)
if task == "2.4.1.G":
pprint("\n(Iyy, Iyz, Izz) / cm⁴:")
for x in moms:
printout(x, unit=cm**4, prec="nil", sub_list=sub_list)
if task == "2.4.1.H":
pprint("\n(Iyy, Iyz, Izz) / cm⁴:")
for x in moms:
printout(x, unit=cm**4, prec="nil", sub_list=sub_list)
if task == "2.4.4.J":
pprint("\n(Iyy, Iyz, Izz) / cm⁴:")
for x in moms:
printout(x, unit=cm**4, prec=10, sub_list=sub_list)
exit()
Iyy, Iyz, Izz = moms[0], moms[1], moms[2]
My = symbols("My")
Mz = 0
pprint("\nΔ / mm⁸:")
Delta = Iyy*Izz-Iyz*Iyz
tmp = Delta
tmp = tmp.subs(sub_list)
pprint(tmp)
beta = My*Izz - Mz*Iyz
gama = Mz*Iyy - My*Iyz
def sigma(My, Mz, Iyy, Iyz, Izz, P):
y, z = P[0], P[1]
return (beta*z - gama*y)/Delta
pprint("\nm = z/y:")
def iso(My, Mz, Iyy, Iyz, Izz, s):
m = gama / beta
b = s*Delta / beta
return (m, b)
(m, b) = iso(My, Mz, Iyy, Iyz, Izz, 0)
m = m.subs(sub_list)
pprint(m)
P = (a/2, 2*a)
s = sigma(My, Mz, Iyy, Iyz, Izz, P)
s = s.subs(sub_list)
s /= My/a**3
tmp = sW
tmp = iso_round(s,3)
pprint(tmp)
if task == "2.4.4.K":
pprint("\nA:")
tmp = A_CG(y, z)[0]
printout(tmp, unit=1, prec="nil", sub_list=[])
printout(tmp, unit=cm**2, prec=2, sub_list=sub_list)
pprint("\nApprox. A:")
tmp = tmp.series(t, 0, 2)
tmp = tmp.removeO()
tmp = tmp.simplify()
printout(tmp, unit=1, prec="nil", sub_list=[])
pprint("\nApprox. A / cm²:")
printout(tmp, unit=cm**2, prec=2, sub_list=sub_list)
pprint("\nz-Pos. of CG:")
tmp = A_CG(y, z)[2]
printout(tmp, unit=1, prec="nil", sub_list=[])
printout(tmp, unit=cm, prec=2, sub_list=sub_list)
pprint("\nApprox. z-Pos. of CG:")
tmp = tmp.series(t, 0, 1)
tmp = tmp.removeO()
tmp = tmp.simplify()
printout(tmp, unit=1, prec="nil", sub_list=[])
pprint("\nApprox. z-Pos. of CG / cm:")
printout(tmp, unit=cm, prec=2, sub_list=sub_list)
pprint("\nIyy:")
tmp = moms[0]
tmp = tmp.simplify()
printout(tmp, unit=1, prec="nil", sub_list=[])
printout(tmp, unit=cm**4, prec=2, sub_list=sub_list)
pprint("\nApprox. Iyy:")
tmp = tmp.series(t, 0, 2)
tmp = tmp.expand()
tmp = tmp.removeO()
tmp = tmp.simplify()
pprint(tmp)
pprint("\nIyy / cm⁴:")
tmp = tmp.subs(sub_list)
tmp /= cm**4
tmp = iso_round(tmp, 2)
pprint(tmp)
if task == "test":
pprint("\n(Iyy, Iyz, Izz) / cm⁴:")
tmp = moms[0]
printout(tmp, unit=1, prec="nil", sub_list=[])
Iyy = B*H**3/12 - (B-2*t)*(H-2*t)**3/12
tmp = Iyy - moms[0]
tmp = tmp.simplify()
if (tmp == 0):
pprint("Correct.")
if task == "y-triangle":
pprint("\n(Iyy, Iyz, Izz) / cm⁴:")
for x in [moms[0],moms[1],moms[2]]:
printout(x, unit=1, prec="nil", sub_list=[])
if task == "z-triangle":
pprint("\n(Iyy, Iyz, Izz) / cm⁴:")
for x in [moms[0],moms[1],moms[2]]:
printout(x, unit=1, prec="nil", sub_list=[])
if task == "u-shape":
pprint("\nzS:")
pprint(Adydz[2])
pprint("\nIyy:")
pprint(moms[0])
[ ]: einfügen.▶ drücken.