]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Use "pKa" and "pKb" in titration curve instead of generic "pKx"
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 24 Dec 2014 15:20:43 +0000 (16:20 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Wed, 24 Dec 2014 15:20:43 +0000 (16:20 +0100)
bin/templates/face_titration_curve.html
src/face_generators/face_generator.adb
src/problem_generators/problem_generator-titration_curve_suite.adb
src/problem_generators/problem_generator_syswides.ads

index fe6d8ca229657b61936eabaf0cbb51d05c93970e..a65ab5356d5865c04cdc714c911d3b043360349d 100644 (file)
@@ -1,7 +1,7 @@
 
   <div class="backgrounded_block">
     <div class="caption_v1">Zadání:</div>
-    <div class="assignment_text"><span class="key_info">@_SAMPLE_VOLUME_INT_@,@_SAMPLE_VOLUME_DEC_@&nbsp;.&nbsp;10<span class="exponent">@_SAMPLE_VOLUME_EXP_@</span>&nbsp;dm<span class="exponent">3</span> dvojsytné @_SAMPLE_TYPE_@</span> o koncentraci <span class="key_info">@_SAMPLE_CONC_INT_@,@_SAMPLE_CONC_DEC_@&nbsp;.&nbsp;10<span class="exponent">@_SAMPLE_CONC_EXP_@</span>&nbsp;mol/L</span> o <span class="key_info">pKx1 = @_PKX1_INT_@,@_PKX1_DEC_@</span> a <span class="key_info">pKx2&nbsp;=&nbsp;@_PKX2_INT_@,@_PKX2_DEC_@</span> je titrováno odměrným roztokem jednosytné <span class="key_info">@_TITRANT_TYPE_@</span> o koncentraci <span class="key_info">@_TITRANT_CONC_INT_@,@_TITRANT_CONC_DEC_@&nbsp;.&nbsp;10<span class="exponent">@_TITRANT_CONC_EXP_@</span></span>&nbsp;mol/L. Spočítejte pH roztoku a objem přidaného titračního činidla v těchto bodech:
+    <div class="assignment_text"><span class="key_info">@_SAMPLE_VOLUME_INT_@,@_SAMPLE_VOLUME_DEC_@&nbsp;.&nbsp;10<span class="exponent">@_SAMPLE_VOLUME_EXP_@</span>&nbsp;dm<span class="exponent">3</span> dvojsytné @_SAMPLE_TYPE_@</span> o koncentraci <span class="key_info">@_SAMPLE_CONC_INT_@,@_SAMPLE_CONC_DEC_@&nbsp;.&nbsp;10<span class="exponent">@_SAMPLE_CONC_EXP_@</span>&nbsp;mol/L</span> o <span class="key_info">@_PKX_TYPE_@&nbsp;=&nbsp;@_PKX1_INT_@,@_PKX1_DEC_@</span> a <span class="key_info">@_PKX_TYPE_@&nbsp;=&nbsp;@_PKX2_INT_@,@_PKX2_DEC_@</span> je titrováno odměrným roztokem jednosytné <span class="key_info">@_TITRANT_TYPE_@</span> o koncentraci <span class="key_info">@_TITRANT_CONC_INT_@,@_TITRANT_CONC_DEC_@&nbsp;.&nbsp;10<span class="exponent">@_TITRANT_CONC_EXP_@</span></span>&nbsp;mol/L. Spočítejte pH roztoku a objem přidaného titračního činidla v těchto bodech:
       <div class="assignment_text">
         <ul>
           <li>Na počátku titrace</li>
index 8503835f7852feaad515757be90730c524a8c752..d084bea5988fd907d52632a053ef7aed49e57a10 100644 (file)
@@ -506,6 +506,10 @@ package body Face_Generator is
       return E_INVAL;
     end if;
     Insert(Translations, Assoc(Titration_Curve_Suite.PKX2_DEC_KEY, Assignment.Element(Titration_Curve_Suite.PKX2_DEC_KEY)));
+    if (Assignment.Find(Titration_Curve_Suite.PKX_TYPE_KEY)) = Assignment_Info.No_Element then
+      return E_INVAL;
+    end if;
+    Insert(Translations, Assoc(Titration_Curve_Suite.PKX_TYPE_KEY, Assignment.Element(Titration_Curve_Suite.PKX_TYPE_KEY)));
     --
     Insert(Translations, Assoc(Titration_Curve_Suite.ANSWER_PH_START_KEY, Titration_Curve_Suite.ANSWER_PH_START_KEY));
     Insert(Translations, Assoc(Titration_Curve_Suite.ANSWER_VOLUME_START_KEY, Titration_Curve_Suite.ANSWER_VOLUME_FIRST_HALF_KEY));
index 784239efdca904aaae5f1f80cde2a5690e2c68fd..4293c540ef9e84a58c7e66715381c6fa52706a00 100644 (file)
@@ -192,9 +192,11 @@ package body Titration_Curve_Suite is
     Assignment.Insert(PROBLEM_TYPE_KEY, PROBLEM_TYPE_TITRATION_CURVE);
     case Problem.SType is
       when ACID =>
+       Assignment.Insert(PKX_TYPE_KEY, PKX_TYPE_ACID);
        Assignment.Insert(SAMPLE_TYPE_KEY, SAMPLE_TYPE_ACID);
        Assignment.Insert(TITRANT_TYPE_KEY, TITRANT_TYPE_BASE);
       when BASE =>
+       Assignment.Insert(PKX_TYPE_KEY, PKX_TYPE_BASE);
        Assignment.Insert(SAMPLE_TYPE_KEY, SAMPLE_TYPE_BASE);
        Assignment.Insert(TITRANT_TYPE_KEY, TITRANT_TYPE_ACID);
     end case;
index 42b8dbd48e4428423fc278a34011c8e3e8d84591..a679138970acdf0a0087794153ca3c8a399375c6 100644 (file)
@@ -106,6 +106,9 @@ package Problem_Generator_Syswides is
     SAMPLE_VOLUME_DEC_KEY: constant String := "SAMPLE_VOLUME_DEC";
     SAMPLE_VOLUME_EXP_KEY: constant String := "SAMPLE_VOLUME_EXP";
     --
+    PKX_TYPE_KEY: constant String := "PKX_TYPE";
+      PKX_TYPE_ACID: constant String := "pKa";
+      PKX_TYPE_BASE: constant String := "pKb";
     PKX1_INT_KEY: constant String := "PKX1_INT";
     PKX1_DEC_KEY: constant String := "PKX1_DEC";
     PKX2_INT_KEY: constant String := "PKX2_INT";