[PYTHON] Formulas and functions (updated as appropriate)

Here is a summary of the formulas used in mechanical design. The formula is written in latex so you can copy it. Also, expressions and parameters are written in python, so they can be used. I also want a picture

Bolt torque and axial force calculation

T=\frac{F}{2}(\frac{d_2}{\cos \alpha}\mu_{s}+\frac{P}{\pi}+d_{W} \mu_{W})
F=\frac{2T}{\frac{d_2}{\cos \alpha}\mu_{s}+\frac{P}{\pi}+d_{W} \mu_{W}}
d_{W} = \frac{2(d_0^3-d_h^3)}{3(d_0^2-d_h^2)}

jikuryoku.py


paramater_dict= paramater_dict= {
    'F':['Bolt axial force','N'],
    'P':['pitch','mm'],
    'T':['torque','N ・ mm'],
    'd2':['Effective diameter of screw','mm'],
    'dW':['Equivalent friction diameter','mm'],
    'α':['Half-width thread (usually 30 °)','°'],
    'μW':['Seat friction coefficient',''],
    'μs':['Coefficient of friction on threaded surface',''],
    'd0':['Bolt bearing surface outer diameter','mm'],
    'dW':['Equivalent friction diameter','mm'],
    'dh':['Bolt hole diameter','mm']
    }

import math
F = 10
P = 10
d2 = 10
dW = 10
α = 30
μW = 10
μs = 10
d0 = 15
dh = 12

T=F/2*(d2/math.cos(math.radians(α))*μs+P/math.pi+dW*μW)
F=2*T/(d2/math.cos(math.radians(α))*μs+P/math.pi+dW*μW)
dW=(2*(d0**3-dh**3))/(3*(d0**2-dh**2))
print(T)
print(F)
print(dW)

Bending the beam

Simple support distributed load

image.png

M_{\max }=\frac{w l^{2}}{8}
\delta_{\max }=\frac{5 w l^{4}}{384 E I}

mage_1.py


paramater_dict= {
    'Mmax':['Maximum bending stress','MPa'],
    'l':['Beam length','mm'],
    'w':['Distributed load','N/mm'],
    'E':['Young's modulus','MPa'],
    'I':['Moment of inertia of area','mm4'],
    'δmax':['Maximum amount of deflection','mm']
    }

l = 200
w = 15
E = 200
I = 10000

Mmax=(w*l**2)/8
δmax=(5*w*l**4)/(384*E*I)
print(Mmax)
print(δmax)

Radiant heat transfer

q=\varepsilon \cdot E_{G} \cdot \sigma A (T_{1}^{4}-T_{2}^{4})

radio.py


paramater_dict= {
    'A':['area','m2'],
    'EG':['View Factor',''],
    'T1':['High temperature side temperature','K'],
    'T2':['Low temperature side temperature','K'],
    'q':['Heat transfer amount','W'],
    'ε':['Emissivity',''],
    'σ':['Stephan-Boltzmann's coefficient','W/m2 ・ K4'],
    }

A = 1
EG = 1
T1 = 1273
T2 = 273
# q = 
ε = 0.9
σ = 5.669*10**-8 #constant

q=ε*EG*σ*A*(T1**4-T2**4)
print(q)

Thermal stress generated by thermal shock (infinite plate)

In the case of quenching (in the case of quenching, the maximum tensile stress is on the surface, so it is severe) In the case of rapid heating, the maximum tensile stress is generated inside, so there is a margin from the following formula.

Exhibitor: https://www.jstage.jst.go.jp/article/jsms1963/32/357/32_357_683/_pdf

\sigma=\frac{E \alpha \Delta T}{1-\nu} \cdot \frac{1}{1.5+3.25 / \beta-0.5 \exp (-16 / \beta)}

thermal_shock.py


import math
paramater_dict= {
    'E':['Young's modulus','MPa'],
    'ΔT':['Inside and outside temperature difference','K'],
    'α':['Coefficient of linear expansion','/K'],
    'β':['Biot number',''],
    'ν':['Poisson's ratio',''],
    'σ':['Thermal stress','MPa'],
    }

E = 200
ΔT = 10
α = 0.00005
β = 2
ν = 0.3

σ=(E*α*ΔT)/(1-ν)*1/(1.5+3.25/β-0.5*math.exp(-16/β))
print(σ)

Biot number

\beta=\frac{b h}{k}

bio.py


paramater_dict= {
    'b':['Representative length(Plate thickness)','m'],
    'h':['Heat transfer coefficient','W/m2K'],
    'k':['Thermal conductivity','W/mK'],
    'β':['Biot number',''],
    }

b = 0.005
h = 500
k = 5

β=(b*h)/(k)
print(β)

Formula used for heat transfer

Thermal analysis (CAE) contact conditions

Formula for calculating contact conditions (contact heat transfer coefficient) for thermal analysis (CAE)

--Contact conditions when there is surface pressure (when connected with bolts, etc., Tachibana's formula) keyword: Contact thermal resistance Tachibana's formula Thermal contact conductance Contact heat transfer coefficient

Please note that there is a wide range of applications! (0.5 <P <10 MPa) $ \mathrm{K}=\frac{1.7 \times 10^{5}}{\frac{\delta_{1}+\delta_{0}}{\lambda_{1}}+\frac{\delta_{2}+\delta_{0}}{\lambda_{2}}} \times \frac{0.6 \mathrm{P}}{\mathrm{H}}+\frac{10^{6} \lambda_{\mathrm{f}}}{\delta_{1}+\delta_{2}} $

Contact_Conductance.py


paramater_dict= {
    "K":["Contact heat transfer coefficient of the contact part","W/m2K"],#Input this value to thermal analysis as a contact condition
    "δ1":["Surface roughness of material 1","μm"],#Ra :Centerline average roughness
    "δ2":["Surface roughness of material 2","μm"],#Ra :Centerline average roughness
    "λ1":["Thermal conductivity of material 1","W/mK"],
    "λ2":["Thermal conductivity of material 2","W/mK"],
    "λf":["Thermal conductivity of intermaterial material","W/mK"],#Air etc.
    "P":["Pressing pressure on the contact surface","MPa"],#Surface pressure due to bolt fastening, etc.
    "H":["Vickers hardness of the softer material","kg/mm"],#Materials that are easily crushed adhere to each other, so heat is transferred.
    "δ0":["Equivalent contact length(constant)","μm"]
    }

δ1 = 32
δ2 = 32
λ1 = 398#copper
λ2 = 398#copper
λf = 0.0241#air
P = 1
H = 80#copper

δ0=23 #Is a constant(0.5<P<10MPa)
K = 1.7*10**5/((δ1+δ0)/λ1+(δ2+δ0)/λ2)*0.6*P/H +10**6*λf/(δ1+δ2)

--Contact heat transfer coefficient of the gap This is an equation to find the normal contact heat transfer coefficient. Natural convection needs to be considered depending on the size of the gap

hs = \frac{10^{6} \lambda_{\mathrm{f}}}{\delta}

Conductance.py


paramater_dict= {
    "h":["Contact heat transfer coefficient","W/m2K"],
    "λf":["Thermal conductivity of the substance that fills the gap","W/mK"],#Air etc.
    "δ":["Equivalent contact length","μm"]
    }
λf = 0.0241#air
δ = 50
h = 10**6*λf/δ

Recommended Posts

Formulas and functions (updated as appropriate)
Higher-order functions and decorators
Anonymous and map functions
Automatic follow and random tweets as some functions of bot
Python 3 sorted and comparison functions
Class inheritance and super functions
Python higher-order functions and comprehensions
[Notes / Updated from time to time] This and that of Azure Functions
[Updated as appropriate] I tried to organize the basic visualization methods