Exemple #1
0
        private void ThicknessGaugeInit(AppConfigController configController, XMLMaterialsController materialsController)
        {
            var      nameMaterialPEC = configController.GetStrValue("materialPEC");
            Material materialPEC     = materialsController.GetMaterial(nameMaterialPEC);

            double       radiusPEC    = configController.GetDoubleValue("radiusPEC");
            double       amplitude    = configController.GetDoubleValue("amplitude");
            double       frequency    = configController.GetDoubleValue("frequency");
            AcousticWave acousticWave = new AcousticWave(amplitude, frequency);
            RoundPEC     roundPEC     = new RoundPEC(radiusPEC, materialPEC, acousticWave);

            var      nameMaterialTO = configController.GetStrValue("materialTO");
            Material materialTO     = materialsController.GetMaterial(nameMaterialTO);

            double     thicknessTO = configController.GetDoubleValue("thicknessTO");
            TestObject testObject  = new TestObject(materialTO, thicknessTO);

            this.thicknessGauge = new UltrasonicThicknessGauge(roundPEC, testObject);

            if (this.thicknessGauge.IsFresnelZone)
            {
                templatePath = @"Templates\ThicknessGaugeFresnel";
            }
            else
            {
                templatePath = @"Templates\ThicknessGaugeFraunhofer";
            }

            this.thicknessGauge.StartTesting();
        }
        public void UltrasonicThicknessGaugeTestInialize()
        {
            // arrange
            double   speedOfSound = 340;
            double   density      = 1.2;
            double   fspl         = 1.1;
            Material materialPEC  = new Material(speedOfSound, density, fspl);

            double       amplitude    = 15;
            double       frequency    = 4000;
            AcousticWave acousticWave = new AcousticWave(amplitude, frequency);

            double   radius   = 0.02;
            RoundPEC roundPEC = new RoundPEC(radius, materialPEC, acousticWave);

            double   speedOfSound2 = 3000;
            double   density2      = 1.2;
            double   fspl2         = 1.1;
            Material materialTO    = new Material(speedOfSound2, density2, fspl2);

            TestObject testObject = new TestObject(materialTO, 0.2);

            thicknessGauge = new UltrasonicThicknessGauge(roundPEC, testObject);
            thicknessGauge.StartTesting();
        }