2016年3月9日星期三

Abaqus debuggin

decide to use abaqus for FEM analysis.

so here is the link for compile the fortran.
http://tuoonline.sinaapp.com/?p=131
The whole picture is in fact very simple: subroutine is written in Fortran as *.f files, and ABAQUS need to compile these *.f before using it.  in this case,  the ifort.exe is the compiler. So (1) we need the the access to ifort.exe. Furthermore, this ifort.exe cares a lot about the working condition, he actually have an assistant to build up the working place for him. This assistant is called ifortvars.bat. So (2) we need the access to this ifortvars and(3)make it work!

to do (1) and (2), we need to add the file path of ifort.exe and ifortvars.bat into environment variables (path), so we can access those two at any folder while using command window.
(A)
Search your C:\ for ifort and ifortvars’s path first, record it in a text file. usually the ifortvars is in:
C:\Program Files (x86)\Intel\Composer XE 2013\bin
and the ifort is in:
“C:\Program Files (x86)\Intel\Composer XE 2013\bin\intel64
.
(B)
To setup environment variables:
right click on “computer”
choose properties
choose “advanced system setting” at the left upper area of the current window
click on environment variables at right lower corner of the current window.
Choose variable “path” in the upper frame titled “system variables” and click “edit”
at the end of variable value, add these paths of your “ifort” and “ifortvars” you just found at step (A), for example, mine is:
;C:\Program Files (x86)\Intel\Composer XE 2013\bin;C:\Program Files (x86)\Intel\Composer XE 2013\bin\intel64
Attention: don’t miss the ; at the start of these text and replace my file path with your file path.
(C)
To do (3), we need to add ifortvars.bat into ABAQUS command batch file, so it could setup the environment every time ABAQUS runs.
Open your ABAQUS commands folder, usually at C:\SIMULIA\Abaqus\Commands
right click on abaqus.bat, choose “edit”.
You will probably see this:
@echo off
“C:\SIMULIA\Abaqus\Commands\abq6131.bat” %*

just change it to this:
@echo off
@call ifortvars.bat intel64 vs2012
“C:\SIMULIA\Abaqus\Commands\abq6131.bat” %*
save it.

Remember to change the bold part(intel64 vs2012) accordingly to your system type and software version. For example if you are using visual studio 2010, then vs2012 should bevs2010. I add this note because last time my friend Clay stuck on this tiny part and pissing in the wind checking system variables and fortran compatibility for 10 mins and cried.
Another note: if you run ABAQUS and saw the composer is working, but in the next line it says file or path did not find, please check the quotation marks in the line: “C:\SIMULIA\Abaqus\Commands\abq6131.bat” %* of abaqus.bat is correct, especially after you copied this line from my blog. In this case the quotation marks had been replaced by a kind of quotation marks unrecognizable by windows.
(D)
To verify if it works:
open a command window by type cmd and enter in the start menu.
type:
abaqus verify -all
this command will run a comprehensive test for abaqus, including the standard and explicit with subroutine mode. Just read what’s on screen and perhaps the log file, you will see what your ABAQUS is capable of.