Model Fragment Definition

The most important model fragment definition in this domain theory defines the equations for steady-state steady-flow processes. It applies the first law equations for energy and mass conservation to control volumes.
(defModelFragment steady-state-steady-flow-process 
  :subclass-of (thermal-process) 
  "the model of a steady flow in steady state employing the first law of 
thermodynamics (Energy conservation) and mass conservation" 
    "the rate of power input per unit of mass passing through the cv 
associated with the process" 
    :the-*-the-object ("power input per unit mass" "of") 
    :abbreviation "w'in") 
   (foreach ?cv (process-cv ?self) 
	    (= (- (heat-rate ?self) (work-rate ?self)) 
	       (+ (- (enthalpy-rate-out ?cv) 
		     (enthalpy-rate-in ?cv)) 
		  (d-pe-rate ?cv) 
		  (d-ke-rate ?cv)))) 

   (foreach ?cv  (process-cv ?self) 
	    (= (Entropy-generation-rate ?self) 
	       (+ (- (entropy-rate-out ?cv) (entropy-rate-in ?cv)) 
		  (- (/ (heat-rate ?self) (heat-transfer-temperature ?self))))
   (foreach ?cv (process-cv ?self) 
	    (= (mass-rate-in ?cv) (mass-rate-out ?cv)))