Some problems on wall shear stress calculation
Posted: Mon Nov 10, 2014 3:19 pm
Dear developer and users,
I am now doing the large eddy simulation by using code_saturne 3.0.1 and 3.0.3.
I was trying to develop some subroutines to calculated the wall shear stress and friction velocity. I followed some reply in the post-post 'wall shear stress calculation':
http://code-saturne.org/forum/viewtopic ... ress#p6055
But I came across some compiling issues. I will point out what I did in the following secteces.
In order to define two new user-defined arrays 'usertau' and 'userutau', the following lines was added in the subroutine 'usipph' in 'cs_user_parameters.f90'
double precision, allocatable, dimension(:) :: usertau, userutau
.......
allocate(usertau(nfac))
allocate(userutau(nfac))
Instead find the instantaneous value I need the averaged value. The following lined were added in 'clptur.f90' to calculate the sum of wall shear stress and friction velocity after the time steps more than 3600.
if(iturb.eq.42.and.idries.eq.0) then
tau = romc*uet**2
tau0 = 0.0d0
uet0 = 0.0d0
if (ntcabs .gt. 3600) then
tau0 = tau0+tau
uet0 = uet0+uet
endif
usertau(ifac) = tau0
userutau(ifac) = uet0
endif
To show the results in the post-procession part. The following lines had been added in the 'cs_user_postprocess_var.f90' following the 'output of the density at boundary'
call post_write_var(ipart, 'Wall_Shear_Stress', idimt, ientla, ivarpr, &
ntcabs, ttcabs, rvoid, rvoid, usertau)
call post_write_var(ipart, 'Friction_Velcoity', idimt, ientla, ivarpr, &
ntcabs, ttcabs, rvoid, rvoid, userutau).
I came across following compiling errors:
in 'cs_user_parameters.f90':
allocate(usertau(nfac))
1
Error: Symbol 'nfac' at (1) has no IMPLICIT type
in 'clpturb':
usertau(ifac) = tau0
1
Error: Unexpected STATEMENT FUNCTION statement at (1)
\xC2\xA0 userutau(ifac) = uet0
1
Error: Invalid character in name at (1)
in 'cs_user_postprocess_var.f90'
Error: Symbol 'usertau' at (1) has no IMPLICIT type
Error: Symbol 'userutau' at (1) has no IMPLICIT type
Can you please give me some suggestions on these issues? These subroutine and compile log can be found in the attachment.
Thanks in advance,
Yu
I am now doing the large eddy simulation by using code_saturne 3.0.1 and 3.0.3.
I was trying to develop some subroutines to calculated the wall shear stress and friction velocity. I followed some reply in the post-post 'wall shear stress calculation':
http://code-saturne.org/forum/viewtopic ... ress#p6055
But I came across some compiling issues. I will point out what I did in the following secteces.
In order to define two new user-defined arrays 'usertau' and 'userutau', the following lines was added in the subroutine 'usipph' in 'cs_user_parameters.f90'
double precision, allocatable, dimension(:) :: usertau, userutau
.......
allocate(usertau(nfac))
allocate(userutau(nfac))
Instead find the instantaneous value I need the averaged value. The following lined were added in 'clptur.f90' to calculate the sum of wall shear stress and friction velocity after the time steps more than 3600.
if(iturb.eq.42.and.idries.eq.0) then
tau = romc*uet**2
tau0 = 0.0d0
uet0 = 0.0d0
if (ntcabs .gt. 3600) then
tau0 = tau0+tau
uet0 = uet0+uet
endif
usertau(ifac) = tau0
userutau(ifac) = uet0
endif
To show the results in the post-procession part. The following lines had been added in the 'cs_user_postprocess_var.f90' following the 'output of the density at boundary'
call post_write_var(ipart, 'Wall_Shear_Stress', idimt, ientla, ivarpr, &
ntcabs, ttcabs, rvoid, rvoid, usertau)
call post_write_var(ipart, 'Friction_Velcoity', idimt, ientla, ivarpr, &
ntcabs, ttcabs, rvoid, rvoid, userutau).
I came across following compiling errors:
in 'cs_user_parameters.f90':
allocate(usertau(nfac))
1
Error: Symbol 'nfac' at (1) has no IMPLICIT type
in 'clpturb':
usertau(ifac) = tau0
1
Error: Unexpected STATEMENT FUNCTION statement at (1)
\xC2\xA0 userutau(ifac) = uet0
1
Error: Invalid character in name at (1)
in 'cs_user_postprocess_var.f90'
Error: Symbol 'usertau' at (1) has no IMPLICIT type
Error: Symbol 'userutau' at (1) has no IMPLICIT type
Can you please give me some suggestions on these issues? These subroutine and compile log can be found in the attachment.
Thanks in advance,
Yu