S
Satish Chimakurthi
Hello Mr. Berthold,
A few months ago, I contemplated interfacing/wrapping ANSYS to Python. I looked at SWIG, BABEL, Boost.Python for this purpose at that time, only to realise that such direct wrapping is not possible since ANSYS libraries are basically Fortran based. I thought of the following work-around to the problem.
ANSYS allows users to compile their own customized version. It gives the user access to its vast libraries with the help of some UPF routines ( look at ANSYS-UPF documentation here http://www.cesup.ufrgs.br/ansys/prog_55/g-upf/UPS1.htm ). You may be knowing this. There is a file called ANSCUSTOM in "/usr/local/ansys/v71/ansys/customize/user" directory. First, I wrote a "Makefile" and a "make.inc" file based on the information in ANSCUSTOM. I then wrote a Fortran code in which I used all the UPF routines I needed to be used with ANSYS. I compiled the Fortran code with "make.inc" simultaneously to get a binary executable. And that's it, I was ready to go. The binary executable could be executed using a specific command which could be found in ANSYS Installation and Configuration manual, I think. In my case, I was using ANSYS 7.1, so, I had to execute it as: "anscust71 -custom ./executable -p ANSYSRF".
Now, with all that I described above, link between Fortran and ANSYS has become possible. You can look at F2PY (Fortran to Python Interface Generator) here http://cens.ioc.ee/projects/f2py2e/ to have an interface between your Python script and Fortran code that you would be writing for the purpose. At the moment, my Python-Fortran interface is very loose. I use Fortran to ANSYS mostly and do postprocessing work in Python.
Please let me know if you think of any other ideas about wrapping Python and ANSYS directly. I would appreciate your assistance.
Thanks
Best Regards,
Satish Kumar Chimakurthi
SATISH KUMAR CHIMAKURTHI
Graduate Research Assistant
CFD GROUP
Mechanical Engineering
UNIVERSITY OF KENTUCKY
Lexington
KENTUCKY - 40508
U.S.A
Email: (e-mail address removed)
Mobile:859-420-9890
Office: 859-257-6336 X 80691
A few months ago, I contemplated interfacing/wrapping ANSYS to Python. I looked at SWIG, BABEL, Boost.Python for this purpose at that time, only to realise that such direct wrapping is not possible since ANSYS libraries are basically Fortran based. I thought of the following work-around to the problem.
ANSYS allows users to compile their own customized version. It gives the user access to its vast libraries with the help of some UPF routines ( look at ANSYS-UPF documentation here http://www.cesup.ufrgs.br/ansys/prog_55/g-upf/UPS1.htm ). You may be knowing this. There is a file called ANSCUSTOM in "/usr/local/ansys/v71/ansys/customize/user" directory. First, I wrote a "Makefile" and a "make.inc" file based on the information in ANSCUSTOM. I then wrote a Fortran code in which I used all the UPF routines I needed to be used with ANSYS. I compiled the Fortran code with "make.inc" simultaneously to get a binary executable. And that's it, I was ready to go. The binary executable could be executed using a specific command which could be found in ANSYS Installation and Configuration manual, I think. In my case, I was using ANSYS 7.1, so, I had to execute it as: "anscust71 -custom ./executable -p ANSYSRF".
Now, with all that I described above, link between Fortran and ANSYS has become possible. You can look at F2PY (Fortran to Python Interface Generator) here http://cens.ioc.ee/projects/f2py2e/ to have an interface between your Python script and Fortran code that you would be writing for the purpose. At the moment, my Python-Fortran interface is very loose. I use Fortran to ANSYS mostly and do postprocessing work in Python.
Please let me know if you think of any other ideas about wrapping Python and ANSYS directly. I would appreciate your assistance.
Thanks
Best Regards,
Satish Kumar Chimakurthi
SATISH KUMAR CHIMAKURTHI
Graduate Research Assistant
CFD GROUP
Mechanical Engineering
UNIVERSITY OF KENTUCKY
Lexington
KENTUCKY - 40508
U.S.A
Email: (e-mail address removed)
Mobile:859-420-9890
Office: 859-257-6336 X 80691