Oasys.D3PLOT.Shell class

Properties

property Shell.data: float | array

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

property Shell.include: integer

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

property Shell.index: integer

The internal index for the shell in D3PLOT

property Shell.integrationPoints: integer

The number of through thickness integration points that the shell has

property Shell.label: integer

The LS-DYNA label for the shell

property Shell.material: Material

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

property Shell.model: Model

The Model that the shell is in

property Shell.onPlanIntegrationPoints: integer

The number of on plan integration points that the shell has

property Shell.part: Part

The Part the shell is in

property Shell.type: constant

The type for the shell (will be Type.SHELL)

Static methods

classmethod Shell.BlankAll(window, model)

Blanks all of the shells in the model

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

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

Returns:

No return value

Return type:

None

Example

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

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

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Returns the first shell in the model (or None if there are no shells in the model)

Parameters:

model (Model) – Model to get first shell in

Returns:

Shell object

Return type:

Shell

Example

To get the first shell in model m:

s = Oasys.D3PLOT.Shell.First(m)
classmethod Shell.FlagAll(model, flag)

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Gets all of the shells in the model

Parameters:

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

Returns:

List of Shell objects

Return type:

list

Example

To get all of the shells in model m:

s = Oasys.D3PLOT.Shell.GetAll(m)
classmethod Shell.GetFlagged(model, flag)

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

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

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

Returns:

List of Shell objects

Return type:

list

Example

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

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

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

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

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

Returns:

Shell object

Return type:

Shell

Example

To get the shell in model m with label 1000:

s = Oasys.D3PLOT.Shell.GetFromID(m, 1000)
classmethod Shell.GetFromIndex(model, index)

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

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

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

Returns:

Shell object

Return type:

Shell

Example

To get the shell in model m at index 50:

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

Returns the value for a data component for multiple shells. For each shell 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 shell 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 shells in list items and use the data property (note that in the example, the argument extra is optional):

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

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

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

Returns the last shell in the model (or None if there are no shells in the model)

Parameters:

model (Model) – Model to get last shell in

Returns:

Shell object

Return type:

Shell

Example

To get the last shell in model m:

s = Oasys.D3PLOT.Shell.Last(m)
classmethod Shell.Pick()

Allows the user to pick a shell from the screen

Returns:

Shell object or None if cancelled

Return type:

Shell

Example

To pick a shell:

s = Oasys.D3PLOT.Shell.Pick()
classmethod Shell.Select(flag)

Selects shells using an object menu

Parameters:

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

Returns:

The number of shells selected or None if menu cancelled

Return type:

integer

Example

To select shells, flagging those selected with flag f:

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

Returns the total number of shells in the model

Parameters:

model (Model) – Model to get total in

Returns:

The number of shells

Return type:

integer

Example

To get the number of shells in model m:

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

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

Parameters:

model (Model) – Model to get total in

Returns:

The number of shells that have been deleted

Return type:

integer

Example

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

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

Unblanks all of the shells in the model

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

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

Returns:

No return value

Return type:

None

Example

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

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

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

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

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

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

Returns:

No return value

Return type:

None

Example

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

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

Instance methods

Shell.Blank(window)

Blanks the shell in a graphics window

Parameters:

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

Returns:

No return value

Return type:

None

Example

To blank shell s in graphics window g:

s.Blank(g)
Shell.Blanked(window)

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

Parameters:

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

Returns:

True if blanked, False if not

Return type:

boolean

Example

To check if shell s is blanked in graphics window g:

if s.Blanked(g):
    do_something..
Shell.ClearFlag(flag)

Clears a flag on a shell

Parameters:

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

Returns:

No return value

Return type:

None

Example

To clear flag f on shell s:

s.ClearFlag()
Shell.Deleted()

Checks if the shell has been deleted or not

Returns:

True if deleted, False if not

Return type:

boolean

Example

To check if shell s has been deleted:

if s.Deleted():
    do_something..
Shell.Flagged(flag)

Checks if the shell is flagged or not

Parameters:

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

Returns:

True if flagged, False if not

Return type:

boolean

Example

To check if shell s has flag f set on it:

if s.Flagged(f):
    do_something..
Shell.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 = s.GetData(component, {"extra": 1})
if value != None:
    do_something..
Shell.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 shell s:

axes = s.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] ]
Shell.Next()

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

Returns:

Shell object

Return type:

Shell

Example

To get the next shell after shell s:

s = s.Next()
Shell.PlasticStrain(options=Oasys.gRPC.defaultArg)

Returns the effective plastic strain for the 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])

Returns:

Plastic strain (or None if the value cannot be calculated)

Return type:

float

Example

To return the effective plastic strain of shell s:

strain = s.PlasticStrain()
if strain != None:
    do_something..
Shell.Previous()

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

Returns:

Shell object

Return type:

Shell

Example

To get the previous shell before shell s:

s = s.Previous()
Shell.SetFlag(flag)

Sets a flag on a shell

Parameters:

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

Returns:

No return value

Return type:

None

Example

To set flag f on shell s:

s.SetFlag(f)
Shell.StrainTensor(options=Oasys.gRPC.defaultArg)

Returns the strain tensor for the 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 shell s:

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

Returns the stress tensor for the 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 shell s:

tensor = s.StressTensor()
if tensor != None:
    do_something..
Shell.Topology()

Returns the topology for the shell in the model

Returns:

list of Node objects

Return type:

list

Example

To get the topology for shell s:

topology = s.Topology()
Shell.Unblank(window)

Unblanks the shell in a graphics window

Parameters:

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

Returns:

No return value

Return type:

None

Example

To unblank shell s in graphics window g:

s.Unblank(g)
Shell.VonMisesStress(options=Oasys.gRPC.defaultArg)

Returns the von Mises stress for the 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 shell s:

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