|
[Sponsors] |
May 11, 2005, 12:17 |
user fortran
|
#1 |
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 |
|
May 11, 2005, 20:17 |
Re: user fortran
|
#2 |
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 |
|
May 12, 2005, 02:40 |
Re: user fortran
|
#3 |
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 |
|
May 12, 2005, 05:05 |
Re: user fortran
|
#4 |
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 |
|
May 12, 2005, 08:26 |
Re: user fortran
|
#5 |
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.
|
|
May 12, 2005, 12:24 |
Re: user fortran
|
#6 |
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 |
|
May 12, 2005, 13:03 |
Re: user fortran
|
#7 |
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 |
|
May 13, 2005, 12:51 |
Re: user fortran
|
#8 |
Guest
Posts: n/a
|
Hi berny and robin, Thanks for ur suggestion. Now i could link 2 user routines to the solver.
Regards Fred |
|
|
|
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 |