Hello,
When the free surface elevation falls below the maximum bank height I get exceeding maximum iterations. I've programmed calcot to create layers at the bottom. Using mesh transformation = 1 it works fine, suggesting the code is the problem.
Working iteration:
Error:
The elements look crushed against the prescribed bottom layers, so I think it's something to do with how the distances are regulated.
The code (full code attached) is simple: the code determines the distance of three layers off the bottom and sets their Transformation value = 3 so it's ignored by sigma transform later.
!apply three layers
DO IPLAN=2,4
DO IPOIN = 1,NPOIN2
ZZ(IPOIN,2)= ZZ(IPOIN,1) + 0.01D0
ZZ(IPOIN,3)= ZZ(IPOIN,1) + 0.02D0
ZZ(IPOIN,4)= ZZ(IPOIN,1) + 0.03D0
ENDDO
ENDDO
DO IPLAN=2,4
TRANSF_PLANE%I(IPLAN)=3
ENDDO
Key is that I also changed the checks between planes to treat the new planes as the bottom (i.e. DO IPLAN = 5 rather than IPLAN = 1, and ZFP = ZZ(IPOIN,4).
!regulate layers
DO IPLAN=5,NPLAN-1
IF(TRANSF_PLANE%I(IPLAN).EQ.3) THEN
RPLS = DBLE(NPLAN-IPLAN) / DBLE(NPLAN)
RPLI = DBLE(IPLAN- 1) / DBLE(NPLAN)
DO IPOIN = 1,NPOIN2
ZFP = ZZ(IPOIN,4)
ZSP = ZZ(IPOIN,NPLAN)
DISBOT = MIN(ZSP-ZFP,DISMIN_BOT)
DISSUR = MIN(ZSP-ZFP,DISMIN_SUR)
ZZ(IPOIN,IPLAN)=MIN( ZSP-DISSUR*RPLS,
& MAX(ZPLANE%R(IPLAN),ZFP+DISBOT*RPLI))
ENDDO
ENDIF
ENDDO
I changed these to prevent crashing between the sigma transform layers and the new prescribed layers, however would this contribute to the error received above?
Many thanks!