Swh
Solar water heating model for residential and commercial building applications
- PySAM.Swh.default(config) Swh
Load defaults for the configuration
config
. Available configurations are:“SolarWaterHeatingCommercial”
“SolarWaterHeatingLCOECalculator”
“SolarWaterHeatingNone”
“SolarWaterHeatingResidential”
Note
Some inputs do not have default values and may be assigned a value from the variable’s Required attribute. See variable attribute descriptions below.
- PySAM.Swh.from_existing(data, optional config) Swh
Share data with an existing PySAM class. If
optional config
is a valid configuration name, load the module’s defaults for that configuration.
- PySAM.Swh.wrap(ssc_data_t) Swh
Load data from a PySSC object.
Warning
Do not call PySSC.data_free on the ssc_data_t provided to
wrap()
Swh is a wrapper for the SSC compute module cmod_swh.cpp
Interdependent Variables
The variables listed below are interdependent with other variables. If you change the value of one of these variables, you may need to change values of other variables. The SAM user interface manages these interdependent variables, but in PySAM, it is up to you change the value of all interdependent variables so they are consistent. See Interdependent Variables for examples and details.
FRUL
FRta
area_coll
ncoll
system_capacity
Functions
- class PySAM.Swh.Swh
This class contains all the variable information for running a simulation. Variables are grouped together in the subclasses as properties. If property assignments are the wrong type, an error is thrown.
- assign(dict) None
Assign attributes from nested dictionary, except for Outputs
nested_dict = { 'Solar Resource': { var: val, ...}, ...}
- execute(int verbosity) None
Execute simulation with verbosity level 0 (default) or 1
- export() dict
Export attributes into nested dictionary
- get_data_ptr() Pointer
Get ssc_data_t pointer
- replace(dict) None
Replace attributes from nested dictionary, except for Outputs. Unassigns all values in each Group then assigns from the input dict.
nested_dict = { 'Solar Resource': { var: val, ...}, ...}
- unassign(name) None
Unassign a value in any of the variable groups.
- value(name, optional value) None | float | dict | sequence | str
Get or set by name a value in any of the variable groups.
SolarResource Group
- class PySAM.Swh.Swh.SolarResource
- assign(dict) None
Assign attributes from dictionary, overwriting but not removing values.
SolarResource_vals = { var: val, ...}
- export() dict
Export attributes into dictionary.
- replace(dict) None
Replace attributes from dictionary, unassigning values not present in input
dict
.SolarResource_vals = { var: val, ...}
- solar_resource_data
Weather data
Info: dn,df,tdry,wspd,lat,lon,tz
Required: False for configuration with default inputs. May be required if a variable dependent on its value changes. Example: For the Detailed PV - Single Owner configuration, only Subarray 1 is enabled in the configuration defaults, so Subarray 2 inputs would not be required; if Subarray 2 is enabled, then Subarray 2 inputs is required.
- Type:
dict
- solar_resource_file
local weather file path
Constraints: LOCAL_FILE
Required: False for configuration with default inputs. May be required if a variable dependent on its value changes. Example: For the Detailed PV - Single Owner configuration, only Subarray 1 is enabled in the configuration defaults, so Subarray 2 inputs would not be required; if Subarray 2 is enabled, then Subarray 2 inputs is required.
- Type:
str
SWH Group
- class PySAM.Swh.Swh.SWH
- assign(dict) None
Assign attributes from dictionary, overwriting but not removing values.
SWH_vals = { var: val, ...}
- export() dict
Export attributes into dictionary.
- replace(dict) None
Replace attributes from dictionary, unassigning values not present in input
dict
.SWH_vals = { var: val, ...}
- FRUL
FRUL
Required: True
The value of the following variables depends on
FRUL
:system_capacity
- Type:
float
- FRta
FRta
Required: True
The value of the following variables depends on
FRta
:system_capacity
- Type:
float
- T_room
Temperature around solar tank [C]
Constraints: POSITIVE
Required: True
- Type:
float
- T_set
Set temperature [C]
Constraints: POSITIVE
Required: True
- Type:
float
- T_tank_max
Max temperature in solar tank [C]
Constraints: POSITIVE
Required: True
- Type:
float
- U_tank
Solar tank heat loss coefficient [W/m2K]
Constraints: POSITIVE
Required: True
- Type:
float
- V_tank
Solar tank volume [m3]
Constraints: POSITIVE
Required: True
- Type:
float
- albedo
Ground reflectance factor [0..1]
Constraints: FACTOR
Required: True
- Type:
float
- area_coll
Single collector area [m2]
Constraints: POSITIVE
Required: True
The value of the following variables depends on
area_coll
:system_capacity
- Type:
float
- azimuth
Collector azimuth [deg]
Options: 90=E,180=S
Constraints: MIN=0,MAX=360
Required: True
- Type:
float
- custom_mains
Custom mains [C]
Constraints: LENGTH=8760
Required: True
- Type:
sequence
- custom_set
Custom set points [C]
Constraints: LENGTH=8760
Required: True
- Type:
sequence
- fluid
Working fluid in system
Info: Water,Glycol
Constraints: INTEGER,MIN=0,MAX=1
Required: True
- Type:
float
- hx_eff
Heat exchanger effectiveness [0..1]
Constraints: POSITIVE
Required: True
- Type:
float
- iam
Incidence angle modifier
Required: True
- Type:
float
- irrad_mode
Irradiance input mode [0/1/2]
Info: Beam+Diff,Global+Beam,Global+Diff
Constraints: INTEGER,MIN=0,MAX=2
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
- Type:
float
- load
Electricity load (year 1) [kW]
- Type:
sequence
- load_escalation
Annual load escalation [%/year]
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
- Type:
sequence
- mdot
Total system mass flow rate [kg/s]
Constraints: POSITIVE
Required: True
- Type:
float
- ncoll
Number of collectors
Constraints: POSITIVE,INTEGER
Required: True
The value of the following variables depends on
ncoll
:system_capacity
- Type:
float
- pipe_diam
Pipe diameter [m]
Constraints: POSITIVE
Required: True
- Type:
float
- pipe_insul
Pipe insulation thickness [m]
Constraints: POSITIVE
Required: True
- Type:
float
- pipe_k
Pipe insulation conductivity [W/m-C]
Constraints: POSITIVE
Required: True
- Type:
float
- pipe_length
Length of piping in system [m]
Constraints: POSITIVE
Required: True
- Type:
float
- pump_eff
Pumping efficiency [%]
Constraints: PERCENT
Required: True
- Type:
float
- pump_power
Pump power [W]
Constraints: POSITIVE
Required: True
- Type:
float
- scaled_draw
Hot water draw [kg/hr]
Constraints: LENGTH=8760
Required: True
- Type:
sequence
- sky_model
Tilted surface irradiance model [0/1/2]
Info: Isotropic,HDKR,Perez
Constraints: INTEGER,MIN=0,MAX=2
Required: False. Automatically set to 1 if not assigned explicitly or loaded from defaults.
- Type:
float
- system_capacity
Nameplate capacity [kW]
Required: True
The value of
system_capacity
depends on the following variables:FRUL
FRta
area_coll
ncoll
- Type:
float
- tank_h2d_ratio
Solar tank height to diameter ratio
Constraints: POSITIVE
Required: True
- Type:
float
- test_flow
Flow rate used in collector test [kg/s]
Constraints: POSITIVE
Required: True
- Type:
float
- test_fluid
Fluid used in collector test
Info: Water,Glycol
Constraints: INTEGER,MIN=0,MAX=1
Required: True
- Type:
float
- tilt
Collector tilt [deg]
Constraints: MIN=0,MAX=90
Required: True
- Type:
float
- use_custom_mains
Use custom mains [%]
Constraints: INTEGER,MIN=0,MAX=1
Required: True
- Type:
float
- use_custom_set
Use custom set points [%]
Constraints: INTEGER,MIN=0,MAX=1
Required: True
- Type:
float
Shading Group
- class PySAM.Swh.Swh.Shading
- assign(dict) None
Assign attributes from dictionary, overwriting but not removing values.
Shading_vals = { var: val, ...}
- export() dict
Export attributes into dictionary.
- replace(dict) None
Replace attributes from dictionary, unassigning values not present in input
dict
.Shading_vals = { var: val, ...}
- shading_azal
Azimuth x altitude beam shading losses [%]
Required: False for configuration with default inputs. May be required if a variable dependent on its value changes. Example: For the Detailed PV - Single Owner configuration, only Subarray 1 is enabled in the configuration defaults, so Subarray 2 inputs would not be required; if Subarray 2 is enabled, then Subarray 2 inputs is required.
- Type:
sequence[sequence]
- shading_diff
Diffuse shading loss [%]
Required: False for configuration with default inputs. May be required if a variable dependent on its value changes. Example: For the Detailed PV - Single Owner configuration, only Subarray 1 is enabled in the configuration defaults, so Subarray 2 inputs would not be required; if Subarray 2 is enabled, then Subarray 2 inputs is required.
- Type:
float
- shading_en_azal
Enable azimuth x altitude beam shading losses [0/1]
Options: 0=false,1=true
Constraints: BOOLEAN
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
- Type:
float
- shading_en_diff
Enable diffuse shading loss [0/1]
Options: 0=false,1=true
Constraints: BOOLEAN
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
- Type:
float
- shading_en_mxh
Enable month x Hour beam shading losses [0/1]
Options: 0=false,1=true
Constraints: BOOLEAN
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
- Type:
float
- shading_en_string_option
Enable shading string option [0/1]
Options: 0=false,1=true
Constraints: BOOLEAN
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
- Type:
float
- shading_en_timestep
Enable timestep beam shading losses [0/1]
Options: 0=false,1=true
Constraints: BOOLEAN
Required: False. Automatically set to 0 if not assigned explicitly or loaded from defaults.
- Type:
float
- shading_mxh
Month x Hour beam shading losses [%]
Required: False for configuration with default inputs. May be required if a variable dependent on its value changes. Example: For the Detailed PV - Single Owner configuration, only Subarray 1 is enabled in the configuration defaults, so Subarray 2 inputs would not be required; if Subarray 2 is enabled, then Subarray 2 inputs is required.
- Type:
sequence[sequence]
- shading_string_option
Shading string option
Options: 0=shadingdb,1=average,2=maximum,3=minimum
Constraints: INTEGER,MIN=-1,MAX=4
Required: False. Automatically set to -1 if not assigned explicitly or loaded from defaults.
- Type:
float
- shading_timestep
Timestep beam shading losses [%]
Required: False for configuration with default inputs. May be required if a variable dependent on its value changes. Example: For the Detailed PV - Single Owner configuration, only Subarray 1 is enabled in the configuration defaults, so Subarray 2 inputs would not be required; if Subarray 2 is enabled, then Subarray 2 inputs is required.
- Type:
sequence[sequence]
AdjustmentFactors Group
- class PySAM.AdjustmentFactors.AdjustmentFactors
- assign() None
Assign attributes from dictionary
- export() Dict
Export attributes into dictionary
- constant
AC Constant loss adjustment [%]
- dc_constant
DC Constant loss adjustment [%]
- dc_en_hourly
Enable DC hourly-based adjustment factors [0/1]
- dc_en_periods
Enable DC period-based adjustment factors [0/1]
- dc_en_timeindex
Enable DC lfetime adjustment factors [0/1]
- dc_hourly
DC Hourly Adjustment Factors [%]
- dc_periods
DC Period-based Adjustment Factors [%]
- dc_timeindex
DC Lifetime Adjustment Factors [%]
- en_hourly
Enable AC hourly-based adjustment factors [0/1]
- en_periods
Enable AC period-based adjustment factors [0/1]
- en_timeindex
Enable AC lfetime adjustment factors [0/1]
- hourly
AC Hourly Adjustment Factors [%]
- periods
AC Period-based Adjustment Factors [%]
- sf_constant
DC Constant loss adjustment [%]
- sf_en_hourly
Enable SF hourly-based adjustment factors [0/1]
- sf_en_periods
Enable SF period-based adjustment factors [0/1]
- sf_en_timeindex
Enable SF lfetime adjustment factors [0/1]
- sf_hourly
SF Hourly Adjustment Factors [%]
- sf_periods
SF Period-based Adjustment Factors [%]
- sf_timeindex
SF Lifetime Adjustment Factors [%]
- timeindex
AC Lifetime Adjustment Factors [%]
Outputs Group
- class PySAM.Swh.Swh.Outputs
- assign(dict) None
Assign attributes from dictionary, overwriting but not removing values.
Outputs_vals = { var: val, ...}
- export() dict
Export attributes into dictionary.
- replace(dict) None
Replace attributes from dictionary, unassigning values not present in input
dict
.Outputs_vals = { var: val, ...}
- I_incident
Irradiance - Incident [W/m2]
- Type:
sequence
- I_transmitted
Irradiance - Transmitted [W/m2]
- Type:
sequence
- P_pump
P pump [kW]
- Type:
sequence
- Q_aux
Q auxiliary [kW]
- Type:
sequence
- Q_auxonly
Q auxiliary only [kW]
- Type:
sequence
- Q_deliv
Q delivered [kW]
- Type:
sequence
- Q_loss
Q loss [kW]
- Type:
sequence
- Q_transmitted
Q transmitted [kW]
- Type:
sequence
- Q_useful
Q useful [kW]
- Type:
sequence
- T_amb
T ambient [C]
- Type:
sequence
- T_cold
T cold [C]
- Type:
sequence
- T_deliv
T delivered [C]
- Type:
sequence
- T_hot
T hot [C]
- Type:
sequence
- T_mains
T mains [C]
- Type:
sequence
- T_tank
T tank [C]
- Type:
sequence
- V_cold
V cold [m3]
- Type:
sequence
- V_hot
V hot [m3]
- Type:
sequence
- annual_Q_aux
Q auxiliary [kWh]
- Type:
float
- annual_Q_auxonly
Q auxiliary only [kWh]
- Type:
float
- annual_Q_deliv
Q delivered [kWh]
- Type:
float
- annual_energy
System energy [kWh]
- Type:
float
- annual_energy_distribution_time
Annual energy production as function of time [kW]
- Type:
sequence[sequence]
- beam
Irradiance - Beam [W/m2]
- Type:
sequence
- capacity_factor
Capacity factor [%]
- Type:
float
- diffuse
Irradiance - Diffuse [W/m2]
- Type:
sequence
- draw
Hot water draw [kg/hr]
- Type:
sequence
- gen
System power generated [kW]
- Type:
sequence
- kwh_per_kw
First year kWh/kW [kWh/kW]
- Type:
float
- mode
Operation mode
- Type:
sequence
- monthly_Q_aux
Q auxiliary [kWh]
- Type:
sequence
- monthly_Q_auxonly
Q auxiliary only [kWh]
- Type:
sequence
- monthly_Q_deliv
Q delivered [kWh]
- Type:
sequence
- monthly_energy
System energy [kWh]
- Type:
sequence
- shading_loss
Shading losses [%]
- Type:
sequence
- solar_fraction
Solar fraction
- Type:
float
- ts_shift_hours
Time offset for interpreting time series outputs [hours]
- Type:
float