Oasys.PRIMER.InterfaceSpringback class¶
Constants¶
Types of Keyword¶
- InterfaceSpringback.EXCLUDE¶
INTERFACE is *INTERFACE_SPRINGBACK_EXCLUDE
- InterfaceSpringback.LSDYNA¶
INTERFACE is *INTERFACE_SPRINGBACK_LSDYNA
- InterfaceSpringback.NASTRAN¶
INTERFACE is *INTERFACE_SPRINGBACK_NASTRAN
- InterfaceSpringback.NIKE3D¶
INTERFACE is *INTERFACE_SPRINGBACK_NIKE3D
- InterfaceSpringback.SEAMLESS¶
INTERFACE is *INTERFACE_SPRINGBACK_SEAMLESS
Properties¶
- property InterfaceSpringback.cflag: integer¶
Output contact state
- property InterfaceSpringback.exists(read only): boolean¶
true if interface springback exists, false if referred to but not defined
- property InterfaceSpringback.fsplit: integer¶
Flag for splitting of the dynain file (0 - One file, 1 - Two files.). Used for OPTCARD field
- property InterfaceSpringback.ftensr: integer¶
Flag for dumping tensor data from the element history variables into the dynain file (0/1)
- property InterfaceSpringback.ftype: integer¶
Filetype (0-3, 10-12)
- property InterfaceSpringback.include: integer¶
The
Include
file number that the interface springback is in
- property InterfaceSpringback.intstrn: integer¶
Output of strains at all integration points of shell element is requested
- property InterfaceSpringback.model(read only): integer¶
The
Model
number that the interface springback is in
- property InterfaceSpringback.ncyc: integer¶
Number of process cycles. Used for OPTCARD field
- property InterfaceSpringback.ndflag: integer¶
Flag to dump nodes into dynain file
- property InterfaceSpringback.nexclude: integer¶
gives the number of excluded keywords. Needed only for
InterfaceSpringback.EXCLUDE.
- property InterfaceSpringback.nnodes: integer¶
gives the number of nodal points constrained for this keyword. (read_only)
- property InterfaceSpringback.nothickness: boolean¶
true if _NOTHICKNESS (option2) is set. _NOTHICKNESS can be used only for
InterfaceSpringback.LSDYNA
orInterfaceSpringback.NASTRAN
- property InterfaceSpringback.nshv: integer¶
Num additional Shell/Solid history variables number
- property InterfaceSpringback.nthhsv: integer¶
Number of thermal history variables
- property InterfaceSpringback.optcard: boolean¶
Whether to have a OPTCARD. Can be true or false
- property InterfaceSpringback.sldo: integer¶
Output of solid element data as 0 - *ELEMENT_SOLID, 1- *ELEM_SOLID_ORTHO. Used for OPTCARD field
- property InterfaceSpringback.type(read only): integer¶
gives the type of InterfaceSpringback object
Constructor¶
- classmethod InterfaceSpringback(model, options)¶
Create a new
InterfaceSpringback
object
- Parameters:
model (Model) –
Model
that interface springback will be created inoptions (dict) –
Options for creating the interface springback
- cflag (optional):
(integer) Output contact state
- fsplit (optional):
(integer) Flag for splitting of the dynain file (0 - One file, 1 - Two files.). Used only for optional card
- ftensr (optional):
(integer) Flag for dumping tensor data from the element history variables into the dynain file (0/1)
- ftype (optional):
(integer) Filetype (0-3, 10-12)
- intstrn (optional):
(integer) Output of strains at all integration points of shell element is requested
- keylist (optional):
(Array of strings) List of keywords to be excluded.(ONLY for EXCLUDE)
- ncyc (optional):
(integer) Number of process cycles. Used only for optional card
- ndflag (optional):
(integer) Flag to dump nodes into dynain file
- nshv (optional):
(integer) Num additional Shell/Solid history variables number
- nthhsv (optional):
(integer) Number of thermal history variables
- optcard (optional):
(logical) Whether to have an optional card. Can be true or false
- psid (optional):
(integer)
Part set
ID for springback.(NOT for _EXCLUDE)- sldo (optional):
(integer) Output of solid element data as 0 - *ELEMENT_SOLID, 1- *ELEM_SOLID_ORTHO. Used only for optional card
- type:
(constant) Specify the type of InterfaceSpringback (Can be
InterfaceSpringback.NIKE3D
orInterfaceSpringback.LSDYNA
orInterfaceSpringback.NASTRAN
orInterfaceSpringback.SEAMLESS
)- Returns:
InterfaceSpringback object
- Return type:
dict
Example
To create a new interface springback in model m, type LSDYNA, part set id 100:
i_s = Oasys.PRIMER.InterfaceSpringback(m, {"type": Oasys.PRIMER.InterfaceSpringback.LSDYNA, "psid": 100})
Static methods¶
- classmethod InterfaceSpringback.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create an InterfaceSpringback definition
- Parameters:
model (Model) –
Model
that the InterfaceSpringback will be created inmodal (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:
InterfaceSpringback object (or None if not made)
- Return type:
dict
Example
To start creating an ifce_sbak in model m:
i_s = Oasys.PRIMER.InterfaceSpringback.Create(m)
- classmethod InterfaceSpringback.First(model)¶
Returns the first interface springback in the model
- Parameters:
model (Model) –
Model
to get first interface springback in- Returns:
InterfaceSpringback object (or None if there are no interface springbacks in the model)
- Return type:
InterfaceSpringback
Example
To get the first interface springback in model m:
i_s = Oasys.PRIMER.InterfaceSpringback.First(m)
- classmethod InterfaceSpringback.FlagAll(model, flag)¶
Flags all of the interface springbacks in the model with a defined flag
- Parameters:
model (Model) –
Model
that all interface springbacks will be flagged inflag (Flag) – Flag to set on the interface springbacks
- Returns:
No return value
- Return type:
None
Example
To flag all of the interface springbacks with flag f in model m:
Oasys.PRIMER.InterfaceSpringback.FlagAll(m, f)
- classmethod InterfaceSpringback.GetAll(model)¶
Returns a list of InterfaceSpringback objects for all of the interface springbacks in a model in PRIMER
- Parameters:
model (Model) –
Model
to get interface springbacks from- Returns:
List of InterfaceSpringback objects
- Return type:
list
Example
To make a list of InterfaceSpringback objects for all of the interface springbacks in model m
i_s = Oasys.PRIMER.InterfaceSpringback.GetAll(m)
- classmethod InterfaceSpringback.GetFlagged(model, flag)¶
Returns a list of InterfaceSpringback objects for all of the flagged interface springbacks in a model in PRIMER
- Parameters:
model (Model) –
Model
to get interface springbacks fromflag (Flag) – Flag set on the interface springbacks that you want to retrieve
- Returns:
List of InterfaceSpringback objects
- Return type:
list
Example
To make a list of InterfaceSpringback objects for all of the interface springbacks in model m flagged with f
i_s = Oasys.PRIMER.InterfaceSpringback.GetFlagged(m, f)
- classmethod InterfaceSpringback.GetFromID(model, number)¶
Returns the InterfaceSpringback object for a interface springback ID
- Parameters:
model (Model) –
Model
to find the interface springback innumber (integer) – number of the interface springback you want the InterfaceSpringback object for
- Returns:
InterfaceSpringback object (or None if interface springback does not exist)
- Return type:
InterfaceSpringback
Example
To get the InterfaceSpringback object for interface springback 100 in model m
i_s = Oasys.PRIMER.InterfaceSpringback.GetFromID(m, 100)
- classmethod InterfaceSpringback.Last(model)¶
Returns the last interface springback in the model
- Parameters:
model (Model) –
Model
to get last interface springback in- Returns:
InterfaceSpringback object (or None if there are no interface springbacks in the model)
- Return type:
InterfaceSpringback
Example
To get the last interface springback in model m:
i_s = Oasys.PRIMER.InterfaceSpringback.Last(m)
- classmethod InterfaceSpringback.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select interface springbacks using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting interface springbacks
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only interface springbacks from that model can be selected. If the argument is aFlag
then only interface springbacks that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any interface springbacks can be selected. from any modelmodal (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 interface springbacks selected or None if menu cancelled
- Return type:
int
Example
To select interface springbacks from model m, flagging those selected with flag f, giving the prompt ‘Select interface springbacks’:
Oasys.PRIMER.InterfaceSpringback.Select(f, 'Select interface springbacks', m)To select interface springbacks, flagging those selected with flag f but limiting selection to interface springbacks flagged with flag l, giving the prompt ‘Select interface springbacks’:
Oasys.PRIMER.InterfaceSpringback.Select(f, 'Select interface springbacks', l)
- classmethod InterfaceSpringback.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of interface springbacks in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing interface springbacks should be counted. If false or omitted referenced but undefined interface springbacks will also be included in the total
- Returns:
number of interface springbacks
- Return type:
int
Example
To get the total number of interface springbacks in model m:
total = Oasys.PRIMER.InterfaceSpringback.Total(m)
- classmethod InterfaceSpringback.UnflagAll(model, flag)¶
Unsets a defined flag on all of the interface springbacks in the model
- Parameters:
model (Model) –
Model
that the defined flag for all interface springbacks will be unset inflag (Flag) – Flag to unset on the interface springbacks
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the interface springbacks in model m:
Oasys.PRIMER.InterfaceSpringback.UnflagAll(m, f)
Instance methods¶
- InterfaceSpringback.AssociateComment(comment)¶
Associates a comment with a interface springback
- Parameters:
comment (Comment) –
Comment
that will be attached to the interface springback- Returns:
No return value
- Return type:
None
Example
To associate comment c to the interface springback i_s:
i_s.AssociateComment(c)
- InterfaceSpringback.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 interface springback i_s:
i_s.Browse()
- InterfaceSpringback.ClearFlag(flag)¶
Clears a flag on the interface springback
- Parameters:
flag (Flag) – Flag to clear on the interface springback
- Returns:
No return value
- Return type:
None
Example
To clear flag f for interface springback i_s:
i_s.ClearFlag(f)
- InterfaceSpringback.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the interface springback. The target include of the copied interface springback 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:
InterfaceSpringback object
- Return type:
InterfaceSpringback
Example
To copy interface springback i_s into interface springback z:
z = i_s.Copy()
- InterfaceSpringback.DetachComment(comment)¶
Detaches a comment from a interface springback
- Parameters:
comment (Comment) –
Comment
that will be detached from the interface springback- Returns:
No return value
- Return type:
None
Example
To detach comment c from the interface springback i_s:
i_s.DetachComment(c)
- InterfaceSpringback.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 interface springback i_s:
i_s.Edit()
- InterfaceSpringback.Flagged(flag)¶
Checks if the interface springback is flagged or not
- Parameters:
flag (Flag) – Flag to test on the interface springback
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if interface springback i_s has flag f set on it:
if i_s.Flagged(f): do_something..
- InterfaceSpringback.GetComments()¶
Extracts the comments associated to a interface springback
- 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 interface springback i_s:
comm_list = i_s.GetComments()
- InterfaceSpringback.GetExcludeKeyword(idx)¶
Returns the keyword string excluded at given index in Keyword list. Needed only for
InterfaceSpringback.EXCLUDE.
- Parameters:
idx (integer) – The index in Keyword list you want the Keyword string for. Note that indices start at 0, not 1
- Returns:
A Keyword string at index “idx” from excluded keyword list
- Return type:
str
Example
To get the 3rd Keyword string in Interface Springback i_s:
if (i_s.nexclude >= 3): keyword = i_s.GetExcludeKeyword(2)
- InterfaceSpringback.GetNodalPoint(npt)¶
Returns the data for nodal point constrained for *INTERFACE_SPRINGBACK
- Parameters:
npt (integer) – The nodal point you want the data for. Note that nodal points start at 0, not 1
- Returns:
A list containing the Node id, translational constraint (TC) and rotational constraint (RC) constants
- Return type:
list
Example
To get the nodal point data for the 3rd nodal constraint for Interface Springback i_s:
if (i_s.nnodes >= 3): npt_data = i_s.GetNodalPoint(2)
- InterfaceSpringback.GetParameter(prop)¶
Checks if a InterfaceSpringback 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 theInterfaceSpringback.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – interface springback property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if InterfaceSpringback property i_s.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if i_s.GetParameter(i_s.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if InterfaceSpringback property i_s.example is a parameter by using the GetParameter method:
if i_s.ViewParameters().GetParameter(i_s.example): do_something..
- InterfaceSpringback.Keyword()¶
Returns the keyword for this Interface Springback (*INTERFACE_SPRINGBACK_xxxx_xxxx) Note that a carriage return is not added. See also
InterfaceSpringback.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for InterfaceSpringback i_s:
key = i_s.Keyword()
- InterfaceSpringback.KeywordCards()¶
Returns the keyword cards for the InterfaceSpringback. Note that a carriage return is not added. See also
InterfaceSpringback.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for InterfaceSpringback i_s:
cards = i_s.KeywordCards()
- InterfaceSpringback.Next()¶
Returns the next interface springback in the model
- Returns:
InterfaceSpringback object (or None if there are no more interface springbacks in the model)
- Return type:
InterfaceSpringback
Example
To get the interface springback in model m after interface springback i_s:
i_s = i_s.Next()
- InterfaceSpringback.Previous()¶
Returns the previous interface springback in the model
- Returns:
InterfaceSpringback object (or None if there are no more interface springbacks in the model)
- Return type:
InterfaceSpringback
Example
To get the interface springback in model m before interface springback i_s:
i_s = i_s.Previous()
- InterfaceSpringback.RemoveExcludeKeyword(idx)¶
Removes the keyword string excluded at given index in Keyword list. Needed only for
InterfaceSpringback.EXCLUDE
- Parameters:
idx (integer) – The index in Keyword list you removed. Note that indices start at 0, not 1
- Returns:
No return value
- Return type:
None
Example
To remove the 3rd Keyword string in Interface Springback i_s:
if (i_s.nexclude >= 3): keyword = i_s.RemoveExcludeKeyword(2)
- InterfaceSpringback.RemoveNodalPoint(npt)¶
Removes the nodal point for constrained node for *INTERFACE_SPRINGBACK
- Parameters:
npt (integer) – The nodal point you want to remove. Note that nodal points start at 0, not 1
- Returns:
No return value
- Return type:
None
Example
To remove the nodal point for the 3rd node for InterfaceSpringback i_s:
i_s.RemoveNodalPoint(2)
- InterfaceSpringback.SetExcludeKeyword(keystr, index=Oasys.gRPC.defaultArg)¶
Sets a keyword string to be excluded. Adds a new keyword if index value is not given, else replaces the keyword string at given index. Note that indices start at 0, not 1. Needed only for
InterfaceSpringback.EXCLUDE
- Parameters:
keystr (string) – The keyword string you want to be excluded
index (integer) – Optional. The index at which keyword string should be set
- Returns:
No return value
- Return type:
None
Example
To set a keyword string at index 3 to be excluded for InterfaceSpringback i_s:
if(i_s.nexclude >= 4): i_s.SetExcludeKeyword("ELEMENT_SHELL", 3)
- InterfaceSpringback.SetFlag(flag)¶
Sets a flag on the interface springback
- Parameters:
flag (Flag) – Flag to set on the interface springback
- Returns:
No return value
- Return type:
None
Example
To set flag f for interface springback i_s:
i_s.SetFlag(f)
- InterfaceSpringback.SetNodalPoint(npt, nid, tc, rc)¶
Sets the nodal point data for a node in *INTERFACE_SPRINGBACK
- Parameters:
npt (integer) – The nodal point you want to set the data for. Note that nodal points start at 0, not 1
nid (integer) –
Node
ID for the nodal pointtc (real) – Translational constraint constant of the nodal point. (0-7)
rc (real) – Rotational constraint constant of the nodal point. (0-7)
- Returns:
No return value
- Return type:
None
Example
To set the nodal data for the 3rd nodal point to node 1, tc 2 and rc 4, for InterfaceSpringback i_s:
i_s.SetNodalPoint(2, 1, 2, 4)
- InterfaceSpringback.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:
InterfaceSpringback object
- Return type:
dict
Example
To check if InterfaceSpringback property i_s.example is a parameter by using the
InterfaceSpringback.GetParameter()
method:if i_s.ViewParameters().GetParameter(i_s.example): do_something..
- InterfaceSpringback.Xrefs()¶
Returns the cross references for this interface springback
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for interface springback i_s:
xrefs = i_s.Xrefs()