public BagFilter(string name, UnitOperationSystem uoSys) : base(name, uoSys) { bagDiameter = new ProcessVarDouble(StringConstants.BAG_DIAMETER, PhysicalQuantity.Length, VarState.Specified, this); bagLength = new ProcessVarDouble(StringConstants.BAG_LENGTH, PhysicalQuantity.Length, VarState.Specified, this); numberOfBags = new ProcessVarDouble(StringConstants.NUMBER_OF_BAGS, PhysicalQuantity.Unknown, VarState.AlwaysCalculated, this); InitializeVarListAndRegisterVars(); }
public double Calculate(int id, UnitOperationSystem unitOpSystem, Hashtable values) { string formula = (string)unitOpSystem.FormulaTable[id]; // the keys is needed to sort the keys in the hashmap // and start replacing the longer ids with the values in the formula ArrayList keys = new ArrayList(); IEnumerator e = values.GetEnumerator(); while (e.MoveNext()) { IDictionaryEnumerator de = (IDictionaryEnumerator)e.Current; keys.Add(de.Key); } keys.Sort(); // numbers in increasing order // replace the literals with their values for (int i = 0; i < keys.Count; i++) { int key = (int)keys[keys.Count - 1 - i]; double val = (double)values[key]; string keyStr = "v" + key.ToString(); string valStr = val.ToString(); formula = formula.Replace(keyStr, valStr); } // calculate the numerical expression return(ExpressionCalculator.CalculateExpression(formula)); }
public WaterStream(string name, MaterialComponents mComponents, UnitOperationSystem uoSys) : base(name, mComponents, uoSys) { InitializeVarListAndRegisterVars(); density.State = VarState.AlwaysCalculated; specificHeat.State = VarState.AlwaysCalculated; specificEnthalpy.State = VarState.AlwaysCalculated; }
public Ejector(string name, UnitOperationSystem uoSys) : base(name, uoSys) { entrainmentRatio = new ProcessVarDouble(StringConstants.ENTRAINMENT_RATIO, PhysicalQuantity.Fraction, VarState.Specified, this); compressionRatio = new ProcessVarDouble(StringConstants.COMPRESSION_RATIO, PhysicalQuantity.Fraction, VarState.Specified, this); suctionMotivePressureRatio = new ProcessVarDouble(StringConstants.SUCTION_MOTIVE_PRESSURE_RATIO, PhysicalQuantity.Fraction, VarState.Specified, this); InitializeVarListAndRegisterVars(); }
public ArrayList GetIndependentVariables(int id, UnitOperationSystem unitOpSystem) { string formula = (string)unitOpSystem.FormulaTable[id]; // get a list with indexes of v ArrayList vs = new ArrayList(); for (int i = 0; i < formula.Length; i++) { char c = formula[i]; if (c == 'v') { vs.Add(i); } } // for every index (v) find the id and put it on the list ArrayList ids = new ArrayList(); IEnumerator e = vs.GetEnumerator(); while (e.MoveNext()) { int idx = (int)e.Current; int identifier = this.GetId(idx, formula); ids.Add(identifier); } return(ids); }
//private double hLoss, hInput, cp, t1, t2, wb; //private double hLoss, hInput, h1, h2, wb; public Heater(string name, UnitOperationSystem uoSys) : base(name, uoSys) { pressureDrop = new ProcessVarDouble(StringConstants.PRESSURE_DROP, PhysicalQuantity.Pressure, VarState.Specified, this); heatInput.Name = StringConstants.HEATING_DUTY; heatInput.Value = Constants.NO_VALUE; InitializeVarListAndRegisterVars(); }
public ElectrostaticPrecipitator(string name, UnitOperationSystem uoSys) : base(name, uoSys) { balanceModel = new GasSolidSeparatorBalanceModel(this); driftVelocity = new ProcessVarDouble(StringConstants.DRIFT_VELOCITY, PhysicalQuantity.Velocity, VarState.Specified, this); totalSurfaceArea = new ProcessVarDouble(StringConstants.TOTAL_SURFACE_AREA, PhysicalQuantity.Area, VarState.AlwaysCalculated, this); InitializeVarListAndRegisterVars(); }
//public ProcessVarDouble SpecificHeatAbsDry { // get { return specificHeatAbsDry; } //} #endregion //public DryingStream(DryingSystem dryingSystem) : base(dryingSystem) { //} //public DryingStream(string name, UnitOperation upStreamOwner, UnitOperation downStreamOwner, DryingSystem dryingSystem) : base(name, upStreamOwner, downStreamOwner, dryingSystem) { protected DryingStream(string name, MaterialComponents mComponents, UnitOperationSystem uoSys) : base(name, mComponents, uoSys) { massFlowRateDryBase = new ProcessVarDouble(StringConstants.MASS_FLOW_RATE_DRY, PhysicalQuantity.MassFlowRate, VarState.Specified, this); moistureContentDryBase = new ProcessVarDouble(StringConstants.MOISTURE_CONTENT_DRY, PhysicalQuantity.MoistureContent, VarState.Specified, this); moistureContentWetBase = new ProcessVarDouble(StringConstants.MOISTURE_CONTENT_WET, PhysicalQuantity.MoistureContent, VarState.Specified, this); specificHeatDryBase = new ProcessVarDouble(StringConstants.SPECIFIC_HEAT_DRY, PhysicalQuantity.SpecificHeat, VarState.AlwaysCalculated, this); specificEnthalpyDryBase = new ProcessVarDouble(StringConstants.SPECIFIC_ENTHALPY_DRY, PhysicalQuantity.SpecificHeat, VarState.Specified, this); //specificHeatAbsDry = new ProcessVarDouble(StringConstants.SPECIFIC_HEAT_ABS_DRY, PhysicalQuantity.SpecificHeat, VarState.Specified, this); }
public Cyclone(string name, UnitOperationSystem uoSys) : base(name, uoSys) { /*pressureDrop = new ProcessVarDouble(StringConstants.PRESSURE_DROP, PhysicalQuantity.Pressure, VarState.Specified, this); * collectionEfficiency = new ProcessVarDouble(StringConstants.COLLECTION_EFFICIENCY, PhysicalQuantity.Fraction, VarState.Specified, this); * inletParticleLoading = new ProcessVarDouble(StringConstants.INLET_PARTICLE_LOADING, PhysicalQuantity.MassVolumeConcentration, VarState.Specified, this); * outletParticleLoading = new ProcessVarDouble(StringConstants.OUTLET_PARTICLE_LOADING, PhysicalQuantity.MassVolumeConcentration, VarState.Specified, this); * massFlowRateOfParticleLostToGasOutlet = new ProcessVarDouble(StringConstants.PARTICLE_LOSS_TO_GAS_OUTLET, PhysicalQuantity.MassFlowRate, VarState.Specified, this); * InitializeVarListAndRegisterVars();*/ balanceModel = new GasSolidSeparatorBalanceModel(this); }
//public ProcessVarDouble LiquidRecirculationMassFlowRate //{ // get { return liquidRecirculationMassFlowRate;} //} //public ProcessVarDouble LiquidRecirculationVolumeFlowRate //{ // get { return liquidRecirculationVolumeFlowRate;} //} #endregion public WetScrubber(string name, UnitOperationSystem uoSys) : base(name, uoSys) { //scrubberType = ScrubberType.Condensing; balanceModel = new GasSolidSeparatorBalanceModel(this); liquidToGasVolumeRatio = new ProcessVarDouble(StringConstants.LIQUID_GAS_RATIO, PhysicalQuantity.Unknown, VarState.Specified, this); //liquidRecirculationMassFlowRate = new ProcessVarDouble(StringConstants.LIQUID_RECIRCULATION_MASS_FLOW_RATE, PhysicalQuantity.MassFlowRate, VarState.Specified, this); //liquidRecirculationVolumeFlowRate = new ProcessVarDouble(StringConstants.LIQUID_RECIRCULATION_VOLUME_FLOW_RATE, PhysicalQuantity.VolumeFlowRate, VarState.Specified, this); InitializeVarListAndRegisterVars(); }
public Compressor(string name, UnitOperationSystem uoSys) : base(name, uoSys) { compressionProcess = CompressionProcess.Adiabatic; pressureRatio = new ProcessVarDouble(StringConstants.PRESSURE_RATIO, PhysicalQuantity.Unknown, VarState.Specified, this); polytropicExponent = new ProcessVarDouble(StringConstants.POLYTROPIC_EXPONENT, PhysicalQuantity.Unknown, VarState.Specified, this); adiabaticExponent = new ProcessVarDouble(StringConstants.ADIABATIC_EXPONENT, PhysicalQuantity.Unknown, VarState.Specified, this); polytropicEfficiency = new ProcessVarDouble(StringConstants.POLYTROPIC_EFFICIENCY, PhysicalQuantity.Fraction, VarState.AlwaysCalculated, this); adiabaticEfficiency = new ProcessVarDouble(StringConstants.ADIABATIC_EFFICIENCY, PhysicalQuantity.Fraction, VarState.AlwaysCalculated, this); powerInput = new ProcessVarDouble(StringConstants.POWER_INPUT, PhysicalQuantity.Power, VarState.AlwaysCalculated, this); InitializeVarListAndRegisterVars(); }
protected FabricFilter(string name, UnitOperationSystem uoSys) : base(name, uoSys) { /*pressureDrop = new ProcessVarDouble(StringConstants.PRESSURE_DROP, PhysicalQuantity.Pressure, VarState.Specified, this); * collectionEfficiency = new ProcessVarDouble(StringConstants.COLLECTION_EFFICIENCY, PhysicalQuantity.Fraction, VarState.Specified, this); * inletDustLoading = new ProcessVarDouble(StringConstants.INLET_DUST_LOADING, PhysicalQuantity.MassVolumeConcentration, VarState.Specified, this); * outletDustLoading = new ProcessVarDouble(StringConstants.OUTLET_DUST_LOADING, PhysicalQuantity.MassVolumeConcentration, VarState.Specified, this); * dustAccumulationRate = new ProcessVarDouble(StringConstants.DUST_ACCUMULATION_RATE, PhysicalQuantity.MassFlowRate, VarState.AlwaysCalculated, this);*/ balanceModel = new GasSolidSeparatorBalanceModel(this); gasToClothRatio = new ProcessVarDouble(StringConstants.FILTRATION_VELOCITY, PhysicalQuantity.Velocity, VarState.Specified, this); totalFilteringArea = new ProcessVarDouble(StringConstants.TOTAL_FILTERING_AREA, PhysicalQuantity.Area, VarState.AlwaysCalculated, this); }
//public ProcessVarDouble ExcessAir { // get { return excessAir; } //} #endregion #region Constructors public Burner(string name, UnitOperationSystem uoSys) : base(name, uoSys) { excessAir = new ProcessVarDouble(StringConstants.EXCESS_AIR, PhysicalQuantity.Fraction, 0, VarState.Specified, this); totalHeatGeneration = new ProcessVarDouble(StringConstants.TOTAL_HEAT_GENERATED, PhysicalQuantity.Power, VarState.AlwaysCalculated, this); percentageHeatLoss = new ProcessVarDouble(StringConstants.PERCENT_HEAT_LOSS, PhysicalQuantity.Fraction, 0, VarState.Specified, this); heatLoss.State = VarState.AlwaysCalculated; oxygenMassFractionFlueGas = new ProcessVarDouble(StringConstants.FLUE_GAS_OXYGEN_MASS_FRACTION, PhysicalQuantity.Fraction, 0, VarState.AlwaysCalculated, this); oxygenMoleFractionFlueGas = new ProcessVarDouble(StringConstants.FLUE_GAS_OXYGEN_MOLE_FRACTION, PhysicalQuantity.Fraction, 0, VarState.AlwaysCalculated, this); InitializeVarListAndRegisterVars(); }
protected ProcessStreamBase(string name, MaterialComponents mComponents, UnitOperationSystem uoSys) : base(name, uoSys) { this.materialComponents = mComponents; massFlowRate = new ProcessVarDouble(StringConstants.MASS_FLOW_RATE, PhysicalQuantity.MassFlowRate, VarState.Specified, this); volumeFlowRate = new ProcessVarDouble(StringConstants.VOLUME_FLOW_RATE, PhysicalQuantity.VolumeFlowRate, VarState.Specified, this); vaporFraction = new ProcessVarDouble(StringConstants.VAPOR_FRACTION, PhysicalQuantity.Fraction, VarState.Specified, this); pressure = new ProcessVarDouble(StringConstants.PRESSURE, PhysicalQuantity.Pressure, VarState.Specified, this); temperature = new ProcessVarDouble(StringConstants.TEMPERATURE, PhysicalQuantity.Temperature, VarState.Specified, this); specificEnthalpy = new ProcessVarDouble(StringConstants.SPECIFIC_ENTHALPY, PhysicalQuantity.SpecificEnergy, VarState.AlwaysCalculated, this); density = new ProcessVarDouble(StringConstants.DENSITY, PhysicalQuantity.Density, VarState.Specified, this); specificHeat = new ProcessVarDouble(StringConstants.SPECIFIC_HEAT, PhysicalQuantity.SpecificHeat, VarState.AlwaysCalculated, this); //specificVolume = new ProcessVarDouble(StringConstants.SPECIFIC_VOLUME, PhysicalQuantity.SpecificVolume, VarState.AlwaysCalculated, this); //dynamicViscosity = new ProcessVarDouble(StringConstants.DYNAMIC_VISCOSITY, PhysicalQuantity.DynamicViscosity, VarState.Specified, this); //thermalConductivity = new ProcessVarDouble(StringConstants.THERMAL_CONDUCTIVITY, PhysicalQuantity.ThermalConductivity, VarState.Specified, this); }
public Pump(string name, UnitOperationSystem uoSys) : base(name, uoSys) { staticSuctionHead = new ProcessVarDouble(StringConstants.STATIC_SUCTION_HEAD, PhysicalQuantity.LiquidHead, VarState.Specified, this); suctionFrictionHead = new ProcessVarDouble(StringConstants.SUCTION_FRICTION_HEAD, PhysicalQuantity.LiquidHead, 0.0, VarState.Specified, this); staticDischargeHead = new ProcessVarDouble(StringConstants.STATIC_DICHARGE_HEAD, PhysicalQuantity.LiquidHead, VarState.Specified, this); dischargeFrictionHead = new ProcessVarDouble(StringConstants.DISCHARGE_FRICTION_HEAD, PhysicalQuantity.LiquidHead, 0.0, VarState.Specified, this); totalDynamicHead = new ProcessVarDouble(StringConstants.TOTAL_DYNAMIC_HEAD, PhysicalQuantity.LiquidHead, VarState.Specified, this); capacity = new ProcessVarDouble(StringConstants.CAPACITY, PhysicalQuantity.VolumeRateFlowLiquids, VarState.AlwaysCalculated, this); efficiency = new ProcessVarDouble(StringConstants.EFFICIENCY, PhysicalQuantity.Fraction, VarState.Specified, this); powerInput = new ProcessVarDouble(StringConstants.POWER_INPUT, PhysicalQuantity.Power, VarState.AlwaysCalculated, this); includeOutletVelocityEffect = true; outletDiameter = new ProcessVarDouble(StringConstants.OUTLET_DIAMETER, PhysicalQuantity.SmallLength, VarState.Specified, this); outletVelocity = new ProcessVarDouble(StringConstants.OUTLET_VELOCITY, PhysicalQuantity.Velocity, VarState.AlwaysCalculated, this); InitializeVarListAndRegisterVars(); }
public DryingGasStream(string name, MaterialComponents mComponents, UnitOperationSystem uoSys) : base(name, mComponents, uoSys) { temperature.Name = StringConstants.DRY_BULB_TEMPERATURE; wetBulbTemperature = new ProcessVarDouble(StringConstants.WET_BULB_TEMPERATURE, PhysicalQuantity.Temperature, VarState.Specified, this); dewPoint = new ProcessVarDouble(StringConstants.DEW_POINT_TEMPERATURE, PhysicalQuantity.Temperature, VarState.Specified, this); moistureContentDryBase.Name = StringConstants.ABSOLUTE_HUMIDITY; relativeHumidity = new ProcessVarDouble(StringConstants.RELATIVE_HUMIDITY, PhysicalQuantity.Fraction, VarState.Specified, this); humidVolume = new ProcessVarDouble(StringConstants.HUMID_VOLUME, PhysicalQuantity.SpecificVolume, VarState.AlwaysCalculated, this); specificHeatDryBase.Name = StringConstants.HUMID_HEAT; specificEnthalpyDryBase.Name = StringConstants.HUMID_ENTHALPY; volumeFlowRate.Type = PhysicalQuantity.VolumeRateFlowGases; density.State = VarState.AlwaysCalculated; specificHeatDryBase.State = VarState.AlwaysCalculated; vaporFraction.Value = 1.0; InitializeVarListAndRegisterVars(); }
public Fan(string name, UnitOperationSystem uoSys) : base(name, uoSys) { staticPressure = new ProcessVarDouble(StringConstants.STATIC_PRESSURE, PhysicalQuantity.Pressure, VarState.Specified, this); totalDischargePressure = new ProcessVarDouble(StringConstants.TOTAL_DISCHARGE_PRESSURE, PhysicalQuantity.Pressure, VarState.AlwaysCalculated, this); efficiency = new ProcessVarDouble(StringConstants.EFFICIENCY, PhysicalQuantity.Fraction, VarState.Specified, this); powerInput = new ProcessVarDouble(StringConstants.POWER_INPUT, PhysicalQuantity.Power, VarState.AlwaysCalculated, this); outletCrossSectionType = CrossSectionType.Circle; outletDiameter = new ProcessVarDouble(StringConstants.OUTLET_DIAMETER, PhysicalQuantity.SmallLength, VarState.Specified, this); outletWidth = new ProcessVarDouble(StringConstants.WIDTH, PhysicalQuantity.SmallLength, VarState.Specified, this); outletHeight = new ProcessVarDouble(StringConstants.HEIGHT, PhysicalQuantity.SmallLength, VarState.Specified, this); outletHeightWidthRatio = new ProcessVarDouble(StringConstants.HEIGHT_WIDTH_RATIO, PhysicalQuantity.Unknown, VarState.Specified, this); includeOutletVelocityEffect = true; outletVelocity = new ProcessVarDouble(StringConstants.OUTLET_VELOCITY, PhysicalQuantity.Velocity, VarState.AlwaysCalculated, this); //outletGeometry = new CrossSectionGeometry(this); InitializeVarListAndRegisterVars(); }
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(); }
protected FuelStream(string name, UnitOperationSystem uoSys) : base(name, null, uoSys) { massFlowRate.Name = StringConstants.GENERAL_MASS_FLOW_RATE; //To get a mass flow rate name without "Wet Basis" }
public Adjust(string name, UnitOperationSystem uoSys) : base(name, uoSys) { }
public Furnace(string name, UnitOperationSystem uoSys) : base(name, uoSys) { excessAir = new ProcessVarDouble(StringConstants.EXCESS_AIR, PhysicalQuantity.Fraction, VarState.Specified, this); }
public SolidDryingMaterialStream(string name, MaterialComponents mComponents, UnitOperationSystem uoSys) : base(name, mComponents, MaterialStateType.Solid, uoSys) { }
public PsychrometricChartModel(string name, DryingGasStream input, DryingGasStream output, DryingGasStream current, UnitOperationSystem uoSys) : base(name, uoSys) { this.inputStream = input; inputStream.DownStreamOwner = this; this.outputStream = output; outputStream.UpStreamOwner = this; pressure = new ProcessVarDouble(StringConstants.PRESSURE, PhysicalQuantity.Pressure, 1.0132685e5, VarState.Specified, this); this.currentStream = current; currentStream.DownStreamOwner = this; inputStream.Pressure = pressure; outputStream.Pressure = pressure; currentStream.Pressure = pressure; ProcessVarDouble dryBulbTemp = new ProcessVarDouble(StringConstants.DRY_BULB_TEMPERATURE, PhysicalQuantity.Temperature, 293.15, VarState.Specified, this); xVar = new PlotVariable(dryBulbTemp, 283.15, 373.15); ProcessVarDouble humidity = new ProcessVarDouble(StringConstants.ABSOLUTE_HUMIDITY, PhysicalQuantity.MoistureContent, 0.1, VarState.Specified, this); string moistureName = ((EvaporationAndDryingSystem)(unitOpSystem)).DryingMaterial.Moisture.Name; double humidityScale = humidityScaleTable[moistureName]; //yVar = new PlotVariable(humidity, 0.0, 0.3); yVar = new PlotVariable(humidity, 0.0, humidityScale); GenerateHumidityChartData(); inletStreams.Add(inputStream); outletStreams.Add(outputStream); InitializeStreams(); this.hcType = HCType.GasState; }
public FiredHeater(string name, UnitOperationSystem uoSys) : base(name, uoSys) { }
public FlashTank(string name, UnitOperationSystem uoSys) : base(name, uoSys) { }
// public FlowDirection FlowDirection // { // get {return flowDirection;} // } // // public ProcessType ProcessType // { // get { return processType; } // } #endregion //public Dryer(string name, ProcessType processType, UnitOpSystem uoSys) : base(name, uoSys) public SolidDryer(string name, UnitOperationSystem uoSys) : base(name, uoSys) { dryerType = SolidDryerType.Unknown; }
public Valve(string name, UnitOperationSystem uoSys) : base(name, uoSys) { pressureDrop = new ProcessVarDouble(StringConstants.PRESSURE_DROP, PhysicalQuantity.Pressure, VarState.Specified, this); InitializeVarListAndRegisterVars(); }
public GenericFuelStream(string name, MaterialComponents mComponents, UnitOperationSystem uoSys) : base(name, mComponents, uoSys) { heatValue = new ProcessVarDouble(StringConstants.HEAT_VALUE, PhysicalQuantity.SpecificEnergy, VarState.Specified, this); InitializeVarListAndRegisterVars(); }
public Mixer(string name, UnitOperationSystem uoSys) : base(name, uoSys) { }
public DetailedFuelStream(string name, FossilFuel mFossilFuel, UnitOperationSystem uoSys) : base(name, uoSys) { fossilFuel = mFossilFuel; InitializeVarListAndRegisterVars(); }