CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] complex numbers in swak4foam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2012, 14:51
Default complex numbers in swak4foam
  #1
New Member
 
juanjo rivera
Join Date: Jan 2010
Posts: 3
Rep Power: 11
juanjo is on a distinguished road
Hi all,

I wish to implement the Womersley equation at patches of my model. Can utilize complex numbers in groovyBC type?.

Regards.
juanjo is offline   Reply With Quote

Old   March 4, 2012, 19:28
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,124
Rep Power: 45
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by juanjo View Post
Hi all,

I wish to implement the Womersley equation at patches of my model. Can utilize complex numbers in groovyBC type?.
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)
gschaider is offline   Reply With Quote

Old   September 20, 2019, 12:38
Default
  #3
New Member
 
George Sof
Join Date: Jun 2019
Posts: 13
Rep Power: 2
lastjedivol is on a distinguished road
Quote:
Originally Posted by gschaider View Post
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)



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.
lastjedivol is offline   Reply With Quote

Old   September 22, 2019, 13:52
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,124
Rep Power: 45
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by lastjedivol View Post
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.

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
gschaider is offline   Reply With Quote

Old   September 23, 2019, 05:26
Default
  #5
New Member
 
George Sof
Join Date: Jun 2019
Posts: 13
Rep Power: 2
lastjedivol is on a distinguished road
Quote:
Originally Posted by gschaider View Post
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

Ok i see. Thank you very much for your reply and your advice.
lastjedivol is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
OpenFoam and complex numbers panara OpenFOAM Pre-Processing 3 June 13, 2017 06:25
[swak4Foam] fails in parallel with -otherTime? Phicau OpenFOAM Community Contributions 3 June 26, 2013 14:00
How can I use complex numbers in OpenFOAM. zola OpenFOAM 1 November 21, 2009 14:54
How can I use complex numbers in OpenFOAM. zola OpenFOAM Programming & Development 0 November 19, 2009 15:49
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


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