public void EditorTypesSupported() { var cfg = new SowfaProjectConfiguration(); foreach (SowfaProjectItemType et in Enum.GetValues(typeof(SowfaProjectItemType))) { Assert.Contains(et, cfg.ProjectItemsMap.Keys); } }
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>"); } }
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(); } }
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] }); }
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], }); }
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], }); }