Skip to content

Commit

Permalink
Expose outputs, apply corrections hourly rather than annually
Browse files Browse the repository at this point in the history
  • Loading branch information
mjprilliman committed Aug 23, 2023
1 parent d35d4f0 commit eb5d125
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 13 deletions.
6 changes: 3 additions & 3 deletions shared/lib_pv_io_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,12 +860,10 @@ void PVSystem_IO::AllocateOutputs(compute_module* cm)
p_derateSelfShading.push_back(cm->allocate(prefix + "ss_derate", numberOfWeatherFileRecords));
p_derateSelfShadingDiffuse.push_back(cm->allocate(prefix + "ss_diffuse_derate", numberOfWeatherFileRecords));
p_derateSelfShadingReflected.push_back(cm->allocate(prefix + "ss_reflected_derate", numberOfWeatherFileRecords));

p_DNIIndex.push_back(cm->allocate(prefix + "dni_index", numberOfWeatherFileRecords));
p_poaBeamFrontCS.push_back(cm->allocate(prefix + "poa_beam_front_cs", numberOfWeatherFileRecords));
p_poaDiffuseFrontCS.push_back(cm->allocate(prefix + "poa_diffuse_front_cs", numberOfWeatherFileRecords));
p_poaGroundFrontCS.push_back(cm->allocate(prefix + "poa_ground_front_cs", numberOfWeatherFileRecords));
p_DNIIndex.push_back(cm->allocate(prefix + "dni_index", numberOfWeatherFileRecords));
p_ClippingPotential.push_back(cm->allocate(prefix + "clipping_potential", numberOfWeatherFileRecords));

if (enableSnowModel) {
p_snowLoss.push_back(cm->allocate(prefix + "snow_loss", numberOfWeatherFileRecords));
Expand Down Expand Up @@ -928,6 +926,7 @@ void PVSystem_IO::AllocateOutputs(compute_module* cm)

p_inverterACOutputPreLoss = cm->allocate("ac_gross", numberOfWeatherFileRecords);
p_acWiringLoss = cm->allocate("ac_wiring_loss", numberOfWeatherFileRecords);
p_ClippingPotential = cm->allocate("clipping_potential", numberOfWeatherFileRecords);
p_transmissionLoss = cm->allocate("ac_transmission_loss", numberOfWeatherFileRecords);
p_acPerfAdjLoss = cm->allocate("ac_perf_adj_loss", numberOfWeatherFileRecords);
p_acLifetimeLoss = cm->allocate("ac_lifetime_loss", numberOfWeatherFileRecords);
Expand All @@ -936,6 +935,7 @@ void PVSystem_IO::AllocateOutputs(compute_module* cm)
p_systemACPower = cm->allocate("gen", numberOfLifetimeRecords);

p_systemDCPowerCS = cm->allocate("dc_net_clearsky", numberOfLifetimeRecords);
p_subhourlyClippingLoss = cm->allocate("subhourly_clipping_loss", numberOfLifetimeRecords);

if (Simulation->useLifetimeOutput)
{
Expand Down
4 changes: 3 additions & 1 deletion shared/lib_pv_io_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ struct PVSystem_IO
std::vector<ssc_number_t*> p_poaDiffuseFrontCS;
std::vector<ssc_number_t*> p_poaGroundFrontCS;
std::vector<ssc_number_t*> p_DNIIndex;
std::vector<ssc_number_t*> p_ClippingPotential;

// MPPT level outputs
std::vector<ssc_number_t *> p_mpptVoltage; /// An output vector containing input DC voltage in V to each mppt input
Expand Down Expand Up @@ -418,6 +417,9 @@ struct PVSystem_IO
ssc_number_t *p_systemDCPower; // kWdc
ssc_number_t* p_systemDCPowerCS; // kWdc
ssc_number_t *p_systemACPower; // kWac

ssc_number_t *p_subhourlyClippingLoss;
ssc_number_t* p_ClippingPotential;
};

/**
Expand Down
Loading

0 comments on commit eb5d125

Please sign in to comment.