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

Execute a Fortran program with Fluent

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By DoHander

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2010, 04:46
Default Execute a Fortran program with Fluent
  #1
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 15
marye is on a distinguished road
Hi,

I'd like to know how to execute a Fortran program with Fluent

Thank you!
marye is offline   Reply With Quote

Old   May 10, 2010, 08:16
Default
  #2
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
Please give me more details if you want a more practical answer. Do you want to call a Fortran program from Fluent ? Or do you want to call Fluent from your Fortran program ?

What exactly are you trying to do ?

If you want to execute a Fortran code from Fluent you will use a UDF function in which you can use the C "system" command, I've never tried but it is your best guess. You must use a compiled UDF for having access at the entire C syntax.

Do
DoHander is offline   Reply With Quote

Old   May 10, 2010, 08:47
Default
  #3
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 15
marye is on a distinguished road
Hi,

First thank you for your answer!
Basically, I have an algorithm written in Fortran.
This algorithm has already been used to work with Marc Mentat and now I have to use it with Fluent.

But I don't know how to execute a Fortran program with Fluent and also I don't know how to call Fluent in my algorithm.
is it clearier?
marye is offline   Reply With Quote

Old   May 10, 2010, 10:30
Default
  #4
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
I see two solutions:

1. Send data back and forth using text files, for example Fluent writes the data your Fortran algorithm needs in a file and starts the Fortran code, which will save his results in a new file. When the Fortran code has finished, Fluent reads the data file written by Fortran and so on ... This is a simple hack and not an elegant solution but it will usually work.

2. Reimplement your Fortran code in C as a UDF function, this will be directly accessible in Fluent. Probably this is the recommended solution for your problem. (If your Fortran code is Fortran 77 you can automatically translate parts of it using f2c - a program for Fortran to C conversion). I would recommend however a manual translation from Fortran to C.

In any case you will need a solid background of Fortran and C.

Do
reza0230 likes this.
DoHander is offline   Reply With Quote

Old   May 11, 2010, 03:32
Default
  #5
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 15
marye is on a distinguished road
ok, thanks, I will try...
marye is offline   Reply With Quote

Old   December 1, 2012, 15:25
Default how execute fluent with fortran?
  #6
New Member
 
maryam
Join Date: Dec 2012
Location: isfahan
Posts: 3
Rep Power: 13
maryam.s is on a distinguished road
hi,
I want to call Fluent in my Fortran program,i need to run journal file of fluent for several times in fortran loop ,i use command system:

CALL SYSTEM("E:/program files/Fluent.Inc/ntbin/ntx86/fluent.exe 2ddp")
but program shows this error:
'E program' is not recognized as an internal or external command,operable program or batch file.
please help me
maryam.s is offline   Reply With Quote

Old   December 9, 2019, 18:53
Question Hi maryam
  #7
New Member
 
aoun's Avatar
 
aounallah
Join Date: Jan 2012
Posts: 7
Rep Power: 14
aoun is on a distinguished road
Hi,

I hope that you have resolved your pb a long time ago,

here I'm confronted to the same pb? Please if you could gives the key if you have it,
thankful in advance
aoun is offline   Reply With Quote

Reply

Tags
fluent, fortran


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
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 00:52
fortran program code jangolobow Main CFD Forum 0 July 11, 2009 05:28
Fluent connection with simulink by TCP/IP Tanktruck Fluent UDF and Scheme Programming 1 June 28, 2009 12:56
Absoft Pro Fortran 7.5 in Fluent 4.5 Thitikorn FLUENT 0 July 5, 2002 06:41
Any numerical triple integration program is available in Fortran? Radhakrishnan Main CFD Forum 3 March 4, 1999 01:03


All times are GMT -4. The time now is 19:27.