Esempio n. 1
0
def plotAzimuthDays(lat,days):
    ts = np.arange(0,24,0.25)
    for day in days:
        (mon,md) = solar.findDay(day)
        plt.plot(ts,solar.azimuth(lat,day,ts),label= mon + " " + str(md) + " " + str(lat) + "deg")
    plt.xlabel('Hour')
    plt.ylabel('deg')
    plt.title('Solar Azimuth Angle over Day at '+str(lat)+' degs lat')
    axes = plt.axes()
    handles, labels = axes.get_legend_handles_labels()
    axes.legend(handles, labels, loc=2)
    return axes
Esempio n. 2
0
def plotPath(lat,days):
    ts = np.arange(0,24,0.25)
    for day in days:
        (mon,md) = solar.findDay(day)
        az= solar.azimuth(lat,day,ts)
        alt = solar.altitude(lat,day,ts)
        plt.plot(az,alt,label= mon + " " + str(md) + " " + str(lat) + "deg")
    plt.xlabel('azimuth')
    plt.ylabel('altitude')
    plt.title('Solar Path over Day at '+str(lat)+' degs lat')
    axes = plt.axes()
    handles, labels = axes.get_legend_handles_labels()
    axes.legend(handles, labels, loc=2)
    return axes
Esempio n. 3
0
def plotAltitudeDays(lats,days):
    ts = np.arange(0,24,0.25)
    for lat in lats:
        for day in days:
            (mon,md) = solar.findDay(day)
            plt.plot(ts,solar.altitude(lat,day,ts),label= mon + " " + str(md) + " " + str(lat) + "deg")
    plt.plot(ts,0*np.ones(len(ts)),label="horizon")
    plt.axis([0,24,-90,90])
    plt.xlabel('Hour')
    plt.ylabel('deg')
    plt.title('Solar Altitude Angle over Day at '+str(lat) + ' degs lat')
    axes = plt.axes()
    handles, labels = axes.get_legend_handles_labels()
    axes.legend(handles, labels, loc=3)
    return axes
Esempio n. 4
0
def plotIncident(lats, days, tilts, dirs, attenuate=False):
    if np.isscalar(lats):  lats  = [lats]
    if np.isscalar(days):  days  = [days]
    if np.isscalar(tilts): tilts = [tilts]
    if np.isscalar(dirs):  dirs  = [dirs]
    ts = np.arange(0,24,0.25)
    h = np.radians(solar.hourAngle(ts))
    for lat in lats:
        for day in days:
            for tilt in tilts:
                for dir in dirs:
                    (mon,md) = solar.findDay(day)
                    plt.plot(ts,solar.incident(lat,day,ts,tilt,dir,attenuate),label= mon + " " + str(md) + " " + str(lat) + " deg @" +str(tilt)+"["+str(dir)+"]" )
    plt.title('Effective Incident Solar')
    plt.xlabel('Hour')
    axes = plt.axes()
    handles, labels = axes.get_legend_handles_labels()
    axes.legend(handles, labels, loc=2)
    return axes                         
Esempio n. 5
0
def plotAzimuthDaysFix(lats,days):
    ts = np.arange(0,24,0.25)
    h = np.radians(solar.hourAngle(ts))
    for lat in lats:
        for day in days:
            d = np.radians(solar.declination(day))
            l = np.radians(lat)
            print 'day: ' + str(day) + " lat: " + str(lat), np.tan(d), np.tan(l), np.tan(d)/np.tan(l)
    
            (mon,md) = solar.findDay(day)
            plt.plot(ts,solar.azimuthRaw(lat,day,ts),label= mon + " " + str(md) + " " + str(lat) + " deg")
    plt.plot(ts, np.cos(h))
    plt.plot(ts, (np.tan(d)/np.tan(l)) * np.ones(len(ts)))
    plt.title('Solar Azimuth Angle Day')
    plt.xlabel('Hour')
    plt.ylabel('rad')
    axes = plt.axes()
    handles, labels = axes.get_legend_handles_labels()
    axes.legend(handles, labels, loc=3)
    return axes