Example #1
0
        private void SetSubstitutiveMatrix()
        {
            equation = new double[SolverModel.IntDOFPerNode * SolverModel.IntModelNodes, SolverModel.IntDOFPerNode *SolverModel.IntModelNodes + 1];
            equation = MatrixTransformation.Sum(equation, DoubleMatrixBoundaryGlobal);

            for (int i = 0; i < equation.GetLength(0); i++)
            {
                equation[i, equation.GetLength(0)] = DoubleMatrixLoads[i, 0];
            }
        }
Example #2
0
        private void SetSubstitutiveMatrix()
        {
            equation = new double[model.LQ * model.ln, model.LQ *model.ln + 1];
            equation = MatrixTransformation.Sum(equation, KK);

            for (int i = 0; i < equation.GetLength(0); i++)
            {
                equation[i, equation.GetLength(0)] = F[i, 0];
            }
        }
Example #3
0
        private void ApplyBCs()
        {
            DoubleMatrixBoundaryGlobal = new double[SolverModel.IntDOFPerNode * SolverModel.IntModelNodes, SolverModel.IntDOFPerNode *SolverModel.IntModelNodes];

            DoubleMatrixBoundaryGlobal = MatrixTransformation.Multiply(SolverModel.Identity.Ip, DoubleMatrixStiffnessGlobal);
            DoubleMatrixBoundaryGlobal = MatrixTransformation.Multiply(DoubleMatrixBoundaryGlobal, SolverModel.Identity.Ip);
            DoubleMatrixBoundaryGlobal = MatrixTransformation.Sum(DoubleMatrixBoundaryGlobal, MatrixTransformation.ToDouble(SolverModel.Identity.Id));

            DoubleMatrixLoads = new double[SolverModel.IntDOFPerNode * SolverModel.IntModelNodes, 1];
            DoubleMatrixLoads = MatrixTransformation.Multiply(SolverModel.Identity.Ip, SolverModel.Load.Matrix);
        }
Example #4
0
        private void ApplyBCs()
        {
            KK = new double[model.LQ * model.ln, model.LQ *model.ln];

            KK = MatrixTransformation.Multiply <int, double>(model.Identity.Ip, K);
            KK = MatrixTransformation.Multiply <double, int>(KK, model.Identity.Ip);
            KK = MatrixTransformation.Sum(KK, MatrixTransformation.ToDouble <int>(model.Identity.Id));

            F = new double[model.LQ * model.ln, 1];
            F = MatrixTransformation.Multiply <int, double>(model.Identity.Ip, model.Load.Matrix);
        }
Example #5
0
        private void AggregateGlobalStiffnessMatrix()
        {
            DoubleMatrixStiffnessGlobal = new double[SolverModel.IntDOFPerNode * SolverModel.IntModelNodes, SolverModel.IntDOFPerNode *SolverModel.IntModelNodes];
            double[,] k;

            // Debug.WriteLine($"Solver.cs AggregateGlobalStiffnessMatrix(): Total number of elements in model = SolverModel.IntModelElements={SolverModel.IntModelElements}");
            for (int i = 0; i < SolverModel.IntModelElements; i++)
            {
                k = MatrixTransformation.Multiply(SolverModel.Boolean.MatrixTransposed[i], SolverModel.Beam.Matrix[i]);
                k = MatrixTransformation.Multiply(k, SolverModel.Boolean.Matrix[i]);
                DoubleMatrixStiffnessGlobal = MatrixTransformation.Sum(DoubleMatrixStiffnessGlobal, k);
            }
        }
Example #6
0
        private void AggregateGlobalStiffnessMatrix()
        {
            K = new double[model.LQ * model.ln, model.LQ *model.ln];

            for (int i = 0; i < model.le; i++)
            {
                double[,] k = new double[4, 4];
                k           = MatrixTransformation.Multiply <int, double>(model.Boolean.TransposedMatrix[i], model.Beam.Matrix[i]);
                k           = MatrixTransformation.Multiply <double, int>(k, model.Boolean.Matrix[i]);

                K = MatrixTransformation.Sum(K, k);
            }
        }