# Programming a CFD code using complex variables

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

 June 30, 2008, 18:02 Programming a CFD code using complex variables #1 New coding Guest   Posts: n/a Sponsored Links 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,

 July 3, 2008, 21:32 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.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Christoph Lund Main CFD Forum 13 September 14, 2005 04:36 ma Main CFD Forum 4 January 10, 2005 21:47 Chris Kleijn Main CFD Forum 0 September 25, 2001 10:17 Chris Kleijn Main CFD Forum 0 August 22, 2001 06:41 Allan Morrison Main CFD Forum 5 April 5, 1999 12:07