6.2 Heating a Liquid Mixture
239
Fig. 6.45 Connector icons for a liquid, b heating, and c control
Heater Controller Program Code:
model HeatCntr
Interfaces.Signal signal(nSignal=1)
parameter SI.EnergyFlowRate heatFlowSP = 2.5E5;
parameter SI.Time event1 = 360,
event2 = 720;
SI.EnergyFlowRate heatFSP;
equation
heatFSP = if time > event1 and time < event2
then -heatFlowSP
else 0;
signal.s = {heatFSP};
end HeatCntr;
Now create a connector package.
Connectors
The blue connector is designed to connect the reservoir to the fluid source and to the
pump, taking into account the current fluid temperature (Fig. 6.45):
connector Liquid
parameter Integer nComp=1;
Integer mode;
SI.Mass mass[nComp] "Mass component of liquid kerosene and gasoline";
SI.Temperature temp "Temperature";
flow SI.MassFlowRate Fm[nComp] "fluid flow";
flow SI.EnergyFlowRate Fh "fluid transported heat";
end Liquid;
The red connector is for connecting the heater to the tank:
connector Heat
Integer mode;
flow SI.EnergyFlowRate Q; "heat flow from the heater"
end Heat;
The black connector is designed to transmit a signal from the controller to any
component:
connector Signal
parameter Integer nSignal = 1;
Real s[nSignal]; "transmitted signal"
end Signal;
239
Fig. 6.45 Connector icons for a liquid, b heating, and c control
Heater Controller Program Code:
model HeatCntr
Interfaces.Signal signal(nSignal=1)
parameter SI.EnergyFlowRate heatFlowSP = 2.5E5;
parameter SI.Time event1 = 360,
event2 = 720;
SI.EnergyFlowRate heatFSP;
equation
heatFSP = if time > event1 and time < event2
then -heatFlowSP
else 0;
signal.s = {heatFSP};
end HeatCntr;
Now create a connector package.
Connectors
The blue connector is designed to connect the reservoir to the fluid source and to the
pump, taking into account the current fluid temperature (Fig. 6.45):
connector Liquid
parameter Integer nComp=1;
Integer mode;
SI.Mass mass[nComp] "Mass component of liquid kerosene and gasoline";
SI.Temperature temp "Temperature";
flow SI.MassFlowRate Fm[nComp] "fluid flow";
flow SI.EnergyFlowRate Fh "fluid transported heat";
end Liquid;
The red connector is for connecting the heater to the tank:
connector Heat
Integer mode;
flow SI.EnergyFlowRate Q; "heat flow from the heater"
end Heat;
The black connector is designed to transmit a signal from the controller to any
component:
connector Signal
parameter Integer nSignal = 1;
Real s[nSignal]; "transmitted signal"
end Signal;
