Esempio n. 1
0
        /// <summary>
        /// Solves the instance assuming linear behavior (both geometric and material) for specified configuration.
        /// </summary>
        /// <param name="config">The configuration.</param>
        public void Solve(SolverConfiguration config)
        {
            //new version
            lastResult                 = new StaticLinearAnalysisResult();
            lastResult.Parent          = this;
            lastResult.SolverGenerator = config.SolverGenerator;

            foreach (var loadCase in config.LoadCases)
            {
                lastResult.AddAnalysisResultIfNotExists(loadCase);
            }
        }
Esempio n. 2
0
        public void Solve_MPC(SolverConfiguration config)
        {
            //new version
            lastResult        = new StaticLinearAnalysisResult();
            lastResult.Parent = this;

            lastResult.SolverFactory = config.SolverFactory;

            ReIndexNodes();

            foreach (var loadCase in config.LoadCases)
            {
                lastResult.AddAnalysisResultIfNotExists_MPC(loadCase);
            }
        }
Esempio n. 3
0
        public void Solve_MPC(SolverConfiguration config)
        {
            //new version
            lastResult        = new StaticLinearAnalysisResult();
            lastResult.Parent = this;

            lastResult.SolverFactory = config.SolverFactory;

            //if(elements.Any(i=>i is RigidElement))
            //    throw new Exception("Invalid solve for MPC element");// Model with RigidElement element should call Model.Solve()

            ReIndexNodes();

            foreach (var loadCase in config.LoadCases)
            {
                lastResult.AddAnalysisResultIfNotExists_MPC(loadCase);
            }
        }
Esempio n. 4
0
        public static bool IsInStaticEquilibrium(StaticLinearAnalysisResult res, LoadCase cse)
        {
            var allForces = new Force[res.Parent.Nodes.Count];


            var forceVec = res.Forces[cse];

            for (int i = 0; i < allForces.Length; i++)
            {
                var force = Force.FromVector(forceVec, 6 * i);
                allForces[i] = force;
            }


            var ft = allForces.Select((i, j) => i.Move(res.Parent.Nodes[j].Location, new Point())).Sum();

            throw new NotImplementedException();
        }
Esempio n. 5
0
        /// <summary>
        /// Solves the instance assuming linear behavior (both geometric and material) for specified configuration.
        /// </summary>
        /// <param name="config">The configuration.</param>
        public void Solve(SolverConfiguration config)
        {
            //new version
            lastResult        = new StaticLinearAnalysisResult();
            lastResult.Parent = this;

            lastResult.SolverFactory = config.SolverFactory;

            ReIndexNodes();

            if (this.mpcElements.Count > 0)
            {
                throw new InvalidOperationException("Invalid solve for MPC element");// Model with MPC element should call Model.Solve_MPC()
            }
            foreach (var loadCase in config.LoadCases)
            {
                lastResult.AddAnalysisResultIfNotExists(loadCase);
            }
        }