Mathc initiation/c58ca
Installer et compiler ces fichiers dans votre répertoire de travail.
![]() |
c17a.c |
---|
/* ---------------------------------- */
/* save as c17a.c */
/* ---------------------------------- */
#include "x_hfile.h"
#include "fa.h"
/* ---------------------------------- */
int main(void)
{
double a = 0;
double b = 9;
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(" y = sqrt(x), x = 9, y = 0, \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 : (x)-> %s \n", veq);
printf(" u : (x)-> %s \n\n", ueq);
printf(" b : %+.1f \n", b);
printf(" a : %+.1f \n\n", a);
stop();
/* ---------------------------------- */
clrscrn();
Ix = simpson_dydx(h,a,b,nx,u,v,ny);
printf(" Compute the moment of inertia Ix.\n");
printf(" (b (v(x)\n");
printf(" Ix = int( int( y**2 f(x,y) dy dx = %.1f\n", Ix);
printf(" (a (u(x)\n\n");
Iy = simpson_dydx(g,a,b,nx,u,v,ny);
printf(" Compute the moment of inertia Iy.\n");
printf(" (b (v(x)\n");
printf(" Iy = int( int( x**2 f(x,y) dy dx = %.1f\n", Iy);
printf(" (a (u(x)\n\n");
printf(" The polar moment of inertia : ");
printf(" I0 = Ix + Iy = %.1f\n\n",Ix+Iy);
I0 = simpson_dydx(gplsh,a,b,nx,u,v,ny);
printf(" or directly.\n\n");
printf(" (b (v(x)\n");
printf(" I0 = int( int( (x**2 + y**2) f(x,y) dy dx = %.1f\n", I0);
printf(" (a (u(x)\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.
y = sqrt(x), x = 9, y = 0,
and f(x,y) (the area mass density at (x,y))
f : (x,y)-> x + y
These give :
v : (x)-> sqrt(x)
u : (x)-> 0
b : +9.0
a : +0.0
Press return to continue.
Exemple de sortie écran :
Compute the moment of inertia Ix.
(b (v(x)
Ix = int( int( y**2 f(x,y) dy dx = 269.0
(a (u(x)
Compute the moment of inertia Iy.
(b (v(x)
Iy = int( int( x**2 f(x,y) dy dx = 5194.1
(a (u(x)
The polar moment of inertia : I0 = Ix + Iy = 5463.2
or directly.
(b (v(x)
I0 = int( int( (x**2 + y**2) f(x,y) dy dx = 5463.2
(a (u(x)
Press return to continue.