Esempio n. 1
0
        private static Model CreateModel(double stiffnessRatio)
        {
            // Subdomains:
            // /|
            // /||-------|-------|-------|-------|
            // /||  (4)  |  (5)  |  (6)  |  (7)  |
            // /||   E1  |   E0  |   E0  |   E0  |
            // /||-------|-------|-------|-------|
            // /||  (0)  |  (1)  |  (2)  |  (3)  |
            // /||   E1  |   E0  |   E0  |   E0  |
            // /||-------|-------|-------|-------|
            // /|

            double E0 = 2.1E7;
            double E1 = stiffnessRatio * E0;

            var builder = new Uniform2DModelBuilder();

            builder.DomainLengthX           = 3.0;
            builder.DomainLengthY           = 1.5;
            builder.NumSubdomainsX          = 4;
            builder.NumSubdomainsY          = 2;
            builder.NumTotalElementsX       = 20;
            builder.NumTotalElementsY       = 20;
            builder.YoungModuliOfSubdomains = new double[, ] {
                { E1, E0, E0, E0 }, { E1, E0, E0, E0 }
            };
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LeftSide, StructuralDof.TranslationX, 0.0);
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LeftSide, StructuralDof.TranslationY, 0.0);
            builder.DistributeLoadAtNodes(Uniform2DModelBuilder.BoundaryRegion.RightSide, StructuralDof.TranslationY, 100.0);

            return(builder.BuildModel());
        }
        private static Model CreateModel(int numElementsX, int numElementsY)
        {
            // if numElementsX = numElementsy: 2:
            // 6 ----- 7 ----- 8  -->
            // |  (2)  |  (3)  |
            // |       |       |
            // 3 ----- 4 ----- 5  -->
            // |  (0)  |  (1)  |
            // |       |       |
            // 0 ----- 1 ----- 2  -->
            // Δ               Δ
            // -               o

            var builder = new Uniform2DModelBuilder();

            builder.DomainLengthX     = 2.0;
            builder.DomainLengthY     = 2.0;
            builder.NumSubdomainsX    = 2;
            builder.NumSubdomainsY    = 2;
            builder.NumTotalElementsX = numElementsX;
            builder.NumTotalElementsY = numElementsY;
            builder.YoungModulus      = 2.1E7;
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LowerLeftCorner, StructuralDof.TranslationX, 0.0);
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LowerLeftCorner, StructuralDof.TranslationY, 0.0);
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LowerRightCorner, StructuralDof.TranslationY, 0.0);
            builder.DistributeLoadAtNodes(Uniform2DModelBuilder.BoundaryRegion.RightSide, StructuralDof.TranslationX, 100.0);

            return(builder.BuildModel());
        }
Esempio n. 3
0
        private static Model CreateModel()
        {
            // 6 ----- 7 ----- 8
            // |  (2)  |  (3)  |
            // |       |       |
            // 3 ----- 4 ----- 5
            // |  (0)  |  (1)  |
            // |       |       |
            // 0 ----- 1 ----- 2
            // Δ               Δ
            // -               o

            var builder = new Uniform2DModelBuilder();

            builder.DomainLengthX     = 2.0;
            builder.DomainLengthY     = 2.0;
            builder.NumSubdomainsX    = 2;
            builder.NumSubdomainsY    = 2;
            builder.NumTotalElementsX = 2;
            builder.NumTotalElementsY = 2;
            builder.YoungModulus      = 2.1E7;
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LowerLeftCorner, StructuralDof.TranslationX, 0.0);
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LowerLeftCorner, StructuralDof.TranslationY, 0.0);
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LowerRightCorner, StructuralDof.TranslationY, 0.0);

            return(builder.BuildModel());
        }
Esempio n. 4
0
        public static Model CreateModel()
        {
            //                                    Λ P
            //                                    |
            //
            // |> 20 ---- 21 ---- 22 ---- 23 ---- 24
            //    |  (12) |  (13) |  (14) |  (15) |
            //    |       |       |       |       |
            // |> 15 ---- 16 ---- 17 ---- 18 ---- 19
            //    |  (8)  |  (9)  |  (10) |  (11) |
            //    |       |       |       |       |
            // |> 10 ---- 11 ---- 12 ---- 13 ---- 14
            //    |  (4)  |  (5)  |  (6)  |  (7)  |
            //    |       |       |       |       |
            // |> 5 ----- 6 ----- 7 ----- 8 ----- 9
            //    |  (0)  |  (1)  |  (2)  |  (3)  |
            //    |       |       |       |       |
            // |> 0 ----- 1 ----- 2 ----- 3 ----- 4


            var builder = new Uniform2DModelBuilder();

            builder.DomainLengthX     = 4.0;
            builder.DomainLengthY     = 4.0;
            builder.NumSubdomainsX    = 2;
            builder.NumSubdomainsY    = 2;
            builder.NumTotalElementsX = 4;
            builder.NumTotalElementsY = 4;
            builder.YoungModulus      = 1.0;
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LeftSide, StructuralDof.TranslationX, 0.0);
            builder.PrescribeDisplacement(Uniform2DModelBuilder.BoundaryRegion.LeftSide, StructuralDof.TranslationY, 0.0);
            builder.DistributeLoadAtNodes(Uniform2DModelBuilder.BoundaryRegion.UpperRightCorner, StructuralDof.TranslationY, 10.0);

            return(builder.BuildModel());
        }