Composites

Functions and constants relating to Composites

Functions

Details of functions

GetElemsInPly(ply_id[integer], state_id (optional)[integer]) [static]

Description

Returns an object containing the number of elements in ply <ply_id>, the element type code, and also an array <list[ ]> of their internal indices. If there are no elements in the ply then false is returned. Ply data is only available if a .ztf file containing composite information has been read.

Arguments

  • ply_id (integer)

    The ply in which to return the list of elements. If +ve, the internal ply number starting at 1. If -ve, the external ply label. Internal numbers will be many times faster to process.

  • state_id (optional) (integer)

    State number to be used instead of the current state

    Returns

    Object with the following properties:

    Name Type Description
    list array of integers Internal element ids
    nn integer Number of elements in list
    type integer Element type code

    Return type

    object

    Example

    // Get a list of elements in ply 5
    if(a = GetElemsInPly(5))
    {
        var nelems = a.nn;
        for(var i=0; i<nelems; i++)
        {
            Message("Element: " + GetLabel(a.type, a.list[i]))
        }
    }
    


    GetPlyIntPoint(type_code[integer], item[integer], ply_id[integer], state_id (optional)[integer]) [static]

    Description

    Return the integration point of <type/item> in ply <ply_id>. If the >type/item< is not in the ply then false is returned. Ply data is only available if a .ztf file containing composite information has been read.

    Arguments

  • type_code (integer)

    A valid element type code (Currently only SHELL is valid)

  • item (integer)

    If +ve, the internal item number starting at 1. If -ve, the external label of the item. Internal numbers will be many times faster to process.

  • ply_id (integer)

    If +ve, the internal ply index. If -ve, the external ply label. Internal numbers will be many times faster to process.

  • state_id (optional) (integer)

    State number to be used instead of the current state

    Returns

    integer

    Return type

    Number

    Example

    // Find the integration point in shell #1 occupied by internal ply index 14
    var ip = GetPlyIntPoint(SHELL, 1, 14));
    


    GetPlysInLayup(layup_id[integer], state_id (optional)[integer]) [static]

    Description

    Returns an object containing the number of plys in layup <layup_id> and an array <list[ ]> of their internal indices. If there are no plys in the layup then false is returned. Ply data is only available if a .ztf file containing composite information has been read.

    Arguments

  • layup_id (integer)

    The layup in which to return the list of plys. If +ve an internal layup index, if -ve an external layup label

  • state_id (optional) (integer)

    State number to be used instead of the current state

    Returns

    Object with the following properties:

    Name Type Description
    list array of integers Array of internal ply indices
    nn integer Number of plys in list

    Return type

    object

    Example

    // Print the ply labels in layup 1
    if(a = GetPlysInLayup(1))
    {
        var nplys = a.nn;
        for(var i=0; i<nplys; i++)
        {
            Message("Ply: " + GetLabel(CPLY, a.list[i]))
        }
    }