Beispiel #1
0
        public void Check()
        {
            var model = new Model();

            var wnd = WpfTraceListener.CreateModelTrace(model);

            PosdefChecker.CheckModel(model, LoadCase.DefaultLoadCase);
            wnd.ShowDialog();
        }
Beispiel #2
0
        protected override void Configure()
        {
            var traceListener = new WpfTraceListener();

#if DEBUG
            //PresentationTraceSources.DataBindingSource.Switch.Level = SourceLevels.Error;
            PresentationTraceSources.DataBindingSource.Listeners.Add(traceListener);
#endif

            _container = new SimpleContainer();

            _container.Singleton <IWindowManager, WindowManager>();
            _container.Singleton <IEventAggregator, EventAggregator>();
            _container.RegisterInstance(typeof(ShellViewModel), null, new ShellViewModel(traceListener));

            System.Net.ServicePointManager.DefaultConnectionLimit = 20;
            System.Net.ServicePointManager.Expect100Continue      = false;
            System.Net.ServicePointManager.ReusePort         = true;
            System.Net.ServicePointManager.UseNagleAlgorithm = false;
        }
        private static void Example2()
        {
            Console.WriteLine("Example 1: Simple 3D Frame with distributed loads");

            var model = new Model();

            var n1 = new Node(-10, 0, 0);
            var n2 = new Node(-10, 0, 6);
            var n3 = new Node(0, 0, 8);
            var n4 = new Node(10, 0, 6);
            var n5 = new Node(10, 0, 0);

            model.Nodes.Add(n1, n2, n3, n4, n5);

            var secAA = new PolygonYz(SectionGenerator.GetISetion(0.24, 0.67, 0.01, 0.006));
            var secBB = new PolygonYz(SectionGenerator.GetISetion(0.24, 0.52, 0.01, 0.006));

            var e1 = new FrameElement2Node(n1, n2);

            e1.Label = "e1";
            var e2 = new FrameElement2Node(n2, n3);

            e2.Label = "e2";
            var e3 = new FrameElement2Node(n3, n4);

            e3.Label = "e3";
            var e4 = new FrameElement2Node(n4, n5);

            e4.Label = "e4";


            e1.Geometry = e4.Geometry = secAA;
            e2.Geometry = e3.Geometry = secBB;

            e1.E = e2.E = e3.E = e4.E = 210e9;
            e1.G = e2.G = e3.G = e4.G = 210e9 / (2 * (1 + 0.3));//G = E / (2*(1+no))

            e1.UseOverridedProperties     =
                e2.UseOverridedProperties = e3.UseOverridedProperties = e4.UseOverridedProperties = false;

            model.Elements.Add(e1, e2, e3, e4);


            n1.Constraints                 =
                n2.Constraints             =
                    n3.Constraints         =
                        n4.Constraints     =
                            n5.Constraints =
                                Constraints.FixedDY & Constraints.FixedRX & Constraints.FixedRZ;//DY fixed and RX fixed and RZ fixed


            n1.Constraints = n1.Constraints & Constraints.MovementFixed;
            n5.Constraints = n5.Constraints & Constraints.MovementFixed;


            var ll = new UniformLoad1D(-10000, LoadDirection.Z, CoordinationSystem.Global);
            var lr = new UniformLoad1D(-10000, LoadDirection.Z, CoordinationSystem.Local);

            e2.Loads.Add(ll);
            e3.Loads.Add(lr);

            var wnd = WpfTraceListener.CreateModelTrace(model);

            new ModelWarningChecker().CheckModel(model);
            wnd.ShowDialog();

            model.Solve();
        }