test/ssc_test/cmod_windpower_test.cpp
/// Measurement heights are different from the turbine's hub height
Measurement heights are different from the turbine's hub height
Measurement heights are different from the turbine ' s hub height
TEST_F(CMWindPowerIntegration, HubHeightInterpolation_cmod_windpower) {
	ssc_data_unassign(data, "wind_resource_filename");
	var_data* windresourcedata = create_winddata_array(1,1);
	var_table *vt = static_cast<var_table*>(data);
	vt->assign("wind_resource_data", *windresourcedata);
	vt->assign("wind_turbine_hub_ht", 200);
	bool completed = compute(false);
	EXPECT_FALSE(completed) << "Heights difference > 35m";
	vt->unassign("wind_turbine_hub_ht");
	vt->assign("wind_turbine_hub_ht", 90);
	compute();
	ssc_number_t annual_energy;
	ssc_data_get_number(data, "annual_energy", &annual_energy);
	EXPECT_GT(annual_energy, 4e06) << "Annual energy should be higher than height at 90";
	free_winddata_array(windresourcedata);
}
TEST_F ( CMWindPowerIntegration , HubHeightInterpolation_cmod_windpower ) { ssc_data_unassign ( data , " " ) ; var_data * windresourcedata = create_winddata_array ( 1 , 1 ) ; var_table * vt = static_cast < var_table * > ( data ) ; vt -> assign ( " " , * windresourcedata ) ; vt -> assign ( " " , 200 ) ; bool completed = compute ( false ) ; EXPECT_FALSE ( completed ) << " " ; vt -> unassign ( " " ) ; vt -> assign ( " " , 90 ) ; compute ( ) ; ssc_number_t annual_energy ; ssc_data_get_number ( data , " " , & annual_energy ) ; EXPECT_GT ( annual_energy , 4e06 ) << " " ; free_winddata_array ( windresourcedata ) ; }
Measurement heights are different from the turbine's hub height
Measurement heights are different from the turbine ' s hub height
// Case 1: hubheight is 200, error // Case 2: hubweight is 90, use shear exponent interpolation