ISAAR.MSolve.FEM.Tests/Elements/Quad8.cs
/// <summary>
/// To reproduce the reference solution, run the Abaqus job quad8_test0.inp and look at 
/// QUAD8_TEST0_MASS_MATRICES.mtx.
/// </summary>
To reproduce the reference solution, run the Abaqus job quad8_test0.inp and look at
QUAD8_TEST0_MASS_MATRICES.mtx.
To reproduce the reference solution run the Abaqus job quad8_test0 . inp and look at QUAD8_TEST0_MASS_MATRICES . mtx .
[Fact]
        private static void TestConsistentMass0()
        {
            IQuadrature2D quadratureForMass = GaussLegendre2D.GetQuadratureWithOrder(3, 3);
            var materialsAtGaussPoints = new List<ElasticMaterial2D>();
            foreach (GaussPoint gaussPoint in quadratureForMass.IntegrationPoints)
            {
                materialsAtGaussPoints.Add(material0.Clone());
            }
            var quad8 = new ContinuumElement2D(thickness, nodeSet0, InterpolationQuad8.UniqueInstance,
                GaussLegendre2D.GetQuadratureWithOrder(3, 3), quadratureForMass,
                ExtrapolationGaussLegendre3x3.UniqueInstance,
                materialsAtGaussPoints, dynamicMaterial);
            IMatrix M = quad8.BuildConsistentMassMatrix();
            Matrix expectedM = Matrix.CreateFromArray(new double[,]
            {
                { 9.115245555556, 0.000000000000, 1.881383333333, 0.000000000000, 3.914882222222, 0.000000000000, 2.417800000000, 0.000000000000, -7.376906666667, 0.000000000000, -11.056637777778, 0.000000000000, -9.104604444445, 0.000000000000, -7.444940000000, 0.000000000000      },
                { 0.000000000000, 9.115245555556, 0.000000000000, 1.881383333333, 0.000000000000, 3.914882222222, 0.000000000000, 2.417800000000, 0.000000000000, -7.376906666667, 0.000000000000, -11.056637777778, 0.000000000000, -9.104604444445, 0.000000000000, -7.444940000000      },
                { 1.881383333333, 0.000000000000, 9.727545555556, 0.000000000000, 2.239866666667, 0.000000000000, 3.841615555556, 0.000000000000, -6.727973333334, 0.000000000000, -6.701806666667, 0.000000000000, -9.031337777778, 0.000000000000, -11.077571111111, 0.000000000000      },
                { 0.000000000000, 1.881383333333, 0.000000000000, 9.727545555556, 0.000000000000, 2.239866666667, 0.000000000000, 3.841615555556, 0.000000000000, -6.727973333334, 0.000000000000, -6.701806666667, 0.000000000000, -9.031337777778, 0.000000000000, -11.077571111111      },
                { 3.914882222222, 0.000000000000, 2.239866666667, 0.000000000000, 7.681312222222, 0.000000000000, 2.776283333333, 0.000000000000, -11.082804444445, 0.000000000000, -8.784673333334, 0.000000000000, -6.832640000000, 0.000000000000, -11.150837777778, 0.000000000000     },
                { 0.000000000000, 3.914882222222, 0.000000000000, 2.239866666667, 0.000000000000, 7.681312222222, 0.000000000000, 2.776283333333, 0.000000000000, -11.082804444445, 0.000000000000, -8.784673333334, 0.000000000000, -6.832640000000, 0.000000000000, -11.150837777778     },
                { 2.417800000000, 0.000000000000, 3.841615555556, 0.000000000000, 2.776283333333, 0.000000000000, 7.581878888889, 0.000000000000, -11.009537777778, 0.000000000000, -10.983371111111, 0.000000000000, -6.895440000000, 0.000000000000, -8.941673333334, 0.000000000000     },
                { 0.000000000000, 2.417800000000, 0.000000000000, 3.841615555556, 0.000000000000, 2.776283333333, 0.000000000000, 7.581878888889, 0.000000000000, -11.009537777778, 0.000000000000, -10.983371111111, 0.000000000000, -6.895440000000, 0.000000000000, -8.941673333334     },
                { -7.376906666667, 0.000000000000, -6.727973333334, 0.000000000000, -11.082804444445, 0.000000000000, -11.009537777778, 0.000000000000, 45.023413333334, 0.000000000000, 28.692622222223, 0.000000000000, 20.114142222223, 0.000000000000, 28.734488888889, 0.000000000000 },
                { 0.000000000000, -7.376906666667, 0.000000000000, -6.727973333334, 0.000000000000, -11.082804444445, 0.000000000000, -11.009537777778, 0.000000000000, 45.023413333334, 0.000000000000, 28.692622222223, 0.000000000000, 20.114142222223, 0.000000000000, 28.734488888889 },
                { -11.056637777778, 0.000000000000, -6.701806666667, 0.000000000000, -8.784673333334, 0.000000000000, -10.983371111111, 0.000000000000, 28.692622222223, 0.000000000000, 48.215746666667, 0.000000000000, 24.589688888889, 0.000000000000, 22.134208888889, 0.000000000000 },
                { 0.000000000000, -11.056637777778, 0.000000000000, -6.701806666667, 0.000000000000, -8.784673333334, 0.000000000000, -10.983371111111, 0.000000000000, 28.692622222223, 0.000000000000, 48.215746666667, 0.000000000000, 24.589688888889, 0.000000000000, 22.134208888889 },
                { -9.104604444445, 0.000000000000, -9.031337777778, 0.000000000000, -6.832640000000, 0.000000000000, -6.895440000000, 0.000000000000, 20.114142222223, 0.000000000000, 24.589688888889, 0.000000000000, 28.821013333334, 0.000000000000, 24.924622222223, 0.000000000000   },
                { 0.000000000000, -9.104604444445, 0.000000000000, -9.031337777778, 0.000000000000, -6.832640000000, 0.000000000000, -6.895440000000, 0.000000000000, 20.114142222223, 0.000000000000, 24.589688888889, 0.000000000000, 28.821013333334, 0.000000000000, 24.924622222223   },
                { -7.444940000000, 0.000000000000, -11.077571111111, 0.000000000000, -11.150837777778, 0.000000000000, -8.941673333334, 0.000000000000, 28.734488888889, 0.000000000000, 22.134208888889, 0.000000000000, 24.924622222223, 0.000000000000, 49.869480000000, 0.000000000000 },
                { 0.000000000000, -7.444940000000, 0.000000000000, -11.077571111111, 0.000000000000, -11.150837777778, 0.000000000000, -8.941673333334, 0.000000000000, 28.734488888889, 0.000000000000, 22.134208888889, 0.000000000000, 24.924622222223, 0.000000000000, 49.869480000000 }
            }); 
            Assert.True(M.Equals(expectedM, 1e-10));
        }
[ Fact ] private static void TestConsistentMass0 ( ) { IQuadrature2D quadratureForMass = GaussLegendre2D . GetQuadratureWithOrder ( 3 , 3 ) ; var materialsAtGaussPoints = new List < ElasticMaterial2D > ( ) ; foreach ( GaussPoint gaussPoint in quadratureForMass . IntegrationPoints ) { materialsAtGaussPoints . Add ( material0 . Clone ( ) ) ; } var quad8 = new ContinuumElement2D ( thickness , nodeSet0 , InterpolationQuad8 . UniqueInstance , GaussLegendre2D . GetQuadratureWithOrder ( 3 , 3 ) , quadratureForMass , ExtrapolationGaussLegendre3x3 . UniqueInstance , materialsAtGaussPoints , dynamicMaterial ) ; IMatrix M = quad8 . BuildConsistentMassMatrix ( ) ; Matrix expectedM = Matrix . CreateFromArray ( new double [ , ] { { 9.115245555556 , 0.000000000000 , 1.881383333333 , 0.000000000000 , 3.914882222222 , 0.000000000000 , 2.417800000000 , 0.000000000000 , - 7.376906666667 , 0.000000000000 , - 11.056637777778 , 0.000000000000 , - 9.104604444445 , 0.000000000000 , - 7.444940000000 , 0.000000000000 } , { 0.000000000000 , 9.115245555556 , 0.000000000000 , 1.881383333333 , 0.000000000000 , 3.914882222222 , 0.000000000000 , 2.417800000000 , 0.000000000000 , - 7.376906666667 , 0.000000000000 , - 11.056637777778 , 0.000000000000 , - 9.104604444445 , 0.000000000000 , - 7.444940000000 } , { 1.881383333333 , 0.000000000000 , 9.727545555556 , 0.000000000000 , 2.239866666667 , 0.000000000000 , 3.841615555556 , 0.000000000000 , - 6.727973333334 , 0.000000000000 , - 6.701806666667 , 0.000000000000 , - 9.031337777778 , 0.000000000000 , - 11.077571111111 , 0.000000000000 } , { 0.000000000000 , 1.881383333333 , 0.000000000000 , 9.727545555556 , 0.000000000000 , 2.239866666667 , 0.000000000000 , 3.841615555556 , 0.000000000000 , - 6.727973333334 , 0.000000000000 , - 6.701806666667 , 0.000000000000 , - 9.031337777778 , 0.000000000000 , - 11.077571111111 } , { 3.914882222222 , 0.000000000000 , 2.239866666667 , 0.000000000000 , 7.681312222222 , 0.000000000000 , 2.776283333333 , 0.000000000000 , - 11.082804444445 , 0.000000000000 , - 8.784673333334 , 0.000000000000 , - 6.832640000000 , 0.000000000000 , - 11.150837777778 , 0.000000000000 } , { 0.000000000000 , 3.914882222222 , 0.000000000000 , 2.239866666667 , 0.000000000000 , 7.681312222222 , 0.000000000000 , 2.776283333333 , 0.000000000000 , - 11.082804444445 , 0.000000000000 , - 8.784673333334 , 0.000000000000 , - 6.832640000000 , 0.000000000000 , - 11.150837777778 } , { 2.417800000000 , 0.000000000000 , 3.841615555556 , 0.000000000000 , 2.776283333333 , 0.000000000000 , 7.581878888889 , 0.000000000000 , - 11.009537777778 , 0.000000000000 , - 10.983371111111 , 0.000000000000 , - 6.895440000000 , 0.000000000000 , - 8.941673333334 , 0.000000000000 } , { 0.000000000000 , 2.417800000000 , 0.000000000000 , 3.841615555556 , 0.000000000000 , 2.776283333333 , 0.000000000000 , 7.581878888889 , 0.000000000000 , - 11.009537777778 , 0.000000000000 , - 10.983371111111 , 0.000000000000 , - 6.895440000000 , 0.000000000000 , - 8.941673333334 } , { - 7.376906666667 , 0.000000000000 , - 6.727973333334 , 0.000000000000 , - 11.082804444445 , 0.000000000000 , - 11.009537777778 , 0.000000000000 , 45.023413333334 , 0.000000000000 , 28.692622222223 , 0.000000000000 , 20.114142222223 , 0.000000000000 , 28.734488888889 , 0.000000000000 } , { 0.000000000000 , - 7.376906666667 , 0.000000000000 , - 6.727973333334 , 0.000000000000 , - 11.082804444445 , 0.000000000000 , - 11.009537777778 , 0.000000000000 , 45.023413333334 , 0.000000000000 , 28.692622222223 , 0.000000000000 , 20.114142222223 , 0.000000000000 , 28.734488888889 } , { - 11.056637777778 , 0.000000000000 , - 6.701806666667 , 0.000000000000 , - 8.784673333334 , 0.000000000000 , - 10.983371111111 , 0.000000000000 , 28.692622222223 , 0.000000000000 , 48.215746666667 , 0.000000000000 , 24.589688888889 , 0.000000000000 , 22.134208888889 , 0.000000000000 } , { 0.000000000000 , - 11.056637777778 , 0.000000000000 , - 6.701806666667 , 0.000000000000 , - 8.784673333334 , 0.000000000000 , - 10.983371111111 , 0.000000000000 , 28.692622222223 , 0.000000000000 , 48.215746666667 , 0.000000000000 , 24.589688888889 , 0.000000000000 , 22.134208888889 } , { - 9.104604444445 , 0.000000000000 , - 9.031337777778 , 0.000000000000 , - 6.832640000000 , 0.000000000000 , - 6.895440000000 , 0.000000000000 , 20.114142222223 , 0.000000000000 , 24.589688888889 , 0.000000000000 , 28.821013333334 , 0.000000000000 , 24.924622222223 , 0.000000000000 } , { 0.000000000000 , - 9.104604444445 , 0.000000000000 , - 9.031337777778 , 0.000000000000 , - 6.832640000000 , 0.000000000000 , - 6.895440000000 , 0.000000000000 , 20.114142222223 , 0.000000000000 , 24.589688888889 , 0.000000000000 , 28.821013333334 , 0.000000000000 , 24.924622222223 } , { - 7.444940000000 , 0.000000000000 , - 11.077571111111 , 0.000000000000 , - 11.150837777778 , 0.000000000000 , - 8.941673333334 , 0.000000000000 , 28.734488888889 , 0.000000000000 , 22.134208888889 , 0.000000000000 , 24.924622222223 , 0.000000000000 , 49.869480000000 , 0.000000000000 } , { 0.000000000000 , - 7.444940000000 , 0.000000000000 , - 11.077571111111 , 0.000000000000 , - 11.150837777778 , 0.000000000000 , - 8.941673333334 , 0.000000000000 , 28.734488888889 , 0.000000000000 , 22.134208888889 , 0.000000000000 , 24.924622222223 , 0.000000000000 , 49.869480000000 } } ) ; Assert . True ( M . Equals ( expectedM , 1e-10 ) ) ; }
To reproduce the reference solution, run the Abaqus job quad8_test0.inp and look at
QUAD8_TEST0_MASS_MATRICES.mtx.
To reproduce the reference solution run the Abaqus job quad8_test0 . inp and look at QUAD8_TEST0_MASS_MATRICES . mtx .
// from Abaqus