Learn R Programming

solaR

The solaR package allows for reproducible research both for photovoltaics (PV) systems performance and solar radiation. It includes a set of classes, methods and functions to calculate the sun geometry and the solar radiation incident on a photovoltaic generator and to simulate the performance of several applications of the photovoltaic energy. This package performs the whole calculation procedure from both daily and intradaily global horizontal irradiation to the final productivity of grid-connected PV systems and water pumping PV systems.

It is designed using a set of S4 classes whose core is a group of slots with multivariate time series. The classes share a variety of methods to access the information and several visualization methods. In addition, the package provides a tool for the visual statistical analysis of the performance of a large PV plant composed of several systems.

Although solaR is primarily designed for time series associated to a location defined by its latitude/longitude values and the temperature and irradiation conditions, it can be easily combined with spatial packages for space-time analysis.

Software

The stable version of solaR is hosted at CRAN. The development version is available at GitHub.

Install the stable version with:

install.packages('solaR')

You can install the development version with the remotes package:

remotes::install_github('oscarperpinan/solar')

or with devtools:

devtools::install_github('oscarperpinan/solar')

Documentation

The best place to learn how to use the package is the companion paper published by the Journal of Statistical Software:

Perpiñán Lamigueiro, O. (2012). solaR: Solar Radiation and Photovoltaic Systems with R. Journal of Statistical Software, 50(9), 1–32. https://doi.org/10.18637/jss.v050.i09

This book (in Spanish) contains detailed information about solar radiation and photovoltaic systems. In my articles I frequently use solaR.

Citation

If you use solaR, please cite it in any publication reporting results obtained with this software:

Perpiñán Lamigueiro, O. (2012). solaR: Solar Radiation and Photovoltaic Systems with R. Journal of Statistical Software, 50(9), 1–32. https://doi.org/10.18637/jss.v050.i09

A BibTeX entry for LaTeX users is:

@Article{,
    title = {{solaR}: Solar Radiation and Photovoltaic Systems with {R}},
    author = {Oscar Perpi{\~n}{\'a}n},
    journal = {Journal of Statistical Software},
    year = {2012},
    volume = {50},
    number = {9},
    pages = {1--32},
	doi = {10.18637/jss.v050.i09}
  }

Copy Link

Version

Install

install.packages('solaR')

Monthly Downloads

455

Version

0.46

License

GPL-3

Last Published

October 19th, 2021

Functions in solaR (0.46)

B7_Shade-class

Class "Shade": shadows in a PV system.
C_NmgPVPS

Nomogram of a photovoltaic pumping system
B6_ProdPVPS-class

Class "ProdPVPS": performance of a PV pumping system.
E_aguiar

Markov Transition Matrices for the Aguiar etal. procedure
B1_Meteo-class

Class "Meteo"
B2_Sol-class

Class "Sol": Apparent movement of the Sun from the Earth
B4_Gef-class

Class "Gef": irradiation and irradiance on the generator plane.
B3_G0-class

Class "G0": irradiation and irradiance on the horizontal plane.
B5_ProdGCPV-class

Class "ProdGCPV": performance of a grid connected PV system.
C_HQCurve

H-Q curves of a centrifugal pump
D_as.zooM-methods

Methods for Function as.zooM
D_as.zooI-methods

Methods for Function as.zooI
D_as.zooD-methods

Methods for Function as.zooD
A2_calcG0

Irradiation and irradiance on the horizontal plane.
A3_calcGef

Irradiation and irradiance on the generator plane.
C_fInclin

Solar irradiance on an inclined surface
D_as.data.frameD-methods

Methods for Function as.data.frameD
D_as.data.frameI-methods

Methods for Function as.data.frameI
C_fCompI

Calculation of solar irradiance on a horizontal surface
C_fBTd

Daily time base
C_fCompD

Components of daily global solar irradiation on a horizontal surface
D_as.zooY-methods

Methods for Function as.zooY
D_compare-methods

Compare G0, Gef and ProdGCPV objects
C_fSolD

Daily apparent movement of the Sun from the Earth
D_as.data.frameY-methods

Methods for Function as.data.frameY
C_fSolI

Instantaneous apparent movement of the Sun from the Earth
D_as.data.frameM-methods

Methods for Function as.data.frameM
D_Losses-methods

Losses of a GCPV system
A6_calcShd

Shadows on PV systems.
A1_calcSol

Apparent movement of the Sun from the Earth
D_getG0-methods

Methods for function getG0
D_getLat-methods

Methods for Function getLat
C_corrFdKt

Correlations between the fraction of diffuse irradiation and the clearness index.
E_helios

Daily irradiation and ambient temperature from the Helios-IES database
solaR-defunct

Defunct functions in package ‘solaR’
D_indexD-methods

Methods for Function indexD
C_fTheta

Angle of incidence of solar irradiation on a inclined surface
D_getData-methods

Methods for function getData
C_fPump

Performance of a centrifugal pump
C_fProd

Performance of a PV system
D_window-methods

Methods for extracting a time window
C_fSombra

Shadows on PV systems
A8_readBD

Daily or intradaily values of global horizontal irradiation and ambient temperature from a local file or a data.frame.
E_pumpCoef

Coefficients of centrifugal pumps.
D_shadeplot-methods

Methods for Function shadeplot
C_sample2Diff

Small utilities for difftime objects.
A8_readG0dm

Monthly mean values of global horizontal irradiation.
solaR-package

Solar Radiation and Photovoltaic Systems with R
E_prodEx

Productivity of a set of PV systems of a PV plant.
E_solaR.theme

solaR theme
C_fTemp

Intradaily evolution of ambient temperature
D_writeSolar-methods

Exporter of solaR results
D_indexI-methods

Methods for Function indexI
D_indexRep-methods

Methods for Function indexRep
D_mergesolaR-methods

Merge solaR objects
D_levelplot-methods

Methods for function levelplot.
A7_optimShd

Shadows calculation for a set of distances between elements of a PV grid connected plant.
C_local2Solar

Local time, mean solar time and UTC time zone.
C_utils-time

Utilities for time indexes.
C_utils-angle

Conversion between angle units.
A4_prodGCPV

Performance of a grid connected PV system.
A5_prodPVPS

Performance of a PV pumping system
D_xyplot-methods

Methods for function xyplot in Package `solaR'