Hello,
My friction model almost works!
Everything runs smoothly until 1m 24s into my run when I get the dreaded EXCEEDING MAXIMUM ITERATIONS error. Looking at the results I suddenly get very high velocities at the bank (see image). I don't think this is a mesh error as it has been used successfully for other models.
I assume it is a numerical issue.
My code is:
IF (I1.NE.0) THEN
TIERS = 1.D0/3.D0
MN = 0.001
IPLAN = NPLAN !for layers at that node
I3D = I1+NPOIN2*(IPLAN-1) !get the 3D node IDs
I3D = UID3+NPOIN2*(NPLAN-1)
CF = 2.D0*(MN**2)*GRAV/HC%R(I)**TIERS !calculate coeff CF
S1U%R(I3D)=SQRT(CF*((UN3%R(I3D)**2)+(VN3%R(I3D)**2))) !apply friction
END IF
It finds the nodes (I1) pertinent for the section on parallel. Then, at the free surface, it applies a skin friction term to affect surface velocities S1U%R. I'm using the coefficient CF as calculated using Manning's n.
I tested this code using a simple drag calculation (i.e. S1U%R(I3D)=0.5D0*A*CD2*NORM) and it worked fine.
Is there something wrong in my equations?