Welcome, Guest
Username: Password: Remember me

TOPIC: Elder Turbulence Model

Elder Turbulence Model 7 years 1 month ago #27903

  • kingja.x
  • kingja.x's Avatar
I'm struggling to get my head around the coding of the Elder turbulence model. I can understand most of the FORTRAN coding I've looked at in the TELEMAC sources so I'm sure I'm missing something obvious and would appreciate if someone could help explain it to me.

In disper.f
00094 !-----------------------------------------------------------------------
00095 ! COMPUTES DISPERSION COEFFICIENTS
00096 !-----------------------------------------------------------------------
00097 !
00098       NPOIN = VISC%DIM1
00099       NPX   = VISC%MAXDIM1
00100 !
00101       DO I=1,NPOIN
00102 !
00103         NORMV = MAX(SQRT(U(I)**2+V(I)**2),1.D-6)
00104         COST = U(I)/NORMV
00105         SINT = V(I)/NORMV
00106         USTAR = SQRT( 0.5D0 * CF(I) * ( U(I)**2 + V(I)**2 ) )
00107         KL = ELDER(1) * USTAR * H(I)
00108         KT = ELDER(2) * USTAR * H(I) ! I understand up to here
00109         VISC%R(I      ) = PROPNU + ( KL - KT ) * COST**2    + KT
00110         VISC%R(I+NPX  ) = PROPNU + ( KT - KL ) * COST**2    + KL
00111         VISC%R(I+2*NPX) = PROPNU + ( KL - KT ) * COST*SINT
00112 !
00113       ENDDO ! I

I don't understand what values are contained in NPX. MAXDIM1 returns the maximum size per dimension so does this contain 2 values as VISC(NPOIN,3), 1st col - x dim, 2nd col y dim, 3rd col z dim?
00071 !| VISC           |<--| COEFFICIENTS OF DISPERSION TENSOR VISC(NPOIN,3)

Following on from this, which locations do VISC%R(I+NPX ) and VISC%R(I+2*NPX) refer to if there are only NPOIN rows and I is being looped from 1:NPOIN? At a guess, do +NPX and +2*NPX assign a value to the Ith row of the 2nd and 3rd column of VISC respectively?

Thanks
Jon
The administrator has disabled public write access.

Elder Turbulence Model 7 years 1 month ago #27909

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Actually VISC is meant as VISC(VISC%MAXDIM1,VISC%DIM2), and VISC%MAXDIM1 may be larger than the real size VISC%DIM1. Here VISC%R, like all BIEF_OBJ arrays in Telemac, has only one dimension, so we have to compute the position of e.g. VISC(I,3) in a one-dimensionnal array, and it is VISC%R(2*VISC%MAXDIM1+I). So all this complicated stuff is just to find the correct address in the two-dimensional array, knowing how Fortran stores numbers in the memory.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.