BriefFiniteElementNet / BriefFiniteElement.Net

BriefFiniteElementDotNET (BFE.NET) is a library for linear-static Finite Element Method (FEM) analysis of solids and structures in .NET
https://www.bfe-framework.net
GNU Lesser General Public License v3.0
154 stars 58 forks source link

Result don't match hand calculations and SAP2000 results #79

Closed cmoha closed 4 years ago

cmoha commented 4 years ago

Describe the bug

Hello Dear, I have done some hand calculations and SAP2000 of examples given here and here and i don't get same results.

To Reproduce This is the code We've used and caused wrong result/ runtime error

        [Test]
        public void TestMethod3()
        {
            var model = new Model();

            var n0 = new Node(-10, 0, 0);
            var n1 = new Node(-10, 0, 6);
            var n2 = new Node(0, 0, 8);
            var n3 = new Node(10, 0, 6);
            var n4 = new Node(10, 0, 0);

            model.Nodes.Add(n0, n1, n2, n3, n4);
            n0.Constraints =n4.Constraints = Constraints.Fixed;

            var secAA = new Sections.UniformGeometric1DSection(SectionGenerator.GetISetion(0.24, 0.67, 0.01, 0.006));
            var secBB = new Sections.UniformGeometric1DSection(SectionGenerator.GetISetion(0.24, 0.52, 0.01, 0.006));
            var mat = Materials.UniformIsotropicMaterial.CreateFromYoungPoisson(210e9, 0.3);

            var e1 = new BarElement(n0, n1) { Material = mat, Section = secAA };
            var e2 = new BarElement(n1, n2) { Material = mat, Section = secBB };
            var e3 = new BarElement(n2, n3) { Material = mat, Section = secBB };
            var e4 = new BarElement(n3, n4) { Material = mat, Section = secAA };

            model.Elements.Add(e1, e2, e3, e4);

            var u1 = new Loads.UniformLoad(LoadCase.DefaultLoadCase, new Vector(0, 0, 1), -6000, CoordinationSystem.Global);
            var u2 = new Loads.UniformLoad(LoadCase.DefaultLoadCase, new Vector(0, 0, 1), -5000, CoordinationSystem.Local);

            e2.Loads.Add(u1);
            e3.Loads.Add(u2);

            model.Solve_MPC();

            var n4Force = n4.GetSupportReaction();
            Console.WriteLine("Support reaction of n4: {0}", n4Force);

        }

Expected behavior Results of this example are writen Support reaction of n4: F: -37514.9891729259, 0, 51261.532772234, M: 0, -97714.6039503916, 0 but SAP2000 gives me this result
Capture

epsi1on commented 4 years ago

Hi Thanks for details. We can fix it easily. First need to make sure we are using same model. This is same model as BFE example you mentioned, but uniform loads are removed, also a new load is applied on the n1 node:

image

output for such model in bfe is:

Can you please analyze this frame in SAP2000 and give me the support reactions output of model?

Thanks

cmoha commented 4 years ago

Good day dear,

Code used for generating your model is

 [Test]
        public void TestMethod4()
        {
            var model = new Model();

            var n0 = new Node(-10, 0, 0);
            var n1 = new Node(-10, 0, 6);
            var n2 = new Node(0, 0, 8);
            var n3 = new Node(10, 0, 6);
            var n4 = new Node(10, 0, 0);

            model.Nodes.Add(n0, n1, n2, n3, n4);
            n0.Constraints = n4.Constraints = Constraints.Fixed;

            var secAA = new Sections.UniformGeometric1DSection(SectionGenerator.GetISetion(0.24, 0.67, 0.01, 0.006));
            var secBB = new Sections.UniformGeometric1DSection(SectionGenerator.GetISetion(0.24, 0.52, 0.01, 0.006));
            var mat = Materials.UniformIsotropicMaterial.CreateFromYoungPoisson(210e9, 0.3);

            var e1 = new BarElement(n0, n1) { Material = mat, Section = secAA };
            var e2 = new BarElement(n1, n2) { Material = mat, Section = secBB };
            var e3 = new BarElement(n2, n3) { Material = mat, Section = secBB };
            var e4 = new BarElement(n3, n4) { Material = mat, Section = secAA };

            model.Elements.Add(e1, e2, e3, e4);

            n1.Loads.Add(new NodalLoad(new Force(5000, 0, 0, 0, 0, 0)));

            model.Solve_MPC();

            var n0Force = n0.GetSupportReaction();
            var n4Force = n4.GetSupportReaction();
            Console.WriteLine("Support reaction of n0: {0}", n0Force);
            Console.WriteLine("Support reaction of n4: {0}", n4Force);

results from unit test gave image

and my output is matching with your output

SAP2000 output gave me image

results are varying between 100.67% to 99.03%

epsi1on commented 4 years ago

I think for such simple model, there should be no error. So i think there is a difference in BFE model and SAP2000 model. Lets check the calculated value of sections.

Dimensions are in [m] and [Pa] Can you please check these values with your model in SAP2000?

Thanks

cmoha commented 4 years ago

Sorry for late reply, these are section properties and material data calculated from sap2000

image

image

image

epsi1on commented 4 years ago

Calculated geometric and mechanical properties are identical. But seems SAP2000 do not use EulerBernoully formulation for beam by default (have a look at here and here) but this library uses EulerBernoully beam formulation by default. SAP2000 uses a formulation like Timoshenko beam, and maybe the 1% difference is because of that. Can you please set the shear property modifiers of section to zero and check the result again? like what is said in above two links . that way results will be identical I think... Thanks

epsi1on commented 4 years ago

Hi, Did you check by setting shear property modifiers to zero? That way they should give identical result.

cmoha commented 4 years ago

Hi, Yes I have rechecked these parameters and they are now the same values, You can now close this issue. Thank you for your time.

epsi1on commented 4 years ago

Does the result match for uniform load also? I mean model in first post.

Thanks