When designing shaft keys we calculate compressive stress in hub/shaft/key and compare it with allowable stress. The usual formula is
$$p = \cfrac{F}{A} = \cfrac{\cfrac{M}{R}}{L_e \cdot t}$$
where $p$ is compressive stress, $M$ is applied torque, $R$ is shaft radius, $L_e$ is effective key length and $t$ is keyway depth. The $t$ can be sometimes replaced by $\frac{h}{2}$, where $h$ is key height.
I would like to try and calculate the force $F$ more precisely although it is not necessary because of other uncertainties and simplifications in the calculations making this still an approximation. It is just an exercise for fun and out of curiosity.
Using following formulas $F = \cfrac{M}{r}$, $\cfrac{F_x}{F} = \cfrac{R-y}{r}$, $r = \sqrt{(R-y)^2 + (0.5 \cdot b)^2}$ I derived formula for normal force $F_x$ acting on key's surface as a function of parameter $y$, where $y$ is distance from top of the shaft.
$$F_x(y) = \cfrac{M \cdot (R-y)}{(R-y)^2 + 0.25 \cdot b^2}$$
$$[F_x] = \cfrac{\textrm{N} \cdot \textrm{mm} \cdot (\textrm{mm} - \textrm{mm})}{(\textrm{mm} - \textrm{mm})^2 + 1 \cdot \textrm{mm}^2} = \cfrac{\textrm{N} \cdot \textrm{mm}^2}{\textrm{mm}^2} = \textrm{N}$$
Now I would like to calculate the compressive stress $p$ with my newly defined normal force $F_x(y)$ but I do not know how to sum the force or what value of parameter $y$ I should choose.
The questions are:
- Is my approach correct?
- Can I get a single force value, something like $F_{total}$ with its position $y_{final}$? Can I use it to calculate $p$?
- What value of parameter $y$ I should choose for the compressive stress calculation?
I feel like questions 2 and 3 are dependent on each other. I was thinking about somehow summing the force from $y_1$ to $y_2$ with some form of integral. I know I can calculate total force when given a distributed load $q(x)$ by using formula $F = \int_{a}^{b}{q(x)dx}$. The position of said force would be in the centroid of the distribution graph. The problem is that $F_x(y)$ is not distributed load just by looking at the units ($\textrm{N}$ instead of $\textrm{N/mm}$). Maybe I could go straight for the compressive stress $p$ and avoid my current force problem or maybe I am misunderstanding the whole problem?
EDIT 1:
I did the calculations with some numbers using the usual simple formula and NMech's approach and I got different results ($\approx$ one order of magnitude). Symbolic and numerical integration was done using online tool Integral Calculator. Given $M = 10^5 \mathrm{\,Nmm}$, $R = 17.5 \mathrm{\,mm}$, $b = 10 \mathrm{\,mm}$, $L_e = 15 \mathrm{\,mm}$, $y_2 = t = 4.7 \mathrm{\,mm}$.
$$y_1 = R - \sqrt{R^2 - (0.5\,b)^2} = 17.5 - \sqrt{17.5^2 - (0.5 \cdot 10)^2} = 0.73 \mathrm{\,mm}$$
Approach 1: Using the usual simple formula.
$$F = F_x = \frac{M}{R} = \frac{10^5}{17.5} = \mathbf{5\,714.286} \mathrm{\,N}$$
Approach 2: Using $I_p$ with outer shaft diameter $r = R$, integrating $dF(y)$.
$$I_p = \frac{\pi R^4}{2} = \frac{\pi \cdot 17.5^4}{2} = 147\,324 \mathrm{\,mm}^4$$
Here I don't know what to do with the expression $\ln(\mathrm{mm}^2)$. If it was equal to $1$, then the final unit would be $\mathrm{N}$, which would make sense. From my quick Google search it seems that we should only take logarithm of dimensionless quantity (1), (2).
$$% F = % \int_{0.73}^{4.7}{\frac{10^5 \cdot 15}{147\,324} \sqrt{(17.5 - y)^2 + (0.5 \cdot 10)^2} dy} \approx % \mathbf{631.051} \mathrm{\,N} $$
Approach 3: Substituting $I_p$ with $\frac{\pi \cdot r^4}{2}$ and then $r$ with $\sqrt{(R-y)^2 + (0.5 \cdot b)^2}$, integrating $dF(y)$.
$$ F(y) = % \int{\frac{2 \, L_e M}{{\pi}} \cdot \left(\left(R - y\right)^2 + (0.5 \, b)^2\right)^{-\frac{3}{2}}dy} = % \frac{16 \, L_e M \cdot \left(y-R\right)}{\pi b^3 \sqrt{\frac{4 \, \left(y - R\right)^2}{b^2}+1}} + C$$
$$[F(y)] = % \frac{1 \cdot \mathrm{mm} \cdot \mathrm{N} \cdot \mathrm{mm} \cdot\left(\mathrm{mm} - \mathrm{mm}\right)}{1 \cdot \mathrm{mm}^3\sqrt{\frac{1 \cdot \left(\mathrm{mm} - \mathrm{mm}\right)^2}{\mathrm{mm}^2}+1}} = % \frac{\mathrm{N} \cdot \mathrm{mm}^3}{\mathrm{mm}^3} = % \mathrm{N} $$
$$F = \int_{0.73}^{4.7}{\frac{2 \cdot 15 \cdot 10^5}{{\pi}\cdot\left(\left(17.5-y\right)^2+\frac{10^2}{4}\right)^\frac{3}{2}}} \approx \mathbf{1\,025.790} \mathrm{\,N}$$
Approach 4: Similar to #2, integrating $dF_x(y) = dF(y) \frac{R - y}{r(y)}$.
$$ \newcommand{\mm}{\mathrm{mm}} \newcommand{\N}{\mathrm{N}} F_x(y) = % \int{\frac{L_e M \cdot \left(R - y\right)}{I_p}} = % \frac{L_e M y \cdot \left(2 \, R - y\right)}{2 \, I_p} + C $$
$$ [F_x(y)] = % \frac{\mm \cdot \N \cdot \mm \cdot \mm \cdot \left(1 \cdot \mm - \mm\right)}{1 \cdot \mm^4} = % \frac{\N \cdot \mm^4}{\mm^4} = % \N $$
$$ F_x = % \int_{0.73}^{4.7}{\frac{15 \cdot 10^5 \cdot \left(17.5 - y\right)}{147\,324}} \approx % \mathbf{597.626} \mathrm{\,N} $$
Approach 5: Similar to #3, integrating $dF_x(y) = dF(y) \frac{R - y}{r(y)}$.
$$ F_x(y) = % \int{\frac{2 \, L_e M \cdot \left(R - y\right)}{{\pi} \cdot \left(\left(R - y\right)^2 + (0.5 \, b)^2\right)^2}} = % \frac{L_e M}{{\pi} \cdot \left(\left(R - y\right)^2 + (0.5 \, b)^2\right)} + C $$
$$ [F_x(y)] = % \frac{\mm \cdot \N \cdot \mm}{1 \cdot \left(\left(\mm - \mm\right)^2 + (1 \cdot \mm)^2\right)} = % \frac{\N \cdot \mm^2}{\mm^2} = % \N $$
$$ F_x = % \int_{0.73}^{4.7}{\frac{2 \cdot 15 \cdot 10^5 \cdot \left(17.5 - y\right)}{{\pi} \cdot \left(\left(17.5 - y\right)^2 + (0.5 \cdot 10)^2\right)^2}} \approx % \mathbf{969.253} \mathrm{\,N} $$
Result from approach #4 is smaller than result from #2, same with #5 and #3. This is to be expected because $F_x$ is a projection of the total force $F$ onto the x-axis. What staggers me is the huge difference between #1 and other approaches. I though the final force could be somewhere in the interval $F \in \langle4000, 8000\rangle \mathrm{\,N}$. Should I have expected these results or is there something wrong?