Solar Panel¶
![]()
Represents a Solar Panel unit operation that calculates electrical power output from solar irradiation, panel area, efficiency, and the number of panels.
DWSIM.UnitOperations.UnitOperations.SolarPanel
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← CleanEnergyUnitOpBase ← SolarPanel
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Outlet, energy | 0 |
PV-1 power |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("SolarPanelExample")
.WithCompound("Water")
.WithPropertyPackage(PropertyPackages.SteamTables))
power = fs.AddEnergyStream("PV-1 power")
pv = (fs.AddSolarPanel("PV-1")
.WithPanelAreaM2(1.95) # area of one panel
.WithPanelCount(20)
.WithPanelEfficiencyPercent(21.0)
.WithSolarIrradiationKWPerM2(0.85))
pv.Object.CreateConnectors() # the canvas creates the ports on first draw
pv.ConnectEnergyProduct(power, 0) # electric power leaves through port 0
# Use the irradiation set above instead of the flowsheet's global weather conditions
pv.Object.UseUserDefinedWeather = True
fs.AutoLayout()
fs.Solve()
print(f"Total area = {1.95 * 20:.1f} m2")
print(f"Irradiation used = {pv.ActualSolarIrradiationKWPerM2:.3f} kW/m2")
print(f"Generated power = {pv.GeneratedPowerKW:.3f} kW")
print(f"Energy stream = {power.Object.EnergyFlow:.3f} kW")
Output
Total area = 39.0 m2
Irradiation used = 0.850 kW/m2
Generated power = 6.962 kW
Energy stream = 6.962 kW
DWSIM 10.2.11.0, generated 2026-10-08.
Properties¶
IDs accepted by GetPropertyValue, SetPropertyValue, the sensitivity analysis, the optimizer, the Adjust block and dynamic events. Units are SI; pass another unit system to GetPropertyValue to get them converted.
| ID | Name | Unit (SI) | Input |
|---|---|---|---|
Efficiency |
% | yes | |
User-Defined Solar Irradiation |
kW/m2 | yes | |
Actual Solar Irradiation |
kW/m2 | result | |
Panel Area |
m2 | yes | |
Number of Panels |
yes | ||
Generated Power |
kW | result |
Learn more¶
-
User guide
-
FluentAPI
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
SolarPanel(): Initializes a new default instance of the SolarPanel class.
Initializes a new default instance of the SolarPanel class.
Properties¶
ActualSolarIrradiation_kW_m2: Gets or sets the actual (weather-adjusted) solar irradiation used in the calculation (kW/m²).
Gets or sets the actual (weather-adjusted) solar irradiation used in the calculation (kW/m²).
EquipmentTypes: Gets the list of equipment sub-types (Monocrystalline, Polycrystalline, Thin Film).
Gets the list of equipment sub-types (Monocrystalline, Polycrystalline, Thin Film).
GeneratedPower: Gets or sets the calculated generated electrical power (kW).
Gets or sets the calculated generated electrical power (kW).
NumberOfPanels: Gets or sets the number of panels in the array.
Gets or sets the number of panels in the array.
PanelArea: Gets or sets the area of a single panel (m²).
Gets or sets the area of a single panel (m²).
PanelEfficiency: Gets or sets the panel conversion efficiency (%).
Gets or sets the panel conversion efficiency (%).
Prefix: Gets or sets the default name prefix for this unit operation.
Gets or sets the default name prefix for this unit operation.
SolarIrradiation_kW_m2: Gets or sets the user-specified solar irradiation (kW/m²).
Gets or sets the user-specified solar irradiation (kW/m²).
Methods¶
Calculate(object): Calculates the generated power from solar irradiation, panel area, efficiency, and count.
Calculates the generated power from solar irradiation, panel area, efficiency, and count.
| Parameter | Type | Description |
|---|---|---|
args |
Object |
CloneXML(): Creates a deep copy via XML serialization.
Creates a deep copy via XML serialization.
CloseEditForm(): Closes and disposes the editing form.
Closes and disposes the editing form.
CreateConnectors(): Creates the graphic connector definitions (energy outlet) on the flowsheet.
Creates the graphic connector definitions (energy outlet) on the flowsheet.
CreateDimensionsList(): Creates the dimensions list (Area, Efficiency) for this solar panel.
Creates the dimensions list (Area, Efficiency) for this solar panel.
DisplayEditForm(): Opens or activates the editing form.
Opens or activates the editing form.
Draw(object): Draws the solar panel icon on the given SkiaSharp canvas.
Draws the solar panel icon on the given SkiaSharp canvas.
| Parameter | Type | Description |
|---|---|---|
g |
Object |
GetDisplayDescription(): Returns the display description for this unit operation.
Returns the display description for this unit operation.
GetDisplayName(): Returns the display name for this unit operation.
Returns the display name for this unit operation.
GetIconBitmapBytes(): Returns the icon bitmap as a byte array.
Returns the icon bitmap as a byte array.
GetProperties(PropertyType): Returns an array of property identifiers for the specified property type.
Returns an array of property identifiers for the specified property type.
| Parameter | Type | Description |
|---|---|---|
proptype |
PropertyType |
GetPropertyUnit(string, IUnitsOfMeasure): Returns the unit string for the specified property.
Returns the unit string for the specified property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
su |
IUnitsOfMeasure |
GetPropertyValue(string, IUnitsOfMeasure): Returns the value of the specified property.
Returns the value of the specified property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
su |
IUnitsOfMeasure |
GetReport(IUnitsOfMeasure, CultureInfo, string): Generates a plain-text report of the solar panel results.
Generates a plain-text report of the solar panel results.
| Parameter | Type | Description |
|---|---|---|
su |
IUnitsOfMeasure |
|
ci |
CultureInfo |
|
nf |
String |
LoadData(List<XElement>): Restores the solar panel state from XML.
Restores the solar panel state from XML.
| Parameter | Type | Description |
|---|---|---|
data |
List<XElement> |
PopulateEditorPanel(object): Populates the cross-platform editor panel with controls for this solar panel.
Populates the cross-platform editor panel with controls for this solar panel.
| Parameter | Type | Description |
|---|---|---|
ctner |
Object |
ReturnInstance(string): Creates and returns a new instance for deserialization.
Creates and returns a new instance for deserialization.
| Parameter | Type | Description |
|---|---|---|
typename |
String |
SaveData(): Serializes the solar panel state to XML.
Serializes the solar panel state to XML.
SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of the specified property.
Sets the value of the specified property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
propval |
Object |
|
su |
IUnitsOfMeasure |
UpdateDimensionsList(): Updates the dimension values from the current panel properties.
Updates the dimension values from the current panel properties.
UpdateEditForm(): Refreshes the editing form with updated data.
Refreshes the editing form with updated data.
Fields¶