#### 6.4.2.1. PropertySet

`class compolyx.PropertySet`(gil_wrapper, parent_=None, name_='')

Python PropertySet class.

This class wraps GIL-functionality and adds Python-UI utilities to all material PropertySets (Engineering Constants, Stress Limits, ...).

Examples

    >>> model = db.active_model
    >>> Eglas = model.material_data.materials['E-Glas']
    >>> Eglas_strain_limits = Eglas['strain_limits']
    >>> print Eglas_strain_limits.property_names

['eXt', 'eXc', 'eYt', 'eYc', 'eZt', 'eZc', 'eSxy', 'eSxz', 'eSyz', 'effective_strain']

    >>> Eglas.update()
    >>> Eglas_Xt = Eglas_strain_limits.query('eXt', {'UserVar1' : 0.3, 'Temperature' : 65.7})

`get`(variables=None)

  Get raw PropertySet data. For puck_constants and woven_characterization the Puck Material Classification can be retrieved.

  Parameters

  - variables : Optional string of variable to be retrieved (property or envrionment variable). If this string is set to mat_type the Puck Material Classification is returned if available.

  Returns

  - If no variable was specified, all PropertySet raw data will be returned in dictionary-form. If a variable was specified, then only this data will be returned.

  Examples

      >>> m = db._active_model()
      >>> mat = m.material_data.materials['Corecell_A450']
      >>> gil_data = mat['engineering_constants'].get()

      >>> m = db._active_model()
      >>> mat = m.material_data.materials['Corecell_A450']
      >>> mat_type = mat['puck_constants'].get('mat_type')

      >>> m = db._active_model()
      >>> mat = m.material_data.materials['Corecell_A450']
      >>> E1_data = mat['engineering_constants'].get('E1')

`independent_names`

  List of the independent variable names.

`is_constant`

  True if the PropertySet is constant.

`property_names`

  Propety name list.

`query`(variables=None, environment_point=None)

  Query PropertySet data.

  The available property names on this PropertySet can be retrieved through property_names .

  An empty query returns all properties at the default environment point in dictionary-form. If the PropertySet is not up-to-date, zeros are returned and a warning is thrown.

  Parameters

  - variables : String or list of strings that defines which properties to query for. If a list of properties is provided, the returned list of results retains the order of properties.

  - environment_point : Dictionary defining at which environment state the queried properties are requested. The dictionary takes the form { Var1 : value_1, ...}. For unspecified environment variables, their default value is assumed. Unkown environment variables will be ignored.

  Examples

      >>> m = db._active_model()
      >>> mat = m.material_data.materials['Corecell_A450']
      >>> data = mat['engineering_constants'].query()

      >>> m = db._active_model()
      >>> mat = m.material_data.materials['Corecell_A450']
      >>> data = mat['engineering_constants'].query(['E1', 'E3'], {'Temperature' : 25.73, 'Shear Angle' : 1.8})

`set`(props=None, **kwargs)

  Set constant and variable material data.

  Constant properties can be given as keyword arguments.

  Parameters

  - props : A dictionary or tuple of two dictionaries defining the data

  Examples

      >>> m = db._active_model()
      >>> mat = m.material_data.materials['Corecell_A450']
      >>> data_dict = {'Xc' : 5.1, 'Sxy':0.3}
      >>> mat['stress_limits'].set(data_dict)

      >>> mat['stress_limits'].set(Xc=5.1,Sxy=0.3)

      >>> m = db._active_model()
      >>> mat = m.material_data.materials['Corecell_A450']
      >>> data_dict = ({'rho' : [1000.0, 1020.5, 1025.0]}, {'Temperature' : ([22., 50., 150.], 25.)})
      >>> mat['density'].set(data_dict)

Release 18.2 - © ANSYS, Inc. All rights reserved.