예제 #1
0
        public void EditorTypesSupported()
        {
            var cfg = new SowfaProjectConfiguration();

            foreach (SowfaProjectItemType et in Enum.GetValues(typeof(SowfaProjectItemType)))
            {
                Assert.Contains(et, cfg.ProjectItemsMap.Keys);
            }
        }
예제 #2
0
        public void GetXml()
        {
            var cfg = new SowfaProjectConfiguration();

            foreach (var pair in cfg.ProjectItemsMap)
            {
                Console.WriteLine("<item>");

                Console.WriteLine("\t<key>{0}</key>", pair.Key);
                Console.WriteLine("\t<code>{0}</code>", pair.Value.Code);
                Console.WriteLine("\t<title>{0}</title>", pair.Value.DefaultName);
                Console.WriteLine("\t<form>{0}</form>", pair.Value.Form);

                Console.WriteLine("</item>");
            }
        }
예제 #3
0
        public void Generate()
        {
            var cfg = new SowfaProjectConfiguration();

            foreach (var pair in cfg.ProjectItemsMap)
            {
                Console.WriteLine("\tnew ProjectItemDescriptor()");
                Console.WriteLine("\t\t.SetDefaultName(\"{0}\")", pair.Value.DefaultName);
                Console.WriteLine("\t\t.SetForm(typeof({0}))", pair.Value.Form.Name);
                Console.WriteLine("\t\t.SetCommandSave({0})", pair.Value.CommandSave);
                Console.WriteLine("\t\t.SetInitializer({0})", pair.Value.FormInitializer);
                Console.WriteLine("\t\t.SetCode(SowfaProjectItemType.{0}.ToString())", pair.Key);
                Console.WriteLine("\t\t.AddTo(ProjectItemsMap, SowfaProjectItemType.{0});", pair.Key);
                Console.WriteLine();
            }
        }
예제 #4
0
        public AblGeometryAndMesh()
        {
            Order = 2;
            var config = new SowfaProjectConfiguration();

            Category    = ProjectCategory.SOWFA;
            Name        = "ABL Geometry & Mesh";
            Code        = ProjectCode.SowfaGeometyAndMesh;
            Description =
                @"A convenient geometry and mesh generator for Atmospheric Boundary Layer (ABL) based on blockMesh utility.";

            DefaultItems.AddRange(new[]
            {
                config.ProjectItemsMap[SowfaProjectItemType.Preprocessor_AblGeometry],
                config.ProjectItemsMap[SowfaProjectItemType.Preprocessor_AblMesh]
            });
        }
예제 #5
0
        public AblGeometryAndMesh()
        {
            Order = 2;
            var config = new SowfaProjectConfiguration();

            Category = ProjectCategory.SOWFA;
            Name = "ABL Geometry & Mesh";
            Code = ProjectCode.SowfaGeometyAndMesh;
            Description =
                @"A convenient geometry and mesh generator for Atmospheric Boundary Layer (ABL) based on blockMesh utility.";

            DefaultItems.AddRange(new[]
            {
                config.ProjectItemsMap[SowfaProjectItemType.Preprocessor_AblGeometry],
                config.ProjectItemsMap[SowfaProjectItemType.Preprocessor_AblMesh]
            });
        }
예제 #6
0
        public FastPisoSolver()
        {
            Order = 4;
            var config = new SowfaProjectConfiguration();

            ProductType = ProductType.CFD;
            Name        = "FAST PISO Solver";
            Code        = ProductCode.Sowfa_PisoFast;
            Description = @"An incompressible Navier-Stokes LES solver (no temperature equation) with the actuator line turbine model coupled to NREL's FAST aeroelastic and turbine system dynamics code.";
            DefaultItems.AddRange(new[]
            {
                config.ProjectItemsMap[SowfaProjectItemType.Constant_LesProperties],
                config.ProjectItemsMap[SowfaProjectItemType.Constant_TransportProperties],
                config.ProjectItemsMap[SowfaProjectItemType.Constant_TurbineArrayProperties],
                config.ProjectItemsMap[SowfaProjectItemType.Constant_TurbulenceProperties],
                config.ProjectItemsMap[SowfaProjectItemType.FAST_controlDict],
                config.ProjectItemsMap[SowfaProjectItemType.System_Schemes],
                config.ProjectItemsMap[SowfaProjectItemType.System_Solution],
                config.ProjectItemsMap[SowfaProjectItemType.FAST_0_nuSgs],
                config.ProjectItemsMap[SowfaProjectItemType.FAST_0_p],
                config.ProjectItemsMap[SowfaProjectItemType.FAST_0_U],
            });
        }
예제 #7
0
        public WindPlantPisoFastSolver()
        {
            Order = 6;
            var config = new SowfaProjectConfiguration();

            ProductType = ProductType.CFD;
            Name        = "Wind Plant PISO-FAST Solver";
            Code        = ProductCode.Sowfa_WindPlantPisoFast;
            Description = @"Like windPlantPisoSolver with FAST coupled to the actuator line turbine model.";
            DefaultItems.AddRange(new[]
            {
                config.ProjectItemsMap[SowfaProjectItemType.Constant_Gravitation],
                config.ProjectItemsMap[SowfaProjectItemType.Constant_Omega],
                config.ProjectItemsMap[SowfaProjectItemType.Constant_TransportProperties],
                config.ProjectItemsMap[SowfaProjectItemType.Constant_AblProperties],
                config.ProjectItemsMap[SowfaProjectItemType.WP_FAST_controlDict],
                config.ProjectItemsMap[SowfaProjectItemType.WP_changeDict],
                config.ProjectItemsMap[SowfaProjectItemType.System_Schemes],
                config.ProjectItemsMap[SowfaProjectItemType.System_Solution],
                config.ProjectItemsMap[SowfaProjectItemType.WP_FAST_0_pd],
                config.ProjectItemsMap[SowfaProjectItemType.WP_FAST_0_T],
                config.ProjectItemsMap[SowfaProjectItemType.WP_FAST_0_U],
            });
        }