|
|
## 2. Defining the problem
|
|
|
The second step is to define a problem which will manage the fluid domain, the boundary conditions, etc. This is done by using the C++ class dart::Problem as,
|
|
|
```python
|
|
|
pbl = dart.Problem(msh, dim, alpha, beta, minf, sref, lref, xref, yref, zref)
|
|
|
```
|
|
|
where `alpha` and `beta` are the angles of attack and sideslip of the oncoming flow, `minf` is the freestream Mach number, `sref` and `lref` are the reference area and length, and `xref`, `yref` and `zref` are the coordinates of the reference point. The reference quantities are used to compute the aerodynamic loads coefficients.
|
|
|
|
|
|
**2.1 Defining the fluid domain**
|
|
|
The fluid domain is set using the class dart::Fluid,
|
|
|
```python
|
|
|
pbl.set(dart.Fluid(msh, 'fld', minf, dim, alpha, beta = 0))
|
|
|
```
|
|
|
where `'fld'` is the name of the physical group of the mesh containing the element belonging to the fluid domain. If `minf = 0`, the flow will be considered as incompressible, otherwise it will be considered compressible. Note that, `beta` can be omitted if it is zero.
|
|
|
|
|
|
**2.2 Adding the initial and boundary conditions**
|
|
|
The intial condition is added using the dart::Initial class as,
|
|
|
```python
|
|
|
pbl.set(dart.Initial(msh, 'fld', dim, alpha, beta))
|
|
|
```
|
|
|
Dirichlet boundary conditions can be explicitely added with the dart::Dirichlet class as,
|
|
|
```python
|
|
|
pbl.set(dart.Dirichlet(msh, 'dirichlet', dim, alpha, beta = 0))
|
|
|
```
|
|
|
where `'dirichlet'` is the name of the physical group of the mesh containing the elements belonging to the boundary onto which the Dirichlet condition will be enforced. If no Dirichlet condition is provided, one node will be clamped automatically. Since using Dirichlet conditions requires to use larger computational domains, it is preferrable not to enforce these conditions explicitely, and provide Neumann boundary conditions instead.
|
|
|
Freestream (Neumann) boundary conditions can be added with the dart::Freestream class as,
|
|
|
```python
|
|
|
pbl.add(dart.Freestream(msh, 'freestream', dim, alpha, beta = 0))
|
|
|
```
|
|
|
where `'freestream'` is the name of the physical group of the mesh containing the elements belonging to the boundary onto which the Freestream condition will be enforced. In all the cases, `beta` can be omitted if it is zero.
|
|
|
Note that the downstream boundary of the domain MUST ALWAYS be assigned a Freestream boundary condition since it will intersect a wake. Also note that zero mass flux boundary conditions are naturally enforced by the FEM. The slip boundary conditions hence do not require to be explicitly added on bodies immersed in the flow.
|
|
|
|
|
|
**2.3 Adding the Kutta condition**
|
|
|
A Kutta condition must be added to allow lifting configurations to generate aerodynamic loads. For a 2D flow, both the dart::Wake and dart::Kutta classes need to be used as,
|
|
|
```python
|
|
|
pbl.add(dart.Wake(msh, ['wake', 'wake_', 'field']))
|
|
|
pbl.add(dart.Kutta(msh, ['te', 'wake_', 'body', 'field']))
|
|
|
```
|
|
|
where `'wake_'` is the physical group of the mesh containing the lower wake elements, and is automatically created by tbox::MshCrack, and `'te'` is the name of the physical group of the mesh containing THE point element defining the trailing edge of `'body'`. Note that the wake surface does not need to be aligned with trailing edge bissector for 2D flows because dart::Kutta adds a supplementary term on the elements touching the trailing edge that correctly computes the local flow direction.
|
|
|
For 3D flows, only the dart::Wake class is used,
|
|
|
```python
|
|
|
pbl.add(dart.Wake(msh, ['wake', 'wake_', 'field', 'teTip']))
|
|
|
```
|
|
|
where `'teTip'` is the physical group of the mesh containing the trailing edge of the lifting configuration AND the free edge of the wake (no contributions will be added to these nodes). Since dart::Kutta cannot be used for 3D flows, the wake surface MUST be aligned with the trailing edge bissector in order to yield consistent results.
|
|
|
|
|
|
**2.4 Adding bodies immersed in the fluid**
|
|
|
A lifting body can be added by using the dart::Body class as,
|
|
|
```python
|
|
|
pbl.add(dart.Body(msh, ['body', 'field']))
|
|
|
```
|
|
|
where `'body'` is the name of the physical group of the mesh contaning the element of the body surface. This will allow the computation of the aerodynamic load coefficients on this body, as well as further data manipulation, e.g. for fluid-structure interaction or optimzation problems. |