# Computational Mechanics/Balance equations

These pages are currently being worked on

For an arbitrary, changing domain ${\displaystyle \Omega (t)}$ with boundary ${\displaystyle \Gamma (t)}$ containing a substance of density ${\displaystyle \rho }$ we can derive balance equations for mass, momentum and energy.

## Balance of mass

The mass ${\displaystyle M}$  of a domain ${\displaystyle \Omega (t)}$  must be constant over time, i.e.:

${\displaystyle {\frac {dM}{dt}}=0}$

${\displaystyle {\frac {d}{dt}}\int \limits _{\Omega (t)}\rho {\text{d}}\Omega (t)=0}$

Using the Reynolds transport theorem:

${\displaystyle \int \limits _{\Omega (t)}{\frac {\partial \rho }{\partial t}}{\text{d}}\Omega +\int \limits _{\Gamma (t)}\rho {\vec {v}}\cdot {\vec {n}}{\text{d}}\Gamma =0}$

Which means that the change of the mass can be due to a change in density inside the domain and due to convection of mass over the boundary with outward pointing normal vector ${\displaystyle {\vec {n}}}$  (Note: it was assumed tha the volume is not moving, i.e. ${\displaystyle {\vec {v}}_{\Omega }=0}$ . Using the Gauss-Ostrogradskii theorem we can write the boundary integral as a volume integral:

${\displaystyle \int \limits _{\Gamma (t)}\rho {\vec {v}}\cdot {\vec {n}}{\text{d}}\Gamma =\int \limits _{\Omega (t)}\nabla \cdot (\rho {\vec {v}}){\text{d}}\Omega }$

Such that the balance of mass boils down to:

${\displaystyle {\frac {dM}{dt}}=\int \limits _{\Omega (t)}{\frac {\partial \rho }{\partial t}}+\nabla \cdot (\rho {\vec {v}}){\text{d}}\Omega =0}$

For any arbitrary volume ${\displaystyle \Omega (t)}$ :

{\displaystyle \qquad {\begin{aligned}{\mathsf {The~differential~form~of~the~mass~balance:}}&\\{\frac {\partial \rho }{\partial t}}+\nabla \cdot (\rho {\vec {v}})&=0\end{aligned}}}


## Balance of momentum

A change of the momentum ${\displaystyle p}$  can be due to forces working on the domain ${\displaystyle \Omega (t)}$ , i.e. ${\displaystyle dp/dt={\vec {F}}}$ . The forces can be subdivided into body forces ${\displaystyle \rho {\vec {f}}}$  working on the domain ${\displaystyle \Omega (t)}$  (such as gravity) and traction forces ${\displaystyle {\vec {t}}}$  working on the boundary ${\displaystyle \Gamma (t)}$ :

${\displaystyle {\frac {dp}{dt}}=\int \limits _{\Omega (t)}\rho {\vec {f}}{\text{d}}\Omega +\int \limits _{\Gamma (t)}{\vec {t}}{\text{d}}\Gamma }$
${\displaystyle {\frac {d}{dt}}\left[\int \limits _{\Omega (t)}\rho {\vec {v}}{\text{d}}\Omega \right]=\int \limits _{\Omega (t)}\rho {\vec {f}}{\text{d}}\Omega +\int \limits _{\Gamma (t)}{\vec {t}}{\text{d}}\Gamma }$

Using the Reynolds transport theorem, we can rewrite the left-hand side:

${\displaystyle \int \limits _{\Omega (t)}{\frac {\partial }{\partial t}}(\rho {\vec {v}}){\text{d}}\Omega +\underbrace {\int \limits _{\Gamma (t)}(\rho {\vec {v}}){\vec {v}}\cdot {\vec {n}}{\text{d}}\Gamma } _{\text{I}}=\int \limits _{\Omega (t)}\rho {\vec {f}}{\text{d}}\Omega +\underbrace {\int \limits _{\Gamma (t)}{\vec {t}}{\text{d}}\Gamma } _{\text{II}}}$

So the change in momentum on the left hand side is the result of two possible effects: a change in density or velocity in ${\displaystyle \Omega (t)}$ , and due to (in-)flux of momentum over the boundary ${\displaystyle \Gamma (t)}$  And using the Gauss-Ostrogradskii (divergence) theorem we can rewrite the boundary term from the left hand side:

${\displaystyle {\text{I:}}\int \limits _{\Gamma (t)}(\rho {\vec {v}}){\vec {v}}\cdot {\vec {n}}{\text{d}}\Gamma =\int \limits _{\Omega (t)}\nabla \cdot (\rho {\vec {v}}){\vec {v}}{\text{d}}\Omega }$

And the same for the boundary term on the right hand side, taking into account that the traction vector can be written in terms of the stress tensor and the outward pointing normal vector (${\displaystyle {\vec {t}}={\boldsymbol {\sigma }}\cdot {\vec {n}}}$ ):

${\displaystyle {\text{II:}}\int \limits _{\Gamma (t)}{\vec {t}}{\text{d}}\Gamma =\int \limits _{\Gamma (t)}{\boldsymbol {\sigma }}\cdot {\vec {n}}{\text{d}}\Gamma =\int \limits _{\Omega (t)}\nabla \cdot {\boldsymbol {\sigma }}{\text{d}}\Omega }$

So that the momentum balance can be written as solely dependent on a volume integral:

${\displaystyle \int \limits _{\Omega (t)}{\frac {\partial }{\partial t}}(\rho {\vec {v}}){\text{d}}\Omega +\int \limits _{\Omega (t)}\nabla \cdot (\rho {\vec {v}}){\vec {v}}{\text{d}}\Omega =\int \limits _{\Omega (t)}\rho {\vec {f}}{\text{d}}\Omega +\int \limits _{\Omega (t)}\nabla \cdot {\boldsymbol {\sigma }}{\text{d}}\Omega }$

Rearranging:
${\displaystyle \int \limits _{\Omega (t)}{\frac {\partial }{\partial t}}(\rho {\vec {v}})+\nabla \cdot (\rho {\vec {v}}){\vec {v}}-\rho {\vec {f}}-\nabla \cdot {\boldsymbol {\sigma }}{\text{d}}\Omega ={\vec {0}}}$

So for an arbitrary volume ${\displaystyle \Omega (t)}$ :

${\displaystyle {\frac {\partial }{\partial t}}(\rho {\vec {v}})+\nabla \cdot [(\rho {\vec {v}}){\vec {v}}]-\rho {\vec {f}}-\nabla \cdot {\boldsymbol {\sigma }}={\vec {0}}}$

Applying the chain rule to the first two terms:

${\displaystyle \rho {\frac {\partial {\vec {v}}}{\partial t}}+\underbrace {{\vec {v}}{\frac {\partial \rho }{\partial t}}+{\vec {v}}\nabla \cdot (\rho {\vec {v}})} _{=0{\text{(mass balance)}}}+\rho {\vec {v}}\cdot \nabla {\vec {v}}-\rho {\vec {f}}-\nabla \cdot {\boldsymbol {\sigma }}={\vec {0}}}$

Which will result in the differential form of the momentum equation.

{\displaystyle \qquad {\begin{aligned}{\mathsf {The~differential~form~of~the~momentum~equation}}&\\\rho {\frac {\partial {\vec {v}}}{\partial t}}+\rho {\vec {v}}\cdot \nabla {\vec {v}}-\rho {\vec {f}}-\nabla \cdot {\boldsymbol {\sigma }}&={\vec {0}}\end{aligned}}}