예제 #1
0
        /// <summary>
        /// Writes two files - blockMeshDict and topoSetDict
        /// </summary>
        /// <param name="path">Project directory</param>
        /// <returns></returns>
        public override void Write(string path, object data)
        {
            var d = (AblGeometryData)data;

            var bHandler = new BlockMeshDictHandler();
            var bPath = bHandler.GetPath(path);
            bHandler.Write(bPath, d.BlockMesh);

            var tHandler = new TopoSetDictHandler();
            var tPath = tHandler.GetPath(path);
            tHandler.Write(tPath, d.TopoSet);
        }
예제 #2
0
        public SolverData()
        {
            FieldEpsilon = new FieldEpsilon();
            FieldK = new FieldK();
            FieldNut = new BoundaryField();
            FieldP = new FieldP();
            FieldR = new FieldR();
            FieldU = new FieldU();
            #region Handlers
            _controlDictHandler = new ControlDictHandler();
            _transportPropHandler = new TransportPropertiesHandler();
            _blockMeshHandler = new BlockMeshDictHandler();
            _turbineArrayPropHandler = new TurbineArrayPropHandler();
            _turbineProperiesHandler = new TurbineProperiesHandler("NREL5MWRef", true);
            _fieldEpsilonHandler = new FieldEpsilonHandler();
            _fieldKHandler = new FieldKHandler();
            _fieldPHandler = new FieldPHandler();
            _fieldUHandler = new FieldUHandler();
            _fieldRHandler = new FieldRHandler();
            _fvSolutionHandler = new FvSolutionHandler();
            _fvSchemesHandler = new FvSchemesHandler();
            _decomposeParDictHandler = new DecomposeParDictHandler();
            _turbulencePropertiesHandler = new TurbulencePropertiesHandler();
            _airfoilPropertiesHandler = new AirfoilPropertiesHandler(null);
            #endregion

            #region Data
            BlockMeshDict = (BlockMeshDictData) _blockMeshHandler.Read(null);
            ControlDict = (ControlDictData) _controlDictHandler.Read(null);
            TransportProperties = (TransportPropertiesData) _transportPropHandler.Read(null);
            TurbineArrayProperties = (TurbineArrayPropData) _turbineArrayPropHandler.Read(null);
            TurbineProperties = (TurbinePropertiesData) _turbineProperiesHandler.Read(null);
            FvSolution = (FvSolutionData) _fvSolutionHandler.Read(null);
            FvScheme = (FvSchemesData) _fvSchemesHandler.Read(null);
            DecomposeParDict = (DecomposeParDictData) _decomposeParDictHandler.Read(null);
            TurbulenceProperties = (TurbulencePropertiesData)_turbulencePropertiesHandler.Read(null);

            AirfoilData = _airfoilPropertiesHandler.ReadDefault();

            #endregion

            /* extra post-initialize calls */
            InitTransportProperties(TransportProperties);
            InitFieldK(FieldK);
            InitFieldEpsilon(FieldEpsilon);
            InitFieldP(FieldP);
            InitFieldR(FieldR);
            InitFieldU(FieldU);

            AirfoilProperties = new AirfoilPropertiesData();
            ProcessingSettings = new ProcessingSettings();
        }
예제 #3
0
        /// <summary>
        /// Reads two files - blockMeshDict and topoSetDict
        /// </summary>
        /// <param name="path">Project directory</param>
        /// <returns></returns>
        public override object Read(string path)
        {
            var d = new AblGeometryData();
            
            var bHandler = new BlockMeshDictHandler();
            var bPath = bHandler.GetPath(path);
            d.BlockMesh = (BlockMeshDictData)bHandler.Read(bPath);

            var tHandler = new TopoSetDictHandler();
            var tPath = tHandler.GetPath(path);
            d.TopoSet = (TopoSetDictData)tHandler.Read(tPath);
            
            return d;
        }