|
[Sponsors] |
March 4, 2012, 13:51 |
complex numbers in swak4foam
|
#1 |
New Member
juanjo rivera
Join Date: Jan 2010
Posts: 3
Rep Power: 16 |
Hi all,
I wish to implement the Womersley equation at patches of my model. Can utilize complex numbers in groovyBC type?. Regards. |
|
March 4, 2012, 18:28 |
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
No. I don't see the point. You're the boundary condition is defined on a real (as opposed to complex) field. So you can always calculate the real part of your complex expression and put that into the BC (I think this has been discussed a few months ago)
|
|
September 20, 2019, 11:38 |
|
#3 | |
New Member
George Sof
Join Date: Jun 2019
Posts: 13
Rep Power: 6 |
Quote:
Dear Bernhard, i am sorry to pick up such an old thread but i have a question regarding complex numbers and complex field operations in combination with swak4Foam and this is the only relevant post that i have found. My question is : how can i declare complex numbers or even operations with complex numbers, inside an expressionField in controlDict? Is there any special way that i can write the imaginary part ( i ) ? Thank you very much in advance. |
||
September 22, 2019, 12:52 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Sorry. There currently is no built-in support for complex numbers in swak4Foam. Complex numbers are not really "first class citizens" in OpenFOAM (there is no volComplexField for instance) and I never had a need for them. So you'll have to keep complex and real part of your complex variable in two separate scalar fields and do the calculations for them by hand
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
September 23, 2019, 04:26 |
|
#5 | |
New Member
George Sof
Join Date: Jun 2019
Posts: 13
Rep Power: 6 |
Quote:
Ok i see. Thank you very much for your reply and your advice. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam and complex numbers | panara | OpenFOAM Pre-Processing | 3 | June 13, 2017 05:25 |
[swak4Foam] fails in parallel with -otherTime? | Phicau | OpenFOAM Community Contributions | 3 | June 26, 2013 13:00 |
How can I use complex numbers in OpenFOAM. | zola | OpenFOAM | 1 | November 21, 2009 13:54 |
How can I use complex numbers in OpenFOAM. | zola | OpenFOAM Programming & Development | 0 | November 19, 2009 14:49 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |