ISAAR.MSolve.FEM.Tests/Elements/Quad4.cs
/// <summary>
/// To reproduce the reference solution, run the Abaqus job quad4_test0.inp and look at quad4_tes0.dat
/// </summary>
To reproduce the reference solution, run the Abaqus job quad4_test0.inp and look at quad4_tes0.dat
To reproduce the reference solution run the Abaqus job quad4_test0 . inp and look at quad4_tes0 . dat
[Fact]
        public static void TestStrainsStresses0()
        {
            var factory = new ContinuumElement2DFactory(thickness, material0, null);
            ContinuumElement2D quad4 = factory.CreateElement(CellType.Quad4, nodeSet0);
            double[] displacements =
            {
                0.0, 0.0,                   
                0.0, 0.0,                   
                -3.1797E-03, -8.6560E-03,   
                4.4274E-03, -1.8570E-02     
            };
            double[][] expectedStrainsAtGPs =
            {
                new double[] {  1.1178E-03,  1.5988E-03, -7.4619E-03 },  
                new double[] { -1.2757E-03,  8.6753E-04, -4.5415E-03 },  
                new double[] {  2.8614E-04, -7.3510E-04, -4.0517E-03 },  
                new double[] { -2.3014E-03, -1.8646E-03, -5.0422E-04 }   
            };
            double[][] expectedStressesAtGPs =
            {
                new double[] {  368.6,  446.3, -602.7 },  
                new double[] { -234.3,  111.9, -366.8 },  
                new double[] {  15.14, -149.8, -327.3 },  
                new double[] { -660.2, -589.6,  -40.73 }  
            };
            double[][] expectedStrainsAtNodes =
            {
                new double[] {  2.2723E-03,  2.6674E-03, -9.6950E-03 },  
                new double[] { -1.7504E-03,  1.6532E-03, -5.0343E-03 },  
                new double[] { -3.6499E-03, -3.3314E-03,  2.3560E-03 },  
                new double[] {  9.5484E-04, -1.1226E-03, -4.1860E-03 }   
            };
            double[][] expectedStressesAtNodes =
            {
                new double[] {   709.0,   772.9, -783.1 },  
                new double[] {  -289.5,   260.3, -406.6 },  
                new double[] { -1073.0, -1021.0,  190.3 },  
                new double[] {   142.6,  -193.0, -338.1 }   
            };
            (IReadOnlyList<double[]> strainsAtGPs, IReadOnlyList<double[]> stressesAtGPs) =
                quad4.UpdateStrainsStressesAtGaussPoints(displacements);
            IReadOnlyList<double[]> strainsAtNodes =
                quad4.GaussPointExtrapolation.ExtrapolateTensorFromGaussPointsToNodes(strainsAtGPs, quad4.Interpolation);
            IReadOnlyList<double[]> stressesAtNodes =
                quad4.GaussPointExtrapolation.ExtrapolateTensorFromGaussPointsToNodes(stressesAtGPs, quad4.Interpolation);
            Assert.True(Utilities.AreTensorsEqual(expectedStrainsAtGPs, strainsAtGPs, 1e-4));
            Assert.True(Utilities.AreTensorsEqual(expectedStressesAtGPs, stressesAtGPs, 1e-3));
            Assert.True(Utilities.AreTensorsEqual(expectedStrainsAtNodes, strainsAtNodes, 1e-4));
            Assert.True(Utilities.AreTensorsEqual(expectedStressesAtNodes, stressesAtNodes, 1e-3));
        }
[ Fact ] public static void TestStrainsStresses0 ( ) { var factory = new ContinuumElement2DFactory ( thickness , material0 , null ) ; ContinuumElement2D quad4 = factory . CreateElement ( CellType . Quad4 , nodeSet0 ) ; double [ ] displacements = { 0.0 , 0.0 , 0.0 , 0.0 , - 3.1797E-03 , - 8.6560E-03 , 4.4274E-03 , - 1.8570E-02 } ; double [ ] [ ] expectedStrainsAtGPs = { new double [ ] { 1.1178E-03 , 1.5988E-03 , - 7.4619E-03 } , new double [ ] { - 1.2757E-03 , 8.6753E-04 , - 4.5415E-03 } , new double [ ] { 2.8614E-04 , - 7.3510E-04 , - 4.0517E-03 } , new double [ ] { - 2.3014E-03 , - 1.8646E-03 , - 5.0422E-04 } } ; double [ ] [ ] expectedStressesAtGPs = { new double [ ] { 368.6 , 446.3 , - 602.7 } , new double [ ] { - 234.3 , 111.9 , - 366.8 } , new double [ ] { 15.14 , - 149.8 , - 327.3 } , new double [ ] { - 660.2 , - 589.6 , - 40.73 } } ; double [ ] [ ] expectedStrainsAtNodes = { new double [ ] { 2.2723E-03 , 2.6674E-03 , - 9.6950E-03 } , new double [ ] { - 1.7504E-03 , 1.6532E-03 , - 5.0343E-03 } , new double [ ] { - 3.6499E-03 , - 3.3314E-03 , 2.3560E-03 } , new double [ ] { 9.5484E-04 , - 1.1226E-03 , - 4.1860E-03 } } ; double [ ] [ ] expectedStressesAtNodes = { new double [ ] { 709.0 , 772.9 , - 783.1 } , new double [ ] { - 289.5 , 260.3 , - 406.6 } , new double [ ] { - 1073.0 , - 1021.0 , 190.3 } , new double [ ] { 142.6 , - 193.0 , - 338.1 } } ; ( IReadOnlyList < double [ ] > strainsAtGPs , IReadOnlyList < double [ ] > stressesAtGPs ) = quad4 . UpdateStrainsStressesAtGaussPoints ( displacements ) ; IReadOnlyList < double [ ] > strainsAtNodes = quad4 . GaussPointExtrapolation . ExtrapolateTensorFromGaussPointsToNodes ( strainsAtGPs , quad4 . Interpolation ) ; IReadOnlyList < double [ ] > stressesAtNodes = quad4 . GaussPointExtrapolation . ExtrapolateTensorFromGaussPointsToNodes ( stressesAtGPs , quad4 . Interpolation ) ; Assert . True ( Utilities . AreTensorsEqual ( expectedStrainsAtGPs , strainsAtGPs , 1e-4 ) ) ; Assert . True ( Utilities . AreTensorsEqual ( expectedStressesAtGPs , stressesAtGPs , 1e-3 ) ) ; Assert . True ( Utilities . AreTensorsEqual ( expectedStrainsAtNodes , strainsAtNodes , 1e-4 ) ) ; Assert . True ( Utilities . AreTensorsEqual ( expectedStressesAtNodes , stressesAtNodes , 1e-3 ) ) ; }
To reproduce the reference solution, run the Abaqus job quad4_test0.inp and look at quad4_tes0.dat
To reproduce the reference solution run the Abaqus job quad4_test0 . inp and look at quad4_tes0 . dat
// Abaqus results // Node 1 // Node 2 // Node 3   // Node 4 // The Gauss points in Abaqus have the same order as in GaussLegendre2D.Order2x2: Xi major, Eta minor // Gauss point 1 // Gauss point 2 // Gauss point 3 // Gauss point 4 // Gauss point 1 // Gauss point 2 // Gauss point 3 // Gauss point 4 // However the order of nodes is different, since in that Abaqus job the preprocessor numbered them differently from    // the counter-clockwise order of Quad4 nodes. // Node 1 // Node 2 // Node 3 // Node 4 // Node 1 // Node 2 // Node 3 // Node 4