get_snapshot_filepath#

TwinModel.get_snapshot_filepath(rom_name, evaluation_time=0.0)#

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

The snapshot file contains the field results of the ROM.

Parameters:
rom_namestr

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

evaluation_time: float, optional

Evaluation time at which to get the snapshot file. The default is 0.00`. If no snapshot file is available at this evaluation time, the 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 provided ROM 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()
>>> available_rom_names = model.tbrom_names
>>> geometry_filepath = TwinModel.get_snapshot_filepath(rom_name=available_rom_names[0])