Mathc initiation/Fichiers c : c64cb
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c18b.c |
---|
/* --------------------------------- */
/* save as c18b.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* --------------------------------- */
int main(void)
{
double m = flux_dzdxdy( M,N,P,
u, v,LOOP,
s, t,LOOP,
ay,by,LOOP);
/* --------------------------------- */
clrscrn();
printf(" Use the divergence theorem to find,\n\n");
printf(" the flux of F through S.\n\n");
printf(" // /// \n");
printf(" || ||| \n");
printf(" || F.n dS = ||| div F dV \n");
printf(" || ||| \n");
printf(" // /// \n");
printf(" S Q \n\n\n");
printf(" If F = Mi + Nj + Pk \n\n\n");
printf(" /// /// \n");
printf(" ||| ||| \n");
printf(" ||| div F dV = ||| M_x + N_y + P_z dV \n");
printf(" ||| ||| \n");
printf(" /// /// \n");
printf(" Q Q \n\n\n");
stop();
/* --------------------------------- */
clrscrn();
printf(" / b / t(y) / v(x, y) \n");
printf(" | | | \n");
printf(" | | | M_x + N_y + P_z dzdxdy = %.3f \n",m);
printf(" | | | \n");
printf(" / a / s(y) / u(x, y) \n\n\n");
printf(" With.\n\n\n");
printf(" F : (x,y,z)-> (%s)i + (%s)j + (%s)k \n\n",Meq,Neq,Peq);
printf(" v : (x,y)-> %s \n", veq);
printf(" u : (x,y)-> %s \n\n", ueq);
printf(" t : (y)-> %s \n", teq);
printf(" s : (y)-> %s \n\n", seq);
printf(" by = %+.1f\n ay = %+.1f\n\n",by,ay);
stop();
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Ce travail consiste à adapter l'intégrale triple au calcul du flux en 3d par le théorème de la divergence : (M_x + N_y + P_z)
Exemple de sortie écran :
Use the divergence theorem to find,
the flux of F through S.
// ///
|| |||
|| F.n dS = ||| div F dV
|| |||
// ///
S Q
If F = Mi + Nj + Pk
/// ///
||| |||
||| div F dV = ||| M_x + N_y + P_z dV
||| |||
/// ///
Q Q
Press return to continue.
Exemple de sortie écran :
/ b / t(y) / v(x, y)
| | |
| | | M_x + N_y + P_z dzdxdy = 24.000
| | |
/ a / s(y) / u(x, y)
With.
F : (x,y,z)-> + 2*x*zi + x*y*zj + y*zk
u : (x,y)-> 0
v : (x,y)-> (4-x)/2
s : (y)-> 0
t : (y)-> 4
ay = +0.0 by = +2.0
dV = dz dx dy
Press return to continue.