CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Linking between my own code and CFX5 in Windows (http://www.cfd-online.com/Forums/cfx/23923-linking-between-my-own-code-cfx5-windows.html)

Se-Hee May 1, 2007 11:04

Linking between my own code and CFX5 in Windows
 
I'd like to link between my own FORTRAN program and CFX5 solver in Windows system. Here, my FORTRAN code acts as main routine, and CFX5 is only used for CFD solver. The very simple pseudo code for my program is as follows:

main.for

================================================== =====

====================

! Initialization

====================

Do i=1, # of elements

Temp_old(i)=300

EndDo

====================

! Main computing

====================

Convergence=0

Do While(!Convergence)

Call & Run (CFX5 solver)

Get (Temp_new(i) from CFX5 solver)

Compare (Temp_old(i)==Temp_new(i))

-Yes: Convergence=1

-No: Convergence=0

EndDo

Stop

End

================================================== =====

I know how to run the CFX5Solve in batch mode. I, however, don't know how to write the temperature file while CFX5Solve command is running. How can I resolve this difficulty in CFX5?

Many thanks, Se-Hee


Glenn Horrocks May 7, 2007 18:39

Re: Linking between my own code and CFX5 in Window
 
Hi,

Why do this? It looks like you are trying to use an external program to define convergence - why not use the convergence options already in CFX?

Glenn Horrocks

Se-Hee May 17, 2007 08:52

Re: Linking between my own code and CFX5 in Window
 
Hi Glenn!

At this moment, I'd like to appreciate you for solving many problems of which I have uploaded in this forum.

Well, actually I am trying to build my own routines that can solve the some optimization problems by using ANSYS Multiphysics Emag, CFX, and my own optimal algorithms. For this, I have to know how to control the CFX. That is my purpose.

Do you have any good ideas or any suggestions for this? I welcome any comments from you.

Many thanks,

Se-Hee


All times are GMT -4. The time now is 16:49.