public AnaliticalResultRectangleWithOneSideFixed(Model model) {
            _model = model;

            double alfa1 = model.Material.GetAlfa1();
            _rectangle = _model.Shape as Rectangle;
            double h = 0;
            double l = 0;
            if (_rectangle != null)
            {
                h = _rectangle.Height;
                l = _rectangle.Width;
            }
            double E = model.Material.E[0];
            double v = model.Material.v[0, 0];

            D = E * h * h * h * (1 + alfa1) / (12 * (1 - v * v));
            Lambda = 14 * E * h / (30 * (1 + v));
            p = -model.BoundaryConditions[_rectangle.Edges[1]].Value[2];
            l2 = l * l;
            l3 = l * l * l;
            l4 = l * l * l * l;
            l5 = l * l * l * l * l;
            l6 = l * l * l * l * l * l;
            l7 = l * l * l * l * l * l * l;
            

            wK1 = p / (2 * Lambda);
            wK2 = p / (6 * D);
        }
 public MechanicalPlate2DSolver(Model model, Mesh mesh, double error, double amplitude)
     : base(model, mesh)
 {
     _error = error;
     _amplitude = amplitude;
     indeciesToDelete = new List<int>();
 }
 public NewmarkVibrationNonLinearSolver(Model model, Mesh mesh, double error, Vector init, double maxTime, int intervalsTime)
     : base(model, mesh)
 {
     _error = error;
     _init = init;
     _maxTime = maxTime;
     _intervalsTime = intervalsTime;
 }
        public void Copy(Model model)
        {
            Material.Copy(model.Material);
            Shape.Copy(model.Shape);
            foreach (Edge edge in model.BoundaryConditions.Keys)
            {
                BoundaryConditions[edge].Copy(model.BoundaryConditions[edge]);
            }
            foreach (Point point in model.PointConditions.Keys)
            {
                PointConditions[point].Copy(model.PointConditions[point]);
            }

        }
 public void SolveTest()
 {
     double error = 0.001;
     Rectangle rectangle = new Rectangle(0.1, 1);
     Model model = new Model(Material.Aluminium(), rectangle); // TODO: Initialize to an appropriate value
     model.PointConditions[rectangle.Points[2]].Type = BoundaryConditionsType.Static;
     model.PointConditions[rectangle.Points[3]].Type = BoundaryConditionsType.Static;
     Mesh mesh = new RectangularMesh(rectangle, 10, 4); // TODO: Initialize to an appropriate value
     FreeVibrationsLinearSolver solver = new FreeVibrationsLinearSolver(model, mesh, error); // TODO: Initialize to an appropriate value
     IResult expected = null; // TODO: Initialize to an appropriate value
     IResult actual = null;
     actual = solver.Solve(1).FirstOrDefault();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
        public AnaliticalResultRectangleWithTwoFixedSides(Model model, double sigma)
        {
            alfa1 = model.Material.GetAlfa1();
            _rectangle = _model.Shape as Rectangle;
            double h = 0;
            double l = 0;
            if (_rectangle != null)
            {
                h = _rectangle.Height;
                l = _rectangle.Width;
            }

            E = model.Material.E[0];
            v = model.Material.v[0, 0];

            D = E*h*h*h*(1 + alfa1)/(12*(1 - v*v));
            Lambda = 14*E*h/(30*(1 + v));
            B = E*h*(1 + alfa1)/(1 - v*v);
            N0 = sigma*h;

            lambda_2 = N0/D;
            k_2 = Lambda/(Lambda + N0);
            lambda1_2 = lambda_2*k_2;

            lambda1 = Math.Sqrt(lambda1_2);


            ch = Math.Cosh(lambda1*l/2);
            sh = Math.Sinh(lambda1*l/2);

            _b = l*(1/(Lambda + N0) - 1/(D*lambda_2))/(2*lambda1*sh);

            p = (-1)*CountLoad();


        }
 public FreeVibrationsNonLinearSolver(Model model, Mesh mesh, double error, double amplitude, int maxIterations)
     : base(model, mesh, error, amplitude)
 {
     _maxIterations = maxIterations;
 }
        public void SolveSimpleTest()
        {
            double error = 0.001;
            Rectangle rectangle = new Rectangle(1, 1);
            Model model = new Model(Material.Aluminium(), rectangle);
            model.PointConditions[rectangle.Points[2]].Type = BoundaryConditionsType.Static;
            model.PointConditions[rectangle.Points[3]].Type = BoundaryConditionsType.Static;
            //model.BoundaryConditions[rectangle.Edges[0]].Type = BoundaryConditionsType.Static;
            //model.BoundaryConditions[rectangle.Edges[2]].Type = BoundaryConditionsType.Static;
            Mesh mesh = new RectangularMesh(rectangle, 2, 2); 
            FreeVibrationsLinearSolver solver = new FreeVibrationsLinearSolver(model, mesh, error);
            IResult expected = null; // TODO: Initialize to an appropriate value
            IResult actual = solver.Solve(1).FirstOrDefault();

            IEnumerable<Point> points = mesh.GetPointsForResult();

            ResultHelper.IsResultsEqual(points, expected, actual, 0, error);

            Assert.AreEqual(true, false);
        }
 protected Solver(Model model, Mesh mesh)
 {
     _model = model;
     _mesh = mesh;
     _mesh.Generate();
 }
 public StationaryNonlinear2DSolver(Model model, Mesh mesh, double error, int maxIterations)
     : base(model, mesh)
 { 
     _error = error;
     _maxIterations = maxIterations;
 }
 public SolidMechanicsModel()
 {
     Model = new Model();
 }
 public SolidMechanicsModel(Shape shape)
 {
     Model = new Model(shape);
 }
 public FreeVibrationsLinearSolver(Model model, Mesh mesh, double error, double amplitude)
     : base(model, mesh, error, amplitude)
 { }