Oasys.PRIMER.InterpolationSpotweld class¶
Constants¶
Flags for Interpolation¶
Material behaviour and damage model¶
- InterpolationSpotweld.SPR3¶
SPR3 (default)
- InterpolationSpotweld.SPR3_MAT_PARAM¶
SPR3 with selected material parameters as functions
- InterpolationSpotweld.SPR3_MAT_PARAM_MOD¶
SPR3 with selected material parameters as functions and slight modification
- InterpolationSpotweld.SPR4¶
SPR4
- InterpolationSpotweld.SPR4_MAT_PARAM¶
SPR4 with selected material parameters as functions
- InterpolationSpotweld.SPR4_MAT_PARAM_MOD¶
SPR4 with selected material parameters as functions and slight modification
Properties¶
- property InterpolationSpotweld.alpha1: float/integer¶
Scaling factor alpha 1. Function ID if MODEL > 10
- property InterpolationSpotweld.alpha2: float¶
Plastic initiation displacement scaling factor alpha2
- property InterpolationSpotweld.alpha3: float¶
Plastic initiation displacement scaling factor alpha3
- property InterpolationSpotweld.bdmodel: float¶
Material behaviour and damage model. Values can be
InterpolationSpotweld.SPR3,InterpolationSpotweld.SPR4,InterpolationSpotweld.SPR3_MAT_PARAM,InterpolationSpotweld.SPR4_MAT_PARAM,InterpolationSpotweld.SPR3_MAT_PARAM_MODorInterpolationSpotweld.SPR4_MAT_PARAM_MOD
- property InterpolationSpotweld.beta: float¶
Exponent for plastic potential beta 1. Function ID if MODEL > 10
- property InterpolationSpotweld.beta2: float¶
Exponent for plastic initiation displacement beta2
- property InterpolationSpotweld.beta3: float¶
Exponent for plastic initiation displacement beta3
- property InterpolationSpotweld.dens: float¶
Spotweld density (necessary for time step calculation)
- property InterpolationSpotweld.exists(read only): boolean¶
true if constrained interpolation spotweld exists, false if referred to but not defined
- property InterpolationSpotweld.gamma: float¶
Scaling factor
- property InterpolationSpotweld.include: integer¶
The
Includefile number that the constrained interpolation spotweld is in
- property InterpolationSpotweld.intp: float¶
Flag for interpolation. Values can be
InterpolationSpotweld.LINEAR,InterpolationSpotweld.UNIFORMorInterpolationSpotweld.INVERSE
- property InterpolationSpotweld.lcdexp: integer¶
Load curve ID for damage exponent vs. mode mixity
- property InterpolationSpotweld.lcf: integer¶
Load curve ID describing force versus plastic displacement
- property InterpolationSpotweld.lcupf: integer¶
Load curve ID describing plastic initiation displacement versus mode mixity. Required only for material behaviour and damage models
InterpolationSpotweld.SPR3,InterpolationSpotweld.SPR3_MAT_PARAMorInterpolationSpotweld.SPR3_MAT_PARAM_MOD
- property InterpolationSpotweld.lcupr: integer¶
Load curve ID describing plastic rupture displacement versus mode mixity. Required only for material behaviour and damage models
InterpolationSpotweld.SPR3,InterpolationSpotweld.SPR3_MAT_PARAMorInterpolationSpotweld.SPR3_MAT_PARAM_MOD
- property InterpolationSpotweld.model(read only): integer¶
The
Modelnumber that the interpolation spotweld is in
- property InterpolationSpotweld.mrn: float¶
Proportionality factor for dependency RN
- property InterpolationSpotweld.mrs: float¶
Proportionality factor for dependency RS
- property InterpolationSpotweld.pidvb: float¶
Part ID for visualization beams representing SPR3 in post-processing
- property InterpolationSpotweld.r: float¶
Spotweld Radius
- property InterpolationSpotweld.rn: float/integer¶
Tensile strength factor or negative Load curve with ID giving as a function of peel ratio . Function ID if MODEL > 10
- property InterpolationSpotweld.rs: float¶
Shear strength factor. Function ID if MODEL > 10
- property InterpolationSpotweld.scarn: float¶
Scale factor for tensile strength factor RN
- property InterpolationSpotweld.scars: float¶
Scale factor for tensile strength factor RS
- property InterpolationSpotweld.sropt: float¶
Shear rotation option
- property InterpolationSpotweld.stiff: float/integer¶
Elastic stiffness OR material ID if less than 0. Function ID if MODEL > 10
- property InterpolationSpotweld.stiff2: float¶
Elastic shear stiffness
- property InterpolationSpotweld.stiff3: float¶
Elastic bending stiffness
- property InterpolationSpotweld.stiff4: float¶
Elastic torsional stiffness
- property InterpolationSpotweld.thick: float¶
Total thickness of both sheets
- property InterpolationSpotweld.upfn: float¶
Plastic initiation displacement in normal direction
- property InterpolationSpotweld.upfs: float¶
Plastic initiation displacement in shear direction
- property InterpolationSpotweld.uprn: float¶
Plastic rupture displacement in normal direction
- property InterpolationSpotweld.uprs: float¶
Plastic rupture displacement in shear direction
Constructor¶
- classmethod InterpolationSpotweld(model, pid1, pid2, nsid)¶
Create a new
InterpolationSpotweldobject
- Parameters:
- Returns:
InterpolationSpotweld object
- Return type:
dict
Example
To create a new constrained interpolation spotweld in model m with first sheet 100, second sheet 200 and spotweld node set 100
s = Oasys.PRIMER.InterpolationSpotweld(m, 100, 200, 100)
Static methods¶
- classmethod InterpolationSpotweld.BlankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the interpolation spotwelds in the model
- Parameters:
model (Model) –
Modelthat all interpolation spotwelds will be blanked inredraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To blank all of the interpolation spotwelds in model m:
Oasys.PRIMER.InterpolationSpotweld.BlankAll(m)
- classmethod InterpolationSpotweld.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the flagged interpolation spotwelds in the model
- Parameters:
model (Model) –
Modelthat all the flagged interpolation spotwelds will be blanked inflag (Flag) – Flag set on the interpolation spotwelds that you want to blank
redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To blank all of the interpolation spotwelds in model m flagged with f:
Oasys.PRIMER.InterpolationSpotweld.BlankFlagged(m, f)
- classmethod InterpolationSpotweld.First(model)¶
Returns the first interpolation spotweld in the model
- Parameters:
model (Model) –
Modelto get first interpolation spotweld in- Returns:
InterpolationSpotweld object (or None if there are no interpolation spotwelds in the model)
- Return type:
InterpolationSpotweld
Example
To get the first interpolation spotweld in model m:
s = Oasys.PRIMER.InterpolationSpotweld.First(m)
- classmethod InterpolationSpotweld.FlagAll(model, flag)¶
Flags all of the interpolation spotwelds in the model with a defined flag
- Parameters:
model (Model) –
Modelthat all interpolation spotwelds will be flagged inflag (Flag) – Flag to set on the interpolation spotwelds
- Returns:
No return value
- Return type:
None
Example
To flag all of the interpolation spotwelds with flag f in model m:
Oasys.PRIMER.InterpolationSpotweld.FlagAll(m, f)
- classmethod InterpolationSpotweld.GetAll(model)¶
Returns a list of InterpolationSpotweld objects for all of the interpolation spotwelds in a model in PRIMER
- Parameters:
model (Model) –
Modelto get interpolation spotwelds from- Returns:
List of InterpolationSpotweld objects
- Return type:
list
Example
To make a list of InterpolationSpotweld objects for all of the interpolation spotwelds in model m
s = Oasys.PRIMER.InterpolationSpotweld.GetAll(m)
- classmethod InterpolationSpotweld.GetFlagged(model, flag)¶
Returns a list of InterpolationSpotweld objects for all of the flagged interpolation spotwelds in a model in PRIMER
- Parameters:
model (Model) –
Modelto get interpolation spotwelds fromflag (Flag) – Flag set on the interpolation spotwelds that you want to retrieve
- Returns:
List of InterpolationSpotweld objects
- Return type:
list
Example
To make a list of InterpolationSpotweld objects for all of the interpolation spotwelds in model m flagged with f
s = Oasys.PRIMER.InterpolationSpotweld.GetFlagged(m, f)
- classmethod InterpolationSpotweld.GetFromID(model, number)¶
Returns the InterpolationSpotweld object for a interpolation spotweld ID
- Parameters:
model (Model) –
Modelto find the interpolation spotweld innumber (integer) – number of the interpolation spotweld you want the InterpolationSpotweld object for
- Returns:
InterpolationSpotweld object (or None if interpolation spotweld does not exist)
- Return type:
InterpolationSpotweld
Example
To get the InterpolationSpotweld object for interpolation spotweld 100 in model m
s = Oasys.PRIMER.InterpolationSpotweld.GetFromID(m, 100)
- classmethod InterpolationSpotweld.Last(model)¶
Returns the last interpolation spotweld in the model
- Parameters:
model (Model) –
Modelto get last interpolation spotweld in- Returns:
InterpolationSpotweld object (or None if there are no interpolation spotwelds in the model)
- Return type:
InterpolationSpotweld
Example
To get the last interpolation spotweld in model m:
s = Oasys.PRIMER.InterpolationSpotweld.Last(m)
- classmethod InterpolationSpotweld.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)¶
Allows the user to pick a interpolation spotweld
- Parameters:
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Modelthen only interpolation spotwelds from that model can be picked. If the argument is aFlagthen only interpolation spotwelds that are flagged with limit can be selected. If omitted, or None, any interpolation spotwelds from any model can be selected. from any modelmodal (boolean) – Optional. If picking is modal (blocks the user from doing anything else in PRIMER until this window is dismissed). If omitted the pick will be modal
button_text (string) – Optional. By default the window with the prompt will have a button labelled ‘Cancel’ which if pressed will cancel the pick and return None. If you want to change the text on the button use this argument. If omitted ‘Cancel’ will be used
- Returns:
InterpolationSpotweld object (or None if not picked)
- Return type:
dict
Example
To pick a interpolation spotweld from model m giving the prompt ‘Pick interpolation spotweld from screen’:
s = Oasys.PRIMER.InterpolationSpotweld.Pick('Pick interpolation spotweld from screen', m)
- classmethod InterpolationSpotweld.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select interpolation spotwelds using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting interpolation spotwelds
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Modelthen only interpolation spotwelds from that model can be selected. If the argument is aFlagthen only interpolation spotwelds that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any interpolation spotwelds 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 interpolation spotwelds selected or None if menu cancelled
- Return type:
int
Example
To select interpolation spotwelds from model m, flagging those selected with flag f, giving the prompt ‘Select interpolation spotwelds’:
Oasys.PRIMER.InterpolationSpotweld.Select(f, 'Select interpolation spotwelds', m)To select interpolation spotwelds, flagging those selected with flag f but limiting selection to interpolation spotwelds flagged with flag l, giving the prompt ‘Select interpolation spotwelds’:
Oasys.PRIMER.InterpolationSpotweld.Select(f, 'Select interpolation spotwelds', l)
- classmethod InterpolationSpotweld.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged interpolation spotwelds in the model. The interpolation spotwelds will be sketched until you either call
InterpolationSpotweld.Unsketch(),InterpolationSpotweld.UnsketchFlagged(),Model.UnsketchAll(), or delete the model
- Parameters:
model (Model) –
Modelthat all the flagged interpolation spotwelds will be sketched inflag (Flag) – Flag set on the interpolation spotwelds that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the interpolation spotwelds are sketched. If omitted redraw is true. If you want to sketch flagged interpolation spotwelds several times and only redraw after the last one then use false for redraw and call
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To sketch all interpolation spotwelds flagged with flag in model m:
Oasys.PRIMER.InterpolationSpotweld.SketchFlagged(m, flag)
- classmethod InterpolationSpotweld.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of interpolation spotwelds in the model
- Parameters:
model (Model) –
Modelto get total forexists (boolean) – Optional. true if only existing interpolation spotwelds should be counted. If false or omitted referenced but undefined interpolation spotwelds will also be included in the total
- Returns:
number of interpolation spotwelds
- Return type:
int
Example
To get the total number of interpolation spotwelds in model m:
total = Oasys.PRIMER.InterpolationSpotweld.Total(m)
- classmethod InterpolationSpotweld.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the interpolation spotwelds in the model
- Parameters:
model (Model) –
Modelthat all interpolation spotwelds will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To unblank all of the interpolation spotwelds in model m:
Oasys.PRIMER.InterpolationSpotweld.UnblankAll(m)
- classmethod InterpolationSpotweld.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the flagged interpolation spotwelds in the model
- Parameters:
model (Model) –
Modelthat the flagged interpolation spotwelds will be unblanked inflag (Flag) – Flag set on the interpolation spotwelds that you want to unblank
redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To unblank all of the interpolation spotwelds in model m flagged with f:
Oasys.PRIMER.InterpolationSpotweld.UnblankFlagged(m, f)
- classmethod InterpolationSpotweld.UnflagAll(model, flag)¶
Unsets a defined flag on all of the interpolation spotwelds in the model
- Parameters:
model (Model) –
Modelthat the defined flag for all interpolation spotwelds will be unset inflag (Flag) – Flag to unset on the interpolation spotwelds
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the interpolation spotwelds in model m:
Oasys.PRIMER.InterpolationSpotweld.UnflagAll(m, f)
- classmethod InterpolationSpotweld.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all interpolation spotwelds
- Parameters:
model (Model) –
Modelthat all interpolation spotwelds will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the interpolation spotwelds are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To unsketch all interpolation spotwelds in model m:
Oasys.PRIMER.InterpolationSpotweld.UnsketchAll(m)
- classmethod InterpolationSpotweld.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged interpolation spotwelds in the model
- Parameters:
model (Model) –
Modelthat all interpolation spotwelds will be unsketched inflag (Flag) – Flag set on the interpolation spotwelds that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the interpolation spotwelds are unsketched. If omitted redraw is true. If you want to unsketch several things and only redraw after the last one then use false for redraw and call
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To unsketch all interpolation spotwelds flagged with flag in model m:
Oasys.PRIMER.InterpolationSpotweld.UnsketchAll(m, flag)
Instance methods¶
- InterpolationSpotweld.AssociateComment(comment)¶
Associates a comment with a interpolation spotweld
- Parameters:
comment (Comment) –
Commentthat will be attached to the interpolation spotweld- Returns:
No return value
- Return type:
None
Example
To associate comment c to the interpolation spotweld s:
s.AssociateComment(c)
- InterpolationSpotweld.Blank()¶
Blanks the interpolation spotweld
- Returns:
No return value
- Return type:
None
Example
To blank interpolation spotweld s:
s.Blank()
- InterpolationSpotweld.Blanked()¶
Checks if the interpolation spotweld is blanked or not
- Returns:
True if blanked, False if not
- Return type:
bool
Example
To check if interpolation spotweld s is blanked:
if s.Blanked(): do_something..
- InterpolationSpotweld.ClearFlag(flag)¶
Clears a flag on the interpolation spotweld
- Parameters:
flag (Flag) – Flag to clear on the interpolation spotweld
- Returns:
No return value
- Return type:
None
Example
To clear flag f for interpolation spotweld s:
s.ClearFlag(f)
- InterpolationSpotweld.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the interpolation spotweld. The target include of the copied interpolation spotweld 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:
InterpolationSpotweld object
- Return type:
InterpolationSpotweld
Example
To copy interpolation spotweld s into interpolation spotweld z:
z = s.Copy()
- InterpolationSpotweld.DetachComment(comment)¶
Detaches a comment from a interpolation spotweld
- Parameters:
comment (Comment) –
Commentthat will be detached from the interpolation spotweld- Returns:
No return value
- Return type:
None
Example
To detach comment c from the interpolation spotweld s:
s.DetachComment(c)
- InterpolationSpotweld.Flagged(flag)¶
Checks if the interpolation spotweld is flagged or not
- Parameters:
flag (Flag) – Flag to test on the interpolation spotweld
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if interpolation spotweld s has flag f set on it:
if s.Flagged(f): do_something..
- InterpolationSpotweld.GetComments()¶
Extracts the comments associated to a interpolation spotweld
- 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 interpolation spotweld s:
comm_list = s.GetComments()
- InterpolationSpotweld.GetParameter(prop)¶
Checks if a InterpolationSpotweld 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_namesoption to true before calling the function and then resetting it to false afterwards.. This behaviour can also temporarily be switched by using theInterpolationSpotweld.ViewParameters()method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – interpolation spotweld property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if InterpolationSpotweld property s.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if s.GetParameter(s.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if InterpolationSpotweld property s.example is a parameter by using the GetParameter method:
if s.ViewParameters().GetParameter(s.example): do_something..
- InterpolationSpotweld.Keyword()¶
Returns the keyword for this interpolation spotweld (*CONSTRAINED_INTERPOLATION_SPOTWELD). Note that a carriage return is not added. See also
InterpolationSpotweld.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for interpolation spotweld s:
key = s.Keyword()
- InterpolationSpotweld.KeywordCards()¶
Returns the keyword cards for the interpolation spotweld. Note that a carriage return is not added. See also
InterpolationSpotweld.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for interpolation spotweld s:
cards = s.KeywordCards()
- InterpolationSpotweld.Next()¶
Returns the next interpolation spotweld in the model
- Returns:
InterpolationSpotweld object (or None if there are no more interpolation spotwelds in the model)
- Return type:
InterpolationSpotweld
Example
To get the interpolation spotweld in model m after interpolation spotweld s:
s = s.Next()
- InterpolationSpotweld.Previous()¶
Returns the previous interpolation spotweld in the model
- Returns:
InterpolationSpotweld object (or None if there are no more interpolation spotwelds in the model)
- Return type:
InterpolationSpotweld
Example
To get the interpolation spotweld in model m before interpolation spotweld s:
s = s.Previous()
- InterpolationSpotweld.SetFlag(flag)¶
Sets a flag on the interpolation spotweld
- Parameters:
flag (Flag) – Flag to set on the interpolation spotweld
- Returns:
No return value
- Return type:
None
Example
To set flag f for interpolation spotweld s:
s.SetFlag(f)
- InterpolationSpotweld.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the interpolation spotweld. The interpolation spotweld will be sketched until you either call
InterpolationSpotweld.Unsketch(),InterpolationSpotweld.UnsketchAll(),Model.UnsketchAll(), or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the interpolation spotweld is sketched. If omitted redraw is true. If you want to sketch several interpolation spotwelds and only redraw after the last one then use false for redraw and call
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To sketch interpolation spotweld s:
s.Sketch()
- InterpolationSpotweld.Unblank()¶
Unblanks the interpolation spotweld
- Returns:
No return value
- Return type:
None
Example
To unblank interpolation spotweld s:
s.Unblank()
- InterpolationSpotweld.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the interpolation spotweld
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the interpolation spotweld is unsketched. If omitted redraw is true. If you want to unsketch several interpolation spotwelds and only redraw after the last one then use false for redraw and call
View.Redraw()- Returns:
No return value
- Return type:
None
Example
To unsketch interpolation spotweld s:
s.Unsketch()
- InterpolationSpotweld.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:
InterpolationSpotweld object
- Return type:
dict
Example
To check if InterpolationSpotweld property s.example is a parameter by using the
InterpolationSpotweld.GetParameter()method:if s.ViewParameters().GetParameter(s.example): do_something..
- InterpolationSpotweld.Xrefs()¶
Returns the cross references for this interpolation spotweld
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for interpolation spotweld s:
xrefs = s.Xrefs()