Esempio n. 1
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();
        }
Esempio n. 2
0
        private static void InitFieldP(FieldP f)
        {
            f.BottomType = PatchType.zeroGradient;
            f.TopType = PatchType.zeroGradient;
            f.WestType = PatchType.zeroGradient;

            f.EastType = PatchType.fixedValue;
            f.EastValue.Type = PatchValueType.Uniform;
            f.EastValue.Value = 0m;

            f.NorthType = PatchType.zeroGradient;

            f.SouthType = PatchType.fixedValue;
            f.SouthValue.Type = PatchValueType.Uniform;
            f.SouthValue.Value = 0m;
        }