[overture] Re: integrate force

Hi Yongshen,

  You should define two surfaces, each with a different
surfaceID and different set of faces.

Regards,
  Bill

Yongsheng Lian wrote:
Hi Bill,

  I was able to use the sharedBoundary option in aero.C.  However, I
ran into my first hurdle this morning when I looked into my problem.
Since we want to get the forces on each of the two bodies, using
command integrate.surfaceIntegral(f,surfaceID)  will only get the
total forces on both.

  I tried to use the following commands. The idea is to calculate
forces on each individual grid.

      real drag[numberOfGrids];
      for(i=0;i<numberOfGrids;i++)
      {
       drag[i] = integrate.surfaceIntegral(f(cg[i]),surfaceID);
            printf("on grid %i, the drag is %e \n",drag[i]);

      }


The error message said integrate.surfaceIntegral(f(cg[i]),surfaceID)
is not right. I traced back to the Integrate.h and find the definition
of surfaceIntegral  but have no idea how to define the Range.

  real surfaceIntegral(const RealCompositeGridFunction & u, const int
& surfaceNumber = -1 );

  int surfaceIntegral(const RealCompositeGridFunction & u,
                      const Range & C,
                      RealArray & integral,
                      const int & surfaceNumber = -1 );

Can you give me some hints?

Thank you,
 Yongsheng


Other related posts: