CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   CFX5 and user FORTRAN (https://www.cfd-online.com/Forums/cfx/20048-cfx5-user-fortran.html)

Worth December 10, 2003 15:18

CFX5 and user FORTRAN
 
I'm a long-time user of CFX4 and I heavily employ the user FORTRAN. It appears that CFX5 is now the top of the line product. What is the status of user Fortran in CFX5? Considering that CFX5 is an unstructured solver, will user FORTRAN in 5 ever be as functional and accessible as it was in 4?

Thanks,

Worth

Astrid December 10, 2003 16:00

Re: CFX5 and user FORTRAN
 
Long time ago I also used CFX 4 and had to use Fortran for the difficult stuff. Nowadays I use CFX 5 and have never used Fortran up till now. For some reason I can do without.

Astrid (back again)

Glenn Horrocks December 10, 2003 16:17

Re: CFX5 and user FORTRAN
 
Hi Astrid and Worth,

(Welcome back Astrid!) CFX5 has CEL code which allows you to define most expressions which CFX4 required fortran to define. CFX5 does have fortran subroutines, but their scope is limited and you cannot access everything you could in CFX4.

Just like Astrid, I used lots of fortran in CFX4, and am now setting the entire simulation up in the command file of CFX5. I don't even have a fortran compiler anymore.

Glenn

Astrid December 11, 2003 06:09

Re: CFX5 and user FORTRAN
 
Neither have I.

Astrid

Bob December 11, 2003 09:19

Re: CFX5 and user FORTRAN
 
Hey Guys, There is still some need for the old fortran - its not dead yet. For areas such as moving mesh - something we have been working on, Fortran is still necessary. We also use fortran to interrogate volumes within a model and use the fortran to export particular factors from the volumes and even stop the simulations once a certain criteria has been reached. I'd say that the fortran is not as easy to use as in CFX4, but the Guys at CFX are very helpful, and they will advise you as to the best way to tackle your particular problem. Like Glenn and Astrid said, you may even be able to get away from using the fortran all together. Bob

Jeff December 12, 2003 08:51

Re: CFX5 and user FORTRAN
 
There are two flavors of FORTRAN as well.

1. User CEL functions 2. Junction Box routines

The User CEL functions are MUCH easier to code and I've written several for calculating complex boundary conditions and extracting needed transient data. You simply write your routine as a function that can be called directly from CEL and stored in a CEL variable. Any variables accessible from CEL can be passed in for use in the routine.

The Junction Box routines are harder to use but I've not found a need for them yet. Nothing gets passed in or out. You do everything by accessing the MMS (memory management system) arrays, which is anything but straight forward or well documented.

There are examples of both in at the end of the Solver Models manual and a pretty good power point on FORTRAN on the community site.

Jeff

Jesper December 12, 2003 10:54

Re: CFX5 and user FORTRAN
 
Like the previous contributions, I also find CEL very useful for most applications. I do however think that CEL has limitations, especially if you need to access gradients of varibles for your computations. As far as I know, you are not allowed to access gradients in CEL? - Or am I missing something? What are your experiences with that?

Jesper.

Ribeiro December 12, 2003 13:44

Re: CFX5 and user FORTRAN
 
You're right, Jesper

Gradients are still inaccessible through CEL. But it is easily accessed by User Fortran.

I believe that gradients can be available in CEL in CFX-5.7.

Ribeiro.

Neale December 15, 2003 13:41

Re: CFX5 and user FORTRAN
 
Nope, no gradients in CEL for 5.7. You will still have to use USER_GETVAR for that.

Neale

Jeff December 25, 2003 01:43

Re: CFX5 and user FORTRAN
 
This is really not hard. There's a perfect example of doing this through a USER CEL function at the end of the 5.6 Solver Models manual. I do this on a regular basis. You have to be careful with additional variables, however, which are not solved as transport equations. Unless the algebraic variable is used as a source for another equation, the gradients don't appear to be available.

Jeff


All times are GMT -4. The time now is 02:15.