data_interpolator_builder.py#
- aviary.utils.data_interpolator_builder.build_data_interpolator(num_nodes, interpolator_data=None, interpolator_outputs=None, method='slinear', extrapolate=True, structured=None, connect_training_data=False)[source]
Builder for openMDAO metamodel components using data provided via data file, directly provided as an argument, or training data passed through openMDAO connections. If using a structured grid, data can either be converted from a semistructured grid format, or directly provided in structured grid format.
- Parameters:
num_nodes (int) – Number of points that will be simultaneously interpolated during model executuion.
interpolator_data ((str, Path, NamedValues)) – Path to the Aviary csv file containing all data required for interpolation, or the data directly given as a NamedValues object.
interpolator_outputs (dict) – Dictionary describing the names of dependent variables (keys) and their units (values). If connect_training_data is False, these variable names must reference variables in data_file or interpolator_data. If connect_training_data is True, then this dictionary describes the names and units for training data that will be provided via openMDAO connections during model execution.
method (str, optional) – Interpolation method for metamodel. See openMDAO documentation for valid options.
extrapolate (bool, optional) – Flag that sets if metamodel should allow extrapolation
structured (bool, optional) – Flag to set if interpolation data is a structure grid. If True, the structured metamodel component is used, if False, the semistructured metamodel is used. If None, the builder chooses based on provided data structure.
connect_training_data (bool, optional) – Flag that sets if dependent data for interpolation will be passed via openMDAO connections. If True, any provided values for dependent variables will be ignored.
- Returns:
interp_comp – OpenMDAO metamodel component using the provided data and flags
- Return type:
om.MetaModelSemiStructuredComp, om.MetaModelStructuredComp