CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   CFX 13.0 and fortran (

zakir hussain March 6, 2012 22:28

CFX 13.0 and fortran
hello everyone
The version of my ANSYS is 13.0.Now I need to use fortran routines.So after I install:
visual studio 2008;
intel fortran 11.0;
Microsoft windows SDK;

And I have set my computer's environment variables as:
D:\Program Files\Intel\Compiler\11.0\061\fortran\mkl\include;
D:\Program Files\Microsoft Visual Studio\VC98\atl\include;
D:\Program Files\Microsoft Visual Studio\VC98\mfc\include;
D:\Program Files\Microsoft Visual Studio\VC98\include;
D:\Program Files\ANSYS Inc\v130\CFX\include;
D:\Program Files\Microsoft SDKs\Windows\v7.1\Include

D:\Program Files\Intel\Compiler\11.0\061\fortran\mkl\ia32\lib ;
D:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;
D:\Program Files\Microsoft Visual Studio\VC98\lib;
D:\Program Files\ANSYS Inc\v130\CFX\lib\winnt;
:\Program Files\Microsoft SDKs\Windows\v7.1\Lib

D:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;
D:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;
D:\Program Files\Microsoft Visual Studio\Common\Tools;
D:\Program Files\Microsoft Visual Studio\VC98\bin;
D:\Program Files\ANSYS Inc\v130\CFX\bin;
D:\Program Files\Microsoft SDKs\Windows\v7.1\Bin

Then I copy the file cfx5mkext.ccl to my workdictionary.But when I input:cfx5mkext in the command line of CFX,the result is:
An error has occurred in cfx5mkext:
No source file has been specified.

What should I do next if I want to use fortran routines?
Thank you very much!

best regards!


ghorrocks March 6, 2012 23:46


What should I do next if I want to use fortran routines
Maybe reading the documentation on setting up fortran would be a good start.

zakir hussain March 7, 2012 00:27


Originally Posted by ghorrocks (Post 348022)
Maybe reading the documentation on setting up fortran would be a good start.

I am sorry for my lack of knowledge about that.Can you give me instruction in detail?

thank you very much!


turzoz March 7, 2012 03:43

Fortran problem
Dear Zakir!

ANSYS 13 works with Intel Fortran v10.1 and Microsoft Visual Studio 2005 Professional SP1
HELP manual misswrites. ANSYS 14 support Intel Fortran 11.0.0.

after proper installation of fortran and visual studio run ifortvarsbat command befor cfx5mkext.


Zoltan Turzo

zakir hussain March 7, 2012 03:51

Thank you very much! Where should I run: ifortvarsbat, in Launcher > Tools > Command Line? And then run cfx5mkext there too?

Best Regards


turzoz March 7, 2012 04:18

As i remember, from cfx-pre /tools/command editor (check it in cfx example 19.)
But i think it should work from the launcher as well.



mescalito March 7, 2012 16:31

Hi, as Zoltan said, in the tutorial 19 of cfx's manual(air conditioning simulation) there is the correct way to compile a Fortran routine from cfx.
This work from cfx-pre and from the launcher too.
But, I want to know if you have any documentation or information about the Fortran's routines of cfx beyond that there are in manual.

Anyway, Good Luck using Fortran routines!

zakir hussain March 7, 2012 20:35

Thanks to Zoltan and mescalito.I just copy the original file from the examples folder.Now I can run the command from the launcher,and a subdictionary containing the .dll file had been created in my workdictionary. But I failed with inputing command from cfx-pre.It alwas occurred a window said :

CCL parser failed with message:
Perl Syntax errors detected:
Died at (eval 199) line 1.

Have you meet this problem before?

best regards


turzoz March 8, 2012 02:51

I have not met this problem.


turzoz March 8, 2012 02:53

sorry, i have not.


mescalito March 8, 2012 09:05


when you run the file from the cfx-pre you should use the command exactly as below
! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed";
But you have to change the name of your file in bold. have you done this procedure?

zakir hussain March 10, 2012 09:30


Originally Posted by mescalito (Post 348362)

! system ("cfx5mkext TStat_Control.F") == 0 or die "cfx5mkext failed";

yes ,I input the command correctly.


Originally Posted by mescalito (Post 348362)
change the name of your file in bold.

what do you mean? Change whose name?


mescalito March 10, 2012 10:16


change the name "TStat_Control.F" to the name of the file that you are compiling, if you havenīt done this.


zakir hussain March 11, 2012 00:09

yes,I have changed the file name,but the result was the same.anyway,I can run the launch command line fluently.
but now I meet another problem.I have two files in my work dictionary, jet.ccl and jet.def.After I clicked the buttun Cfx-pre and opencase,I choose the jet.def, and an error occurred:

RULES data is not importable. RULES data was stripped out of imported CCL.

Do you know what is the problem?
Thank you very much!

best regards


emily.imdieke January 30, 2014 11:17


I keeping getting the same error as zakir and have not found a way to fix it, has anyone else?

flyply February 1, 2014 06:39

Try, this method.
After the install, visual studio and Intel fortran.

Add the Path Just only : ~Intel\ComposerXE-2011\bin
(path include ifortvars.bat )

and then restart the CFX

tools->command line

type the : ifortvars.bat
and then, selet the your computer archtecure, and linker
in my case

ifortvars.bat intel64 vs2010

and then, maybe you can use the cfx5mkext, Do not use the CFX-Pre Command line, use the command line window(DOS window)

All times are GMT -4. The time now is 07:21.