# Introduction to APM

The Aviumtechnologies Panel Method (APM) is a low-order, unsteady, unstructured potential flow solver for arbitrary geometries suitable for quick what-if design studies.

### Download APM binaries

To start using the Aviumtechnologies Panel Method, you just need to download the APM binaries for your system. You can download the binaries at <https://apm.aviumtechnologies.com/#get-started>.&#x20;

<figure><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FGMcWFzobPGCHl8vJDssE%2Fimage.png?alt=media&amp;token=2cb61d3f-c42f-41ca-882b-13e2307e1d53" alt=""><figcaption></figcaption></figure>

Download the [apm-getting-started.zip](https://apm.aviumtechnologies.com/downloads/apm-getting-started.zip) archive in addition to the APM binaries. The archive contains the necessary files for you to run a simulation of a NACA4412 wing. Visit the [quick start](/quick-start) section for more information on how to run the simulation.

The free version of the APM supports up to 5000 panels and up to 50 unsteady timesteps and is strictly for non-commercial use. Should you require higher panel counts or advanced features such as control surfaces and/or actuator disks consider purchasing an APM license. You can purchase a licence after creating an account at [https://acccounts.aviumtechnologies.com](https://acccounts.aviumtechnologies.com/).

{% hint style="info" %}
Monthly, semi-annual and annual licences are avilable for APM.
{% endhint %}

### System requirements for APM

| Operating System | <p>Windows 10 Pro 22H2 19045.5011<br>Ubuntu 24.04 Noble Numbat LTS<br>macOS Sonoma 14.6 Arm-based</p>                                                                                                                  |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Processor        | <p><strong>Minimum:</strong> Any Intel or AMD x86-64 processor with four logical cores<br><strong>Recommended:</strong> Any Intel or AMD x86-64 processor with four logical cores and AVX2 instruction set support</p> |
| RAM              | <p><strong>Minimum:</strong> 8GB<br><strong>Recommended:</strong> 16GB</p>                                                                                                                                             |

#### Running APM on Linux

APM has been validated on the Linux distributions listed on this page. It is likely that other distributions with Linux kernel version 5.10 or later can successfully run APM, but support will be limited.


# Quick start

Download and extract the contents of the latest [APM binaries](https://apm.aviumtechnologies.com/download) archive and the apm-getting-started.zip archive to a folder called "naca4412\_wing". You can create the "naca4412\_wing" folder anywhere. In this example the "naca4412\_wing" folder is created in "D:\\". Once you create the folder open a command prompt window and navigate to the folder.

{% file src="/files/WCYqZwKaCrn2GsXnkgMQ" %}

```
C:\naca4412_wing>
```

Type `dir` and press enter to view the contents of the folder. You should see 4 files.

```
C:\naca4412_wing> dir
 Directory of C:\naca4412_wing

12/08/2026  22:31    <DIR>          .
19/05/2026  14:05         3,987,968 apm-preprocessor-1.3.0-windows-x64.exe
19/05/2026  14:05         4,307,456 apm-solver-1.3.0-windows-x64.exe
19/05/2026  14:05                32 apm.key
12/08/2026  22:19               314 naca4412_wing.conf
08/03/2026  14:12         1,456,919 naca4412_wing.stl
12/08/2026  22:26             1,133 README.txt
               6 File(s)      9,753,822 bytes
```

{% hint style="info" %}
If you obtained a licence for APM, before running the APM Solver or Preprocessor, you need to make sure your licence key file is in the working folder of the binary, or you have an environmental variable APM\_KEY pointing to your licence key file. Please refer to the following page explaining how to set up your licence key - <https://docs.aviumtechnologies.com/quick-start/set-up-your-licence-key>.
{% endhint %}

Type `> apm-preprocessor-1.3.0-windows-amd64.exe naca4412_wing` and press enter. The APM preprocessor will read the mesh and will create a **.mdl** file. Once the **.mdl** file is created, type  `> apm-solver-1.3.0-windows-amd64.exe naca4412_wing`and press enter. The APM Solver will read the **.mdl** file and will solve for the potential flow around the NACA4412 wing. Once the solver finishes, you should see the following files in the "naca4412\_wing" folder.

```
C:\naca4412_wing> dir
 Directory of C:\naca4412_wing

12/08/2026  22:34    <DIR>          .
19/05/2026  14:05         3,987,968 apm-preprocessor-1.3.0-windows-x64.exe
19/05/2026  14:05         4,307,456 apm-solver-1.3.0-windows-x64.exe
19/05/2026  14:05                32 apm.key
12/08/2026  22:34           196,292 naca4412_wing.checkpoint
12/08/2026  22:34               315 naca4412_wing.conf
12/08/2026  22:34             2,348 naca4412_wing.loads
12/08/2026  22:32           224,629 naca4412_wing.mdl
08/03/2026  14:12         1,456,919 naca4412_wing.stl
12/08/2026  22:32           237,091 naca4412_wing.vtu
12/08/2026  22:34           639,951 naca4412_wing_body_panels_1.vtu
12/08/2026  22:34           639,559 naca4412_wing_body_panels_11.vtu
12/08/2026  22:34           639,424 naca4412_wing_body_panels_13.vtu
12/08/2026  22:34           639,237 naca4412_wing_body_panels_15.vtu
12/08/2026  22:34           639,163 naca4412_wing_body_panels_17.vtu
12/08/2026  22:34           639,110 naca4412_wing_body_panels_19.vtu
12/08/2026  22:34           639,085 naca4412_wing_body_panels_21.vtu
12/08/2026  22:34           639,071 naca4412_wing_body_panels_23.vtu
12/08/2026  22:34           639,057 naca4412_wing_body_panels_25.vtu
12/08/2026  22:34           639,038 naca4412_wing_body_panels_27.vtu
12/08/2026  22:34           639,032 naca4412_wing_body_panels_29.vtu
12/08/2026  22:34           640,020 naca4412_wing_body_panels_3.vtu
12/08/2026  22:34           640,029 naca4412_wing_body_panels_5.vtu
12/08/2026  22:34           639,886 naca4412_wing_body_panels_7.vtu
12/08/2026  22:34           639,655 naca4412_wing_body_panels_9.vtu
12/08/2026  22:34             5,278 naca4412_wing_wake_panels_1.vtu
12/08/2026  22:34            23,209 naca4412_wing_wake_panels_11.vtu
12/08/2026  22:34            26,924 naca4412_wing_wake_panels_13.vtu
12/08/2026  22:34            30,639 naca4412_wing_wake_panels_15.vtu
12/08/2026  22:34            34,366 naca4412_wing_wake_panels_17.vtu
12/08/2026  22:34            38,087 naca4412_wing_wake_panels_19.vtu
12/08/2026  22:34            41,807 naca4412_wing_wake_panels_21.vtu
12/08/2026  22:34            45,525 naca4412_wing_wake_panels_23.vtu
12/08/2026  22:34            49,246 naca4412_wing_wake_panels_25.vtu
12/08/2026  22:34            52,977 naca4412_wing_wake_panels_27.vtu
12/08/2026  22:34            56,731 naca4412_wing_wake_panels_29.vtu
12/08/2026  22:34             8,740 naca4412_wing_wake_panels_3.vtu
12/08/2026  22:34            12,304 naca4412_wing_wake_panels_5.vtu
12/08/2026  22:34            15,897 naca4412_wing_wake_panels_7.vtu
12/08/2026  22:34            19,529 naca4412_wing_wake_panels_9.vtu
12/08/2026  22:26             1,133 README.txt
              40 File(s)     20,466,759 bytes
```

If you haven't downloaded ParaView, go to <https://www.paraview.org/download/>. ParaView is an open-source, multi-platform data analysis and visualization application. Install and open ParaView. Then click on "File->Open" and select the "naca4412\_wing\_body\_panels\_..vtu" and "naca4412\_wing\_wake\_panels\_..vtu" files. Once you select the files click "Ok".&#x20;

![Loading .vtu files](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVcP23Im53TEQWfLYG2%2F-MVcPd14k_7vAO-mgBnx%2Fload_vtu_files.PNG?alt=media\&token=1077b468-58ca-473f-985b-f5d1255c2fdc)

Once the files are loaded, click the apply button in the properties tab on the left. The wing and the wake will be shown in the visualisation window. You can change which variable is currently displayed by selecting a coloring dropdown value. The image below shows the NACA 4412 wing colored by the pressure coefficient.

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVcPiWKRqlEGYl63ngn%2F-MVcQjIj7xCgDuqkfrv9%2Floaded_vtu_files.PNG?alt=media\&token=a04ea51a-b58d-4d75-b31b-9c2fec72714a)


# Set up your licence key

Thank you for purchasing an APM license key! You now have access to all APM features. When you run an APM binary, the binary needs your licence key to authenticate with our licence servers. This allows you to use all APM features. Please visit <https://accounts.aviumtechnologies.com/account> to view your licence key.&#x20;

Once you view your licence key you can either:

* create an apm.key file and place it in the current working folder of the APM binary
* creae an apm.key file somewhere in your system and an environmental variable pointing to your licence key

We suggest the second option as it is much more convenient. The APM binary will be able to authenticate with our servers even if the licence key file is not in the current working folder of the binary.

The contents of the apm.key file should be just the licence key. You can use any text editor to create this file.

### Setting up an environmental variable pointing to your licence key

To setup an environmental variable in Windows, open the system properties and click the "Enviroment Variables..." button. In the "User variables" list, add a new variable named APM\_KEY. The value of the variable should be the full path to your **apm.key** file.

To setup an environmental variable in Linux or macOS, add the following line to the end of your **.bashrc** file. The **.bashrc** file is located in the home directory.

```
export APM_KEY=~/apm.key
```

In the above example the **apm.key** file is located in the home directory.


# Release notes

## APM 1.3.0 (29 March 2026 - latest)

* Converted all influence matrices to **row‑major layout**, further accelerating parallel BiCGSTAB iterations.
* Added a **new doublet‑gradient formulation** based on the Hess & Smith doublet–vortex‑ring equivalence, enabling more accurate surface‑gradient evaluation.
* Introduced **doublet‑gradient smoothing via Gauss–Seidel**, reducing numerical noise and improving convergence stability on complex geometries.
* Performed **minor code refactoring and general performance improvements** across core routines.

## APM 1.2.0 (7 February 2026 )

* Improved trailing edge detection algorithm.&#x20;
* **APM is now free for non-commercial use.** The free version of APM is limited to 5000 panels and 50 unsteady timesteps. Control surface, actuator disk, and probe definitions are disabled. The vortex particle wake option, the symmetry option, and the restart from checkpoint options are disabled.

## APM 1.1.0 (2 November 2024)

* Improved control surface morphing algorithm. Control surface element detection was improved for control surfaces with swept hinges.
* Added wake\_particle\_smoothing\_radius option in the configuration file.
* Minor performance improvements.

## APM 1.0.9 (2 March 2024)

* Added support for UCD and WRL mesh formats. By default, APM will try to read a mesh in STL format. If no mesh in STL format is present, APM will try to read a mesh in UCD format. If no mesh in UCD format is present, APM will try to read a mesh in WRL format. The UCD and WRL formats support structured and unstructured elements. Check the corresponding section in the documentation for more information.

## APM 1.0.8 (1 October 2023)

* Added an extended\_output option in the conf file. If the extended\_output option is set to 1 each panel force and moment vector will be appended to the Paraview and Tecplot output files.

## APM 1.0.7 (9 February 2023)

* Added an x-z symmetry option to the APM solver. The symmetry option reduces the solution time and the required memory by a factor of 2. Check the corresponding section in the documentation for more information.
* Added Trefftz plane analysis option for steady and unsteady simulations. Check the corresponding section in the documentation for more information.
* Added a secondary APM executable where the solution is performed with double-precision floating point numbers. Note that for the same number of panels, the double-precision APM executable will require more memory.&#x20;
* Support for hybrid meshes - made up of quadrilateral and triangular panels.&#x20;
* Modified the body-to-wind transformation so CL, CD and CC follow the commonly adopted convention \[1].
* Various bug-fixes.

## APM 1.0.6 (4 January 2022)

* Added support for multiple wake-body intersections. E.g. intersections between a horizontal tail and a fuselage and a main wing and a fuselage.
* Added a "mirror" option for each control surface. By default, the value of the mirror option is 1. A value of 1 will mirror the control surface across the x-z body-fixed frame. If mirroring is not required the value of the mirror option can be set to 0.

## APM 1.0.5 (10 October 2021)

* Further improved performance by parallelising any remaining "serial" for loops
* Improved the panel neighbour search algorithm
* Added a feature where a **.vtu** or **.dat** files are created if the trailing edge search algorithm fails. The files can be opened with ParaView or Tecplot and used for debugging.
* Added a feature in the **.stl** file reader which rounds the coordinates in the file to the 6th digit after the decimal point

## APM 1.0.4 (8 August 2021)

* Improved performance by removing unnecessary copying
* Removed the **.res** output format
* Changed the integrated loads file format from **.ires** to **.loads**
* Removed email and password authentication
* Removed the **.mesh** file format.
* Added a custom **.stl** file format that supports both structured and unstructured meshes.

## APM 1.0.3 (9 May 2021)

* Fixed bugs in the restart from checkpoint feature
* Added a new authentication method (using a licence key). The authentication method uses an environmental variable "APM\_KEY".

## APM 1.0.2 (27 May 2020)

* Fixed bugs in **.conf** file reader and in the JSON file writer

## APM 1.0.1 (17 April 2020)

* Added a **.json** output format. JSON results can be viewed in the APM Viewer available at <https://apm.aviumtechnologies.com/viewer>
* Added a new method for pressure calculation (LSH) which uses inverse weighted distance interpolation and linear shape functions
* Renamed the "high\_order" option in the **.conf** file to "doublet\_gradient\_scheme". The doublet\_gradient\_scheme setting accepts the following values:
  * 0 - the pressure is calculated with the CHTLS scheme
  * 1 - the pressure is calculated with the WLS scheme
  * 2 - the pressure is calculated with the LSH scheme
  * 3 - the pressure is calculated with the FD scheme (the FD scheme can only be used for models with quadrilateral panels

## APM 1.0.0 (30 October 2019)&#x20;

* Initial release

## Testing new releases

Unit and integration testing is performed for each new APM release. Every portion of the software is tested - from influence calculation functions to gradient functions and helper functions. The solver and preprocessor are also tested by running a series of simulations (test cases).&#x20;

```
...
[----------] 7 tests from HelpersTests
[ RUN      ] HelpersTests.DegToRad
[       OK ] HelpersTests.DegToRad (0 ms)
[ RUN      ] HelpersTests.RadToDeg
[       OK ] HelpersTests.RadToDeg (0 ms)
[ RUN      ] HelpersTests.Sign
[       OK ] HelpersTests.Sign (0 ms)
[ RUN      ] HelpersTests.Factorial
[       OK ] HelpersTests.Factorial (0 ms)
[ RUN      ] HelpersTests.LSQR
[       OK ] HelpersTests.LSQR (14 ms)
[ RUN      ] HelpersTests.EllipticKEPI
[       OK ] HelpersTests.EllipticKEPI (0 ms)
[ RUN      ] HelpersTests.CHTLS
[       OK ] HelpersTests.CHTLS (0 ms)
[----------] 7 tests from HelpersTests (40 ms total)

[----------] 1 test from DoubletGradientTests
[ RUN      ] DoubletGradientTests.FDWLSLSFCHTLSTests
[       OK ] DoubletGradientTests.FDWLSLSFCHTLSTests (0 ms)
[----------] 1 test from DoubletGradientTests (3 ms total)

[----------] 1 test from ConfigTests
[ RUN      ] ConfigTests.ReadTest
[       OK ] ConfigTests.ReadTest (6 ms)
[----------] 1 test from ConfigTests (8 ms total)

[----------] 1 test from ActuatorDiskTests
[ RUN      ] ActuatorDiskTests.VelocityInfluenceTest
[       OK ] ActuatorDiskTests.VelocityInfluenceTest (0 ms)
[----------] 1 test from ActuatorDiskTests (3 ms total)

[----------] 12 tests from InfluenceTests
[ RUN      ] InfluenceTests.NearPotentialInfluenceTest
[       OK ] InfluenceTests.NearPotentialInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.FarPotentialInfluenceTest
[       OK ] InfluenceTests.FarPotentialInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.NearDoubletVelocityInfluenceTest
[       OK ] InfluenceTests.NearDoubletVelocityInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.NearSourceVelocityInfluenceTest
[       OK ] InfluenceTests.NearSourceVelocityInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.FarDoubletVelocityInfluenceTest
[       OK ] InfluenceTests.FarDoubletVelocityInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.FarSourceVelocityInfluenceTest
[       OK ] InfluenceTests.FarSourceVelocityInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.NearDoubletVelocityGradientInfluenceTest
[       OK ] InfluenceTests.NearDoubletVelocityGradientInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.FarDoubletVelocityGradientInfluenceTest
[       OK ] InfluenceTests.FarDoubletVelocityGradientInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.NearSourceVelocityGradientInfluenceTest
[       OK ] InfluenceTests.NearSourceVelocityGradientInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.FarSourceVelocityGradientInfluenceTest
[       OK ] InfluenceTests.FarSourceVelocityGradientInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.ParticleVelocityAndVelocityGradientInfluenceTest
[       OK ] InfluenceTests.ParticleVelocityAndVelocityGradientInfluenceTest (0 ms)
[ RUN      ] InfluenceTests.SpecialCasesInfluenceTest
[       OK ] InfluenceTests.SpecialCasesInfluenceTest (0 ms)
[----------] 12 tests from InfluenceTests (25 ms total)

[----------] 11 tests from PreprocessorTests
[ RUN      ] PreprocessorTests.AGARD
...
```

## References

\[1] Brian L. Stevens and Frank L. Lewis.  "Aircraft control and simulation / Brian L. Stevens, Frank L. Lewis," Wiley, New York  1992.


# The configuration file

The **.conf** file contains different options which specify the problem that APM will solve. The contents of an example **.conf** file are shown below:

```
c_ref = 1 
b_ref = 1
S_ref = 1
x_cg = 0 
y_cg = 0 
z_cg = 0
trailing_edge_angle = 150
p_ref = 101325
rho_ref = 1.225
mu_ref = 1.789e-5
norm_V_ref = 1
M_ref = 0
alpha = 0 
beta = 0 
p = 0
q = 0
r = 0
dt = 1
N_timesteps = 1
restart_from_checkpoint = 0
wake_alignment = 0
wake_angle = 0
wake_rollup = 1
output_frequency = 1
paraview_output = 1
tecplot_output = 0
json_output = 0
extended_output = 0
doublet_gradient_scheme = 0
neighbour_tolerance = 1e-6
trefftz_plane_analysis = 0
tip_panels =   
symmetry = 0
```

{% hint style="info" %}
The values in the above .conf file are in SI units - m, kg, s. You can use different units as long as they are consistent across the .conf file.
{% endhint %}

Refer to the table below for a detailed description of each option.

<table data-header-hidden><thead><tr><th>Option</th><th width="94" align="center">Dimension</th><th>Description</th><th align="right">Default value</th></tr></thead><tbody><tr><td><strong>Option</strong></td><td align="center"><strong>Dimensionality</strong></td><td><strong>Description</strong></td><td align="right"><strong>Default value</strong></td></tr><tr><td>c_ref</td><td align="center"><span class="math">L</span></td><td>Reference chord, used for non-dimensionalisation of the aerodynamic coefficients</td><td align="right">1</td></tr><tr><td>b_ref</td><td align="center"><span class="math">L</span></td><td>Reference span, used for non-dimensionalisation of the aerodynamic coefficients</td><td align="right">1</td></tr><tr><td>S_ref</td><td align="center"><span class="math">L^2</span></td><td>Reference area, used for non-dimensionalisation of the aerodynamic coefficients</td><td align="right">1</td></tr><tr><td>x_cg, y_cg, z_cg </td><td align="center"><span class="math">L</span></td><td>Location of the centre of gravity </td><td align="right">0</td></tr><tr><td>trailing_edge_angle</td><td align="center">-</td><td>Edges sharper than the trailing edge angle in degrees are identified as trailing edges</td><td align="right">150</td></tr><tr><td>p_ref</td><td align="center"><span class="math">M/(L{\cdot}T^2) </span></td><td>Reference pressure</td><td align="right">101325</td></tr><tr><td>rho_ref</td><td align="center"><span class="math">M/L^3 </span></td><td>Reference density</td><td align="right">1.225</td></tr><tr><td>mu_ref</td><td align="center"><span class="math">M/(L{\cdot}T) </span></td><td>Reference dynamic viscosity</td><td align="right">1.789e-5</td></tr><tr><td>norm_V_ref</td><td align="center"><span class="math">L/T </span></td><td>Reference freestream speed</td><td align="right">1</td></tr><tr><td>M_ref</td><td align="center">-</td><td>Reference Mach number (used for compressibility corrections)</td><td align="right">0</td></tr><tr><td>alpha, beta</td><td align="center">-</td><td>Angle of attack and angle of sideslip with respect to the freestream in degrees</td><td align="right">0</td></tr><tr><td>p, q, r</td><td align="center"><span class="math">1/T</span></td><td>Roll, pitch, and yaw rates in degrees/sec</td><td align="right">0</td></tr><tr><td>dt</td><td align="center"><span class="math">T</span></td><td>Time step</td><td align="right">1</td></tr><tr><td>N_timesteps</td><td align="center">-</td><td>Number of timesteps </td><td align="right">1</td></tr><tr><td>restart_from_checkpoint</td><td align="center">-</td><td>Instructs the solver to restart the solution from a checkpoint</td><td align="right">0</td></tr><tr><td>wake_alignment, wake_angle</td><td align="center">-</td><td>Specifies how the wake aligns with respect to the trailing edges</td><td align="right">0</td></tr><tr><td>wake_rollup</td><td align="center">-</td><td>If disabled the induced velocities from the body on the wake and on the wake iteslf wont be calculated. The wake will be translated with the reference freestream speed.</td><td align="right">1</td></tr><tr><td>json_output, <br>paraview_output, tecplot_output</td><td align="center">-</td><td>Enables or disables JSON, ParaView, and Tecplot output</td><td align="right">0, 1, 0</td></tr><tr><td>extended_output</td><td align="center">-</td><td>Appends force and moment vector for each panel in the Paraview and Tecplot output files</td><td align="right">0</td></tr><tr><td>doublet_gradient_scheme</td><td align="center">-</td><td>Instructs the solver how to calculate the <a href="/user-guide/the-configuration-file/calculating-surface-pressure">doublet gradient</a></td><td align="right">0</td></tr><tr><td>neighbour_tolerance</td><td align="center">-</td><td>Specifies the neighbour tolerance criteria</td><td align="right">1e-6</td></tr><tr><td>tip_panels</td><td align="center">-</td><td>Instructs the solver to label specific panels as type 6</td><td align="right">""</td></tr><tr><td>trefftz_plane_analysis</td><td align="center">-</td><td>Performs trefftz analysis at the trefftz plane to evaluate lift and drag</td><td align="right">0</td></tr><tr><td>symmetry</td><td align="center">-</td><td>Enables symmetry across the x-y plane. The solutions 2x faster and the memory requirements are 2x lower.</td><td align="right">0</td></tr></tbody></table>


# Calculating pressure

## Doublet gradient

The APM Solver determines the surface pressure coefficient from the gradient of the doublet strength. The gradient of the doublet strength distribution is not readily available. The solver uses several algorithms to calculate the gradient. Depending on the problem, some algorithms might perform better than others.&#x20;

* If the `doublet_gradient_scheme` option in the **.conf** file is set to 0, the doublet gradient will be calculated with a **Constrained Hermite Taylor Series Least Squares (CHTLS)** algorithm \[1]. **This is the default APM Solver doublet gradient scheme.**
* If the `doublet_gradient_scheme` option in the **.conf** file is set to 1, the doublet gradient will be calculated with a **Weighted Least Squares (WLS)** algorithm.&#x20;
* If the `doublet_gradient_scheme` option in the **.conf** file is set to 2, the doublet gradient will be calculated with a **Linear Shape Functions (LSF)** algorithm.&#x20;
* If the `doublet_gradient_scheme` option in the **.conf** file is set to 3, the doublet gradient will be calculated with a **Finite Differences (FD)** algorithm.&#x20;
* If the `doublet_gradient_scheme` option in the **.conf** file is set to 4, the doublet gradient will be calculated with the **Hess & Smith doublet - vortex ring equivalence (HS)** algorithm.

{% hint style="warning" %}
`The Finite Difference (FD) doublet gradient scheme can be used only on structured meshes!`
{% endhint %}

### Gradient smoothing

The doublet gradient estimated with either of the methods above can be further smoothed via a Gauss-Seidel smoother. The options `doublet_gradient_smoothing_iterations`  and `doublet_gradient_smoothing_factor`  control the strength of the smoothing. The default recommended settings are 3 iterations and a smoothing factor of 0.5. A smoothing factor  near 0 results in weak smoothing, and a smoothing factor close to 1 results in strong smoothing.

{% hint style="info" %}
The HS algorithm, coupled with gradient smoothing, is recommended on complex meshes. It will give superior results to the CHTLS algorithm.
{% endhint %}

The images below show a comparison of the surface pressure coefficient obtained with different doublet strength gradient algorithms.&#x20;

![CHTLS (left), WLS (middle), and LSF (right) results for a sphere geometry](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mfo2YykYKXW51q1WAJP%2F-Mfo2t_AO-rd2mOm6c0y%2Fsphere_doublet_gradient_scheme_comparison.png?alt=media\&token=005ec09e-67e9-488f-b6fb-639b114a4b88)

![CHTLS (left), WLS (middle), and LSF (right) results for the AGARD-AR-303 E6](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mfo2YykYKXW51q1WAJP%2F-Mfo2sweLPXX5lz-gkry%2Fagard_doublet_gradient_scheme_comparison.png?alt=media\&token=359fa4f3-8d1a-4d63-b3dc-56c52d723ed1)

The image below compares the CHTLS (left) with HS (right). The effect of doublet gradient smoothing can be clearly seen in the pressure coefficient distribution.

<figure><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FjSqgDfcLGhfWuihuPyOZ%2Fchtls_vs_hs.png?alt=media&amp;token=7c3e4017-ab7e-431f-bb6f-241554e6ed22" alt=""><figcaption><p>CHTLS (left), and HS + gradient smoothing (right) results for the Cruiser UAV.</p></figcaption></figure>

## Trefftz-plane loads

An alternative to the surface pressure integration is to use the far-field of Trefftz-plane approach. In general this is a more reliable approach, especially for the induced drag component. To enable the Trefftz-plane analysis set the `trefftz_plane_analysis` option in the **.conf** file to 1.&#x20;

<figure><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FiKjpVUVqlwMwdQVqguiS%2Ftrefftz_plane_analysis.png?alt=media&amp;token=7f4a6f59-b793-4776-9023-1805c922b9b8" alt=""><figcaption><p>Trefftz-plane used to calculate the loads of a fixed-wing UAV</p></figcaption></figure>

{% hint style="info" %}
For best results when using the Trefftz-plane analysis perform an unsteady solution. The unsteady solution will allow the wake to roll-up. The Trefftz-plane analysis will be performed at the location of the third to last row of wake panels.
{% endhint %}

## References

\[1] Robert McDonald and Alejandro Ramos. ["Constrained Hermite TLS for Mesh-free Derivative Estimation Near and On Boundaries," ](https://arc.aiaa.org/doi/10.2514/6.2011-655)AIAA 2011-655. *49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition*. January 2011.


# Calculating skin friction

{% hint style="warning" %}
An improved skin friction algorithm is currently in development.
{% endhint %}

The APM Solver uses the following expression to approximate the skin friction coefficient:

$$
Re\_{ref}=\frac{\rho\_{ref}|\mathbf{V}*{ref}|c*{ref}}{\mu\_{ref}},\\
C\_{f}=\frac{0.455}{log\_{10}(Re\_{ref})^{2.58}}
$$

In the above expression, $$Re\_{ref}$$is the Reynolds number based on the reference chord. Schlichting's relation \[1] is used to obtain the skin friction coefficient from the Reynolds number. The skin friction coefficient is then multiplied by the surface velocity vector at the centre of each panel to approximate the loads resulting from viscosity.

{% hint style="info" %}
To disable the approximation of viscous loads set the dynamic viscosity $$\mu\_{ref}$$to 0. The default APM Solver value for$$\mu\_{ref}$$is $$1.7890\times10^{-5}$$.
{% endhint %}

## References

\[1] Gudmundsson, S., "General Aviation Aircraft Design Applied Methods and Procedures", Ed. 1, 2014, pp. 678-679


# Creating control surfaces

The APM Preprocessor has the ability to create control surfaces by deforming the mesh. To create a control surface add the following lines to the end of the **.conf** file.

```
[control_surface]
    x1 = 0.0000
    y1 = 0.0000
    z1 = 0.0000
    x2 = 0.0000
    y2 = 0.0000
    z2 = 0.0000
    x3 = 0.0000
    y3 = 0.0000
    z3 = 0.0000
    deflection = 0.0000
    differential_deflection = 0
    mirror = 1
```

The three vectors with components `x1`, `y1`, `z1`,`x2`,`y2`,`z2`,`x3`,`y3`,`z3` define the mid-plane of the control surface. The hinge line is defined as `x2-x1`, `y2-y1`, `z2-z1`. The image below shows the three vectors and the resulting control surface mid-plane.

![Definition of a control surface](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVXZvM3D1mQfA3qC04D%2F-MVXbYIuqxVpeZZPpFDB%2Fcontrol_surface.png?alt=media\&token=4408b002-d66f-4224-a1b8-26b83c34b448)

{% hint style="info" %}
Control surfaces should always be created on the left side of the $$x-z$$symmetry plane (negative $$y$$-direction). The APM Preprocessor will automatically mirror the control surfaces across the $$x-z$$symmetry plane.
{% endhint %}

Deflection specifies the amount of control surface deflection in degrees and differential specifies whether mirrored control surfaces deflect in the opposite direction.


# Creating actuator disks

{% hint style="warning" %}
This is still an experimental feature! Use with caution.
{% endhint %}

The APM Solver has the ability to simulate propellers by using the actuator disk model. To create an actuator disk add the following lines to the end of the **.conf** file:

```
[actuator_disk]
x = 0
y = 0
z = 0
nx = 0
ny = 0 
nz = 0
R = 0
CT = 0
```

The `x`,`y`,`z` variables specify the centre of the actuator disk. The `nx`, `ny`, `nz` specify the unit normal vector of the actuator disk and the R and CT variables specify the radius and the thrust coefficient. The image below shows the centre of the actuator disk, its radius and its unit normal vector.

![Definition of an actuator disk](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVXbpsu2CSjcnspTuoq%2F-MVXd0gDAks75NgLvkRC%2Factuator_disk.png?alt=media\&token=a2c4bbfd-8204-46a1-bbdb-68fb2b956778)

{% hint style="info" %}
The unit normal vector should point in the direction of the thrust vector.
{% endhint %}

The images below show some examples of actuator disks.

![NACAA 4412 Wing with actuator disk](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVX355erRsTpmfpbtjk%2F-MVX3yFeZJdJY41Yua4R%2Fnaca4412_actuator_disk.png?alt=media\&token=a75c9e6e-11ae-41e1-b9e3-8763ca54554e)

![Fixed-wing UAV with two actuator disks](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVX355erRsTpmfpbtjk%2F-MVX47yCGt0-XI0lSoZW%2Fcruiser_uav_actuator_disk.png?alt=media\&token=74dbe08a-0672-4441-9424-d0a47faa64d6)


# The mesh file

The APM Preprocessor supports mesh files in **.stl** format. The **.stl** file is a commonly used mesh file format which represents bodies with triangular elements. If a body is represented only with triangular elements its mesh is said to be unstructured. Conversely, if a body is represented only with quadrilateral elements its mesh is said to be structured. The images below show an unstructured mesh of a fixed-wing UAV, a structured mesh of a NACA0015 wing, and a hybrid (mixed) mesh of a fixed-wing UAV.

![Unstructured mesh of a fixed-wing UAV](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVXIQHMvGygHuzsNSXq%2F-MVXJEk3BcPa9XXm-j7b%2Fexample_mesh.png?alt=media\&token=1d4ed16b-0d4f-4a68-b038-93f7f6995718)

![Structured mesh of a NACA0015 wing](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVgETQYViE55tRZjCUV%2F-MVgEqNERMDyInDgYYtf%2Fexample_structured_mesh.png?alt=media\&token=207cd39b-f30f-4b83-aa1b-38c483681d3d)

<figure><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FVh3CRPKHoVOh6ZQw8MKh%2Fexample_mixed_mesh.png?alt=media&amp;token=ae08c7be-8e31-410e-bf9c-9db9a02d4641" alt=""><figcaption></figcaption></figure>

## File formats

### .stl

The **.stl** mesh file format can only store unstructured meshes. However, the APM Preprocessor supports a non-standard **.stl** mesh file format which can store structured meshes. A typical structure of a **.stl** mesh file is shown below:

```
solid "name"
    facet normal nx ny nz      
        outer loop
            vertex x y z
            vertex x y z
            vertex x y z
        endloop
    endfacet                   
    facet normal nx ny nz      
        outer loop
            vertex x y z
            vertex x y z
            vertex x y z
        endloop
    endfacet       
    ...
    ...
    ...
endsolid
```

Each mesh element is defined by the `facet` keyword. The `normal` keyword and the `nx`, `ny`, `nz` variables specify the unit normal vector of the element. The `vertex` keyword and the `x`, `y`, `z` variables specify a vertex of the element. Since each element has 3 vertices the `vertex` keyword and the `x`, `y`, `z` variables are repeated three times.

For structured meshes, a fourth vertex is added to each element.

{% hint style="info" %}
A **.stl** file with four vertices per element is non-standard and is specific to the APM Preprocessor.
{% endhint %}

{% file src="/files/P6052hUA0c3urCPWVmAi" %}

### .ucd

The **.ucd** mesh file format can only store unstructured and structured meshes. A typical structure of a **.ucd** mesh file is shown below:

```
# <comment 1>
.
.
.
# <comment n>
<num_nodes> <num_cells> <num_ndata> <num_cdata> <num_mdata>
<node_id 1> <x> <y> <z>
<node_id 2> <x> <y> <z>
<node_id num_nodes> <x> <y> <z>
<cell_id 1> <mat_id> <cell_type> <cell_vert 1> ... <cell_vert n>
<cell_id 2> <mat_id> <cell_type> <cell_vert 1> ... <cell_vert n>
<cell_id num_cells> <mat_id> <cell_type> <cell_vert 1> ...<cell_vert n>
```

{% file src="/files/2KGqhO0whmA9qqvENvqU" %}

### .wrl

The **.wrl** mesh file format can only store unstructured and structured meshes. A typical structure of a **.wrl** mesh file is shown below:

```
Shape {
    geometry IndexedFaceSet {
        coord Coordinate {
            point [
                <x> <y> <z>
                <x> <y> <z>
                <x> <y> <z>
                ...
            ]
        }
        coordIndex [
            <cell_vert 1> ... <cell_vert n>
            <cell_vert 1> ... <cell_vert n>
            <cell_vert 1> ... <cell_vert n>
            ...
        ]
    }
}
```

{% file src="/files/zyvjIV9Sd6RG7JORTKmw" %}


# Creating meshes

The APM Preprocessor does not have built-in meshing capabilities. As a result you have to use a 3rd party meshing software capable of creating meshes in **.stl** format. Examples of meshing software are:

* [Gmsh](https://gmsh.info/) (free)
* [OpenVSP](http://openvsp.org/) (free)
* [ANSYS ICEM CFD](https://www.ansys.com/)
* [Pointwise](https://pointwise.com/)
* [GridPro](https://www.gridpro.com/)

Although [OpenVSP](http://openvsp.org/) is not a meshing software, it has meshing capabilities and can be used to create meshes in **.stl** file format. For more information, refer to the [OpenVSP section](/user-guide/the-mesh-file/creating-meshes/openvsp).

{% hint style="info" %}
Any meshing software capable of creating meshes in **.stl** file format can be used.
{% endhint %}

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MWGMJxQ2VXoYA6cHL_d%2F-MWGz0TibIBPqHLciFqt%2Fmeshing_software.png?alt=media\&token=7498e5f6-914b-4e4c-8dbb-391c174f73ce)


# OpenVSP

Creating an unstructured mesh with OpenVSP

OpenVSP, also known as Open Vehicle Sketch Pad, is an open source parametric aircraft geometry tool originally developed by NASA. It can be used to create 3D models of aircraft and to support engineering analysis of those models. You will use OpenVSP to create an unstructured mesh of a NACA4412 wing with  an aspect ratio $$AR$$ of 6 and reference chord $$c\_{ref}$$ of 1.&#x20;

## Step 1

Visit <http://openvsp.org/download.php> to download OpenVSP. OpenVSP is free and it runs on Windows, MacOS, and Ubuntu. Once you download the OpenVSP archive, extract it and run the OpenVSP executable. The image below shows the main OpenVSP window:

![OpenVSP main window](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW3ZmLzOaGGu6ht68Da%2F-MW3blnkjV2twlINk2Gi%2Fopenvsp1.png?alt=media\&token=d670cc2e-23fe-46ce-9c27-89d4cd25e3b5)

The geometry browser window on the right allows you to create components. Components include but are not limited to:

* fuselage
* wing
* pod

## Step 2

Select wing from the component dropdown and click the add button. A wing with default parameters will be created. The image below shows the created wing.

![Wing with default parameters](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW3ZmLzOaGGu6ht68Da%2F-MW3cUGBRVmJzK8dAoKJ%2Fopenvsp2.PNG?alt=media\&token=d5faab50-ad7d-4d34-b06e-82b508fd3dac)

## Step 3

Open the Airfoil tab. Change the thickness to chord ratio "T/C", the camber "Camber", and the camber location "CamberLoc"  for both the tip and the root airfoils. Use a thickness to chord ratio of 0.12, camber of 0.04, and camber location of 0.4. These values correspond to the NACA4412 airfoil. You can switch between the tip and root airfoils by clicking the "<" and ">" buttons.

![Change the tip and root airfoils to NACA4412](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW5z6AparUbC_V_KmyD%2F-MW62mK1CcsxLqDret5T%2Fopenvsp3.PNG?alt=media\&token=3adad037-12ba-4a9a-9bf6-99aa0867e7e7)

## Step 4

Open the "Sec" tab. Change the span "Span", the length of the tip "Tip C" and root "Root C" chord, and the sweep "Sweep" angle to the following values - 3, 1, 1, and 0.

![Change the tip and root chord to 1 and the span to 6](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW5z6AparUbC_V_KmyD%2F-MW62pAaypQcOIQN83M6%2Fopenvsp4.PNG?alt=media\&token=8e54c8de-c1bb-46bc-a05c-f245753a8b18)

You should now have a NACA4412 wing of aspect ratio 6 displayed in the main window of OpenVSP.

## Step 5

Save the model by clicking "File" and then select the "Save As" option. Save the model as naca4412\_wing.vsp3.

{% hint style="info" %}
Any file name can be used. The file name above (naca4412\_wing.vsp3) is for illustrative purposes only.
{% endhint %}

![Save the model as .vsp3 file](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW5z6AparUbC_V_KmyD%2F-MW62sNaiBFXN-wIQU6O%2Fopenvsp5.png?alt=media\&token=a1c54949-3bde-43d3-8d53-dc307bf9fcc8)

## Step 6

Click on "Analysis" and select the "CFD Mesh" option.

![Create mesh](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW5z6AparUbC_V_KmyD%2F-MW62uoCP5bVO7RiygyP%2Fopenvsp6.PNG?alt=media\&token=8a419b02-15cf-4db4-9fa9-f721ff0c7175)

## Step 7

Select the "Global" tab and click the "Mesh and Export" button. The model will be meshed using the default mesh settings.

![Create mesh using the default parameters](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW5z6AparUbC_V_KmyD%2F-MW633Cqh8qzq0mTq_7g%2Fopenvsp7.png?alt=media\&token=922fc9de-de42-4511-8da5-0bf8a0ef4c91)

## Step 8

The mesh of the model appears in the main window of OpenVSP. Immediately you can see that the mesh is too coarse near the leading edge. The elements in this region are too big and do not accurately represent the geometry of the wing.&#x20;

{% hint style="info" %}
Elements in regions with high curvature (such as the leading edge) should be small.&#x20;
{% endhint %}

![Resulting mesh using default parameters](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW5z6AparUbC_V_KmyD%2F-MW636OF8qBBHnrs4pp2%2Fopenvsp8.PNG?alt=media\&token=1f223c6b-800f-48e8-ba09-a51a0642fd92)

## Step 9

To reduce the size of the elements in the region of the leading edge you can lower the "Min Edge Len" value. Set the "Min Edge Len" value to 0.025. Select "All" from the "Use set" dropdown and click the "Mesh and Export" button. The new mesh of the model appears in the main window of OpenVSP. Immediately you can see that the elements in the region of the leading edge are smaller and represent more accurately the wing geometry.

![Refined mesh](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW5z6AparUbC_V_KmyD%2F-MW639Huo3y2fChWRhtf%2Fopenvsp9.PNG?alt=media\&token=7312ed44-bcdd-46db-b3bc-47f49d98886d)

{% hint style="info" %}
When you click the "Mesh and Export" button OpenVSP will create a STL file in the folder of the naca4412\_wing.vsp3 file. The STL file contains the mesh of the model.
{% endhint %}

## Step 10

Always remember to check the coordinate system!  As stated in the [preprocessor section ](/user-guide/preprocessor)the mesh must be in a body-fixed coordinate system i.e. the x-axis must point forward, the y-axis must point starboard and the z-axis must point down.&#x20;

{% hint style="info" %}
Check the coordinate system of the model before meshing. The model should be in a body-fixed coordinate system i.e. the x-axis points forward, the y-axis points to the starboard, and the z-axis points down.&#x20;
{% endhint %}

The model in the above example is not in a body-fixed coordinate system i.e. the x-axis points backward and the z-axis points up. Select the "XForm" tab and change the "YRot" value to 180. The model is now in a body-fixed coordinate system. Repeat step 9 to re-mesh the model.

![Change the coordinate system of the model to a body-fixed one](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW69Nj_CgRSrQ2ODbCz%2F-MW6ALZ8fJYjeFRGILx4%2Fopenvsp10.PNG?alt=media\&token=a379dd5f-c70d-4c51-abe8-267bdac93cdc)

After re-meshing the model you should have a naca4412\_wing.stl file in the folder where you saved the naca4412\_wing.vsp3 model file.&#x20;

Congratulations! You created your first mesh using OpenVSP. Now you can use APM to analyse the flow around the NACA4412 wing.&#x20;

For more meshing information and best practices when meshing refer to the [preprocessor section](/user-guide/preprocessor).


# SUMO

Create an unstructured mesh with SUMO

SUMO is an open source graphical tool for surface-based aircraft modeling and mesh generation  developed as part of publicly funded research projects at [KTH](http://www.kth.se/) in Stockholm. You will use SUMO to create an unstructured mesh of a NACA4412 wing with  an aspect ratio $$AR$$ of 6 and reference chord $$c\_{ref}$$ of 1.&#x20;

## Step 1

Visit <https://www.larosterna.com/products/open-source> to download SUMO. SUMO is free and it runs on Windows, MacOS, and Ubuntu. Once you download the SUMO archive, extract it and run the SUMO executable. The image below shows the main SUMO window:

![SUMO main window](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_VBC1jcWDRm5TrvHV%2F-MW_iIquVju6F4o5aof4%2Fsumo1.PNG?alt=media\&token=a91c97aa-fe88-4154-80da-9de1ae4f747c)

You can create multiple body or wing components. Click the add wing button to create a wing with default parameters. The "Edit wing properties" window will open.

## Step 2

Close the "Edit wing properties" window to update the "Rendering" view tab. After closing the window you should see a wing in the "Rendering" view tab.

![Create a wing with default parameters](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_VBC1jcWDRm5TrvHV%2F-MW_iTyJdZXLaDNjayYb%2Fsumo2.PNG?alt=media\&token=4e2ee8ea-9bfa-4f45-a7fd-4d31fa0b1593)

## Step 3

Right click on the wing name and select "Edit selected object" option. The "Edit wing properties" window will open.

![Wing with default parameters](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_iaBU_S1SbDB2fhes%2F-MW_ifPFKknKoSsPkGq6%2Fsumo3.PNG?alt=media\&token=cc6475ab-fc01-4c41-9463-c6cd6fe16184)

## Step 4

In the "Edit wing properties" window, change the name of the wing object to "naca4412\_wing". Select one of the wing sections, listed in the section list, and click the "Edit section" button.

![Edit wing parameters](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_iaBU_S1SbDB2fhes%2F-MW_ifPGkTsMNBux__z5%2Fsumo4.png?alt=media\&token=6cb494e6-6f73-48ce-b3cc-1f95defbd6a5)

## Step 5

Change the names of the two sections to "tip" and "root". Set the "Chord length" option of both sections to 1 and set the $$y$$origin of the "tip" section to 3. Click the "Change..." button to change the airfoil of each section.

![Change the chord length and position of the tip and root wing sections](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_iaBU_S1SbDB2fhes%2F-MW_ifPHd0-S_YDMs7gc%2Fsumo5.PNG?alt=media\&token=e583cf81-60a8-4376-bf81-d2124b1fc51d)

## Step 6

In the "Change airfoil coordinates" window select the "NACA 4/5-Series" tab. Select the "NACA 4-series airfoil" option and set the "Thickness ratio", "Relative camber", and "Max camber position" to 12, 4, and 40. These values correspond to the NACA4412 airfoil.

![Change the tip and root airfoils to NACA4412](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_iaBU_S1SbDB2fhes%2F-MW_ifPIx-e5WHY3CK4k%2Fsumo6.PNG?alt=media\&token=5ebd7815-86ad-499b-8886-468f653a1dbc)

## Step 7

In the "Edit wing properties" window set the "Right cap height" and "Left cap height" to 0 and click the "Close" button.

![Change the right and left cap heights](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_iaBU_S1SbDB2fhes%2F-MW_ifPJkH2uGiNUELpY%2Fsumo7.PNG?alt=media\&token=aece61a8-13bc-44f4-a211-ef56005aad5f)

## Step 8

Click the "Mesh" button to open the "Generate mesh" window. In the  "Generate mesh" window disable the "Use default values" and "Use hybrid generation algorithm" options. Set the "Maximum edge length" and "Minimum edge length" options to 0.3 and 0.01. Click the create "Create mesh" button.

![Change the minimum and maximum edge lengths](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_iaBU_S1SbDB2fhes%2F-MW_ifPKNEMfBASMI3dv%2Fsumo8.png?alt=media\&token=32438e6b-563b-4b1d-9eeb-ecb27a84794f)

{% hint style="info" %}
Check the coordinate system of the model before meshing. The model should be in a body-fixed coordinate system i.e. the x-axis points forward, the y-axis points to the starboard, and the z-axis points down.&#x20;
{% endhint %}

## Step 9

The created mesh will be available in the "Mesh" view tab. To save the mesh to a **.stl** file click "File" and select the "Export..." and "Save surface mesh..." options.&#x20;

![Resulting mesh](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MW_iaBU_S1SbDB2fhes%2F-MW_ifPLSyhHx-FHQqYY%2Fsumo9.PNG?alt=media\&token=6a7d13ef-254a-4f5a-a806-d74a8d498584)

Congratulations! You created your first mesh using SUMO. Now you can use APM to analyse the flow around the NACA4412 wing.&#x20;

For more meshing information and best practices when meshing refer to the [preprocessor section](/user-guide/preprocessor).


# Preprocessor

he APM Preprocessor reads the mesh of the body and assigns a type to each element. The mesh must satisfy the following requirements:

* The mesh must be watertight (unless using the [symmetry option](#symmetry))&#x20;
* The surface normals of the body must point outward i.e. into the flow
* If the mesh includes a wake, the wake normals should point in the negative z-direction
* The mesh must be in a body-fixed coordinate system i.e. the x-axis must point forward, the y-axis must point to the right wing and the z-axis must point down
* The mesh must be in STL file format

More information about the format of the mesh file is available in the [mesh file](/user-guide/the-mesh-file) section. The image below shows an unstructured mesh of a fixed-wing UAV.

![Unstructured mesh of a fixed-wing UAV](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVXdBbAiVEJ2sETEk3m%2F-MVXeHS7XjiYUEXVOXE2%2Fexample_mesh.png?alt=media\&token=a0839a4b-8cd1-4b2c-a07b-a231593c377c)

{% hint style="info" %}
The mesh should be in a body-fixed coordinate system, should be watertight and the mesh normals should point outward i.e. into the flow.
{% endhint %}

After running the APM Preprocessor each element of the mesh is assigned a type. A list of the element types is given in the table below.&#x20;

| Type | Description                                                                                        |
| ---- | -------------------------------------------------------------------------------------------------- |
| 1    | Body element                                                                                       |
| 2    | Upper trailing edge element (normal points in negative z-direction)                                |
| 3    | Lower trailing edge element (normal points in positive z-direction)                                |
| 4    | Upper intersection edge element (at locations where the wake elements intersect the body elements) |
| 5    | Lower intersection edge element (at locations where the wake elements intersect the body elements) |
| 6    | Element belonging to a flat surface (wing tip, tail tip, fuselage boom base, etc.)                 |

The image below shows the element types for the fixed-wing UAV.

![Element types of the fixed-wing UAV.](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVcHlrZ_tyzEcDmPyZ8%2F-MVcIm1ZRfwxtttC2HRA%2Felement_types_1.png?alt=media\&token=8930364c-9c33-40f3-a39c-f9bd654cc140)

To find trailing edge elements the APM Preprocessor compares the angle between the normals of two adjacent elements to the `trailing_edge_angle` option in the **.conf** file. If the angle is greater than the one specified by the `trailing_edge_angle` option the elements are marked as trailing edge elements. Trailing edge elements are used by the APM Solver to enforce the Kutta condition. If the mesh contains a wake, as in the fixed-wing UAV example, the APM Preprocessor will find all elements which have more than 3 neighbours. Such elements exist along the trailing edges and at the location where the wake meets the body. Elements belonging to flat surfaces (e.g the wing and tail tips and the fuselage base) should be type 6. The APM Preprocessor is unable to detect type 6 elements automatically. You need to manually specify elements of type 6.  For the fixed-wing UAV example, the elements at the fuselage base must be type 6. To set the type of all elements belonging to the base you need to determine the identifier (ID) of at least one element belonging to the base. You can easily determine the identifier by opening the **.stl** file in a data analysis and visualization application such as ParaView.&#x20;

{% hint style="info" %}
Run the APM Preprocessor without specifying identifiers for type 6 elements. Open the created **.vtu** or **.dat** files and find the identifier of at least one element belonging to a flat surface. Add the identifier to the tip\_panels option in the **.conf** file and re-run the APM Preprocessor.
{% endhint %}

After you obtain the identifier of at least one element belonging to the base, add it to the `tip_panels` option in the **.conf** file. You can add multiple identifiers if you have multiple flat surfaces in your model. Make sure the identifiers are separated by a comma.

```
tip_panels = id1,id2,id3...
```

After the APM Preprocessor runs it will create a **.mdl** file. The format for the **.mdl** file is specific to the Aviumtechnologies Panel Method and contains the element vertices, types, and neighbours. The APM Solver uses the **.mdl** file to solve for the potential flow around the body.

## Symmetry option

To make use of the symmetry option, you need to mesh only half of your geometry. Your geometry must lie entirely in the -y or the +y direction. The preprocessor will mirror the mesh, including the panel types, across the x-y plane accordingly. The image below shows half of the mesh of a fixed-wing UAV.&#x20;

<figure><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FTZghrAbW5Ct8ypySlipH%2Fexample_half_mesh.png?alt=media&amp;token=f7748aaf-ee20-4f15-bf1b-7fe840628e9a" alt=""><figcaption><p>Unstructured half-mesh of a fixed-wing UAV</p></figcaption></figure>

## MATLAB script for plotting .mdl files

```
clear all;
close all;
clc;

structured=0;

model=dlmread('<model>.mdl');

N_vertices=model(1,1);
N_faces=model(1,2);

model=model(2:end,:);

for i=1:N_vertices
    vertices(i,1)=model(i,1); 
    vertices(i,2)=model(i,2); 
    vertices(i,3)=model(i,3); 
end

model=model((N_vertices+1):end,:);

for i=1:N_faces
    
   faces(i,1)=model(i,1)+1; 
   faces(i,2)=model(i,2)+1; 
   faces(i,3)=model(i,3)+1;
   if structured == 1
       faces(i,4)=model(i,4)+1;
   end
   
   r1=vertices(faces(i,1),:)';
   r2=vertices(faces(i,2),:)';
   r3=vertices(faces(i,3),:)';
   if structured == 1
       r4=vertices(faces(i,4),:)';
   end
   
   if structured == 1
       r=1/4*(r1+r2+r3+r4);
       n=cross(r3-r1,r4-r2);
   else
       r=1/3*(r1+r2+r3);
       n=cross(r2-r1,r3-r1);
   end
   
   n=n/norm(n);
   
   centres(i,1)=r(1);
   centres(i,2)=r(2);
   centres(i,3)=r(3);
   normals(i,1)=n(1);
   normals(i,2)=n(2);
   normals(i,3)=n(3);
  
end

model=model((N_faces+1):end,:);

for i=1:N_faces
    types(i,1)=model(i,1);
end    
    
figure(1);
hold on;
patch('Faces',faces,'Vertices',vertices,'FaceVertexCdata',types,'FaceColor','flat','EdgeColor',[0,0,0]/255,'Clipping','off');
quiver3(centres(:,1),centres(:,2),centres(:,3),normals(:,1),normals(:,2),normals(:,3),1,'Color',[0 143 255]/255,'Clipping','off');
grid on;
axis equal;
axis off;
rotate3d on;
set(gca,'Zdir','reverse');
set(gca,'Ydir','reverse');
colormap(jet);
colorbar;
camproj('perspective');
view([135,25]);
drawnow;
```


# Solver

The APM Solver solves for the potential flow around arbitrary bodies. The bodies are represented by structured or unstructured mesh in **.stl** format. The APM Preprocessor is first used to preprocess the mesh. During this step, the APM Preprocessor creates a **.mdl** file. The APM Solver uses the **.mdl** file to solve for the potential flow around the body. Please refer to the following sections for more information about the APM Solver:

## Steady simulations

For steady simulations the wake is assumed to be a flat surface extending to "infinity". Visit the [steady simulations section](/user-guide/solver/steady-simulations) for more information.

## Unsteady simulations

For unsteady simulations the wake is assumed "free", i.e. it is allowed to deform and interact with itself and the body. Visit the [unsteady simulations section](/user-guide/solver/unsteady-simulations) for more information.

## Wake

The wake can be aligned with the average trailing edge bisector, the freestream velocity vector, or with a specific vector (predefined). Visit the [wake section](/user-guide/solver/wake) for more information.

### Interactions with the body

The wake can interact with downstream body parts (e.g. horizontal and/or vertical tails) without causing numerical instabilities. Visit the [interaction with the body section](/user-guide/solver/wake/interaction-with-the-body) for more information.

### Viscous vortex particle wake

The wake can be represented by viscous vortex particles. Visit the [viscous vortex particle wake section](/user-guide/solver/wake/viscous-vortex-particle-wake) for more information.


# Steady simulations

![Steady simulation of a NACA4412 wing](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVX86KbflOuXvUcmDLe%2F-MVX8Rk3goiKqwuYCW53%2Fnaca4412_cp_steady.png?alt=media\&token=d1f76cd5-1388-4781-9c3d-bab3a6db50ae)

For steady simulations, the APM Solver assumes that the wake is a flat surface that extends to infinity. The following options in the **.conf** file are changed:

* `dt`- the timestep size in seconds
* `N_timesteps` - the number of timesteps

The `dt` option must be such as to allow the wake to extend at least 100 chord lengths downstream in direction of the flow. If the airspeed is `norm_V_ref=10` m/s and the `c_ref=1` m, `dt` should be approximately 1000 s. In addition, `N_timesteps` should be set to 1.

{% hint style="info" %}
The values for airspeed and chord are arbitrary and are used for illustrative purposes.
{% endhint %}


# Unsteady simulations

![Unsteady simulation of a NACA4412 wing](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVX86KbflOuXvUcmDLe%2F-MVX8XClSgLnVkHkLy7V%2Fnaca4412_cp_unsteady.png?alt=media\&token=5dba9ea8-7425-43b1-a10a-b92f86659fa0)

For unsteady simulations the APM Solver assumes that the wake is free, i.e. the wake is allowed to deform and interact with itself and the body. The following options in the **.conf** file are changed:

* `dt` - the time step size in seconds&#x20;
* `N_timesteps` - the number of timesteps&#x20;
* `output_frequency` - the results output frequency

Two of the three options are identical to the ones for steady simulations, however, their values differ. The time step, `dt`, should be selected such as to allow proper development of the wake. As an initial estimate `dt` should be selected as the time it takes the flow to travel one chord length. If the airspeed is `norm_V_ref=10` m/s and the `c_ref=1` m, `dt` should be approximately 0.1s. The number of time steps `N_timesteps` should be sufficiently high to allow the aerodynamic loads to stabilise. The `output_frequency` option instructs APM how often to output results.&#x20;

{% hint style="info" %}
If the output\_frequency option is equal to 10, the APM Solver will output results every 10 timesteps. The values for airspeed and chord are arbitrary and are used for illustrative purposes.
{% endhint %}

## Custom motion

![Unsteady simulation of a NACA4412 wing with custom motion](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVX86KbflOuXvUcmDLe%2F-MVX8a3r8IOv1JvrFm5W%2Fnaca4412_cp_unsteady_motion.png?alt=media\&token=0fca715d-6b9f-47e1-a14b-532b71948cf3)

Custom motion can be specified, if required, during unsteady simulations. If a **.motion** file is created in the current working directory the APM solver will ignore the `dt`and `N_timesteps`options specified in the **.conf** file and will use the time step and number of time steps specified in the **.motion** file. The unsteady motion file contains 10 variable per row - $$t$$,$$u$$,$$v$$,$$w$$,$$p$$,$$q$$,$$r$$,$$\phi$$,$$\theta$$, and $$\psi$$. The variables represent the velocity components, rotational rates, and kinematic angles at each time step. An example motion is a sinusoidal motion with a variation of the angle of attack given by:&#x20;

$$
\alpha=Asin(\omega t)\text{,}\\\omega=2\pi f\text{,}
$$

where $$f$$ is the frequency of the motion and $$A$$ is the amplitude of the angle of attack. The $$u$$and$$w$$ variables can be determined from the equation for $$\alpha$$:

$$
tan(\alpha)=\frac{u}{w}\\|V\_{ref}|=\sqrt{u^2+w^2}\ v=p=q=r=\phi=\theta=\psi=0
$$

The image above shows an unsteady simulation of a NACA4412 wing with custom **.motion** file. The structure of an example **.motion** file is shown below:

```
0.000000 1.000000 0.000000 0.000000 1.370778 0.000000 0.000000 0.000000 0.000000 0.000000
0.010000 1.000000 0.000000 0.000000 1.353902 0.000000 0.000000 0.013651 0.000000 0.000000
0.020000 1.000000 0.000000 0.000000 1.303688 0.000000 0.000000 0.026967 0.000000 0.000000
0.030000 1.000000 0.000000 0.000000 1.221372 0.000000 0.000000 0.039618 0.000000 0.000000
0.040000 1.000000 0.000000 0.000000 1.108983 0.000000 0.000000 0.051294 0.000000 0.000000
...
```

Below is an example MATLAB file which can be used to generate a **.motion** file.

```
clear all;
close all;
clc;

V_ref=1; %freestream velocity (m/s)
c_ref=1; %reference chord
t_max=c_ref*100/V_ref; %maximum simulation time
N_cycles=3; %number of oscillation cycles
N_timesteps=50; %number of timesteps
dt=t_max/N_timesteps; %timestep size (s)
t=0:dt:t_max;
V_ref=1; % reference velocity
A=deg2rad(5);  %oscillation amplitude (deg)
f=N_cycles/t_max; %oscillation frequency (Hz)
omega=2*pi*f;

phi=A*sin(omega*t);
theta=A*sin(omega*t);
psi=A*sin(omega*t);
p=A*cos(omega*t)*omega;
q=A*cos(omega*t)*omega;
r=A*cos(omega*t)*omega;


motion_file=fopen('rolling.motion','w');

for  n=1:length(t)
    
    t_out=t(n);
    u_out=V_ref;
    v_out=0;
    w_out=0;
    p_out=p(n);
    q_out=0;
    r_out=0;
    phi_out=phi(n);
    theta_out=0;
    psi_out=0;
   
    fprintf(motion_file,'%0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f\n',t_out,u_out,v_out,w_out,p_out,q_out,r_out,phi_out,theta_out,psi_out);
    
end

fclose(motion_file);

motion_file=fopen('pitching.motion','w');

for  n=1:length(t)
    
    u=V_ref*1/sqrt(1+tan(theta(n))^2);
    w=u*tan(theta(n));
    
    t_out=t(n);
    u_out=u;
    v_out=0;
    w_out=w;
    p_out=0;
    q_out=q(n);
    r_out=0;
    phi_out=0;
    theta_out=theta(n);
    psi_out=0;
   
    fprintf(motion_file,'%0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f\n',t_out,u_out,v_out,w_out,p_out,q_out,r_out,phi_out,theta_out,psi_out);
    
end

fclose(motion_file);

motion_file=fopen('yawing.motion','w');

for  n=1:length(t)
    
    v=V_ref*sin(-psi(n));
    w=0;
    u=sqrt(V_ref^2-v^2-w^2);
    
    t_out=t(n);
    u_out=u;
    v_out=v;
    w_out=w;
    p_out=0;
    q_out=0;
    r_out=r(n);
    phi_out=0;
    theta_out=0;
    psi_out=psi(n);
   
    fprintf(motion_file,'%0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f\n',t_out,u_out,v_out,w_out,p_out,q_out,r_out,phi_out,theta_out,psi_out);
    
end

fclose(motion_file);
```


# Symmetry

The APM solver supports symmetry solutions across the x-z plane. When using the symmetry option the solver calculates the influence coefficients 2x faster and requires 2x less memory. To enable the symmetry option, set the `symmetry` option to 1 in the **.conf** file. Note that any motion that you prescribe (if performing an unsteady simulation) must honour the x-z symmetry requirements. This means no velocity components in the y-direction or non-zero sideslip angle! The image below shows the comparison of the wake between symmetric and non-symmetric solutions.

<figure><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2Fhl1tYSjfEf6vqysZE50M%2Fsymmetric_solution_comparison.png?alt=media&amp;token=9ffcccc7-12a5-400f-a0e3-66f71aee146c" alt=""><figcaption><p>Symmetric and non-symmetric (not assuming) symmetry of a fixed-wing UAV.</p></figcaption></figure>


# Wake

The APM Solver has several options for controlling the wake. The `wake_alignement` option in the **.conf** file controls the alignment of the wake with respect to the trailing edge.&#x20;

* By default the `wake_alignement` option is set to 0.  The wake will be aligned with the freestream velocity vector at the trailing edge.
* If the `wake_alignement` option is set to 1 the wake will be aligned with the average trailing edge bisector. The average trailing edge bisector is calculated from the normal vectors of the trailing edge elements.
* If the `wake_alignement` option is set to 2 the wake will be positioned at a specific angle with respect to the $$x-y$$plane. The `wake_angle` option in the **.conf** file can be used to specify the angle. If you do not specify an angle a default value of 0 deg will be assumed.

{% hint style="info" %}
Use the average trailing angle bisector option for best results.
{% endhint %}

The images below show the wake of  a NACA4412 wing aligned with the freestream velocity vector and with the average trailing edge bisector.

![Wake aligned with the freestream flow](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVY4vTO44DtQhh2I-lQ%2F-MVY5Q7SENUXmv2CZTl_%2Fnaca4412_wake_alignment_1.png?alt=media\&token=18e6b897-686f-42a8-b074-e4c0e7c0f01b)

![Wake aligned with the average trailing edge bisector](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVY4vTO44DtQhh2I-lQ%2F-MVY5YIjrxCkbc4zN_gR%2Fnaca4412_wake_alignment_2.png?alt=media\&token=0608b4ee-6b7b-4f2c-ae64-81a8d6f956c0)


# Interaction with the body

As discussed before, the APM Solver solves for the potential flow around the body. Lift is modeled through the Kutta condition, which is imposed at trailing edges. The APM Preprocessor has the ability to find trailing edges automatically. For more information on how the APM Preprocessor finds trailing edges refer to the [preprocessor ](/user-guide/preprocessor)section. The built-in ability of the APM Preprocessor to find trailing edges works well for simple geometries like wings. For more complex geometries, the APM Preprocessor requires additional information to find the trailing edges. Examples of more complex geometries include:

* fixed-wing aircraft
* non-planar wings

If the geometry is complex the wake should be included in the mesh file. The image below shows an unstructured mesh with and without wake. Although the APM Solver can use either of the meshes to perform simulations, the mesh with a wake (left) will give better results. Why is that?

![Fixed-wing aircraft mesh with (left) and without (right) wake](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVkscBdI0yy7WE-3VUF%2F-MVkwVRjrfVJ35Naj00s%2Fcruiser_with_and_without_wake.png?alt=media\&token=769d5177-7d13-4e07-8629-212f3b9c1e02)

First, APM Preprocessor will check if the mesh file contains a wake. If the mesh file contains a wake, APM Preprocesssor will use a different algorithm to find trailing edges. The images below show the element types resulting from the two meshes after running the APM Preprocessor.

![Element types for the mesh with (left) and without (right) wake](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVkscBdI0yy7WE-3VUF%2F-MVkxKEfIqDgLKR-oPHY%2Fcruiser_with_and_without_wake_types.png?alt=media\&token=1e2499a0-5005-454d-acea-c70a71675df8)

Notice that the mesh containing a wake features elements of type 4 and 5 across the body. These elements propagate the discontinuity in the perturbation (doublet) potential, caused by the wing trailing edge, across the body. No elements of type 4 or 5 are present for the mesh without wake. The images below show the perturbation (doublet) potential solution on both meshes.&#x20;

![Perturbation (doublet) potential for the mesh with (left) and without (right) wake](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVlL4VInh4X-YDYJsXP%2F-MVlLGfDzJf4YSVcq-SW%2Fcruiser_with_and_without_wake_mu.png?alt=media\&token=96fd41ae-178e-4076-8516-66c5d71aaee1)

For the mesh with wake the discontinuity in the perturbation (doublet) potential caused by the wing trailing edge propagates across the body (blue-red regions). For the mesh without wake the discontinuity is smeared (i.e. it does not propagate across the body, there are no well-defined blue and red regions). Since the pressure coefficient is determined from the gradient of the perturbation (doublet) potential, the smeared discontinuity will result in nonphyscial pressure coefficients. The image below (right) shows regions (blue) of nonphysical pressure coefficients.

![Pressure coefficient for the mesh with (left) and without (right) wake](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVlLMu107_XM0Eh-zDK%2F-MVlLT75sI4Bq5zqWOT0%2Fcruiser_with_and_without_wake_cp.png?alt=media\&token=3d28d5ab-d8f2-4bf6-b0cb-3b78d88c9e30)

{% hint style="info" %}
Always include a wake in the mesh if you are simulating complex geometries, i.e. fixed-wing aircraft, non-planar wings and etc.
{% endhint %}

## Interactions with downstream body parts

Consider the following Cessna 210 model. The image below shows the element types.&#x20;

![Cessna 210 element types](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVY6Lv9J_IkpexM-Emr%2F-MVY6PknJ9uzTvwFj-78%2Fcessna210_types.png?alt=media\&token=c58bef3a-5eaa-4fb6-9b50-aa50ea7dbab9)

As discussed previously, in order to capture the discontinuity in the potential, the wake from the main wing must propagate across the body. Due to the potential formulation of the APM Solver a steady simulation of the Cessna 210 is not going to be possible as the wake will intersect the vertical tail downstream. The intersection of the wake with the vertical tail would result in a nonphysical solution. <br>

During unsteady simulations the APM Solver treats older (downstream) wake elements as velocity influence rather than potential influence. This allows older (downstream) wake elements to intersect the vertical tail without causing nonphysical solution.&#x20;

![Unsteady simulation of Cessna 210](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVY6TTnVCaGuLX3eeR6%2F-MVY6VqLWdqwYNVzjzlE%2Fcessna210_types_with_wake.png?alt=media\&token=a7e86562-9ace-40dc-afcc-fa0fafddd059)

The image above shows that the first row of wake elements extends half a chord behind the main wing trailing edge. Since downstream wake rows (second, third, etc.) are treated as velocity influence by the APM solver they can intersect the tail.&#x20;


# Viscous vortex particle wake

{% hint style="warning" %}
The viscous vortex particle wake is currently in development. It may be available in a future release of the APM Solver, if it passes all tests successfully.&#x20;
{% endhint %}

Currently, the APM Solver uses doublet panels to model the wake. The doublet panel wake does not model the effect of viscous diffusion. However, the effect of viscous diffusion can be modelled by a vortex particle wake.

Two rows of wake panels are used to couple the vortex particle wake to the unsteady panel method. The first row of panels satisfies the Kutta condition at the trailing edge, and the second row of panels is transformed to vortex particles. The second row is referred to as "buffer". The buffer row enables the coupling of the unsteady panel method and the vortex particle wake. After the buffer panels, the wake vorticity field is modelled by the vortex particles. The particles are obtained by equating each buffer panel to a vortex particle using the Hess equivalence principle. The image below shows a schematic of the buffer panels and their conversion to vortex particles.

![Conversion of wake panels to vortex particles](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MhU_tCTSj3raclMRFO7%2F-MhUhQM0n5k8B0De11o6%2Fvortex_particle_wake_definition.png?alt=media\&token=e88b6d47-7975-4891-9f24-9c66ff25428c)

The image below shows a simulation of the NACA4412 wing using a vortex particle wake.

![Simulation of a NACA4412 wing using vortex particle wake](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MhTX5yB98F09Dh6Vu9g%2F-MhTYIraj2wSUkEmbJFE%2Fnaca4412_wing_vortex_particle_wake_representation.png?alt=media\&token=233ce4f1-dd28-4a67-9eb6-62d651e50630)

{% embed url="<https://youtu.be/58pXSrcmdiQ>" %}
Vortex particle wake development for a NACA 4412 wing
{% endembed %}

{% embed url="<https://youtu.be/Xy3a95MqEIo>" %}
Vortex particle wake for the NREL Phase IV wind turbine
{% endembed %}


# Output files

The APM Solver and Preprocessor can output files in **.csv**, **.vtu**, and **.dat** file formats. The **.csv** files can be opened with any text editor or data processing software such as [MATLAB](https://www.mathworks.com/products/matlab.html) or [RStudio](https://rstudio.com/). The **.vtu** files are specific to [ParaView](https://www.paraview.org/). ParaView is an open-source, multi-platform data analysis and visualization application which can be downloaded from <https://www.paraview.org/download/>. The **.dat** files are specific to [Tecplot](https://www.tecplot.com/). Tecplot is the name of a family of visualization & analysis software tools developed by Tecplot, Inc.&#x20;

To enable or disable ParaView or Tecplot output change the `paraview_output` and `tecplot_output` options in the **.conf** file.

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MWGzBjDxqGl-8KemGqK%2F-MWGzl2rabRTFvnEzpbh%2Fvisualisation_software.png?alt=media\&token=fb6e0dd8-2e93-4aaa-a7fb-1c30dda2d137)

## Output file descriptions

| File                                                             | Description                                                                                                                                                                                                                |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>\<name>\_body\_panels.vtu</p><p>\<name>\_body\_panels.dat</p> | Files in **.vtu**, or **.dat** file formats which contain the source strengths, doublet strengths, reference velocities, relative velocities and the pressure coefficient of the body elements. Created by the APM Solver. |
| <p>\<name>\_wake\_panels.vtu</p><p>\<name>\_wake\_panels.dat</p> | Files in **.vtu**, or **.dat** file formats which contain the doublet strengths of the wake elements. Created by the APM Solver.                                                                                           |
| \<name>.loads                                                    | File in space delimited file format which contains the integrated loads of the body. Created by the APM Solver.                                                                                                            |
| \<name>.mdl                                                      | File in space delimited file format which contains the element types, vertices, and neighbours. Created by the APM preprocessor and used by the APM Solver.                                                                |
| \<name>.checkpoint                                               | File in binary file format which contains the latest solution. Created by the APM Solver.                                                                                                                                  |

The structure of an example **.loads** file is shown below:

```
Timestep Time CFx CFy CFz CMx CMy CMz CL CD CC
0 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000
1 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000
2 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000
3 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000
...
```


# Sphere

Example simulation of a sphere

The analytical solution for the potential flow around a sphere of radius $$R=1$$m and a uniform flow of $$|\mathbf{V}\_{ref}|=1$$ m/s is known. The perturbation (or doublet) potential is given by:

$$
\phi=|\mathbf{V}\_{ref}|cos(\theta)\frac{R^3}{2r^2}\text{,}
$$

where $$\phi$$ is the perturbation (or doublet) potential, $$R$$ is the radius of the sphere, $$r$$is the distance from the sphere centre to any point of interest on its surface, $$|\mathbf{V}\_{ref}|$$is the freestream velocity magnitude, and $$\theta$$is the angle between the $$x$$-axis and the projection of $$r$$on the $$x-z$$plane. An unstructured mesh of 532 elements is used. The image below shows the sphere pressure coefficient.

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mh5GMP2mcFZe3xr5490%2F-Mh5LXKHzUdRlOA43q-D%2Fsphere_cp.png?alt=media\&token=a5137dc8-d339-41e9-966b-030fdb645e27)

The images below compare the perturbation potential, the total potential, and the pressure coefficient with the analytical solution.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FA5asdC0ElxzBrS3BpYWJ%2Fsphere_streamwise_mu.png?alt=media&amp;token=b2712c79-a609-4fae-beca-9ce1dcffc593" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FvjgTUByPSoU7cZa73u08%2Fsphere_streamwise_phi.png?alt=media&amp;token=393ad521-987b-4e6c-9be0-4eaea2c60dfa" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FDWS1VvDP3CxZgorgzCCI%2Fsphere_streamwise_cp.png?alt=media&amp;token=da86de37-8a84-4401-b2e0-2e6e18d9196c" alt="" data-size="original">&#x20;

Good agreement between the simulation and the analytical solution is observed.

## Files

{% file src="/files/-MgbFgz2niNK6rIJuiBs" %}

## References


# Ellipsoid

Example simulation of an ellipsoid

An ellipsoid with dimensions (semiaxes) $$L\_{x}=2a=8$$m, $$L\_{y}=2b=4$$m, $$L\_{z}=2c=2$$m at an angle of attack of $$\alpha=15$$deg and sideslip angle of $$\beta=10$$deg is considered. The magnitude of the freestream velocity is $$|\mathbf{V}\_{ref}|=1$$m/s. An unstructured mesh of 14924 elements is used. Similarly to the sphere, an analytical solution for the perturbation and total potential around the ellipsoid exists \[1]. The perturbation (doublet) potential is given by:

$$
\phi = \phi\_{x} + \phi\_{y} +\phi\_{z} = xuabc\frac{\alpha\_{\lambda}}{2-\alpha\_{\lambda}} +
yvabc\frac{\beta\_{\lambda}}{2-\beta\_{\lambda}} + zwabc\frac{\gamma\_{\lambda}}{2-\gamma\_{\lambda}}\text{,}
$$

where $$\alpha{\lambda}$$, $$\beta{\lambda}$$ and $$\gamma\_{\lambda}$$ are integrals given by:

$$
\alpha\_{\lambda}=\int\_{\lambda}^{\infty}
\frac{d\lambda}{(a^2+\lambda)\sqrt{(a^2+\lambda)(b^2+\lambda)(c^2+\lambda)}}\\
\beta\_{\lambda}=\int\_{\lambda}^{\infty}
\frac{d\lambda}{(b^2+\lambda)\sqrt{(a^2+\lambda)(b^2+\lambda)(c^2+\lambda)}}\               \gamma\_{\lambda}=\int\_{\lambda}^{\infty}
\frac{d\lambda}{(c^2+\lambda)\sqrt{(a^2+\lambda)(b^2+\lambda)(c^2+\lambda)}}\text{.}
$$

The solution of the $$\alpha{\lambda}$$, $$\beta{\lambda}$$ and $$\gamma{\lambda}$$ integrals is obtained with the aid of the incomplete elliptic integrals as explained in \[2,4]. When the potential is evaluated at the surface of the ellipsoid $$\lambda$$ is set to 0. Numerical values of the incomplete elliptic integrals, along with values of the $$\alpha{\lambda}$$, $$\beta{\lambda}$$, $$\gamma{\lambda}$$ integrals for any combinations of $$a$$, $$b$$, and $$c$$ are given in \[3]. The total potential is given by:

$$
\Phi = \Phi\_{x} + \Phi\_{y} + \Phi\_{z} = (\phi\_{x} + xu) + (\phi\_{y} + yv) + (\phi\_{z} + zw)\text{,}
$$

where $$\Phi$$ is the total potential, $$\phi$$is the perturbation (doublet) potential, $$a$$,$$b$$, and $$c$$ are the semiaxes of the ellipsoid,$$x$$, $$y$$, and $$z$$ are the centroid coordinates of an element on the ellipsoid surface, $$u$$,$$v$$,and $$w$$ are velocity components relative to the ellipsoid. The image blow shows the ellipsoid pressure coefficient.

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mh5CLnhy5-cutrZvbQQ%2F-Mh5DZSyv-25wAafKJ5x%2Fellipsoid_cp.png?alt=media\&token=e7137d99-ed62-4b69-b785-7bdff7c48a28)

The images below compare the perturbation potential and the total potential with the analytical solution.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FeGDsv50dHufv8cf4tTHl%2Fellipsoid_spanwise_mu.png?alt=media&amp;token=8a01670b-a241-486c-86bc-4f69864ff7ee" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FiEZNj028vCGOAEeSrsjh%2Fellipsoid_spanwise_phi.png?alt=media&amp;token=3025f7da-09ec-4b9f-a575-8f76eca7d479" alt="" data-size="original">&#x20;

As there is no analytical solution for the pressure coefficient at $$\alpha=15$$deg and $$\beta=10$$deg, the analytical solution for the pressure coefficient at $$\alpha=\beta=0$$deg is compared to the one from a simulation at the same conditions.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FPcwdp1oBKoJk6KWXyEcI%2Fellipsoid_spanwise_cp1.png?alt=media&amp;token=4e888dac-8820-4c55-b8c6-ab5241bc9de5" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2F3rl1wP3F3avihkFaMyYG%2Fellipsoid_spanwise_cp2.png?alt=media&amp;token=7272aeb5-8105-4676-9026-a57bc76a4e5e" alt="" data-size="original">&#x20;

Good agreement between the simulation and the analytical solution is observed.

## Files

{% file src="/files/-MgbFgyzWrOrV5s0RXOH" %}

## References

\[1] Craig, T., "On the Motion of an Ellipsoid in a Fluid", American Journal of Mathematics, Vol.2, No.3, 1879, pp. 260-279\
\[2] Byrd, P.F., "Handbook of Elliptic Integrals for Engineers and Scientists", Springer-Verlag, 1971, pp. 1-7, pp. 8-41\
\[3] Jones, R.T., "Classical Aerodynamic Theory", University Press of the Pacific, 2005\
\[4] Viana, F. and Fuanda, T. and Joseph, D.D. and Tashiro, N. and Sonoda, Y. "Potential flow of a second-order fluid over a tri-axial ellipsoid", J. Appl. Math., Vol.4, 2005, pp. 341-364


# NACA4412 wing

Example simulation of a wing

A rectangular wing of aspect ratio $$AR=6$$ with a NACA4412 airfoil is considered. Experiments of such wing were performed by R.M. Pinkerton \[1] at different angles of attack. A structured mesh consisting of 1680 elements is used. The mesh is scaled so that the chord of the wing is $$c\_{ref}=1$$m and the span $$b\_{ref}=6$$m. The freestream velocity is set to $$|\mathbf{V}\_{ref}|=1$$m/s. The image below shows the pressure coefficient distribution.

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mh5BaGYlgZt9nFGCrqh%2F-Mh5CHx_ASQfTlxhayB2%2Fnaca4412_wing_cp.png?alt=media\&token=e9bb7ab9-a3da-4265-ab3b-ef92766adda8)

The image below shows the pressure coefficient at $$y/b=0$$ for angle of attack $$\alpha=0$$deg. The experimental results from Pinkerton \[1] are shown for comparison.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FBiPHZX1sOE9v9cIaXs52%2Fnaca4412_spanwise_cp.png?alt=media&amp;token=224ef3a9-cfc2-482e-82b2-f849e4339494" alt="" data-size="original">&#x20;

Good agreement between the simulation and the experimental results is observed.

## Vortex particle wake

The image below compares a doublet wake and a vortex particle wake. The freestream velocity is  $$|\mathbf{V}\_{ref}|=1$$m/s and the angle of attack is 0 deg. The Rosenhead-Moore and the Gaussian kernels were used to regularize the vortex particles.

<figure><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FUb81HXKrH7aWTWFYuSlx%2Fnaca4412_wing_wake_comparison.png?alt=media&amp;token=2e0293f7-04ed-437d-a54e-90c515271851" alt=""><figcaption></figcaption></figure>

<figure><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FFtr2qWSboLmCTRx94cys%2Fnaca4412_wing_CLCD_comparison.png?alt=media&amp;token=30627760-c949-403a-8a61-5f48697249b2" alt=""><figcaption></figcaption></figure>

As observed from the integrated loads the CL and CD compare favourably between the doublet and the vortex particle wake. The solution is not sensitive to the choice of a regularization kernel.

## Files

{% file src="/files/-MgbFgz1ii0Spt8\_083l" %}

## References

\[1] Pinkerton, R. M. "Calculated and measured pressure distributions over the midspan section of the N.A.C.A 4412 airfoil", 1936


# NACA0015 wing

Example simulation of a wing

A rectangular wing of aspect ratio $$AR=6.576$$ with a NACA0015 airfoil is considered. Experiments of such wing were performed by McAlister and Takahashi \[1] at an angle of attack $$\alpha=12$$deg and Reynolds number $$Re=2.5\times10^6$$. A structured grid with 1680 elements is used. The grid is scaled so that the chord of the wing is $$c\_{ref}=1$$m and the span $$b\_{ref}=6.576$$m. The freestream velocity is set to $$|\mathbf{V}\_{ref}|=1$$m/s. The image below shows the pressure coefficient distribution.

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mh5A9-0BgU4nMJvUUiz%2F-Mh5BRcffEXHQlWmCukM%2Fnaca0015_wing_cp.png?alt=media\&token=ae2f4586-1374-4d91-b095-199ccbddf23e)

The images below show the pressure coefficient at $$y/2b=0.3091$$, $$y/2b=0.7825$$, and $$y/2b=1.2166$$. The experimental results from McAlister and Takahashi \[1] are shown for comparison.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FoC5BAONFCTkk1ChTfwTC%2Fnaca0015_wing_spanwise_cp1.png?alt=media&amp;token=63c9bc61-c7c5-4815-9b05-4d80ef3bc573" alt="" data-size="original"><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FizH95QUJAizBQGcBqrMh%2Fnaca0015_wing_spanwise_cp2.png?alt=media&amp;token=205cc28e-32c6-41f8-8b4f-5931a60814bc" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FPUPIWB8oCpajWgKMViKu%2Fnaca0015_wing_spanwise_cp3.png?alt=media&amp;token=468af5f8-9b07-4e32-9f1b-eeb95dcb3882" alt="" data-size="original">&#x20;

Good agreement between the simulation and the experimental results is observed.

## Files

{% file src="/files/-MgbFgz0cKJZ5jUDS\_oA" %}

## References

\[1] McAlister, K.W. and Takahashi, R.K., "NACA 0015 Wing Pressure and Trailing Vortex Measurements", 1991


# Caradonna-Tung rotor in hover

Example simulation of a rotor in hover

A simulation of rotor in hover is considered. The rotor has two untwisted, untapered, rectangular blades with a NACA0012 airfoil. The rotor radius is $$R=1.143$$m and the aspect ratio is $$AR=6$$. The rotor has a collective pitch of $$\theta=8$$deg, and is rotating at $$\omega=1250$$rpm, corresponding to a tip Mach number of $$M\_{tip}=0.439$$. A structured mesh with 40 panels in the chordwise and 20 panels in the spanwise direction (for each blade) is used. The mesh is scaled so that the chord of the rotor blades $$c\_{ref}$$equals 1 and the span $$b\_{ref}$$equals 6. The resulting rotational velocity is then adjusted to $$\omega=24.9364$$rad/s. The results are obtained with an azimuthal step of $$\Delta\phi\approx7.14$$deg ($$\Delta t=5\times10^{-3}$$s) for 10 revolutions. From $$t=0$$s to $$t=0.1$$s the rotational velocity is increased gradually from $$\omega=1.2468$$rad/s to $$\omega=24.9364$$rad/s. The gradual increase of the rotational velocity allows the wake to develop without numerical instabilities. The image below shows the pressure coefficient distribution and the developed wake.

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mgv2l2qBMCPIvzJ_qBO%2F-Mgv32yVA-YZBJrtKZnV%2Fcaradonna_tung_cp.png?alt=media\&token=2a085bb4-7e4b-41da-81ed-ad57b4bc0193)

The animation below shows the development of the wake.

{% embed url="<https://youtu.be/k0aoCdwtnq4>" %}
Caradonna-Tung rotor wake development
{% endembed %}

The images below show the pressure coefficient at $$r/R=0.68$$ and $$r/R=0.96$$. The experimental results from Caradonna and Tung \[1] are shown for comparison.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FE08SQvlLFLdHOki94lfz%2Fcaradonna_tung_rotor_spanwise_cp1.png?alt=media&amp;token=6757b597-892c-46b7-88fa-8bb7c9bb1b97" alt="" data-size="original"><img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FMum1DaOzyujwOmQpzFZB%2Fcaradonna_tung_rotor_spanwise_cp2.png?alt=media&amp;token=b3cab3dd-93b4-4953-b986-749293894899" alt="" data-size="original">&#x20;

Overall, good agreement between the simulation and the experimental results is observed.

## Files

{% file src="/files/YkqFDxmHJBmYDW6U6qcX" %}

## References

\[1] Caradonna, F.X. and Tung, C., "Experimental and Analytical Studies of a Model Helicopter Rotor in Hover", NASA Technical Memorandum 81232, 1981


# NREL Phase IV wind turbine

Example simulation of a wind turbine

The NREL Phase IV wind turbine has two blades with NREL S809 airfoil featuring non-linear twist and linear taper. The turbine radius is $$R=5.029$$m and the aspect ratio is $$AR=6$$. This case considers the turbine with a collective pitch of $$\theta=5$$deg, rotating at $$\omega=71.9$$rpm, at a freestream velocity of $$|\mathbf{V}\_{ref}|=7$$m/s. A structured mesh with 15 elements in the chordwise and 32 elements in the spanwise direction (for each blade) is used. The results are obtained with an azimuthal step of $$\Delta\theta=6$$deg ($$\Delta t=0.0139$$s) for 3 revolutions. The image below shows the pressure coefficient distribution.

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mh5ETUb2yQoZXA0aBXT%2F-Mh5F8jU-Pxe6Sf-WBcj%2Fnrel_wind_turbine_cp.png?alt=media\&token=d331ed80-bf2d-428a-a421-c0ef5a3afa6c)

The animation below shows the development of the wake.

{% embed url="<https://youtu.be/2BuFYhOvbjc>" %}
NREL Phase IV wind turbine wake development
{% endembed %}

The images below show the pressure coefficient at $$r/R=0.47$$. The experimental results from Hand et al. \[1] are shown for comparison.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FmSVOs0SAfnvkzhUjo5dY%2Fnrel_rR0470.png?alt=media&amp;token=9cae3e89-5168-443b-abb6-a96d6d75af06" alt="" data-size="original">&#x20;

## Files

{% file src="/files/-MgbQkB6x5Op\_Ml9Elai" %}

## References

\[1] Hand, M. and Simms, D., “Unsteady aerodynamic experiment phase VI: wind tunnel test configurations and available data campaigns,” NREL Technical Report TP-500-29955, 2001


# AGARD-AR-303 E6

Example simulation of a fixed-wing configuration

An axisymmetric nacelle mounted in the centre of a wing with a span of $$b\_{ref}=2$$m and a chord of $$c\_{ref}=0.5$$m with a NACA63(10)A-012 airfoil is considered. Experiments of such configuration were performed by Samuelsson \[1] at an angle of attack $$\alpha=0$$deg and Reynolds number of $$Re=1.14\times10^6$$ based on the length of the nacelle. An unstructured grid with 19024 elements is used. The images below show the mesh and the pressure coefficient distribution.&#x20;

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mh59QwVEOGQ9DJquO55%2F-Mh59_i8n8QUwf2nYz4m%2Fagard_mesh.png?alt=media\&token=abdfa6d9-e19c-4d31-8af1-bcda25d39390)

![](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-Mh59QwVEOGQ9DJquO55%2F-Mh59_i7chBeQfjC6nsv%2Fagard_cp.png?alt=media\&token=6a8f9bab-82aa-42a1-a9d5-9d958e4a658a)

The images below show the pressure coefficient at$$y=-0.13$$m, $$y=-0.26$$m, and$$y=-0.34$$m. The experimental results from Samuelsson \[1] are shown for comparison.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FTB47uZmqTQzLW2KxQU1D%2Fagard_spanwise_cp3.png?alt=media&amp;token=a47a524c-f4a8-4062-b1ea-6e9d6a5aeffe" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FZt7Tp7b600PV3ryI4aWl%2Fagard_spanwise_cp2.png?alt=media&amp;token=3c0c6b34-eee3-4636-b5fe-c5d8aae591f1" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2F6Izb2sXnI8VK06jBAyKz%2Fagard_spanwise_cp1.png?alt=media&amp;token=af297672-55ea-44a1-905a-3f5fe31d8906" alt="" data-size="original">&#x20;

## Files

{% file src="/files/-MgbFgyytNqYbF6SdTrZ" %}

## References

\[1] Samuelsson, I. "Experimental Investigation of Low Speed Model Propeller Slipstream Aerodynamic Characteristics Including Flow Field Surveys and Nacelle/Wing Static Pressure Measurements", 1990


# Wing-tail configuration

Example simulation of a fixed-wing configuration

The wing-tail configuration has a wing aspect ratio $$AR=10$$, wing area $$S\_{ref}=0.3$$m$$^2$$, wing chord $$c\_{ref}=0.1732$$m. Both the wing and the tail have a taper ratio of 1. The distance between the quarter-chord points of the wing and the tail is $$l=0.56$$m. A body-fixed coordinate system is placed at the wing quarter-chord point. The reference speed is $$|\mathbf{V}\_{ref}|=25$$m/s and the reference density, pressure, and viscosity are evaluated at an altitude of $$h=0$$m (ISA). An unstructured mesh with 6354 panels is used. The image below shows the pressure coefficient of the wing-tail configuration at an angle of attack $$\alpha=5$$deg.

![Wing-tail configuration pressure coefficient ](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVfb2THhjc8DbQE2_tT%2F-MVfbklO0WszKasUf74a%2Fwing_tail_cp.png?alt=media\&token=5a75f9a8-65ea-4a12-9ce6-6494ad37449e)

The lift, drag and pitching moment coefficients of the wing-tail configuration are assumed to be given by:

$$
C\_{X}=C\_{X0}+C\_{X,\alpha}\alpha+C\_{X,\bar{q}}\bar{q}+C\_{X,\delta\_{e}}\delta\_{e}\ C\_{Z}=C\_{Z0}+C\_{Z,\alpha}\alpha+C\_{Z,\bar{q}}\bar{q}+C\_{Z,\delta\_{e}}\delta\_{e}\C\_{m}=C\_{m0}+C\_{m,\alpha}\alpha+C\_{m,\bar{q}}\bar{q}+C\_{m,\delta\_{e}}\delta\_{e} \text{,}
$$

where $$\bar{q}=\frac{qc\_{ref}}{2V\_{ref}}$$ is the normalised pitch rate. The $$C\_{X}$$, $$C\_{Z}$$, and $$C\_{m}$$ are functions of the the angle of attack $$\alpha$$, the normalised pitch rate $$\bar{q}$$ and the elevator deflection angle $$\delta\_{e}$$. The aim is to obtain the $$C\_{X0}$$, $$C\_{Z0}$$, and $$C\_{m0}$$ coefficients and the $$C\_{X,\alpha}$$, $$C\_{X,\bar{q}}$$ , $$C\_{X,\delta\_{e}}$$, $$C\_{Z,\alpha}$$, $$C\_{Z,\bar{q}}$$, $$C\_{Z,\delta{e}}$$, $$C\_{m,\alpha}$$, $$C\_{m,\bar{q}}$$, and $$C\_{m,\delta\_{e}}$$ derivatives using APM.

## Obtaining the 0-coefficients

A simulation of the wing-tail configuration is performed at $$\alpha=0$$ rad, $$p=0$$ rad/s, $$\delta\_{e}=0$$ rad. The values for the aerodynamic coefficients are recorded. They are the values of the $$0$$- coefficients.

## Obtaining the angle of attack and elevator deflection derivatives

As already discussed, a simulation of the wing-tail configuration is performed at $$\alpha=0$$rad, $$p=0$$ rad/s, $$\delta\_{e}=0$$rad. The values for the aerodynamic coefficients are recorded. A second simulation of the wing-tail configuration is performed at $$\alpha=0.1$$ rad, $$p=0$$rad/s, $$\delta\_{e}=0$$ rad. The choice of value for $$\alpha$$ is arbitrary. Again the aerodynamic coefficients are recorded. To obtain the $$\alpha$$- derivatives a simple difference is used:

$$
C\_{Z,\alpha}=\frac{C\_{Z}\rvert\_{\alpha=0.1}-C\_{Z}\rvert\_{\alpha=0}}{\Delta\alpha}\text{,}
$$

where $$\Delta\alpha=0.1$$rad. The same method is used to obtain the $$\delta\_{e}$$- derivatives.

## Obtaining the pitch rate derivatives

The coordinate system used for the analysis above is fixed to the wing quarter-chord point however, this point does not coincide with the centre of gravity. If one determines the $$\bar{q}$$- derivatives with respect to this coordinate system they will not be representative of the $$\bar{q}$$- derivatives with respect to the centre of gravity. To determine the position of the centre of gravity (often driven by a required static margin), the neutral point position must be found. By definition, the stick-fixed neutral point position is where:

$$
C\_{m,\alpha}=0\text{.}
$$

Using the difference method described above, the value of $$C\_{m,\alpha}$$ is obtained for two different locations of the centre of gravity. The first location is when the centre of gravity coincides with the quarter-chord point of the wing $$x\_{cg}=0$$m and the second location is selected forward of the quarter-chord point of the wing $$x\_{cg}=0.05$$m. The choice of value for $$x\_{cg}$$ is arbitrary. The equation for $$C\_{m,\alpha}$$ as a function of $$x\_{cg}$$ is then:

$$
C\_{m,\alpha}=ax\_{cg}+b\\
-2.0012=a0+b \\
-3.5526=a0.05+b \\
a=-31.028 \\
b=-2.0012 \text{.}
$$

The solution of the equation gives $$x\_{cg}=-0.0645$$, for $$C\_{m,\alpha}=0$$. This is the location of the stick-fixed neutral point, $$x\_{np}$$, ($$x\_{np}$$=$$x\_{cg}$$ for $$C\_{m,\alpha}=0$$). The centre of gravity location for a 15% static margin is then given by:

$$
SM=0.15=\frac{x\_{cg}-x\_{np}}{c\_{ref}}\\
x\_{cg}\rvert\_{SM=0.1}=x\_{np}+0.15c\_{ref} \text{,}
$$

with $$x\_{cg}=-0.03852$$m. The $$\bar{q}$$- derivatives can now be obtained with respect to this point. A forced sinusoidal motion is imposed on the wing-tail combination:

$$
\alpha=Asin(\omega t) \\
\omega=2\pi f\text{,}
$$

where $$A=5$$deg is the amplitude of the motion and $$f=5$$Hz is the frequency of the motion. The video below shows the development of the wing-tail configuration wake during the forced sinusoidal motion.

{% embed url="<https://youtu.be/tG5peRcG96U>" %}
Wing-tail configuration wake development
{% endembed %}

The values of $$C\_{m}$$ with respect to $$\alpha$$ make a quasi-steady elliptical hysteresis. Two points exist at which the angular velocity is maximum or minimum. $$C\_{m,\bar{q}}$$ derivative is estimated from the values of the $$C\_{m}$$ at these points

$$
C\_{m,\bar{q}}=\frac{C\_{m}\rvert\_{q\_{max}}-C\_{m}\rvert\_{q\_{min}}}{2kA},\\
k=\frac{\omega c\_{ref}}{2V\_{ref}}\text{,}
$$

where $$k$$ is the reduced frequency. The same method is used to obtain the other $$\bar{q}$$- derivatives. Below are the wing-tail configuration derivatives estimated by the method.

|            | $$\_{0}$$ | $$\frac{\partial}{\partial \alpha}$$ | $$\frac{\partial}{\partial \bar{q}}$$ | $$\frac{\partial}{\partial \delta\_{e}}$$ |
| ---------- | --------- | ------------------------------------ | ------------------------------------- | ----------------------------------------- |
| $$C\_{X}$$ | -0.0114   | 0.2555                               | -0.2491                               | -0.0195                                   |
| $$C\_{Z}$$ | -0.3219   | -5.1439                              | 2.7170                                | -0.8377                                   |
| $$C\_{m}$$ | 0.0556    | -0.9575                              | -20.0581                              | -2.3205                                   |

## Files

{% file src="/files/yJfa7QnBRkawvL7jZX84" %}


# Fixed-wing UAV

Example simulation of a fixed-wing configuration

The fixed-wing UAV has a wing aspect ratio $$AR=12$$, wing area $$S\_{ref}=0.7729$$m$$^2$$, wing chord $$c\_{ref}=0.2544$$m, and wing span $$b\_{ref}=3.0381$$m. Both the wing and the tail have a taper ratio of 1. A body-fixed coordinate system is placed at the nose. The reference speed is $$|\mathbf{V}\_{ref}|=25$$m/s and the reference density, pressure and viscosity are evaluated at an altitude of $$h=0$$m (ISA). An unstructured mesh of 24674 elements was used. The figures below show the pressure coefficient, the mesh, the panel types, and the doublet potential.

![Fixed-wing UAV pressure coefficient](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVfe2TLWTOIkOGQn2sK%2F-MVffMtua_FgSs-bPVZb%2Ffixed_wing_uav_cp.png?alt=media\&token=97c52a7b-ec66-44a2-ad0e-49b8de724e69)

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVffqDcvIfApZRS9t5W%2F-MVffzFNoRLI7RgvSaeJ%2Ffixed_wing_uav_mesh.png?alt=media&amp;token=e018bc0a-75d3-4ee9-891a-9aec2a556193" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVffqDcvIfApZRS9t5W%2F-MVfg3DkvSGoYs39cxpZ%2Ffixed_wing_uav_types.png?alt=media&amp;token=64ad7684-8381-4cc7-a9ba-71f076ba3feb" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVffqDcvIfApZRS9t5W%2F-MVfg6LihfM9lqIx4UDt%2Ffixed_wing_uav_mu.png?alt=media&amp;token=dc7e2461-1c4c-4910-9658-812e3e019710" alt="" data-size="original">&#x20;

The pitching moment coefficient of the Cruiser UAV is assumed to be given by:

$$
C\_{m}=C\_{m0}+\frac{x\_{cg}}{c\_{ref}}C\_{Z}\text{,}
$$

where $$x\_{cg}$$ is the distance measured along the x-axis. Once the pitching moment coefficient at the origin of the coordinate system $$C\_{m0}$$ and the Z-force coefficient $$C\_{Z}$$are known from the solution, the pitching moment coefficient $$C\_{m}$$ about an arbitrary point forward or aft of the origin of the coordinate system (along the x-axis) can be obtained. If $$C\_ {m0}$$ and $$C\_{Z}$$ are available at two different angles of attack the neutral point location can be found ($$C\_{m,\alpha}=0$$). The neutral point is the location of the centre of gravity for which a change in the angle of attack does not create a restoring (negative, nose-down) pitching moment.

$$
C\_{m}\rvert\_{\alpha=0}=C\_{m0}\rvert\_{\alpha=0}+\frac{x\_{cg}}{c\_{ref}}C\_{Z}\rvert\_{\alpha=0}\\
C\_{m}\rvert\_{\alpha=5}=C\_{m0}\rvert\_{\alpha=5}+\frac{x\_{cg}}{c\_{ref}}C\_{Z}\rvert\_{\alpha=5}\\
\frac{\partial C\_{m}}{\partial\alpha}=C\_{m,\alpha}=\frac{C\_{m}\rvert\_{\alpha=5}-C\_{m}\rvert\_{\alpha=0}}{\Delta\alpha}=0\text{.}
$$

When the first two equations are substituted in the third, the following expression is obtained for the location of the neutral point $$x\_{cg}$$:

$$
x\_{cg}=-c\_{ref}\frac{C\_{m0}\rvert\_{\alpha=5}-C\_{m0}\rvert\_{\alpha=0}}{C\_{Z}\rvert\_{\alpha=5}-C\_{Z}\rvert\_{\alpha=0}}
$$

For the fixed-wing UAV the location of the neutral point is $$x\_{cg}=-0.5504$$m. The negative sign means that the point is aft of the nose. For a static margin of 10% the centre of gravity location must be $$x\_{cg}=-0.5250$$m. The table below lists the stability derivatives for the fixed-wing UAV evaluated for the center of gravity at $$\vec{r}\_{cg}={-0.5250,0,0}^{T}$$m.

|            | $$\_0$$ | $$\frac{\partial }{\partial\alpha}$$ | $$\frac{\partial }{\partial\beta}$$ | $$\frac{\partial }{\partial\delta\_{a}}$$ | $$\frac{\partial }{\partial\delta\_{e}}$$ | $$\frac{\partial }{\partial\delta\_{r}}$$ | $$\frac{\partial }{\partial\bar{p}}$$ | $$\frac{\partial }{\partial\bar{q}}$$ | $$\frac{\partial }{\partial\bar{r}}$$ |
| ---------- | :-----: | :----------------------------------: | :---------------------------------: | :---------------------------------------: | :---------------------------------------: | :---------------------------------------: | :-----------------------------------: | :-----------------------------------: | :-----------------------------------: |
| $$C\_{X}$$ | -0.0273 |                0.6584                |                0.0151               |                  -0.0114                  |                  -0.0138                  |                  -0.0130                  |                                       |                -0.0850                |                                       |
| $$C\_{Y}$$ |         |                                      |               -0.3221               |                   0.0192                  |                                           |                   0.3318                  |                -0.0864                |                                       |                 0.3365                |
| $$C\_{Z}$$ | -0.3755 |                -5.7537               |                0.0426               |                   0.0042                  |                  -0.5479                  |                   0.0015                  |                                       |                11.1781                |                                       |
| $$C\_{l}$$ |         |                                      |             **-0.0801**             |                   0.2597                  |                                           |                   0.0478                  |                -0.5984                |                                       |                 0.1487                |
| $$C\_{m}$$ |  0.0384 |              **-0.5750**             |                0.0639               |                                           |                  -2.8199                  |                   0.0176                  |                                       |                -34.9704               |                                       |
| $$C\_{n}$$ |         |                                      |              **0.1199**             |                  -0.0091                  |                                           |                  -0.1504                  |                -0.0172                |                                       |                -0.1413                |

The deflections of the ailerons $$\delta\_{a}$$, elevator $$\delta\_{e}$$ and rudder $$\delta\_{r}$$ follow positive conventions. Port aileron down is positive, elevator down is positive, rudder to port is positive. The value for $$C\_{m,\alpha}$$ is $$-0.5750$$ per radian. The negative sign indicates that for a positive increase of the angle of attack there is a negative (nose-down) pitching moment. This shows that the fixed-wing UAV is statically stable in pitch. The signs of the $$C\_{l,\beta}$$and $$C\_{n,\beta}$$ also show that the fixed-wing UAV is statically stable in roll and yaw. The derivatives of the fixed-wing UAV with respect to the rolling, pitching, and yawing were obtained following the approach in the [wing-tail configuration example](/wing-tail-configuration). The figures below show pitch and roll forced oscillations with an amplitude of 5 deg and frequency of 2.5 Hz. The respective derivatives are listed in the table above.

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVkpYkljmWDhVwShyuB%2F-MVkptvsTI1KJWEid6ZU%2Fcruiser_rolling.png?alt=media&amp;token=f0eed7de-9025-4936-8dec-d4b5b4dba424" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVkpYkljmWDhVwShyuB%2F-MVkpwiIPU7Q5rTclCD5%2Fcruiser_pitching.png?alt=media&amp;token=735c9249-e455-4c31-8bed-d29721b8e4b7" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MV8htLPXN-_fWc_anY_%2F-MVkpYkljmWDhVwShyuB%2F-MVkq03D_9kunf5tpmcw%2Fcruiser_yawing.png?alt=media&amp;token=ef283bb3-1142-4315-8606-83d80c72e55a" alt="" data-size="original">&#x20;

{% embed url="<https://youtu.be/inP6DoJAcO8>" %}
Fixed-wing UAV forced roll oscillation
{% endembed %}

{% embed url="<https://youtu.be/GqM6l-eAfXM>" %}
Fixed-wing UAV forced pitch oscillation
{% endembed %}

{% embed url="<https://youtu.be/3EAHUdsHSJ4>" %}
Fixed-wing UAV forced yaw oscillation
{% endembed %}


# Aerosonde UAV

Example simulation of the Aerosonde UAV (work-in-progress)

The Aerosonde is a small unmanned aerial vehicle (UAV) developed by InSitu, Inc. (later manufactured by Aerodonde, Ltd.) designed to collect weather data, including temperature, atmospheric pressure, humidity, and wind measurements over oceans and remote areas. See the [Museum of Flight Aerosonde page](https://www.museumofflight.org/aircraft/insitu-areosonde-laima) for more information.

The Aerosonde UAV has a wing aspect ratio $$AR=15.25$$, wing area $$S\_{ref}=0.55$$m$$^2$$, wing chord $$c\_{ref}=0.1899$$m, and wing span $$b\_{ref}=2.8956$$m \[1]. The V-tail has a taper ratio of 1. A body-fixed coordinate system is placed at the nose. The reference speed is $$|\mathbf{V}\_{ref}|=25$$m/s and the reference density, pressure and viscosity are evaluated at an altitude of $$h=0$$m (ISA). OpenVSP was used to create the mesh for the Aerosonde UAV. The figures below show the Aerosonde UAV geometry (left) and mesh refinement region and wake (right).

<img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FXp6lK3fONSzs1a54l1fJ%2Faerosonde_geometry_openvsp.PNG?alt=media&amp;token=e5ed7f26-b1d9-47e6-8852-1f999afd299b" alt="" data-size="original"> <img src="https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2Fr1YjFjXi57Km0PXhDGxX%2Faerosonde_wireframe_openvsp.PNG?alt=media&amp;token=b5b64f46-d0e2-4815-b13c-328bdc520b60" alt="" data-size="original">&#x20;

The wake's (shaded in yellow) purpose is to intersect the fuselage. This allows the potential jump across the wake to be resolved properly (i.e. without any numerical errors). The wake is removed by APM during the solution stage. APM only uses the pre-defined wake to determine the intersection location. The resulting mesh consisted of 31569 elements and is shown in the figure below.

![Aerosonde UAV mesh created with OpenVSP](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FrN7heUbImktZBq1AucQj%2Faerosonde_mesh.png?alt=media\&token=1bb3d3e4-635b-4fdb-8fc9-f6da02e9bac3)

In the above figure, it can be seen that the wake elements were correctly determined by the APM preprocessor (see [element types](/user-guide/preprocessor)). These elements will be removed by APM during the solution stage.&#x20;

{% hint style="info" %}
Since the wake is expected to intersect the V-tail a solution where the wake extends to infinity (steady solution) is not applicable. Instead, a time marching solution is performed. Due to APM's hybrid formulation of the wake, a time marching solution allows the wake to intersect downstream surfaces (e.g. the V-tail). For more information see the [interactions with the body section](/user-guide/solver/wake/interaction-with-the-body) of the documentation.
{% endhint %}

The figures below show the pressure coefficient and the doublet potential.

![Aerosonde UAV pressure coefficient](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FRHXwBWtkImfc5Kwy9lA8%2Faerosonde_uav_cp.png?alt=media\&token=6a795fe7-3a01-4891-b1ff-fc2eec29a8e0)

![Aerosonde UAV doublet potential](https://81269019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV8htLPXN-_fWc_anY_%2Fuploads%2FP8swGoE8C9vU5xJStCBt%2Faerosonde_uav_mu.png?alt=media\&token=693c9c37-84af-4c98-9b72-2e749a1503fa)

## References

\[1] Sample model from the AeroSim Library, Copyright 2002 Unmanned Dynamics, LLC


