void fillStrs(string solName)
 {
     this.solName = solName;
     solver       = WBSolver.Factory(solName, WBProjectOptions.Default);
     gridname     = solver.Grids.Keys.First();
     SynchSlider();
 }
Exemplo n.º 2
0
        public static WBSolver GetNewSolver2(WBProjectOptions options)
        {
            var layerOpts2 = StandartOpts;
            var geom       = new GunShape();

            geom.AddPoint(layerOpts2.X_left - 0.2, 0.132);
            geom.AddPoint(layerOpts2.X_right + 5, 0.132);
            var initLayer = new OvLayer();

            initLayer.Geom = geom;
            GunPowder powder = new GunPowder();

            powder = powder_AGARD();
            List <GunPowder> powder_list = new List <GunPowder>()
            {
                powder
            };
            List <double> conc_list = new List <double>()
            {
                1
            };
            MixtureGunPowder mixture = new MixtureGunPowder(powder_list, conc_list);

            initLayer.InitLayer(0d, layerOpts2, MySuoerFunc(mixture), InitOvBound);
            var grid   = new OvGridRK("OvGrid_tst1", initLayer);
            var solver = new WBSolver(grid, options);

            initLayer.SynchNodes_X_V();
            return(solver);
        }
        public void GetTest()
        {
            var solvers    = WBSolver.FactoryVariants.ToList();
            var tstSolvers = new string[] { "TstZadacha1", "TstZadacha2" };

            foreach (var s in tstSolvers)
            {
                Assert.IsTrue(solvers.Contains(s));
            }
            var s1 = WBSolver.Factory("TstZadacha2", WBProjectOptions.Default);
        }
        public static WBSolver GetNewSolver(WBProjectOptions options)
        {
            var layerOpts = StandartOpts;
            var initLayer = new RmLayer();

            initLayer.InitLayer(0d, layerOpts, InitNodeF);
            var grid   = new RmGrid("RimanGrid", initLayer);
            var solver = new WBSolver(grid, options);

            return(solver);
        }
        public static WBSolver GetNewSolver(WBProjectOptions options)
        {
            var layerOpts = StandartOpts;
            var geom      = new GunShape();

            geom.AddPoint(layerOpts.X_left - 10, 0.2);
            geom.AddPoint(layerOpts.X_right + 10, 0.2);
            var initLayer = new GasLayer();

            initLayer.Geom = geom;
            initLayer.InitLayer(0d, layerOpts, InitGasCell, InitGasBound);
            var grid   = new GasGrid("GasGrid_tst1", initLayer);
            var solver = new WBSolver(grid, options);

            return(solver);
        }
        public static WBSolver GetNewSolver2(WBProjectOptions options)
        {
            var layerOpts1 = StandartOpts1;
            var geom       = new GunShape();

            geom.AddPoint(layerOpts1.X_left - 0.2, 0.2);
            geom.AddPoint(layerOpts1.X_right * 100, 0.2);
            var initLayer = new GasLayer();

            initLayer.Geom = geom;
            initLayer.InitLayer(0d, layerOpts1, InitGasCell1, InitGasBound);
            var grid   = new PnGrid("GasGrid_tst1", initLayer);
            var solver = new WBSolver(grid, options);

            initLayer.SynchNodes_X_V();
            return(solver);
        }
        public static WBSolver GetNewSolver(WBProjectOptions options)
        {
            var    layerOpts = StandartOpts;
            var    geom = new GunShape();
            double d0 = 0.023, d1 = 0.016, l0 = 0.1, l1 = 0.1;

            geom.AddPoint(layerOpts.X_left - 10, d0);
            geom.AddPoint(l0, d0);
            geom.AddPoint(l0 + l1, d1);
            geom.AddPoint(l0 + l1 + 1000, d1);
            var initLayer = new GasLayer();

            initLayer.Geom = geom;
            initLayer.InitLayer(0d, layerOpts, InitIdealPCell, InitElasticPBound);
            var grid   = new IdealPiston.PistonGrid("ElasticP_tst1", initLayer);
            var solver = new WBSolver(grid, options);

            return(solver);
        }
        public static WBSolver GetNewSolver1(WBProjectOptions options)
        {
            var layerOpts = StandartOpts;
            var geom      = new GunShape();

            geom.AddPoint(layerOpts.X_left - 10, 0.2);
            geom.AddPoint(layerOpts.X_right + 10, 0.2);
            var initLayer = new GasLayer();

            initLayer.Geom = geom;
            initLayer.InitLayer(0d, layerOpts, InitGasCell, InitGasBound);
            var grid   = new GasGrid("GasGrid_tst1", initLayer);
            var solver = new WBSolver(grid, options);

            initLayer.RealBoundsRev[0].V = 0;
            initLayer.RealBounds[0].V    = 0.5;
            // initLayer.RealCells.ForEach(n => n.u = 0.5);
            initLayer.SynchNodes_X_V();
            return(solver);
        }