public void TestMVTrackerWithNullMixtures() { Highpoint.Sage.SimCore.Model model = new Highpoint.Sage.SimCore.Model("MVTTracker model"); BasicReactionSupporter brs = new BasicReactionSupporter(); InitializeForTesting(brs); Mixture current = new Mixture(model, "current", Guid.NewGuid()); current.AddMaterial(brs.MyMaterialCatalog["Water"].CreateMass(150, 30)); current.AddMaterial(brs.MyMaterialCatalog["Aluminum Hydroxide"].CreateMass(200, 35)); MassVolumeTracker cmvt = new MassVolumeTracker(brs.MyReactionProcessor); cmvt.SetInitialMixture(null); cmvt.SetInflowMixture(null); cmvt.SetOutflowMixture(null); cmvt.SetVesselCapacity(1000); cmvt.Process(); //_Debug.WriteLine("Temperatures: " + cmvt.TemperatureHistory.ToString()); _Debug.WriteLine("Masses : " + cmvt.MassHistory.ToString()); _Debug.WriteLine("Volumes : " + cmvt.VolumeHistory.ToString()); _Debug.Assert(cmvt.MassHistory.ToString().Equals("[0/0/0/0]")); _Debug.Assert(cmvt.VolumeHistory.ToString().Equals("[0/0/0/0]")); }
/// <summary> /// Exercises an MVTTracker. /// </summary> [TestMethod] public void TestMVTTracker() { Highpoint.Sage.SimCore.Model model = new Highpoint.Sage.SimCore.Model("MVTTracker model"); BasicReactionSupporter brs = new BasicReactionSupporter(); InitializeForTesting(brs); Mixture current = new Mixture(model, "current", Guid.NewGuid()); current.AddMaterial(brs.MyMaterialCatalog["Water"].CreateMass(150, 30)); current.AddMaterial(brs.MyMaterialCatalog["Aluminum Hydroxide"].CreateMass(200, 35)); Mixture inflow = new Mixture(model, "inflow", Guid.NewGuid()); inflow.AddMaterial(brs.MyMaterialCatalog["Acetone"].CreateMass(1500, 70)); inflow.AddMaterial(brs.MyMaterialCatalog["Hexane"].CreateMass(2000, 90)); Mixture outflow = new Mixture(model, "inflow", Guid.NewGuid()); outflow.AddMaterial(brs.MyMaterialCatalog["Acetone"].CreateMass(1400, 17)); outflow.AddMaterial(brs.MyMaterialCatalog["Hexane"].CreateMass(1900, 17)); outflow.AddMaterial(brs.MyMaterialCatalog["Aluminum Hydroxide"].CreateMass(200, 17)); MassVolumeTracker cmvt = new MassVolumeTracker(brs.MyReactionProcessor); cmvt.SetInitialMixture(current); cmvt.SetInflowMixture(inflow); cmvt.SetOutflowMixture(outflow); cmvt.SetVesselCapacity(1000); cmvt.Process(); //_Debug.WriteLine("Temperatures: " + cmvt.TemperatureHistory.ToString()); _Debug.WriteLine("Masses : " + cmvt.MassHistory.ToString()); _Debug.WriteLine("Volumes : " + cmvt.VolumeHistory.ToString()); }