|
[Sponsors] |
What's the use of "complex" number mathematics in CFD? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 21, 2022, 08:31 |
What's the use of "complex" number mathematics in CFD?
|
#1 |
Senior Member
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8 |
Hello everyone,
I saw in CFL3D's code that it can be built to run with complex numbers. Same for BLAS/LAPACK and few other. What is their use in CFD? And, is it important for me to learn writing code with complex numbers? and when would it be important to learn? |
|
September 21, 2022, 09:21 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,676
Rep Power: 66 |
The Harmonic balance method comes to mind which is a specific approach for solving the phase-averaged or ensemble averaged Navier-Stokes, which is in between steady RANS and time-domain unsteady RANS.
Any time turbulence modeling is involved then we tend to stick with a time-domain approach with real vectors due to the chaotic, random nature of turbulence. If there is no turbulence and you have a nice laminar coherent system of equations then it could make more sense to use complex representations, especially when your system is coupled with other complex systems (i.e. maxwell's equations, MHD, QED, and so on). I would say no specifically to complex numbers from a coding standpoint. That is because you can always convert a (say linear) differential equation in complex numbers into a system of non-linear algebraic equations that can then be solved using methods for solving linear systems that you are already familiar with. Last edited by LuckyTran; September 21, 2022 at 12:23. |
|
September 21, 2022, 11:05 |
|
#3 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,776
Rep Power: 71 |
Quote:
Fourier series is based on complex number, therefore spectral methods requires to know that before to work in CFD. But also to understand the role of the stability analysis (von Neumann), numerical diffusion and dispersion you need to know complex numbers. |
||
September 21, 2022, 12:04 |
|
#4 |
Senior Member
Join Date: Jul 2009
Posts: 357
Rep Power: 18 |
I don't know about CFL3d in particular, but the most common use of complex variables in a flow solver (or any implicit solver where a system Jacobian has to be computed) is to use complex differentiation to easily evaluate 2nd-order accurate values for the system Jacobian. It is a technique that can be thought of as a poor man's automatic differentiation. You can find a number of papers on it if you google complex differentiation for numerics or some such topic.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Decomposing meshes | Tobi | OpenFOAM Pre-Processing | 22 | February 24, 2023 09:23 |
use the message in macro DEFINE_PROFILE with parallel processor | alireza_T | Fluent UDF and Scheme Programming | 3 | May 11, 2022 02:08 |
[Other] decomposePar ignores some boundary patches | Kalabagh | OpenFOAM Meshing & Mesh Conversion | 6 | January 22, 2020 14:50 |
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library | aylalisa | OpenFOAM Installation | 23 | June 15, 2015 14:49 |
Unaligned accesses on IA64 | andre | OpenFOAM | 5 | June 23, 2008 10:37 |