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

user fortran

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2005, 12:17
Default user fortran
  #1
Fred
Guest
 
Posts: n/a
Hello everybody, Is it possible to use more than one fortran program in single analysis?If it can be done then how to compile and link it?.Can anyone please help me?

Regards Fred
  Reply With Quote

Old   May 11, 2005, 20:17
Default Re: user fortran
  #2
RK
Guest
 
Posts: n/a
Hi,

Does putting all the necessary fortran files into one *.f file not work? For example, if you had USRSRC, USRBCS the you could put these files into a file called m01.f (one after each other) then run using

runsolve4 m01.fc -g m01.geo -f m01.f

(the above assumes CFX 4, and the command file (*.fc) and the geometry file (*.geo) is given a name; in this case m01.

Hope it helps and works.

RK
  Reply With Quote

Old   May 12, 2005, 02:40
Default Re: user fortran
  #3
Fred
Guest
 
Posts: n/a
Hello RK, Thanks for ur suggestion. In my problem,i need 2 return variables from the program, but in cfx5.7 help it is given that only one variable can be returned in one program.So,i wonder is it possible to use 2 programs so i will have 2 return variables to use it in my analysis.

Thanking you once again Regards Fred
  Reply With Quote

Old   May 12, 2005, 05:05
Default Re: user fortran
  #4
RK
Guest
 
Posts: n/a
Hi Fred,

Sorry misunderstood your question...I may only be a handful of people who still uses CFX 4 (esp in this forum). I have not used CFX 5 in any shape or form, but if you can give more details about your needs then may be I can try to see if there is analogy between the programs...

(1) What USR fortran are using?

(2) What variables would you like it to retrun?

It is likley that I may not be able to assist in this matter...but I will try...

RK
  Reply With Quote

Old   May 12, 2005, 08:26
Default Re: user fortran
  #5
berny
Guest
 
Posts: n/a
Of course you can link more than one on user-subroutine to cfx5. Simply give more than one routine the cfx5mkext.
  Reply With Quote

Old   May 12, 2005, 12:24
Default Re: user fortran
  #6
Fred
Guest
 
Posts: n/a
Hi RK&Berny, Thanks RK&berny. I have to add source terms through general momentum source option in subdomain form by user fortran.So the variable that i will be returning is a source value(N /m^3)>if i want to add source terms in x and y directions then i require 2 variables to be returned.

Berny if u dont mind can u list out the steps to link 2 user routines.I have tried the following way and not successfull: I have used 2 user routines and 2 user functions and while compiling i have typed the following command in the command editor. ! system ("cfx5mkext one.F two.F"); one and two are the two user fortan programs,in this only one of the program is getting compiled. I think this is not the correct way of linking 2 programs.How to do this?

Thank you Regards Fred
  Reply With Quote

Old   May 12, 2005, 13:03
Default Re: user fortran
  #7
Robin
Guest
 
Posts: n/a
Hi Fred,

You can combine multiple subroutines into a single fortran file, or alternatively run cfx5mkext twice, once for each routine. 'cfx5mkext' simply creates a shared library, it does not relink the code. The shared libraries are linked in at runtime, so you can have as many as you like.

Regards, Robin
  Reply With Quote

Old   May 13, 2005, 12:51
Default Re: user fortran
  #8
Fred
Guest
 
Posts: n/a
Hi berny and robin, Thanks for ur suggestion. Now i could link 2 user routines to the solver.

Regards Fred
  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
Importing external DLL to Ansys CFX using user Fortran snpradeep CFX 2 May 16, 2014 04:52
user routine, user funcion, or fortran compile effect on the memroy? princeps11 CFX 1 May 13, 2009 19:37
User fortran routines, DEBUG AND OUTPUT Bloshchitsyn Vladimir CFX 5 October 29, 2007 02:31
CFX5 and user FORTRAN Worth CFX 9 December 25, 2003 02:43
Best Code for User Fortran worth Main CFD Forum 4 November 14, 2003 11:21


All times are GMT -4. The time now is 05:18.