CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Linking between my own code and CFX5 in Windows

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 1, 2007, 12:04
Default Linking between my own code and CFX5 in Windows
  #1
Se-Hee
Guest
 
Posts: n/a
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

  Reply With Quote

Old   May 7, 2007, 19:39
Default Re: Linking between my own code and CFX5 in Window
  #2
Glenn Horrocks
Guest
 
Posts: n/a
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
  Reply With Quote

Old   May 17, 2007, 09:52
Default Re: Linking between my own code and CFX5 in Window
  #3
Se-Hee
Guest
 
Posts: n/a
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
  Reply With Quote

Reply


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
Best Code for User Fortran worth Main CFD Forum 4 November 14, 2003 11:21


All times are GMT -4. The time now is 17:42.