示例#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();
        }
示例#2
0
        private static void InitFieldR(FieldR f)
        {
            f.InternalField.Type = PatchValueType.Uniform;
            f.InternalField.Value1 = 0;
            f.InternalField.Value2 = 0;
            f.InternalField.Value3 = 0;
            f.InternalField.Value4 = 0;
            f.InternalField.Value5 = 0;
            f.InternalField.Value6 = 0;

            f.BottomType = PatchType.zeroGradient;
            f.TopType = PatchType.zeroGradient;

            f.WestType = PatchType.fixedValue;
            f.WestValue.Type = PatchValueType.Uniform;
            f.WestValue.Value1 = 0;
            f.WestValue.Value2 = 0;
            f.WestValue.Value3 = 0;
            f.WestValue.Value4 = 0;
            f.WestValue.Value5 = 0;
            f.WestValue.Value6 = 0;

            f.EastType = PatchType.zeroGradient;
            f.NorthType = PatchType.zeroGradient;

            f.SouthType = PatchType.fixedValue;
            f.SouthValue.Type = PatchValueType.Uniform;
            f.SouthValue.Value1 = 0;
            f.SouthValue.Value2 = 0;
            f.SouthValue.Value3 = 0;
            f.SouthValue.Value4 = 0;
            f.SouthValue.Value5 = 0;
            f.SouthValue.Value6 = 0;
        }