Difference between revisions of "Presets/cfd"

From AQUAgpusph
Jump to: navigation, search
(Created the empty preset page)
 
m (Written the governing equations and some tiny instructions)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
 +
 +
cfd.xml is the main preset to be loaded in order to perform Fluid Dynamics simulations.
 +
 +
=== Governing equations ===
 +
 +
The following governing equations are approximately solved with this preset:
 +
 +
<math>
 +
\frac{d\rho}{dt} = - \rho \mathrm{div}\left(\mathbf{u}\right),
 +
</math>
 +
 +
<math>
 +
\frac{d\mathbf{u}}{dt} = \mathbf{g} + \frac{\mathrm{div}\left(\mathbb{T}\right)}{\rho},
 +
</math>
 +
 +
<math>
 +
p = p \left( \rho \right);
 +
</math>
 +
 +
where <math>\rho</math> and <math>\mathbf{u}</math> are the density and the velocity respectively, <math>\mathbf{g}</math> is an external volumetric force field, <math>p</math> is the pressure, and <math>\mathbb{T}</math> is the stress tensor for a Newtonian fluid:
 +
 +
<math>
 +
\mathbb{T} = \left(-p + \lambda \mathrm{tr}\left(\mathbb{D}\right)\right) \mathbb{1} + 2 \mu \mathbb{D},
 +
</math>
 +
 +
with <math>\lambda</math> and <math>\mu</math> the viscous coefficients and <math>\mathbb{D}</math> the rate of strain tensor:
 +
 +
<math>
 +
\mathbb{D} = \frac{\nabla\mathbf{u} + \nabla\mathbf{u}^T}{2}.
 +
</math>
 +
 +
As it has been indicated in the 3<sup>rd</sup> governing equation (formerly Equation Of State, or EOS), we need to stablish a relation between the density and the pressure:
 +
 +
<math>
 +
p = \frac{c_s^2 \rho_0}{\gamma}\left(\left(\frac{\rho}{\rho_0}\right)^gamma + 1\right),
 +
</math>
 +
 +
where <math>c_s</math> is the sound speed (at least 10 times the maximum speed expected during the simulation), <math>\rho_0</math> the density of reference of the fluid, and <math>\gamma</math> an incompressibility factor (1 is recommended, but it can be increased to get better incompressibility properties).
 +
 +
== Using cfd.xml ==
 +
 +
To use it just use the include tag:
 +
 +
<syntaxhighlight lang="xml">
 +
<Include file="/usr/share/aquagpusph/resources/Presets/domain.xml" />
 +
</syntaxhighlight>
 +
 +
Where <tt>/usr/share/aquagpusph/</tt> should be conveniently modified. For backguard compatibility you can include <tt>/usr/share/aquagpusph/resources/OpenCLMain.xml</tt> instead (it is just including cfd.xml).
 +
 +
This preset should be included before any other one.
 +
 +
== Variables defined ==
  
 
[[Category:Presets]]
 
[[Category:Presets]]

Revision as of 19:30, 16 March 2015

Introduction

cfd.xml is the main preset to be loaded in order to perform Fluid Dynamics simulations.

Governing equations

The following governing equations are approximately solved with this preset:

where and are the density and the velocity respectively, is an external volumetric force field, is the pressure, and is the stress tensor for a Newtonian fluid:

with and the viscous coefficients and the rate of strain tensor:

As it has been indicated in the 3rd governing equation (formerly Equation Of State, or EOS), we need to stablish a relation between the density and the pressure:

where is the sound speed (at least 10 times the maximum speed expected during the simulation), the density of reference of the fluid, and an incompressibility factor (1 is recommended, but it can be increased to get better incompressibility properties).

Using cfd.xml

To use it just use the include tag:

<Include file="/usr/share/aquagpusph/resources/Presets/domain.xml" />

Where /usr/share/aquagpusph/ should be conveniently modified. For backguard compatibility you can include /usr/share/aquagpusph/resources/OpenCLMain.xml instead (it is just including cfd.xml).

This preset should be included before any other one.

Variables defined