Wall shear stress calculation
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Wall shear stress calculation
Hello,
I have a question regarding the calculation of wall shear stress in code_saturne version 2.0.5.
I have enabled "Domain boundary post-processing" in the gui and I have found from previous posts that the output Efforts are the sum of the pressure forces, viscous stresses and turbulent stresses. Would it therefore be possible to use the Efforts to calculate the wall shear stress and output the value on the boundary mesh in usvpst?
Perhaps there is a standard way to determine the wall shear stress? I would be extremely grateful for any help/suggestions.
Thank you,
Kristin
I have a question regarding the calculation of wall shear stress in code_saturne version 2.0.5.
I have enabled "Domain boundary post-processing" in the gui and I have found from previous posts that the output Efforts are the sum of the pressure forces, viscous stresses and turbulent stresses. Would it therefore be possible to use the Efforts to calculate the wall shear stress and output the value on the boundary mesh in usvpst?
Perhaps there is a standard way to determine the wall shear stress? I would be extremely grateful for any help/suggestions.
Thank you,
Kristin
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Wall shear stress calculation
Hello,
I'll let others answer, but you may find some answers perusing the older forums, replicated here, as similar questions have arisen before (though I'm not sure for this exact variant).
This should also soon be simpler, as Martin is working on a boundary condition modeling improvement/cleanup. At that point, we will be able to document things better, to make this kind of postprocessing easier.
Best regards,
Yvan
I'll let others answer, but you may find some answers perusing the older forums, replicated here, as similar questions have arisen before (though I'm not sure for this exact variant).
This should also soon be simpler, as Martin is working on a boundary condition modeling improvement/cleanup. At that point, we will be able to document things better, to make this kind of postprocessing easier.
Best regards,
Yvan
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: Wall shear stress calculation
Hello,
If you are using LES and the van Driest wall damping, the friction velocity is stored in the array uetbor. If not, you should modify clptur.f90 and copy it from Code_Saturne sources to the SRC folder in order to save the friction velocity (create a new user array and make a copy user_array<-uet a the same place that for uetbor<-uet).
Best regards,
JF
If you are using LES and the van Driest wall damping, the friction velocity is stored in the array uetbor. If not, you should modify clptur.f90 and copy it from Code_Saturne sources to the SRC folder in order to save the friction velocity (create a new user array and make a copy user_array<-uet a the same place that for uetbor<-uet).
Best regards,
JF
Re: Wall shear stress calculation
Hello,
Thank you for the response to my previous question, I have been able to output the friction velocity stored in uetbor as, so far, I have been using LES with the Smagorinsky model, for which the Van Driest wall damping is activated by default.
However, I would like to run a simulation using LES with the Dynamic model and my understanding is that in order to output the friction velocity I have to modify clptur.f90 since the Van Driest wall damping is not active. If I were using the classic Smagorinsky model, the section of code of interest in clptur is:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Now, I'm supposed to
if(iturb(iphas).eq.41.and.idries(iphas).eq.0) then
do ifac=1, nfac
rtuser(nrtuse) = uet
enddo
endif
in place of the code above? I'm guessing that instead of nrtuse being a constant number it should somehow account for the face number, but I'm not sure how to do that and I would greatly appreciate some help.
Please forgive my inexperience,
Kristin
Thank you for the response to my previous question, I have been able to output the friction velocity stored in uetbor as, so far, I have been using LES with the Smagorinsky model, for which the Van Driest wall damping is activated by default.
However, I would like to run a simulation using LES with the Dynamic model and my understanding is that in order to output the friction velocity I have to modify clptur.f90 since the Van Driest wall damping is not active. If I were using the classic Smagorinsky model, the section of code of interest in clptur is:
Code: Select all
! Sauvegarde de la vitesse de frottement et de la viscosite turbulente
! apres amortissement de van Driest pour la LES
! On n'amortit pas mu_t une seconde fois si on l'a deja fait
! (car une cellule peut avoir plusieurs faces de paroi)
if(itytur(iphas).eq.4.and.idries(iphas).eq.1) then
uetbor(ifac,iphas) = uet
if (visvdr(iel,iphas).lt.-900.d0) then
propce(iel,ipcvst) = propce(iel,ipcvst) &
*(1.d0-exp(-yplus/cdries(iphas)))**2
visvdr(iel,iphas) = propce(iel,ipcvst)
visctc = propce(iel,ipcvst)
endif
endif
Now, I'm supposed to
Does this mean that I should have something like:create a new user array and make a copy user_array<-uet a the same place that for uetbor<-uet
if(iturb(iphas).eq.41.and.idries(iphas).eq.0) then
do ifac=1, nfac
rtuser(nrtuse) = uet
enddo
endif
in place of the code above? I'm guessing that instead of nrtuse being a constant number it should somehow account for the face number, but I'm not sure how to do that and I would greatly appreciate some help.
Please forgive my inexperience,
Kristin
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: Wall shear stress calculation
Hello,
something like that (for uet):
You must allocate rtuser in the gui or in usini1 (you must know before you calculation the number of faces in your mesh, set the size of rtuser to 1.5*nb_faces).
Regards,
something like that (for uet):
Code: Select all
if(iturb(iphas).eq.41.and.idries(iphas).eq.0) then
rtuser(ifac) = uet
endif
Regards,
Re: Wall shear stress calculation
Hello,
Sorry to come back to this again, but I'm having some problems with the output values for the friction velocity.
I have the following code in usvpst for LES using the Dynamic model, with the modification in clptur to save the friction velocity:
This seems to work.
However, in the LES case using the Smagorinsky model where I haven't interfered with clptur, I have the following in usvpst:
The output from this is not correct (the values are too small, e.g. 1e-12), whereas the uet printed in the listing is what I would expect (ranges between 0.2e-01 and 0.8e-01). So I think there is a basic mistake in the code above, but I'm not sure what it is. Any ideas?
Kind regards,
Kristin
Sorry to come back to this again, but I'm having some problems with the output values for the friction velocity.
I have the following code in usvpst for LES using the Dynamic model, with the modification in clptur to save the friction velocity:
Code: Select all
! Friction Velocity
do ii = 1, 32
namevr (ii:ii) = ' '
enddo
namevr = "U_Fric"
idimt = 1
ivarpr = 0
do iloc = 1, nfbrps
ifac = lstfbr(iloc)
trafbr(iloc) = rtuser(ifac)
enddo
! Output values
call psteva(ipart, namevr, idimt, ientla, ivarpr, &
!==========
ntcabs, ttcabs, tracel, trafac, trafbr)
However, in the LES case using the Smagorinsky model where I haven't interfered with clptur, I have the following in usvpst:
Code: Select all
! Friction Velocity
do ii = 1, 32
namevr (ii:ii) = ' '
enddo
namevr = "U_Fric"
idimt = 1
ivarpr = 0
do iloc = 1, nfbrps
ifac = lstfbr(iloc)
trafbr(iloc) = uetbor(ifac,iphas)
enddo
! Output values
call psteva(ipart, namevr, idimt, ientla, ivarpr, &
!==========
ntcabs, ttcabs, tracel, trafac, trafbr)
Kind regards,
Kristin
Re: Wall shear stress calculation
I'm sorry, but I don't understand how the above post on cooling towers has anything to do with my friction velocity problem.
[Edit by administrator: post above was a spam, and spammer's account and post deleted. please do not respond to such parasites, and simply send a message to an administrator so that we remove this junk in case we have not noticed it yet].
In fact, I have not yet managed to solve why the friction velocity output by the LES with the Smagorinsky model is incorrect. Would anyone be able to offer some help/advice please?
Kind regards,
Kristin
[Edit by administrator: post above was a spam, and spammer's account and post deleted. please do not respond to such parasites, and simply send a message to an administrator so that we remove this junk in case we have not noticed it yet].
In fact, I have not yet managed to solve why the friction velocity output by the LES with the Smagorinsky model is incorrect. Would anyone be able to offer some help/advice please?
Kind regards,
Kristin
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Wall shear stress calculation
Hello,
uetbor is normally not defined in usvpst. did you add arguments to the function ?
Also, did you check that you set iphas to 1 ?
Finally, and most importantly, if you check for uetbor in clptur.f90, you'll notice that its value is defined only for LES with Van Driest damping. So you should define/use rtuser instead.
Regards,
Yvan
uetbor is normally not defined in usvpst. did you add arguments to the function ?
Also, did you check that you set iphas to 1 ?
Finally, and most importantly, if you check for uetbor in clptur.f90, you'll notice that its value is defined only for LES with Van Driest damping. So you should define/use rtuser instead.
Regards,
Yvan
Re: Wall shear stress calculation
Hello,
I'm using Code_Saturne 3.0.3. It's been a long time that I'm trying to calculate in simple way the wall shear stress in code_Saturne but without sucess.
I have selected "Efforts, tangential" in "Surface solution control". But I can't find the results in my post-processing files. Can you tell me why?
But when I just select “Efforts”, I have results in my post-processing files: (effort(0) effort(1) effort(2) effort(magnitude).
Thank you in advance for your help.
Best regards,
Loïc A.
I'm using Code_Saturne 3.0.3. It's been a long time that I'm trying to calculate in simple way the wall shear stress in code_Saturne but without sucess.
I have selected "Efforts, tangential" in "Surface solution control". But I can't find the results in my post-processing files. Can you tell me why?
But when I just select “Efforts”, I have results in my post-processing files: (effort(0) effort(1) effort(2) effort(magnitude).
Thank you in advance for your help.
Best regards,
Loïc A.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Wall shear stress calculation
Hello,
I just checked, and this indeed seems to be a bug (it should work in 3.x). I'll try to fix it for 3.0.4, and in the meantime, send you a temporary fix by tomorrow.
Regards,
Yvan
I just checked, and this indeed seems to be a bug (it should work in 3.x). I'll try to fix it for 3.0.4, and in the meantime, send you a temporary fix by tomorrow.
Regards,
Yvan