Esempio n. 1
0
        public void BuildAggregateTest()
        {
            var cca = new ClusterClusterAggregationFactory(_monoPSD, _config, _logger, _neighborslistFactory, _seed);
            var agg = cca.Build(24);

            Assert.Equal(24, agg.NumberOfPrimaryParticles);
        }
Esempio n. 2
0
        public void BuildPolydisperseAggregateTest()
        {
            var file = _resources + "FSP_PrimaryParticleSizeDistribution.xml";
            var dist = XMLSizeDistributionBuilder <double> .Read(file);

            var psd = new TabulatedPrimaryParticleSizeDistribution(dist, _rndGen, _config, integrate: true);
            var cca = new ClusterClusterAggregationFactory(psd, _config, _logger, _neighborslistFactory, _seed);
            var agg = cca.Build(24);

            Assert.Equal(24, agg.NumberOfPrimaryParticles);
        }
Esempio n. 3
0
        public void NoOverlappingParticlesTest()
        {
            var cca    = new ClusterClusterAggregationFactory(_monoPSD, _config, _logger, _neighborslistFactory, _seed);
            var logger = new Mock <ILogger>().Object;
            var rndGen = new Random(_seed);

            for (var i = 0; i < 100; i++)
            {
                var agg = cca.Build(24);

                foreach (var pp1 in agg.Cluster.GetPrimaryParticles())
                {
                    foreach (var pp2 in agg.Cluster.GetPrimaryParticles())
                    {
                        if (pp1 != pp2)
                        {
                            var distance = pp1.GetDistanceToPrimaryParticle(pp2);
                            Assert.True(distance >= pp1.Radius + pp2.Radius);
                        }
                    }
                }
            }
        }