×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

User element subroutine VUEL in Fortran 90

User element subroutine VUEL in Fortran 90

User element subroutine VUEL in Fortran 90

(OP)
Dear Sir/Madam:

I am developing an element user subroutine (VUEL).
I have a Windows 7, 64 bit machine, and I am compiling using Intel Fortran 2011.
I am testing the possibility to run a VUEL with ABAQUS using a example available from the ABAQUS documentation. It is called: vuel_truss.for, and it is written in Fortran 77. The input file is called vuel_truss_3d_1el.inp. When I use these two files everything works in both cases, when I generate the object file and then I run ABAQUS, or when I just run the fortran subroutine from ABAQUS. Now I am trying to convert vuel_truss.for in Fortran 90, because I want to write mi VUEL in Fortran 90. I am able to generate the object file specifing that I need the "-free" format for the compilation using the command: "ifort -free vuel_truss.for". When I try to run the analysis from the object file I have the error:

C:\Users\oaklandmmi2\Desktop\Andrea\Research & Development\LDPM for ABAQUS\MMI\2
011-01-14 vuel_truss_3d_1el from ifort\Fortran 90\for>abq6101 interactive job=te
st input=vuel_truss_3d_1el user=vuel_truss.obj
Abaqus JOB test
Abaqus 6.10-1
Begin Linking Single Precision Abaqus/Explicit User Subroutines
2/22/2011 9:35:24 PM
   Creating library explicitU.lib and object explicitU.exp
End Linking Single Precision Abaqus/Explicit User Subroutines
2/22/2011 9:35:24 PM
Begin Linking Single Precision Abaqus/Package User Subroutines
2/22/2011 9:35:24 PM
   Creating library explicitU.lib and object explicitU.exp
End Linking Single Precision Abaqus/Package User Subroutines
2/22/2011 9:35:24 PM
Begin Analysis Input File Processor
2/22/2011 9:35:24 PM
Run pre.exe
Abaqus License Manager checked out the following licenses:
Abaqus/Explicit checked out 5 tokens.
<29 out of 40 licenses remain available>.
2/22/2011 9:35:27 PM
End Analysis Input File Processor
Begin Abaqus/Explicit Packager
2/22/2011 9:35:27 PM
Run package.exe
Abaqus License Manager checked out the following licenses:
Abaqus/Explicit checked out 5 tokens.
<29 out of 40 licenses remain available>.
Abaqus/Explicit 6.10-1                           DATE 22-Feb-2011  TIME 21:35:28


***ERROR: There is no element available in the model to control the stable
          time increment for Step 1. Please add a deformable element to
          control the stable time increment. Alternatively, you can use DIRECT
          TIME INCREMENTATION to perform the analysis at a user specified time
          increment.

2/22/2011 9:35:29 PM
Abaqus Error: Abaqus/Explicit Packager exited with an error - Please see the
status file for possible error messages if the file exists.
Abaqus/Analysis exited with errors

C:\Users\oaklandmmi2\Desktop\Andrea\Research & Development\LDPM for ABAQUS\MMI\2
011-01-14 vuel_truss_3d_1el from ifort\Fortran 90\for>

If I run the vuel_truss.for file I have a bunch of compiling errors if I do not add the flag '-free' in the compile fortran section:

compile_fortran=['ifort', '/c','/DABQ_WIN86_64', '-free',
                 '/recursive', '/Qauto-scalar', '/QxW', '/nologo', '/Od', '/include:%I']

what I observe also is that there is some difference in the dimension of the two object files generated from the Fortran 77 and 90 files.
To summarize, I would like to know how to make work Fortran 90 subroutine with ABAQUS.
Best,

Andrea.

See file here:

vuel_truss_3d_1el.inp

*Heading
 A one element truss along global x-axis modeled using user defined element.
 The element is coded in "vuel_truss.for".
 Geometrically Nonlinear, No mass scaling
*Parameter
 CsArea=1.002
 YoungsMod=2.1E7
 PoissonRatio=0.0
 Density=7200.0
*Node
 1, 0.0, 0.0, 0.0
 2, 1.0, 0.0, 0.0
*Nset, Nset=AllNodes
 1,2
*Nset, Nset=LeftNode
 1,
*nset, nset=qa_test_leftnode
 1,
*Nset, Nset=RightNode
 2,
*nset, nset=qa_test_rightnode
 2,
*User Element, Nodes=2, Type=VU2, Properties=4, Coordinates=3, Variables=2
 1, 2, 3
*Element, Type=VU2, Elset=AllElements
 1, 1, 2
*Uel Property, Elset=AllElements
 <CsArea>, <YoungsMod>, <PoissonRatio>, <Density>
*Boundary
 LeftNode, 1, 3, 0.0
 RightNode, 2, 3, 0.0
*Amplitude, Name=LoadAmp, Definition=Smooth Step
 0.0, 0.0, 1.0, 1.0
****************************************
*Step,Nlgeom=Yes
*Dynamic, Explicit, Element
 , 1.0
*Bulk Viscosity
 0.0, 0.0
*Cload, Amplitude=LoadAmp
 RightNode, 1, 1.0e6
*Output, Field, Var=Preselect
*Output, History, Freq=1
*Node Output, Nset=AllNodes
 U1, V1, A1, RF1
*node output, nset=qa_test_leftnode
 RF1,
*node output, nset=qa_test_rightnode
 u1,
*Energy Output
*End Step


vuel_truss.for (in Fortran 90)

! user element for truss along the X global axis
subroutine vuel( nblock, &
                ! to be defined
                rhs,amass,dtimeStable, &
                svars,nsvars, &
                energy, &  
                nnode,ndofel,props,nprops, &
                jprops,njprops,coords,ncrd, &
                u,du,v,a, &
                jtype,jelem, &
                time,period,dtimeCur,dtimePrev,kstep,kinc,lflags, &
                dMassScaleFactor, &
                predef,npredef,jdltyp,adlmag )

include 'vaba_param_dp.inc'

parameter ( zero = 0.d0, half = 0.5d0, one = 1.d0, two=2.d0 )

! operation code
parameter ( jMassCalc            = 1, &
            jIntForceAndDtStable = 2, &
            jExternForce         = 3 )

! flags
parameter ( iProcedure = 1, &
            iNlgeom    = 2, &
            iOpCode    = 3, &
            nFlags     = 3)

! time
parameter (iStepTime  = 1, &
           iTotalTime = 2, &
           nTime      = 2 )

! procedure flags
parameter ( jDynExplicit = 17 )

! energies
parameter ( iElPd = 1, &
            iElCd = 2, &
            iElIe = 3, &
            iElTs = 4, &
            iElDd = 5, &
            iElBv = 6, &
            iElDe = 7, &
            iElHe = 8, &
            iElKe = 9, &
            iElTh = 10, &
            iElDmd = 11, &
            iElDc = 12, &
            nElEnergy = 12)

! predefined variables
parameter ( iPredValueNew = 1,  &
            iPredValueOld = 2, &
            nPred         = 2 )    

! indexing in a 3-long vector

parameter (factorStable = 0.99d0)

dimension rhs( nblock,ndofel), amass(nblock,ndofel,ndofel), &
               dtimeStable(nblock), &
               svars(nblock,nsvars), energy(nblock,nElEnergy), &
               props(nprops), jprops(njprops), &
               jelem(nblock), time(nTime), lflags(nFlags), &
               coords(nblock,nnode,ncrd), u(nblock,ndofel), &
               du(nblock,ndofel), v(nblock,ndofel), a(nblock, ndofel), &
               dMassScaleFactor(nblock), &
               predef(nblock, nnode, npredef, nPred), adlmag(nblock)

!     VUEL subroutine for a truss element along the global X-axis only
!     superimposed with rotations at both ends
!     Limitations:
!       It will not work if motions along another direction other than X
!       Nodes must be noncoincident
!     Notes:
!        Define only nonzero entries; the arrays to be defined have
!        been zeroed out just before this call
!        for jInternForceOnly, one can use state vars to
!        compute initial forces at time zero (prestress)

if (jtype .eq. 2 .and. lflags(iProcedure).eq.jDynExplicit) then
area0 = props(1)
eMod  = props(2)
anu   = props(3)
rho   = props(4)

eDampTra    = zero         
amassFact0  = half*area0*rho

    if ( lflags(iOpCode).eq.jMassCalc ) then
        do kblock = 1, nblock
        
            ! use original distance to compute mass
            alenX0 = (coords(kblock,2,1) - coords(kblock,1,1))
            alenY0 = (coords(kblock,2,2) - coords(kblock,1,2))
            alenZ0 = (coords(kblock,2,3) - coords(kblock,1,3))
            alen0 = sqrt(alenX0*alenX0 + alenY0*alenY0 +alenZ0*alenZ0)
            am0   = amassFact0*alen0
            amass(kblock,1,1) = am0
            amass(kblock,2,2) = am0
            amass(kblock,3,3) = am0
            amass(kblock,4,4) = am0
            amass(kblock,5,5) = am0
            amass(kblock,6,6) = am0

        end do
    else if ( lflags(iOpCode) .eq. jIntForceAndDtStable) then
        do kblock = 1, nblock
            alenX0 = (coords(kblock,2,1) - coords(kblock,1,1))
            alenY0 = (coords(kblock,2,2) - coords(kblock,1,2))
            alenZ0 = (coords(kblock,2,3) - coords(kblock,1,3))
            alen0 = sqrt(alenX0*alenX0 + alenY0*alenY0 +alenZ0*alenZ0)
            vol0 = area0*alen0
            amElem0 = two*amassFact0*alen0
            alenX=alenX0+(u(kblock,4)-u(kblock,1))
            alenY=alenY0+(u(kblock,5)-u(kblock,2))
            alenZ=alenZ0+(u(kblock,6)-u(kblock,3))
            alen = sqrt(alenX*alenX + alenY*alenY + alenZ*alenZ)
            area   = vol0/alen
            ak     = area*eMod/alen

            ! undamped stable time increment for translations
            dtTrialTransl = sqrt(amElem0/ak)

            ! damped stable time increment; since eDampTra=0, the
            ! stable time increment does not change because of damping
            critDampTransl = two*sqrt(amElem0*ak)
            csiTra = eDampTra/critDampTransl
            factDamp = sqrt(one+csiTra*csiTra) - csiTra
            dtTrialTransl = dtTrialTransl*factDamp*factorStable
            dtimeStable(kblock) = dtTrialTransl
            
            ! force = E * logarithmic strain *current area
            strainLog = log(alen/alen0)
            fElasTra = eMod*strainLog*area
               
            forceTra = fElasTra

            ! assemble internal load in RHS
            rhs(kblock,1) = -forceTra
            rhs(kblock,4) =  forceTra

            ! internal energy calculation
            alenOld  = svars(kblock,1)
            fElasTraOld = svars(kblock,2)
               
            energy(kblock, iElIe) = energy(kblock, iElIe) + half*(fElasTra+fElasTraOld)*(alen - alenOld)

            ! update state variables
            svars(kblock,1) = alen
            svars(kblock,2) = fElasTra
               
        end do
    else if ( lflags(iOpCode) .eq. jExternForce) then
        if (jdltyp.eq.123) then
            do kblock = 1, nblock
                  rhs(kblock,4) = adlmag(kblock)
            end do
        end if
    end if
end if

return
end

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources