error #6236 for user defined function
error #6236 for user defined function
(OP)
SUBROUTINE DLOAD(F,KSTEP,KINC,TIME,NOEL,NPT,LAYER,KSPT,
1 COORDS,JLTYP,SNAME)
INCLUDE 'ABA_PARAM.INC'
DIMENSION TIME(2), COORDS (3)
CHARACTER*80 SNAME
PI=2.*ASIN(1.D0)
PARAMETER(DENSITY=1024D0,GRAVIATION=9.81D0,RADIUS=0.15D0,MINRADIUS=-0.15D0,RADIUS1=20)
CALL uwave(v,a,pdyn,dpdyndz,surf,lpdyn,lrecompute,luplocal,
1 lupglobal,lsurf,ndim,xcur,xintmed,grav,density,elevb,elevs,seed,
2 nspectrum,freqwamp,time,dtime,noel,npt,kstep,kinc)
MERGE=COORDS(3)-SURF
IF(MERGE.GE.RADIUS) THEN
MERGE=RADIUS
ELSE IF(MERGE.LE.MINRADIUS) THEN
MERGE=0.D0
END IF
THETA=ACOS(COORDS(3)/RADIUS)/180
AREA=THETA*PI*RADIUS**2-MERGE*SQRT(RADIUS**2-MERGE**2)
F=DENSITY*GRAVIATION*AREA*PI*RADIUS1
RETURN
END
!
!
SUBROUTINE uwave(v,a,pdyn,dpdyndz,surf,lpdyn,lrecompute,luplocal,
1 lupglobal,lsurf,ndim,xcur,xintmed,grav,density,elevb,elevs,seed,
2 nspectrum,freqwamp,time,dtime,noel,npt,kstep,kinc)
!
include 'aba_param.inc'
!
dimension v(ndim),a(ndim),xcur(ndim),xintmed(ndim)
dimension time(2),freqwamp(2,nspectrum)
!
parameter(pi=3.14159265358979d0,two=2.0d0,abig=1.d36)
parameter (const2=2.d10, twopi = 2.d0*pi )
!
luplocal=0
lupglobal=0
if(lrecompute.ne.0) then
! Only stochastic analysis with UWAVE can have lrecompute=1
! The user must set other flags accordingly; see User's manual.
else
! For regular Aqua analysis with UWAVE, lrecompute=0 always
!
!
! Wve definition for a single Airy wave component:
! Phase angle of waves: in radians
phase=0.0d0
!
! Wave travel direction:
xdir=1.0d0
ydir=0.0d0
!
! Period, wavelength, wave number, wave height, frequency:
!
period=15.d0
waveln=224.64d0
wavenum=twopi/waveln
wavehgt=1
freq=twopi/period
!
if (lsurf.eq.1) then
! Calculate the instantaneous water surface only, no
! wave kinematics are required:
wtp=-freq*time(2)+phase
sn=xdir*xcur(1)
if (ndim.eq.3) sn=sn+ydir*xcur(2)
termt=wavenum*sn+wtp
surf=elevs-wavehgt*cos(termt)
ENDIF
ENDIF
return
end
wave2.f(7): error #6236: A specification statement cannot appear in the executable section.
PARAMETER(DENSITY=1024D0,GRAVIATION=9.81D0,RADIUS=0.15D0)
------^
compilation aborted for wave2.f (code 1)
Abaqus Error: Problem during compilation - wave2.f
Abaqus/Analysis exited with errors
What is the problem? Thank you very much!
1 COORDS,JLTYP,SNAME)
INCLUDE 'ABA_PARAM.INC'
DIMENSION TIME(2), COORDS (3)
CHARACTER*80 SNAME
PI=2.*ASIN(1.D0)
PARAMETER(DENSITY=1024D0,GRAVIATION=9.81D0,RADIUS=0.15D0,MINRADIUS=-0.15D0,RADIUS1=20)
CALL uwave(v,a,pdyn,dpdyndz,surf,lpdyn,lrecompute,luplocal,
1 lupglobal,lsurf,ndim,xcur,xintmed,grav,density,elevb,elevs,seed,
2 nspectrum,freqwamp,time,dtime,noel,npt,kstep,kinc)
MERGE=COORDS(3)-SURF
IF(MERGE.GE.RADIUS) THEN
MERGE=RADIUS
ELSE IF(MERGE.LE.MINRADIUS) THEN
MERGE=0.D0
END IF
THETA=ACOS(COORDS(3)/RADIUS)/180
AREA=THETA*PI*RADIUS**2-MERGE*SQRT(RADIUS**2-MERGE**2)
F=DENSITY*GRAVIATION*AREA*PI*RADIUS1
RETURN
END
!
!
SUBROUTINE uwave(v,a,pdyn,dpdyndz,surf,lpdyn,lrecompute,luplocal,
1 lupglobal,lsurf,ndim,xcur,xintmed,grav,density,elevb,elevs,seed,
2 nspectrum,freqwamp,time,dtime,noel,npt,kstep,kinc)
!
include 'aba_param.inc'
!
dimension v(ndim),a(ndim),xcur(ndim),xintmed(ndim)
dimension time(2),freqwamp(2,nspectrum)
!
parameter(pi=3.14159265358979d0,two=2.0d0,abig=1.d36)
parameter (const2=2.d10, twopi = 2.d0*pi )
!
luplocal=0
lupglobal=0
if(lrecompute.ne.0) then
! Only stochastic analysis with UWAVE can have lrecompute=1
! The user must set other flags accordingly; see User's manual.
else
! For regular Aqua analysis with UWAVE, lrecompute=0 always
!
!
! Wve definition for a single Airy wave component:
! Phase angle of waves: in radians
phase=0.0d0
!
! Wave travel direction:
xdir=1.0d0
ydir=0.0d0
!
! Period, wavelength, wave number, wave height, frequency:
!
period=15.d0
waveln=224.64d0
wavenum=twopi/waveln
wavehgt=1
freq=twopi/period
!
if (lsurf.eq.1) then
! Calculate the instantaneous water surface only, no
! wave kinematics are required:
wtp=-freq*time(2)+phase
sn=xdir*xcur(1)
if (ndim.eq.3) sn=sn+ydir*xcur(2)
termt=wavenum*sn+wtp
surf=elevs-wavehgt*cos(termt)
ENDIF
ENDIF
return
end
wave2.f(7): error #6236: A specification statement cannot appear in the executable section.
PARAMETER(DENSITY=1024D0,GRAVIATION=9.81D0,RADIUS=0.15D0)
------^
compilation aborted for wave2.f (code 1)
Abaqus Error: Problem during compilation - wave2.f
Abaqus/Analysis exited with errors
What is the problem? Thank you very much!





RE: error #6236 for user defined function
FORTRAN layout is spilt into declaration and executable section.
Declaration section is first and executable second, you must not mix these two sections.
The executable section starts after first executable line and after it you must not put any declaration lines.
Here is executable section line:
CODE
CODE
Just change order of the lines and should be ok.
One more point, you cannot call one Abaqus subroutine from another one.
You are calling UWAVE from DLOAD. Abaqus manage calling of subroutines.
Please see bullets list in Abaqus Analysis User's Guide, 18.1.1 User subroutines: overview.
Regards,
Bartosz
VIM filetype plugin for Abaqus
https://github.com/gradzikb/vim-abaqus
RE: error #6236 for user defined function
Your suggestions are very helpful.