Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations Danlap on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Integrating the shear stress of the cross sectional area to find the moment M? 1

famatto

Computer
Feb 10, 2025
3
So I had to put a scale factor so far of -8.66071e10, however it seems to be working... Anyone can tell me how to get things going without the scaling? It sounds like there is maybe a Jacobian to apply, maybe? So far the mesh can be exported with dolfinx 0.8.0... the rest of the code will run with just Python about 3.10+ should be fine...Attached are the Python files...

```
My = 0
for tensor in stress_tensors:
My+=tensor
print(My*-8.66071e10)

```

```
ci: 1624, ni: 0
ci: 1624, ni: 3
ci: 1624, ni: 4
ci: 1624, ni: 7
# So far meets the American Wood Council's estimate last I checked...
-3195.275291884474

```
 
Replies continue below

Recommended for you

huh? what?
are you talking about beam analysis? if so you integrate the shear down the length to get the moment distribution down the length
integrating the shear stress thru the thickness of the cross section is something else.

start over with a lot more details about what you are doing. and for cripe sakes, don't post or use numbers to absurd numbers of significant digits.
 
```
def strain(u):
return 0.5 * (ufl.grad(u) + ufl.grad(u).T)
epsilon = strain(u)
def stress(epsilon, mu, lambda_):
return 2 * mu * epsilon + lambda_ * ufl.tr(epsilon) * ufl.Identity(3)
sigma = stress(epsilon, mu, lambda_)

```

The above is how stress and strain are being described. u is a function used in conjunction with a functions space. It's possible to integrate the surface which represents the cross section of the cantilever beam at the free end. M = - (x_coord[2]) * sigma_xx * ds(1), where ds(1) in this case represents the surface to integrate over. I guess I shouldn't post my results... The M I have is minuscule and no place representative of what solid mechanics predicts so far.... I had attached script file but something had went wrong and they didn't make it into the posting for whatever reason. So x_coord[2], in this case [2] represents the z-axis which is "up" or "down" as a layman might know things...
 
You will get shear force of the section by integrating the shear stress of the cross sectional area
and you won't get moment.

If you want to get moment, you need to get shear force (diagram) along the member first, then you get moment diagram along the memeber by integrating shear forces, finally you can get moment at the section.
 
One thing lately I have a quandry. There are hermitian shape functions:

\begin{align*}
H_1(\xi) &= \frac{1}{4}\xi^3 - \frac{3}{4}\xi + \frac{1}{2} \\
H_2(\xi) &= \frac{1}{4}\xi^3 - \frac{1}{4}\xi^2 - \frac{1}{4}\xi + \frac{1}{4} \\
H_3(\xi) &= -\frac{1}{4}\xi^3 + \frac{3}{4}\xi + \frac{1}{2} \\
H_4(\xi) &= \frac{1}{4}\xi^3 + \frac{1}{4}\xi^2 - \frac{1}{4}\xi - \frac{1}{4}
\end{align*}
H_i(\eta) = H_i(\xi)\big|_{\xi=\eta}, \quad H_i(\zeta) = H_i(\xi)\big|_{\xi=\zeta}, \quad i=1,2,3,4
\begin{align*}
NH_1 &= H_1(\xi)H_1(\eta)H_1(\zeta) \\
RH_1 &= H_3(\xi)H_3(\eta)H_3(\zeta) \\
NH_2 &= H_2(\xi)H_1(\eta)H_1(\zeta) \\
RH_2 &= H_4(\xi)H_3(\eta)H_3(\zeta)
\end{align*}


So a K stiffness matrix can be built from this by constructing a B matrix and formulating a Guassian interpolation algorithm. So far the stress distribution looks OK... however a regularization parameter 1e7 needs to be used otherwise the stress distribution doesn't come out with adequate distribution according to what solid mechanics may predict...

So after regularization, the displacements are very small, I mean very much smaller than what solid mechanics should predict... I tried using different forms of conditioning such as LU decomposition, Jacobian, L2.... So far the use of 1e7 along the diagonal of K, works best in terms of producing a Von Mis Stress map that can be fit to real conditions....


One thing I am trying to do is determine, now that much is known, what to do now? Of course its best to have the right numbers come out right away without this need to fit things... So how to get there?

So then I found that there is an F, Jacobian from continuum mechanics that can be used to build a Green-lagrange to correct for large strain values and found that in terms of integrating a cross section, (nodes of it, the tensors from the nodes)... that the numbers do start to correspond in my particular case after correction... So the problem now becomes that as the strains become very small the 32-bit nature of the problem currently means only the portion of mesh where strains are large can be "seen" by the computations (they come up zero sometimes)... So at this point I have to switch to 64-bit and also start to see if I can get the whole mesh integrating for moment, M...

So I did have to add an upscaling to the shape functions Lagrange that build the Jacobian of 6.0-10.0 for the stress to start to look great.
 
Last edited:

Part and Inventory Search

Sponsor