force applied on a face

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
stage75

force applied on a face

Post 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
stage75

Re: force applied on a face

Post by stage75 »

...please nobody knows how can do to display the forces calculated in the menu 'fields' for visualized it
mercierg

Re: force applied on a face

Post 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 ;)
stage75

Re: force applied on a face

Post 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
mercierg

Re: force applied on a face

Post 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.
:)
stage75

Re: force applied on a face

Post by stage75 »

Thank's mercierg :)
Post Reply