<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello Neks, </div><div>Here I have a problem whie caluclating the skin friction on airfoil. Could you please help me with this? I used a piece of your code to extract the viscous the stress applied on the object by using <strong>subroutine </strong>drgtrq<strong>(</strong>dgtq<strong>,xm0,ym0,zm0,</strong>sij<strong>,pm1,</strong>visc<strong>,f,e) .</strong><br data-mce-bogus="1"></div><div><strong><br data-mce-bogus="1"></strong></div><div>Here is what I have done,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br> else ! 2D<br><br> i = 0<br> a = 0<br> do j2=js2,jf2,jskip2<br> do j1=js1,jf1,jskip1<br> i = i+1<br> n1 = unx(i,1,f,e) ! I removed area to avoid getting Force since I need stress<br> n2 = uny(i,1,f,e) ! I removed area to avoid getting Force since I need stress<br> a = a + area(i,1,f,e) <br> v = visc(j1,j2,1,e)<br><br> s11 = sij(j1,j2,1,1,e)<br> s12 = sij(j1,j2,1,3,e)<br> s21 = sij(j1,j2,1,3,e)<br> s22 = sij(j1,j2,1,2,e)<br><br> dg(1,1) = pm1(j1,j2,1,e)*n1 ! pressure drag<br> dg(2,1) = pm1(j1,j2,1,e)*n2<br> dg(3,1) = 0<br><br> dg(1,2) = -v*(s11*n1 + s12*n2) ! viscous drag<br> dg(2,2) = -v*(s21*n1 + s22*n2)<br> dg(3,2) = 0.<br><br> r1 = xm0(j1,j2,1,e)<br> r2 = ym0(j1,j2,1,e)<br> r3 = 0.<br><br> do l=1,2<br> do k=1,3<br> dgtq(k,l) = dgtq(k,l) + dg(k,l)<br> enddo<br> enddo<br><br> enddo<br> enddo<br> endif<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Then I add dgtq(1,2) + dgtq(2,2) to get the total skin friction stress acting on the wall at each faces. <br data-mce-bogus="1"></div><div>Since I know the face number and element number I extract the x cordinates of the corrrespoinding wall elements.</div><div><br data-mce-bogus="1"></div><div>Do you think Am i doing right?</div><div>I have some questions</div><div><br data-mce-bogus="1"></div><div>1 )Since the equation for skin frcition is :</div><div><pre><i> tau_w = -mu*du/dy ( at wall)
</i><i>
</i><i> C_f = 2 * nu * du/dy
<br></i>In our code it is written like : <br><br> dg(1,2) = -v*(s11*n1 + s12*n2) That is , stress is again muliplied with a normal velocity, and there are two components of stress in each dg. could you please tell me why?<br><br>2) The loopshown below muliplies my answer by 4 at the end. (Its getting added each time, I didnt understand the concept behind it, <br>I thought its just way to store all the values into a single array) Could you please tell me why?<br> do l=1,2<br> do k=1,3<br> dgtq(k,l) = dgtq(k,l) + dg(k,l)<br> enddo<br> enddo<br><br><br>Thanks in advance<br><br>Sijo GEORGE<br><br><br></pre> <br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></body></html>