# Latex Equations Cribsheet

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Introduction

This page provides some introductory material for writing LaTex equations for the KB Wiki. It is not intended to be a thorough introduction to LaTex, but is to provide some guidelines, share good practice advice and other information that aids the authoring of LaTex in this Wiki.

## Editing Latex

To add an equation to an article click on the "Mathematical formula" button in the Edit toolbar.

Alternatively, use the math element in the Edit page of the article as follows:

$V = frac{4}{3} \pi R^{3}$


This should generate the expression:

$V={\frac {4}{3}}\pi R^{3}$ ## Basic Mathematical Expressions

### Algebraic Equations

The above example shows a typical algebraic expression that uses a mixture of fractions and exponents. Fractions are generated using the frac expression with the numerator and denominator as two arguments:

$a = \frac{b+c}{d}$


$a={\frac {b+c}{d}}$ ## Differential Equations

Ordinary and partial derivative expressions can be generated in the obvious way using the frac operator:

${\frac {d^{2}x}{dt^{2}}}=-\omega ^{2}x$ ${\frac {\partial ^{2}\phi (x,t)}{\partial t^{2}}}=c^{2}{\frac {\partial ^{2}\phi (x,t)}{\partial x^{2}}}$ while exponents are written with the symbol '^':

$E = mc^{2}$


$E=mc^{2}$ The curly braces '{}' are optional but may be required to remove ambiguities or aid readability in LaTex expressions.

Subscripts are defined using the '_' symbol.


$\sigma_{kk}$



is rendered as:

$\sigma _{kk}$ ### Arrays of equations

$\begin{array}{lcl} a + b + c + d & = & e + f + \\ & & g + h \end{array}$



${\begin{array}{lcl}a+b+c+d&=&e+f+\\&&g+h\end{array}}$ More information on basic mathematical expressions can be found at the MediaWiki web site here and here.

## CFD Equations and Expressions

There are many CFD equations and expressions used in the KB Wiki and some of the commonly used ones are listed here. These can be either copied verbatim from the article source or used as templates for similar equations, etc.

### Basic Expressions

#### Reynolds Number

${\mbox{Re}}={\frac {\rho {\overline {u}}d}{\mu }}$ #### Prandl Number

${\mbox{Pr}}={\frac {C_{p}\mu }{\lambda }}$ ### Basic Flow Equations

#### Mass Continuity Equation

${\frac {\partial \rho }{\partial t}}+{\frac {\partial }{\partial x_{j}}}(\rho u_{j})=0$ #### Eulers Equation

$\rho {\frac {D\mathbf {u} }{Dt}}=\rho \left({\frac {\partial \mathbf {u} }{\partial t}}+\mathbf {u} .\nabla \mathbf {u} \right)=-\nabla P$ #### Navier Stokes Equations

${\frac {\partial }{\partial t}}(\rho u_{i})+{\frac {\partial }{\partial x_{j}}}(\rho u_{i}u_{j}+p\delta _{ij}-\tau _{ji})=0$ where in the case of a Newtonian fluid:

$\tau _{ij}=2\mu S_{ij}^{*}$ and

$S_{ij}^{*}={\frac {1}{2}}\left({\frac {\partial u_{i}}{\partial x_{j}}}+{\frac {\partial u_{j}}{\partial x_{i}}}\right)-{\frac {1}{3}}{\frac {\partial u_{k}}{\partial x_{k}}}\delta _{ij}$ #### Reynolds Averaged Navier-Stokes Equation

${\frac {\partial {\overline {u_{i}}}}{\partial t}}+{\overline {u_{j}}}{\frac {\partial {\overline {u_{i}}}}{\partial x_{j}}}=-{\frac {1}{\rho }}{\frac {\partial {\overline {p}}}{\partial x_{i}}}+{\frac {1}{\rho }}{\frac {\partial }{\partial x_{j}}}\left(\mu {\frac {\partial {\overline {u_{i}}}}{\partial x_{j}}}-\rho {\overline {u_{i}^{\prime }u_{j}^{\prime }}}\right)$ #### Energy Transport Equation

${\frac {\partial }{\partial t}}(\rho e_{0})+{\frac {\partial }{\partial x_{j}}}(\rho u_{j}e_{0}+u_{j}p+q_{j}-u_{i}\tau _{ij})=0$ The heat flux $q_{j}$ is given by:

$q_{j}=-\lambda {\frac {\partial T}{\partial x_{j}}}\equiv -C_{p}{\frac {\mu }{\mbox{Pr}}}{\frac {\partial T}{\partial x_{j}}}$ ### Equations of State

#### Ideal Equation of State

$p=\rho RT$ ### Turbulence Equations

#### Standard Two Equation Model

Kinematic eddy viscosity:

$\nu _{T}=C_{\mu }k^{2}/\epsilon$ Turbulent Kinetic Energy transport equation:

${\frac {\partial k}{\partial t}}+U_{j}{\frac {\partial k}{\partial x_{j}}}=\tau _{ij}{\frac {\partial U_{i}}{\partial x_{j}}}-\epsilon +{\frac {\partial }{\partial x_{j}}}\left[(\nu +\nu _{T}/\sigma _{k}){\frac {\partial k}{\partial x_{j}}}\right]$ Dissipation Rate transport equation:

${\frac {\partial \epsilon }{\partial t}}+U_{j}{\frac {\partial \epsilon }{\partial x_{j}}}=C_{\epsilon 1}{\frac {\epsilon }{k}}\tau _{ij}{\frac {\partial U_{i}}{\partial x_{j}}}-C_{\epsilon 2}{\frac {\epsilon ^{2}}{k}}+{\frac {\partial }{\partial x_{j}}}\left[(\nu +\nu _{T}/\sigma _{\epsilon }){\frac {\partial \epsilon }{\partial x_{j}}}\right]$ Coefficients and Auxilliary Relations:

$C_{\epsilon 1}=1.44$ $\sigma _{k}=1.0$ $C_{\epsilon 2}=1.92$ $C_{\mu }=0.09$ $\sigma _{\epsilon }=1.3$ where

$\omega =\epsilon /{C_{\mu }k}$ and

$l=C_{\mu }k^{3/2}/\epsilon$ #### Reynolds Stress Transport Equation

${\begin{array}{lcl}{\frac {\partial }{\partial t}}({\overline {u_{i}^{\prime }u_{j}^{\prime }}})+{\frac {\partial }{\partial x_{k}}}(\rho u_{k}{\overline {u_{i}^{\prime }u_{j}^{\prime }}})&=&-{\frac {\partial }{\partial x_{k}}}\left[\rho {\overline {u_{i}^{\prime }u_{j}^{\prime }u_{k}^{\prime }}}+{\overline {p^{\prime }(\delta _{kj}u_{i}^{\prime }+\delta _{ik}u_{j}^{\prime })}}\right]\\\\&&+{\frac {\partial }{\partial x_{k}}}\left[\mu {\frac {\partial }{\partial x_{k}}}({\overline {u_{i}^{\prime }u_{i}^{\prime }}})\right]-\rho \left({\overline {u_{i}^{\prime }u_{k}^{\prime }}}{\frac {\partial u_{j}}{\partial x_{k}}}+{\overline {u_{j}^{\prime }u_{k}^{\prime }}}{\frac {\partial u_{i}}{\partial x_{k}}}\right)-\rho \beta (g_{i}{\overline {u_{j}^{\prime }\theta }}+g_{j}{\overline {u_{i}^{\prime }\theta }})\\\\&&+{\overline {p^{\prime }\left({\frac {\partial u_{i}^{\prime }}{\partial x_{j}}}+{\frac {\partial u_{j}^{\prime }}{\partial x_{i}}}\right)}}-2\mu {\overline {{\frac {\partial u_{i}^{\prime }}{\partial x_{k}}}{\frac {\partial u_{j}^{\prime }}{\partial x_{k}}}}}-2\rho \Omega _{k}({\overline {u_{j}^{\prime }u_{m}^{\prime }}}\epsilon _{ikm}+{\overline {u_{i}^{\prime }u_{m}^{\prime }}}\epsilon _{jkm})\end{array}}$ 