0 Votes

Plugs

Last modified by WikiBot on 2025/03/20 14:15

Plugs

The plugs are used as constant boundary values. They contain parameters and interfaces. The plugs may be built-in, insertable, and inserted.

The built-in plugs are defined directly in the application file, as in the example below:

((plug-object :n WatPlug :d "Plug for water inlet/outlet")
 (:par :t MASSFLOW :n M :x S_P :v 0.0 :kv (FREAL 0.0) :d "Zero flow rate")
 (:par :t TEMP :n T :x S_P :v 16.0 :kv (FREAL -273.16)
      :d "No effect when massflow = 0")
 (:int :t PMT :n CLOSED-INLET :v (nil M T) :dir (NIL 1 NIL))
 (:int :t PMT :n CLOSED-SINK :v (nil M nil) :dir (NIL -1 NIL)))

Note that NIL in the list of variables means that the corresponding variable in the interface is not bounded (pressure for plugged inlet; pressure and temperature for plugged sink).

For insertable plugs a template should be defined in the application file:

((template :c plug-object :n WatPlug) ... )

The plug should be made insertable in some other objects by modifying the :ins attributes of that objects.

The inserted plugs are defined as parts of other templates:

((template :n system :c macro-object ...)
 ((plug-object :n WatPlug) ... ) 
 ...
)

so the corresponding objects will be created with plug components.