tasmet/doc/usg.lyx

5162 lines
102 KiB
Plaintext
Raw Normal View History

2016-11-11 22:25:44 +00:00
#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass memoir
\begin_preamble
\extrarowheight10pt
\newlength\drop
\makeatletter
\newcommand*\titleM{\begingroup% Misericords, T&H p 153
\setlength\drop{0.08\textheight}
\centering
\vspace*{\drop}
{\Huge\bfseries TaSMET User's guide}\\[\baselineskip]
{\scshape Thermoacoustic System Modeling Environment Twente}\\[\baselineskip]
\vfill
{\large\scshape J.A. de Jong}\par
\vfill
{\scshape \@date}\par
\vspace*{2\drop}
\endgroup}
\makeatother
\usepackage{listings}
\usepackage{color}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\lstset{ %
backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
basicstyle=\footnotesize, % the size of the fonts that are used for the code
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
breaklines=true, % sets automatic line breaking
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{mygreen}, % comment style
deletekeywords={...}, % if you want to delete keywords from the given language
escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
frame=single, % adds a frame around the code
keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
keywordstyle=\color{blue}, % keyword style
language=Octave, % the language of the code
otherkeywords={*,...}, % if you want to add more keywords to the set
numbers=left, % where to put the line-numbers; possible values are (none, left, right)
numbersep=5pt, % how far the line-numbers are from the code
numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false, % underline spaces within strings only
showtabs=false, % show tabs within strings adding particular underscores
stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color{mymauve}, % string literal style
tabsize=2, % sets default tabsize to 2 spaces
title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title
}
\end_preamble
\options a4paper
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "libertine-mono" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 1
\bibtex_command bibtex
\index_command default
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_title "TaSMET User's guide"
\pdf_author "J.A. de Jong"
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize default
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date true
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\leftmargin 2cm
\rightmargin 2cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\listings_params "breaklines=true,captionpos=b,frame=tb,language=Python,keywordstyle={\color{blue}},morekeywords={ta, TaSystem, Globalconf, Solver, SolverConfiguration, setSc, Solve}"
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
thispagestyle{empty}
\end_layout
\begin_layout Plain Layout
\backslash
begin{titlingpage}
\end_layout
\begin_layout Plain Layout
\backslash
titleM
\end_layout
\end_inset
\begin_inset Separator latexpar
\end_inset
\end_layout
\begin_layout Standard
\align center
\begin_inset Graphics
filename fig/tasys_artist.eps
width 50text%
\end_inset
\family typewriter
\size huge
\begin_inset Newline newline
\end_inset
Version 0.1
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
end{titlingpage}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents
\end_inset
\end_layout
\begin_layout Part
Tutorial
\end_layout
\begin_layout Chapter
Introduction
\end_layout
\begin_layout Standard
Welcome to the user's guide of the Thermoacoustic System Modeling Environment
Twente, or
\noun on
TaSMET
\noun default
.
\noun on
TaSMET
\noun default
is a computer code to model thermoacoustic (TA) engines, refrigerators
and combined systems by providing nonlinear models for laminar/turbulent
oscillating flow in ducts, heat exchangers and stacks/regenerators.
A coupling to the mechanical and electrical domain is provided with a piston
model.
\end_layout
\begin_layout Standard
The nonlinear sub-models can be connected to form a model of a complete
TA or Stirling system.
The main ideas of this code are developed as part of my PhD work
\begin_inset Quotes eld
\end_inset
\noun on
Numerical Modeling of Thermoacoustic Systems
\begin_inset Quotes erd
\end_inset
\noun default
\begin_inset CommandInset citation
LatexCommand cite
key "jong_numerical_2015"
\end_inset
.
\end_layout
\begin_layout Standard
The code has been developed with a strong focus on computational cost.
Hence, it uses an efficient modeling technique, called the Nonlinear Frequency
Domain (NLFD) method, to directly simulate the periodic steady state of
a TA system.
\end_layout
\begin_layout Standard
The modular design makes it easy to create any system for which a similar
model can be made using the DELTAEC computer code.
The main differences between
\noun on
TaSMET
\noun default
and other TA modeling computer codes are
\end_layout
\begin_layout Itemize
Open source and free to use.
As the author is aware of the possibilities created by using open source
codes, the choice of publishing this computer code as open source was not
a hard choice.
\end_layout
\begin_layout Itemize
Fast modeling in the nonlinear regime.
\end_layout
\begin_layout Itemize
No graphical user interface (GUI), but the Python programming language as
modeling glue.
GUI's require a considerable time to implement, but they do not add any
fundamental features.
As we provide all modeling classes in Python, the user can therefore decide
whether he still wants a GUI.
Using Matplotlib, we can plot everything we want and by building post-processin
g scripts we can derive any results from the solved model.
\end_layout
\begin_layout Section
Purpose of this code
\end_layout
\begin_layout Itemize
Expand modeling capabilities of DeltaEC to the nonlinear regime -> More
detailed modeling of nonlinear effects
\end_layout
\begin_layout Itemize
More in-depth insight in behavior of TA systems
\end_layout
\begin_layout Standard
In this user's guide, we assume that the reader has already gained some
knowledge and experience with (modeling of) TA systems.
Moreover, we expect that the user of
\noun on
TaSMET
\noun default
has already modeled TA systems with a linear TA code, such as the well-known
\noun on
DELTAEC
\noun default
code.
A great deal of inspiration of
\noun on
TaSMET
\noun default
has been obtained by the way
\noun on
DELTAEC
\noun default
is designed.
\end_layout
\begin_layout Section
Bug reporting and contributing
\end_layout
\begin_layout Standard
If you are interested in working and contributing to
\noun on
TaSMET
\noun default
, please contact me by email.
My email address is anne(at)amdj(dot)nl.
I am looking forward to cooperate!
\end_layout
\begin_layout Chapter
Basic ideas
\end_layout
\begin_layout Standard
With
\noun on
TaSMET
\noun default
, the periodic steady-state of a TA system is simulated using a numerical
model.
\end_layout
\begin_layout Chapter
Tutorial
\end_layout
\begin_layout Section
Introduction
\end_layout
\begin_layout Standard
In this chapter, the usage of
\noun on
TaSMET
\noun default
is described by example.
Two TA systems will be described to show the main capabilities of
\noun on
TaSMET
\noun default
.
Focus will also be given on the post-processing capabilities.
As all
\noun on
TaSMET
\noun default
objects are exposed to Python, the user of
\noun on
TaSMET
\noun default
can easily create script to customize post-processing.
\end_layout
\begin_layout Standard
Each TA system in
\noun on
TaSMET
\noun default
is an object of type
\noun on
TaSystem
\noun default
, a
\noun on
TaSystem
\noun default
contains data about the global configuration of the system, such as the
working gas in the system and the fundamental oscillation frequency (
\begin_inset Formula $\omega$
\end_inset
).
The physical configuration of a typical TA system is defined by the segments
in a
\noun on
TaSystem
\noun default
.
Each segment can represent a part of the TA system, such as resonator tubes,
heat exchangers, stacks/regenerators and pistons.
The combination of these segments, including the connecting and boundary
conditions and the working gas results in a (nonlinear) system of equations.
This system of equations can be solved by a
\noun on
Solver
\noun default
object.
Often, the user creates a Python scripts which has approximately the following
shape:
\end_layout
\begin_layout Standard
The main difference between connectors and segments is that only the latter
has provides both
\emph on
equations
\emph default
as well as
\emph on
degrees of freedom
\emph default
(DOFs), while connectors often only provide equations.
Hence, a complete system comprises at least one segment.
So far,
\noun on
TaSMET
\noun default
contains three main type of segments.
A short overview of these segments is given below.
\end_layout
\begin_layout Subsection
\noun on
Duct
\end_layout
\begin_layout Standard
A Duct is probably the most important type of segment.
In a
\noun on
Duct
\noun default
, 1D dynamic gas flow can be modeled including its interaction with a solid.
Depending on the geometry, a
\noun on
Duct
\noun default
can model resonators with variable cross-sectional area, stacks, and heat
exchangers.
The interaction model of the flow with its surrounding solid is provided
in an object-oriented way with a derived class.
Examples of derived classes are
\noun on
LaminarDuct
\noun default
,
\noun on
IsentropicDuct
\noun default
, and
\noun on
TurbulentDuct.
\end_layout
\begin_layout Subsection
\noun on
Piston
\end_layout
\begin_layout Standard
This
\noun on
Piston
\noun default
provides a means to exchange mechanical energy between the gas domain and
the mechanical domain.
The implementation of the
\noun on
Piston
\noun default
segment is done in such a way that both the front and back volume can be
used.
The front and back volume are assumed to be small compared to the wavelength,
because no momentum equation is solved for the gas volumes.
A reference of this class is given in Sec.
\end_layout
\begin_layout Subsection
\noun on
ConnectorVolume
\end_layout
\begin_layout Standard
A
\noun on
ConnectorVolume
\noun default
is used to connect multiple
\noun on
Ducts
\noun default
together.
This allows for 'branching' of multiple
\noun on
Ducts
\noun default
and it is an essential feature of traveling wave thermoacoustic engines.
A
\noun on
ConnectorVolume
\noun default
with only one
\noun on
Duct
\noun default
connected to it serves as a
\begin_inset Quotes eld
\end_inset
compliance
\begin_inset Quotes erd
\end_inset
, i.e.
an expansion volume in which the fluid motion is brought to rest.
\end_layout
\begin_layout Section
Resonance tube
\end_layout
\begin_layout Section
Hofler's refrigerator (Hofler1)
\end_layout
\begin_layout Standard
In this section,
\end_layout
\begin_layout Standard
\begin_inset CommandInset bibtex
LatexCommand bibtex
bibfiles "bib/TaSMET"
options "plain"
\end_inset
\end_layout
\begin_layout Part
The API
\end_layout
\begin_layout Chapter
\noun on
Duct
\end_layout
\begin_layout Section
Geometry
\end_layout
\begin_layout Chapter
\noun on
Piston
\end_layout
\begin_layout Section
Introduction
\noun on
\begin_inset CommandInset label
LatexCommand label
name "sec:Piston_ref"
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open
\begin_layout Plain Layout
\align center
\begin_inset Graphics
filename fig/piston.eps
width 80text%
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
Piston
\end_layout
\end_inset
\begin_inset CommandInset label
LatexCommand label
name "fig:piston_overview"
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
An overview of the model of a
\noun on
Piston
\noun default
is schematically shown in Figure (
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:piston_overview"
\end_inset
).
A
\noun on
Duct
\noun default
can be connected on both the front, as well as on the back side of the
\noun on
Piston
\noun default
.
This way, the segment has been made flexible.
The following geometrical, and mechanical parameters are required for the
model:
\end_layout
\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open
\begin_layout Plain Layout
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="10" columns="4">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="60text%">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Symbol
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Token
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Meaning
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Unit
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $S_{l}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
Sl
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Piston surface area on the left side
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
m
\begin_inset Formula $^{2}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $S_{r}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
Sr
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Piston surface area on the right side
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
m
\begin_inset Formula $^{2}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $V_{o,l}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
V0l
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Left volume.
Note: the left volume should be defined with a size such that at the minimum
\begin_inset Formula $x$
\end_inset
, the volume does not become negative!
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
m
\begin_inset Formula $^{3}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $V_{0,r}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
V0r
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Right volume.
Note: the right volume should be defined such that for the maximum piston
excursion
\begin_inset Formula $x$
\end_inset
, the volume does not become negative!
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
m
\begin_inset Formula $^{3}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $M$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
M
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Total moving mass of the piston
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
kg
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $K_{m}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
Km
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Piston spring constant
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
N/m
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $C_{m}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
Cm
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Piston damping
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
N
\begin_inset Formula $\cdot$
\end_inset
s/m
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $S_{t,l}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
Stl
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Total contact area of the fluid with the solid in the left volume.
This variable is used to compute the thermal relaxation dissipation in
the piston volume.
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
m
\begin_inset Formula $^{2}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $S_{t,r}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\family typewriter
Str
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Total contact area of the fluid with the solid in the right volume.
This variable is used to compute the thermal relaxation dissipation in
the piston volume.
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
m
\begin_inset Formula $^{2}$
\end_inset
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
Overview of all the parameters required for the Piston model.
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
To initialize a
\noun on
Piston,
\noun default
first a helper
\noun on
struct
\noun default
needs to be defined, called the
\noun on
PistonConfiguration.
\noun default
The initialization of a
\noun on
PistonConfiguration
\noun default
is
\end_layout
\begin_layout Standard
\begin_inset listings
inline false
status open
\begin_layout Plain Layout
pc=PistonConfiguration(Sl,Sr,V0l,V0r,M,Km,Cm,Stl,Str)
\end_layout
\end_inset
\end_layout
\begin_layout Standard
.
Then we can build a new
\noun on
Piston
\noun default
segment with
\begin_inset listings
inline false
status open
\begin_layout Plain Layout
p=Piston(pc)
\end_layout
\end_inset
.
\end_layout
\begin_layout Section
DuctPistonConnector
\end_layout
\begin_layout Standard
The
\noun on
DuctistonConnector
\noun default
connects a Piston segment to a Tube.
The following syntax is used to initialize a
\noun on
DuctPistonConnector:
\end_layout
\begin_layout Standard
\begin_inset listings
inline false
status open
\begin_layout Plain Layout
tpc=DuctPistonConnector(id_duct,duct_pos,id_piston,piston_pos,KDuctPiston,KPisto
nDuct)
\end_layout
\end_inset
, where the id's are strings by which a
\noun on
Duct
\noun default
or a
\noun on
Piston
\noun default
is identified.
\end_layout
\begin_layout Subsection
Piston energy balance
\end_layout
\begin_layout Standard
\begin_inset Formula
\[
mH_{p}+Q_{p\rightarrow t}+s\cdot mH_{t}=0
\]
\end_inset
\end_layout
\begin_layout Section
Mechanical boundary conditions
\end_layout
\begin_layout Subsection
\noun on
MechBc
\end_layout
\begin_layout Standard
Using a
\noun on
MechBc,
\noun default
a simple boundary condition can be set on the mechanical domain of the
\noun on
Piston
\noun default
.
It can be used to set either an external force, the piston displacement,
or a mechanical impedance.
The syntax is
\begin_inset listings
inline false
status open
\begin_layout Plain Layout
m=MechBc(piston_id,contraint_var,boundary_condition)
\end_layout
\end_inset
, where
\family typewriter
boundary_condition
\family default
is the b.c.
\family typewriter
var
\family default
object, and
\family typewriter
constraint_var
\family default
is either
\family typewriter
Varnr_x, Varnr_F,
\family default
or
\family typewriter
Varnr_Z.
\family default
The latter induces the boundary condition to solve
\begin_inset Formula
\begin{equation}
F-Zx=0,
\end{equation}
\end_inset
and can be used to model a passive electrical domain.
\end_layout
\begin_layout Subsection
VCMNetwork
\end_layout
\begin_layout Standard
The current version does not yet provide this model.
In a future version we will provide a voice coil motor (VCM) network to
the list of segments.
\end_layout
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
To include the model of the electrical domain, it is
\end_layout
\begin_layout Plain Layout
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="4">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top" width="60text%">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $L$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
L
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Voice coil inductance
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
H
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $R_{e}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Re
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Electrical current resistance
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\Omega$
\end_inset
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $Bl$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Bl
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Motor constant (Newton per Amp or Volt per meter).
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $N/A$
\end_inset
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Chapter
Connecting it all together
\end_layout
\begin_layout Chapter
A system
\end_layout
\begin_layout Section
Introduction
\end_layout
\begin_layout Standard
- A system comprises all segments in a physical sense
\end_layout
\begin_layout Standard
- A system : amount of mass
\end_layout
\begin_layout Standard
- Number of harmonics to solve for
\end_layout
\begin_layout Section
\noun on
TaSystem
\end_layout
\begin_layout Standard
A
\noun on
TaSystem
\noun default
is a class which initializes and contains all segments and connectors.
The TaSystem provides basic information about the nonlinear system of equations
which has to be solved to obtain the value of all dependent variables in
the individual segments.
A
\noun on
TaSystem
\noun default
object is created with
\begin_inset listings
inline false
status open
\begin_layout Plain Layout
import TaSMET
\end_layout
\begin_layout Plain Layout
gc=TaSMET.Globalconf(...)
\end_layout
\begin_layout Plain Layout
sys=TaSMET.TaSystem(gc)
\end_layout
\end_inset
Then individual segments can be added to a
\noun on
TaSystem
\noun default
by
\begin_inset listings
inline false
status open
\begin_layout Plain Layout
sys+=seg1
\end_layout
\begin_layout Plain Layout
sys+=seg2
\end_layout
\begin_layout Plain Layout
sys+=...
\end_layout
\begin_layout Plain Layout
sys+=con1
\end_layout
\begin_layout Plain Layout
...
\end_layout
\end_inset
\end_layout
\begin_layout Subsection
Mass conservation
\end_layout
\begin_layout Section
EngineSystem
\end_layout
\begin_layout Standard
The EngineSystem class solves for the unknown frequency as well.
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
m
\end_layout
\begin_layout Standard
We define a new system of equations in which the fundamental frequency is
added as unknown and the timing constraint as an equation.
So the augmented solution vector is
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\mathbf{y}=\left(\mathbf{x},\omega\right),
\end{equation}
\end_inset
and the augmented residual is
\begin_inset Formula
\begin{equation}
\mathbf{M}=\left(\mathbf{L}(\mathbf{x}),p_{\mathrm{cd}}\right),
\end{equation}
\end_inset
where
\begin_inset Formula $p_{\mathrm{cd}}$
\end_inset
denotes the phase constraint degree of freedom.
\end_layout
\begin_layout Standard
To search for the solution, Newton iterations are done using the Jacobian
of the augmented residual operator
\begin_inset Formula $\mathbf{M}$
\end_inset
:
\begin_inset Formula
\begin{equation}
\delta\mathbf{y}=-\frac{\mathrm{d}\mathbf{M}}{\mathrm{d}\mathbf{y}}^{-1}\cdot\mathbf{M},
\end{equation}
\end_inset
where
\begin_inset Formula
\begin{equation}
\frac{\mathbf{\mathrm{d}}\mathbf{M}}{\mathrm{d}\mathbf{y}}=\left[\begin{array}{cc}
\frac{\partial\mathbf{L}}{\partial\mathbf{x}} & \frac{\partial\mathbf{L}}{\partial\omega}\\
\frac{\partial p_{\mathrm{cd}}}{\partial\mathbf{x}} & 0
\end{array}\right].\label{eq:newjac}
\end{equation}
\end_inset
In Eq.
\begin_inset space ~
\end_inset
(
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:newjac"
\end_inset
),
\begin_inset Formula $\frac{\partial p_{\mathrm{cd}}}{\partial\mathbf{x}}$
\end_inset
is a single row which is zero everywhere, but is one at the global degree
of freedom number corresponding to
\begin_inset Formula $\Im\left(\tilde{p}_{1}(x=0)\right)$
\end_inset
.
The column
\begin_inset Formula $\frac{\partial\mathbf{L}}{\partial\omega}$
\end_inset
, is the sensitivity of the residual to a change in frequency.
For brevity we only show the semi-discrete form of these sensitivities.
\begin_inset Note Note
status open
\begin_layout Plain Layout
Due to the normalization of the time-derivative matrix t
\end_layout
\end_inset
These sensitivities can
\begin_inset Note Note
status open
\begin_layout Plain Layout
easily
\end_layout
\end_inset
be derived from the governing equations.
\end_layout
\begin_layout Standard
For the continuity equation this sensitivity is
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{L}_{c,i}}{\partial\omega}=V_{f}\check{\mathbf{D}}\cdot\tilde{\boldsymbol{\rho}}_{i}.
\end{equation}
\end_inset
For the momentum and energy equation, however, we neglect the sensitivity
to the operators
\begin_inset Formula $\boldsymbol{\tilde{\mathcal{D}}}$
\end_inset
,
\begin_inset Formula $\boldsymbol{\tilde{\mathcal{H}}}$
\end_inset
and
\begin_inset Formula $\boldsymbol{\tilde{\mathcal{Q}}}$
\end_inset
, so for the momentum equation we use
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{L}_{m,L}}{\partial\omega}\simeq\left(x_{i}-x_{i-1}\right)\check{\mathbf{D}}\cdot\boldsymbol{\mathcal{F}}\cdot\tilde{\mathbf{m}},
\end{equation}
\end_inset
and for the energy equation
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{L}_{e,i}}{\partial\omega}\simeq\check{\mathbf{D}}\cdot\left(\frac{S_{f}}{\gamma-1}\tilde{\mathbf{p}}_{i}+\left(x_{R}-x_{L}\right)\left(\mathbf{mu}\right)_{i}\right),
\end{equation}
\end_inset
and finally for the equation of state
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{L}_{s,i}}{\partial\omega}=\mathbf{0}.
\end{equation}
\end_inset
\end_layout
\begin_layout Subsection
Setting a phase constraint
\end_layout
\begin_layout Itemize
Create a PhaseConstraint object:
\end_layout
\begin_layout Verbatim
pc=PhaseConstraint(Varnr, freqnr, left)
\end_layout
\begin_layout Itemize
Apply this contraint to a segment which can accept them, for example a Tube:
\end_layout
\begin_layout Verbatim
t1.setPhaseConstraint(pc)
\end_layout
\begin_layout Itemize
And you're done.
Note: only one phase constraint can be used in an EngineSystem.
For a TaSystem, the phase constraint is ignored.
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Chapter
The
\noun on
Solver
\noun default
class
\end_layout
\begin_layout Section
Introduction
\end_layout
\begin_layout Standard
..
\end_layout
\begin_layout Standard
\begin_inset listings
inline false
status open
\begin_layout Plain Layout
sc=TaSMET.SolverConfiguration()
\end_layout
\begin_layout Plain Layout
sc.setFunTol(...)
\end_layout
\begin_layout Plain Layout
sc.setRelTol(...)
\end_layout
\begin_layout Plain Layout
sol=TaSMET.Solver(sc)
\end_layout
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
sol.Solve(sys)
\end_layout
\end_inset
\end_layout
\begin_layout Section
Solver statistics
\end_layout
\begin_layout Part
Model reference
\end_layout
\begin_layout Chapter
Ducts
\end_layout
\begin_layout Section
General 3D conservation equations
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{align}
\frac{\mathrm{d}}{\mathrm{d}t}\int_{V(t)}\rho\mathrm{d}V & +\int_{S}\rho\boldsymbol{u}\cdot\boldsymbol{n}\mathrm{d}S=0\\
\frac{\partial\rho\boldsymbol{u}}{\partial t}+\nabla\cdot\rho\boldsymbol{u}\otimes\boldsymbol{u}+\nabla p & =\nabla\cdot\underline{\boldsymbol{\tau}}\\
\frac{\partial\rho E}{\partial t}+\nabla\cdot\left(\rho\boldsymbol{u}E+p\boldsymbol{u}\right)+\nabla\cdot\boldsymbol{q}= & \nabla\cdot\left(\underline{\boldsymbol{\tau}}\cdot\boldsymbol{u}\right)
\end{align}
\end_inset
\end_layout
\begin_layout Standard
Integrating over a piece of tube length:
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
S_{f}\frac{\partial\overline{\rho}}{\partial t}+\frac{\partial}{\partial x}\left(S_{f}\overline{\rho u}\right)=0
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
S_{f}\frac{\partial\overline{\rho u}}{\partial t}+
\end{equation}
\end_inset
\end_layout
\begin_layout Section
Some definitions
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
s=r_{h}\sqrt{\frac{\rho_{0}\omega}{\mu}}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
begin{subequations}
\end_layout
\end_inset
\begin_inset Formula
\begin{eqnarray}
s & = & \sqrt{2}\frac{r_{h}}{\delta_{\nu}}\\
s_{t} & = & s\sqrt{\Pr}=\sqrt{2}\frac{r_{h}}{\delta_{\kappa}}\\
s_{s} & = & \sqrt{2}\frac{r_{h,s}}{\delta_{s}}
\end{eqnarray}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
end{subequations}
\end_layout
\end_inset
\end_layout
\begin_layout Section
Duct geometry
\end_layout
\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open
\begin_layout Plain Layout
\align center
\begin_inset Graphics
filename fig/duct_grid.eps
width 75text%
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
Geometry and discretization of a duct
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Itemize
Cell vertices halfway between the cell walls
\end_layout
\begin_layout Itemize
Cross-sectional area jumps at the cell walls
\end_layout
\begin_layout Standard
What variables do live where?
\end_layout
\begin_layout Standard
\noun on
Duct
\end_layout
\begin_layout Subsection
Continuity equation
\end_layout
\begin_layout Standard
Continuity equation lives at the vertex
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
S_{f}\frac{\partial\rho}{\partial t}+\frac{\partial S_{f}\rho u}{\partial x}=0,
\end{equation}
\end_inset
where
\begin_inset Formula $x$
\end_inset
is the axial position,
\begin_inset Formula $S_{f}$
\end_inset
the cross-sectional area occupied by fluid,
\begin_inset Formula $\rho$
\end_inset
is the density and
\begin_inset Formula $m$
\end_inset
the mass flow.
Quasi-discrete form:
\begin_inset Formula
\begin{equation}
\Delta x_{i}S_{f,i}\frac{\partial\rho_{i}}{\partial t}+\left(S_{f}\rho u\right){}_{i+1}-\left(S_{f}\rho u\right){}_{i}=0,
\end{equation}
\end_inset
\end_layout
\begin_layout Subsection
Momentum equation
\end_layout
\begin_layout Standard
Momentum equation lives at the cell wall.
It conserves the momentum in a
\begin_inset Quotes eld
\end_inset
cell
\begin_inset Quotes erd
\end_inset
with left and right walls which are at the corresponding vertices.
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
Check units:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\left[\frac{\partial m}{\partial t}\right]=\frac{kg}{s^{2}}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\left[S_{f}\frac{\partial p}{\partial x}\right]=m^{2}\frac{N}{m^{2}m}=\frac{N}{m}=\frac{kgm}{s^{2}m}=\frac{kg}{s^{2}}$
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\frac{\partial\rho u}{\partial t}+\frac{\partial\rho u^{2}}{\partial x}+\frac{\partial p}{\partial x}+\frac{1}{S_{f}}\mathcal{R}=0
\end{equation}
\end_inset
where,
\begin_inset Formula $p$
\end_inset
is the pressure and
\begin_inset Formula $\mathcal{R}$
\end_inset
is the viscous resistance coefficient.
\end_layout
\begin_layout Standard
Quasi-discrete form
\begin_inset Formula
\begin{equation}
\left(x_{i+1}-x_{i}\right)\frac{\partial\rho u}{\partial t}+\left(\rho u^{2}\right)_{i+1}-\left(\rho u^{2}\right)_{i}+\left(p_{i+1}-p_{i}\right)+\frac{\left(x_{i+1}-x_{i}\right)}{S_{f,i}}\mathcal{R}_{i}=0.
\end{equation}
\end_inset
\end_layout
\begin_layout Subsection
Energy equation
\end_layout
\begin_layout Standard
Since
\begin_inset Formula
\begin{equation}
\frac{1}{2}\rho u^{2}S_{f}\equiv mu,
\end{equation}
\end_inset
The energy equation can be written as
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
\begin_inset Formula $\frac{\partial}{\partial t}\left(S_{f}\rho E\right)+\frac{\partial}{\partial x}\left(mH\right)-\frac{\partial}{\partial x}\left(\kappa S_{f}\frac{\partial T}{\partial x}\right)=Q_{in}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $S_{f}\rho E=S_{f}\rho\left(c_{v}T+\frac{1}{2}u^{2}\right)=S_{f}\left(\rho c_{v}T+\frac{1}{2}\rho u^{2}\right)=\left(S_{f}\frac{p}{\gamma-1}+\frac{1}{2}S_{f}\rho u^{2}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $S_{f}\rho E=S_{f}\rho\left(c_{v}T+\frac{1}{2}u^{2}\right)=S_{f}\left(\rho c_{v}T+\frac{1}{2}\rho u^{2}\right)=\left(S_{f}\frac{p}{\gamma-1}+\frac{1}{2}S_{f}\rho u^{2}\right)=S_{f}\frac{p}{\gamma-1}+\frac{1}{2}mu$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\frac{\partial}{\partial t}\left(S_{f}\rho E\right)+\frac{\partial}{\partial x}\left(mH\right)-\frac{\partial}{\partial x}\left(\kappa\frac{\partial T}{\partial x}\right)=Q_{in}$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
\frac{S_{f}}{\gamma-1}\frac{\partial p}{\partial t}+\frac{1}{2}\frac{\partial\rho S_{f}u^{2}}{\partial t}+\frac{\partial}{\partial x}\left(\rho uS_{f}c_{p}T+\frac{1}{2}\rho u^{3}S_{f}+Q_{\mathrm{ax}}\right)-Q_{s\to f}=0,
\end{equation}
\end_inset
, and
\begin_inset Formula $Q_{\mathrm{ax}}$
\end_inset
is the axial conduction:
\begin_inset Formula
\begin{equation}
Q_{\mathrm{ax}}=-\kappa S_{f}\frac{\partial T}{\partial x},
\end{equation}
\end_inset
and,
\begin_inset Formula $Q_{s\to f}$
\end_inset
is the heat flow from the solid to the fluid.
\end_layout
\begin_layout Standard
The quasi-discretized form of this equation is
\begin_inset Formula
\begin{multline}
\frac{V_{f}}{\gamma-1}\frac{\partial p_{i}}{\partial t}+\frac{1}{2}\left(x_{r}-x_{l}\right)\frac{\partial\left(mu\right)_{i}}{\partial t}+\\
c_{p}m_{R}\left(W_{r,L}T_{i}+W_{r,R}T_{i+1}\right)-c_{p}m_{l}\left(W_{l,R}T_{i}+W_{l,L}T_{i-1}\right)+\\
\kappa_{R}\left(W_{c,Rl}T_{i}+W_{c,Rr}T_{i+1}\right)-\kappa_{L}\left(W_{c,Lr}T_{i}+W_{c,Ll}T_{i-1}\right)+\\
m_{r}E_{\mathrm{kin},r}-mE_{\mathrm{kin},l}-\left(x_{R}-x_{L}\right)Q_{s\to f}=0,
\end{multline}
\end_inset
, where
\begin_inset Formula
\begin{equation}
W_{R,l}=\frac{x_{i+1}-x_{R}}{x_{i+1}-x_{i}}+\quad;\quad W_{R,r}=1-W_{R,l}
\end{equation}
\end_inset
, and
\begin_inset Formula
\begin{equation}
\kappa_{R}=W_{R,l}\kappa_{i}+W_{R,r}\kappa_{i+1}
\end{equation}
\end_inset
, and
\begin_inset Formula
\begin{equation}
W_{c,Rl}=\frac{S_{f,R}}{x_{i+1}-x_{i}}\quad;\quad W_{c,Rr}=-W_{c,Rl}
\end{equation}
\end_inset
, and
\begin_inset Formula
\begin{equation}
W_{c,Ll}=\frac{S_{f,L}}{x_{i}-x_{i-1}}\quad;\quad W_{c,Lr}=-W_{c,Ll}
\end{equation}
\end_inset
The flow of kinetic energy is computed as
\begin_inset Formula
\begin{equation}
E_{\mathrm{kin},R}=\frac{1}{2}m_{R}\left(\frac{m_{R}}{S_{f,R}\left(W_{R,l}\rho_{i}+W_{R,r}\rho_{i+1}\right)}\right)^{2}=\frac{1}{2}m_{R}^{3}S_{f,R}\left(W_{R,l}\rho_{i}+W_{R,r}\rho_{i+1}\right)^{-2},
\end{equation}
\end_inset
So
\begin_inset Formula
\begin{eqnarray}
\frac{\partial E_{\mathrm{kin},R}}{\partial m} & = & \frac{3}{2}S_{f,R}\left(W_{R,l}\rho_{i}+W_{R,r}\rho_{i+1}\right)m_{R}^{2}\\
\frac{\partial E_{\mathrm{kin},R}}{\partial\rho_{i}} & = & -m_{R}^{3}S_{f,R}\left(W_{R,l}\rho_{i}+W_{R,r}\rho_{i+1}\right)^{-3}W_{R,l}\\
\frac{\partial E_{\mathrm{kin},R}}{\partial\rho_{i+1}} & = & -m_{R}^{3}S_{f,R}\left(W_{R,l}\rho_{i}+W_{R,r}\rho_{i+1}\right)^{-3}W_{R,r}
\end{eqnarray}
\end_inset
similarly, the flux through the left wall is computed as
\begin_inset Formula
\begin{equation}
E_{\mathrm{kin},L}=\frac{1}{2}m_{L}\left(\frac{m_{L}}{S_{f,L}\left(W_{L,l}\rho_{i-1}+W_{L,l}\rho_{i}\right)}\right)^{2},
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
The last term,
\begin_inset Formula $Q_{s\to f}$
\end_inset
is dependent on the specific model implemented in a derived class of
\noun on
Duct
\noun default
.
See for example the HopkinsLaminarDuct.Laminar flow
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\tilde{\boldsymbol{\mathcal{R}}}=\tilde{\mathbf{R}}\diamond\tilde{\mathbf{m}}
\end{equation}
\end_inset
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
\begin_inset Formula $\hat{\mathcal{R}}_{n}=\frac{\mu}{r_{h}^{2}}\frac{is_{n}^{2}f_{\nu,n}}{1-f_{\nu,n}}\hat{U}_{n}$
\end_inset
where
\begin_inset Formula $s_{n}^{2}=r_{h}^{2}\frac{\rho_{0}\omega}{\mu}$
\end_inset
\end_layout
\begin_layout Plain Layout
Substituting that:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\hat{\mathcal{R}}_{n}=\rho_{0}\frac{i\omega nf_{\nu,n}}{1-f_{\nu,n}}\hat{U}_{n}$
\end_inset
\end_layout
\end_inset
where
\begin_inset Formula
\begin{equation}
\tilde{R}_{n}=\frac{i\omega nf_{\nu,n}}{1-f_{\nu,n}}
\end{equation}
\end_inset
\end_layout
\begin_layout Subsection
Isentropic state equation
\end_layout
\begin_layout Standard
\begin_inset Formula
\[
\hat{\mathbf{1}}+\frac{\hat{\mathbf{p}}}{p_{0}}-\mathcal{\boldsymbol{F}}\cdot\left(\frac{\boldsymbol{\rho}}{\rho_{0}}\right)^{\gamma}=\mathbf{0}
\]
\end_inset
\end_layout
\begin_layout Subsection
Discretization
\end_layout
\begin_layout Standard
Since pressure and density live on the vertices, to compute
\begin_inset Formula $f_{\nu,n}$
\end_inset
at each cell wall, we take for
\begin_inset Formula $\delta_{\nu,\kappa}$
\end_inset
the weighted average of the neighboring vertices.
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{eqnarray}
\hat{T}_{0,L} & \approx & w_{i-1}\hat{T}_{0,i-1}+w_{i}T_{0,i},\\
\hat{p}_{0,L} & \approx & w_{i-1}\hat{T}_{0,i-1}+w_{i}T_{0,i},
\end{eqnarray}
\end_inset
where
\begin_inset Note Note
status open
\begin_layout Plain Layout
\begin_inset Formula $w_{i}=1-w_{i-1}=\frac{x_{i+1}-x_{L}}{x_{i+1}-x_{i-1}}$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
w_{i-1}=\frac{x_{i+1}-x_{L}}{x_{i+1}-x_{i-1}}\quad w_{i}=1-w_{i-1}
\end{equation}
\end_inset
\begin_inset Note Note
status collapsed
\begin_layout Section
Turbulent flow
\end_layout
\begin_layout Plain Layout
From paper Characteristic-based non-linear simulation of large-scale standing-wa
ve thermoacoustic engine
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\begin{equation}
\mathcal{D}=-S_{f}\rho f
\end{equation}
\end_inset
, with
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
\begin_inset Formula
\[
C_{f}=\frac{1}{4}\frac{fd}{u|u|}\Rightarrow f=\frac{4C_{f}}{d}u|u|
\]
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\[
f=\frac{4C_{f}}{d}u|u
\]
\end_inset
, this becomes
\begin_inset Formula
\begin{equation}
\mathcal{D}=-m\frac{4C_{f}}{d}|u|
\end{equation}
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Section
LaminarDuct
\end_layout
\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open
\begin_layout Plain Layout
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="3">
<features tabularvalignment="middle" tabularwidth="100text%">
<column alignment="left" valignment="top" width="0pt">
<column alignment="left" valignment="top" width="40text%">
<column alignment="left" valignment="top" width="40text%">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Insulated
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Not insulated
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
With solid
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Impossible combination
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Itemize
Wall temperature is determined by balance in heat flow from fluid domain
to solid domain
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Without solid
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Itemize
Time-averaged heat transfer from fluid to solid is zero by setting wall
temperature equal to fluid temperature.
Hence
\begin_inset Formula $\frac{d\hat{T}_{w,0}}{dx}=\frac{d\hat{T}_{0}}{dx}$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Itemize
Wall temperature is prescribed, heat flow through solid material is zero
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
Overview
\end_layout
\end_inset
\end_layout
\begin_layout Plain Layout
\end_layout
\end_inset
\end_layout
\begin_layout Subsection
Viscous resistance
\end_layout
\begin_layout Subsection
Wall temperature prescribed
\end_layout
\begin_layout Standard
In the HopkinsLaminarDuct,
\begin_inset Formula
\begin{equation}
\hat{Q}_{s\to f}=\hat{\mathcal{H}}-\hat{Q}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}\hat{m},
\end{equation}
\end_inset
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
\series bold
\begin_inset Formula $\hat{\mathbf{Q}}_{s\to f}=\mathcal{H}-\hat{Q}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}\hat{m}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\frac{\partial\hat{\mathbf{Q}}_{s\to f}}{\partial\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}}=-\hat{Q}\hat{m}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $T_{w,0}=\left[\begin{array}{cccc}
1 & 0 & 0 & \dots\end{array}\right]\hat{\mathbf{T}}_{w}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\frac{\partial\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}}{\partial\frac{\mathrm{d}\hat{\mathbf{T}}}{\mathrm{d}x}}=$
\end_inset
\end_layout
\end_inset
where
\begin_inset Formula
\begin{align}
\hat{\boldsymbol{\mathcal{H}}} & =-S_{f}\hat{H}\hat{T} & ; & n>0\\
\hat{\mathcal{\boldsymbol{\mathcal{H}}}}_{0} & =S_{f}\hat{H}_{0}\left(\hat{T}_{w,0}-\hat{T}_{0}\right) & ; & n=0
\end{align}
\end_inset
where
\begin_inset Formula
\begin{equation}
\hat{H}=\frac{i\hat{\rho}_{0}c_{p}\frac{f_{\kappa}}{1+\epsilon_{s}}}{1-\frac{f_{\kappa}}{1+\epsilon_{s}}}
\end{equation}
\end_inset
where
\begin_inset Formula
\[
\tilde{Q}_{n}=\frac{c_{p}}{1-\Pr}\left(\frac{f_{\nu,n}}{1-f_{\nu,n}}-\Pr\nolimits _{0}\frac{f_{\kappa,n}}{1-f_{\kappa,n}}\right)
\]
\end_inset
\end_layout
\begin_layout Section
TurbulentDuct
\end_layout
\begin_layout Section
\noun on
Duct
\noun default
s with solids
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\rho_{s}c_{s}S_{s}\frac{\partial T_{s}}{\partial t}-\frac{\partial}{\partial x}\left(\kappa_{s}S_{s}\frac{\partial T_{s}}{\partial x}\right)=-Q_{s\to f}
\end{equation}
\end_inset
\begin_inset Note Note
status open
\begin_layout Plain Layout
Discretized:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
\rho_{s}c_{s}S_{s}\frac{\partial T_{s}}{\partial t}-\frac{\partial}{\partial x}\left(\kappa_{s}S_{s}\frac{\partial T_{s}}{\partial x}\right)=-Q_{s\to f}
\]
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
V_{vs}\rho_{s}c_{s}\frac{\partial T_{s,i}}{\partial t}+Q_{r}-Q_{l}+Q_{s\to f}=0
\]
\end_inset
\end_layout
\end_inset
where
\begin_inset Formula $T_{s}$
\end_inset
is the area-averaged temperature of the solid and
\begin_inset Formula
\begin{equation}
Q_{s\to f}=Q_{s\to f}\left(T_{w},\dots\right)=S_{s}\hat{H}_{s}\left(\hat{T}_{s}-\hat{T}_{w}\right)
\end{equation}
\end_inset
is the transverse heat transfer, which is a function of the
\emph on
wall
\emph default
temperature.
The wall temperature, on its turn is a function of the time-averaged temperatur
e of the solid and the transverse heat transfer:
\begin_inset Formula
\begin{equation}
T_{w}=T_{w}\left(T_{s},Q_{s\to f}\right)
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
Local
\begin_inset Formula $T_{s}$
\end_inset
is
\begin_inset Formula $T_{s,l}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $i\omega T_{s,l}-\alpha_{s}\frac{\partial^{2}T_{s,l}}{\partial y^{2}}=0$
\end_inset
with symmetric boundary conditions:
\begin_inset Formula $T_{s,l}\left(\pm y_{0}\right)=T_{w}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\Rightarrow T_{s,l}=A+B\cosh\left(\left(1+i\right)\frac{y}{\delta_{\kappa,s}}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\left\langle T_{s,l}\right\rangle =T_{s}$
\end_inset
\end_layout
\begin_layout Plain Layout
—–
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $T_{s,l}=A+B\cosh\left(\left(1+i\right)\frac{y}{\delta_{\kappa,s}}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
Using boundary conditions:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $T_{s,l}(y_{0})=T_{w}=A+B\cosh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $A=T_{w}-B\cosh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
such that:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $T_{s,l}=T_{w}+B\left(\cosh\left(\left(1+i\right)\frac{y}{\delta_{\kappa,s}}\right)-\cosh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
and:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\left\langle T_{s,l}\right\rangle =T_{s}=T_{w}+B\left[\frac{\sinh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)}{\left(1+i\right)\frac{y}{\delta_{\kappa,s}}}-B\cosh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)\right]\Rightarrow\frac{T_{s}-T_{w}}{\frac{\sinh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)}{\left(1+i\right)\frac{y}{\delta_{\kappa,s}}}-\cosh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)}=B$
\end_inset
\end_layout
\begin_layout Plain Layout
Sucht that
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $T_{s,l}=T_{w}+\left(T_{s}-T_{w}\right)\frac{1-\frac{\cosh\left(\left(1+i\right)\frac{y}{\delta_{\kappa,s}}\right)}{\cosh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)}}{1-\frac{\sinh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)}{\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\cosh\left(\left(1+i\right)\frac{y_{0}}{\delta_{\kappa,s}}\right)}}=T_{w}+\left(T_{s}-T_{w}\right)\frac{1-h_{\kappa,s}}{1-f_{\kappa,s}}$
\end_inset
\end_layout
\end_inset
The temperature distribution in the solid obeys
\begin_inset Formula
\begin{equation}
T_{s,l}=T_{w}+\left(T_{s}-T_{w}\right)\frac{1-h_{s}}{1-f_{s}},
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
And the heat input equals
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
\begin_inset Formula $Q_{s\to f}=\kappa_{s}\Pi\frac{\partial T_{s,l}}{\partial n}=-\kappa_{s}\Pi\frac{\partial T_{s}}{\partial y}|_{y_{0}}\overset{\mathrm{par.\,plates}}{=}=$
\end_inset
\end_layout
\begin_layout Plain Layout
with
\begin_inset Formula $\mathbf{n}$
\end_inset
pointing from the fluid into the solid (do not know if this is according
to my definition)
\end_layout
\begin_layout Plain Layout
for parallel plates:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $T_{s,l}=T_{w}+\left(T_{s}-T_{w}\right)\frac{1-h_{s}}{1-f_{s}}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s_{t}=r_{h}\sqrt{\frac{\rho_{0}c_{p}\omega}{\kappa}}=\sqrt{\Pr}s$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s_{s}=r_{h,s}\sqrt{\frac{\rho_{s}c_{s}\omega}{\kappa_{s}}}$
\end_inset
\end_layout
\begin_layout Plain Layout
For parallel plates:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $Q_{s\to f}=-\kappa_{s}\Pi\frac{\partial T_{s,l}}{\partial y}|_{y=r_{h,s}}=-\kappa_{s}\frac{S_{s}}{r_{h,s}}\left(T_{s}-T_{w}\right)\frac{1}{1-f_{s}}\frac{\partial}{\partial y}\left(\frac{-\cosh\left(\sqrt{i}s_{s}\frac{y}{r_{h,s}}\right)}{\cosh\left(\sqrt{i}s_{s}\right)}\right)|_{y=r_{h,s}}$
\end_inset
\end_layout
\begin_layout Plain Layout
— For parallel-plates
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $Q_{s\to f}=\kappa_{s}\frac{S_{s}}{r_{h,s}}\left(T_{s}-T_{w}\right)\frac{1}{1-f_{s}}\frac{\partial}{\partial y}\left(\frac{\cosh\left(\sqrt{i}s_{s}\frac{y}{r_{h,s}}\right)}{\cosh\left(\sqrt{i}s_{s}\right)}\right)|_{y=r_{h,s}}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $Q_{s\to f}=\frac{\kappa_{s}S_{s}}{r_{h,s}^{2}}\left(T_{s}-T_{w}\right)\frac{\sqrt{i}s_{s}}{1-f_{s}}\tanh\left(\sqrt{i}s_{s}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
\end_layout
\begin_layout Plain Layout
Using:
\begin_inset Formula $f_{s}=\frac{\tanh\left(\sqrt{i}s_{s}\right)}{\sqrt{i}s_{s}}\Rightarrow\tanh\left(\sqrt{i}s_{s}\right)=f_{s}\sqrt{i}s_{s}$
\end_inset
\end_layout
\begin_layout Plain Layout
Fill in:
\begin_inset Formula $Q_{s\to f}=\frac{\kappa_{s}S_{s}}{r_{h,s}^{2}}\left(T_{s}-T_{w}\right)\frac{is_{s}^{2}f_{s}}{1-f_{s}}$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
Q_{s\to f}\overset{\mathrm{par.\,plates}}{=}=-\kappa_{s}\Pi\frac{\partial T_{s}}{\partial y}|_{y_{0}}=\frac{\kappa_{s}S_{s}}{r_{h,s}^{2}}\left(T_{s}-T_{w}\right)\frac{is_{s}^{2}f_{s}}{1-f_{s}}
\end{equation}
\end_inset
Hence
\begin_inset Formula
\begin{equation}
Q_{s\to f}=S_{s}H_{s}\left(T_{s}-T_{w}\right)
\end{equation}
\end_inset
Such that
\begin_inset Formula
\begin{equation}
H_{s}=\frac{\kappa_{s}}{r_{h,s}^{2}}\frac{is_{s}^{2}f_{s}}{1-f_{s}}
\end{equation}
\end_inset
\end_layout
\begin_layout Subsection
Wall temperature not prescribed
\end_layout
\begin_layout Standard
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
Check if this is in agreement with other one
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
Q_{s\to f}=S_{f}\frac{i\hat{\rho}_{0}c_{p}\omega\frac{f_{\kappa}}{1+\epsilon_{s}}}{1-\frac{f_{\kappa}}{1+\epsilon_{s}}}\hat{T}-\frac{c_{p}}{\left(1-\Pr\right)\left(1+\epsilon_{s}\right)}\left[\dfrac{f_{\kappa}}{1-\frac{f_{\kappa}}{1+\epsilon_{s}}}\left(\frac{1-\lambda f_{\kappa}-\Pr\left(1-f_{\nu}\right)}{1-f_{\nu}}\right)-\frac{f_{\kappa}-f_{\nu}}{1-f_{\nu}}\right]\hat{m}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}
\]
\end_inset
\end_layout
\begin_layout Plain Layout
Using:
\begin_inset Formula $\lambda=\frac{1+\frac{\epsilon_{s}f_{\nu}}{f_{\kappa}}}{1+\epsilon_{s}}$
\end_inset
,
\begin_inset Formula $\lambda\to1$
\end_inset
,
\begin_inset Formula $\epsilon_{s}=0$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
Q_{s\to f}=S_{f}\frac{i\hat{\rho}_{0}c_{p}\omega f_{\kappa}}{1-f_{\kappa}}\hat{T}-\frac{c_{p}}{\left(1-\Pr\right)\left(1+\epsilon_{s}\right)}\left[\dfrac{f_{\kappa}}{1-f_{\kappa}}\left(\frac{1-f_{\kappa}-\Pr\left(1-f_{\nu}\right)}{1-f_{\nu}}\right)-\frac{f_{\kappa}-f_{\nu}}{1-f_{\nu}}\right]\hat{m}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}
\]
\end_inset
\end_layout
\begin_layout Plain Layout
Work under same denominator:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
Q_{s\to f}=S_{f}\frac{i\hat{\rho}_{0}\omega c_{p}f_{\kappa,n}}{1-f_{\kappa,n}}\hat{T}-\frac{c_{p}}{\left(1-\Pr\right)\left(1+\epsilon_{s}\right)}\left[\frac{f_{\kappa}\left(1-f_{\kappa}-\Pr\left(1-f_{\nu}\right)\right)-\left(1-f_{\kappa}\right)\left(f_{\kappa}-f_{\nu}\right)}{\left(1-f_{\kappa}\right)\left(1-f_{\nu}\right)}\right]\hat{m}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}
\]
\end_inset
\end_layout
\begin_layout Plain Layout
Split off Prandtl term:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
Q_{s\to f}=S_{f}\frac{i\hat{\rho}_{0}c_{p}\omega f_{\kappa}}{1-f_{\kappa}}\hat{T}-\frac{c_{p}}{\left(1-\Pr\right)\left(1+\epsilon_{s}\right)}\left[\frac{f_{\kappa}\left(1-f_{\kappa}\right)-\left(1-f_{\kappa}\right)\left(f_{\kappa}-f_{\nu}\right)}{\left(1-f_{\kappa}\right)\left(1-f_{\nu}\right)}-\frac{\Pr f_{\kappa}}{\left(1-f_{\kappa}\right)}\right]\hat{m}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}
\]
\end_inset
\end_layout
\begin_layout Plain Layout
Work out rest
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
Q_{s\to f}=S_{f}\frac{i\hat{\rho}_{0}c_{p}\omega f_{\kappa}}{1-f_{\kappa}}\hat{T}-\frac{c_{p}}{\left(1-\Pr\right)\left(1+\epsilon_{s}\right)}\left[\frac{\left(1-f_{\kappa}\right)f_{\nu}}{\left(1-f_{\kappa}\right)\left(1-f_{\nu}\right)}-\frac{\Pr f_{\kappa}}{\left(1-f_{\kappa}\right)}\right]\hat{m}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}
\]
\end_inset
\end_layout
\begin_layout Plain Layout
Finally:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
Q_{s\to f}=S_{f}\frac{i\hat{\rho}_{0}c_{p}\omega f_{\kappa}}{1-f_{\kappa}}\hat{T}-\frac{c_{p}}{\left(1-\Pr\right)\left(1+\epsilon_{s}\right)}\left[\frac{f_{\nu}}{\left(1-f_{\nu}\right)}-\frac{\Pr f_{\kappa}}{\left(1-f_{\kappa}\right)}\right]\hat{m}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}
\]
\end_inset
\end_layout
\end_inset
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
What happens for
\begin_inset Formula $\omega\to0$
\end_inset
?
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
\lim_{\omega\to0}\epsilon_{s}=\sqrt{\frac{\kappa_{0}\rho_{0}c_{p}}{\kappa_{s}\rho_{s}c_{s}}}\frac{\tanh\left(\sqrt{i\frac{\rho_{0}c_{p}\omega}{\kappa}}r_{h,s}\right)}{\tanh\left(\sqrt{i\frac{\rho_{s}c_{s}\omega}{\kappa_{s}}}r_{h,s}\right)}=\sqrt{\frac{\kappa_{0}\rho_{0}c_{p}}{\kappa_{s}\rho_{s}c_{s}}}\frac{\tanh\left(\sqrt{i\frac{\rho_{0}c_{p}\omega}{\kappa}}r_{h,s}\right)}{\tanh\left(\sqrt{i\frac{\rho_{s}c_{s}\omega}{\kappa_{s}}}r_{h,s}\right)}=\sqrt{\frac{\kappa_{0}\rho_{0}c_{p}}{\kappa_{s}\rho_{s}c_{s}}}\frac{\sqrt{i\frac{\rho_{0}c_{p}\omega}{\kappa_{0}}}r_{h}}{\sqrt{i\frac{\rho_{s}c_{s}\omega}{\kappa_{s}}}r_{h,s}}=\frac{\rho_{0}c_{p}r_{h}}{\rho_{s}c_{s}r_{h,s}}
\]
\end_inset
\end_layout
\begin_layout Plain Layout
For
\begin_inset Formula $\omega\to0$
\end_inset
,
\begin_inset Formula $\lambda\to1$
\end_inset
,
\begin_inset Formula $\epsilon_{s}\to g_{s}\frac{\rho_{0}c_{p}r_{h}}{\rho_{s}c_{s}r_{h,s}}$
\end_inset
,
\begin_inset Formula $f_{\nu,\kappa}\to1$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\lim\limits _{\omega\to0}Q_{s\to f}==S_{f}\frac{i\hat{\rho}_{0}c_{p}\omega f_{\kappa}}{1+\epsilon_{s}-f_{\kappa}}\hat{T}-\frac{c_{p}}{\left(1-\Pr\right)\left(1+\epsilon_{s}\right)}\left[\dfrac{f_{\kappa}}{1-\frac{f_{\kappa}}{1+\epsilon_{s}}}\left(\frac{1-\lambda f_{\kappa}-\Pr\left(1-f_{\nu}\right)}{1-f_{\nu}}\right)-\frac{f_{\kappa}-f_{\nu}}{1-f_{\nu}}\right]\hat{m}\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\lambda=\frac{1+\frac{\epsilon_{s}f_{\nu}}{f_{\kappa}}}{1+\epsilon_{s}}$
\end_inset
,
\end_layout
\begin_layout Plain Layout
For parallel plates
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
\epsilon_{s}=\sqrt{\frac{\kappa_{0}\rho_{0}c_{p}}{\kappa_{s}\rho_{s}c_{s}}}\frac{\tanh\left(\sqrt{i\Pr}s\right)}{\tanh\left(\sqrt{i}s_{t,s}\right)}
\]
\end_inset
\end_layout
\begin_layout Plain Layout
Limit for
\begin_inset Formula $s$
\end_inset
and
\begin_inset Formula $s_{t,s}$
\end_inset
to zero gives:
\end_layout
\begin_layout Plain Layout
Filling this in in
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
Q_{s\to f}=S_{f}\frac{i\hat{\rho}_{0}c_{p}\omega f_{\kappa}}{1+\epsilon_{s}-f_{\kappa}}\hat{T}
\]
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
which is
\begin_inset Formula $Q_{s\to f}=\frac{i\hat{\rho}_{0}\omega f_{\kappa}}{1-f_{\kappa}}\left(\hat{T}-\hat{T}_{w}\right)-\frac{c_{p}}{1-\Pr}\left(\frac{f_{\nu,n}}{1-f_{\nu,n}}-\Pr\nolimits _{0}\frac{f_{\kappa,n}}{1-f_{\kappa,n}}\right)m\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}$
\end_inset
\end_layout
\begin_layout Plain Layout
Filling in for
\begin_inset Formula $T_{w}$
\end_inset
:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $Q_{s\to f}=\frac{i\hat{\rho}_{0}\omega f_{\kappa}}{1-f_{\kappa}}\left(\hat{T}-\left(T_{s}-\frac{Q_{s\to f}}{J_{s}S_{f}}\right)\right)-\frac{c_{p}}{1-\Pr}\left(\frac{f_{\nu,n}}{1-f_{\nu,n}}-\Pr\nolimits _{0}\frac{f_{\kappa,n}}{1-f_{\kappa,n}}\right)m\frac{\mathrm{d}\hat{T}_{w,0}}{\mathrm{d}x}$
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Subsection
Boundary conditions
\end_layout
\begin_layout Subsubsection
\noun on
Duct
\noun default
with solid to
\noun on
Duct
\noun default
without solid
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
Q_{s}=hS_{s}\left(T_{s}-T\right)
\end{equation}
\end_inset
\end_layout
\begin_layout Subsubsection
\noun on
Duct
\noun default
with solid to
\noun on
Duct
\noun default
with solid
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{eqnarray}
Q_{s,1} & = & Q_{s,2}\\
T_{s,1} & = & T_{s,2}
\end{eqnarray}
\end_inset
\end_layout
\begin_layout Section
\noun on
Regenerator
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
k_{\mathrm{tort}}\left(\frac{\partial m}{\partial t}+\frac{\partial mu}{\partial x}\right)+\frac{\partial p}{\partial x}+\mathcal{R}=0
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
If
\begin_inset Formula $k_{\mathrm{tort}}$
\end_inset
not given, it is computed according to Eq.
(14) of Swift and Ward:
\begin_inset Formula
\begin{equation}
k_{\mathrm{tort}}=1+\frac{\left(1-\phi\right)^{2}}{2\left(2\phi-1\right)}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\mathcal{R}=-\frac{1}{2}\frac{f}{r_{h}}m|u|
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
With
\begin_inset Formula
\begin{equation}
Re=\frac{4\rho|u|r_{h}}{\mu}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
Using
\begin_inset Formula
\begin{equation}
f=\frac{c_{1}}{Re}+c_{2}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
Filling in:
\begin_inset Formula
\begin{equation}
\mathcal{R}=S_{f}\left(\frac{c_{1}\mu}{8r_{h}^{2}}\frac{m}{\rho}+\frac{c_{2}}{2r_{h}}\mathrm{sgn}\left(m\right)mu\right)
\end{equation}
\end_inset
\end_layout
\begin_layout Section
\noun on
Duct
\noun default
boundary conditions
\end_layout
\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open
\begin_layout Plain Layout
\align center
\begin_inset Graphics
filename fig/duct_vars.eps
width 80text%
\end_inset
\begin_inset VSpace medskip
\end_inset
\end_layout
\begin_layout Plain Layout
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="3">
<features tabularvalignment="middle">
<column alignment="left" valignment="top">
<column alignment="left" valignment="top">
<column alignment="left" valignment="top" width="0pt">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Quotes eld
\end_inset
node
\begin_inset Quotes erd
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Variables
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Equations
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
huge{
\end_layout
\end_inset
\begin_inset Formula $\bullet$
\end_inset
\begin_inset ERT
status open
\begin_layout Plain Layout
}
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\rho,mu,T,p,Ts$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Continuity, Energy,
\begin_inset Formula $mu=\frac{m^{2}}{\rho S_{f}}$
\end_inset
, Solid energy
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\blacksquare$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $m$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Momentum
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $\Box$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
\begin_inset Formula $m,mH,T$
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Dependent on b.c.
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
Staggered grid equations and variables
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Subsection
PressureBc
\end_layout
\begin_layout Standard
Momentum equation (prescribes pressure
\begin_inset Formula $p_{p}$
\end_inset
)
\begin_inset Formula
\begin{equation}
\Delta x\frac{\partial\mathbf{m}_{L}}{\partial t}+\left(\widehat{\mathbf{mu}}_{0}-\widehat{\mathbf{mu}}_{L}\right)+S_{f,L}\left(\hat{\mathbf{p}}_{0}-\hat{\mathbf{p}}_{p}\right)+\Delta x\mbox{\textbf{\mathcal{R}}}_{L}=\mathbf{0}
\end{equation}
\end_inset
\end_layout
\begin_layout Itemize
\begin_inset Formula $mH$
\end_inset
extrapolated from inside
\end_layout
\begin_layout Itemize
\begin_inset Formula $T=T_{p}$
\end_inset
\end_layout
\begin_layout Itemize
\begin_inset Formula $T_{s}=T_{s,p}$
\end_inset
\end_layout
\begin_layout Standard
And the boundary condition for the temperature is computed assuming adiabatic
compression-expansion.
Currently, this is implemented for thermally perfect gases only:
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
c_{p}\left(T\right)\mathrm{d}T=\frac{\mathrm{d}p}{\rho}
\end{equation}
\end_inset
FIlling in the perfect gas law and a bit of bookkeeping results in
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\frac{1}{R_{s}}\int\limits _{T_{0}}^{T_{p}}\frac{c_{p}\left(T\right)}{T}\mathrm{d}T-\ln\left(\frac{p_{p}-p_{0}}{p_{0}}\right)=0
\end{equation}
\end_inset
Note that in general, to solve this equation for the temperature requires
a numerical integration, however for the currently implemented gases,
\begin_inset Formula $c_{p}$
\end_inset
is a polynomial function of
\begin_inset Formula $T$
\end_inset
:
\begin_inset Formula
\begin{equation}
c_{p}(T)=\sum_{i=0}^{N_{c_{p}}}c_{p,i}T^{i}
\end{equation}
\end_inset
In that case
\end_layout
\begin_layout Standard
2016-11-11 22:25:44 +00:00
\begin_inset Formula
\begin{equation}
\frac{1}{R_{s}}\left(c_{p,0}\ln\left(\frac{T_{p}}{T_{0}}\right)+\sum_{i=1}^{N_{c_{p}}}\frac{c_{p,i}\left(T_{p}^{i}-T_{0}^{i}\right)}{i}\right)-\ln\left(\frac{p_{p}-p_{0}}{p_{0}}\right)=0.\label{eq:T-p-adiabatic}
2016-11-11 22:25:44 +00:00
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
Equation
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:T-p-adiabatic"
\end_inset
is solved using a one-dimensional root finding algorithm (see Section
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:One-dimensional-function-solvers"
\end_inset
).
Note that for an ideal gas an explicit formula is available:
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
T_{p,\mathrm{ideal}}=T_{0}\left(\frac{p_{0}+p_{p}}{p_{0}}\right)^{\frac{\gamma_{0}-1}{\gamma_{0}}}.\label{eq:ideal-gas-isentropic-p-T}
\end{equation}
\end_inset
Looking closely at Equation
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:ideal-gas-isentropic-p-T"
\end_inset
, we find that
\begin_inset Formula $T_{p,\mathrm{ideal}}$
\end_inset
provides a good guess for the final solution.
\end_layout
2016-11-11 22:25:44 +00:00
\begin_layout Subsection
AdiabaticWall
\end_layout
\begin_layout Itemize
\begin_inset Formula $m=0$
\end_inset
\end_layout
\begin_layout Itemize
\begin_inset Formula $mH=0$
\end_inset
\end_layout
\begin_layout Itemize
\begin_inset Formula $Q=0$
\end_inset
\end_layout
\begin_layout Itemize
\begin_inset Formula $Q_{s}=0$
\end_inset
\end_layout
\begin_layout Subsection
IsoTWall
\end_layout
\begin_layout Itemize
\begin_inset Formula $m=0$
\end_inset
\end_layout
\begin_layout Itemize
\begin_inset Formula $mH=0$
\end_inset
\end_layout
\begin_layout Itemize
\begin_inset Formula $T=T_{p}$
\end_inset
\end_layout
\begin_layout Itemize
\begin_inset Formula $T_{s}=T_{s,p}$
\end_inset
\end_layout
\begin_layout Subsection
ImpedanceBc
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\hat{\mathbf{p}}=\mathbf{Z}\cdot\hat{\mathbf{u}}
\end{equation}
\end_inset
\begin_inset Formula
\begin{equation}
\mathbf{R}=\hat{\mathbf{p}}-\mathbf{Z}\cdot\mathcal{\boldsymbol{F}}\cdot\left(\frac{\mathbf{m}_{bc}}{S_{f}\left(w_{1}\mathbf{\rho}_{1}+w_{2}\mathbf{\rho}_{2}\right)}\right)=\mathbf{0}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{R}}{\partial\hat{\mathbf{p}}_{bc}}=\mathbf{I}
\end{equation}
\end_inset
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{R}}{\partial\hat{\mathbf{m}}_{bc}}=-\mathbf{Z}\cdot\boldsymbol{\mathcal{F}}\cdot\mbox{diag}\left(\frac{1}{S_{f}\boldsymbol{\rho}_{bc}}\right)\cdot\boldsymbol{\mathcal{F}}^{-1}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{R}}{\partial\boldsymbol{\rho}_{1,2}}=w_{1,2}\mathbf{Z}\cdot\boldsymbol{\mathcal{F}}\cdot\mbox{diag}\left(\frac{\mathbf{m}_{bc}}{S_{f}\boldsymbol{\rho}_{bc}^{2}}\right)\cdot\boldsymbol{\mathcal{F}}^{-1}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
\begin_inset Formula $\mathbf{Z}^{-1}\cdot\hat{\mathbf{p}}=\boldsymbol{\mathcal{F}}^{-1}\cdot\hat{\mathbf{u}}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\boldsymbol{\mathcal{F}}\cdot\left[\left(\boldsymbol{\mathcal{F}}^{-1}\left(\mathbf{Z}^{-1}\cdot\hat{\mathbf{p}}\right)\right)\circ\mathbf{m}\right]=\boldsymbol{\mathcal{F}}^{-1}\cdot\mathbf{u}\circ\mathbf{m}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\boldsymbol{\mathcal{F}}\cdot\left[\left(\boldsymbol{\mathcal{F}}^{-1}\left(\mathbf{Z}^{-1}\cdot\hat{\mathbf{p}}\right)\right)\circ\mathbf{m}\right]=\widehat{\mathbf{m}\mathbf{u}}$
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
Temperature at the b.c.
computed from pressure:
\end_layout
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
\begin_inset Formula $T_{bc}=T_{0}\left(\frac{p_{bc}+p_{p}}{p_{0}}\right)^{\frac{\gamma_{0}-1}{\gamma_{0}}}$
\end_inset
, dus
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
\mathbf{R}=\hat{\mathbf{p}}_{bc}-\boldsymbol{\mathcal{F}}\cdot\left[p_{0}\left(\left(\frac{\mathbf{T}_{bc}}{T_{0}}\right)^{\frac{\gamma_{0}}{\gamma_{0}-1}}-\mathbf{1}\right)\right]=\mathbf{0}
\end{equation}
\end_inset
and
\begin_inset Note Note
status open
\begin_layout Plain Layout
\begin_inset Formula $\mathbf{R}=\hat{\mathbf{p}}_{bc}-\boldsymbol{\mathcal{F}}\cdot\left[p_{0}\left(\left(\frac{\mathbf{T}_{bc}}{T_{0}}\right)^{\frac{\gamma_{0}}{\gamma_{0}-1}}-\mathbf{1}\right)\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\frac{\partial\mathbf{R}}{\partial\mathbf{T}_{bc}}=\boldsymbol{\mathcal{F}}\cdot\mbox{diag}\left[\frac{\gamma_{0}}{\gamma_{0}-1}\frac{p_{0}}{T_{0}}\left(\left(\frac{\mathbf{T}_{bc}}{T_{0}}\right)^{\frac{1}{\gamma_{0}-1}}\right)\right]\cdot\boldsymbol{\mathcal{F}}^{-1}$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{R}}{\partial\mathbf{T}_{bc}}=\boldsymbol{\mathcal{F}}\cdot\mbox{diag}\left[\frac{\gamma_{0}}{\gamma_{0}-1}\frac{p_{0}}{T_{0}}\left(\left(\frac{\mathbf{T}_{bc}}{T_{0}}\right)^{\frac{1}{\gamma_{0}-1}}\right)\right]\cdot\boldsymbol{\mathcal{F}}^{-1}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
Finally:
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\mathbf{R}=\boldsymbol{\mathcal{F}}\cdot\left[\left(\boldsymbol{\mathcal{F}}^{-1}\left(\mathbf{Z}^{-1}\cdot\hat{\mathbf{p}}\right)\right)\circ\left(\boldsymbol{\mathcal{F}}^{-1}\cdot\mathbf{m}\right)\right]-\widehat{\mathbf{m}\mathbf{u}}=\mathbf{0}
\end{equation}
\end_inset
And
\begin_inset Formula
\begin{eqnarray}
\frac{\partial\mathbf{R}}{\partial\hat{\mathbf{p}}} & = & \boldsymbol{\mathcal{F}}\cdot\mathrm{diag}\left(\mathbf{m}\right)\cdot\boldsymbol{\mathcal{F}}^{-1}\cdot\mathbf{Z}^{-1}\\
\frac{\partial\mathbf{R}}{\partial\hat{\mathbf{m}}} & = & \boldsymbol{\mathcal{F}}\cdot\left[\mbox{diag}\left(\boldsymbol{\mathcal{F}}^{-1}\cdot\mathbf{Z}^{-1}\cdot\hat{\mathbf{p}}\right)\cdot\boldsymbol{\mathcal{F}}^{-1}\right]\\
\frac{\partial\mathbf{R}}{\partial\widehat{\mathbf{m}\mathbf{u}}} & = & -\mathbf{I}
\end{eqnarray}
\end_inset
\end_layout
\begin_layout Subsection
VelocityBc
\end_layout
\begin_layout Standard
Prescribed velocity, adiabatic compression/expansion.
\begin_inset Formula
\begin{equation}
\mathbf{R}=\boldsymbol{\mathcal{F}}\cdot\left(\frac{\mathbf{m}_{bc}}{S_{f}\mathbf{\rho}_{bc}}\right)-\hat{\mathbf{u}}_{bc}=0
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\frac{\partial\mathbf{R}}{\partial\hat{\mathbf{m}}_{bc}}=\boldsymbol{\mathcal{F}}\cdot\mbox{diag}\left(\frac{1}{S_{f}\boldsymbol{\rho}_{bc}}\right)\cdot\boldsymbol{\mathcal{F}}^{-1}
\end{equation}
\end_inset
\end_layout
\begin_layout Chapter
Piston
\end_layout
\begin_layout Standard
For the piston, the equation of motion
\begin_inset Formula
\begin{equation}
M\frac{\mathrm{d}^{2}x}{\mathrm{d}t^{2}}+C_{m}\frac{\mathrm{d}x}{\mathrm{d}t}+K_{m}x=S_{l}p_{l}-S_{r}p_{r}+F
\end{equation}
\end_inset
is solved, where
\begin_inset Formula $F$
\end_inset
is the external force applied to the Piston.
This external force can be either boundary condition, or applied by electromagn
etic interaction.
For both the right as well as the left volume, conservation of mass, energy
and the thermal equation of state is solved.
The continuity equations are
\begin_inset Formula
\begin{eqnarray}
\frac{\partial\rho_{r}\left(V_{0r}-xS_{r}\right)}{\partial t}+m_{f} & = & 0,\\
\frac{\partial\rho_{l}\left(V_{0l}+xS_{l}\right)}{\partial t}+m_{l} & = & 0,
\end{eqnarray}
\end_inset
.
\end_layout
\begin_layout Subsection
Piston volume mass conservation
\end_layout
\begin_layout Standard
Variables
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{eqnarray*}
x,\\
p_{r},T_{r},\rho_{r} & & m_{r},mH_{r}\\
p_{l},T_{l},\rho_{l} & & m_{l},mH_{l}
\end{eqnarray*}
\end_inset
\end_layout
\begin_layout Standard
and
\begin_inset Formula
\begin{eqnarray}
p_{r}-\rho_{r}R_{s}T_{r} & = & 0\\
p_{l}-\rho_{l}R_{s}T_{l} & = & 0
\end{eqnarray}
\end_inset
and
\end_layout
\begin_layout Subsection
Piston volume energy conservation
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{p_{r}}{\gamma-1}V_{r}\right)+p_{r}\frac{\mathrm{d}V_{r}}{\mathrm{d}t}+mH_{r}=0
\end{equation}
\end_inset
or
\begin_inset Formula
\[
\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{p_{r}}{\gamma-1}V_{r}\right)-\frac{\mathrm{d}x_{p}}{\mathrm{d}t}S_{r}p_{r}+mH_{r}=0
\]
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
To isentropic (and no mass flow):
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\mathrm{d}\left(\frac{p_{r}}{\gamma-1}V_{r}\right)+p_{r}\mathrm{d}V_{r}=0=\frac{\mathrm{d}p_{r}}{p_{r}\left(\gamma-1\right)}+\frac{1}{\gamma-1}\frac{\mathrm{d}V_{r}}{V_{r}}+\frac{\mathrm{d}V_{r}}{V_{r}}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\frac{\mathrm{d}p_{r}}{p_{r}}+\gamma\frac{\mathrm{d}V_{r}}{V_{r}}=0$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\frac{p}{p_{0}}=\left(\frac{V_{0}}{V}\right)^{\gamma}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\[
\frac{dp}{p}=-\gamma\frac{dV}{V}
\]
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
left side:
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{eqnarray}
\frac{1}{\gamma-1}\mathbf{D}\cdot\boldsymbol{\mathcal{F}}\cdot\left[\mathbf{p}_{l}\circ\left(V_{0r}-\mathbf{x}S_{l}\right)\right]+\boldsymbol{\mathcal{F}}\cdot\left[\mathbf{p}_{l}\circ\left(\boldsymbol{\mathcal{F}}^{-1}\cdot\mathbf{D}\cdot\left(V_{0l}-\hat{\mathbf{x}}S_{l}\right)\right)\right]+\boldsymbol{\mathcal{F}}\cdot\mathbf{mH}_{l} & = & 0
\end{eqnarray}
\end_inset
right side:
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\frac{\partial\frac{p_{l}}{\gamma-1}\left(V_{0l}+xS_{l}\right)}{\partial t}+mH_{l}=0
\end{equation}
\end_inset
\end_layout
\begin_layout Subsubsection
Mass in piston volumes
\end_layout
\begin_layout Standard
The time-averaged amount of mass in a piston volume is
\begin_inset Formula
\[
m=\mathcal{F}_{0}\cdot\left[(V_{0}\pm S\mathbf{x})\circ\mathbf{\rho}\right]
\]
\end_inset
where
\begin_inset Formula $\boldsymbol{\mathcal{F}}_{0}$
\end_inset
is the first row in the Fourier transform matrix.
Therefore,
\begin_inset Formula
\begin{equation}
\frac{\partial m}{\partial\hat{\boldsymbol{\rho}}}=\mathcal{F}_{0}\cdot\left[\mathrm{diag}(V_{0}\pm S\mathbf{x})\cdot\boldsymbol{\mathcal{F}}^{-1}\right]
\end{equation}
\end_inset
\end_layout
\begin_layout Subsection
Unconnected side
\end_layout
\begin_layout Standard
For example, left side is not connected:
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
\rho_{l}\left(V_{0l}+xS_{l}\right)=m_{l}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
Isentropic:
\end_layout
\begin_layout Standard
\begin_inset Formula
\[
p-p_{0}\left(\frac{\rho}{\rho_{0}}\right)^{\gamma}=0
\]
\end_inset
\end_layout
\begin_layout Standard
Later:
\end_layout
\begin_layout Chapter
Connectors
\end_layout
\begin_layout Section
Connector theory
\end_layout
\begin_layout Subsection
Conservation of mass
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
sm_{1}=sm_{2}
\end{equation}
\end_inset
\end_layout
\begin_layout Subsection
Conservation of energy
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
smH_{1}=smH_{2}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
sQ_{1}=sQ_{2}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
mH at the boundary is half the
\begin_inset Formula
\begin{equation}
mH_{boundary}=\frac{1}{2}\left(mH_{1}+mH_{2}\right)
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
Heat flow between
\noun on
Duct
\noun default
s
\end_layout
\begin_layout Subsection
Minor loss - conversion of kinetic energy to thermal energy
\end_layout
\begin_layout Standard
Minor loss generates a decrease in the total (stagnation) pressure:
\begin_inset Formula
\begin{equation}
\Delta p_{\mathrm{tot}}=-\frac{1}{2}K\rho_{u}u_{u}^{2}.
\end{equation}
\end_inset
For incompressible flow, the stagnation pressure over density is
\begin_inset Formula
\begin{equation}
p_{\mathrm{tot}}=p+\frac{1}{2}\rho u^{2}.
\end{equation}
\end_inset
For compressible flow, the stagnation pressure over density is
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
\begin_inset Formula $p_{tot}=p\left(1+\frac{\gamma-1}{2}M^{2}\right)^{\frac{\gamma}{\gamma-1}}\Rightarrow\frac{p_{tot}}{p}=\left(1+\frac{\gamma-1}{2}M^{2}\right)^{\frac{\gamma}{\gamma-1}}\Rightarrow\frac{p}{p_{tot}}=\left(1+\frac{\gamma-1}{2}M^{2}\right)^{\frac{\gamma}{1-\gamma}}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\rho=\rho_{tot}\left(\frac{p}{p_{tot}}\right)^{\frac{1}{\gamma}}\Rightarrow\rho_{tot}=\rho\left(\frac{p_{tot}}{p}\right)^{\frac{1}{\gamma}}\Rightarrow\rho_{tot}=\rho\left(1+\frac{\gamma-1}{2}M^{2}\right)^{\frac{\gamma}{\gamma-1}\frac{1}{\gamma}}=\rho\left(1+\frac{\gamma-1}{2}M^{2}\right)^{\frac{1}{\gamma-1}}$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\frac{p_{tot}}{\rho_{tot}}=\frac{p\left(1+\frac{\gamma-1}{2}M^{2}\right)^{\frac{\gamma}{\gamma-1}}}{\rho\left(1+\frac{\gamma-1}{2}M^{2}\right)^{\frac{1}{\gamma-1}}}=\frac{p}{\rho}\left(1+\frac{\gamma-1}{2}M^{2}\right)^{\frac{\gamma}{\gamma-1}-\frac{1}{\gamma-1}}=\frac{p}{\rho}\left(1+\frac{\gamma-1}{2}M^{2}\right)$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
p_{\mathrm{tot}}=p\left(1+\frac{1}{2}\frac{u^{2}}{c_{p}T}\right)^{\frac{\gamma}{\gamma-1}}
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
A change in total pressure over density results in an increase in entropy.
For a callorically perfect gas, the entropy is
\begin_inset Formula
\begin{equation}
s=s_{0}+c_{v}\ln\left[\left(\frac{p}{p_{0}}\right)\left(\frac{\rho_{0}}{\rho}\right)^{\gamma}\right],
\end{equation}
\end_inset
so the change in entropy from state 1 to 2 is
\begin_inset Formula
\begin{equation}
s_{2}-s_{1}=c_{v}\ln\left[\left(\frac{p_{2}}{p_{1}}\right)\left(\frac{\rho_{1}}{\rho_{2}}\right)^{\gamma}\right]=-R_{s}\ln\left(\frac{p_{\mathrm{tot},2}}{p_{\mathrm{tot},1}}\right)
\end{equation}
\end_inset
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
Using Hoeijmakers eq 6.15e:
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
For incompressible flow the total enthalpy is
\begin_inset Formula
\begin{equation}
dH=T\mathrm{d}s+\rho^{-1}\mathrm{d}p+u\mathrm{d}u
\end{equation}
\end_inset
hence from the internal energy we can derive
\begin_inset Formula
\begin{equation}
s=s_{0}+c\ln\left(T/T_{0}\right),
\end{equation}
\end_inset
which is, since
\begin_inset Formula $H_{d}=H_{u}$
\end_inset
\begin_inset Formula
\begin{equation}
s_{d}-s_{u}=c\ln\left(\frac{T_{d}}{T_{u}}\right)=-c\ln\left(\frac{\frac{p_{\mathrm{tot}}}{\rho}_{d}}{\frac{p_{\mathrm{tot}}}{\rho}_{u}}\right)=-c\ln\left(1+\frac{\Delta p_{\mathrm{tot}}}{p_{\mathrm{tot},u}}\right)
\end{equation}
\end_inset
such that the change in exergy flow is
\begin_inset Formula
\begin{equation}
m\Delta E_{x}=-T_{0}m\left(s_{d}-s_{u}\right),
\end{equation}
\end_inset
so
\begin_inset Formula
\begin{equation}
\Delta E_{x}=T_{0}c\ln\left(1-\frac{1}{2}\frac{Ku_{u}^{2}}{\left(\frac{p_{\mathrm{tot},u}}{\rho}\right)}\right)
\end{equation}
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status collapsed
\begin_layout Subsubsection
Generalization for compressible flow
\end_layout
\begin_layout Plain Layout
At a sharp interface, generally turbulence is created, which converts kinetic
energy to thermal energy.
To model this effect, minor loss coefficients are introduced.
If the minor loss coefficient is zero, no entropy is generated at an interface.
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\begin{equation}
\mathrm{d}h=T\mathrm{d}s+\rho^{-1}\mathrm{d}p
\end{equation}
\end_inset
\end_layout
\begin_layout Plain Layout
Isentropically:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\begin{equation}
\frac{T}{T_{0}}=\left(\frac{p}{p_{0}}\right)^{\frac{\gamma-1}{\gamma}}
\end{equation}
\end_inset
\end_layout
\begin_layout Plain Layout
For a calorically perfect gas, the entropy is
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
From Hoeijmakers:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s=s_{0}+c_{v}\ln\left[\left(\frac{p}{p_{0}}\right)\left(\frac{\rho_{0}}{\rho}\right)^{\gamma}\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
Rework to:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s=s_{0}+c_{v}\ln\left[\left(\frac{p}{p_{0}}\right)\left(\frac{Tp_{0}}{T_{0}p}\right)^{\gamma}\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s=s_{0}+c_{v}\ln\left[\left(\frac{p}{p_{0}}\right)\left(\frac{p_{0}}{p}\right)^{\gamma}\left(\frac{T}{T_{0}}\right)^{\gamma}\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s=s_{0}+c_{v}\ln\left[\left(\frac{p}{p_{0}}\right)^{1-\gamma}\left(\frac{T}{T_{0}}\right)^{\gamma}\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s=s_{0}+-c_{v}\ln\left[\left(\frac{p_{0}}{p}\right)^{1-\gamma}\left(\frac{T}{T_{0}}\right)^{-\gamma}\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s=s_{0}+\left(\gamma-1\right)c_{v}\ln\left[\left(\frac{p_{0}}{p}\right)\left(\frac{T}{T_{0}}\right)^{\frac{\gamma}{\gamma-1}}\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $s=s_{0}+R_{s}\ln\left[\left(\frac{p_{0}}{p}\right)\left(\frac{T}{T_{0}}\right)^{\frac{\gamma}{\gamma-1}}\right]$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
s=s_{0}+R_{s}\ln\left[\left(\frac{p_{0}}{p}\right)\left(\frac{T}{T_{0}}\right)^{\frac{\gamma}{\gamma-1}}\right]\label{eq:entropy_idealgas}
\end{equation}
\end_inset
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
Isentropic change in temperature:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $T=T_{0}\left(\frac{p}{p_{0}}\right)^{\frac{\gamma-1}{\gamma}}$
\end_inset
\end_layout
\begin_layout Plain Layout
Such that:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\Delta h_{irr}=c_{p}\Delta T=c_{p}T_{0}\left(\left(\frac{p}{p_{0}}\right)^{\frac{\gamma-1}{\gamma}}-1\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
Fully non-isentropic change in temperature:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $dh=Tds+0$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $c_{p}\frac{dT}{T}=dS$
\end_inset
\end_layout
\begin_layout Plain Layout
with:
\begin_inset Formula $ds=\frac{}{}$
\end_inset
\end_layout
\begin_layout Plain Layout
and:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\Delta H=\Delta\left(c_{p}T+\frac{1}{2}u^{2}\right)=0$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $c_{p}\left(T-T_{0}\right)+\frac{1}{2}\left(u^{2}-u_{0}^{2}\right)=0$
\end_inset
\end_layout
\begin_layout Plain Layout
Fill in above:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\underbrace{c_{p}T_{0}\left(\left(\frac{p}{p_{0}}\right)^{\frac{\gamma-1}{\gamma}}-1\right)}_{\Delta h_{irr}}+\frac{1}{2}\left(u^{2}-u_{0}^{2}\right)=0$
\end_inset
\end_layout
\begin_layout Plain Layout
Hence:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $c_{p}T_{0}\left(\left(\frac{p}{p_{0}}\right)^{\frac{\gamma-1}{\gamma}}-1\right)=-\frac{1}{2}\left(u^{2}-u_{0}^{2}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
For very small
\begin_inset Formula $\Delta p$
\end_inset
, this becomes:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $c_{p}T_{0}\frac{\gamma-1}{\gamma}\frac{\Delta p}{p_{0}}=-\frac{1}{2}\left(u^{2}-u_{0}^{2}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
is
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $p=p_{0}-\frac{1}{2}\rho\left(u^{2}-u_{0}^{2}\right)\Rightarrow p+\frac{1}{2}\rho u^{2}=p_{0}+\frac{1}{2}\rho u_{0}^{2}$
\end_inset
\end_layout
\begin_layout Plain Layout
which is Bernouillis law
\end_layout
\end_inset
The result of minor losses is a reduction in Exergy.
To generalize minor loss to the full compressible flow, minor loss is modeled
as
\begin_inset Formula
\begin{equation}
\Delta E_{x}=-K\left(\frac{T_{0}}{T_{u}}\right)\frac{1}{2}u_{u}^{2},
\end{equation}
\end_inset
where subscript
\begin_inset Formula $u$
\end_inset
denotes the upstream condition and
\begin_inset Formula $\Delta E_{x}$
\end_inset
is the change in exergy per unit mass:
\begin_inset Formula
\begin{equation}
E_{x}=h+\frac{1}{2}u^{2}-T_{0}s,
\end{equation}
\end_inset
which is also called the available energy.
\begin_inset Formula $K$
\end_inset
is the traditional minor loss coefficient.
Since
\begin_inset Formula $H=h+\frac{1}{2}u^{2}$
\end_inset
is constant, the change in exergy is
\begin_inset Formula
\begin{equation}
\Delta E_{x}=-T_{0}\left(s_{d}-s_{u}\right),
\end{equation}
\end_inset
where subscript
\begin_inset Formula $d$
\end_inset
denotes the downstream condition.
Filling in Eq.
(
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:entropy_idealgas"
\end_inset
) for the entropy of an ideal gas results in
\begin_inset Note Note
status open
\begin_layout Plain Layout
\begin_inset Formula $-T_{0}(s_{d}-s_{u})=-T_{0}R_{s}\left(\ln\left[\left(\frac{p_{0}}{p_{d}}\right)\left(\frac{T_{d}}{T_{0}}\right)^{\frac{\gamma}{\gamma-1}}\right]-\ln\left[\left(\frac{p_{0}}{p_{u}}\right)\left(\frac{T_{u}}{T_{0}}\right)^{\frac{\gamma}{\gamma-1}}\right]\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $-T_{0}(s_{d}-s_{u})=T_{0}R_{s}\left(\ln\left[\left(\frac{p_{0}}{p_{u}}\right)\left(\frac{T_{u}}{T_{0}}\right)^{\frac{\gamma}{\gamma-1}}\right]-\ln\left[\left(\frac{p_{0}}{p_{d}}\right)\left(\frac{T_{d}}{T_{0}}\right)^{\frac{\gamma}{\gamma-1}}\right]\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $-T_{0}(s_{d}-s_{u})=T_{0}R_{s}\ln\left[\left(\frac{p_{0}}{p_{u}}\right)\left(\frac{T_{u}}{T_{0}}\right)^{\frac{\gamma}{\gamma-1}}\left(\frac{p_{d}}{p_{o}}\right)\left(\frac{T_{0}}{T_{d}}\right)^{\frac{\gamma}{\gamma-1}}\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $-T_{0}(s_{d}-s_{u})=T_{0}R_{s}\ln\left[\left(\frac{p_{d}}{p_{u}}\right)\left(\frac{T_{u}}{T_{d}}\right)^{\frac{\gamma}{\gamma-1}}\right]$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
\Delta E_{x}=E_{x,d}-E_{x,u}=T_{0}R_{s}\ln\left[\left(\frac{p_{d}}{p_{u}}\right)\left(\frac{T_{u}}{T_{d}}\right)^{\frac{\gamma}{\gamma-1}}\right]=-K\left(\frac{T_{0}}{T_{u}}\right)\frac{1}{2}u_{u}^{2}.\label{eq:DeltaE_steady}
\end{equation}
\end_inset
If we assume incompressible flow and if we take
\begin_inset Formula $p_{d}=p_{u}+\Delta p$
\end_inset
, with
\begin_inset Formula $\Delta p\ll1$
\end_inset
, this equation can be linearized to obtain
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
\begin_inset Formula $\Delta E_{x}=T_{0}c_{p}\ln\left[\left(\frac{p_{d}}{p_{u}}\right)^{\gamma-1}\left(\frac{T_{u}}{T_{d}}\right)\right]$
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\Delta E_{x}=T_{0}c_{p}\left(\left(\gamma-1\right)\frac{\Delta p}{p_{u}}-\frac{\Delta T}{T_{u}}\right)$
\end_inset
\end_layout
\begin_layout Plain Layout
In the limit of incompressible flow,
\begin_inset Formula $\gamma\to1$
\end_inset
, hence
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $\Delta E_{x}=-\frac{T_{0}}{T_{u}}c_{p}\Delta T$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
\Delta E_{x}=-\frac{T_{0}}{T_{u}}c\Delta T=-K\left(\frac{T_{0}}{T_{u}}\right)\frac{1}{2}u_{u}^{2}.
\end{equation}
\end_inset
Moreover, for incompressible flow
\begin_inset Formula
\begin{equation}
H=cT+\frac{p}{\rho}+\frac{1}{2}u^{2}=\mathrm{const},
\end{equation}
\end_inset
the minor loss directly converts kinetic energy to thermal energy for an
incompressible flow.
\end_layout
\end_inset
\end_layout
\begin_layout Subsection
Generalization for oscillating flow
\end_layout
\begin_layout Standard
For oscillating flow, there is no real
\begin_inset Quotes eld
\end_inset
upstream
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
downstream
\begin_inset Quotes erd
\end_inset
position.
To generalize Eq.
(
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:DeltaE_steady"
\end_inset
):
\begin_inset Note Note
status collapsed
\begin_layout Plain Layout
Flow from 1 to 2
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $p_{\mathrm{tot},2}-p_{\mathrm{tot},1}=-K_{1\to2}\frac{1}{8}\rho_{1}\left(s|u_{1}|+u_{1}\right)^{2}$
\end_inset
\end_layout
\begin_layout Plain Layout
Flow from 2 to 1
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $p_{\mathrm{tot},1}-p_{\mathrm{tot},2}=-K_{2\to1}\rho_{2}\frac{1}{8}\left(s|u_{2}|+u_{2}\right)^{2}$
\end_inset
\end_layout
\begin_layout Plain Layout
Mutual exclusive sum:
\end_layout
\begin_layout Plain Layout
\begin_inset Formula $p_{\mathrm{tot},2}-p_{\mathrm{tot},1}=K_{2\to1}\rho_{2}\frac{1}{8}\left(s|u_{2}|+u_{2}\right)^{2}-K_{1\to2}\rho_{1}\frac{1}{8}\left(s|u_{1}|+u_{1}\right)^{2}$
\end_inset
\end_layout
\end_inset
\begin_inset Formula
\begin{equation}
p_{\mathrm{tot},2}-p_{\mathrm{tot},1}=K_{2\to1}\frac{\rho_{2}}{8}\left(s|u_{2}|+u_{2}\right)^{2}-K_{1\to2}\frac{\rho_{1}}{8}\left(s|u_{1}|+u_{1}\right)^{2}.
\end{equation}
\end_inset
\end_layout
\begin_layout Section
TubeConnector
\end_layout
\begin_layout Standard
The SimpleTubeConnector can connect two Tube segments together.
At the interface, continuity of mass and energy flow is enforced.
\end_layout
\begin_layout Section
Transition of kinetic energy to heat
\end_layout
\begin_layout Section
TubePistonConnector
\end_layout
\begin_layout Section
ConnectorVolume
\end_layout
\begin_layout Standard
A
\noun on
ConnectorVolume
\noun default
is a special kind of gas volume on which
\noun on
Tube
\noun default
s and
\noun on
Piston
\noun default
s can be connected.
This way, branches can be created
\end_layout
\begin_layout Standard
\begin_inset Formula
\begin{equation}
V_{c}\frac{\partial\rho}{\partial t}+\sum\nolimits _{i}m_{i}=0
\end{equation}
\end_inset
energy:
\begin_inset Formula
\begin{equation}
\frac{V_{c}}{\gamma-1}\frac{\partial p}{\partial t}+\sum\nolimits _{i}mH_{i}+Q_{i}=0
\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula
\[
mH_{i}=\mathrm{extrapolated\,from\,tube}
\]
\end_inset
\end_layout
\begin_layout Standard
Minor loss
\end_layout
\begin_layout Chapter
Systems
\end_layout
\begin_layout Chapter
Solvers
\end_layout
2016-11-11 22:25:44 +00:00
\begin_layout Section
One-dimensional function solvers
\begin_inset CommandInset label
LatexCommand label
name "sec:One-dimensional-function-solvers"
\end_inset
\end_layout
\begin_layout Subsection
Gradient-based
\end_layout
\begin_layout Subsection
Gradient free
\begin_inset CommandInset label
LatexCommand label
name "subsec:Gradient-free"
\end_inset
2016-11-11 22:25:44 +00:00
\end_layout
\begin_layout Standard
As a gradient free one-dimensional function solver, we use Brent's mehhod.
Brent's method combines root bracketing, bisection and inverse quadratic
interpolation to find the root of the function without using the gradient.
See Wikipedia for more information.
\end_layout
\begin_layout Section
Minimizers
\end_layout
2016-11-11 22:25:44 +00:00
\end_body
\end_document