tests/testthat/test-get_risk_y.R

test_that("Risk_y function returning values",{
  rotor_grids <- generate_rotor_grids(yinc = 0.05, xinc = 0.05, chord_prof_5MW)

  out <- get_pcoll_grid(
    rotor_grids = rotor_grids,
    direction = 1,
    rotor_radius = 120,
    blade_width = 5,
    rotor_speed = 15,
    blade_pitch = 15,
    flight_type = "flapping",
    n_blades = 3,
    flight_speed = 13.1,
    wing_span = 1.01,
    body_lt = 0.85)

  get_risk_y(rotor_grids$x_grid[10, ], out[10, ])

  expect_equal(
    get_risk_y(rotor_grids$x_grid[10, ], out[10, ]),
    expected = 0.21691707
  )

  expect_equal(
    get_risk_y(rotor_grids$x_grid[20, ], out[20, ]),
    expected = 0.27363637
  )

})
HiDef-Aerial-Surveying/stochLAB documentation built on March 16, 2023, 8:13 a.m.