Aller au contenu

Mathc initiation/c58cb

Un livre de Wikilivres.


Sommaire


Installer et compiler ces fichiers dans votre répertoire de travail.


c00b.c
/* ---------------------------------- */
/* save as c00b.c                     */
/* ---------------------------------- */
#include "x_hfile.h"
#include      "fb.h"
/* ---------------------------------- */
int main(void)
{
double Ix = simpson_dxdy(y2f,      u,v,LOOP, ay,by,LOOP); 
double Iy = simpson_dxdy(x2f,      u,v,LOOP, ay,by,LOOP);
double I0 = simpson_dxdy(x2plsy2f, u,v,LOOP, ay,by,LOOP);
  
 clrscrn();

 printf(" Find the polar moment of inertia of the lamina\n");
 printf(" that has the shape of the region bounded by the   \n");
 printf(" graphs of the given equations.\n\n");

 printf(" y = %s, y = %s, x = %+.1f, x = %+.1f,  \n\n", veq, ueq, by ,ay);
 printf(" and f(x,y)  (the area mass density at (x,y)) \n\n\n");
 printf(" f : (x,y)-> %s    \n\n", feq);
 printf(" These give :      \n\n");
 printf(" v :   (y)-> %s      \n", veq);
 printf(" u :   (y)-> %s    \n\n", ueq);
 printf(" by :   %+.1f   \n", by);
 printf(" ay :   %+.1f \n\n", ay);
 stop();

 clrscrn();

 printf("   Compute the moment of inertia Ix.\n\n");
 printf("         (b     (v(y)\n");
 printf(" Ix = int(   int(    y**2  f(x,y)  dx dy\n");
 printf("         (a     (u(y)\n\n");
   
 printf("   Compute the moment of inertia Iy.\n\n");
 printf("         (b     (v(y)\n");
 printf(" Iy = int(   int(     x**2  f(x,y)  dx dy\n");
 printf("         (a     (u(y)\n\n");

 printf("   The polar moment of inertia :  \n\n");
 printf("    I0 = Ix + Iy\n\n");
   
 printf(" or directly.\n\n");
 printf("         (b     (v(y)\n");
 printf(" I0 = int(   int(     (x**2 + y**2)  f(x,y)  dx dy\n");
 printf("         (a     (u(y)\n\n");
 stop();
 
 clrscrn();
   
 printf("   Compute the moment of inertia Ix.\n\n");
 printf("         (%.3f  (%s\n",      by,veq);
 printf(" Ix = int(    int(       %s  dx dy = %.3f\n", y2feq, Ix);
 printf("         (%.3f  (%s\n\n",    ay,ueq); 
   
 printf("   Compute the moment of inertia Iy.\n\n");
 printf("         (%.3f  (%s\n",      by,veq);
 printf(" Iy = int(    int(       %s  dx dy = %.3f\n", x2feq, Iy);
 printf("         (%.3f  (%s\n\n",    ay,ueq);

 printf("   The polar moment of inertia :  \n\n");
 printf("    I0 = Ix + Iy = %.3f\n\n",Ix+Iy);
   
 printf(" or directly.\n\n");
 printf("         (%.3f  (%s\n",      by,veq);
 printf(" I0 = int(    int(       %s  dx dy = %.3f\n", x2plsy2feq, I0);
 printf("         (%.3f  (%s\n\n",    ay,ueq);
 stop();
 
 return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */


Le moment d'inertie est une mesure de la résistance d'un objet à l'accélération angulaire. Le moment d'inertie polaire est une mesure de la résistance d'un objet à la torsion.

Exemple de sortie écran :

 Find the polar moment of inertia of the lamina
 that has the shape of the region bounded by the   
 graphs of the given equations.

 y = 4, y = y**2, x = +2.0, x = -2.0,  

 and f(x,y)  (the area mass density at (x,y)) 


 f : (x,y)-> x    

 These give :      

 v :   (y)-> 4      
 u :   (y)-> y**2    

 by :   +2.0   
 ay :   -2.0 

 Press return to continue.


Exemple de sortie écran :

   Compute the moment of inertia Ix.

         (b     (v(y)
 Ix = int(   int(    y**2  f(x,y)  dx dy
         (a     (u(y)

   Compute the moment of inertia Iy.

         (b     (v(y)
 Iy = int(   int(     x**2  f(x,y)  dx dy
         (a     (u(y)

   The polar moment of inertia :  

    I0 = Ix + Iy

 or directly.

         (b     (v(y)
 I0 = int(   int(     (x**2 + y**2)  f(x,y)  dx dy
         (a     (u(y)

 Press return to continue.


Exemple de sortie écran :

   Compute the moment of inertia Ix.

         (2.000  (4
 Ix = int(    int(       y**2  x  dx dy = 24.380
         (-2.000  (y**2

   Compute the moment of inertia Iy.

         (2.000  (4
 Iy = int(    int(       x**2  x  dx dy = 227.553
         (-2.000  (y**2

   The polar moment of inertia :  

    I0 = Ix + Iy = 251.933

 or directly.

         (2.000  (4
 I0 = int(    int(       (x**2 + y**2)  (x)  dx dy = 251.933
         (-2.000  (y**2

 Press return to continue.