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

Programming a CFD code using complex variables

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 30, 2008, 18:02
Default Programming a CFD code using complex variables
  #1
New coding
Guest
 
Posts: n/a
Hi,

In Math you can use Integer(E), Real(R) or Complex(Z) numbers. In multiphase flow (VOF or bubbles, evaporation, boiling) the results locus and validations can be plotted on Nyquist-type diagrams (plotting the variation of the Amplitude and the Argument Z=Aexp(i.theta).

http://ralyx.inria.fr/2007/Raweb/apics/3.png

http://www.cemtool.com/img/pro_img_01_03.gif

http://www.engr.udayton.edu/faculty/...s/image002.gif

We would like to program a new CFD code using complex variables (Z = U1 + iU2 = Aexp(i.theta) )

Which language would you suggest to handle complex variables: derivation, convertion to amplitude and argument, etc...

Thanks,
  Reply With Quote

Old   July 3, 2008, 21:32
Default Re: Programming a CFD code using complex variables
  #2
triple_r
Guest
 
Posts: n/a
Well, it's easy in MATLAB, but I wouldn't recommend that for much of anything in CFD. Fortran has a complex variable data type, and you can work with complex numbers in C also. In C++ you could even overload the operators which could make the math very easy to write, although you always need to be careful when you do this. So to answer your question, I don't think handling of complex variables should dictate which language you write in. Use what you're comfortable with.
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple CFD code for teaching basic CFD? Christoph Lund Main CFD Forum 13 September 14, 2005 04:36
CFD code structure (F90) ma Main CFD Forum 4 January 10, 2005 20:47
ASME CFD Symposium - Call for Papers Chris Kleijn Main CFD Forum 0 September 25, 2001 10:17
ASME CFD Symposium Chris Kleijn Main CFD Forum 0 August 22, 2001 06:41
educational software package recommendations Allan Morrison Main CFD Forum 5 April 5, 1999 12:07


All times are GMT -4. The time now is 02:25.