private SceneObject[] GetWellObjects(SimulationInputData inputData, CatesianGrid grid, string fileName) { var result = new List <SceneObject>(); List <CSharpGL.Tuple <WellRenderer, LabelRenderer> > wellList = this.CreateWellList(inputData, grid); if (wellList == null) { return(result.ToArray()); } //this.AddWellNodes(gridderNode, this.scene, well3dList); foreach (var item in wellList) { item.Item1.Initialize(); SceneObject wellObj = item.Item1.WrapToSceneObject(new ModelScaleScript()); { BoundingBoxRenderer boxRenderer = item.Item1.GetBoundingBoxRenderer(); SceneObject boxObj = boxRenderer.WrapToSceneObject(new ModelScaleScript()); wellObj.Children.Add(boxObj); } result.Add(wellObj); { SceneObject labelObj = item.Item2.WrapToSceneObject( new ModelScaleScript(), new LabelTargetScript(item.Item1)); wellObj.Children.Add(labelObj); } } return(result.ToArray()); }
private SceneObject[] GetWellObjects(SimulationInputData inputData, CatesianGrid grid, string fileName) { var result = new List<SceneObject>(); List<CSharpGL.Tuple<WellRenderer, LabelRenderer>> wellList = this.CreateWellList(inputData, grid); if (wellList == null) { return result.ToArray(); } //this.AddWellNodes(gridderNode, this.scene, well3dList); foreach (var item in wellList) { item.Item1.Initialize(); SceneObject wellObj = item.Item1.WrapToSceneObject(new ModelScaleScript()); { BoundingBoxRenderer boxRenderer = item.Item1.GetBoundingBoxRenderer(); SceneObject boxObj = boxRenderer.WrapToSceneObject(new ModelScaleScript()); wellObj.Children.Add(boxObj); } result.Add(wellObj); { SceneObject labelObj = item.Item2.WrapToSceneObject( new ModelScaleScript(), new LabelTargetScript(item.Item1)); wellObj.Children.Add(labelObj); } } return result.ToArray(); }
private SimulationInputData LoadEclInputData(String fileName) { KeywordSchema schema = KeywordSchemaExtension.RestoreSchemaFromEmbededResource(); SimulationInputData inputData = new SimulationInputData(schema); inputData.ThrowError = true; inputData.LoadFromFile(fileName); return inputData; }
private SimulationInputData LoadEclInputData(String fileName) { KeywordSchema schema = KeywordSchemaExtension.RestoreSchemaFromEmbededResource(); SimulationInputData inputData = new SimulationInputData(schema); inputData.ThrowError = true; inputData.LoadFromFile(fileName); return(inputData); }
private List<CSharpGL.Tuple<WellRenderer, LabelRenderer>> CreateWellList(SimulationInputData inputData, CatesianGrid grid) { WellSpecsCollection wellSpecsList = inputData.RootDataFile.GetWELSPECS(); WellCompatCollection wellCompatList = inputData.RootDataFile.GetCOMPDAT(); if (wellSpecsList == null || wellSpecsList.Count <= 0) { throw new ArgumentException("not found WELLSPECS info for the well"); } // rename Well3DHelper to WellPipelineBuilder. WellPipelineBuilder well3DHelper = new HexahedronGridWellPipelineBuilder(grid); return well3DHelper.Convert(-grid.DataSource.Position, wellSpecsList, wellCompatList); }
private List <CSharpGL.Tuple <WellRenderer, LabelRenderer> > CreateWellList(SimulationInputData inputData, CatesianGrid grid) { WellSpecsCollection wellSpecsList = inputData.RootDataFile.GetWELSPECS(); WellCompatCollection wellCompatList = inputData.RootDataFile.GetCOMPDAT(); if (wellSpecsList == null || wellSpecsList.Count <= 0) { throw new ArgumentException("not found WELLSPECS info for the well"); } // rename Well3DHelper to WellPipelineBuilder. WellPipelineBuilder well3DHelper = new HexahedronGridWellPipelineBuilder(grid); return(well3DHelper.Convert(-grid.DataSource.Position, wellSpecsList, wellCompatList)); }
public static CatesianGrid DumpCatesianGrid(this SimulationInputData inputData, float minColorCode, float maxColorCode) { GridDimens dimens = inputData.RootDataFile.GetDIMENS(); if (dimens == null) { throw new ArgumentException("Missing DIMENS or SPECGRID"); } float[] dx = inputData.RootDataFile.GetDX(); if (dx == null) { throw new ArgumentException("Missing DX or related description"); } float[] dy = inputData.RootDataFile.GetDY(); if (dy == null) { throw new ArgumentException("Missing DY or related description"); } float[] dz = inputData.RootDataFile.GetDZ(); if (dy == null) { throw new ArgumentException("Missing DZ or related description"); } var dataSource = new CatesianGridderSource(); dataSource.NX = dimens.NI; dataSource.NY = dimens.NJ; dataSource.NZ = dimens.NK; dataSource.DX = dx; dataSource.DY = dy; dataSource.DZ = dz; dataSource.TOPS = inputData.RootDataFile.GetTOPS(); dataSource.ActiveBlocks = inputData.RootDataFile.GetACTNUM(); dataSource.IBlocks = SimLab.ArrayHelper.CreateAllSlices(dimens.NI); dataSource.JBlocks = SimLab.ArrayHelper.CreateAllSlices(dimens.NJ); dataSource.KBlocks = SimLab.ArrayHelper.CreateAllSlices(dimens.NK); dataSource.Init(); List <GridBlockProperty> gridProps = inputData.RootDataFile.GetGridProperties(); var grid = new CatesianGrid(dataSource, gridProps, minColorCode, maxColorCode); return(grid); }