]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Add hints to solubility problem
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 17 Dec 2014 03:25:49 +0000 (04:25 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Wed, 17 Dec 2014 03:25:49 +0000 (04:25 +0100)
14 files changed:
bin/images/ionic_strength.png [new file with mode: 0644]
bin/images/mcinnes_approximation.png [new file with mode: 0644]
bin/images/sol_def_acco.png [new file with mode: 0644]
bin/images/sol_def_activity.png [new file with mode: 0644]
bin/images/sol_def_conc.png [new file with mode: 0644]
bin/images/sol_def_shared_ion.png [new file with mode: 0644]
bin/images/sol_def_soluted_conc.png [new file with mode: 0644]
bin/images/sol_shared_ion_conc.png [new file with mode: 0644]
bin/images/sol_volume.png [new file with mode: 0644]
bin/templates/hints_solubility_diff_ion.html [new file with mode: 0644]
bin/templates/hints_solubility_ks_gmwv.html [new file with mode: 0644]
bin/templates/hints_solubility_shared_ion.html [new file with mode: 0644]
bin/templates/hints_solubility_v_ksgmw.html [new file with mode: 0644]
src/face_generators/face_generator.adb

diff --git a/bin/images/ionic_strength.png b/bin/images/ionic_strength.png
new file mode 100644 (file)
index 0000000..f9ff6d4
Binary files /dev/null and b/bin/images/ionic_strength.png differ
diff --git a/bin/images/mcinnes_approximation.png b/bin/images/mcinnes_approximation.png
new file mode 100644 (file)
index 0000000..48b1c8f
Binary files /dev/null and b/bin/images/mcinnes_approximation.png differ
diff --git a/bin/images/sol_def_acco.png b/bin/images/sol_def_acco.png
new file mode 100644 (file)
index 0000000..bc802f4
Binary files /dev/null and b/bin/images/sol_def_acco.png differ
diff --git a/bin/images/sol_def_activity.png b/bin/images/sol_def_activity.png
new file mode 100644 (file)
index 0000000..e4e5c34
Binary files /dev/null and b/bin/images/sol_def_activity.png differ
diff --git a/bin/images/sol_def_conc.png b/bin/images/sol_def_conc.png
new file mode 100644 (file)
index 0000000..a0b8835
Binary files /dev/null and b/bin/images/sol_def_conc.png differ
diff --git a/bin/images/sol_def_shared_ion.png b/bin/images/sol_def_shared_ion.png
new file mode 100644 (file)
index 0000000..8555932
Binary files /dev/null and b/bin/images/sol_def_shared_ion.png differ
diff --git a/bin/images/sol_def_soluted_conc.png b/bin/images/sol_def_soluted_conc.png
new file mode 100644 (file)
index 0000000..b73deb5
Binary files /dev/null and b/bin/images/sol_def_soluted_conc.png differ
diff --git a/bin/images/sol_shared_ion_conc.png b/bin/images/sol_shared_ion_conc.png
new file mode 100644 (file)
index 0000000..b486f23
Binary files /dev/null and b/bin/images/sol_shared_ion_conc.png differ
diff --git a/bin/images/sol_volume.png b/bin/images/sol_volume.png
new file mode 100644 (file)
index 0000000..500322f
Binary files /dev/null and b/bin/images/sol_volume.png differ
diff --git a/bin/templates/hints_solubility_diff_ion.html b/bin/templates/hints_solubility_diff_ion.html
new file mode 100644 (file)
index 0000000..07aa8d9
--- /dev/null
@@ -0,0 +1,31 @@
+       <div class="hint_block">
+         <div class="hint_caption">
+           Definice součinu rozpustnosti:
+         </div>
+         <img class="math_formula" src="/images/sol_def_activity.png" alt="Definice součinu rozpustnosti - aktivity" />
+
+          <div class="hint_caption">
+           Zjednodušeně lze vyjádřit pomocí koncentrací:
+         </div>
+         <img class="math_formula" src="/images/sol_def_conc.png" alt="Definice součinu rozpustnosti - koncentrace" />
+
+          <div class="hint_caption">
+           Iontová síla:
+         </div>
+         <img class="math_formula_multiline" src="/images/ionic_strength.png" alt="Iontová síla" />
+
+          <div class="hint_caption">
+           McInnesova aproximace:
+         </div>
+         <img class="math_formula_multiline" src="/images/mcinnes_approximation.png" alt="McInnesova aproximace" />
+
+          <div class="hint_caption">
+           Součin rozpustnosti včetně aktivitních koeficientů:
+         </div>
+         <img class="math_formula" src="/images/sol_def_acco.png" alt="Součin rozpustnosti včetně aktivitních koeficientů" />
+
+         <div>
+            Přítomnost dobře rozpustného indiferentního elektrolytu - látky, která nemá s danou solí žádný společný iont - se projeví pouze změnou iontové síly roztoku, ve kterém se daná sůl rozpouští. Je tedy třeba tuto iontovou spočítat a uvažovat ji ve výpočtu. Při výpočtu iontové síly se uvažují jen ionty dobře rozpustného indiferentního elektrolytu.
+          </div>
+       </div>
+       
diff --git a/bin/templates/hints_solubility_ks_gmwv.html b/bin/templates/hints_solubility_ks_gmwv.html
new file mode 100644 (file)
index 0000000..ba0a93e
--- /dev/null
@@ -0,0 +1,27 @@
+       <div class="hint_block">
+         <div class="hint_caption">
+           Definice součinu rozpustnosti:
+         </div>
+         <img class="math_formula" src="/images/sol_def_activity.png" alt="Definice součinu rozpustnosti - aktivity" />
+
+          <div class="hint_caption">
+           Zjednodušeně lze vyjádřit pomocí koncentrací:
+         </div>
+         <img class="math_formula" src="/images/sol_def_conc.png" alt="Definice součinu rozpustnosti - koncentrace"" />
+
+          <div class="hint_caption">
+           Iontová síla:
+         </div>
+         <img class="math_formula_multiline" src="/images/ionic_strength.png" alt="Iontová síla" />
+
+          <div class="hint_caption">
+           McInnesova aproximace:
+         </div>
+         <img class="math_formula_multiline" src="/images/mcinnes_approximation.png" alt="McInnesova aproximace" />
+
+          <div class="hint_caption">
+           Součin rozpustnosti včetně aktivitních koeficientů:
+         </div>
+         <img class="math_formula" src="/images/sol_def_acco.png" alt="Součin rozpustnosti včetně aktivitních koeficientů" />
+       </div>
+       
diff --git a/bin/templates/hints_solubility_shared_ion.html b/bin/templates/hints_solubility_shared_ion.html
new file mode 100644 (file)
index 0000000..504c718
--- /dev/null
@@ -0,0 +1,25 @@
+       <div class="hint_block">
+         <div class="hint_caption">
+           Definice součinu rozpustnosti:
+         </div>
+         <img class="math_formula" src="/images/sol_def_activity.png" alt="Definice součinu rozpustnosti - aktivity" />
+
+          <div class="hint_caption">
+           Zjednodušeně lze vyjádřit pomocí koncentrací:
+         </div>
+         <img class="math_formula" src="/images/sol_def_conc.png" alt="Definice součinu rozpustnosti - koncentrace" />
+
+          <div class="hint_caption">
+           Zjednodušeně lze říci, že koncentrace sdíleného aniontu odpovídá koncentraci aniontu pocházejícího jen z dobře rozpustné soli.
+         </div>
+         <img class="math_formula" src="/images/sol_def_shared_ion.png" alt="Součin rozpustnosti, sdílený anion" /> 
+
+          <div class="hint_caption">
+           Koncentrace rozpuštěného kationu dané soli, je-li v roztoku přítomen dobře rozpustný elektrolyt, který má s danou solí společný anion:
+         </div>
+         <img class="math_formula_multiline" src="/images/sol_shared_ion_conc.png" alt="Koncentrace rozpuštěného kationu" />         
+
+          <div>
+            Pokud je v roztoku přítomna dobře rozpustná sůl, která má s danou solí společný anion, má daná špatně rozpustná sůl problém nacpat &rdquo;svoje&ldquo; anionty do roztoku, protože už jich tam dost je. Rozpustnost dané soli se proto ještě sníží. Kdyby byl v roztoku přítomen dobře rozpustný elektrolyt, který by s danou solí sdílel kation, platilo by totéž.
+          </div>
+        </div>
diff --git a/bin/templates/hints_solubility_v_ksgmw.html b/bin/templates/hints_solubility_v_ksgmw.html
new file mode 100644 (file)
index 0000000..6b9bafa
--- /dev/null
@@ -0,0 +1,37 @@
+       <div class="hint_block">
+         <div class="hint_caption">
+           Definice součinu rozpustnosti:
+         </div>
+         <img class="math_formula" src="/images/sol_def_activity.png" alt="Definice součinu rozpustnosti - aktivity" />
+
+          <div class="hint_caption">
+           Zjednodušeně lze vyjádřit pomocí koncentrací:
+         </div>
+         <img class="math_formula" src="/images/sol_def_conc.png" alt="Definice součinu rozpustnosti - koncentrace" />
+
+          <div class="hint_caption">
+           Koncentrace rozpuštěné soli:
+         </div>
+         <img class="math_formula_multiline" src="/images/sol_def_soluted_conc.png" alt="Koncentrace rozpuštěné soli" />
+
+          <div class="hint_caption">
+           Objem nutný k rozpuštění dané koncentrace soli:
+         </div>
+         <img class="math_formula_multiline" src="/images/sol_volume.png" alt="Objem nutný k rozpuštění dané koncentrace soli" />
+
+          <div class="hint_caption">
+           Iontová síla:
+         </div>
+         <img class="math_formula_multiline" src="/images/ionic_strength.png" alt="Iontová síla" />
+
+          <div class="hint_caption">
+           McInnesova aproximace:
+         </div>
+         <img class="math_formula_multiline" src="/images/mcinnes_approximation.png" alt="McInnesova aproximace" />
+
+          <div class="hint_caption">
+           Součin rozpustnosti včetně aktivitních koeficientů:
+         </div>
+         <img class="math_formula" src="/images/sol_def_acco.png" alt="Součin rozpustnosti včetně aktivitních koeficientů" />
+       </div>
+       
index 21301d536a4dba21a577a07dc4ce549c69aba97b..ae8a18412bfe45eed7d8066fcfda5db0fef346c6 100644 (file)
@@ -186,7 +186,7 @@ package body Face_Generator is
     Translations_Params: Translate_Set;
     Translations_Submit: Translate_Set;
     Translations: Translate_Set;
-    Temp: HTML_Code;
+    Temp, Hints: HTML_Code;
     Params_Code: HTML_Code;
 
     P_Subtype: UB_Text;
@@ -275,6 +275,9 @@ package body Face_Generator is
        Insert(Translations, Assoc(Solubility_Suite.MOLAR_MASS_INT_KEY, Assignment.Element(Solubility_Suite.MOLAR_MASS_INT_KEY)));
        Insert(Translations, Assoc(Solubility_Suite.MOLAR_MASS_DEC_KEY, Assignment.Element(Solubility_Suite.MOLAR_MASS_DEC_KEY)));
        
+       Hints := Parse(Filename => "templates/hints_solubility_v_ksgmw.html", Cached => True);
+       Insert(Translations, Assoc(HINTS_SECTION_KEY, HTML_To_Fixed_String(Hints)));
+
        Temp := Parse(Filename => "templates/face_solubility_v_f_g_ks.html", Translations => Translations);
        Append_HTML(Source => HTML, New_Item => Temp);
       elsif P_Subtype = Solubility_Suite.PROBLEM_SUBTYPE_KS_FROM_G_V then
@@ -317,6 +320,9 @@ package body Face_Generator is
        Insert(Translations, Assoc(Solubility_Suite.MOLAR_MASS_INT_KEY, Assignment.Element(Solubility_Suite.MOLAR_MASS_INT_KEY)));
        Insert(Translations, Assoc(Solubility_Suite.MOLAR_MASS_DEC_KEY, Assignment.Element(Solubility_Suite.MOLAR_MASS_DEC_KEY)));
 
+       Hints := Parse(Filename => "templates/hints_solubility_ks_gmwv.html", Cached => True);
+       Insert(Translations, Assoc(HINTS_SECTION_KEY, HTML_To_Fixed_String(Hints)));
+
        Temp := Parse(Filename => "templates/face_solubility_ks_f_g_v.html", Translations => Translations);
        Append_HTML(Source => HTML, New_Item => Temp);
       elsif P_Subtype = Solubility_Suite.PROBLEM_SUBTYPE_C_FROM_KS_DIFFERENT_IONS or P_Subtype = Solubility_Suite.PROBLEM_SUBTYPE_C_FROM_KS_SHARED_ION then
@@ -356,8 +362,12 @@ package body Face_Generator is
        Insert(Translations, Assoc(Solubility_Suite.KS_EXP_KEY, Assignment.Element(Solubility_Suite.KS_EXP_KEY)));
 
        if P_Subtype = Solubility_Suite.PROBLEM_SUBTYPE_C_FROM_KS_DIFFERENT_IONS then 
+         Hints := Parse(Filename => "templates/hints_solubility_diff_ion.html", Cached => True);
+         Insert(Translations, Assoc(HINTS_SECTION_KEY, HTML_To_Fixed_String(Hints)));
          Temp := Parse(Filename => "templates/face_solubility_c_f_ks_diff.html", Translations => Translations);
        else
+         Hints := Parse(Filename => "templates/hints_solubility_shared_ion.html", Cached => True);
+         Insert(Translations, Assoc(HINTS_SECTION_KEY, HTML_To_Fixed_String(Hints)));
          Temp := Parse(Filename => "templates/face_solubility_c_f_ks_shared.html", Translations => Translations);
        end if;
        Append_HTML(Source => HTML, New_Item => Temp);