abaqus subrutine help

abaqus subrutine help

hi all

I write a subrutine for my work baut encountered with this error

Abaqus JOB 320
Abaqus 6.10-1
C:\SIMULIA\Abaqus\6.10-1\Python\Lib\jabber.py:68: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
Begin Compiling Single Precision Abaqus/Explicit User Subroutines
01/18/14 21:06:51
End Compiling Single Precision Abaqus/Explicit User Subroutines
01/18/14 21:06:52
Begin Linking Single Precision Abaqus/Explicit User Subroutines
01/18/14 21:06:52
   Creating library explicitU.lib and object explicitU.exp
payan name.obj : error LNK2019: unresolved external symbol _LN@4 referenced in function _VDLOAD
explicitU.dll : fatal error LNK1120: 1 unresolved externals
Abaqus Error: Problem during linking - Single Precision Abaqus/Explicit User Subroutines.
  This error may be due to a mismatch in the Abaqus user subroutine arguments.
  These arguments sometimes change from release to release, so user subroutines
  used with a previous release of Abaqus may need to be adjusted.
Abaqus/Analysis exited with errors

can any body help me?

please help it so important to me

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Without seeing your Fortran code I am guessing you have an undeclared array called LN which in the absence of any other clues the compiler assumes this is a call to a function LN and tries to find it at link time. You would be better attaching the Fortran code if it is small.

 

Best Reply

Add this to app4619's remarks: In Fortran, the natural logarithm function is called log, not ln.

thanks so much for your reply

this is my fortran cod with its attach file

C
C User subroutine VDLOAD
       subroutine vdload (
C Read only (unmodifiable) variables -
     *     nblock, ndim, stepTime, totalTime,
     *     amplitude, curCoords,
     *   velocity, dircos,jltyp, sname,
C Write only (modifiable) variable -
     *  value)
C
      include 'vaba_param_sp.inc'
C
      dimension curCoords(nblock,ndim),
     &     velocity(nblock,ndim),
     &     dircos(nblock,ndim,ndim),
     &     value(nblock)
      character*80 sname
!Definition of Parameters
!Rinw=Inside radius of the tube
!Routw=Outside radius of the tube
!Dinc=Inside diameter of the coil
!Dow=Outside diameter of the tube
!lw= Axial length of tube
!hw=Wall thickness of the tube
!lc= Axial length of coil
!hc=thickness of the coil
!dw=Skin depth in tube
!dc=Skin depth in coil
!rowp=Resistivity of tube
!rocoil=Resistivity of coil
!landa=Filling factor of coil
!mo=Permeability of free space
!E0=Initial charged voltage
!R=Equivalent resistance
!L=Equivalent inductance
!C=Capacitance of bank
!Rc=capacitor resistance
!R1=coil resistance
!R21=tube resistance
!L1=coil inductance
!L2=tube inductance
!Lc1=capacitor inductance
!M12=mutual inductance
!x=Number of turns
!Beta=Damping ratio of Equivalent circuit
!W=Angular frequency
!I0=Maximum intensity of the discharge current
!I=Current in the coil
!T=Time
!m=Number of division in thickness direction
!n=Number of division in length direction
!dr=Element size in thickness direction
!dh=Element size in length direction
!dt=Time increment
!Br=Radial component of magnetic field density
!Bz=Axial component of magnetic field density
!BZ0=Magnetic flux density in the air-gap between coil and tube
!J=Current in tube
!fr=Radial component of Lorentz force density
!fz=Axial component of Lorentz force density
!pr=Radial component of magnetic pressure
!pz=Axial component of magnetic pressure
!B.C=Boundary Condition
!BBz=Axial magnetic field in length of tube
!BBr=Radial magnetic field in lenght of tube
!------------------------------------------------
      ! Parameters
      !IMPLICIT NONE
      REAL:: h=0.6d-3,dr,dh,Dinc=52.2d-3,Dow=48.2d-3,hw=0.6d-3,
     &    lw=50d-3,lc=30d-3,hc=19.4d-3,mo=2.5d-8*3.14,landa=0.9d0,
     &  Routw=24.1d-3,r2,x=13.0d0,rocoil=1.72d-8,rowp=5.0d-8,C=256.0d-8,
     &  Rinw=23.5d-3,RR=15.0d-8,alfa,w,Beta,I0,dc,dw,x0,y0,i1=25.0d0,
     &  R1=1.78d-8,R21=5d-8,L1=5d-6,Lc1=3d-8,Rc=15d-8,j1=5.0d0,
     &  tf=35.0d-6,dt=1.0d-7,L=2.6d-8,t=0,ii1,A,C0,B,D,E,F,G,
     &  H0,B1,Bf,Bz0,Br0,Br,Bz,fr,fz,Q,Pr,Pz,Bz00,Q00,fr00,Time,j0,
     &  di=23.5d-3,bb,fr0,ss,kk,r,r0,z,u,hh,s,o,v,BBz0,BBz1,
     & BBr0,BBr1,BBz,BBr,itube,Btube,L2,M12
       
      Dimension:: Br(1000,1000),Br0(1000,1000),Bz(1000,1000),
     &  Bz0(1000,1000),fr(1000,1000),fz(1000,1000),Q(1000,1000),
     &  pr(1000),pz(1000),Bz00(1000),Q00(1000),fr00(1000),Time(1000),
     &  u(1000),hh(1000),v(1000),r(1000),z(1000),BBz(1000),kk(1000),
     &  BBz0(1000),BBz1(1000),BBr0(1000),BBr1(1000),
     &  BBr(1000),Btube(1000)
      INTEGER:: num=0d0,num1=0d0,number=0d0,i=0d0,j=0d0,
     &s m=5d0,n=50d0,E0=4300d0
      Br=0
      Bz=0
      dr=hw/m
      dh=lw/n
      r2=(Rinw+Routw)/2
      alfa=-rowp/mo
      W=(1/(L*C)-(RR**2)/(4*L**2))**0.5
      Beta=RR/(2*L)
      bb=E0/(L*W)
      dc=sqrt((2 *rocoil)/(mo*W))
      dw=sqrt((2*rowp)/(mo*W))
    
      t = stepTime
   ! print*,"time=",t
      do k = 1, nblock
!--------------------------------------------------------
! Current in coil
        ii1=bb*(exp(-Beta*t))*sin(W*t)
!   print*,ii1
!--------------------------------------------------------
!calculation of tube inductance
      L2 =(((1/mo)* lw)/(2*3.14))*(ln(2*lw/ Rinw)-3/4)
!--------------------------------------------------------
!calculation of mutual inductance
      M12 =((1/mo)* lw)/(2*3.14)*(ln(lw/2.4d-3)+
     &     ((1+(lw/2.4d-3)**2)**0.5)-
     &   (1+(2.4d-3/lw)**2)**0.5)+(2.4d-3/lw)
!--------------------------------------------------------
!calculation of Current in tube
      itube = -((-E0/5d-6)*(M12/L2)*(1/((W**2)+
     & (((7d-2)-Beta)**2))))*(((W**2)-
     & (Beta*((7d-2)-Beta))/7d-2)*(exp(-Beta*t))*sin(W*t)+
     & (W*(exp(-Beta*t))*cos(W*t))-(W*exp(-7d-2*t)))
! print*,itube
!--------------------------------------------------------
!calculation of nods coordinate
    ! r = radial coordinate
    ! z = axial coordinate
       do i = 1,50
       r(i) = curCoords(i,1)
       r0 = 2.61E-02
       z(i) = curCoords(i,2)
!---------------------------------------------------------
! calculation of geometry factor
       kk = sqrt((4 *r(i)*r0)/(((r0+r(i))**2)+(z(i)**2)))
       ! print*,'r',i,'=',r(i)
       ! print*,'z',i,'=',z(i)
       end do
!-----------------------------------------------------------
! calculation of s = K(k) first kind of Elliptic integrals
        do i=1,100
        u(i) = hh(500) +((kk(i)**(2*i))/(4*(i**2)))
        hh(500) = u(i)
        end do
        s = (3.14/2)*(1+u(100))
!-----------------------------------------------------------
! calculation of o = E(k) second kind of Elliptic integrals
        hh(500) = 0
        do i=1,100
        v(i) = hh(500) +((kk(i)**(2*i))/(4*(i**2)*((2*i)-1)))
        hh(500) = v(i)
        end do
        o = (3.14/2)*(1-v(100))
!-----------------------------------------------------------
! calculation of BBz = Bz0 Axial component of magnetic field density
        do i = 1,50
        BBz0(i) =((mo*ii1)/(2*3.14))*(1/sqrt((r0+r(i))**2)+(z(i)**2))*
     &   (o*((r0**2)-(r(i)**2)-(z(i)**2))/(((r0-r(i))**2)+(z(i)**2))+s)
        print*,BBz0(i)
        end do
        ! print*,BBz(25)
!-----------------------------------------------------------
! calculation of BBz = Bz1 Axial component of magnetic field density
        do i = 1,50
       BBz1(i) =((mo* itube)/(2*3.14))*(1/sqrt((r0+r(i))**2)+(z(i)**2))*
     & (o*((r0**2)-(r(i)**2)-(z(i)**2))/(((r0-r(i))**2)+(z(i)**2))+s)
        print*,BBz1(i)
        end do
!-----------------------------------------------------------
! calculation of BBz = Bz Axial component of magnetic field density
        BBz(i) = BBz0(i)+BBz1(i)
!-----------------------------------------------------------
! calculation of BBr = Br0 Radial component of magnetic field density
        do i = 1,50
        BBr0(i) =((mo*ii1)/(2*3.14))*(z(i)/r(i))*
     &   (1/sqrt((r0+r(i))**2)+(z(i)**2))*
     &   (o*((r0**2)+(r(i)**2)+(z(i)**2))/(((r0-r(i))**2)+(z(i)**2))-s)
        print*,BBr0(i)
        end do
!-----------------------------------------------------------
! calculation of BBr = Br1 Radial component of magnetic field density
        do i = 1,50
        BBr1(i) =((mo* itube)/(2*3.14))*(z(i)/r(i))*
     &  (1/sqrt((r0+r(i))**2)+(z(i)**2))*
     &   (o*((r0**2)+(r(i)**2)+(z(i)**2))/(((r0-r(i))**2)+(z(i)**2))-s)
        print*,BBr1(i)
        end do
!-----------------------------------------------------------
! calculation of BBr = Br Radial component of magnetic field density
        BBr(i) = BBr0(i)+BBr1(i)
!------------------------------------------------------------
! Magnetic field density in Up B.C of Tube
        do j=0,m
        Br(n+1,j+1)=0
        Bz(n+1,j+1)=0
        end do
! Magnetic field density Bottom B.C of Tube
        do j=0,m
        Br(1,j+1)=0
        Bz(1,j+1)=0
        end do
! Magnetic field density Right B.C of Tube
        do i=0,50
        Br(i+1,m+1)=0
        Bz(i+1,m+1)=BBz(i+1)
        end do
! Magnetic field density Left B.C of Tube
        do i=0,n
        Br(i+1,1)=0
        Bz(i+1,1)=0
        end do
!------------------------------------------------------------
! Calculation of component of magnetic field density
        do i = 2,50
         do j = 2,m+1
         Bz0 = BBz(i)
         Bz(i,j) =((-alfa*dt)/(dr**2))*(Bz0(i,j+1)+Bz0(i,j-1))+
     &      ((alfa*dt)/(2*dr*(di+j*dr)))*(Bz0(i,j-1)-
     &       Bz0(i,j+1))+dt*((2*alfa)/(dr**2)+(2*alfa)/(dh**2)+(1/dt))*
     & (Bz0(i,j))-((alfa*dt)/(dh**2))*(Bz0(i+1,j)+Bz0(i-1,j))
         end do
        end do
       ! print*,Bz(25,m)
!------------------------------------------------------------
! Calculation of radial component of magnetic field density
        do i = 2,50
         do j = 2,m+1
            Br0(i,j) = BBr(i)
         Br(i,j)=((-alfa*dt)/(dr**2))*(Br0(i,j+1)+Br0(i,j-1))+
     &    ((alfa*dt)/(2*dr*(di+j*dr)))*(Br0(i,j-1)-Br0(i,j+1))+dt*
     &    ((2*alfa)/(dr**2)+(2*alfa)/(dh**2)+(alfa/((di+j*dr)**2))+
     &    (1/dt))*(Br0(i,j))-((alfa*dt)/(dh**2))*(Br0(i+1,j)+Br0(i-1,j))
         end do
        end do
      ! print*,Br0(25,m)
!----------------------------------------------------------------------
! calculation of Radial Lorentz force
        do i=2,n
         do j=2,m
          fr(i,j)=(1/mo)*((Br(i+1,j)-Br(i-1,j))/(2*dh)-
     &      (Bz(i,j+1)-Bz(i,j-1))/(2*dr))*Bz(i,j)
         end do
        end do
!----------------------------------------------------------------------
! calculation of Axial Lorentz force
        do i=2,n
         do j=2,m
           fz(i,j)=(1/mo)*((Br(i+1,j)-Br(i-1,j))/(2*dh)-
     &      (Bz(i,j+1)-Bz(i,j-1))/(2*dr))*Br(i,j)
         end do
        end do
!----------------------------------------------------------------------
! calculation of Axial pressure
        do i=1,n+1
           pz(i)=0
           do j=1,m
               pz(i)=pz(i)+(fz(i,j)+fz(i,j+1))/2*dh
           end do
        end do
!----------------------------------------------------------------------
! calculation of Radial pressure
        do i=1,n+1
           pr(i)=0
           do j=1,m
              pr(i)=pr(i)+(fr(i,j)+fr(i,j+1))/2*dh
           end do
        end do
        value(k) = pr(i)
        
      end do
      return
             end

 

thanks so much for your reply

this is my fortran cod with its attach file

C
C User subroutine VDLOAD
       subroutine vdload (
C Read only (unmodifiable) variables -
     *     nblock, ndim, stepTime, totalTime,
     *     amplitude, curCoords,
     *   velocity, dircos,jltyp, sname,
C Write only (modifiable) variable -
     *  value)
C
      include 'vaba_param_sp.inc'
C
      dimension curCoords(nblock,ndim),
     &     velocity(nblock,ndim),
     &     dircos(nblock,ndim,ndim),
     &     value(nblock)
      character*80 sname
!Definition of Parameters
!Rinw=Inside radius of the tube
!Routw=Outside radius of the tube
!Dinc=Inside diameter of the coil
!Dow=Outside diameter of the tube
!lw= Axial length of tube
!hw=Wall thickness of the tube
!lc= Axial length of coil
!hc=thickness of the coil
!dw=Skin depth in tube
!dc=Skin depth in coil
!rowp=Resistivity of tube
!rocoil=Resistivity of coil
!landa=Filling factor of coil
!mo=Permeability of free space
!E0=Initial charged voltage
!R=Equivalent resistance
!L=Equivalent inductance
!C=Capacitance of bank
!Rc=capacitor resistance
!R1=coil resistance
!R21=tube resistance
!L1=coil inductance
!L2=tube inductance
!Lc1=capacitor inductance
!M12=mutual inductance
!x=Number of turns
!Beta=Damping ratio of Equivalent circuit
!W=Angular frequency
!I0=Maximum intensity of the discharge current
!I=Current in the coil
!T=Time
!m=Number of division in thickness direction
!n=Number of division in length direction
!dr=Element size in thickness direction
!dh=Element size in length direction
!dt=Time increment
!Br=Radial component of magnetic field density
!Bz=Axial component of magnetic field density
!BZ0=Magnetic flux density in the air-gap between coil and tube
!J=Current in tube
!fr=Radial component of Lorentz force density
!fz=Axial component of Lorentz force density
!pr=Radial component of magnetic pressure
!pz=Axial component of magnetic pressure
!B.C=Boundary Condition
!BBz=Axial magnetic field in length of tube
!BBr=Radial magnetic field in lenght of tube
!------------------------------------------------
      ! Parameters
      !IMPLICIT NONE
      REAL:: h=0.6d-3,dr,dh,Dinc=52.2d-3,Dow=48.2d-3,hw=0.6d-3,
     &    lw=50d-3,lc=30d-3,hc=19.4d-3,mo=2.5d-8*3.14,landa=0.9d0,
     &  Routw=24.1d-3,r2,x=13.0d0,rocoil=1.72d-8,rowp=5.0d-8,C=256.0d-8,
     &  Rinw=23.5d-3,RR=15.0d-8,alfa,w,Beta,I0,dc,dw,x0,y0,i1=25.0d0,
     &  R1=1.78d-8,R21=5d-8,L1=5d-6,Lc1=3d-8,Rc=15d-8,j1=5.0d0,
     &  tf=35.0d-6,dt=1.0d-7,L=2.6d-8,t=0,ii1,A,C0,B,D,E,F,G,
     &  H0,B1,Bf,Bz0,Br0,Br,Bz,fr,fz,Q,Pr,Pz,Bz00,Q00,fr00,Time,j0,
     &  di=23.5d-3,bb,fr0,ss,kk,r,r0,z,u,hh,s,o,v,BBz0,BBz1,
     & BBr0,BBr1,BBz,BBr,itube,Btube,L2,M12
       
      Dimension:: Br(1000,1000),Br0(1000,1000),Bz(1000,1000),
     &  Bz0(1000,1000),fr(1000,1000),fz(1000,1000),Q(1000,1000),
     &  pr(1000),pz(1000),Bz00(1000),Q00(1000),fr00(1000),Time(1000),
     &  u(1000),hh(1000),v(1000),r(1000),z(1000),BBz(1000),kk(1000),
     &  BBz0(1000),BBz1(1000),BBr0(1000),BBr1(1000),
     &  BBr(1000),Btube(1000)
      INTEGER:: num=0d0,num1=0d0,number=0d0,i=0d0,j=0d0,
     &s m=5d0,n=50d0,E0=4300d0
      Br=0
      Bz=0
      dr=hw/m
      dh=lw/n
      r2=(Rinw+Routw)/2
      alfa=-rowp/mo
      W=(1/(L*C)-(RR**2)/(4*L**2))**0.5
      Beta=RR/(2*L)
      bb=E0/(L*W)
      dc=sqrt((2 *rocoil)/(mo*W))
      dw=sqrt((2*rowp)/(mo*W))
    
      t = stepTime
   ! print*,"time=",t
      do k = 1, nblock
!--------------------------------------------------------
! Current in coil
        ii1=bb*(exp(-Beta*t))*sin(W*t)
!   print*,ii1
!--------------------------------------------------------
!calculation of tube inductance
      L2 =(((1/mo)* lw)/(2*3.14))*(ln(2*lw/ Rinw)-3/4)
!--------------------------------------------------------
!calculation of mutual inductance
      M12 =((1/mo)* lw)/(2*3.14)*(ln(lw/2.4d-3)+
     &     ((1+(lw/2.4d-3)**2)**0.5)-
     &   (1+(2.4d-3/lw)**2)**0.5)+(2.4d-3/lw)
!--------------------------------------------------------
!calculation of Current in tube
      itube = -((-E0/5d-6)*(M12/L2)*(1/((W**2)+
     & (((7d-2)-Beta)**2))))*(((W**2)-
     & (Beta*((7d-2)-Beta))/7d-2)*(exp(-Beta*t))*sin(W*t)+
     & (W*(exp(-Beta*t))*cos(W*t))-(W*exp(-7d-2*t)))
! print*,itube
!--------------------------------------------------------
!calculation of nods coordinate
    ! r = radial coordinate
    ! z = axial coordinate
       do i = 1,50
       r(i) = curCoords(i,1)
       r0 = 2.61E-02
       z(i) = curCoords(i,2)
!---------------------------------------------------------
! calculation of geometry factor
       kk = sqrt((4 *r(i)*r0)/(((r0+r(i))**2)+(z(i)**2)))
       ! print*,'r',i,'=',r(i)
       ! print*,'z',i,'=',z(i)
       end do
!-----------------------------------------------------------
! calculation of s = K(k) first kind of Elliptic integrals
        do i=1,100
        u(i) = hh(500) +((kk(i)**(2*i))/(4*(i**2)))
        hh(500) = u(i)
        end do
        s = (3.14/2)*(1+u(100))
!-----------------------------------------------------------
! calculation of o = E(k) second kind of Elliptic integrals
        hh(500) = 0
        do i=1,100
        v(i) = hh(500) +((kk(i)**(2*i))/(4*(i**2)*((2*i)-1)))
        hh(500) = v(i)
        end do
        o = (3.14/2)*(1-v(100))
!-----------------------------------------------------------
! calculation of BBz = Bz0 Axial component of magnetic field density
        do i = 1,50
        BBz0(i) =((mo*ii1)/(2*3.14))*(1/sqrt((r0+r(i))**2)+(z(i)**2))*
     &   (o*((r0**2)-(r(i)**2)-(z(i)**2))/(((r0-r(i))**2)+(z(i)**2))+s)
        print*,BBz0(i)
        end do
        ! print*,BBz(25)
!-----------------------------------------------------------
! calculation of BBz = Bz1 Axial component of magnetic field density
        do i = 1,50
       BBz1(i) =((mo* itube)/(2*3.14))*(1/sqrt((r0+r(i))**2)+(z(i)**2))*
     & (o*((r0**2)-(r(i)**2)-(z(i)**2))/(((r0-r(i))**2)+(z(i)**2))+s)
        print*,BBz1(i)
        end do
!-----------------------------------------------------------
! calculation of BBz = Bz Axial component of magnetic field density
        BBz(i) = BBz0(i)+BBz1(i)
!-----------------------------------------------------------
! calculation of BBr = Br0 Radial component of magnetic field density
        do i = 1,50
        BBr0(i) =((mo*ii1)/(2*3.14))*(z(i)/r(i))*
     &   (1/sqrt((r0+r(i))**2)+(z(i)**2))*
     &   (o*((r0**2)+(r(i)**2)+(z(i)**2))/(((r0-r(i))**2)+(z(i)**2))-s)
        print*,BBr0(i)
        end do
!-----------------------------------------------------------
! calculation of BBr = Br1 Radial component of magnetic field density
        do i = 1,50
        BBr1(i) =((mo* itube)/(2*3.14))*(z(i)/r(i))*
     &  (1/sqrt((r0+r(i))**2)+(z(i)**2))*
     &   (o*((r0**2)+(r(i)**2)+(z(i)**2))/(((r0-r(i))**2)+(z(i)**2))-s)
        print*,BBr1(i)
        end do
!-----------------------------------------------------------
! calculation of BBr = Br Radial component of magnetic field density
        BBr(i) = BBr0(i)+BBr1(i)
!------------------------------------------------------------
! Magnetic field density in Up B.C of Tube
        do j=0,m
        Br(n+1,j+1)=0
        Bz(n+1,j+1)=0
        end do
! Magnetic field density Bottom B.C of Tube
        do j=0,m
        Br(1,j+1)=0
        Bz(1,j+1)=0
        end do
! Magnetic field density Right B.C of Tube
        do i=0,50
        Br(i+1,m+1)=0
        Bz(i+1,m+1)=BBz(i+1)
        end do
! Magnetic field density Left B.C of Tube
        do i=0,n
        Br(i+1,1)=0
        Bz(i+1,1)=0
        end do
!------------------------------------------------------------
! Calculation of component of magnetic field density
        do i = 2,50
         do j = 2,m+1
         Bz0 = BBz(i)
         Bz(i,j) =((-alfa*dt)/(dr**2))*(Bz0(i,j+1)+Bz0(i,j-1))+
     &      ((alfa*dt)/(2*dr*(di+j*dr)))*(Bz0(i,j-1)-
     &       Bz0(i,j+1))+dt*((2*alfa)/(dr**2)+(2*alfa)/(dh**2)+(1/dt))*
     & (Bz0(i,j))-((alfa*dt)/(dh**2))*(Bz0(i+1,j)+Bz0(i-1,j))
         end do
        end do
       ! print*,Bz(25,m)
!------------------------------------------------------------
! Calculation of radial component of magnetic field density
        do i = 2,50
         do j = 2,m+1
            Br0(i,j) = BBr(i)
         Br(i,j)=((-alfa*dt)/(dr**2))*(Br0(i,j+1)+Br0(i,j-1))+
     &    ((alfa*dt)/(2*dr*(di+j*dr)))*(Br0(i,j-1)-Br0(i,j+1))+dt*
     &    ((2*alfa)/(dr**2)+(2*alfa)/(dh**2)+(alfa/((di+j*dr)**2))+
     &    (1/dt))*(Br0(i,j))-((alfa*dt)/(dh**2))*(Br0(i+1,j)+Br0(i-1,j))
         end do
        end do
      ! print*,Br0(25,m)
!----------------------------------------------------------------------
! calculation of Radial Lorentz force
        do i=2,n
         do j=2,m
          fr(i,j)=(1/mo)*((Br(i+1,j)-Br(i-1,j))/(2*dh)-
     &      (Bz(i,j+1)-Bz(i,j-1))/(2*dr))*Bz(i,j)
         end do
        end do
!----------------------------------------------------------------------
! calculation of Axial Lorentz force
        do i=2,n
         do j=2,m
           fz(i,j)=(1/mo)*((Br(i+1,j)-Br(i-1,j))/(2*dh)-
     &      (Bz(i,j+1)-Bz(i,j-1))/(2*dr))*Br(i,j)
         end do
        end do
!----------------------------------------------------------------------
! calculation of Axial pressure
        do i=1,n+1
           pz(i)=0
           do j=1,m
               pz(i)=pz(i)+(fz(i,j)+fz(i,j+1))/2*dh
           end do
        end do
!----------------------------------------------------------------------
! calculation of Radial pressure
        do i=1,n+1
           pr(i)=0
           do j=1,m
              pr(i)=pr(i)+(fr(i,j)+fr(i,j+1))/2*dh
           end do
        end do
        value(k) = pr(i)
        
      end do
      return
             end

 

Best Reply

If you read mecej4's post regarding Fortran's use of LOG function as same as LN function as used by different languages you will note that your program as numerous references to LN such as:

!calculation of tube inductance
      L2 =(((1/mo)* lw)/(2*3.14))*(ln(2*lw/ Rinw)-3/4)

That is just in one place, your code has references to "ln" elsewhere.

Either LN is a missing function from the system where you obtained the code, in which case you have to find this function and incorporate it int your build.

Or, LN is supposed to be the natural log function, which in Intel Fortran is LOG, in which case you replace "ln" with "log".

(keep track of your changes)

From the comments, it would seem like you need to substitute "log" for "ln"

Jim Dempsey.

www.quickthreadprogramming.com
Best Reply

As I suspected earlier, you have used the name ln for the natural logarithm function. Change all instances of that to the Fortran intrinsic name, log.

thanks again i changed it to log and it fixed

 

Mohamad,

If you have numerous source files in your application, you might want to search your original files to see if it happened to have used "LOG" as a defined variable (integer, real, logical, character). If the source files did not use LOG as a variable name, then the edits you performed to change LN to LOG (ln to log) will be all that you need to have done. However, if your old code used LOG as a variable name (integer, real, logical, character), then you must check to verify that your edits do not introduce an error due to conflicting names.

Jim Dempsey

www.quickthreadprogramming.com

I don't like your integer declarations as you are mixing the kind of your constants.
Should E0 be integer ?
"s m=5d0" : does this define m or an integer variable sm ?

      INTEGER:: num=0d0,num1=0d0,number=0d0,i=0d0,j=0d0,
&s m=5d0,n=50d0,E0=4300d0
 

This could become :

      INTEGER:: num=0, num1=0, number=0, i=0, j=0,
&    m=5, n=50
      REAL :: E0 = 4300.

Also, 4300d0 is a double precision constant, but 4300. is a real constant.

This might not relate to the problems you are identifying.

Leave a Comment

Please sign in to add a comment. Not a member? Join today