Exemplo n.º 1
0
 /// <summary>
 /// Customer 01
 /// </summary>
 public void SetPiQualityAndQuantity(PrimaryInfluent Pi)
 {
     Pi.Tss_MgPerLiter  = 200;
     Pi.Bod5_MgPerLiter = 200;
     Pi.Q_DailyAveraged_CubicMeterPerDay = 6000;
     PiFieldsUpdateProcess(Pi);
 }
 public void FlowsInFrom(PrimaryInfluent Pi)
 {
     Pi_Q_DailyAveraged_CubicMeterPerDay = Pi.Q_DailyAveraged_CubicMeterPerDay;
     Pi_Tss_MgPerLiter  = Pi.Tss_MgPerLiter;
     Pi_Tss_MgPerDay    = Pi.Tss_MgPerDay;
     Pi_Tss_KgPerDay    = Pi.Tss_KgPerDay;
     Pi_Bod5_MgPerLiter = Pi.Bod5_MgPerLiter;
     Pi_Bod5_MgPerDay   = Pi.Bod5_MgPerDay;
     Pi_Bod5_KgPerDay   = Pi.Bod5_KgPerDay;
 }
        public void UC01_PrimaryInfluent()
        {
            Pst_C01         C01 = new Pst_C01();
            PrimaryInfluent Pi  = new PrimaryInfluent();

            C01.SetPiQualityAndQuantity(Pi);

            Assert.AreEqual(1200000000f, Pi.Tss_MgPerDay);
            Assert.AreEqual(1200f, Pi.Tss_KgPerDay);
            Assert.AreEqual(1200000000f, Pi.Bod5_MgPerDay);
            Assert.AreEqual(1200f, Pi.Bod5_KgPerDay);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Customer 01
 /// </summary>
 public void PiFieldsUpdateProcess(PrimaryInfluent Pi)
 {
     Pi.Tss_MgPerDay
         = Pi.Tss_MgPerLiter
           * Pi.Q_DailyAveraged_CubicMeterPerDay
           * UnitsConversion.CubicMeter_To_L;
     Pi.Tss_KgPerDay
         = Pi.Tss_MgPerDay
           * UnitsConversion.Mg_To_Kg;
     Pi.Bod5_MgPerDay
         = Pi.Bod5_MgPerLiter
           * Pi.Q_DailyAveraged_CubicMeterPerDay
           * UnitsConversion.CubicMeter_To_L;
     Pi.Bod5_KgPerDay
         = Pi.Bod5_MgPerDay
           * UnitsConversion.Mg_To_Kg;
 }
        public void UC02_PstFlowsInFromPi()
        {
            Pst_C01         Pst_C01 = new Pst_C01();
            PrimaryInfluent Pi      = new PrimaryInfluent();

            Pst_C01.SetPiQualityAndQuantity(Pi);

            PrimarySedimentationTank Pst = new PrimarySedimentationTank();

            Pst.FlowsInFrom(Pi);

            Assert.AreEqual(Pi.Q_DailyAveraged_CubicMeterPerDay, Pst.Pi_Q_DailyAveraged_CubicMeterPerDay);
            Assert.AreEqual(Pi.Tss_MgPerLiter, Pst.Pi_Tss_MgPerLiter);
            Assert.AreEqual(Pi.Tss_MgPerDay, Pst.Pi_Tss_MgPerDay);
            Assert.AreEqual(Pi.Tss_KgPerDay, Pst.Pi_Tss_KgPerDay);
            Assert.AreEqual(Pi.Bod5_MgPerLiter, Pst.Pi_Bod5_MgPerLiter);
            Assert.AreEqual(Pi.Bod5_MgPerDay, Pst.Pi_Bod5_MgPerDay);
            Assert.AreEqual(Pi.Bod5_KgPerDay, Pst.Pi_Bod5_KgPerDay);
        }
        public void UC04_PstFlowsOutToPsAndPe()
        {
            Pst_C01         Pst_C01 = new Pst_C01();
            PrimaryInfluent Pi      = new PrimaryInfluent();

            Pst_C01.SetPiQualityAndQuantity(Pi);
            //Pi.SetQualityAndQuantity(Pi_C01);

            PrimarySedimentationTank Pst = new PrimarySedimentationTank();

            Pst_C01.SetPstCapability(Pst);
            //Pst.SetCapability(C01);
            Pst.FlowsInFrom(Pi);
            Pst.TreatmentProcess();

            PrimarySludge Ps = new PrimarySludge();

            Pst.FlowsOutTo(Ps);

            PrimaryEffluent Pe = new PrimaryEffluent();

            Pst.FlowsOutTo(Pe);

            //TODO: Encapsulate C01 Class to Stable All UC Tests
            Assert.AreEqual(720f, Ps.Tss_KgPerDay);
            Assert.AreEqual(360f, Ps.Bod5_KgPerDay);
            Assert.AreEqual(35.9f, Ps.Q_DailyAveraged_CubicMeterPerDay, 0.1);

            Assert.AreEqual(5964.1f, Pe.Q_DailyAveraged_CubicMeterPerDay, 0.1);
            Assert.AreEqual(80.5f, Pe.Tss_MgPerLiter, 0.1);
            Assert.AreEqual(140.8f, Pe.Bod5_MgPerLiter, 0.1);


            Assert.AreEqual(720f, Ps.Tss_KgPerDay);
            Assert.AreEqual(360f, Ps.Bod5_KgPerDay);
            Assert.AreEqual(35.9f, Ps.Q_DailyAveraged_CubicMeterPerDay, 0.1);

            Assert.AreEqual(5964.1f, Pe.Q_DailyAveraged_CubicMeterPerDay, 0.1);
            Assert.AreEqual(80.5f, Pe.Tss_MgPerLiter, 0.1);
            Assert.AreEqual(140.8f, Pe.Bod5_MgPerLiter, 0.1);
        }
        public void UC03_PstRemovalCapability()
        {
            Pst_C01         C01 = new Pst_C01();
            PrimaryInfluent Pi  = new PrimaryInfluent();

            C01.SetPiQualityAndQuantity(Pi);

            PrimarySedimentationTank Pst = new PrimarySedimentationTank();

            C01.SetPstCapability(Pst);

            Pst.FlowsInFrom(Pi);
            Pst.TreatmentProcess();

            Assert.AreEqual(720f, Pst.Ps_Tss_KgPerDay);
            Assert.AreEqual(360f, Pst.Ps_Bod5_KgPerDay);
            Assert.AreEqual(35.9f, Pst.Ps_Q_DailyAveraged_CubicMeterPerDay, 0.1);

            Assert.AreEqual(5964.1f, Pst.Pe_Q_DailyAveraged_CubicMeterPerDay, 0.1);
            Assert.AreEqual(5964100f, Pst.Pe_Q_DailyAveraged_LiterPerDay, 100);
            Assert.AreEqual(80.5f, Pst.Pe_Tss_MgPerLiter, 0.1);
            Assert.AreEqual(140.8f, Pst.Pe_Bod5_MgPerLiter, 0.1);
        }