这里是Fortran的新手,我正在修改一些现有的源代码。我已经定义了所有变量,我认为数学是正确的但是我在编译时仍然会遇到以下错误:
CPT_UD_lib_Curved.F90:68:2:
ecrit = CSL_a - CSL_b * (P0 / 100.0) ** CSL_c
1
Error: Unclassifiable statement at (1)
CPT_UD_lib_Curved.F90:118:2:
ecrit_im = CSL_a - CSL_b * (Pimage(i) / 100.0) ** CSL_c
1
Error: Unclassifiable statement at (1)
CPT_UD_lib_Curved.F90:174:4:
ecrit = CSL_a - CSL_b * (Pval(i) / 100.0) ** CSL_c
1
Error: Unclassifiable statement at (1)
CPT_UD_lib_Curved.F90:178:4:
ecrit_im = CSL_a - CSL_b * (Pimage(i) / 100.0) ** CSL_c
1
Error: Unclassifiable statement at (1)
我正在使用gfortran与MinGW进行编译。以下是我的一些代码:
SUBROUTINE InitState(CSL_a, CSL_b, CSL_c,Mcrit,Ncrit,Chi,Chi_im, &
Hy,H0,Hmod,psi,VoidRatio,OCR,Pval,Qval,Pimage,PimageOld,Dmin, &
PimageMax,PsiImage,XH,Mitc,dilate,psi0,sigR0,sigT0,NumElem)
!----------------------------------------------------------------------------
! assign initial state values to each element
!----------------------------------------------------------------------------
!
real, intent(out) :: Pval(:), Qval(:)
real, intent(out) :: Pimage(:), PimageOld(:),PimageMax(:),Dmin(:)
real, intent(out) :: psi(:), PsiImage(:), VoidRatio(:)
real, intent(out) :: dilate(:), Mitc(:)
real, intent(out) :: Hmod(:), XH(:)
real :: Mcrit, Ncrit, Lambda_e, CSL_a, CSL_b, CSL_c, e0, Chi, Chi_im, Hmod0
real :: Pimage0
real :: SpacingRatio
real :: ecrit
real :: PimageOverP, PimageOverP_max, psi0
real :: PsiImage0, Dmin0
real :: H0, Hy
real :: sigR0, sigT0, Q0, P0, Mitc0
real :: eta0, dilate0
real :: OCR
integer :: i, NumElem
!
Q0 = sigR0 - sigT0
P0 = (sigR0 + 2.0 * sigT0)/3.
eta0=Q0/P0
! General flow rule
Mitc0 = Mcrit - Ncrit*Chi*abs(psi0)
SpacingRatio = exp(1.-eta0/Mitc0)
PimageOverP = OCR / SpacingRatio
PsiImage0 = psi0 + CSL_b * (PimageOverP / 100.0) ** CSL_c
! repeat to get better PsiImage0 value
Mitc0 = Mcrit - Ncrit*Chi_im*abs(PsiImage0)
SpacingRatio = exp(1.-eta0/Mitc0)
PimageOverP = OCR / SpacingRatio
PsiImage0 = psi0 + CSL_b * (PimageOverP / 100.0) ** CSL_c
! now continue with the Pimage initial values
PimageOverP_max = exp(-Chi_im * PsiImage0 / Mitc0)
Pimage0 = PimageOverP * P0
Dmin0 = chi_im * PsiImage0 !* Mi0 / Mi_tc0
dilate0 = Mitc0 *(log(P0) - log(Pimage0))
!
! *** current critical void ratio set to match chosen psi
ecrit = CSL_a – CSL_b *(P0 / 100.0) ** CSL_c
e0 = psi0 + ecrit
! The 'in situ' hardening relation
Hmod0 = set_H(H0, Hy, Psi0)
!
! Now set initial values for all elements
!
VoidRatio(:) = e0
Hmod(:) = Hmod0
Pval(:) = P0
Qval(:) = Q0
! current image state
Pimage(:) = Pimage0
PimageOld(:) = Pimage0
PsiImage(:) = PsiImage0
Dmin(:) = Dmin0
psi(:) = psi0
Mitc(:) = Mitc0
! the flow rule
dilate(:) = dilate0
DO 1 i=1,NumElem
PimageMax(i) = PimageOverP_max * P0
XH(i) = Hmod0 * Pval(i)/ PimageOld(i) * (PimageMax(i) - PimageOld(i))
1 CONTINUE
RETURN
END SUBROUTINE InitState
SUBROUTINE GNorSand (Pimage,Pnew,Qnew,fvalue,i, VoidRatio, depsV, CSL_a, CSL_b, CSL_c, &
Mcrit, Ncrit, Chi_im)
! ---------------------------------------------------------------------------
! this function returns the measure of yield exceedence for triaxial
! compression behaviour of soil using the NorSand constitutive model
! F=0 is on yield surface, F<0 is elastic, F>0 is yielding
!
! NB: this is for loading and there are no checks for unloading/reloading
! ---------------------------------------------------------------------------
!
real :: Pimage(:)
real :: Qnew, Pnew
integer :: i
real, intent(out) :: fvalue
!
real :: VoidRatio(:), depsV(:)
real :: CSL_a, CSL_b, CSL_c, Mcrit, Ncrit, Chi_im
real :: MitcNew, Void, ecrit_im, PsiIm
Void = VoidRatio(i) - (1 + VoidRatio(i)) * depsV(i)
ecrit_im = CSL_a – CSL_b * (Pimage(i) / 100.0) ** CSL_c
PsiIm = Void - ecrit_im
MitcNew = Mcrit - Ncrit * Chi_im * abs(PsiIm)
fvalue = Qnew - Pnew * MitcNew * (1. + log(Pimage(i)) - log(Pnew))
END SUBROUTINE GNorSand
SUBROUTINE UpdateState(CSL_a,CSL_b,CSL_c,Mcrit,Ncrit,Chi_im,Hy,H0,Hmod, &
Pval,Qval,Pimage,PimageOld,Dmin,PimageMax,PsiImage,psi,Mitc,XH,dilate,VoidRatio, &
NumElem,depsV,sigmaR,sigmaT1,sigmaT2,sigmaRold,sigmaT1old,sigmaT2old)
!
real :: sigmaR(0:), sigmaT1(0:), sigmaT2(0:), sigmaRold(0:), sigmaT1old(0:), sigmaT2old(0:)
real :: Pval(:), Qval(:)
real :: Pimage(:), PimageOld(:),PimageMax(:), Dmin(:)
real :: VoidRatio(:), psi(:), PsiImage(:)
real :: dilate(:), Mitc(:)
real :: depsV(:)
real :: Hmod(:), XH(:)
real :: sigM, sigQ, Pold
real :: Mcrit, Ncrit, Chi_im
real :: CSL_a,CSL_b,CSL_c
real :: H0, Hy
real :: ecrit, ecrit_im
real :: Psi_imO, PsiO
real :: PsiIm
real :: MitcOld, MiOld
real :: PimageMaxOld, PimageOverP_max
real :: eta
integer NumElem
integer i
!
DO 1 i = 1, NumElem
Psi_imO = PsiImage(i)
PsiO = Psi(i)
MitcOld = Mitc(i)
MiOld = MitcOld
PimageMaxOld = PimageMax(i)
Pold = Pval(i)
! now update all properties with the new stresses
sigmaRold(i) = sigmaR(i)
sigmaT1old(i) = sigmaT1(i)
sigmaT2old(i) = sigmaT2(i)
sigM = (sigmaR(i) + sigmaT1(i) + sigmaT2(i)) / 3.0
sigQ = sigmaR(i) - sigmaT1(i)
Pval(i) = sigM
Qval(i) = sigQ
eta = sigQ/sigM
!
VoidRatio(i) = VoidRatio(i) - (1 + VoidRatio(i)) * depsV(i)
ecrit = CSL_a – CSL_b * (Pval(i) / 100.0) ** CSL_c
psi(i) = VoidRatio(i) - ecrit
! PsiIm = e - e_crit @ Pimage
ecrit_im = CSL_a – CSL_b * (Pimage(i) / 100.0) ** CSL_c
PsiIm = VoidRatio(i) - ecrit_im
Mitc(i) = Mcrit - Ncrit*Chi_im*abs(PsiIm)
PsiImage(i) = PsiIm
Mitc(i) = Mcrit - Ncrit*Chi_im*abs(PsiIm)
PimageOverP_max = exp(-Chi_im * PsiIm/Mitc(i))
PimageMax(i) =PimageOverP_max * Pval(i)
! dilate(i) = Mitc(i) *(log(Pval(i)) - log(Pimage(i)))
dilate(i) = Mitc(i) - eta
Hmod(i) = set_H(H0, Hy, Psi(i)) !linear
XH(i) = Hmod(i) * Pval(i)/Pimage(i) * (PimageMax(i) - Pimage(i))
PimageOld(i) = Pimage(i)
Dmin(i) = chi_im * PsiImage(i) !* Mi0 / Mi_tc0
1 CONTINUE
RETURN
END SUBROUTINE UpdateState
有没有人知道这个问题会是什么?