Hi,
I realise that stochastic diffusion is not implemented in Telemac3D but I still would like to see the influence of this in the horizontal plane in a 3D study.
I have copied streamline.f into my user_fortran directory and modified the SCHAR_41 subroutine by adding:
///////////////////////////////////////////////////////////
DZ(IPLOT) = ((W(I1,IET )*SHP(1,IPLOT)
& + W(I2,IET )*SHP(2,IPLOT)
& + W(I3,IET )*SHP(3,IPLOT))*(1.D0-SHZ(IPLOT))
& +(W(I1,IET+1)*SHP(1,IPLOT)
& + W(I2,IET+1)*SHP(2,IPLOT)
& + W(I3,IET+1)*SHP(3,IPLOT))*SHZ(IPLOT) ) * PAS
ENDIF
!
! STOCHASTIC DIFFUSION
!
! IF(STOCHA.EQ.1) THEN
! COMPUTING LOCAL VISCOSITY
! A=MAX(VISCVI%ADR(1)%P%R(I1)*SHP(1,IPLOT)
! & +VISCVI%ADR(1)%P%R(I2)*SHP(2,IPLOT)
! & +VISCVI%ADR(1)%P%R(I3)*SHP(3,IPLOT),0.D0)
! B=MAX(VISCVI%ADR(2)%P%R(I1)*SHP(1,IPLOT)
! & +VISCVI%ADR(2)%P%R(I2)*SHP(2,IPLOT)
! & +VISCVI%ADR(2)%P%R(I3)*SHP(3,IPLOT),0.D0)
! DISPLACEMENT DUE TO RANDOM DIFFUSION
A=0.6D0
B=0.6D0
DEUXPI=2.D0*ACOS(-1.D0)
CALL RANDOM_NUMBER(RAND1)
CALL RANDOM_NUMBER(RAND2)
C=SQRT(-2.D0*LOG(RAND1))
D=C*COS(DEUXPI*RAND2)
E=C*SIN(DEUXPI*RAND2)
DIFF_X=D*SQRT(1.D0*A/1.D0)
DIFF_Y=E*SQRT(1.D0*B/1.D0)
DX(IPLOT) = DX(IPLOT) + DIFF_X*SQRT(ABS(PAS))
DY(IPLOT) = DY(IPLOT) + DIFF_Y*SQRT(ABS(PAS))
! ENDIF
WRITE (LU,*) 'HERE!:'
XP = XPLOT(IPLOT) + DX(IPLOT)
YP = YPLOT(IPLOT) + DY(IPLOT)
ZP = ZPLOT(IPLOT) + DZ(IPLOT)
//////////////////////////////////////////////////////
Adding the WRITE statement was to check that the code was being accessed but it doesn't appear to be reaching this line or using the SCHAR_41 subroutine when running my case.
Is this the correct way to do this or am I missing something?
Thanks for any help or suggestions,
Tom