BriefFiniteElementNet / BriefFiniteElement.Net

BriefFiniteElementDotNET (BFE.NET) is a library for linear-static Finite Element Method (FEM) analysis of solids and structures in .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GetInternalForce Bending Moment and Shear Force Method for TriangleElements

MLiranzo opened this issue · comments

Hi eps1on,
Somewhere in the instructions it refers to the "GetInternalForce" method for Triangular elements, my question is:
Is there a GetInternalForce method to obtain bending moments and shear forces for triangular elements? .

Is there a way to determine the quality of shell stress results in a particular project without the need to use other software to check results?

It is mandatory to transform the units of my project to the units that have been used in most examples or I can directly use my units.

Hi eps1on, Somewhere in the instructions it refers to the "GetInternalForce" method for Triangular elements, my question is: Is there a GetInternalForce method to obtain bending moments and shear forces for triangular elements? .

yes, as far as remember there is such method. note that input of that method, you should define the isoparametric location. third iso location is in thickness direction, i.e. 0 : center of thickness, +1.0: top surface and `-1:buttom surface'

Is there a way to determine the quality of shell stress results in a particular project without the need to use other software to check results?

I think you must have some knowledge about strength of materials. There are no pre-built method with boolean output that can tell you will the element behold under loads or not. There are several methods for that I think...

It is mandatory to transform the units of my project to the units that have been used in most examples or I can directly use my units.

Not sure...

Hi eps1on,
Thanks for your quick response, I've been looking for the GetInternalForce method for triangle elements and I can't find it, if you could indicate it and what namespace it is in.

In ancient times, when I studied engineering we were taught that in finite elements if several elements share knots, these knots would have approximate results and their approximation marked the quality of the discretization, the results of my project the common knots differ a lot.

Greetings.
MLiranzo.

Hi

In ancient times, when I studied engineering we were taught that in finite elements if several elements share knots, these knots would have approximate results and their approximation marked the quality of the discretization, the results of my project the common knots differ a lot.

Can you please give more description on what you mean and what happened?

Yes i think the FEM solution is approximate, I suggest you to do compare output of BFE with other well known software such as ansys etc. If models are identical (by model I mean materials and element types), then the result should be identical too (say at most 1% difference) otherwise there is probably something missing or there is a bug within either software of BFE itself.

Hi epsilon,
Okay. Thanks.
What namespace is GetInternalForce in for triangle elements?
Greetings.
MLiranzo.

TriangleElement's internal force:

public CauchyStressTensor GetLocalInternalStress(LoadCase loadCase, params double[] isoLocation)

Thanks eps1on, I am a bit confused because the GetLocalInternalStress(LoadCase.DefaultLoadCase, isoLocation) method is returning InternalStress and I would like to get the internal forces (bending moments and shear forces).

Thanks eps1on, I am a bit confused because the GetLocalInternalStress(LoadCase.DefaultLoadCase, isoLocation) method is returning InternalStress and I would like to get the internal forces (bending moments and shear forces).

AFAIK there is no internal force for triangle element (at least theorically). There is just stress tensor.

Hi eps1on,
Although the equations of the mechanics of materials do not express it explicitly, the shear force in a section of a plate is expressed by adding the stress values ​​S12 or S21 of the triangular elements that coincide with the selected section, dividing these forces by the sum of distance between integration points 0 and 1 of each triangular element. Namely:

F = Sum(TriangleElement[k].Node[0].S12 + TriangleElement[k].Node[1].S12) / (TriangleElement[k].Node[1] - TriangleElement[k].Node[0]) in which:
TriangleElement[k].Node[0].S12 is the stress of the nodes of the TriangleElement that coincide with the considered section
TriangleElement[k].Node[1] - TriangleElement[k].Node[0] is the distance between nodes of the TriangleElements

In the same way, the axial force is the sum of the stresses S22 divided by the distance between integration nodes 0 and 1 in the nodes of the triangular elements that coincide.

Bending moments relate the above forces to any selected point on the plate. These are rustic expressions to explain ideas.

Can you please show your idea with some drawing or visualization?
Thanks

Hi epsi1on,
In the next page I will try to show my idea. Sorry if i was not explicit.
modelo placa.pdf

Greetings.

Thanks for visualization. I've readed carefully. just cannot understand how this formula is derived ( I mean the theory behind it). Can you please give more information on how this formula is derived? or what is the usage of its result F?

F = Sum(TriangleElement[k].Node[0].S12 + TriangleElement[k].Node[1].S12) / (TriangleElement[k].Node[1] - TriangleElement[k].Node[0])

Hi eps1on,
My idea is based on several well-known concepts in the mechanics of materials, I try to convert stress into force through the area of the section, dealing with plate elements, the force would be in a unit of forces over a unit of length (example: kg/m, N/m, etc). The sum of the stresses of the node[0] plus node[0] represents the resultant of various forces. I am starting from the Stress-Area-Force relationship of the Mechanics of Materials

Force (F)=Sum(TriangleElement[k].Node[0].S12 + TriangleElement[k].Node[1].S12)
Length(L) = TriangleElement[k].Node[1].Location - TriangleElement[k].Node[0].Location

F = F/L
The idea may need to be discussed and studied by forum members.

Hi eps1on, My idea is based on several well-known concepts in the mechanics of materials, I try to convert stress into force through the area of the section, dealing with plate elements, the force would be in a unit of forces over a unit of length (example: kg/m, N/m, etc). The sum of the stresses of the node[0] plus node[0] represents the resultant of various forces. I am starting from the Stress-Area-Force relationship of the Mechanics of Materials

Force (F)=Sum(TriangleElement[k].Node[0].S12 + TriangleElement[k].Node[1].S12) Length(L) = TriangleElement[k].Node[1].Location - TriangleElement[k].Node[0].Location

F = F/L The idea may need to be discussed and studied by forum members.

Not sure if this formulation/idea works correctly. I think it needs to be tested...

Hi eps1on,
In any case, there is also the fundamental law of structural engineering: F = k.X, I understand that the rigidity matrix of the triangular elements exists and after analyzing it, the displacement vector is obtained, I think it is possible to obtain the force vector.

Hi eps1on, In any case, there is also the fundamental law of structural engineering: F = k.X, I understand that the rigidity matrix of the triangular elements exists and after analyzing it, the displacement vector is obtained, I think it is possible to obtain the force vector.

Yes, I think that would work perfectly. Smart idea. Let's implement it

I've found this from earlier codes, it implements the idea of multiply K with displacement vector.
Just, @MLiranzo can you please help me to add some documentation for this methods?
Several lines of description about the theory of this idea.

Thanks


        /// <summary>
        /// If target plane cuts the element into two parts, 
        /// returns the internal force of element if an infinite plane with defined normal and point cuts the element
        /// the force that is applied to positive side (same side and normal)
        /// </summary>
        /// <param name="elm">target element</param>
        /// <param name="normal"></param>
        /// <param name="p"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public static Force GetCrossingForce(this Element elm, Vector normal, Point p, LoadCombination cmb, Point targePoint)
        {
            var n = elm.Nodes.Length;
            Force[] forces;//external force applied to each node, cause the displacement occured
            var nodes=new Point[n];
            
            //calculate forces
            {
                var K = elm.GetGlobalStifnessMatrix();
                
                var d = new Matrix(6 * n, 1);

                for (var i = 0; i < n; i++)
                    nodes[i] = elm.Nodes[i].Location;

                for (var i = 0; i < n; i++)
                {
                    var di = elm.Nodes[i].GetNodalDisplacement(cmb);
                    var vdi = Displacement.ToVector(di);

                    for (var j = 0; j < 6; j++)
                        d[6 * i + j, 0] = vdi[j];
                }

                var f = K * d;

                forces = new Force[n];

                for (var i = 0; i < n; i++)
                {
                    forces[i] = Force.FromVector(f.Values, 6 * i);
                }
            }

            var sides = new int[n];//each node in which side?

            //calculates each node is in which side of plane
            {
                for (var i = 0; i < n; i++)
                {
                    var pi = nodes[i];

                    var res = normal.X * (pi.X - p.X) + normal.Y * (pi.Y - p.Y) + normal.Z * (pi.Z - p.Z);

                    sides[i] = Math.Sign(res);
                }
            }


            var buf = Force.Zero;

            //move nodal force in positive side into target point
            {
                for (var i = 0; i < n; i++)
                {
                    if (sides[i] > 0)
                        buf += forces[i].Move(elm.Nodes[i].Location, targePoint);
                }
            }

            return buf;
        }

        /// <summary>
        /// If target plane cuts the element into two parts, 
        /// returns the internal force of element if an infinite plane with defined normal and point cuts the element
        /// the force that is applied to positive side (same side and normal)
        /// </summary>
        /// <param name="elm"></param>
        /// <param name="normal"></param>
        /// <param name="p"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public static Force GetCrossingForce(this Element elm, int[] nods, LoadCombination cmb, Point targePoint)
        {
            var n = elm.Nodes.Length;
            Force[] forces;//external force applied to each node, cause the displacement occured
            var nodes = new Point[n];

            //calculate forces
            {
                var K = elm.GetGlobalStifnessMatrix();

                var d = new Matrix(6 * n, 1);

                for (var i = 0; i < n; i++)
                    nodes[i] = elm.Nodes[i].Location;

                for (var i = 0; i < n; i++)
                {
                    var di = elm.Nodes[i].GetNodalDisplacement(cmb);
                    var vdi = Displacement.ToVector(di);

                    for (var j = 0; j < 6; j++)
                        d[6 * i + j, 0] = vdi[j];
                }

                var f = K * d;

                forces = new Force[n];

                for (var i = 0; i < n; i++)
                {
                    forces[i] = Force.FromVector(f.Values, 6 * i);
                }
            }

            var sides = new int[n];//each node in which side?

            //calculates each node is in which side of plane
            {
                for (var i = 0; i < n; i++)
                {
                    if (nods.Contains(i))
                        sides[i] = +1;
                    else
                        sides[i] = -1;
                }
            }


            var buf = Force.Zero;

            //move nodal force in positive side into target point
            {
                for (var i = 0; i < n; i++)
                {
                    if (sides[i] > 0)
                        buf += forces[i].Move(elm.Nodes[i].Location, targePoint);
                }
            }

            return buf;
        }

Hi epsi1on.
Brief Note:

If the equilibrium equations of all the union nodes between all the elements are considered jointly, a set of equations is obtained that represents the equilibrium of the entire structure. These equations are obtained by assembling the equilibrium equations of the different finite elements that form it, in the form: Ue Keξe = Ue Pe
Ue: Indicate the assembly of the different magnitudes according to the degrees of freedom of the structure.
Ke : Stiffness matrix of the elements
ξe : Nodal Strain Matrix
Pe: Equivalent Nodal Forces from different sources
All this leads to the equation: K∆ = F : Global equilibrium equation
Regardless of the source of the loads, this must be converted into nodal forces.

Hi epsi1on,
Excuse me if I am raining on wet on the subject of triangle elements. The methods to determine internal forces that you kindly added at my request I could not implement it and I would like to ask you if possible, add a commit updating where these methods are included.

Thanks.
Greeting
M. Liranzo

added in db8974a
Also please note there are some difficulties with building the source in visual studio lower than 2022, check here for more info.
I have no VS 2022 at the time (which is needed for making nuget packages), as soon an install, will update the nuget packages

Hello epsi1on,
Thank you for your timely response.
In order to implement the method I need to know several things:

  • The parameter Point p, to which of the points of the triangle it refers to.
  • The parameter targetPoint, to which point it refers.
    -What is the approach of the method is of the type.
    var Force = el.getCrossingForce(...) or could you give me an example.

Thanks in advance.

Hello epsi1on, Thank you for your timely response. In order to implement the method I need to know several things:

* The parameter Point p, to which of the points of the triangle it refers to.

* The parameter targetPoint, to which point it refers.
  -What is the approach of the method is of the type.
  var Force = el.getCrossingForce(...) or could you give me an example.

Thanks in advance.

Yes, the Vector normal, Point p parameters are defining the plane which cuts the element. (a plane can be defined have a normal vector, and point p which lie on the plane).

point p is target point. because the moments cannot be added together unless they are applied to same point. so it means if you cut the element with a plane (defined above) then you have a half element :) there is some stress distribution on the cuted surface, this method cannot determine the stress distribution, but the integration of the stress over cuted surface is the CrossingForce (that is why it called CROSSING force).
about target point, i would select it on the cut surface. different locations do not affect the force component, but they will affect the moments components. Let me know if it is not clear and i'll put some visualizations...

Thank you epsi1on,
The truth is that I am not very clear, I think that some visualizations could shed some light on the interesting method.

There are several steps for finding internal force of a say TriangleElement with this method. i mean GetCrossingForce() method does these steps (I think same thing as you suggested)

Step 1: Form the displacement vector for the elements, as element have 3 nodes and 6dof per node then there will be a 18x1 displacement vector (in global coord system). name it {D}
Step 2: Find the element stiffness matrix in gloal system (18 dof for triangle so will have a 18x18 stiffness matrix in global system) name it {K}
Step 3: multiply the {K} and {D} to find forces which is applied to connecting nodes from element. this is in global coord system. name it {F}. which is 18x1 vector.
Step 4: {F} vector determines the force which is applied to our element from connecting nodes. so we can consider the triangle element as a Free Body Diagram.

Step 5:
now if we cut this triangle with an artificial plane, then something like this will happen:

image

We know how much force is applied to C node, lets call it Fc in next. it have 3 force component and 3 moment components (it is 3d force). we can keep it in a variable of type 'Force` in the library.

At the cut section (i mean D-E line on the image) there is some stress distribution, which can be non-constant. but the result of (I mean the integration) of this stress distribution must satisfies the statically equilibrium of the top part of triangle (C-E-D part) . Am i right?
So it must have same force component as Fc but what about the moments? it if have same moment components, then it will not statically equilibrium. am I right? because opposite forces will make some coupling (moment). If you suspect then i suggest you to see this example:

image

Actually moment is depends on that what location do we want calculate the integration result. the target point p in the implemented method is this point. because the method cannot simply read user's mind :)
If instead of a triangle, we had a BarElement then target point was the only intersection of plane and element. because the result of intersection of a triangle and a plane is line, but intersection of traiangle and plane is a line segment.

Hello epsi1on,
Your explanation partly clarified my doubts, however, I still don't know the second parameter of the method, that is, Point p, since the triangle element has 3 nodes, do I have to iterate with each node of each triangle in the same way that the tensors are determined? . In the graph shown below, I present a two-story wall, if I want to determine the results of the forces at the point marked with x which coincides with the distance st1. What form will the implementation of the method take?

image

Thank.

Hello epsi1on, Your explanation partly clarified my doubts, however, I still don't know the second parameter of the method, that is, Point p, since the triangle element has 3 nodes, do I have to iterate with each node of each triangle in the same way that the tensors are determined? . In the graph shown below, I present a two-story wall, if I want to determine the results of the forces at the point marked with x which coincides with the distance st1. What form will the implementation of the method take?

image

Thank.

This is about theoretical part of FEM and strength of materials. Can you please describe, what force do you need at point marked P in the visualization? i think maybe you need shear force? if yes, what is cutting plane who cuts the elements? i.e. internal force of which elements do you need?

I need cutting forces at Node p, the line that divides the wall in two is the cutting plane or it is where the cutting plane passes through, in this case it coincides with the nodes N1 and N2 of the triangular elements shown.

I need cutting forces at Node p, the line that divides the wall in two is the cutting plane or it is where the cutting plane passes through, in this case it coincides with the nodes N1 and N2 of the triangular elements shown.

As I remember, there is one mathematical / theoretical restriction with cutting plane, and that is: it should not intersect with any nodes. But the middle blue line just intersects with 5 nodes. You need to move it 1cm higher or lower in order to bypass the theoretical restriction.
the blue line would be a plane in 3D. the normal to the plane is K unit vector (Vector.K as argument input to method)
also any 3D point point with Z=st1+2cm and arbitrary x and y (say for example x=y=0 would define your desired cutting plane.

I did some edits to the doc:

public static Force GetCrossingForce(this Element elm, Vector normal, Point p, LoadCombination cmb, Point targePoint)

        /// <param name="elm">target element</param>
        /// <param name="normal">Normal vector of cutting plane</param>
        /// <param name="p">A point on the cutting plane</param>
        /// <param name="targePoint">An arbitrary point on the cut surface</param>
        /// <returns>Crossing internal force</returns>
        public static Force GetCrossingForce(this Element elm, Vector normal, Point p, LoadCombination cmb, Point targePoint)

Hello epsi1on,
Thanks for your valuable explanation.

Hello epsi1on,
Thanks for your valuable explanation.

Hello epsi1on,
I think the method is not working as expected. The first question that I face is that, despite the fact that I changed the library to the last commit that you published, I changed the references, however, the parameters that it requests are from the previous version. I am dealing with the following code snippet.

List resultadosFuerzas = new List();
// Shear force in shell nodes
for (int k = 0; k < lstE.Count; k++) // iterate the combination list...
{
int w = 0;
foreach (Element TriaE in model.Elements)
{
if (!(TriaE is TriangleElement)) continue;
var el = (TriangleElement)TriaE;

                Force fuerzas = el.GetCrossingForce(BriefFiniteElementNet.Vector.K, new BriefFiniteElementNet.Point(0, 0, 2.63),
                    lstE[k], new BriefFiniteElementNet.Point(0, 0, 2.63));

                resultadosFuerzas.Add(el.Label + " , " + el.Nodes[0].Label + " , " + "COMB" + (k + 1)
                    + " , " + fuerzas.Fx + "," + fuerzas.Fy + " , " + fuerzas.Fz);
                resultadosFuerzas.Add(el.Label + " , " + el.Nodes[1].Label + " , " + "COMB" + (k + 1)
                    + " , " + fuerzas.Fx + "," + fuerzas.Fy + " , " + fuerzas.Fz);
                resultadosFuerzas.Add(el.Label + " , " + el.Nodes[2].Label + " , " + "COMB" + (k + 1)
                    + " , " + fuerzas.Fx + "," + fuerzas.Fy + " , " + fuerzas.Fz);
                w++;
            }
        }
        File.WriteAllLines(@"C:\Users\Marin\source\repos\AnalisisMamposteriaWPF - 04-9-2021\cortanteplacas.csv", resultadosFuerzas.ToArray());

Hello epsi1on, I think the method is not working as expected. The first question that I face is that, despite the fact that I changed the library to the last commit that you published, I changed the references, however, the parameters that it requests are from the previous version. I am dealing with the following code snippet.

List resultadosFuerzas = new List();
// Shear force in shell nodes
for (int k = 0; k < lstE.Count; k++) // iterate the combination list...
{
int w = 0;
foreach (Element TriaE in model.Elements)
{
if (!(TriaE is TriangleElement)) continue;
var el = (TriangleElement)TriaE;

                Force fuerzas = el.GetCrossingForce(BriefFiniteElementNet.Vector.K, new BriefFiniteElementNet.Point(0, 0, 2.63),
                    lstE[k], new BriefFiniteElementNet.Point(0, 0, 2.63));

                resultadosFuerzas.Add(el.Label + " , " + el.Nodes[0].Label + " , " + "COMB" + (k + 1)
                    + " , " + fuerzas.Fx + "," + fuerzas.Fy + " , " + fuerzas.Fz);
                resultadosFuerzas.Add(el.Label + " , " + el.Nodes[1].Label + " , " + "COMB" + (k + 1)
                    + " , " + fuerzas.Fx + "," + fuerzas.Fy + " , " + fuerzas.Fz);
                resultadosFuerzas.Add(el.Label + " , " + el.Nodes[2].Label + " , " + "COMB" + (k + 1)
                    + " , " + fuerzas.Fx + "," + fuerzas.Fy + " , " + fuerzas.Fz);
                w++;
            }
        }
        File.WriteAllLines(@"C:\Users\Marin\source\repos\AnalisisMamposteriaWPF - 04-9-2021\cortanteplacas.csv", resultadosFuerzas.ToArray());

Maybe you are using nuget package instead of source code. If yes, then I should update nuget package.

Thank epsi1on.

you are welcome

inactivity