Commit ff4ffb9f authored by Yu Pan's avatar Yu Pan

Add compressibleflowsolver theoretical part

parent 0724faa5
......@@ -3,6 +3,80 @@
In this chapter, we walk the reader through our 2D and 3D compressible Navier-Stokes Solver (CompressibleFlowSolver).
\section{Fundamental Theories of CompressibleFlowSolver}
The governing equation systems include continuity equation, momentum equations and energy equation. Write in conservative form
\frac{\partial U}{\partial t}+
\frac{\partial F_{i}(U)}{\partial x_{i}}
=\frac{\partial G_{i}(U,\nabla U)}{\partial x_{i}}
where $U=[\rho,\rho u_{1} \hdots \rho u_{d},E]^{T}$
Inviscid flux F in i direction is
\rho u_{i}\\
\rho u_{1}u_{i}+\delta_{1,i}P\\
\rho u_{d}u_{i}+\delta_{d,i}P\\
where total energy $E=\rho (c_{v}T+u_{i}u_{i}/2)$, pressure $P=(\gamma-1)(E-\rho u_{i}u_{i}/2)$
Viscous flux G in i direction is
where viscous term $\tau_{ij}=\mu(\frac{\partial u_{i}}{\partial x_{j}}+\frac{\partial u_{j}}{\partial x_{i}}-\frac{2}{3}\nabla \cdot\textbf{u}\delta_{ij})$ and heat flux $\textbf{q}=-\kappa \nabla T$
In Nektar++ current compressible flow solver, DG spatial discretization is in default. Multiply a test function $\phi$, integrate inside an element $K\in \Omega_{h}$ and sum over all the elements.
\sum\limits_{K\in \Omega_{h}}{\int_{K}{\frac{\partial U}{\partial t}\phi dx}}+I_{inv}=I_{vis}
I_{inv}= \sum\limits_{K\in \Omega_{h}}{\int_{\partial K}{\sum\limits_{i=1}^{d}{\widetilde{F}_{i}(U)n_{i}\phi}}dS}-
\sum\limits_{K\in \Omega_{h}}{\int_{K}{\sum\limits_{i=1}^{d}{F_{i}(U)\frac{\partial \phi}{\partial x_{i}}dx}}}
I_{inv}= \sum\limits_{K\in \Omega_{h}}{\int_{\partial K}{\sum\limits_{i=1}^{d}{\widetilde{G}_{i}(U,\nabla U)n_{i}\phi}}dS}-
\sum\limits_{K\in \Omega_{h}}{\int_{K}{\sum\limits_{i=1}^{d}{G_{i}(U,\nabla U)\frac{\partial \phi}{\partial x_{i}}dx}}}
Different flux terms such as Equation \eqref{eq2} and \eqref{eq3} and source terms are treated separated and transferred through member variables as the sketch \ref{fig1} shows.
Various advection flux $\widetilde{F}$ and diffsion flux $\widetilde{G}(U,\nabla U)$ are supported in Nektar++ CompressibleSolver. And each specific flux such as LDG diffusion flux (LDGNS) inherits from its general flux type (Diffison).
Usually inside one specific flux type, the codes includes the following simliar process to caculate the flux. Take AdvectionWeakDG.cpp as an example.
\begin {table}[!h]
\caption {AdvectionWeakDG.cpp} \label{table1}
\begin{tabular}{ | c | c|}
Variable/Function name & Physical meaning \\
m$\_$fluxVector & Advection volume flux: $F_{i}$\\
numflux & Advection numerical flux at trace: $\widetilde{F}_{i}$\\
IProductWRTDerivBase & Volume flux integration: $\sum\limits_{K\in \Omega_{h}}{\int_{K}{\sum\limits_{i=1}^{d}{F_{i}(U)\frac{\partial \phi}{\partial x_{i}}dx}}}$ \\
AddTraceIntegral & Add Surface flux into volume flux interation: $+\sum\limits_{K\in \Omega_{h}}{\int_{\partial K}{\sum\limits_{i=1}^{d}{\widetilde{F}_{i}(U)n_{i}\phi}}dS}$\\
MultiplyByElmImvMass& Multiply the inverse of mass matrix to get the flux coefficients\\
\section{Data Structure of CompressibleFlowSolver}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment