コード例 #1
0
        private void ComputeDisplacementDerivatives(TipJacobians polarJacobians, CommonValues val,
                                                    out Matrix2by2 displacementGradientMode1, out Matrix2by2 displacementGradientMode2)
        {
            // Temporary values and derivatives of the differentiated quantities. See documentation for their derivation.
            double E   = material.HomogeneousYoungModulus;
            double v   = material.HomogeneousPoissonRatio;
            double vEq = material.HomogeneousEquivalentPoissonRatio;
            double k   = (3.0 - vEq) / (1.0 + vEq);
            double a   = (1.0 + v) / (E * Math.Sqrt(2.0 * Math.PI));
            double b   = val.sqrtR;
            double b_r = 0.5 / val.sqrtR;

            // Mode 1
            {
                // Temporary values that differ between the 2 modes
                double c1       = val.cosThetaOver2 * (k - val.cosTheta);
                double c2       = val.sinThetaOver2 * (k - val.cosTheta);
                double c1_theta = -0.5 * c2 + val.cosThetaOver2 * val.sinTheta;
                double c2_theta = 0.5 * c1 + val.sinThetaOver2 * val.sinTheta;

                // The vector field derivatives w.r.t. to the local polar coordinates.
                // The vector components refer to the local cartesian system though.
                var polarGradient = Matrix2by2.CreateFromArray(
                    new double[, ] {
                    { a *b_r *c1, a *b *c1_theta }, { a *b_r *c2, a *b *c2_theta }
                });
                // The vector field derivatives w.r.t. to the local cartesian coordinates.
                displacementGradientMode1 =
                    polarJacobians.TransformVectorFieldDerivativesLocalPolarToLocalCartesian(polarGradient);
            }

            // Mode 2
            {
                double paren1   = 2.0 + k + val.cosTheta;
                double paren2   = 2.0 - k - val.cosTheta;
                double c1       = val.sinThetaOver2 * paren1;
                double c2       = val.cosThetaOver2 * paren2;
                double c1_theta = 0.5 * val.cosThetaOver2 * paren1 - val.sinThetaOver2 * val.sinTheta;
                double c2_theta = -0.5 * val.sinThetaOver2 * paren2 + val.cosThetaOver2 * val.sinTheta;

                // The vector field derivatives w.r.t. to the local polar coordinates.
                // The vector components refer to the local cartesian system though.
                var polarGradient = Matrix2by2.CreateFromArray(
                    new double[, ] {
                    { a *b_r *c1, a *b *c1_theta }, { a *b_r *c2, a *b *c2_theta }
                });
                // The vector field derivatives w.r.t. to the local cartesian coordinates.
                displacementGradientMode2 =
                    polarJacobians.TransformVectorFieldDerivativesLocalPolarToLocalCartesian(polarGradient);
            }
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="tipCoordinates">Coordinates of the crack tip in the global cartesian system.</param>
        /// <param name="tipRotationAngle">Counter-clockwise angle from the O-x axis of the global cartesian system to
        ///     the T-x1 axis of the local corrdinate system of the tip (T being the tip point)</param>
        public TipCoordinateSystem(CartesianPoint tipCoordinates, double tipRotationAngle)
        {
            this.RotationAngle = tipRotationAngle;

            double cosa = Math.Cos(tipRotationAngle);
            double sina = Math.Sin(tipRotationAngle);

            RotationMatrixGlobalToLocal = Matrix2by2.CreateFromArray(new double[, ] {
                { cosa, sina }, { -sina, cosa }
            });
            TransposeRotationMatrixGlobalToLocal        = RotationMatrixGlobalToLocal.Transpose();
            localCoordinatesOfGlobalOrigin              = -1 * (RotationMatrixGlobalToLocal * Vector2.Create(tipCoordinates.X, tipCoordinates.Y));
            DeterminantOfJacobianGlobalToLocalCartesian = 1.0; // det = (cosa)^2 +(sina)^2 = 1
        }
コード例 #3
0
        public TipJacobians(TipCoordinateSystem tipSystem, PolarPoint2D polarCoordinates)
        {
            this.tipSystem = tipSystem;

            double r        = polarCoordinates.R;
            double cosTheta = Math.Cos(polarCoordinates.Theta);
            double sinTheta = Math.Sin(polarCoordinates.Theta);

            inverseJacobianPolarToLocal = Matrix2by2.CreateFromArray(new double[, ]
            {
                { cosTheta, sinTheta }, { -sinTheta / r, cosTheta / r }
            });

            inverseJacobianPolarToGlobal = inverseJacobianPolarToLocal * tipSystem.RotationMatrixGlobalToLocal;
        }