Tecknique
Mechanical
- Mar 3, 2005
- 5
The ansys.f (I have version 8.1) main program allows one to modify it for use as a subroutine in the user's independent Fortran code. I am trying to understand where to place the *USE command in order to call and execute a macro that will build my model. In contrast to the example subroutine given in which multiple calls were made, I will only need to call ANSYS once. Therefore, I can eliminate the DO-Loops and OPEN file statements. Correct???
Also, I have the following code for Subroutine Ansys:
subroutine ansys
#include "impcom.inc
external mainan, menusb
integer mainan
character*640 Command
nCommand = 14
Command = 'START_OF_ANSYS'
200 where = mainan(nCommand,Command)
if (where.eq.-1) goto 900
*** Should I put Command = '*USE,model.mac' here ***
*** since this is the command I want to execute??? ***
call menusb(nCommand,Command)
goto 200
900 return
end
Finally, I was a little puzzled by the presence of the # in the INCLUDE statement. #Include is a C-language command. Fortran 90 should just be INCLUDE 'filename.f' correct. Any ideas?
Also, I have the following code for Subroutine Ansys:
subroutine ansys
#include "impcom.inc
external mainan, menusb
integer mainan
character*640 Command
nCommand = 14
Command = 'START_OF_ANSYS'
200 where = mainan(nCommand,Command)
if (where.eq.-1) goto 900
*** Should I put Command = '*USE,model.mac' here ***
*** since this is the command I want to execute??? ***
call menusb(nCommand,Command)
goto 200
900 return
end
Finally, I was a little puzzled by the presence of the # in the INCLUDE statement. #Include is a C-language command. Fortran 90 should just be INCLUDE 'filename.f' correct. Any ideas?