示例#1
0
        /// <summary>
        /// 求反射系数R,文档公式4
        /// </summary>
        private static Plural GetReflectionCoefficient(RayInfo ray, Face diffractionFace, double reflectionAngle, double waveLength, bool judgeWhetherIsVerticallyPolarizedWave)
        {
            Plural R = new Plural();

            if (judgeWhetherIsVerticallyPolarizedWave)//垂直极化波
            {
                double a, b, A, B, C;
                Plural temp = new Plural();  //反射系数化简后的复数形式
                temp.Re = diffractionFace.Material.DielectricLayer[0].Permittivity - Math.Sin(reflectionAngle) * Math.Sin(reflectionAngle);
                temp.Im = 60 * diffractionFace.Material.DielectricLayer[0].Conductivity * waveLength;
                a       = Plural.PluralSqrt(temp).Re; //求反射系数的中间量
                b       = Plural.PluralSqrt(temp).Im; //求反射系数的中间量
                A       = Math.Cos(reflectionAngle) * Math.Cos(reflectionAngle) - a * a - b * b;
                B       = (a + Math.Cos(reflectionAngle)) * (a + Math.Cos(reflectionAngle)) + b * b;
                if (Math.Abs(A) < 0.000001)
                {
                    A = 0;
                }
                R.Re = A / B;
                C    = -2 * b * Math.Cos(reflectionAngle);
                if (Math.Abs(A) < 0.000001)
                {
                    C = 0;
                }
                R.Im = C / B;
            }
            else//水平极化波
            {
                double a, b, A, B, C;
                Plural temp = new Plural();  //反射系数化简后的复数形式
                temp.Re = diffractionFace.Material.DielectricLayer[0].Permittivity - Math.Sin(reflectionAngle) * Math.Sin(reflectionAngle);
                temp.Im = 60 * diffractionFace.Material.DielectricLayer[0].Conductivity * waveLength;
                double temp1 = 60 * diffractionFace.Material.DielectricLayer[0].Conductivity * waveLength * Math.Cos(reflectionAngle);
                a = Plural.PluralSqrt(temp).Re;
                b = Plural.PluralSqrt(temp).Im;
                A = diffractionFace.Material.DielectricLayer[0].Permittivity * diffractionFace.Material.DielectricLayer[0].Permittivity * Math.Cos(reflectionAngle) * Math.Cos(reflectionAngle) - a * a - b * b + temp1 * temp1;
                B = (diffractionFace.Material.DielectricLayer[0].Permittivity * Math.Cos(reflectionAngle) + a) * (diffractionFace.Material.DielectricLayer[0].Permittivity * Math.Cos(reflectionAngle) + a) + (b - temp1) * (b - temp1);
                if (Math.Abs(A) < 0.000001)
                {
                    A = 0;
                }
                R.Re = A / B;
                R.Re = A / B;
                C    = -2 * b * diffractionFace.Material.DielectricLayer[0].Permittivity * Math.Cos(reflectionAngle) - 2 * temp1 * a;
                if (Math.Abs(A) < 0.000001)
                {
                    C = 0;
                }
                R.Im = C / B;
            }
            return(R);
        }
示例#2
0
        //透射系数公式参看http://192.168.1.160/svn/repos1/Documents/射线计算模块设计和理论文档/透射文档1.0.docx 第一页
        //求垂直透射系数
        public Plural GetVerticalRefractance()
        {
            Plural Vreflectance = new Plural();
            double valueOfRe, valueOfIm, aPart, bPart, cPart;
            double WaveLength = CSpeed / inputFrequency;
            Plural temp       = new Plural(); //反射系数化简后的复数形式

            temp.Re         = Epara - Math.Sin(reflectAngle * Math.PI / 180) * Math.Sin(reflectAngle * Math.PI / 180);
            temp.Im         = 60 * intersectionFace.Material.DielectricLayer[1].Conductivity * WaveLength;
            valueOfRe       = Plural.PluralSqrt(temp).Re;                                                                        //求透射系数的中间量
            valueOfIm       = Plural.PluralSqrt(temp).Im;                                                                        //求透射系数的中间量
            aPart           = 2 * Math.Cos(reflectAngle * Math.PI / 180) * (Math.Cos(reflectAngle * Math.PI / 180) + valueOfRe); //
            bPart           = (valueOfRe + Math.Cos(reflectAngle * Math.PI / 180)) * (valueOfRe + Math.Cos(reflectAngle * Math.PI / 180)) + valueOfIm * valueOfIm;
            Vreflectance.Re = aPart / bPart;
            cPart           = -2 * valueOfIm * Math.Cos(reflectAngle * Math.PI / 180);
            Vreflectance.Im = cPart / bPart;
            return(Vreflectance);
        }
示例#3
0
        //求垂直反射系数
        static public Plural VerticalReflectance(double ReflectAngle, double Conduct, double f, double Epara)
        {
            Plural Vreflectance = new Plural();
            double a, b, A, B, C;
            double WaveLength = CSpeed / f;
            Plural temp       = new Plural(); //反射系数化简后的复数形式

            temp.Re         = Epara - Math.Sin(ReflectAngle * Math.PI / 180) * Math.Sin(ReflectAngle * Math.PI / 180);
            temp.Im         = 60 * Conduct * WaveLength;
            a               = Plural.PluralSqrt(temp).Re; //求反射系数的中间量
            b               = Plural.PluralSqrt(temp).Im; //求反射系数的中间量
            A               = Math.Cos(ReflectAngle * Math.PI / 180) * Math.Cos(ReflectAngle * Math.PI / 180) - a * a - b * b;
            B               = (a + Math.Cos(ReflectAngle * Math.PI / 180)) * (a + Math.Cos(ReflectAngle * Math.PI / 180)) + b * b;
            Vreflectance.Re = A / B;
            C               = -2 * b * Math.Cos(ReflectAngle * Math.PI / 180);
            Vreflectance.Im = C / B;
            return(Vreflectance);
        }
示例#4
0
        //求水平透射系数
        public Plural GetHorizonalRefractance()
        {
            Plural Hreflectance = new Plural();
            double valueOfRe, valueOfIm, aPart, bPart, cPart;
            double WaveLength = CSpeed / inputFrequency;
            Plural temp       = new Plural(); //透射系数化简后的复数形式

            temp.Re = Epara - Math.Sin(reflectAngle * Math.PI / 180) * Math.Sin(reflectAngle * Math.PI / 180);
            temp.Im = 60 * intersectionFace.Material.DielectricLayer[1].Conductivity * WaveLength;
            double temp1 = 60 * intersectionFace.Material.DielectricLayer[1].Conductivity * WaveLength * Math.Cos(reflectAngle * Math.PI / 180);

            valueOfRe       = Plural.PluralSqrt(temp).Re;
            valueOfIm       = Plural.PluralSqrt(temp).Im;
            aPart           = 2 * (valueOfRe * (Epara * Math.Cos(reflectAngle * Math.PI / 180) + valueOfRe) + valueOfIm * (valueOfIm - temp1));//
            bPart           = (Epara * Math.Cos(reflectAngle * Math.PI / 180) + valueOfRe) * (Epara * Math.Cos(reflectAngle * Math.PI / 180) + valueOfRe) + (valueOfIm - temp1) * (valueOfIm - temp1);
            Hreflectance.Re = aPart / bPart;
            cPart           = 2 * (valueOfIm * (Epara * Math.Cos(reflectAngle * Math.PI / 180) + valueOfRe) - valueOfRe * (valueOfIm - temp1));//
            Hreflectance.Im = cPart / bPart;
            return(Hreflectance);
        }
示例#5
0
        //求水平反射系数
        static public Plural HorizonalReflectance(double ReflectAngle, double Conduct, double f, double Epara)
        {
            Plural Hreflectance = new Plural();
            double a, b, A, B, C;
            double WaveLength = CSpeed / f;
            Plural temp       = new Plural(); //反射系数化简后的复数形式

            temp.Re = Epara - Math.Sin(ReflectAngle * Math.PI / 180) * Math.Sin(ReflectAngle * Math.PI / 180);
            temp.Im = 60 * Conduct * WaveLength;
            double temp1 = 60 * Conduct * WaveLength * Math.Cos(ReflectAngle * Math.PI / 180);

            a = Plural.PluralSqrt(temp).Re;
            b = Plural.PluralSqrt(temp).Im;
            A = Epara * Epara * Math.Cos(ReflectAngle * Math.PI / 180) * Math.Cos(ReflectAngle * Math.PI / 180) - a * a - b * b + temp1 * temp1;
            B = (Epara * Math.Cos(ReflectAngle * Math.PI / 180) + a) * (Epara * Math.Cos(ReflectAngle * Math.PI / 180) + a) + (b - temp1) * (b - temp1);
            Hreflectance.Re = A / B;
            C = -2 * b * Epara * Math.Cos(ReflectAngle * Math.PI / 180) - 2 * temp1 * a;
            Hreflectance.Im = C / B;
            return(Hreflectance);
        }