public void organiseData() {
      // ok, we need to collate the data
      data = new HashMap<String, ICollection>();

      final CollectionComplianceTests tests = new CollectionComplianceTests();

      // ok, transmitter data
      data.put(TX + "FREQ", tests.someHave(_tx, Frequency.UNIT.getDimension(), true));
      data.put(TX + "COURSE", tests.someHave(_tx, SI.RADIAN.getDimension(), true));
      data.put(TX + "SPEED", tests.someHave(_tx, METRE.divide(SECOND).getDimension(), true));
      data.put(TX + "LOC", tests.someHaveLocation(_tx));

      // and the receiver
      data.put(RX + "COURSE", tests.someHave(_rx, SI.RADIAN.getDimension(), true));
      data.put(RX + "SPEED", tests.someHave(_rx, METRE.divide(SECOND).getDimension(), true));
      data.put(RX + "LOC", tests.someHaveLocation(_rx));

      // and the sound speed
      data.put(
          "SOUND_SPEED", tests.someHave(getInputs(), METRE.divide(SECOND).getDimension(), false));
    }
예제 #2
0
  private void initializeAerodynamics(Airfoil airf, AirfoilEnum airfoilName) {
    switch (airfoilName) {
      case NACA23_018:
        _id = airf.getId() + "1" + idCounter + "99";
        idCounter++;
        airf.setName(AirfoilEnum.NACA23_018);
        _theAirfoil = airf;
        geometry = airf.getGeometry();

        _alphaZeroLift = Amount.valueOf(Math.toRadians(-1.2), SI.RADIAN);
        _clAlpha = Amount.valueOf(6.3, SI.RADIAN.inverse());
        _alphaStar = Amount.valueOf(Math.toRadians(9.5), SI.RADIAN); // end-of-linearity
        _clStar = 1.3;
        _alphaStall = Amount.valueOf(Math.toRadians(16.0), SI.RADIAN);
        _clMax = 1.65; // 1.8;

        _cdMin = 0.00675;
        _clAtCdMin = 0.3;
        _kFactorDragPolar = 0.004;

        _aerodynamicCenterX = 0.243;
        _cmAC = -0.02;
        _cmACStall = -0.09;
        _cmAlphaAC = 0.;
        calculateMachCr = new CalculateMachCr();
        calculateCdWaveDrag = new CalculateCdWaveDrag();
        break;

      case NACA23_015:
        airf.setName(AirfoilEnum.NACA23_015);
        _id = airf.getId() + "1" + idCounter + "99";
        idCounter++;

        _theAirfoil = airf;
        geometry = airf.getGeometry();

        _alphaZeroLift = Amount.valueOf(Math.toRadians(-1.1), SI.RADIAN);
        _clAlpha = Amount.valueOf(6.3, SI.RADIAN.inverse());
        _alphaStar = Amount.valueOf(Math.toRadians(10), SI.RADIAN); // end-of-linearity
        _clStar = 1.2;
        _alphaStall = Amount.valueOf(Math.toRadians(18.0), SI.RADIAN);
        _clMax = 1.7; // 1.6;

        _cdMin = 0.00625;
        _clAtCdMin = 0.1;
        _kFactorDragPolar = 0.004;
        _aerodynamicCenterX = 0.243;
        _cmAC = -0.02;
        _cmACStall = -0.07;
        _cmAlphaAC = 0.;
        calculateMachCr = new CalculateMachCr();
        calculateCdWaveDrag = new CalculateCdWaveDrag();
        break;

      case NACA23_012:
        airf.setName(AirfoilEnum.NACA23_012);
        _id = airf.getId() + "1" + idCounter + "99";
        idCounter++;

        _theAirfoil = airf;
        geometry = airf.getGeometry();

        _alphaZeroLift = Amount.valueOf(Math.toRadians(-1.32), SI.RADIAN);
        _clAlpha = Amount.valueOf(6.3, SI.RADIAN.inverse());
        _alphaStar = Amount.valueOf(Math.toRadians(14), SI.RADIAN); // end-of-linearity
        _clStar = 1.6;
        _alphaStall = Amount.valueOf(Math.toRadians(18), SI.RADIAN);
        _clMax = 1.8; // 1.5;

        _cdMin = 0.00575;
        _clAtCdMin = 0.23;
        _kFactorDragPolar = 0.004;

        _aerodynamicCenterX = 0.247;
        _cmAC = -0.03;
        _cmACStall = -0.09;
        _cmAlphaAC = 0.;
        calculateMachCr = new CalculateMachCr();
        calculateCdWaveDrag = new CalculateCdWaveDrag();
        break;

      case NACA65_209:
        _id = airf.getId() + "1" + idCounter + "99";
        idCounter++;

        _theAirfoil = airf;
        geometry = airf.getGeometry();

        _alphaZeroLift = Amount.valueOf(Math.toRadians(-1.3), SI.RADIAN);
        _clAlpha = Amount.valueOf(5.96, SI.RADIAN.inverse());
        _alphaStar = Amount.valueOf(Math.toRadians(11), SI.RADIAN); // end-of-linearity
        _clStar = 1.1;
        _alphaStall = Amount.valueOf(Math.toRadians(17.0), SI.RADIAN);
        _clMax = 1.6;

        _cdMin = 0.025;
        _clAtCdMin = 0.2;
        _kFactorDragPolar = 0.0035;

        _aerodynamicCenterX = 0.25;
        _cmAC = -0.07;
        _cmACStall = -0.09;
        _cmAlphaAC = 0.;
        calculateMachCr = new CalculateMachCr();
        calculateCdWaveDrag = new CalculateCdWaveDrag();
        break;

      case NACA65_206:
        _id = airf.getId() + "1" + idCounter + "99";
        idCounter++;

        _theAirfoil = airf;
        geometry = airf.getGeometry();

        _alphaZeroLift = Amount.valueOf(Math.toRadians(-1.4), SI.RADIAN);
        _clAlpha = Amount.valueOf(6.13, SI.RADIAN.inverse());
        _alphaStar = Amount.valueOf(Math.toRadians(10.0), SI.RADIAN); // end-of-linearity
        _clStar = _clAlpha.getEstimatedValue() * _alphaStar.getEstimatedValue();
        _alphaStall = Amount.valueOf(Math.toRadians(15.0), SI.RADIAN);
        _clMax = 1.3;

        _cdMin = 0.025;
        _clAtCdMin = 0.2;
        _kFactorDragPolar = 0.0035;

        _aerodynamicCenterX = 0.25;
        _cmAC = -0.07;
        _cmACStall = -0.09;
        _cmAlphaAC = 0.;
        calculateMachCr = new CalculateMachCr();
        calculateCdWaveDrag = new CalculateCdWaveDrag();
        break;

      case NACA0012:
        airf.setName(AirfoilEnum.NACA0012);
        _id = airf.getId() + "1" + idCounter + "99";
        idCounter++;

        _theAirfoil = airf;
        geometry = airf.getGeometry();

        _alphaZeroLift = Amount.valueOf(Math.toRadians(0), SI.RADIAN);
        _clAlpha = Amount.valueOf(6.92, SI.RADIAN.inverse());
        _alphaStar = Amount.valueOf(Math.toRadians(11), SI.RADIAN); // end-of-linearity
        _clStar = 1.23;
        _alphaStall = Amount.valueOf(Math.toRadians(20.1), SI.RADIAN);
        _clMax = 1.86; // 1.5;

        _cdMin = 0.0055;
        _clAtCdMin = 0.0;
        _kFactorDragPolar = 0.0035;

        _aerodynamicCenterX = 0.25;
        _cmAC = 0.0;
        _cmACStall = -0.09;
        _cmAlphaAC = 0.;
        calculateMachCr = new CalculateMachCr();
        calculateCdWaveDrag = new CalculateCdWaveDrag();
        break;

      case DFVLR_R4:
        airf.setName(AirfoilEnum.DFVLR_R4);
        _id = airf.getId() + "1" + idCounter + "99";
        idCounter++;

        _theAirfoil = airf;
        geometry = airf.getGeometry();

        _alphaZeroLift = Amount.valueOf(Math.toRadians(-3.75), SI.RADIAN);
        _clAlpha = Amount.valueOf(6.3, SI.RADIAN.inverse());
        _alphaStar = Amount.valueOf(Math.toRadians(11), SI.RADIAN); // end-of-linearity
        _clStar = 1.53;
        _alphaStall = Amount.valueOf(Math.toRadians(16.75), SI.RADIAN);
        _clMax = 1.7671; // 1.5;

        _cdMin = 0.0056;
        _clAtCdMin = 0.0;
        _kFactorDragPolar = 0.075;

        _aerodynamicCenterX = 0.25;
        _cmAC = -0.1168;
        _cmACStall = -0.0515;
        _cmAlphaAC = 0.0015;
        calculateMachCr = new CalculateMachCr();
        calculateCdWaveDrag = new CalculateCdWaveDrag();
        break;
      default:
        break;
    }
  }