OEF Exercise - Métal-Acide-2
Métal-Acide-2
GNU GPL
Probability
- H4
Métal, acide, avancement, chimie
Avancement d'une réaction chimique
Attaque d'un métal par un acide
On dispose de l'équation de la réaction d'attaque d'un métal (réactif par défaut) par un acide.
- Le choix du métal, donc de sa valence, est aléatoire
- les quantités intiales sont aléatoires.
Il s'agit de construire un tableau d'avancement de la réaction chimique, puis de trouver les quantités de réactifs en fin de réaction.
\title{Tableau d'avancement 1}
\language{fr}
\range{-5..5}
\author{MARKEY Benoît, KHAZNADAR Georges}
\email{benoit.markey@nomade.fr, gekhajofour@netinfo.fr}
\computeanswer{yes}
\format{html}
\precision{100}
\comment{données : équation, nombre de réactifs , nombre de produits , ... données équilibrées, ... coeffs stoechiométriques, masse molaire du métal.}
\text{donnee=Fe + H^+ -> Fe^2+ + H2,2,2, Fe , 2H^+ , Fe^{2+} , H2,1,2,1,1,55.8;
Zn + H^+ -> Zn^2+ + H2, 2,2,Zn , 2H^+ , Zn^{2+} , H2,1,2,1,1,65.4;
Al + H^+ -> Al^3+ + H2,2,2, 2Al , 6H^+ , 2Al^{3+} , 3H2,2,6,2,3,27.0;
Mg + H^+ -> Mg^2+ + H2, 2,2,Mg , 2H^+ , Mg^{2+} , H2,1,2,1,1,24.3
}
\comment{On choisit parmi le fer, le zinc, l'aluminium ou le magnésium.}
\text{l=randomrow(\donnee)}
\integer{gauche=\l[2]}
\integer{droite=\l[3]}
\integer{n=\gauche + \droite}
\real{a1=randint(111..999)/100000}
\real{a2=randint(111..999)/10000}
\text{reac=\a1,\a2}
\text{prod=0,0}
\integer{total=3+2*\n}
\integer{coeffp=\total-\n+1}
\integer{coeffr=\total-\droite+1}
\text{polyreac=wims(simplify(\reac[1]-\l[\coeffp+1-1]*x))}
\for{i11=2 to \gauche}
{
\text{polyreac=\polyreac,wims(simplify(\reac[\i11]-\l[\coeffp+\i11-1]*x))}
}
\text{polyprod=wims(simplify(\prod[1]+\l[\coeffr+1-1]*x))}
\for{i12=2 to \droite}
{
\text{polyprod=\polyprod,wims(simplify(\prod[\i12]+\l[\coeffr+\i12-1]*x))}
}
\text{max=wims(simplify(\reac[1]/\l[\coeffp]))}
\for{i17=2 to \gauche}
{
\text{max=\max,wims(simplify(\reac[\i17]/\l[\coeffp+\i17-1]))}
}
\real{xmax1=\gauche=1?wims(simplify(\reac[1]/\l[\coeffp])):min(\max[1],\max[2])}
\for{i18=1 to \gauche}
{
\real{xmax=min(\xmax1,\max[\i18])}
}
\text{sol=\polyreac[1]}
\for{i13=2 to \gauche}
{
\text{sol=\sol,\polyreac[\i13]}
}
\for{i14=1 to \droite}
{
\text{sol=\sol,\polyprod[\i14]}
}
\text{sol=\sol,\xmax}
\for{i15=1 to \gauche}
{
\text{sol=\sol,wims(simplify (wims(replace x by \xmax in \polyreac[\i15])))}
}
\for{i16=1 to \droite}
{
\text{sol=\sol,wims(simplify (wims(replace x by \xmax in \polyprod[\i16])))}
}
\text{r=reply 1}
\for{i1=2 to 2*\n+1}
{
\text{r=\r,reply \i1}
}
\steps{\r}
\statement{
<h3>Attaque d'un métal par un acide (l'acide est en excès)</h3>
Compléter le tableau d'avancement ci-dessous. <br>
<font size=-2>(pensez à consulter l'indication)</font></p>
<table border=2><tr><td align=center colspan=2>équation chimique</td>
<!-- ligne 1 -->
\for{i2=1 to \gauche-1}
{
<th>\(\l[3+\i2]) </th><th>+</th>
}
<th>\(\l[3+\gauche]) </th><td> \(\rightarrow) </td>
\for{i3=1 to \droite-1}
{
<th>\(\l[3+\gauche+\i3]) </th><th>+</th>
}
<th>\(\l[3+\gauche+\droite]) </th></tr>
<!-- ligne 2 -->
<tr><td>état du système</td><td>avancement</td>
\for{i4=1 to \gauche-1}
{
<td>nombre de moles</td><td> </td>
}
<td>nombre de moles</td><td> </td>
\for{i5=1 to \droite-1}
{
<td>nombre de moles</td><td> </td>
}
<td>nombre de moles</td>
</tr>
<!-- ligne 3 -->
<tr><td>état initial</td><td align=center>x=0</td>
\for{i6=1 to \gauche-1}
{<td align=center>\reac[\i6]</td><td> </td>}
<td align=center>\reac[\gauche]</td><td> </td>
\for{i7=1 to \droite-1}
{
<td align=center>\prod[\i7]</td><td> </td>}
<td align=center>\prod[\droite]</td>
</tr>
<!-- ligne 4 -->
<tr><td>état intermédiaire</td><td align=center>x</td>
\for{i8=1 to \n-1}
{<td align=center>
\embed{\r[\i8],10}</td><td> </td>}
<td align=center>\embed{\r[\n],10}</td>
</tr>
<!-- ligne 5 -->
<tr><td>état final</td><td align=center>xmax=\embed{\r[\n+1],4}</td>
\for{i9=\n+2 to 2*\n}
{<td align=center>
\embed{\r[\i9],10}</td><td> </td>}
<td align=center>\embed{\r[1+(2*\n)],10}</td>
</tr>
</table>
}
\answer{\Name 1}{\sol[1]}{type=function}
\answer{\Name 2}{\sol[2]}{type=function}
\answer{\Name 3}{\sol[3]}{type=function}
\answer{\Name 4}{\sol[4]}{type=function}
\answer{\Name 5}{\sol[5]}{type=function}
\answer{\Name 6}{\sol[6]}{type=function}
\answer{\Name 7}{\sol[7]}{type=function}
\answer{\Name 8}{\sol[8]}{type=function}
\answer{\Name 9}{\sol[9]}{type=function}
\answer{\Name 10}{\sol[10]}{type=function}
\answer{\Name 11}{\sol[11]}{type=function}
\answer{\Name 12}{\sol[12]}{type=function}
\answer{\Name 13}{\sol[13]}{type=function}
\hint{Les réponses s'écrivent de la façon suivante:<p> si xmax est un nombre fractionnaire, vous devez le laissez sous cette forme dans les calculs afin d'obtenir la meilleure précision (Exemple si xmax=7/11, vous pouvez entrer des calculs du type 4-2*7/11, l'ordinateur effectuera le calcul)}
2005-02-07 23:36:43
2005-02-18 06:27:35