コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }