Пример #1
0
        public Heater(string name, ThermodynamicSystem system) : base(name, system)
        {
            Class         = "Heater";
            Icon.IconType = IconTypes.Heater;

            MaterialPorts.Add(new Port <MaterialStream>("In", PortDirection.In, 1));
            MaterialPorts.Add(new Port <MaterialStream>("Out", PortDirection.Out, 1));
            HeatPorts.Add(new Port <HeatStream>("Duty", PortDirection.In, 1));

            dp            = system.VariableFactory.CreateVariable("DP", "Pressure Drop", PhysicalDimension.Pressure);
            p             = system.VariableFactory.CreateVariable("P", "Pressure in heater outlet", PhysicalDimension.Pressure);
            T             = system.VariableFactory.CreateVariable("T", "Temperature in heater outlet", PhysicalDimension.Temperature);
            VF            = system.VariableFactory.CreateVariable("VF", "Vapor fraction in heater outlet", PhysicalDimension.MolarFraction);
            Q             = system.VariableFactory.CreateVariable("Q", "Heat Duty", PhysicalDimension.HeatFlow);
            dp.LowerBound = 0;
            dp.ValueInSI  = 0;



            AddVariable(dp);
            AddVariable(p);
            AddVariable(T);
            AddVariable(VF);
            AddVariable(Q);
        }
Пример #2
0
 public Port <HeatStream> FindHeatPort(string portName)
 {
     return(HeatPorts.FirstOrDefault(p => p.Name == portName));
 }