next up previous contents
Next: Initializing the unknowns Up: Aerodynamic and hydraulic networks Previous: The variables and the   Contents

Determining the basic characteristics of the network

In subroutine envtemp.f the basic properties of the network are determined. It is called at the start of nonlingeo.c. At first the gas nodes are identified and sorted. A node is a gas node if any of the following conditions is satisfied:

In that way also the field nactdog is filled (with the value 1 for an unknown variable, 0 else). Next, the known boundary values (*BOUNDARY cards) are subtracted, and the unknown DOFs are numbered consecutively yielding the final form for nactdog. Notice that the global number of gas node i is ign(i). Since field ign is ordered in an ascending order subroutine nident.f can be used to find the local gas node number for a given global number. In the remaining test ``gas node i'' refers to the local number whereas ``node i'' refers to a global number.

In a loop over all fluid elements the necessary equations are determined. In a given corner node the conservation of mass equation is formulated if the mass flow in at least one of the adjacent fluid elements is unknown. The conservation of energy is written if the temperature in the corner node is unknown. Finally, conservation of momentum equation (also called element equation) is formulated for a midside node of a fluid element if not all quantities in the element equation are known. This latter check is performed in the subroutine flux.f (characterized by iflag=0). It contains on its own subroutines for several fluid section types, e.g. subroutine orifice.f for the fluid section of type ORIFICE. The number of unknowns relevant for the fluid element depends on its section type. After having identified all necessary equations in field nacteq they are numbered and the number of equations is compared with the number of unknowns. They must be equal in order to have a unique solution.

Finally, for each gas node the number of isothermal gas pipe elements it belongs to is identified and stored in fields ipogn and ign. Field ipogn is a pointer for each gas node into field ign. The latter field has two rows: the first contains the global number of an isothermal gas pipe element, the second is a pointer to a further entry in field ign. For instance, if gas node i belongs to isothermal gas pipe elements $ n_1$ and $ n_2$, then these are stored in entries $ ign(1,ipogn(i))$ and $ ign(1,ign(2,ipogn(i)))$. Entry $ ign(2,ign(2,ipogn(i)))$ is zero. After this initialization of ipogn and ign these fields are used to find loose ends. Starting from these ends dependent and independent nodes are determined for each isothermal element and the appropriate entries in field nacteq (third row, cf. previous section) are defined. If at the stage of the matrix filling an corner node is a dependent node of an isothermal element the conservation of energy equation in that node is replace by an equation that the static temperature in the dependent and independent node are equal. Fields ipogn and ign are deleted after leaving envtemp.f


next up previous contents
Next: Initializing the unknowns Up: Aerodynamic and hydraulic networks Previous: The variables and the   Contents
guido dhondt 2010-08-01