Esempio n. 1
0
 public VTurbineArrayInstance()
 {
     ShowInstance        = Visibility.Visible;
     PointDistType       = "uniform";
     PointInterpType     = PointInterpType.linear;
     BladeUpdateType     = BladeUpdateType.newPosition;
     TipRootLossCorrType = TipRootLossCorrType.none;
     RotationDir         = "cw";
     TurbineType         = "";
     TypesCopy           = null;
     BaseLocation        = new VVertice(null);
 }
 public VTurbineArrayInstance()
 {
     ShowInstance = Visibility.Visible;
     PointDistType = "uniform";
     PointInterpType = PointInterpType.linear;
     BladeUpdateType = BladeUpdateType.newPosition;
     TipRootLossCorrType = TipRootLossCorrType.none;
     RotationDir = "cw";
     TurbineType = "";
     TypesCopy = null;
     BaseLocation = new VVertice(null);
 }
Esempio n. 3
0
        public VTurbineType(string typeInstance, string path, bool useDefaultData)
        {
            if (typeInstance == null)
            {
                return;
            }
            _fileHandler = new TurbineProperiesHandler(typeInstance, useDefaultData);
            var d = (TurbinePropertiesData)_fileHandler.Read(_fileHandler.GetPath(path));

            PropName     = typeInstance;
            ShowInstance = Visibility.Visible;
            BladeIner    = d.BladeIner;
            HubIner      = d.HubIner;
            HubRad       = d.HubRad;
            NumBl        = d.NumBl;
            Update_TipPicture();
            TipRad               = d.TipRad;
            UndSling             = d.UndSling;
            OverHang             = d.OverHang;
            TowerHt              = d.TowerHt;
            Twr2Shft             = d.Twr2Shft;
            ShftTilt             = d.ShftTilt;
            PreCone              = new VVertice(d.PreCone);
            GBRatio              = d.GBRatio;
            GenIner              = d.GenIner;
            TorqueControllerType = d.TorqueControllerType;
            YawControllerType    = d.YawControllerType;
            PitchControllerType  = d.PitchControllerType;

            #region Fill TorqueControllerParams
            if (d.torqueControllerParams != null)
            {
                CutInGenSpeed        = d.torqueControllerParams.CutInGenSpeed;
                RatedGenSpeed        = d.torqueControllerParams.RatedGenSpeed;
                Region2StartGenSpeed = d.torqueControllerParams.Region2StartGenSpeed;
                Region2EndGenSpeed   = d.torqueControllerParams.Region2EndGenSpeed;
                CutInGenTorque       = d.torqueControllerParams.CutInGenTorque;
                RatedGenTorque       = d.torqueControllerParams.RatedGenTorque;
                RateLimitGenTorque   = d.torqueControllerParams.RateLimitGenTorque;
                KGen = d.torqueControllerParams.KGen;
                TorqueControllerRelax = d.torqueControllerParams.TorqueControllerRelax;
            }

            #endregion
            #region Fill PitchControllerParams
            if (d.pitchControllerParams != null)
            {
                PitchControlStartPitch = d.pitchControllerParams.PitchControlStartPitch;
                PitchControlEndPitch   = d.pitchControllerParams.PitchControlEndPitch;
                PitchControlStartSpeed = d.pitchControllerParams.PitchControlStartSpeed;
                PitchControlEndSpeed   = d.pitchControllerParams.PitchControlEndSpeed;
                RateLimitPitch         = d.pitchControllerParams.RateLimitPitch;
            }
            #endregion

            airfoilBlade = new ObservableCollection <VAirfoilBlade>();

            foreach (var x in d.airfoilBlade)
            {
                var copyOfBlade = new ObservableCollection <VVertice>();
                foreach (var y in x.Blade)
                {
                    copyOfBlade.Add(new VVertice(y));
                }
                airfoilBlade.Add(new VAirfoilBlade()
                {
                    AirfoilName = x.AirfoilName,
                    Blade       = copyOfBlade
                });
            }
        }
Esempio n. 4
0
        public VTurbineType( string typeInstance, string path, bool useDefaultData )
        {
            if (typeInstance == null) return;
            _fileHandler = new TurbineProperiesHandler(typeInstance, useDefaultData);
            var d = (TurbinePropertiesData)_fileHandler.Read(_fileHandler.GetPath(path));

            PropName = typeInstance;
            ShowInstance = Visibility.Visible;
            BladeIner = d.BladeIner;
            HubIner = d.HubIner;
            HubRad = d.HubRad;
            NumBl = d.NumBl;
            Update_TipPicture();
            TipRad = d.TipRad;
            UndSling = d.UndSling;
            OverHang = d.OverHang;
            TowerHt = d.TowerHt;
            Twr2Shft = d.Twr2Shft;
            ShftTilt = d.ShftTilt;
            PreCone = new VVertice(d.PreCone);
            GBRatio = d.GBRatio;
            GenIner = d.GenIner;
            TorqueControllerType = d.TorqueControllerType;
            YawControllerType = d.YawControllerType;
            PitchControllerType = d.PitchControllerType;

                #region Fill TorqueControllerParams
            if (d.torqueControllerParams != null)
            {
                CutInGenSpeed = d.torqueControllerParams.CutInGenSpeed;
                RatedGenSpeed = d.torqueControllerParams.RatedGenSpeed;
                Region2StartGenSpeed = d.torqueControllerParams.Region2StartGenSpeed;
                Region2EndGenSpeed = d.torqueControllerParams.Region2EndGenSpeed;
                CutInGenTorque = d.torqueControllerParams.CutInGenTorque;
                RatedGenTorque = d.torqueControllerParams.RatedGenTorque;
                RateLimitGenTorque = d.torqueControllerParams.RateLimitGenTorque;
                KGen = d.torqueControllerParams.KGen;
                TorqueControllerRelax = d.torqueControllerParams.TorqueControllerRelax;
            }

            #endregion
                #region Fill PitchControllerParams
            if (d.pitchControllerParams != null)
            {
                PitchControlStartPitch = d.pitchControllerParams.PitchControlStartPitch;
                PitchControlEndPitch = d.pitchControllerParams.PitchControlEndPitch;
                PitchControlStartSpeed = d.pitchControllerParams.PitchControlStartSpeed;
                PitchControlEndSpeed = d.pitchControllerParams.PitchControlEndSpeed;
                RateLimitPitch = d.pitchControllerParams.RateLimitPitch;
            }
            #endregion

            airfoilBlade = new ObservableCollection<VAirfoilBlade>();

            foreach (var x in d.airfoilBlade)
            {
                var copyOfBlade = new ObservableCollection<VVertice>();
                foreach (var y in x.Blade)
                {
                    copyOfBlade.Add(new VVertice(y));
                }
                airfoilBlade.Add(new VAirfoilBlade()
                {
                    AirfoilName = x.AirfoilName,
                    Blade = copyOfBlade
                });
            }
        }