Exemplo n.º 1
0
        /// <summary>
        /// 求绕射场场强,文档公式1
        /// </summary>
        public static EField GetDiffractionEField(EField RayEFieldAtDiffractionPoint, RayInfo ray, Face diffractionFace1, Face diffractionFace2, Point diffractionPoint, Point viewPoint, double frequence)
        {
            if ((RayEFieldAtDiffractionPoint == null) || (ray == null) || (diffractionFace1 == null) || (diffractionFace2 == null) ||
                (diffractionPoint == null) || (viewPoint == null))
            {
                throw new Exception("绕射场强计算输入的参数中有参数是null");
            }
            //
            AdjacentEdge sameEdge                = new AdjacentEdge(diffractionFace1, diffractionFace2);                                                                                //获取劈边
            double       waveLength              = 300.0 / frequence;                                                                                                                   //波长
            Plural       PluralOfVerticalEField  = EField.GetVerticalE(RayEFieldAtDiffractionPoint, ray.RayVector, sameEdge.LineVector);                                                //获得电场的垂直分量
            Plural       PluralOfHorizonalEField = EField.GetHorizonalE(RayEFieldAtDiffractionPoint, ray.RayVector, sameEdge.LineVector);                                               //获得电场的水平分量
            double       Ad   = GetSpreadFactor(ray.Origin, sameEdge, diffractionPoint, viewPoint, waveLength);                                                                         //获得空间衰减的扩散因子
            double       k    = 2 * Math.PI / waveLength;                                                                                                                               //波矢量
            double       s2   = diffractionPoint.GetDistance(viewPoint);                                                                                                                //绕射点到观察点的距离
            Plural       ejks = new Plural(Math.Cos(k * s2), -Math.Sin(k * s2));                                                                                                        //exp(-jks),相位
            Plural       verticalDiffractionFactor          = GetDiffractionFactor(ray, diffractionFace1, diffractionFace2, sameEdge, diffractionPoint, viewPoint, waveLength, true);;  //垂直极化波入射时的绕射系数D
            Plural       PluralOfVerticalDiffractionEField  = Plural.PluralMultiplyDouble(PluralOfVerticalEField * verticalDiffractionFactor * ejks, Ad);                               //垂直极化波入射时的绕射场
            Plural       horizonalDiffractionFactor         = GetDiffractionFactor(ray, diffractionFace1, diffractionFace2, sameEdge, diffractionPoint, viewPoint, waveLength, false);; //水平极化波入射时的绕射系数D
            Plural       PluralOfHorizonalDiffractionEField = Plural.PluralMultiplyDouble(horizonalDiffractionFactor * PluralOfHorizonalEField * ejks, Ad);                             //水平极化波入射时的绕射场
            SpectVector  vectorOfDiffractionRay             = new SpectVector(diffractionPoint, viewPoint);                                                                             //绕射波的方向
            //垂直极化波绕射后的绕射场
            SpectVector vectorOfVerticalDiffractionEField = GetVectorOfVerticalEField(vectorOfDiffractionRay, sameEdge.LineVector);                                                     //获得电场的垂直分量的方向
            EField      verticalDiffractionEField         = GetXYZComponentOfTotalEField(PluralOfVerticalDiffractionEField, vectorOfVerticalDiffractionEField);
            //水平极化波绕射后的绕射场
            SpectVector vectorOfHorizonalDiffractionEField = GetVectorOfHorizonalEField(vectorOfDiffractionRay, sameEdge.LineVector);                                                                                                       //获得电场的水平分量的方向
            EField      horizonalDiffractionEField         = GetXYZComponentOfTotalEField(PluralOfHorizonalDiffractionEField, vectorOfHorizonalDiffractionEField);
            EField      diffractionEField = new EField(verticalDiffractionEField.X + horizonalDiffractionEField.X, verticalDiffractionEField.Y + horizonalDiffractionEField.Y, verticalDiffractionEField.Z + horizonalDiffractionEField.Z); //绕射场

            return(diffractionEField);
        }
Exemplo n.º 2
0
        //求反射电场强度的水平分量
        private static EField HorizonalEfield(EField e, RayInfo rayIn, RayInfo rayOut, SpectVector l, double ReflectAngle, double Conduct, double Epara, double s1, double s2, double f)
        {
            Plural      HEi     = EField.GetHorizonalE(e, rayIn.RayVector, l);
            Plural      H       = HorizonalReflectance(ReflectAngle, Conduct, f, Epara);
            Plural      A       = new Plural(s1 / (s1 + s2));
            Plural      E       = HEi * H * A * GetPhase(s1, s2, f);
            SpectVector l1      = SpectVector.VectorCrossMultiply(rayOut.RayVector, SpectVector.VectorCrossMultiply(rayIn.RayVector, l));
            EField      Hefield = SpectVector.VectorDotMultiply(E, l1);

            return(Hefield);
        }
Exemplo n.º 3
0
        public EField GetHorizonalEfield()
        {
            if (rayIn.RayVector.IsParallelAndSamedirection(intersectionFace.NormalVector))
            {
                return(null);
            }
            Plural horizonOfE = e.GetHorizonalE(rayIn.RayVector, verticalVector);
            Plural horiValue  = GetHorizonalRefractance();
            Plural A          = new Plural(inDistance / (inDistance + outDistance));
            Plural E          = horizonOfE * horiValue * A * GetPhase();

            //原static语句:VectorInSpace l1 = VectorInSpace.VectorCrossMultiply(rayOut.RayVector, VectorInSpace.VectorCrossMultiply(rayIn.RayVector, l));
            SpectVector temp1      = rayIn.RayVector.CrossMultiplied(verticalVector);
            SpectVector temp2      = GetRayOut().RayVector;
            SpectVector tempVector = temp2.CrossMultiplied(temp1).GetNormalizationVector();

            return(tempVector.DotMultiplied(E));
        }