Mathc initiation/c58cb
Installer et compiler ces fichiers dans votre répertoire de travail.
![]() |
c17b.c |
---|
/* ---------------------------------- */
/* save as c17b.c */
/* ---------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* ---------------------------------- */
int main(void)
{
double a = -2;
double b = 2;
double nx = 2*20;
double ny = 2*20;
double Ix = 0;
double Iy = 0;
double I0 = 0;
/* ---------------------------------- */
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(" x = y**2, x = 4, \n\n");
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(" b : %+.1f \n", b);
printf(" a : %+.1f \n\n", a);
stop();
/* ---------------------------------- */
clrscrn();
Ix = simpson_dxdy(h,u,v,nx,a,b,ny);
printf(" Compute the moment of inertia Ix.\n");
printf(" (b (v(y)\n");
printf(" Ix = int( int( y**2 f(x,y) dx dy = %.1f\n", Ix);
printf(" (a (u(y)\n\n");
Iy = simpson_dxdy(g,u,v,nx,a,b,ny);
printf(" Compute the moment of inertia Iy.\n");
printf(" (b (v(y)\n");
printf(" Iy = int( int( x**2 f(x,y) dx dy = %.1f\n", Iy);
printf(" (a (u(y)\n\n");
printf(" The polar moment of inertia : ");
printf(" I0 = Ix + Iy = %.1f\n\n",Ix+Iy);
I0 = simpson_dxdy(gplsh,u,v,nx,a,b,ny);
printf(" or directly.\n\n");
printf(" (b (v(y)\n");
printf(" I0 = int( int( (x**2 + y**2) f(x,y) dx dy = %.1f\n", I0);
printf(" (a (u(y)\n\n");
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.
x = y**2, x = 4,
and f(x,y) (the area mass density at (x,y))
f : (x,y)-> x
These give :
v : (y)-> 4
u : (y)-> y**2
b : +2.0
a : -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 = 24.4
(a (u(y)
Compute the moment of inertia Iy.
(b (v(y)
Iy = int( int( x**2 f(x,y) dx dy = 227.6
(a (u(y)
The polar moment of inertia : I0 = Ix + Iy = 251.9
or directly.
(b (v(y)
I0 = int( int( (x**2 + y**2) f(x,y) dx dy = 251.9
(a (u(y)
Press return to continue.