User login

Navigation

You are here

Writing ABAQUS UEL subroutines in Fortran 90 or higher versions .

Gurudutt Chandrashekar's picture

Hello everyone,

I am a student of Msc in Computational Engineering at Ruhr University Bochum in Germany. I am implementing a new piezoelectric element as a part of my Master Thesis. I am supposed to write a UEL subroutine and implement it in abaqus.I would like to know whether anyone has written subroutines in Fortran 90 or further versions and implemented them in abaqus. All the Help documents in Abaqus have subroutines written in F77.  If it  possible in F90, then it will be very helpful if someone could point out the necessary modifications that one has to make to the F90 file to  run it in Abaqus. I think many ppl have this question .I myself have been trying to figure out an answer from past 1 month but could not find a convincing solution anywhere.

Comments

Wei Hong's picture

Hi Gurudutt,

The compatibility in the format of the fortran source code is on the compiler side, not on Abaqus.  As long as your compiler works with f90 or f95, your user subroutines can be linked with Abaqus.  For most compilers, e.g. Intel Visual Fortran, f90 and f95 are supported as well as f77.

Wei

Gurudutt Chandrashekar's picture

Hi Wei,

 Thanks a lot for ur reply..I think that cleared all my doubts about compiler compatibility..

dinhvanduc's picture

Your answers are very useful!

Thanks you!

Arun Prakash's picture

Hi Gurudutt,

 

I too use fortran90 code for Abaqus, but for UMAT/VUMAT. Your compiler options need to be extended to recognize and compile f90 code. On the intel fortran compiler, the options to be added are "-free", if your program is written in free format fortran. But the fortran subroutine file itself should be *.f and not *.f90.

 

Cheers

Arun   

Gurudutt Chandrashekar's picture

Hi Arun,

Thanks for ur suggestion. After a long search on the inet i found some info. The three lines below are from the abaqus environent file,the first two lines being the steps to use free form.

# Add the flag "-free" to the compile_fortran command below to use free-
# format FORTRAN 90 syntax.

compile_fortran = (fortCmd + " -c -fPIC -auto -extend_source -w90 -w95 " + 
                   "-WB -I%I")

I think this is exactly what u r saying.Please correct me if I am wrong.....

 

Arun Prakash's picture

Yes,

 That's exactly what I meant

 

Arun   

Hamed-yaghoubi's picture

Hi Arun

I am really exausted by this error "User subroutine file name must have a .for or .obj extension" in my Abaqus (6-13-1)

while I want to linking it with FORTRAN 90. I made also changes in my abaqus environment file (.env), specifically I added the '/free' to the compile_fortran line but I have still this problem. I was wondering if you give me more information. To more, I copy my both compile_fortran and link_sl from abaqus_v6.env. thanks in advance

# Add the flag '-free' to the compile_fortran command below to use free-
# format FORTRAN 90 syntax.
compile_fortran=['ifort',
                 '/c','/DABQ_WIN86_64', '/extend-source',
                 '/iface:cref', '/recursive','/QMKl:sequential', '/free', '/Qauto-scalar','QxW'
                 '/QxSSE3', '/QaxAVX', '/f90-c-free','F90COM','/c:\MSDEV\BIN','/GM'
                 '/heap-arrays:1', 'fortCmd'+'f90-c-free-extend_source-xK-axW-w90-w95-WB-I%I',
                 # '/Od', '/Ob0'   # <-- Optimization
                 # '/Zi',          # <-- Debugging
                 '/include:%I', '/free']

link_sl=['LINK',
         '/nologo', '/NOENTRY', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64',
         '/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB', '/f90',
         '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB', '/DEFAULTLIB:LIBIFPORTMD', '/DEFAULTLIB:LIBMMD.LIB',
         '/DEFAULTLIB:kernel32.lib', '/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib',
         '/FIXED:NO', '/dll',
         '/def:%E', '/out:%U', '%F', '%A', '%L', '%B',
         'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib', 'advapi32.lib']

Hi

I have a similar problem. Do you know what i should do on my windows computer. I guess that your solution is for a linux computer. My abaqus_v6.env file looks like this:

compile_fortran=['ifort', '/c', '/Gm', '/recursive', '/nologo', '/heap-arrays:1', '/include:%I']

If I add '/free' as:

compile_fortran=['ifort', '/c', '/Gm', '/recursive', '/nologo', '/heap-arrays:1', '/include:%I', '/free']

I am not able to run my user routines written in f77. I do not have a f90 or f95 to test if it works for these files. But anyway I guess that because of backwards compatibility this should not make any difference. 

Thanks in advance

Regards Brian

Hamed-yaghoubi's picture

Hello everybody

I am really exausted by this error "User subroutine file name must have a .for or .obj extension" in my Abaqus (6-13-1)

while I want to linking it with FORTRAN 90. I made also changes in my abaqus environment file (.env), specifically I added the '/free' to the compile_fortran line but I have still this problem. I was wondering if one of you give me more information. To more, I copy my both compile_fortran and link_sl from abaqus_v6.env. thanks in advance

# Add the flag '-free' to the compile_fortran command below to use free-
# format FORTRAN 90 syntax.
compile_fortran=['ifort',
                 '/c','/DABQ_WIN86_64', '/extend-source',
                 '/iface:cref', '/recursive','/QMKl:sequential', '/free', '/Qauto-scalar','QxW'
                 '/QxSSE3', '/QaxAVX', '/f90-c-free','F90COM','/c:\MSDEV\BIN','/GM'
                 '/heap-arrays:1', 'fortCmd'+'f90-c-free-extend_source-xK-axW-w90-w95-WB-I%I',
                 # '/Od', '/Ob0'   # <-- Optimization
                 # '/Zi',          # <-- Debugging
                 '/include:%I', '/free']

link_sl=['LINK',
         '/nologo', '/NOENTRY', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64',
         '/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB', '/f90',
         '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB', '/DEFAULTLIB:LIBIFPORTMD', '/DEFAULTLIB:LIBMMD.LIB',
         '/DEFAULTLIB:kernel32.lib', '/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib',
         '/FIXED:NO', '/dll',
         '/def:%E', '/out:%U', '%F', '%A', '%L', '%B',
         'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib', 'advapi32.lib']

Subscribe to Comments for "Writing  ABAQUS UEL subroutines in Fortran 90 or higher versions ."

More comments

Syndicate

Subscribe to Syndicate