2. i-SAS_iFEM-matlab

2.1. interface

class ifem_matlab.interface.Interface(input_names, output_names, structural_model_name, sensor_name=None, **kwargs)

Bases: object

interface class of structural analysis solver

package_name = 'ifem_matlab'
sensor_required = True
__init__(input_names, output_names, structural_model_name, sensor_name=None, **kwargs)

initialization of interface class of structural analysis solver

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.

  • structural_model_name (str) – structural model name.

  • sensor_name (str, optional) – sensor_name.

  • **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, 'plate')
set_project(project_name)
Parameters

project_name (str) – project name.

set_model(structural_models, structural_model_list, sensor_structural_model_connections)

set structural model

Parameters
  • structural_models (dict) – structural model.

  • structural_model_list (dict) – list of structural model.

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

__call__(results)

calculate quantity of state

Parameters

results (dict) – results calculated before

Returns

results

Return type

dict

exit()

exit solver

2.2. model

class ifem_matlab.model.Model(input_quantity_names, output_quantity_names, cfg)

Bases: object

model class

__init__(input_quantity_names, output_quantity_names, cfg)

constructor

Parameters
  • input_quantity_names (list[str]) – names of input quantity.

  • output_quantity_names (list[str]) – names of output quantity.

  • cfg (dict) – config.

set_model(structural_model, structural_model_type, sensor_structural_model_connection)

set structural model and calculate intermediate file

Parameters
  • structural_model (dict) – structural model whose keys are model component type.

  • structural_model_type (str) – structural model type.

  • sensor_structural_model_connection (pandas.DataFrame) – connection between sensor and structural model.

__call__(data)

calculate results from input using functions

Parameters

data (dict) – input data.

Returns

output data.

Return type

dict

exit()

send ifem exit flag