trnslator.trnsys.convert_idf_to_trnbuild

trnslator.trnsys.convert_idf_to_trnbuild(idf_file, weather_file, window_lib=None, return_idf=False, return_b18=True, return_t3d=False, return_dck=False, output_folder=None, trnsidf_exe=None, template=None, log_clear_names=False, schedule_as_input=True, **kwargs)[source]

Convert regular IDF file (EnergyPlus) to TRNBuild file (TRNSYS)

There are three optional outputs:

  • the path to the modified IDF with the new names, coordinates, etc. of

    the IDF objects. It is an input file for EnergyPlus (.idf)

  • the path to the TRNBuild file (.b18)

  • the path to the TRNBuild input file (.idf)

  • the path to the TRNSYS dck file (.dck)

Example

>>> # Exemple of setting kwargs to be unwrapped in the function
>>> kwargs_dict = {'u_value': 2.5, 'shgc': 0.6, 't_vis': 0.78,
>>>                'tolerance': 0.05, "fframe": 0.0, "uframe": 0.5, 'ordered': True}
>>> # Exemple how to call the function
>>> idf_file = "/file.idf"
>>> window_filepath = "/W74-lib.dat"
>>> convert_idf_to_trnbuild(idf_file=idf_file, weather_file=weather_file,
>>>                         window_lib=window_filepath,
>>>                         **kwargs_dict)
Parameters
  • idf_file (str) – path to the idf file to convert

  • weather_file (str) – To run EnergyPlus simulation and be able to get some values (e.g. internal gain, infiltration, etc.)

  • window_lib (str) – File path of the window library (from Berkeley Lab)

  • return_idf (bool, optional) – If True, also return the path to the modified IDF with the new names, coordinates, etc. of the IDF objects. It is an input file for EnergyPlus (.idf)

  • return_b18 (bool, optional) – If True, also return the path to the TRNBuild file (.b18).

  • return_t3d (bool, optional) – If True, also return the path to the

  • return_dck (bool, optional) – If True, also return the path to the TRNSYS dck file (.dck).

  • output_folder (str, optional) – location where output files will be

  • trnsidf_exe (str) – Path to trnsidf.exe.

  • template (str) – Path to d18 template file.

  • log_clear_names (bool) – If True, DOES NOT log the equivalence between the old and new names in the console.

  • schedule_as_input (bool) – If True, writes the schedules as INPUTS in the BUI file. Then, the user would have to link in TRNSYS studio the csv file with the schedules to those INPUTS. If False, the schedules are written as SCHEDULES in the BUI file. Be aware that this last option (False) can make crash TRNBuild because the schedules are too long are there is too many schedules.

  • kwargs – keyword arguments sent to convert_idf_to_trnbuild() or trnbuild_idf() or choose_window(). “ordered=True” to have the name of idf objects in the outputfile in ascendant order. See trnbuild_idf() or choose_window() for other parameter definition

Returns

A tuple containing:

  • return_b18 (str): the path to the TRNBuild file (.b18). Only provided if return_b18 is True.

  • return_trn (str): the path to the TRNBuild input file (.idf). Only provided if return_t3d is True.

  • retrun_dck (str): the path to the TRNSYS dck file (.dck). Only provided if return_dck is True.

Return type

(tuple)