/// <summary> /// Initialize Regions in RefinementSurfaces. /// </summary> private void InitRegionsRefinement() { Vector vec = new Vector(); string name; //patchtype dict Dictionary <string, object> patchType = new Dictionary <string, object> { { "type", "patch" } }; foreach (var face in m_Faces) { name = face.Key.Key; name = name.Replace(" ", "_"); if (name.Contains("Inlet") || name.Contains("Zuluft")) { vec = (Vector)m_SettingsCMC["inletLevel"]; } else if (name.Contains("Outlet") || name.Contains("Abluft")) { vec = (Vector)m_SettingsCMC["outletLevel"]; } m_RefinementSurfaces.Add(name, new Dictionary <string, object>() { { level, vec }, { "patchInfo", patchType } }); //m_RegionsRefinementCastellated.Add(name, new Dictionary<string, object>() { { level, vec} }); } foreach (var entry in BIM.OpenFOAMExport.Exporter.Instance.settings.MeshResolution) { name = AutodeskHelperFunctions.GenerateNameFromElement(entry.Key); //if(name.Contains("Zuluft") || name.Contains("Abluft") || name.Contains("Outlet") || name.Contains("Inlet")) //{ // //name = "Terminal_" + name; // m_RegionsRefinementCastellated[name] = ; // continue; //} vec = new Vector(entry.Value, entry.Value); if (name.Contains("Zuluft") || name.Contains("Abluft") || name.Contains("Outlet") || name.Contains("Inlet")) { //name = "Terminal_" + name; m_RegionsRefinementCastellated[name] = new Dictionary <string, object>() { { level, vec } }; } else { m_RegionsRefinementCastellated.Add(name, new Dictionary <string, object>() { { level, vec } }); } } }
/// <summary> /// Initialize the regions in the Geometry-Dictionary /// </summary> private void InitGeometryRegions() { string name; string wallName = "wallSTL"; m_Regions.Add(wallName, new Dictionary <string, object> { { nameGeometry, wallName } }); foreach (var face in m_Faces) { //face.Key.Key = Name + ID name = face.Key.Key; name = name.Replace(" ", "_"); //m_Regions.Add(name, new Dictionary<string, object> { { nameGeometry, name } }); m_Regions.Add(name, new Dictionary <string, object> { { nameGeometry, name } }); } foreach (var entry in BIM.OpenFOAMExport.Exporter.Instance.settings.MeshResolution) { name = AutodeskHelperFunctions.GenerateNameFromElement(entry.Key); m_Regions.Add(name, new Dictionary <string, object> { { nameGeometry, name } }); } foreach (var entry in BIM.OpenFOAMExport.Exporter.Instance.settings.m_InletElements) { name = AutodeskHelperFunctions.GenerateNameFromElement(entry); m_Regions.Add("Inlet_" + name, new Dictionary <string, object> { { nameGeometry, "Inlet_" + name } }); } foreach (var entry in BIM.OpenFOAMExport.Exporter.Instance.settings.m_OutletElements) { name = AutodeskHelperFunctions.GenerateNameFromElement(entry); m_Regions.Add("Outlet_" + name, new Dictionary <string, object> { { nameGeometry, "Outlet_" + name } }); } }
/// <summary> /// Initialize Regions in RefinementSurfaces. /// </summary> private void InitRegionsRefinement() { Vector vec = new Vector(); string name; //patchtype dict Dictionary <string, object> patchType = new Dictionary <string, object> { { "type", "patch" } }; Settings s = Exporter.Instance.settings; if (s.RefinementBoxOrigin[0] != 0) { int lev = s.RefinementBoxLevel; m_RefinementRegions.Add("boxRotated", new Dictionary <string, object>() { { "mode", "inside" }, { "levels", "((0.0001 " + lev + "))" } }); } foreach (var face in m_Faces) { name = face.Key.Key; name = name.Replace(" ", "_"); if (name.Contains("Inlet") || name.Contains("Zuluft")) { vec = (Vector)m_SettingsCMC["inletLevel"]; } else if (name.Contains("Outlet") || name.Contains("Abluft")) { vec = (Vector)m_SettingsCMC["outletLevel"]; } m_RefinementSurfaces.Add(name, new Dictionary <string, object>() { { level, vec }, { "patchInfo", patchType } }); //m_RegionsRefinementCastellated.Add(name, new Dictionary<string, object>() { { level, vec} }); } foreach (var entry in Exporter.Instance.settings.MeshResolution) { name = AutodeskHelperFunctions.GenerateNameFromElement(entry.Key); //if(name.Contains("Zuluft") || name.Contains("Abluft") || name.Contains("Outlet") || name.Contains("Inlet")) //{ // //name = "Terminal_" + name; // m_RegionsRefinementCastellated[name] = ; // continue; //} vec = new Vector(entry.Value, entry.Value); //m_RefinementSurfaces.Add(name, new Dictionary<string, object>() { { level, vec }, { "patchInfo", "wall" } }); m_RefinementSurfaces.Add(name, new Dictionary <string, object>() { { level, vec } }); } foreach (var entry in Exporter.Instance.settings.m_InletElements) { name = AutodeskHelperFunctions.GenerateNameFromElement(entry); vec = (Vector)m_SettingsCMC["inletLevel"]; m_RefinementSurfaces.Add("Inlet_" + name, new Dictionary <string, object>() { { level, vec }, { "patchInfo", patchType } }); } foreach (var entry in Exporter.Instance.settings.m_OutletElements) { name = AutodeskHelperFunctions.GenerateNameFromElement(entry); vec = (Vector)m_SettingsCMC["outletLevel"]; m_RefinementSurfaces.Add("Outlet_" + name, new Dictionary <string, object>() { { level, vec }, { "patchInfo", patchType } }); } }