6.2 Heating a Liquid Mixture
237
Pump controller program code:
model PumpCntr
Interfaces.Signal signal(nSignal=1)
parameter SI.Time event1 = 240,
event2 = 360,
event3 = 720,
event4 = 900;
parameter SI.MassFlowRate flow1 = 10,
flow2 = 10;
SI.MassFlowRate totalMassFSP;
equation
totalMassFSP = if time > event4 then 0
else if time > event3 then -flow1
else if time > event2 then 0
else if time > event1 then flow2
else 0;
signal.s = {totalMassFSP};
end PumpCntr;
Fluid source regulator SourceCntrq has to maintain a constant rate of fluid transfer
from the source to the tank and back Q mass1 = 40 kg/s. To do this, we introduce two
equal in magnitude parameter of the fluid flow:
parameter SI.MassFlowRate flow1 = 40, "direct fluid flow"
flow2 = 40; "reverse fluid flow"
In accordance with the condition of the problem, we create two events: the end
of the fluid supply to the tank and, similarly, the beginning of the flow of fluid from
the tank:
parameter SI.Time event1 = 180, "completion of direct pumping"
event2 = 840; "start of fluid transfer"
In the intervals between these events, various fixed values of the totalMassFSP
flow are set, which will be transmitted as an input signal to the pump (see the
equation block of equations in the program code). In addition, we must supply
a mixture of fluids of a given temperature. We will also control these parameters.
Therefore, the input to the fluid source is a vector quantity
signal.s[1:nComp] = massFractSP; // the proportion of substances in the mixture
signal.s[nComp+1] = totalMassFSP; // fluid flow rate
signal.s[nComp+2] = tempFSP; // liquid temperature (mixture)
Précédent

- 248/274

Suivant