예제 #1
0
 private void OnMaterialStateTypeChanged(DryingMaterialStream materialStream, MaterialStateType materialStateType)
 {
     if (MaterialStateTypeChanged != null)
     {
         MaterialStateTypeChanged(materialStream, materialStateType);
     }
 }
예제 #2
0
        public override void SetObjectData()
        {
            base.SetObjectData();
            int persistedClassVersion = (int)info.GetValue("ClassPersistenceVersionDryingMaterialStream", typeof(int));

            if (persistedClassVersion == 1)
            {
                this.massConcentration = RecallStorableObject("MassConcentration", typeof(ProcessVarDouble)) as ProcessVarDouble;
                this.materialStateType = (MaterialStateType)info.GetValue("MaterialStateType", typeof(MaterialStateType));
                //since moistureProperties is not stored we need to initialize it here so that
                //it is as if it is stored and recalled back
                //InitializeMoistureProperties();
            }
        }
예제 #3
0
        public DryingMaterialStream(string name, MaterialComponents mComponents, MaterialStateType materialStateType, UnitOperationSystem uoSys)
            : base(name, mComponents, uoSys)
        {
            this.materialStateType = materialStateType;
            massConcentration      = new ProcessVarDouble(StringConstants.MASS_CONCENTRATION, PhysicalQuantity.MoistureContent, VarState.Specified, this);
            if (materialStateType == MaterialStateType.Liquid)
            {
                volumeFlowRate.Type = PhysicalQuantity.VolumeRateFlowLiquids;
            }
            else if (materialStateType == MaterialStateType.Solid)
            {
                pressure.Enabled          = false;
                vaporFraction.Enabled     = false;
                massConcentration.Enabled = false;
            }

            InitializeVarListAndRegisterVars();
        }