# *********** Calculate shear force and shear stress of an I-profile from Strain. ch1: Strain in m/m **************
# Strain measured by strain gauge, whose strain gauge is sesitive in 45 angle to the axis
# Output x1 is the shear stress and x3 is the shear force.
# Usage: - make sure ch1 measures the strainin m/m, correctly parametrized. May change ch1 in formula below to other input channel.
# -Set the parameters constE, constV, constB, constH1, constH2 and constTs (don't erase the ; at the line end). Run the script.
# ******************************************************************************************
# Berechnet Querkraft und Schubspannung eines I-Profils aus der Dehnung eines DMS, dessen Messgitter im Winkel
# von 45 zur Lngsachse liegt und in der Mitte angebracht ist
# x1 ist die Schubspannung, x3 das Querkraft
# Verwendung: Stellen Sie sicher, dass ch1 die Dehnung in m/m korrekt misst. GGf. zu anderem Eingangskanal ndern (ch2 usw).
# - Setzen Sie die Parameter constE, constV, constB, constH1, constH2 und constTs (nicht das ; lschen).

# https://www.me-systeme.de/de/support/kalkulator/drehmoment2

# constE: elastic modulus of the tube material / Elastizittsmodul des Rohrmaterials
constE= 73000;
# constV: poissons ratio of the tube material / relatives Querkontraktions-Modul des Rohrmaterials
constV= 0.34;
# constB: width in mm / Breite in mm
constB= 100;
# constH1: heighth in mm / Hhe in mm
constH1= 200;
#constH2: inner height in mm / Innere Hhe in mm
constH2= 140;
#constTs: thickness in mm / Dicke des Mittestegs in mm
constTs=10;

# Output x1: shear stress in N/mm / Ausgang x1: Schubspannung in N/mm
x1= ((constE/2) /(1+constV))*ch1*2.0E-6;

#x2 Axiales-Flaechenmoment Iy $iy_mm = $b1 *$h1**3 / 12 - ($b1 - $ts) * $h2**3 / 12;
x2= constB*(constH1^3)/12 - ((constB-constTs)*(constH2^3)/12);
#x3: shear force / Querkraft
x3= (x1*x2) / ((constB*(constH1+constH2)/4 * (constH1-constH2)/(2*constTs))+((constH2^2)/8));
