Oasys.D3PLOT.Tshell class

Properties

property Tshell.data: float | array

Component data for a tshell passed as an argument to GetMultipleData. Note that data will only exist for the instance of the tshell passed to GetMultipleData. i.e. it is a local property stored on the specific instance. It is not stored in the D3PLOT database

property Tshell.include: integer

The include file number in the model that the tshell is in

property Tshell.index: integer

The internal index for the tshell in D3PLOT

property Tshell.integrationPoints: integer

The number of through thickness integration points that the thick shell has

property Tshell.label: integer

The LS-DYNA label for the tshell

property Tshell.material: Material

The Material the tshell has. This is only available if there is a ztf file for the model. If not None will be returned

property Tshell.model: Model

The Model that the tshell is in

property Tshell.onPlanIntegrationPoints: integer

The number of on plan integration points that the thick shell has

property Tshell.part: Part

The Part the tshell is in

property Tshell.type: constant

The type for the tshell (will be Type.TSHELL)

Static methods

classmethod Tshell.BlankAll(window, model)

Blanks all of the tshells in the model

Parameters:
  • window (GraphicsWindow) – GraphicsWindow) to blank the tshells in

  • model (Model) – Model that all the tshells will be blanked in

Returns:

No return value

Return type:

None

Example

To blank all of the tshells in model m, in graphics window gw:

Oasys.D3PLOT.Tshell.BlankAll(gw, m)
classmethod Tshell.BlankFlagged(window, model, flag)

Blanks all of the tshells in the model flagged with a defined flag

Parameters:
  • window (GraphicsWindow) – GraphicsWindow) to blank the tshells in

  • model (Model) – Model that the flagged tshells will be blanked in

  • flag (Flag) – Flag (see AllocateFlag) set on the tshells to blank

Returns:

No return value

Return type:

None

Example

To blank all of the tshells flagged with flag f in model m, in graphics window gw:

Oasys.D3PLOT.Tshell.BlankFlagged(gw, m, f)
classmethod Tshell.First(model)

Returns the first tshell in the model (or None if there are no tshells in the model)

Parameters:

model (Model) – Model to get first tshell in

Returns:

Tshell object

Return type:

Tshell

Example

To get the first tshell in model m:

t = Oasys.D3PLOT.Tshell.First(m)
classmethod Tshell.FlagAll(model, flag)

Flags all of the tshells in the model with a defined flag

Parameters:
  • model (Model) – Model that all the tshells will be flagged in

  • flag (Flag) – Flag (see AllocateFlag) to set on the tshells

Returns:

No return value

Return type:

None

Example

To flag all of the tshells with flag f in model m:

Oasys.D3PLOT.Tshell.FlagAll(m, f)
classmethod Tshell.GetAll(model)

Gets all of the tshells in the model

Parameters:

model (Model) – Model that all the tshells are in

Returns:

List of Tshell objects

Return type:

list

Example

To get all of the tshells in model m:

t = Oasys.D3PLOT.Tshell.GetAll(m)
classmethod Tshell.GetFlagged(model, flag)

Gets all of the tshells in the model flagged with a defined flag

Parameters:
  • model (Model) – Model that the flagged tshells are in

  • flag (Flag) – Flag (see AllocateFlag) set on the tshells to get

Returns:

List of Tshell objects

Return type:

list

Example

To get all of the tshells flagged with flag f in model m:

Oasys.D3PLOT.Tshell.GetFlagged(m, f)
classmethod Tshell.GetFromID(model, label)

Returns the Tshell object for tshell in model with label (or None if it does not exist)

Parameters:
  • model (Model) – Model to get tshell in

  • label (integer) – The LS-DYNA label for the tshell in the model

Returns:

Tshell object

Return type:

Tshell

Example

To get the tshell in model m with label 1000:

t = Oasys.D3PLOT.Tshell.GetFromID(m, 1000)
classmethod Tshell.GetFromIndex(model, index)

Returns the Tshell object for tshell in model with index (or None if it does not exist)

Parameters:
  • model (Model) – Model to get tshell in

  • index (integer) – The D3PLOT internal index in the model for tshell

Returns:

Tshell object

Return type:

Tshell

Example

To get the tshell in model m at index 50:

t = Oasys.D3PLOT.Tshell.GetFromIndex(m, 50)
classmethod Tshell.GetMultipleData(component, items, options=Oasys.gRPC.defaultArg)

Returns the value for a data component for multiple tshells. For each tshell a local property called data will be created containing a number if a scalar component, or a list if a vector or tensor component (or None if the value cannot be calculated). The data is also returned as an object.
Also see GetData

Parameters:
Returns:

Dictionary containing the data. A property is created in the dictionary for each tshell with the label. The value of the property is a number if a scalar component or an array if a vector or tensor component (or None if the value cannot be calculated)

Return type:

dictionary

Example

To calculate a component for tshells in list items and use the data property (note that in the example, the argument extra is optional):

Oasys.D3PLOT.Tshell.GetMultipleData(component, items, {"extra": 1})
for item in items:
    if item.data != None:
        do_something..

To calculate a component for tshells in list items and use the return value (note that in the example, the argument extra is optional):

data = Oasys.D3PLOT.Tshell.GetMultipleData(component, items, {"extra": 1})
for d in data:
    Oasys.D3PLOT.Message("Label is {}".format(d))
    if data[d] != None:
        do_something..
classmethod Tshell.Last(model)

Returns the last tshell in the model (or None if there are no tshells in the model)

Parameters:

model (Model) – Model to get last tshell in

Returns:

Tshell object

Return type:

Tshell

Example

To get the last tshell in model m:

t = Oasys.D3PLOT.Tshell.Last(m)
classmethod Tshell.Pick()

Allows the user to pick a tshell from the screen

Returns:

Tshell object or None if cancelled

Return type:

Tshell

Example

To pick a tshell:

t = Oasys.D3PLOT.Tshell.Pick()
classmethod Tshell.Select(flag)

Selects tshells using an object menu

Parameters:

flag (Flag) – Flag (see AllocateFlag) to use when selecting tshells

Returns:

The number of tshells selected or None if menu cancelled

Return type:

integer

Example

To select tshells, flagging those selected with flag f:

total = Oasys.D3PLOT.Tshell.Select(f)
classmethod Tshell.Total(model)

Returns the total number of tshells in the model

Parameters:

model (Model) – Model to get total in

Returns:

The number of tshells

Return type:

integer

Example

To get the number of tshells in model m:

total = Oasys.D3PLOT.Tshell.Total(m)
classmethod Tshell.TotalDeleted(model)

Returns the total number of thick shells that have been deleted in a model

Parameters:

model (Model) – Model to get total in

Returns:

The number of thick shells that have been deleted

Return type:

integer

Example

To get the number of thick shells in model m that have been deleted:

total = Oasys.D3PLOT.Tshell.TotalDeleted(m)
classmethod Tshell.UnblankAll(window, model)

Unblanks all of the tshells in the model

Parameters:
  • window (GraphicsWindow) – GraphicsWindow) to unblank the tshells in

  • model (Model) – Model that all the tshells will be unblanked in

Returns:

No return value

Return type:

None

Example

To unblank all of the tshells in model m, in graphics window gw:

Oasys.D3PLOT.Tshell.UnblankAll(gw, m)
classmethod Tshell.UnblankFlagged(window, model, flag)

Unblanks all of the tshells in the model flagged with a defined flag

Parameters:
  • window (GraphicsWindow) – GraphicsWindow) to unblank the tshells in

  • model (Model) – Model that the flagged tshells will be unblanked in

  • flag (Flag) – Flag (see AllocateFlag) set on the tshells to unblank

Returns:

No return value

Return type:

None

Example

To unblank all of the tshells flagged with flag f in model m, in graphics window gw:

Oasys.D3PLOT.Tshell.UnblankFlagged(gw, m, f)
classmethod Tshell.UnflagAll(model, flag)

Unsets a defined flag on all of the tshells in the model

Parameters:
  • model (Model) – Model that the defined flag for all tshells will be unset in

  • flag (Flag) – Flag (see AllocateFlag) to unset on the tshells

Returns:

No return value

Return type:

None

Example

To unset flag f on all of the tshells in model m:

Oasys.D3PLOT.Tshell.UnflagAll(m, f)

Instance methods

Tshell.Blank(window)

Blanks the tshell in a graphics window

Parameters:

window (GraphicsWindow) – GraphicsWindow) to blank the tshell in

Returns:

No return value

Return type:

None

Example

To blank tshell t in graphics window g:

t.Blank(g)
Tshell.Blanked(window)

Checks if the tshell is blanked in a graphics window or not

Parameters:

window (GraphicsWindow) – GraphicsWindow) in which to check if the tshell is blanked

Returns:

True if blanked, False if not

Return type:

boolean

Example

To check if tshell t is blanked in graphics window g:

if t.Blanked(g):
    do_something..
Tshell.ClearFlag(flag)

Clears a flag on a tshell

Parameters:

flag (Flag) – Flag (see AllocateFlag) to clear on the tshell

Returns:

No return value

Return type:

None

Example

To clear flag f on tshell t:

t.ClearFlag()
Tshell.Deleted()

Checks if the thick shell has been deleted or not

Returns:

True if deleted, False if not

Return type:

boolean

Example

To check if thick shell t has been deleted:

if t.Deleted():
    do_something..
Tshell.Flagged(flag)

Checks if the tshell is flagged or not

Parameters:

flag (Flag) – Flag (see AllocateFlag) to test on the tshell

Returns:

True if flagged, False if not

Return type:

boolean

Example

To check if tshell t has flag f set on it:

if t.Flagged(f):
    do_something..
Tshell.GetData(component, options=Oasys.gRPC.defaultArg)

Returns the value for a data component.
Also see GetMultipleData

Parameters:
  • component (constant) – Component constant to get data for

  • options (dict) –

    Optional. Dictionary containing options for getting data. Can be any of:

    extra:

    (integer) The extra data component number if component Component.SOX for solids, Component.BMX for beams or Component.SHX for shells and thick shells

    ip:

    (integer) Integration point number to get the data at (ip >= 1 or one of the constants Constant.TOP, Constant.MIDDLE or Constant.BOTTOM). If the integration point is not defined it will use the integration point defined on the current GUI “data” panel, which defaults to the middle surface for shells, thick shells, and solids, and Mag All for beams, but may vary if changed by an interactive user. If consistent output from a script is required, independent of any prior interactive activity, an explicit integration point or surface should be defined

    op:

    (integer) On plane integration point number for shells and thick shells (op >= 1 [default])

    referenceFrame:

    (constant) The frame of reference to return values in. Either Constant.GLOBAL (default), Constant.LOCAL, Constant.CYLINDRICAL, Constant.USER_DEFINED or Constant.MATERIAL. This is only necessary for directional components (eg X stress) and then only when something other than the default Constant.GLOBAL coordinate system is to be used

    user:

    (integer) The user-defined component number if component Component.UNOS, Component.UNOV, Component.USSS, Component.USST, Component.UBMS or Component.UBMV

Returns:

Number if a scalar component, array if a vector or tensor component (or None if the value cannot be calculated because it’s not available in the model).<br> If requesting an invalid component it will throw an error (e.g. Component.AREA of a node).

Return type:

float|array

Example

To calculate a component and check it has been calculated (note that in the example, the argument extra is optional):

value = t.GetData(component, {"extra": 1})
if value != None:
    do_something..
Tshell.LocalAxes()

Returns the local axes of the element in model space, expressed as direction cosines in a 2D list. Beam elements must have 3 nodes to be able to return local axes

Returns:

list of lists

Return type:

list

Example

To get the local axes for tshell t:

axes = t.LocalAxes()
xAxis = [ axes[0][0], axes[0][1], axes[0][2] ]
yAxis = [ axes[1][0], axes[1][1], axes[1][2] ]
zAxis = [ axes[2][0], axes[2][1], axes[2][2] ]
Tshell.Next()

Returns the next tshell in the model (or None if there is not one)

Returns:

Tshell object

Return type:

Tshell

Example

To get the next tshell after tshell t:

t = t.Next()
Tshell.PlasticStrain(options=Oasys.gRPC.defaultArg)

Returns the effective plastic strain for the thick shell (or None if the value cannot be calculated)

Parameters:

options (dict) –

Optional. Dictionary containing options for getting data. Can be any of:

ip:

(integer) Integration point number to get the data at (ip >= 1 or one of the constants Constant.TOP, Constant.MIDDLE or Constant.BOTTOM)

op:

(integer) On plane integration point number for shells and thick shells (op >= 1 [default])

Returns:

Plastic strain

Return type:

float

Example

To return the effective plastic strain of thick shell t:

strain = t.PlasticStrain()
if strain != None:
    do_something..
Tshell.Previous()

Returns the previous tshell in the model (or None if there is not one)

Returns:

Tshell object

Return type:

Tshell

Example

To get the previous tshell before tshell t:

t = t.Previous()
Tshell.SetFlag(flag)

Sets a flag on a tshell

Parameters:

flag (Flag) – Flag (see AllocateFlag) to set on the tshell

Returns:

No return value

Return type:

None

Example

To set flag f on tshell t:

t.SetFlag(f)
Tshell.StrainTensor(options=Oasys.gRPC.defaultArg)

Returns the strain tensor for the thick shell

Parameters:

options (dict) –

Optional. Dictionary containing options for getting data. Can be any of:

ip:

(integer) Integration point number to get the data at (ip >= 1 or one of the constants Constant.TOP, Constant.MIDDLE or Constant.BOTTOM)

op:

(integer) On plane integration point number for shells and thick shells (op >= 1 [default])

referenceFrame:

(constant) The frame of reference to return values in. Either Constant.GLOBAL (default), Constant.LOCAL, Constant.CYLINDRICAL, Constant.USER_DEFINED or Constant.MATERIAL

Returns:

Array containing the strain tensor [Exx, Eyy, Ezz, Exy, Eyz, Ezx] (or None if the value cannot be calculated)

Return type:

array

Example

To return the strain tensor of think shell t:

tensor = t.StrainTensor()
if tensor != None:
    do_something..
Tshell.StressTensor(options=Oasys.gRPC.defaultArg)

Returns the stress tensor for the thick shell

Parameters:

options (dict) –

Optional. Dictionary containing options for getting data. Can be any of:

ip:

(integer) Integration point number to get the data at (ip >= 1 or one of the constants Constant.TOP, Constant.MIDDLE or Constant.BOTTOM)

op:

(integer) On plane integration point number for shells and thick shells (op >= 1 [default])

referenceFrame:

(constant) The frame of reference to return values in. Either Constant.GLOBAL (default), Constant.LOCAL, Constant.CYLINDRICAL, Constant.USER_DEFINED or Constant.MATERIAL

Returns:

Array containing the stress tensor [Exx, Eyy, Ezz, Exy, Eyz, Ezx] (or None if the value cannot be calculated)

Return type:

array

Example

To return the stress tensor of thick shell t:

tensor = t.StressTensor()
if tensor != None:
    do_something..
Tshell.Topology()

Returns the topology for the tshell in the model

Returns:

list of Node objects

Return type:

list

Example

To get the topology for tshell t:

topology = t.Topology()
Tshell.Unblank(window)

Unblanks the tshell in a graphics window

Parameters:

window (GraphicsWindow) – GraphicsWindow) to unblank the tshell in

Returns:

No return value

Return type:

None

Example

To unblank tshell t in graphics window g:

t.Unblank(g)
Tshell.VonMisesStress(options=Oasys.gRPC.defaultArg)

Returns the von Mises stress for the thick shell (or None if the value cannot be calculated)

Parameters:

options (dict) –

Optional. Dictionary containing options for getting data. Can be any of:

ip:

(integer) Integration point number to get the data at (ip >= 1 or one of the constants Constant.TOP, Constant.MIDDLE or Constant.BOTTOM)

op:

(integer) On plane integration point number for shells and thick shells (op >= 1 [default])

Returns:

von Mises stress

Return type:

float

Example

To return the von Mises stress of thick shell t:

svm = t.VonMisesStress()
if svm != None:
    do_something..