CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Complex geometric fields

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Ali Blues

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2017, 10:05
Default Complex geometric fields
  #1
Member
 
Join Date: Jun 2015
Posts: 30
Rep Power: 10
Ali Blues is on a distinguished road
Hi ,
It’s been years since the last comment (from Henrik) I’ve seen on GeometricFields of complex numbers:
OpenFoam and complex numbers

I think it’s about time that this functionality is added to OpenFOAM, since there are many physical problems which can be solved in frequency domain such as acoustics which require performing differential operations on complex variables and solving for complex GeometricFields. Henry mentioned that this extension is not a great deal of work, but I’m afraid it is for someone which does not have years of experience with C++ and OpenFOAM. I would like to look into this but need some guidance.

Since we already have the complexVectorField, then questions is how to put it as a parent class for the geometricField<Type>. Or do I have to define an entire set of classes leading to “geometricComplexField<Type>”?

Also do I need to define how differential (fvm or fvc of div, grad) are carried out for complex numbers?

Also the iterative solvers, I hope I don’t need to make modifications there, or do I?

Thanks,
Ali
randolph likes this.

Last edited by Ali Blues; June 20, 2017 at 11:12.
Ali Blues is offline   Reply With Quote

Old   January 1, 2018, 17:51
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Ali Blues View Post
Since we already have the complexVectorField, then questions is how to put it as a parent class for the geometricField<Type>. Or do I have to define an entire set of classes leading to “geometricComplexField<Type>”?
Quick answer: There is no need to create “geometricComplexField<Type>”, the correct definitions would be something like:
Code:
geometricField<complex>
geometricField<complexVector>
Although it seems like the non-complex vector is not used anymore... see here: https://github.com/OpenFOAM/OpenFOAM...metricFields.H

Start looking in the following folder for ideas: https://github.com/OpenFOAM/OpenFOAM...eometricFields
I believe you need to replicate whatever is done with "GeometricScalarField" with the respective "GeometricComplexField" alternative.

After that, you would have to look into this folder: https://github.com/OpenFOAM/OpenFOAM...e/finiteVolume
But from what I can quickly see, it seems like you don't need to worry about this part, because C++ templates will create the respective instances when needed.
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
complex variable, geometric, openfoam


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
Complex Fields suniljain OpenFOAM 1 September 12, 2019 08:09
Complex scalar fields JamR OpenFOAM Programming & Development 0 July 15, 2013 11:29
a reconstructPar issue immortality OpenFOAM Post-Processing 8 June 16, 2013 11:25
an odd(at least for me!) reconstructPar error on a field immortality OpenFOAM Running, Solving & CFD 3 June 3, 2013 22:36
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27


All times are GMT -4. The time now is 19:03.