public void SetMetParameters(double WindSpeed, double CosWind, StabClass StabilityClass,
     double TurbulenceStrength, double DisplacementHeight)
 {
     SetMetParameters(WindSpeed, CosWind, StabilityClass);
     MeteoParameters M = MetParameters;
     M.C = TurbulenceStrength;
     M.D = DisplacementHeight;
     MetParameters = M;
 }
Example #2
0
 /// <summary>
 /// Output of meteo data of the recent situation to the console
 /// </summary>
 private static void OutputOfMeteoData()
 {
     Console.WriteLine("Obukhov length [m]:        " + Ob[1][1].ToString("0.0"));
     Console.WriteLine("Friction velocity [m/s]:   " + Ustern[1][1].ToString("0.00"));
     Console.WriteLine("Boundary-layer height [m]: " + BdLayHeight.ToString("0"));
     if (WindVelGral > 0)
     {
         if (WindVelGral < 20)
         {
             Console.Write("Init meteo:  wind speed [m/s]: " + WindVelGral.ToString("F2"));
             double dir = Math.Round(270 - WindDirGral * 180 / Math.PI, 1);
             if (dir < 0)
             {
                 dir = 270 + 360 + dir;
             }
             if (dir > 360)
             {
                 dir -= 360;
             }
             Console.Write("  direction [deg]: " + dir.ToString("F0"));
         }
         else
         {
             Console.Write("Init meteo:  weather situation token: " + WindVelGral.ToString("F2"));
         }
         if (StabClass > 0)
         {
             Console.Write("  Stability class [-]: " + StabClass.ToString("F0"));
         }
         Console.WriteLine("");
     }
     if (WindVelGramm > -1)
     {
         Console.Write("GRAMM meteo: wind speed [m/s]: " + WindVelGramm.ToString("F2"));
         if (WindDirGramm >= 0)
         {
             Console.Write("  direction [deg]: " + WindDirGramm.ToString("F0"));
         }
         if (StabClassGramm > 0)
         {
             Console.Write("  Stability class [-]: " + StabClassGramm.ToString("F0"));
         }
         Console.WriteLine("");
     }
     Console.WriteLine("                           ----------");
 }
 public void SetMetParameters(double WindSpeed, double CosWind, StabClass StabilityClass)
 {
     if (CosWind < -1 || CosWind > 1) { throw new Exception("Invalid value for CosWind"); }
     P2P_SetupMeteoParameters(_p2pStruct, WindSpeed, CosWind, (int)StabilityClass);
 }