Exemple #1
0
        public void TestCase()
        {
            RK4Solver solver = new RK4Solver(ODEFunction, 0, Vector <double> .Build.DenseOfArray(new double[] { 0 }));

            //solver.Init(0, Vector<double>.Build.DenseOfArray(new double[] { 0.0 }));
            solver.Step(1);
            Console.WriteLine(solver.State [0]);
            solver.Step(1);
            Console.WriteLine(solver.State [0]);
            solver.Step(1);
            Console.WriteLine(solver.State [0]);
        }
Exemple #2
0
 public void EvaluateDynamicInflow(double dt, double mu_x, double mu_z, double beta_cosw, double CT,
                                   double R, double Omega,
                                   out double lambda_i0, out double xi, out double E_x)
 {
     lambdabar = -mu_z + vbar + solver.State[0];
     //if (lambdabar > 0) lambdabar = 0;
     mu         = mu_x;
     dCt        = CT - Ct0;
     this.Omega = Omega;
     solver.Step(dt);
     lambda_i0 = -(vbar + solver.State[0]);
     if (lambda_i0 > 0)
     {
         lambda_i0 = 0;
         TrimDynamicInflow(mu_x, mu_z, beta_cosw, CT, R);
     }
     xi  = calculateWakeSkew(mu_x, mu_z, beta_cosw, lambda_i0);
     E_x = (15.0 * Math.PI / 32.0) * Math.Tan(xi / 2.0);   // Pitt&Peters choice of coefficients
     // Ground effect reduction is done on CT in Rotor instead..
 }