Mathc initiation/Fichiers c : c64cc
Installer et compiler ces fichiers dans votre répertoire de travail.
c18c.c |
---|
/* --------------------------------- */
/* save as c18c.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fc.h"
/* --------------------------------- */
int main(void)
{
double m = flux_dydzdx( M,N,P,
u, v,LOOP,
s, t,LOOP,
ax,bx,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(x) / v(x, z) \n");
printf(" | | | \n");
printf(" | | | M_x + N_y + P_z dydzdx = %.3f \n",m);
printf(" | | | \n");
printf(" / a / s(x) / u(x, z) \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,z)-> %s \n", veq);
printf(" u : (x,z)-> %s \n\n", ueq);
printf(" t : (x)-> %s \n", teq);
printf(" s : (x)-> %s \n\n", seq);
printf(" bx = %+.1f\n ax = %+.1f\n\n",bx,ax);
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(x) / v(x, z)
| | |
| | | M_x + N_y + P_z dydzdx = 131.657
| | |
/ a / s(x) / u(x, z)
With.
F : (x,y,z)-> + x^3 + sin(z)i + x^2*y + cos(z)j + exp(x^2 + y^2)k
u : (x,z)-> +0
v : (x,z)-> 5-z
s : (x)-> +0
t : (x)-> 4-x^2
ax = -2.0 bx = +2.0
dV = dy dz dx
Press return to continue.