CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

What's the use of "complex" number mathematics in CFD?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By LuckyTran
  • 1 Post By FMDenaro
  • 1 Post By agd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 21, 2022, 08:31
Default What's the use of "complex" number mathematics in CFD?
  #1
Senior Member
 
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8
aerosayan is on a distinguished road
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?
aerosayan is offline   Reply With Quote

Old   September 21, 2022, 09:21
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,676
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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.
aerosayan likes this.

Last edited by LuckyTran; September 21, 2022 at 12:23.
LuckyTran is offline   Reply With Quote

Old   September 21, 2022, 11:05
Default
  #3
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,776
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by aerosayan View Post
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?



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.
aerosayan likes this.
FMDenaro is offline   Reply With Quote

Old   September 21, 2022, 12:04
Default
  #4
agd
Senior Member
 
Join Date: Jul 2009
Posts: 357
Rep Power: 18
agd is on a distinguished road
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.
aerosayan likes this.
agd is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 07:12.