Photovoltaic (Surrogate)

from watertap_contrib.reflo.solar_models import PVSurrogate

This Photovoltaic (PV) unit model is a surrogate model that inherits its base model structure from the Solar Energy Base Class. The model is trained using the data generated by the PV Model from PySAM which is is a Python package for the National Renewable Energy Laboratory’s System Advisor Model (SAM).

Model Structure

Outputs from the surrogate model are used to estimate the performance and the cost of the PV system.

The PV surrogate model has only 1 degree of freedom for the system capacity.

Variable

Variable Name

Symbol

Units

Description

System capacity

system_capacity

\(P_e\)

\(\text{kW}\)

Nameplate DC capacity of solar array

System capacity is a required input surrogate variable.

The following parameters are required outputs of the surrogate model:

Variable

Variable Name

Symbol

Units

Description

Electricity annual

electricity_annual

\(E_{annual}\)

\(\text{kWh}\)

Annual electric power generated by the system

Land required

land_req

\(A_{land}\)

\(\text{acre}\)

Land area required for the system

Additional parameters included on the PV-Battery model block are:

Parameter

Parameter Name

Symbol

Default Value

Units

DC to AC ratio

DC_to_AC_ratio

\(X_p\)

1.2

\(\text{kW/kW}\)

The required inverter capacity is calculated as follows:

\[P_{inv} = \frac{P_{e}}{X_{p}}\]

Note that this value may be different than the total AC inverter capacity used to generate the data for the surrogate model.

Generating Data

The data for the surrogate model can be generated using the generate_pv_data function in run_pysam_pv.py in the REFLO package. This script uses the Pvsamv1 PV model with the FlatPlatePVSingleOwner configuration to generate the data. Running this script will use the default weather file and configuration file included in the REFLO package, but users should update these files for their specific location and application. Weather files can be downloaded from the National Solar Radiation Database and configuration .json files can be created using SAM.

The generate_pv_data function takes the following arguments:

Name

Keyword

Units

Description

System capacity

system_capacities

\(\text{kW}\)

List of range of values of interest for the PV system capacity

Weather file

weather_file

N/A

Path to the weather file

Configuration file

config_file

N/A

Path to the configuration file for the PySAM model

Dataset file name

dataset_filename

N/A

Desired name of the output dataset file

from watertap_contrib.reflo.solar_models import generate_pv_data

data = generate_pv_data(
    system_capacities=[1000, 2000, 3000],
    weather_file="path/to/weather/file.csv",
    config_file="path/to/config/file.json",
    dataset_filename="path/to/dataset/filename.pkl",
)

Costing

The PV model has two costing options: simple and detailed. These are passed to the costing package through the costing_method argument when constructing the costing block. The simple costing method is the default and involves lumped capital costs from the system capacity. The detailed costing method involves more detailed capital costs including costs for the inverter, other direct costs, and sales tax.

Simple

The following parameters are constructed on the costing block for PV costing using the simple costing method:

Cost Component

Variable

Symbol

Value

Units

Description

Cost per watt installed

cost_per_watt_installed

\(c_{pv}\)

1.6

\(\text{USD/W}\)

Cost per watt of system capacity

Fixed operating cost per system capacity

fixed_operating_by_capacity

\(C_{fix,op}\)

31

\(\text{USD/kW/year}\)

Fixed operating cost of PV system per kW generated

Variable operating cost per energy generated

variable_operating_by_generation

\(C_{var,op}\)

0

\(\text{USD/kWh}\)

Variable operating cost of PV system per MWh generated

Cost Component

Symbol

Equation

PV system capital cost

\(C_{pv}\)

\(c_{pv} \times P_e\)

Land cost

\(C_{land}\)

\(c_{land} \times A_{land}\)

Fixed operating cost

\(C_{fix,op}\)

\(c_{fix,op} \times P_e\)

The direct costs include the cost of the PV system and land costs. Using the simple costing method, there are no indirect costs and the total capital cost is the direct costs:

\[C_{total} = C_{direct} = C_{pv} + C_{land}\]

Note that by default, REFLO assumes no land cost (i.e., \(c_{land} = 0\)).

The operating costs include both fixed and variable operating costs:

\[C_{operating} = C_{fix,op} + C_{var,op}\]

Detailed

The detailed costing method is a more direct implementation of the SAM PV costing approach. The following parameters are constructed on the costing block for PV costing using the detailed costing method:

Cost Component

Variable

Symbol

Value

Units

Description

PV module cost

cost_per_watt_module

\(c_{pv}\)

0.34

\(\text{USD/W}\)

Cost per watt for PV modules

Inverter cost

cost_per_watt_inverter

\(c_{inv}\)

0.03

\(\text{USD/W}\)

Cost per watt for inverter capacity

Other direct cost per watt

cost_per_watt_other_direct

\(c_{other}\)

0.62

\(\text{USD/W}\)

Cost per watt for balance of system equipment, installation labor, and margin/overhead

Indirect cost per watt

cost_per_watt_indirect

\(c_{indirect}\)

0.05

\(\text{USD/W}\)

Cost per watt for permitting, environmental studies, engineering, land prep, and grid interconnection

Direct cost contingency fraction

contingency_frac_direct_cost

\(X_{cont}\)

0.03

\(\text{dimensionless}\)

Fraction of direct costs to apply contingency

Fraction of direct capital cost subject to sales tax

tax_frac_direct_cost

\(X_{d}\)

1

\(\text{dimensionless}\)

Fraction of direct costs applicable for sales tax

Fixed operating cost per system capacity

fixed_operating_by_capacity

\(c_{fix,op}\)

31

\(\text{USD/kW/year}\)

Fixed operating cost of PV system per kW generated

Variable operating cost per energy generated

variable_operating_by_generation

\(c_{var,op}\)

0

\(\text{USD/kWh}\)

Variable operating cost of PV system per MWh generated

Cost Component

Symbol

Equation

PV modules capital cost

\(C_{pv}\)

\(c_{pv} \times P_e\)

PV system other capital cost

\(C_{other}\)

\(c_{other} \times P_e\)

Inverter capital cost

\(C_{inv}\)

\(c_{inv} \times P_{inv}\)

Land cost

\(C_{land}\)

\(c_{land} \times A_{land}\)

Fixed operating cost

\(C_{fix,op}\)

\(c_{fix,op} \times P_e\)

Variable operating cost

\(C_{var,op}\)

\(c_{var,op} \times E_{annual}\)

The direct costs include the cost of the PV modules, inverter, other direct costs, and contingency.

\[C_{direct} = (C_{pv} + C_{other} + C_{inv}) (1 + X_{cont})\]

Indirect costs are calculated from the system capacity and the land cost:

\[C_{indirect} = A_{land} c_{land} + P_e c_{indirect}\]

The sales tax component of the capital cost is calculated from the direct costs:

\[C_{tax} = C_{direct} X_t X_d\]

And the total capital cost is calculated with the direct costs, indirect costs, and sales tax:

\[C_{total} = C_{direct} + C_{indirect} + C_{tax}\]

Note that by default, REFLO assumes no sales tax (i.e., \(X_t = 0\)) or land cost (i.e., \(c_{land} = 0\)).

The total operating costs are the sum of fixed and variable operating costs:

\[C_{operating} = C_{fix,op} + C_{var,op}\]

Energy Balance

The PV model has only electric power flows. The steady-state electric output of the PV system is calculated as:

\[P_{out} = E_{annual} / 8760\]
  • \(P_{out}\) is the steady-state electric output (in kW)

  • \(E_{annual}\) is the annual electric energy generation (in kWh)

References

Blair, N.; Dobos, A.; Freeman, J.; Neises, T.; Wagner, M.; Ferguson, T.; Gilman, P.; Janzou, S. (2014).
System Advisor Model™, SAM™ 2014.1.14: General Description.
NREL/TP-6A20-61019. National Renewable Energy Laboratory. Golden, CO. Accessed May 23, 2025. www.nrel.gov/docs/fy14osti/61019.pdf .
System Advisor Model™ Version 2025.4.16 (SAM™ 2025.4.16).
National Renewable Energy Laboratory. Golden, CO. Accessed May 23, 2025. https://sam.nrel.gov