| ... | ... | @@ -13,19 +13,19 @@ where the `'caller/path'` and `'path/to/gmshfile'` will be concatenated to retri |
|
|
|
This returns the `msh` (tbox::MshData C++ class) object containing the mesh data structure that can be further used.
|
|
|
|
|
|
|
|
**1.2 Adding the wake**
|
|
|
|
For potential flows to be lifting, the potential value must be multivalued along a cut inside the computational domain. For aerodynamics applications, this cut is referred to as wake and extends from the trailing edge of any lifting configurations to the downstream boundary of the domain. In order to assign a discontinuous value to the potential on the wake, all nodes belonging to this surface must be duplicated. This is done by using the tbox::MshCrack C++ class,
|
|
|
|
For potential flows to be lifting, the potential value must be multi-valued along a cut inside the computational domain. For aerodynamics applications, this cut is referred to as wake and extends from the trailing edge of any lifting configurations to the downstream boundary of the domain. In order to assign a discontinuous value to the potential on the wake, all nodes belonging to this surface must be duplicated. This is done by using the tbox::MshCrack C++ class,
|
|
|
|
```python
|
|
|
|
mshCrck = tbox.MshCrack(msh, dim)
|
|
|
|
mshCrck.setCrack('wake')
|
|
|
|
for bnd in ['boundary_0', 'boundary_1', ...]:
|
|
|
|
mshCrck.addBoundary(bnd)
|
|
|
|
```
|
|
|
|
where `dim` is the dimension of the problem (2 or 3), `'wake'` is the name of the physical group of the mesh containing the wake surface, and `'boundary_0'`, ... are the name of the physical groups of the mesh having elements touching the wake surface. These groups typically include the fluid domain, the airfoil, wing or and fuselage, and the downstream and symmetry boundaries. `mshCrck` will automatically create a new physical group named `'wake_'`. Two methods are implemented to detect if the elements touching the wake are above or below it. Either the physical groups `'boundary'` and `'boundary_'` are present in the mesh, and the algorithm will consider that the elements of `'boundary'` are above and that those of `'boundary_'` are below, or only the group `'boundary'` is present, and the algorithm will try to detect automatically were the elements are located with respect to the wake surface. For surface boundaries (of dimension `dim-1`), this is done by comparing the orientation of the normal of the closest wake element to the vector linking the center of gravity of the closest wake element to the considered element. The same process is applied to treat volume boundaries (of dimension `dim`), except that the algorithm will first check whether the nodes of the volume also belong to a surface located below the wake. The wake normals must be pointing in the positive (y in 2D and z in 3D) direction. Note that, in the first case, the group `'boundary_'` will be merged within the group `'boundary'`.
|
|
|
|
where `dim` is the dimension of the problem (2 or 3), `'wake'` is the name of the physical group of the mesh containing the wake surface, and `'boundary_0'`, ... are the name of the physical groups of the mesh having elements touching the wake surface. These groups typically include the fluid domain, the airfoil, wing or and fuselage, and the downstream and symmetry boundaries. `mshCrck` will automatically create a new physical group named `'wake_'`. Two methods are implemented to detect if the elements touching the wake are above or below it. Either the physical groups `'boundary'` and `'boundary_'` are present in the mesh, and the algorithm will consider that the elements of `'boundary'` are above and that those of `'boundary_'` are below, or only the group `'boundary'` is present, and the algorithm will try to detect automatically were the elements are located with respect to the wake surface. For surface boundaries (of dimension `dim-1`), this is done by comparing the orientation of the normal of the closest wake element to the vector linking the center of gravity of the closest wake element to the considered element. The same process is applied to treat volume boundaries (of dimension `dim`), except that the algorithm will first check whether the nodes of the volume also belong to a surface located below the wake. The wake normal vectors must be pointing in the positive (y in 2D and z in 3D) direction. Note that, in the first case, the group `'boundary_'` will be merged within the group `'boundary'`.
|
|
|
|
For a 3D flow, the potential at the wake tip (i.e., the edge of the wake downstream of the wingtip) will be continuous. This is enforced by not duplicating the nodes in this line,
|
|
|
|
```python
|
|
|
|
mshCrck.setExcluded('wakeTip')
|
|
|
|
mshCrck.setExcluded('free_edge')
|
|
|
|
```
|
|
|
|
where `'wakeTip'` is the name of the physical group of the mesh containing the wake free edge. The utility can now be executed, and directly deleted to save memory,
|
|
|
|
where `'free_edge'` is the name of the physical group of the mesh containing the wake free edge. The utility can now be executed, and directly deleted to save memory,
|
|
|
|
```python
|
|
|
|
mshCrck.run()
|
|
|
|
del mshCrck
|
| ... | ... | @@ -34,6 +34,7 @@ Since the execution will duplicate the nodes on the wake surface and modify the |
|
|
|
```pyhton
|
|
|
|
tbox.GmshExport(msh).save(msh.name)
|
|
|
|
```
|
|
|
|
Note that this entire process must be repeated per wake that is added.
|
|
|
|
|
|
|
|
**1.3 Creating a mesh morpher**
|
|
|
|
A mesh morpher can be used to deform the volume mesh in order to track the motion of a given boundary surface of that mesh. This is typically required for applications where a body immersed in the fluid can move or deform, such as aerostructural or optimization calculations. The morpher is instantiated using the tbox::MshDeform C++ class as,
|
| ... | ... | |
| ... | ... | |