Categories: Geometry, Mesh
State: ✔️
CPACS2GMSH
is an automatic mesh generator module for a CPACS aircraft geometry [1] using GMSH ,a finite element mesh generator.
It's currently possible to choose between two options for 3D meshing of the external domain. Selecting the 'Euler' an unstructured mesh is automatically generated in a spherical domain surrounding the aircraft. Instead, selecting the 'RANS' option Gmsh will generate only the 2D mesh of the entire aircraft, which will then be processed by the programme [Pentagrow] to generate the structured part that wraps the geometry, then Tetgen package provides for meshing of the unstructured part. The hybrid mesh obtained will constitute the 3D domain.
The resulting mesh can be used for a CFD calculation by connecting the SU2Run
module after CPACS2GMSH
module.
Surface mesh of the D150 aircraft, with a symmetry plane
By Euler if an engine (simple or doubleflux) is part of the aircraft geometry, CPACS2GMSH will combine the different nacelle parts in one engine and will add an intake and exhaust surface that can be used by SU2Run to simulate the engine operation. For doubleflux engines, only one intake surface will be placed on the fan cowl and two exhaust surfaces will be placed on the fan and center cowl.
If the aircraft geometry contains propeller engines, their blades will be replaced by 2D disk surfaces in order to simulate the propeller engines with SU2 disk actuator model.
Surface mesh of an aircraft with propeller engines
CPACS2GMSH
takes as input a CPACS file. This is done automatically when it is run in workflow
Multiple options are available with CPACS2GMSH
, you can see these options if you run this module from the GUI interface.
General options:
Display mesh with GMSH : False
Open the gmsh GUI after the generation of the surface mesh (2D) and the domain mesh (3D). This option is usefully to control the quality of the automated generated mesh or make extra operation with gmsh GUI.
Mesh type:
Choice the mesh type: Euler or RANS
Choose between an unstructured domain (Euler) and an hybrid domain (RANS)
Domain:
-
Use Symmetry : False
Apply a symmetry operation to the model with a xz symmetry plane in the center of the aircraft. The resulting mesh will only be generated in the y positive domain. -
Farfield size factor : 6.0
Enable to control the spherical domain size. The fluid domain surrounding the aircraft is defined with a radius equivalent to the largest xyz aircraft dimension times the `Farfield size factor
if Euler: Euler options:
Farfield : 25.0
Mesh size of the farfield surfacesFuselage : 0.4
Mesh size of the fuselage surfacesWings : 0.23
Mesh size of the wings surfacesEngines : 0.23
Mesh size of the engines surfacesPropellers : 0.23
Mesh size of the propellers surfaces
else: RANS options:
*Number of layer: 20
Number of prismatic element layers
*height of first layer: 3 e-5 mm
Height of the first prismatic cell, touching the wall, in mesh length units.
*Max layer thickness: 10 cm
The maximum allowed absolute thickness of the prismatic layer.
*Growth factor: 1.2
Growth factor between edge lengths of coincident tetrahedra
*Feature angle: 80 grad
Whenever the dihedral angle of two triangle is smaller than this limit, the resulting edge is understood to represent an actual geometrical feature. Larger angles are treated as resulting from approximation of curved surfaces by linear triangles
*Surface mesh size: 5
Surface mesh size factor compared to the aircraft largest dimension, omogeneus everywhere
Advanced mesh parameters :
LE/TE refinement factor : 7.0
Apply a refinement on the leading and trailing edge of the aircraft wings. the element size at the le/te will be set to the wing mesh size divided by the refinement factor. This refinement decay according to a power law from the edge to 30% of the wing section cord length, where the mesh size is the wing's one.Refine truncated TE : False
For truncated wing profile, automatically adjust the LE/TE refinement factor such that the mesh size at the TE match the truncated TE thickness .Auto refine : True
Apply an automatic refinement of surfaces which are small compare to a mesh element.⚠️ With this option activated, the surface mesh generation maybe done two times, which increasing the total meshing time.
Engines :
Engine intake position [%] : 20.0
Engine intake surface position from the front of the engine fan cowl in percent of the fan cowl lengthEngine exhaust position [%] : 20.0
Engine exhaust surface position from the back of the engine fan cowl in percent of the fan cowl length, if the engine is doubleflux, and exhaust surface is similarly generated for the center cowl part of the engine.
CPACS2GMSH
Generate .brep files with TiGL for each part of the aircraft configuration. Then all the parts are imported into GMSH to generates a SU2 mesh file
for the euler case, instead a .stl file is generated to be read by pentagrow
CPACS2GMSH
outputs a SU2 mesh files (.su2), the path to this file is saved in the CPACS file under this xpath: /cpacs/toolspecific/CEASIOMpy/filesPath/su2Mesh.
With RANS also a configuration file is created in the same directory containing the setup used to generate the hybrid mesh.
CPACS2GMSH
is a native CEASIOMpy module, hence it is available and installed by default. To run it, you just have to be sure that you are in the CEASIOMpy Conda environment.
At the time of writing, this module is not able to handle aircraft with control surfaces (they will not be modelled and thus appear in the final mesh).
For the RANS part, it is only possible to process aircraft consisting of .brep files of category 'fuselage' and 'wing'