Example #1
0
        void SetUpMathExpressions()
        {
            if (BandGap != null)
            {
                BandGap.CustomConstructor = Energy.FromElectronVolts;
                if (Temperature != null)
                {
                    BandGap.SetVariable("T", Temperature.Kelvin);
                }
            }

            if (IntrinsicCarrierConcentration != null)
            {
                IntrinsicCarrierConcentration.CustomConstructor = Concentration.FromPerCubicCentimeter;
                if (Temperature != null)
                {
                    IntrinsicCarrierConcentration.SetVariable("T", Temperature.Kelvin);
                }
            }

            if (DopantConcentration != null)
            {
                DopantConcentration.CustomConstructor = Concentration.FromPerCubicCentimeter;
            }
        }
Example #2
0
        public Material DeepClone(DopingType dopingType)
        {
            var semiconductor = new Semiconductor
            {
                DielectricConstant            = DielectricConstant,
                BandGap                       = BandGap.DeepClone(),
                ElectronAffinity              = ElectronAffinity,
                DopingType                    = dopingType,
                DopantConcentration           = DopantConcentration.DeepClone(),
                IntrinsicCarrierConcentration = IntrinsicCarrierConcentration.DeepClone(),
                Temperature                   = Temperature
            };

            InitClone(semiconductor, Length.FromMicrometers(50));
            semiconductor.Prepare();

            return(semiconductor);
        }