Skip to content

Commit

Permalink
Clean up non-normative content in stream.tex
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Apr 30, 2020
1 parent 7fc8b0c commit a6781a2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion chapters/packages.tex
Expand Up @@ -67,7 +67,7 @@ \subsection{Importing Definitions from a Package}\doublelabel{importing-definiti

\lstinline[mathescape=true]!import ${[}\mathit{packagename}$.${]}\mathit{definitionname}$;! (single definition import)
\lstinline[mathescape=true]!import ${[}\mathit{packagename}$.${]}${$\mathit{def}_{1}$, $\mathit{def}_{2}$, $\ldots$, $\mathit{def}_{\mathrm{n}}$};! (multiple definition import)
\lstinline[mathescape=true]!import ${[}\mathit{packagename}$.${]}${$\mathit{def}_{1}$, $\mathit{def}_{2}$, $\ldots$, $\mathit{def}_{n}$};! (multiple definition import)
\lstinline[mathescape=true]!import $\mathit{packagename}$.*;! (unqualified import)
Expand Down
51 changes: 26 additions & 25 deletions chapters/stream.tex
Expand Up @@ -41,17 +41,18 @@ \section{Definition of Stream Connectors}\doublelabel{definition-of-stream-conne
The \lstinline!stream! prefix can only be used in a connector
declaration.
\item
A stream connector must have exactly one scalar variable with the
\lstinline!flow! prefix. {[}\emph{The idea is that all stream variables
of a connector are associated with this flow variable}{]}\emph{.}
A stream connector must have exactly one scalar variable with the \lstinline!flow! prefix.
\begin{nonnormative}
The idea is that all stream variables of a connector are associated with this flow variable.
\end{nonnormative}
\item
For every outside connector {[}\emph{see \autoref{inside-and-outside-connectors}}{]}, one
For every outside connector (see \autoref{inside-and-outside-connectors}), one
equation is generated for every variable with the \lstinline!stream!
prefix {[}\emph{to describe the propagation of the stream variable
along a model hierarchy}{]}. For the exact definition, see the end of
prefix (to describe the propagation of the stream variable
along a model hierarchy). For the exact definition, see the end of
\autoref{stream-operator-instream-and-connection-equations}.
\item
For inside connectors {[}\emph{see \autoref{inside-and-outside-connectors}}{]}, variables
For inside connectors (see \autoref{inside-and-outside-connectors}), variables
with the \lstinline!stream! prefix do not lead to connection equations.
\item
Connection equations with stream variables are generated in a model
Expand Down Expand Up @@ -101,7 +102,7 @@ \section{Stream Operator inStream and Connection Equations}\doublelabel{stream-o
For the following definition it is assumed that \lstinline!N! inside connectors
\texttt{m\textsubscript{j}.c} (j=1,2,...,N) and \lstinline!M! outside connectors
\texttt{c\textsubscript{k}} (k=1,2,...,M) belonging to the same connection set
{[}\emph{see definition in \autoref{inside-and-outside-connectors}}{]} are connected
(see definition in \autoref{inside-and-outside-connectors}) are connected
together and a stream variable \lstinline!h_outflow! is associated with a flow
variable \lstinline!m_flow! in connector \lstinline!c!.

Expand All @@ -114,10 +115,8 @@ \section{Stream Operator inStream and Connection Equations}\doublelabel{stream-o

model FluidSystem
...
FluidComponent $m_1$, $m_2$, ...,
m_N;
FluidPort $c_1$, $c_2$, ...,
c_M;
FluidComponent $m_1$, $m_2$, ..., $m_N$;
FluidPort $c_1$, $c_2$, ..., $c_M$;
equation
connect($m_1$.c, $m_2$.c);
connect($m_1$.c, $m_3$.c);
Expand Down Expand Up @@ -217,11 +216,11 @@ \section{Stream Operator inStream and Connection Equations}\doublelabel{stream-o
end for;
\end{lstlisting}

\emph{Note, that} \texttt{inStream(c\textsubscript{k}.h\_outflow)} \emph{is
computed from the connection set that is present one hierarchical level
above. At this higher level} \texttt{c\textsubscript{k}.h\_outflow} \emph{is no longer
an outside connector, but an inside connector and then the formula from
above for inside connectors can be used to compute it.}
\begin{nonnormative}
Note, that \lstinline[mathescape=true]!inStream($c_{k}$.h_outflow)! is computed from the connection set that is present one hierarchical level above. At this higher level
\lstinline[mathescape=true]!$c_{k}$.h_outflow! is no longer an outside connector, but an inside connector and then the formula from above for inside connectors can be used
to compute it.
\end{nonnormative}

If the argument of \lstinline!inStream()! is an array, the implicit
equation system holds elementwise, i.e., \lstinline!inStream()! is
Expand All @@ -231,24 +230,26 @@ \section{Stream Operator inStream and Connection Equations}\doublelabel{stream-o
solutions if one or more of the flow variables become zero. When all the
flows are zero, a singularity is always present, so it is necessary to
approximate the solution in an open neighbourhood of that point.
{[}\emph{For example assume that} \texttt{m\textsubscript{j}.c.m\_flow =
c\textsubscript{k}.m\_flow = 0}\emph{, then all equations above are identically
fulfilled and \lstinline!inStream(..)! can have any value}{]}. However,
specific optimizations may be applied to avoid the regularization if the

\begin{nonnormative}
For example, assume that \lstinline[mathescape=true]!$m_{j}$.c.m_flow = $c_{k}$.m_flow = 0!, then all equations above are identically fulfilled and \lstinline!inStream(..)! can have any value.
\end{nonnormative}

However, specific optimizations may be applied to avoid the regularization if the
flow through one port is zero or non-negative, see \autoref{derivation-of-stream-equations}. It is
required that the \lstinline!inStream()! operator is appropriately
approximated when regularization is needed and the approximation must
fulfill the following requirements:
\begin{enumerate}
\item
\texttt{inStream(m\textsubscript{i}.c.h\_outflow)} and
\texttt{inStream(c\textsubscript{k}.h\_outflow)} must be unique with
\lstinline[mathescape=true]!inStream($m_{i}$.c.h_outflow)! and
\lstinline[mathescape=true]!inStream($c_{k}$.h_outflow)! must be unique with
respect to all values of the flow and stream variables in the
connection set, and must have a continuous dependency on them.
\item
Every solution of the implicit equation system above must fulfill the
equation system identically {[}\emph{upto the usual numerical
accuracy}{]}, provided the absolute value of every flow variable in
equation system identically (upto the usual numerical
accuracy), provided the absolute value of every flow variable in
the connection set is greater than a small value
(\texttt{\textbar{}m\textsubscript{1}.c.m\_flow\textbar{} \textgreater{} eps
\textbf{and} \textbar{}m\textsubscript{2}.c.m\_flow\textbar{}
Expand Down

0 comments on commit a6781a2

Please sign in to comment.