ISAAR.MSolve.FEM.Tests/Elements/Tri3.cs
/// <summary>
/// To reproduce the reference solution, run the Abaqus job tri3_test0.inp and look at tri3_tes0.dat. Tri3 is a constant 
/// strain element(CST), therefore the strains / stresses are constant throughout the element (integration points and 
/// nodes).
/// </summary>
To reproduce the reference solution, run the Abaqus job tri3_test0.inp and look at tri3_tes0.dat. Tri3 is a constant
strain element(CST), therefore the strains / stresses are constant throughout the element (integration points and
nodes).
To reproduce the reference solution run the Abaqus job tri3_test0 . inp and look at tri3_tes0 . dat . Tri3 is a constant strain element ( CST ) therefore the strains / stresses are constant throughout the element ( integration points and nodes ) .
[Fact]
        public static void TestStrainsStresses0()
        {
            var factory = new ContinuumElement2DFactory(thickness, material0, null);
            ContinuumElement2D tri3 = factory.CreateElement(CellType.Tri3, nodeSet0);
            double[] displacements =
            {
                0.0, 0.0,                    
                0.0, 0.0,                    
                -1.4632E-03, -1.2747E-02     
            };
            double[][] expectedStrainsAtGPs =
            {
                new double[] { -4.8201E-04,  7.4983E-04, -4.1130E-03 }  
            };
            double[][] expectedStressesAtGPs =
            {
                new double[] { -59.32, 139.7, -332.2 }  
            };
            double[][] expectedStrainsAtNodes =
            {
                new double[] { -4.8201E-04,  7.4983E-04, -4.1130E-03 },  
                new double[] { -4.8201E-04,  7.4983E-04, -4.1130E-03 },  
                new double[] { -4.8201E-04,  7.4983E-04, -4.1130E-03 }   
            };
            double[][] expectedStressesAtNodes =
            {
                new double[] { -59.32, 139.7, -332.2 },  
                new double[] { -59.32, 139.7, -332.2 },  
                new double[] { -59.32, 139.7, -332.2 }   
            };
            (IReadOnlyList<double[]> strainsAtGPs, IReadOnlyList<double[]> stressesAtGPs) =
                tri3.UpdateStrainsStressesAtGaussPoints(displacements);
            IReadOnlyList<double[]> strainsAtNodes =
                tri3.GaussPointExtrapolation.ExtrapolateTensorFromGaussPointsToNodes(strainsAtGPs, tri3.Interpolation);
            IReadOnlyList<double[]> stressesAtNodes =
                tri3.GaussPointExtrapolation.ExtrapolateTensorFromGaussPointsToNodes(stressesAtGPs, tri3.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 tri3 = factory . CreateElement ( CellType . Tri3 , nodeSet0 ) ; double [ ] displacements = { 0.0 , 0.0 , 0.0 , 0.0 , - 1.4632E-03 , - 1.2747E-02 } ; double [ ] [ ] expectedStrainsAtGPs = { new double [ ] { - 4.8201E-04 , 7.4983E-04 , - 4.1130E-03 } } ; double [ ] [ ] expectedStressesAtGPs = { new double [ ] { - 59.32 , 139.7 , - 332.2 } } ; double [ ] [ ] expectedStrainsAtNodes = { new double [ ] { - 4.8201E-04 , 7.4983E-04 , - 4.1130E-03 } , new double [ ] { - 4.8201E-04 , 7.4983E-04 , - 4.1130E-03 } , new double [ ] { - 4.8201E-04 , 7.4983E-04 , - 4.1130E-03 } } ; double [ ] [ ] expectedStressesAtNodes = { new double [ ] { - 59.32 , 139.7 , - 332.2 } , new double [ ] { - 59.32 , 139.7 , - 332.2 } , new double [ ] { - 59.32 , 139.7 , - 332.2 } } ; ( IReadOnlyList < double [ ] > strainsAtGPs , IReadOnlyList < double [ ] > stressesAtGPs ) = tri3 . UpdateStrainsStressesAtGaussPoints ( displacements ) ; IReadOnlyList < double [ ] > strainsAtNodes = tri3 . GaussPointExtrapolation . ExtrapolateTensorFromGaussPointsToNodes ( strainsAtGPs , tri3 . Interpolation ) ; IReadOnlyList < double [ ] > stressesAtNodes = tri3 . GaussPointExtrapolation . ExtrapolateTensorFromGaussPointsToNodes ( stressesAtGPs , tri3 . 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 tri3_test0.inp and look at tri3_tes0.dat.
To reproduce the reference solution run the Abaqus job tri3_test0 . inp and look at tri3_tes0 . dat .
// Abaqus results // Node 1 // Node 2 // Node 3   // There is only 1 Gauss point. // Gauss point 1 // Gauss point 1 // The order of the nodes is the same (at least in this job) // Node 1 // Node 2 // Node 3 // Node 1 // Node 2 // Node 3