test/ssc_test/cmod_windpower_test.cpp
/// Using Wind Resource File with various Wake Models
Using Wind Resource File with various Wake Models
Using Wind Resource File with various Wake Models
TEST_F(CMWindPowerIntegration, WakeModelsUsingFile_cmod_windpower){
	compute();
	ssc_number_t annual_energy;
	ssc_data_get_number(data, "annual_energy", &annual_energy);
	EXPECT_NEAR(annual_energy, 33224154, e) << "Simple";
	ssc_number_t monthly_energy = ssc_data_get_array(data, "monthly_energy", nullptr)[0];
	EXPECT_NEAR(monthly_energy, 2.8218e6, e) << "Simple: January";
	monthly_energy = ssc_data_get_array(data, "monthly_energy", nullptr)[11];
	EXPECT_NEAR(monthly_energy, 2.8218e6, e) << "Simple: December";
	ssc_number_t wake_loss;
	ssc_data_get_number(data, "wake_losses", &wake_loss);
    EXPECT_NEAR(wake_loss, 1.546, 1e-3) << "Simple: Wake loss";
	ssc_data_set_number(data, "wind_farm_wake_model", 1);
	compute();
	ssc_data_get_number(data, "annual_energy", &annual_energy);
	EXPECT_NEAR(annual_energy, 32346158, e) << "Wasp";
	monthly_energy = ssc_data_get_array(data, "monthly_energy", nullptr)[0];
	EXPECT_NEAR(monthly_energy, 2.7472e6, e) << "Wasp: Jan";
	monthly_energy = ssc_data_get_array(data, "monthly_energy", nullptr)[11];
	EXPECT_NEAR(monthly_energy, 2.7472e6, e)<< "Wasp: Dec";
    ssc_data_get_number(data, "wake_losses", &wake_loss);
    EXPECT_NEAR(wake_loss, 4.148, 1e-3) << "Wasp: Wake loss";
	ssc_data_set_number(data, "wind_farm_wake_model", 2);
	compute();
	ssc_data_get_number(data, "annual_energy", &annual_energy);
	EXPECT_NEAR(annual_energy, 31081848, e) << "Eddy";
	monthly_energy = ssc_data_get_array(data, "monthly_energy", nullptr)[0];
	EXPECT_NEAR(monthly_energy, 2.6398e6, e) << "Eddy: Jan";
	monthly_energy = ssc_data_get_array(data, "monthly_energy", nullptr)[11];
	EXPECT_NEAR(monthly_energy, 2.6398e6, e) << "Eddy: Dec";
    ssc_data_get_number(data, "wake_losses", &wake_loss);
    EXPECT_NEAR(wake_loss, 7.895, 1e-3) << "Eddy: Wake loss";
    ssc_data_set_number(data, "wind_farm_wake_model", 3);
    ssc_data_set_number(data, "wake_int_loss", 5);
    compute();
    ssc_number_t gross;
    ssc_data_get_number(data, "annual_energy", &annual_energy);
    ssc_data_get_number(data, "annual_gross_energy", &gross);
    EXPECT_NEAR(annual_energy, gross*0.95, e) << "Constant";
    ssc_data_get_number(data, "wake_losses", &wake_loss);
    EXPECT_NEAR(wake_loss, 5, 1e-3) << "Constant: Wake loss";
}
TEST_F ( CMWindPowerIntegration , WakeModelsUsingFile_cmod_windpower ) { compute ( ) ; ssc_number_t annual_energy ; ssc_data_get_number ( data , " " , & annual_energy ) ; EXPECT_NEAR ( annual_energy , 33224154 , e ) << " " ; ssc_number_t monthly_energy = ssc_data_get_array ( data , " " , nullptr ) [ 0 ] ; EXPECT_NEAR ( monthly_energy , 2.8218e6 , e ) << " " ; monthly_energy = ssc_data_get_array ( data , " " , nullptr ) [ 11 ] ; EXPECT_NEAR ( monthly_energy , 2.8218e6 , e ) << " " ; ssc_number_t wake_loss ; ssc_data_get_number ( data , " " , & wake_loss ) ; EXPECT_NEAR ( wake_loss , 1.546 , 1e-3 ) << " " ; ssc_data_set_number ( data , " " , 1 ) ; compute ( ) ; ssc_data_get_number ( data , " " , & annual_energy ) ; EXPECT_NEAR ( annual_energy , 32346158 , e ) << " " ; monthly_energy = ssc_data_get_array ( data , " " , nullptr ) [ 0 ] ; EXPECT_NEAR ( monthly_energy , 2.7472e6 , e ) << " " ; monthly_energy = ssc_data_get_array ( data , " " , nullptr ) [ 11 ] ; EXPECT_NEAR ( monthly_energy , 2.7472e6 , e ) << " " ; ssc_data_get_number ( data , " " , & wake_loss ) ; EXPECT_NEAR ( wake_loss , 4.148 , 1e-3 ) << " " ; ssc_data_set_number ( data , " " , 2 ) ; compute ( ) ; ssc_data_get_number ( data , " " , & annual_energy ) ; EXPECT_NEAR ( annual_energy , 31081848 , e ) << " " ; monthly_energy = ssc_data_get_array ( data , " " , nullptr ) [ 0 ] ; EXPECT_NEAR ( monthly_energy , 2.6398e6 , e ) << " " ; monthly_energy = ssc_data_get_array ( data , " " , nullptr ) [ 11 ] ; EXPECT_NEAR ( monthly_energy , 2.6398e6 , e ) << " " ; ssc_data_get_number ( data , " " , & wake_loss ) ; EXPECT_NEAR ( wake_loss , 7.895 , 1e-3 ) << " " ; ssc_data_set_number ( data , " " , 3 ) ; ssc_data_set_number ( data , " " , 5 ) ; compute ( ) ; ssc_number_t gross ; ssc_data_get_number ( data , " " , & annual_energy ) ; ssc_data_get_number ( data , " " , & gross ) ; EXPECT_NEAR ( annual_energy , gross * 0.95 , e ) << " " ; ssc_data_get_number ( data , " " , & wake_loss ) ; EXPECT_NEAR ( wake_loss , 5 , 1e-3 ) << " " ; }
Using Wind Resource File with various Wake Models
Using Wind Resource File with various Wake Models
// Simple Wake Model // WAsp Model // Eddy Viscosity Model // Constant Loss Model