Sommaire


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


c18a.c
'
/* ---------------------------------- */
/* save as c18a.c                   */
/* ---------------------------------- */
#include "x_hfile.h"
#include       "fa.h"
/* ---------------------------------- */
int main(void)
{
double ay = -3;
double by =  3.;
int    ny = 2*100;

int    nx = 2*100;
double m =  0;

/* ---------------------------------- */
 clrscrn();
 printf(" Let S be the part of the graph of z = %s with z >= 0.  \n\n", feq);
 printf(" If F(x,y,z) = %si %sj %sk, find the flux of F through S\n\n\n",
          Meq,Neq,Peq);
 printf(" Consider g(x,y,z) = z - (%s)\n\n",feq);
 printf("          n        = grad(g(x,y,z)) / ||grad(g(x,y,z))||\n\n\n");

 m = flux_dxdy(            M,N,P,
                           f, u,v, nx,                           
                           ay,by,ny,
                           H);

 printf(" The flux of F through S is \n\n");
 printf("     //                  \n");
 printf("    ||                   \n");
 printf("    || F.n  dS = %.3f\n",m);
 printf("    ||                   \n");
 printf("   //                    \n");
 printf("   S                 \n\n\n");
 stop();

/* ---------------------------------- */
 clrscrn();
 printf("    Formula : \n\n");
 printf("     //                  \n");
 printf("    ||                   \n");
 printf("    || F.n  dS = %.3f\n",m);
 printf("    ||                   \n");
 printf("   //                    \n");
 printf("   S                 \n\n\n");

 printf("     //\n");
 printf("    ||              (n)\n");
 printf("    || \n");
 printf("    ||     F  .  (-f_xi-f_yj+k)    dS = %.3f\n",m);
 printf("    ||            ------------    \n");
 printf("    ||         [f_x^2+f_y^2+1]^1/2\n");
 printf("   //  \n");
 printf("   S \n\n\n");
 stop();

/* ---------------------------------- */
 clrscrn();
 printf("    Formula :\n\n");
 printf("     //\n");
 printf("    || \n");
 printf("    ||     F  .  (-f_xi-f_yj+k)    dS = %.3f\n",m);
 printf("    ||            ------------   \n");
 printf("    ||        [f_x^2+f_y^2+1]^1/2\n");
 printf("    || \n");
 printf("   //  \n");
 printf("   S \n\n\n");

 printf("     //\n");
 printf("    ||    (F)       (n)                  (dS)\n");
 printf("    || \n");
 printf("    ||     F  .  (-f_xi-f_yj+k)   [f_x^2+f_y^2+1]^1/2 dA = %.3f\n",m);
 printf("    ||            -----------     \n");
 printf("    ||         [f_x^2+f_y^2+1]^1/2\n");
 printf("   //  \n    ");
 printf("   Rxy \n\n\n");
 stop();

/* ---------------------------------- */
 clrscrn();
 printf("     / b   / v(y)\n");
 printf("    |     |      \n");
 printf("    |     |     F.(-f_xi-f_yj+k)    [f_x^2+f_y^2+1]^1/2 dx dy = %.3f\n",m);
 printf("    |     |        -----------     \n");
 printf("    |     |     [f_x^2+f_y^2+1]^1/2\n");
 printf("    |     |      \n");
 printf("   /  a  /   u(y)\n\n\n");

 printf(" With.\n\n\n");
 printf(" F : (x,y,z)-> %si %sj %sk \n\n",Meq,Neq,Peq);
 printf(" f :   (x,y)-> %s    \n\n", feq);
 printf(" u :     (y)-> %s      \n", ueq);
 printf(" v :     (y)-> %s    \n\n", veq);
 printf(" a = %+.1f   b = %+.1f \n",ay,by);
 stop();

 return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */


L'algorithme consiste à adapter la fonction qui calcule les intégrales doubles au calcul des flux.

Remarque :

 Dans cette version nous utilisons cet algorithme pour l'intégrale.

     / b   / v(y)
    |     |      
    |     |     F.(-f_xi-f_yj+k)    [f_x^2+f_y^2+1]^1/2 dx dy = 
    |     |        -----------     
    |     |     [f_x^2+f_y^2+1]^1/2
    |     |      
   /  a  /   u(y)
   
   
   Dans la prochaine version nous utiliserons la version simplifiée.
   
     / b   / v(y)
    |     |      
    |     |     F.(-f_xi-f_yj+k)    dx dy = 
    |     |      
   /  a  /   u(y)


Exemple de sortie écran :
 Let S be the part of the graph of z = 9-x**2-y**2 with z >= 0.  

 If F(x,y,z) = + 3*xi + 3*yj  + zk, find the flux of F through S


 Consider g(x,y,z) = z - (9-x**2-y**2)

          n        = grad(g(x,y,z)) / ||grad(g(x,y,z))||


 The flux of F through S is 

     //                  
    ||                   
    || F.n  dS = 890.418
    ||                   
   //                    
   S                 


 Press return to continue.



Exemple de sortie écran :
    Formula : 

     //                  
    ||                   
    || F.n  dS = 890.418
    ||                   
   //                    
   S                 


     //
    ||              (n)
    || 
    ||     F  .  (-f_xi-f_yj+k)    dS = 890.418
    ||            ------------    
    ||         [f_x^2+f_y^2+1]^1/2
   //  
   S 


 Press return to continue.



Exemple de sortie écran :
    Formula :

     //
    || 
    ||     F  .  (-f_xi-f_yj+k)    dS = 890.418
    ||            ------------   
    ||        [f_x^2+f_y^2+1]^1/2
    || 
   //  
   S 


     //
    ||    (F)       (n)                  (dS)
    || 
    ||     F  .  (-f_xi-f_yj+k)   [f_x^2+f_y^2+1]^1/2 dA = 890.418
    ||            -----------     
    ||         [f_x^2+f_y^2+1]^1/2
   //  
       Rxy 


 Press return to continue.


Exemple de sortie écran :
     / b   / v(y)
    |     |      
    |     |     F.(-f_xi-f_yj+k)    [f_x^2+f_y^2+1]^1/2 dx dy = 890.418
    |     |        -----------     
    |     |     [f_x^2+f_y^2+1]^1/2
    |     |      
   /  a  /   u(y)


 With.


 F : (x,y,z)-> + 3*xi + 3*yj  + zk 

 f :   (x,y)-> 9-x**2-y**2    

 u :     (y)-> -sqrt(9-y**2)      
 v :     (y)-> +sqrt(9-y**2)    

 a = -3.0   b = +3.0 
 Press return to continue.
Cet article est issu de Wikibooks. Le texte est sous licence Creative Commons - Attribution - Partage dans les Mêmes. Des conditions supplémentaires peuvent s'appliquer aux fichiers multimédias.