Page 1 of 1

force applied on a face

Posted: Mon Jul 23, 2012 10:39 am
by stage75
Hi,

I want to calculate the forces applied by the fluid on a faces of turbine and display it in the "fields" menu, these forces are normally written in this form: (Force = Pressure / Face Surface), with (Face surface = 1.5 m2)

In the "usproj.f90" subroutine I modefied it as, (is this reasoning is right?)

Code: Select all

 call getfbr('201', nlelt, lstelt)
  !==========
  do ilelt = 1, nlelt
    ifac = lstelt(ilelt)
    do ii = 1, ndim
     ! xfor(ii) = xfor(ii) + ra(iforbr + (ifac-1)*ndim + ii-1)
xfor(ii) = (ipr (iphas))/1.5d0
    enddo

  enddo
  if (irangp.ge.0) then
    call parrsm(ndim,xfor)
  endif
endif
Thank's

Re: force applied on a face

Posted: Mon Jul 23, 2012 1:39 pm
by stage75
...please nobody knows how can do to display the forces calculated in the menu 'fields' for visualized it

Re: force applied on a face

Posted: Mon Jul 23, 2012 4:29 pm
by mercierg
hi,

You already have a quantity called 'efforts' in the postprocessing files. Anyway, if you want to have an action on the postprocessing, modify the usvpst routine.

in usproj, (see REFERENCE), use the keyword forbr to get directly the whole force (pressure, viscosity, turbulent energy) applied on your face.

As already explain in older post,

Code: Select all

 call getfbr('12', nlelt, lstelt)
  !==========

  do ilelt = 1, nlelt

    ifac = lstelt(ilelt)

    do ii = 1, ndim
      xfor(ii) = xfor(ii) + forbr(ii, ifac)
    enddo

  enddo
here you have an example to do it,

don't forget to look in the old forum section ;)

Re: force applied on a face

Posted: Tue Jul 24, 2012 11:07 am
by stage75
Thank's for your help,

Please could you explain the line in the code

Code: Select all

xfor(ii) = xfor(ii) + forbr(ii, ifac)
is this relation represents the equivalent of (F=P/S)?

Is "xfor(ii)" represents the "effort", what it means?

because I had written

Code: Select all

xfor(ii) = (ipr (iphas))/1.5d0
, (ipr (iphas): pressure and 1.5 =Surface!!

Thank's

Re: force applied on a face

Posted: Tue Jul 24, 2012 4:36 pm
by mercierg
Be careful with the dimension of the force. basically F=P*S

iforbr(X,Y) is an array calculated by saturne during the simulation and contain the 3 contributions explained before. It is of P*S dimension (N). X stand for the three coordinates (x,y,z). Y stands for the face number.

With the code I sent you, you simply do a sum on the forces applied on each faces of you BF(walltype). after this sum, you get :
xfor(1) = Fx
xfor(2) = Fy
xfor(3) = Fz

in

Code: Select all

 call getfbr('201', nlelt, lstelt)
be sure 201 is the name of your wall.
:)

Re: force applied on a face

Posted: Wed Jul 25, 2012 1:13 am
by stage75
Thank's mercierg :)