get_image_filepath#

TwinModel.get_image_filepath(rom_name, view_name, evaluation_time=0.0)#

Get the image file that was created by the given ROM at the given time instant.

The image file shows the field results of the ROM in the given predefined view.

Parameters:
rom_namestr

Name of the ROM. To get a list of available ROMs, see the :attr:`pytwin.TwinModel.tbrom_names’ attribute.

view_namestr

View name associated with the rendering view in which ROM results are displayed. To get a list of available rendering view names for a given ROM, use the pytwin.TwinModel.get_available_view_names() method.

evaluation_time: float, optional

Evaluation time at which to get the image file. The default is 0.0. If no image file is available at the time specified, this method returns None. Two evaluation times can be distinguished up to six digits after the comma.

Raises:
TwinModelError:

If TwinModel object has not been initialized. If TwinModel object does not include any TBROMs. If the provided ROM name is not available. If the provided view name is not available.

Examples

>>> from pytwin import TwinModel
>>> model = TwinModel(model_filepath='path_to_twin_model_with_TBROM_in_it.twin')
>>> model.initialize_evaluation()
>>> rom_name = model.tbrom_names[0]
>>> view_name = model.get_available_view_names(rom_name)[0]
>>> geometry_filepath = TwinModel.get_image_filepath(rom_name, view_name)