cea.utilities package

Submodules

cea.utilities.building_info module

cea.utilities.compile_pyd_files module

cea.utilities.epwreader module

Energyplus file reader

cea.utilities.epwreader.calc_skytemp(Tdrybulb, Tdewpoint, N)[source]
cea.utilities.epwreader.epw_reader(weather_path)[source]
cea.utilities.epwreader.test_reader()[source]

cea.utilities.helpers module

Some helper functions that could be useful

cea.utilities.helpers.check_doy(doy)[source]

check for day of year within bounds doy: day of year bool

cea.utilities.helpers.check_hoy(hoy)[source]

check for hour of year within bounds hoy: hour of year bool

cea.utilities.helpers.doy_2_hoy(doy)[source]

Day of year to hour of year

doy: day of year hoy: hour of year

cea.utilities.helpers.hoy_2_dom(hoy)[source]

hour of year to day of month hoy: hour of year dom: day of month

cea.utilities.helpers.hoy_2_doy(hoy)[source]

Hour of year to day of year hoy: hour of year doy: day of year

cea.utilities.helpers.hoy_2_hod(hoy)[source]

hour of year to hour of day hoy: hour of year hod: hour of day

cea.utilities.helpers.hoy_2_moy(hoy)[source]

hour of year to month of year hoy: hour of year moy: month of year

cea.utilities.helpers.hoy_2_seasonhour(hoy, gv)[source]

hour of year to hour relative to start of heating season hoy: hour of year seasonhour: hour relative to start of heating season

cea.utilities.helpers.hoy_2_woy(hoy)[source]

Hour of year to week of year hoy: hour of year woy: weak of year

cea.utilities.helpers.is_coolingseason_hoy(hoy)[source]

checks if a certain hour of the year is part of the cooling season or not hoy : hour of year bool

cea.utilities.helpers.is_daytime_hoy(hoy)[source]

Check if a certain hour of the year is during the daytime or not hoy : hour of year bool

cea.utilities.helpers.is_heatingseason_hoy(hoy)[source]

checks if a certain hour of the year is part of the heating season or not hoy : hour of year bool

cea.utilities.helpers.is_nighttime_hoy(hoy)[source]

Check if a certain hour of year is during night or not hoy: hour of year bool

cea.utilities.helpers.seasonhour_2_hoy(seasonhour, gv)[source]

hour relative to start of heating season to hour of year seasonhour: hour relative to start of heating season hoy: hour of year

cea.utilities.helpers.test_helpers()[source]

test helpers

cea.utilities.physics module

Physical functions

cea.utilities.physics.calc_RH(w, t)[source]
cea.utilities.physics.calc_h(t, w)[source]

calculates enthalpy of moist air in kJ/kg

t : air temperature in (°C) w : moisture content of air in (kg/kg dry air)

h : enthalpy of moist air in (kJ/kg)

cea.utilities.physics.calc_rho_air(temp_air)[source]

Calculation of density of air according to 6.4.2.1 in [1]

temp_air : air temperature in (°C)

rho_air : air density in (kg/m3)

cea.utilities.physics.calc_t(w, RH)[source]
cea.utilities.physics.calc_t_from_h(h, w)[source]

calculates temperature in (°C) from enthalpy (kJ/kg) of moist air with know moisture content inverse equation of calc_h(t,w)

Parameters:
  • h – enthalpy of moist air in (kJ/kg)
  • w – moisture content of air in (kg/kg dry air)
Returns:

temperature in (°C)

cea.utilities.physics.calc_w(t, RH)[source]

Moisture content in kg/kg of dry air

t : temperature of air in (°C) RH : relative humidity of air in (%)

w : moisture content of air in (kg/kg dry air)

cea.utilities.reporting module

Functions for Report generation

cea.utilities.reporting.full_report_to_xls(tsd, output_folder, basename, gv)[source]

this function is to write a full report to an *.xls file containing all intermediate and final results of a single building thermal loads calculation

cea.utilities.solar_equations module

solar equations

cea.utilities.solar_equations.calc_sun_properties(latitude, longitude, weather_data, gv)[source]
cea.utilities.solar_equations.calc_sunrise(sunrise, Yearsimul, longitude, latitude)[source]
cea.utilities.solar_equations.declination_degree(when, TY)[source]

The declination of the sun is the angle between Earth’s equatorial plane and a line between the Earth and the sun. It varies between 23.45 degrees and -23.45 degrees, hitting zero on the equinoxes and peaking on the solstices. [1]

Parameters:
  • when – datetime.datetime, date/time for which to do the calculation
  • TY – float, Total number of days in a year. eg. 365 days per year,(no leap days)
  • DEC – float, The declination of the Sun
[1]http://pysolar.org/
cea.utilities.solar_equations.get_hour_angle(when, longitude_deg)[source]
cea.utilities.solar_equations.get_solar_time(longitude_deg, when)[source]

returns solar time in hours for the specified longitude and time, accurate only to the nearest minute.

cea.utilities.solar_equations.pyephem(time, latitude, longitude, altitude=0, pressure=101325, temperature=12)[source]

Module contents