# *********** Calculate shear strain and axial force of an I-profile from axial Strain. ch1: Strain in m/m **************
# Strain measured by strain gauge
# Output x1 is the shear strain in m/m and x3 is the force in N
# Usage: - make sure ch1 measures the strain in m/m, correctly parametrized. May change ch1 in formula below to other input channel.
# -Set the parameters constE, constV, constB and constH1 (don't erase the ; at the line end). Run the script.
# ******************************************************************************************
# Berechnet Axialkraft und Querdehnung eines I-Profils aus der Lngsdehung
# x1 ist die Querdehnung in m/m, x3 das Drehmoment in N
# 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 und constH1 (nicht das ; lschen).

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

# elastic modulus of the tube material / Elastizittsmodul des Rohrmaterials
constE= 73000;
# 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 strain in m*10^-6/m / Ausgang x1: Querdehnung in m*10^-6/m
# $t_strain = -1 * $strain * $pr;
x1= ch1 * -1 * constV;

#x2: force in N / Axialkraft in N
#$area = ($h1 - $h2) * $b1 + $ts * $h2;
x2= ch1 * constE * ((constH1-constH2)*constB+(constTs*constH2)) *1.0E-6;