Orhun C.
Orhun C.

Reputation: 17

Dymola: Valve Regulation on/off Function

How can I set the valve closed when the hot water tank temperature/temperature sensor SenTem >= 70 Celsius?

enter image description here

Upvotes: 1

Views: 193

Answers (1)

Markus A.
Markus A.

Reputation: 7525

There are a number of ways this could be done. The most obvious way would be using

  • Modelica.Blocks.Logical.GreaterThreshold
  • combined with Modelica.Blocks.Math.BooleanToReal

but this will likely result in chattering.

It should be possible to avoid this by using a hysteresis block instead of the simple comparison

  • Modelica.Blocks.Logical.Hysteresis

which is used e.g. here: Modelica.Fluid.Examples.Tanks.TanksWithOverflow, where a switch is applied instead of the BooleanToReal. The advantage here is, that you can manually define the two output values (e.g. in case you don't want to fully open the valve).

There is also a dedicated "controller" that should do what you need

  • Modelica.Blocks.Logical.OnOffController

An example using the controller can be found here: Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature. It should behave very similar to the hysteresis block, using different parameters.

Upvotes: 4

Related Questions