-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
NETWORK_MPC.html
5 lines (5 loc) · 2.36 KB
/
NETWORK_MPC.html
1
2
3
4
5
<html><head><link rel="stylesheet" type="text/css" href="style.css"/></head><body> <H2> <BR> *NETWORK MPC </H2> <P> Keyword type: model definition <P> With this option, an equation between variables in a network (total temperature and total pressure at the end nodes of a network element, mass flow in the middle node) can be created. The corresponding degrees of freedom are: <P> <UL> <LI>total temperature: 0 </LI> <LI>mass flow: 1 </LI> <LI>total pressure: 2 </LI> </UL> <P> The use of *NETWORK MPC requires the coding of subroutines networkmpc_lhs.f and networkmpc_rhs.f by the user. In these routines the user defines the MPC (linear or nonlinear) using the information entered underneath *NETWORK MPC. The syntax is identical to *EQUATION except for an additional parameter TYPE specifying the type of MPC. Using this type the user can distinguish between different kinds of MPC in the networkmpc_lhs.f and networkmpc_rhs.f subroutines. <P> For instance, suppose the user wants to define a network MPC of the form: <P> <P></P> <DIV ALIGN="CENTER" CLASS="mathdisplay"><!-- MATH \begin{equation} f:=a p_{t} (node_1) + b p_t^2 (node_2)=0 \end{equation} --> <TABLE CLASS="equation" CELLPADDING="0" WIDTH="100%" ALIGN="CENTER"> <TR VALIGN="MIDDLE"> <TD NOWRAP ALIGN="CENTER"><SPAN CLASS="MATH"><IMG WIDTH="236" HEIGHT="36" ALIGN="MIDDLE" BORDER="0" SRC="img2477.png" ALT="$\displaystyle f:=a p_{t} (node_1) + b p_t^2 (node_2)=0$"></SPAN></TD> <TD NOWRAP CLASS="eqno" WIDTH="10" ALIGN="RIGHT"> (<SPAN CLASS="arabic">726</SPAN>)</TD></TR> </TABLE></DIV> <BR CLEAR="ALL"><P></P> <P> specifying that the total pressure in node 1 should be (-b/a) times the square of the total pressure in node 2. There are 2 degrees of freedom involved: dof 2 in node 1 and dof 2 in node 2. Underneath *NETWORK MPC the user defines the coefficients and degrees of freedom of the terms involved: <P> <PRE>
*NETWORK MPC,TYPE=QUADRATIC
2
node1,2,a,node2,2,b
</PRE> <P> All this information including the type of the MPC is transferred to the networkmpc_lhs.f and networkmpc_rhs.f subroutines. In networkmpc_rhs.f the user has to code the calculation of -f, in networkmpc_lhs.f the calculation of the derivative of f w.r.t. each degree of freedom occurring in the MPC. This has been done for TYPE=QUADRATIC and the reader is referred to the source code and example networkmpc.inp for further details. <P> </body></html>