solarpower.h

Go to the documentation of this file.
00001 //          Solar energy predictor
00002 //
00003 /***************************************************************************
00004  *   Copyright (C) 2007 by Ken Sarkies                                     *
00005  *   ksarkies@trinity.asn.au                                               *
00006  *                                                                         *
00007  *   This file is part of SolarPower.                                      *
00008  *                                                                         *
00009  *   SolarPower is free software; you can redistribute it and/or modify    *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  *   SolarPower is distributed in the hope that it will be useful,         *
00015  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00016  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00017  *   GNU General Public License for more details.                          *
00018  *                                                                         *
00019  *   You should have received a copy of the GNU General Public License     *
00020  *   along with SolarPower if not, write to the                            *
00021  *   Free Software Foundation, Inc.,                                       *
00022  *   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.             *
00023  ***************************************************************************/
00024 
00025 #ifndef SOLARPOWER_H_
00026 #define SOLARPOWER_H_
00027 
00028 //---------------------------------------------------------------------------
00029 // Model for solar module BP3125
00030 // This model, fitted to parameters from the datasheet, provides a current
00031 // output for a give module voltage (usually constrained by the battery voltage
00032 // and the solarEnergy impinging on it. The parameters are relevant to a
00033 // reference solar energy of 100 units to 1000W/m^2
00034 //
00035 double moduleCurrent(const double solarEnergy, const double voltage);
00036 double OptimalModuleVoltage(const double solarEnergy);
00037 //---------------------------------------------------------------------------
00038 // Compute the density of air from a suitable model
00039 //
00040 // Input: height above sea level in metres
00041 // Output: Modelled air density in kg/metre^3
00042 //
00043 double airDensity(const double height);
00044 //----------------------------------------------------------------------------
00045 // Numerical integration of density over a sloping path.
00046 //
00047 // The angle of the path to the vertical is phi. To integrate density rho(h)
00048 // as a function of height, over the path, we compute the slope of the
00049 // path with respect to the height from ground level to get:
00050 //
00051 //      integral from 0 to infinity rho(h) (da/dh) dh
00052 //
00053 // Input: angle of path to vertical phi in degrees
00054 // Output: path loss integral
00055 //
00056 double pathLoss(const double phi);
00057 //----------------------------------------------------------------------------
00058 // Integration of the solar power W/m^2 to kWH/m^2 for a day at given latitude
00059 //
00060 // Integration is done by a simple sum over small elements
00061 // Input: Latitude in degrees, positive north of equator
00062 //        Declination of the sun in degrees
00063 // Output: Total energy per square metre over a day arriving at earth's surface
00064 // Dependencies: pathLoss(cosangle) integral of air density over a slant path
00065 
00066 double dailySolarEnergyFollowing(const double latitude,
00067                                  const double declination);
00068 //----------------------------------------------------------------------------
00069 // Integration of the solar power W/m^2 to kWH/m^2 for a day at given latitude
00070 //
00071 // Integration is done by a simple sum over small elements.
00072 // Represents a fixed module facing the sun at noon.
00073 // Input: Latitude in degrees, positive north of equator
00074 //        Declination of the sun in degrees
00075 //        Angle of the module to the vertical
00076 // Output: Total energy per square metre over a day arriving at earth's surface
00077 // Dependencies: pathLoss(cosangle) integral of air density over a slant path
00078 
00079 double dailySolarEnergyFixed(const double latitude,
00080                              const double declination,
00081                              const double moduleAngle);
00082 //----------------------------------------------------------------------------
00083 // Length of day in hours for given latitude and solar declination
00084 //
00085 double dayLength(const double latitude, const double declination);
00086 //----------------------------------------------------------------------------
00087 
00088 #endif /*SOLARPOWER_H_*/

Generated on Mon Sep 3 06:31:15 2007 for Solar Power by  doxygen 1.5.2