CSVModelica

class geojson_modelica_translator.modelica.csv_modelica.CSVModelica(input_csv_file_path, sig_fig=3)

Bases: object

__init__(input_csv_file_path, sig_fig=3)

Convert a CSV file into the format required by Modelica. Expects a file resulting from https://github.com/urbanopt/DES_HVAC/tree/develop/Measures/export_time_series_modelica, which is included in the URBANopt SDK (potentially via common-measures-gem). FIXME: this is in process as of 2020-11-18 If providing a csv file not from the DES_HVAC measure, ensure it contains the following headers in this order:

0: Date/Time, string, date time. This column isn’t used and will be removed upon writing out. 1: NODE 62:System Node Temperature[C], double, Temperature hot water return, degC 2: NODE 67:System Node Temperature[C], double, Temperature hot water setpoint, degC 3: NODE 70:System Node Temperature[C], double, Temperature chilled water return, degC 4: NODE 98:System Node Temperature[C], double, Temperature chilled water setpoint, degC 5: massFlowRateHeating, double, heating water mass flow rate, kg/s 6: massFlowRateCooling, double, cooling water mass flow rate, kg/s

Parameters:
  • input_csv_file_path – string, path to input file

  • sig_fig – integer, number of decimal places to round input csv file to. If file has fewer sig-figs, this will not add trailing zeroes.

Methods

__init__(input_csv_file_path[, sig_fig])

Convert a CSV file into the format required by Modelica.

timeseries_to_modelica_data(...[, ...])

Convert the loaded data to the format needed for Modelica by adding in the nominal heating water mass flow rate and the nominal cooling water mass flow rate into the header.

timeseries_to_modelica_data(output_modelica_file_name, energyplus_timesteps_per_hour=4, data_type='double', overwrite=True)

Convert the loaded data to the format needed for Modelica by adding in the nominal heating water mass flow rate and the nominal cooling water mass flow rate into the header.

Parameters:
  • output_modelica_file_name – string, The path to the desired output file name.

  • data_type – string, data type being converted, defaults to double

  • overwrite – boolean, if the resulting file exists, then overwrite, defaults to True.

Returns:

file created to be ingested into Modelica