Oasys.PRIMER.ElementDeath class

Constants

ElementDeath.BEAM

Beam option

ElementDeath.BEAM_SET

Beam set option

ElementDeath.SHELL

Shell option

ElementDeath.SHELL_SET

Shell set option

ElementDeath.SOLID

Solid option

ElementDeath.SOLID_SET

Solid set option

ElementDeath.THICK_SHELL

Thick shell option

ElementDeath.THICK_SHELL_SET

Thick shell set option

Properties

property ElementDeath.boxid: integer

Box restricting element deletion

property ElementDeath.cid: integer

Coordinate ID for transforming boxid

property ElementDeath.eid: integer

Element ID or element set ID. The sid property is an alternative name for this

property ElementDeath.exists(read only): boolean

true if element death exists, false if referred to but not defined

property ElementDeath.idgrp: integer

Group ID for simultaneous deletion

property ElementDeath.include: integer

The Include file number that the element death is in

property ElementDeath.inout: boolean

If true, LS_DYNA deletes elements outside box, otherwise inside box

property ElementDeath.model(read only): integer

The Model number that the element death is in

property ElementDeath.option: constant

ElementDeath option. Can be ElementDeath.SOLID, ElementDeath.SOLID_SET, ElementDeath.BEAM, ElementDeath.BEAM_SET, ElementDeath.SHELL, ElementDeath.SHELL_SET, ElementDeath.THICK_SHELL or ElementDeath.THICK_SHELL_SET. The type property is an alternative name for this

property ElementDeath.percent: float

Deletion percentage

property ElementDeath.sid: integer

Element ID or element set ID. The eid property is an alternative name for this

property ElementDeath.time: float

Deletion time for elimination

property ElementDeath.title: string

ElementDeath title

property ElementDeath.type: constant

ElementDeath option. Can be ElementDeath.SOLID, ElementDeath.SOLID_SET, ElementDeath.BEAM, ElementDeath.BEAM_SET, ElementDeath.SHELL, ElementDeath.SHELL_SET, ElementDeath.THICK_SHELL or ElementDeath.THICK_SHELL_SET The option property is an alternative name for this

Constructor

classmethod ElementDeath(model, type, eid_sid)

Create a new ElementDeath object

Parameters:
Returns:

ElementDeath object

Return type:

dict

Example

To create a new element death in model m with option BEAM_SET and sid 100

ed = Oasys.PRIMER.ElementDeath(m, Oasys.PRIMER.ElementDeath.BEAM_SET, 100)

Static methods

classmethod ElementDeath.Create(model, modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel to create an element death

Parameters:
  • model (Model) – Model that the element death will be created in

  • modal (boolean) – Optional. If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal

Returns:

ElementDeath object (or None if not made)

Return type:

dict

Example

To start creating an element death in model m:

ed = Oasys.PRIMER.ElementDeath.Create(m)
classmethod ElementDeath.First(model)

Returns the first element death in the model

Parameters:

model (Model) – Model to get first element death in

Returns:

ElementDeath object (or None if there are no element deaths in the model)

Return type:

ElementDeath

Example

To get the first element death in model m:

ed = Oasys.PRIMER.ElementDeath.First(m)
classmethod ElementDeath.FlagAll(model, flag)

Flags all of the element deaths in the model with a defined flag

Parameters:
  • model (Model) – Model that all element deaths will be flagged in

  • flag (Flag) – Flag to set on the element deaths

Returns:

No return value

Return type:

None

Example

To flag all of the element deaths with flag f in model m:

Oasys.PRIMER.ElementDeath.FlagAll(m, f)
classmethod ElementDeath.GetAll(model)

Returns a list of ElementDeath objects for all of the element deaths in a model in PRIMER

Parameters:

model (Model) – Model to get element deaths from

Returns:

List of ElementDeath objects

Return type:

list

Example

To make a list of ElementDeath objects for all of the element deaths in model m

ed = Oasys.PRIMER.ElementDeath.GetAll(m)
classmethod ElementDeath.GetFlagged(model, flag)

Returns a list of ElementDeath objects for all of the flagged element deaths in a model in PRIMER

Parameters:
  • model (Model) – Model to get element deaths from

  • flag (Flag) – Flag set on the element deaths that you want to retrieve

Returns:

List of ElementDeath objects

Return type:

list

Example

To make a list of ElementDeath objects for all of the element deaths in model m flagged with f

ed = Oasys.PRIMER.ElementDeath.GetFlagged(m, f)
classmethod ElementDeath.GetFromID(model, number)

Returns the ElementDeath object for a element death ID

Parameters:
  • model (Model) – Model to find the element death in

  • number (integer) – number of the element death you want the ElementDeath object for

Returns:

ElementDeath object (or None if element death does not exist)

Return type:

ElementDeath

Example

To get the ElementDeath object for element death 100 in model m

ed = Oasys.PRIMER.ElementDeath.GetFromID(m, 100)
classmethod ElementDeath.Last(model)

Returns the last element death in the model

Parameters:

model (Model) – Model to get last element death in

Returns:

ElementDeath object (or None if there are no element deaths in the model)

Return type:

ElementDeath

Example

To get the last element death in model m:

ed = Oasys.PRIMER.ElementDeath.Last(m)
classmethod ElementDeath.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)

Allows the user to select element deaths using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting element deaths

  • prompt (string) – Text to display as a prompt to the user

  • limit (Model or Flag) – Optional. If the argument is a Model then only element deaths from that model can be selected. If the argument is a Flag then only element deaths that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any element deaths can be selected. from any model

  • modal (boolean) – Optional. If selection is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the selection will be modal

Returns:

Number of element deaths selected or None if menu cancelled

Return type:

int

Example

To select element deaths from model m, flagging those selected with flag f, giving the prompt ‘Select element deaths’:

Oasys.PRIMER.ElementDeath.Select(f, 'Select element deaths', m)

To select element deaths, flagging those selected with flag f but limiting selection to element deaths flagged with flag l, giving the prompt ‘Select element deaths’:

Oasys.PRIMER.ElementDeath.Select(f, 'Select element deaths', l)
classmethod ElementDeath.Total(model, exists=Oasys.gRPC.defaultArg)

Returns the total number of element deaths in the model

Parameters:
  • model (Model) – Model to get total for

  • exists (boolean) – Optional. true if only existing element deaths should be counted. If false or omitted referenced but undefined element deaths will also be included in the total

Returns:

number of element deaths

Return type:

int

Example

To get the total number of element deaths in model m:

total = Oasys.PRIMER.ElementDeath.Total(m)
classmethod ElementDeath.UnflagAll(model, flag)

Unsets a defined flag on all of the element deaths in the model

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

  • flag (Flag) – Flag to unset on the element deaths

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the element deaths in model m:

Oasys.PRIMER.ElementDeath.UnflagAll(m, f)

Instance methods

ElementDeath.AssociateComment(comment)

Associates a comment with a element death

Parameters:

comment (Comment) – Comment that will be attached to the element death

Returns:

No return value

Return type:

None

Example

To associate comment c to the element death ed:

ed.AssociateComment(c)
ElementDeath.Browse(modal=Oasys.gRPC.defaultArg)

Starts an edit panel in Browse mode

Parameters:

modal (boolean) – Optional. If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal

Returns:

no return value

Return type:

None

Example

To Browse element death ed:

ed.Browse()
ElementDeath.ClearFlag(flag)

Clears a flag on the element death

Parameters:

flag (Flag) – Flag to clear on the element death

Returns:

No return value

Return type:

None

Example

To clear flag f for element death ed:

ed.ClearFlag(f)
ElementDeath.Copy(range=Oasys.gRPC.defaultArg)

Copies the element death. The target include of the copied element death can be set using Options.copy_target_include

Parameters:

range (boolean) – Optional. If you want to keep the copied item in the range specified for the current include. Default value is false. To set current include, use Include.MakeCurrentLayer()

Returns:

ElementDeath object

Return type:

ElementDeath

Example

To copy element death ed into element death z:

z = ed.Copy()
ElementDeath.DetachComment(comment)

Detaches a comment from a element death

Parameters:

comment (Comment) – Comment that will be detached from the element death

Returns:

No return value

Return type:

None

Example

To detach comment c from the element death ed:

ed.DetachComment(c)
ElementDeath.Edit(modal=Oasys.gRPC.defaultArg)

Starts an interactive editing panel

Parameters:

modal (boolean) – Optional. If this window is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the window will be modal

Returns:

no return value

Return type:

None

Example

To Edit element death ed:

ed.Edit()
ElementDeath.Flagged(flag)

Checks if the element death is flagged or not

Parameters:

flag (Flag) – Flag to test on the element death

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if element death ed has flag f set on it:

if ed.Flagged(f):
    do_something..
ElementDeath.GetComments()

Extracts the comments associated to a element death

Returns:

List of Comment objects (or None if there are no comments associated to the node)

Return type:

list

Example

To get the list of comments associated to the element death ed:

comm_list = ed.GetComments()
ElementDeath.GetParameter(prop)

Checks if a ElementDeath property is a parameter or not. Note that object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. For this function to work the JavaScript interpreter must use the parameter name instead of the value. This can be done by setting the Options.property_parameter_names option to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using the ElementDeath.ViewParameters() method and ‘method chaining’ (see the examples below)

Parameters:

prop (string) – element death property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

dict

Example

To check if ElementDeath property ed.example is a parameter:

Oasys.PRIMER.Options.property_parameter_names = True
if ed.GetParameter(ed.example):
    do_something...
Oasys.PRIMER.Options.property_parameter_names = False

To check if ElementDeath property ed.example is a parameter by using the GetParameter method:

if ed.ViewParameters().GetParameter(ed.example):
    do_something..
ElementDeath.Keyword()

Returns the keyword for this element death (*DEFINE_ELEMENT_DEATH). Note that a carriage return is not added. See also ElementDeath.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for element death ed:

key = ed.Keyword()
ElementDeath.KeywordCards()

Returns the keyword cards for the element death. Note that a carriage return is not added. See also ElementDeath.Keyword()

Returns:

string containing the cards

Return type:

str

Example

To get the cards for element death ed:

cards = ed.KeywordCards()
ElementDeath.Next()

Returns the next element death in the model

Returns:

ElementDeath object (or None if there are no more element deaths in the model)

Return type:

ElementDeath

Example

To get the element death in model m after element death ed:

ed = ed.Next()
ElementDeath.Previous()

Returns the previous element death in the model

Returns:

ElementDeath object (or None if there are no more element deaths in the model)

Return type:

ElementDeath

Example

To get the element death in model m before element death ed:

ed = ed.Previous()
ElementDeath.SetFlag(flag)

Sets a flag on the element death

Parameters:

flag (Flag) – Flag to set on the element death

Returns:

No return value

Return type:

None

Example

To set flag f for element death ed:

ed.SetFlag(f)
ElementDeath.ViewParameters()

Object properties that are parameters are normally returned as the integer or float parameter values as that is virtually always what the user would want. This function temporarily changes the behaviour so that if a property is a parameter the parameter name is returned instead. This can be used with ‘method chaining’ (see the example below) to make sure a property argument is correct

Returns:

ElementDeath object

Return type:

dict

Example

To check if ElementDeath property ed.example is a parameter by using the ElementDeath.GetParameter() method:

if ed.ViewParameters().GetParameter(ed.example):
    do_something..
ElementDeath.Xrefs()

Returns the cross references for this element death

Returns:

Xrefs object

Return type:

dict

Example

To get the cross references for element death ed:

xrefs = ed.Xrefs()