6. i-SAS_DirectionalWaveSpectraEstimator

6.1. interface

class directional_wave_spectra_estimator.interface.Interface(instance_name, input_names, output_names, structural_model_name=None, streaming=False, **kwargs)

Bases: object

interface class of directional wave spectra estimator

package_name = 'directional_wave_spectra_estimator'
structural_model_required = False
__init__(instance_name, input_names, output_names, structural_model_name=None, streaming=False, **kwargs)

initialization of interface class of directional wave spectra estimator

Parameters
  • instance_name (str) – instance name.

  • input_names (dict) – dict whose keys are names of input quantity and values are names of input data.

  • output_names (dict) – dict whose keys are names of output quantity and values are names of output data.

  • structural_model_name (str, optional) – structural model name.

  • streaming (bool, optional) – if true, run as structural_analysis.

  • **kwargs – Arbitrary keyword arguments.

Example

>>> input_names = {'strain': ['rosette_strain_x', 'rosette_strain_y', 'rosette_strain_xy']}
>>> output_names = {'displacement': ['analysis_displacement_z'], 'stress':['analysis_stress_x']}
>>> interface = Interface(input_names, output_names, 'beam')
set_project(project_name)
Parameters

project_name (str) – project name.

set_model(sensing_output_metadata, analysis_output_metadata, structural_models=None, sensor_structural_model_connections=None, analysis_structural_model_connections=None)

set structural model

Parameters
  • sensing_output_metadata (pd.DataFrame) – metadata of sensing output.

  • analysis_output_metadata (pd.DataFrame) – metadata of analysis output.

  • structural_models (dict, optional) – structural model.

  • sensor_structural_model_connections (dict, optional) – connections between sensor and structural model.

  • analysis_structural_model_connection (dict, optional) – connections between analysis and structural model.

__call__(data)

calculate quantity of state

Parameters

data (dict) – data calculated before

Returns

containing:

results (dict): results. used_timestamp (dict): timestamp used.

Return type

tuple

exit()

exit solver

6.2. model

class directional_wave_spectra_estimator.model.Model(input_names, output_names, streaming, cfg)

Bases: object

model class

__init__(input_names, output_names, streaming, cfg)

constructor

Parameters
  • input_names (dict) – dict whose keys are names of input quantity and values are names of input data.

  • output_names (dict) – dict whose keys are names of output quantity and values are names of output data.

  • streaming (bool, optional) – if true, run as structural_analysis.

  • cfg (dict) – config.

set_model(sensing_output_metadata, analysis_output_metadata, structural_models, sensor_structural_model_connections, analysis_structural_model_connections)

set structural model and calculate intermediate file

Parameters
  • sensing_output_metadata (pd.DataFrame) – metadata of sensing output.

  • analysis_output_metadata (pd.DataFrame) – metadata of analysis output.

  • structural_models (dict, optional) – structural model.

  • sensor_structural_model_connections (dict, optional) – connections between sensor and structural model.

  • analysis_structural_model_connection (dict, optional) – connections between analysis and structural model.

__call__(data)

calculate results from input using functions

Parameters

data (dict) – input data.

Returns

containing:
results (dict): result data.

the key is output_quantity_name, and the value is the list which has data value (the type is np.array) as element corresponding to its data name.

used_timestamp (dict): timestamp used.

Return type

tuple