Oasys.PRIMER.DampingPartStiffness class¶
Constants¶
Properties¶
- property DampingPartStiffness.coef: float¶
Rayleigh damping coefficient
- property DampingPartStiffness.exists(read only): boolean¶
true if Damping Part Stiffness exists, false if referred to but not defined
- property DampingPartStiffness.id: integer¶
Part/part set id
- property DampingPartStiffness.include: integer¶
The
Include
file number that the damping_part_stiffness is in
- property DampingPartStiffness.model(read only): integer¶
The
Model
number that the damping part stiffness is in
- property DampingPartStiffness.type: constant¶
The DampingPartStiffness type. Can be:
DampingPartStiffness.PART
orDampingPartStiffness.SET
Constructor¶
- classmethod DampingPartStiffness(model, type, id, coef=Oasys.gRPC.defaultArg)¶
Create a new
DampingPartStiffness
object for *DAMPING_PART_STIFFNESS
- Parameters:
model (Model) –
Model
that damping part stiffness will be created intype (constant) – Damping part stiffness type. Can be
DampingPartStiffness.PART
orDampingPartStiffness.SET
id (integer) – Part/part set id
coef (float) – Optional. Rayleigh damping coefficient
- Returns:
DampingPartStiffness object
- Return type:
dict
Example
To create a new damping part stiffness (of type PART) in model m with id, coef set to 11, 2.5 respectively:
ps = Oasys.PRIMER.DampingPartStiffness(m, Oasys.PRIMER.DampingPartStiffness.PART, 11, 2.5)
Static methods¶
- classmethod DampingPartStiffness.BlankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the damping part stiffnesss in the model
- Parameters:
model (Model) –
Model
that all damping part stiffnesss 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 damping part stiffnesss in model m:
Oasys.PRIMER.DampingPartStiffness.BlankAll(m)
- classmethod DampingPartStiffness.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the flagged damping part stiffnesss in the model
- Parameters:
model (Model) –
Model
that all the flagged damping part stiffnesss will be blanked inflag (Flag) – Flag set on the damping part stiffnesss 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 damping part stiffnesss in model m flagged with f:
Oasys.PRIMER.DampingPartStiffness.BlankFlagged(m, f)
- classmethod DampingPartStiffness.First(model)¶
Returns the first damping part stiffness in the model
- Parameters:
model (Model) –
Model
to get first damping part stiffness in- Returns:
DampingPartStiffness object (or None if there are no damping part stiffnesss in the model)
- Return type:
DampingPartStiffness
Example
To get the first damping part stiffness in model m:
ps = Oasys.PRIMER.DampingPartStiffness.First(m)
- classmethod DampingPartStiffness.FlagAll(model, flag)¶
Flags all of the damping part stiffnesss in the model with a defined flag
- Parameters:
model (Model) –
Model
that all damping part stiffnesss will be flagged inflag (Flag) – Flag to set on the damping part stiffnesss
- Returns:
No return value
- Return type:
None
Example
To flag all of the damping part stiffnesss with flag f in model m:
Oasys.PRIMER.DampingPartStiffness.FlagAll(m, f)
- classmethod DampingPartStiffness.GetAll(model)¶
Returns a list of DampingPartStiffness objects for all of the damping part stiffnesss in a model in PRIMER
- Parameters:
model (Model) –
Model
to get damping part stiffnesss from- Returns:
List of DampingPartStiffness objects
- Return type:
list
Example
To make a list of DampingPartStiffness objects for all of the damping part stiffnesss in model m
ps = Oasys.PRIMER.DampingPartStiffness.GetAll(m)
- classmethod DampingPartStiffness.GetFlagged(model, flag)¶
Returns a list of DampingPartStiffness objects for all of the flagged damping part stiffnesss in a model in PRIMER
- Parameters:
model (Model) –
Model
to get damping part stiffnesss fromflag (Flag) – Flag set on the damping part stiffnesss that you want to retrieve
- Returns:
List of DampingPartStiffness objects
- Return type:
list
Example
To make a list of DampingPartStiffness objects for all of the damping part stiffnesss in model m flagged with f
ps = Oasys.PRIMER.DampingPartStiffness.GetFlagged(m, f)
- classmethod DampingPartStiffness.GetFromID(model, number)¶
Returns the DampingPartStiffness object for a damping part stiffness ID
- Parameters:
model (Model) –
Model
to find the damping part stiffness innumber (integer) – number of the damping part stiffness you want the DampingPartStiffness object for
- Returns:
DampingPartStiffness object (or None if damping part stiffness does not exist)
- Return type:
DampingPartStiffness
Example
To get the DampingPartStiffness object for damping part stiffness 100 in model m
ps = Oasys.PRIMER.DampingPartStiffness.GetFromID(m, 100)
- classmethod DampingPartStiffness.Last(model)¶
Returns the last damping part stiffness in the model
- Parameters:
model (Model) –
Model
to get last damping part stiffness in- Returns:
DampingPartStiffness object (or None if there are no damping part stiffnesss in the model)
- Return type:
DampingPartStiffness
Example
To get the last damping part stiffness in model m:
ps = Oasys.PRIMER.DampingPartStiffness.Last(m)
- classmethod DampingPartStiffness.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)¶
Allows the user to pick a damping part stiffness
- Parameters:
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only damping part stiffnesss from that model can be picked. If the argument is aFlag
then only damping part stiffnesss that are flagged with limit can be selected. If omitted, or None, any damping part stiffnesss 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:
DampingPartStiffness object (or None if not picked)
- Return type:
dict
Example
To pick a damping part stiffness from model m giving the prompt ‘Pick damping part stiffness from screen’:
ps = Oasys.PRIMER.DampingPartStiffness.Pick('Pick damping part stiffness from screen', m)
- classmethod DampingPartStiffness.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select damping part stiffnesss using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting damping part stiffnesss
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only damping part stiffnesss from that model can be selected. If the argument is aFlag
then only damping part stiffnesss that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any damping part stiffnesss 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 damping part stiffnesss selected or None if menu cancelled
- Return type:
int
Example
To select damping part stiffnesss from model m, flagging those selected with flag f, giving the prompt ‘Select damping part stiffnesss’:
Oasys.PRIMER.DampingPartStiffness.Select(f, 'Select damping part stiffnesss', m)To select damping part stiffnesss, flagging those selected with flag f but limiting selection to damping part stiffnesss flagged with flag l, giving the prompt ‘Select damping part stiffnesss’:
Oasys.PRIMER.DampingPartStiffness.Select(f, 'Select damping part stiffnesss', l)
- classmethod DampingPartStiffness.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged damping part stiffnesss in the model. The damping part stiffnesss will be sketched until you either call
DampingPartStiffness.Unsketch()
,DampingPartStiffness.UnsketchFlagged()
,Model.UnsketchAll()
, or delete the model
- Parameters:
model (Model) –
Model
that all the flagged damping part stiffnesss will be sketched inflag (Flag) – Flag set on the damping part stiffnesss that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the damping part stiffnesss are sketched. If omitted redraw is true. If you want to sketch flagged damping part stiffnesss 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 damping part stiffnesss flagged with flag in model m:
Oasys.PRIMER.DampingPartStiffness.SketchFlagged(m, flag)
- classmethod DampingPartStiffness.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of damping part stiffnesss in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing damping part stiffnesss should be counted. If false or omitted referenced but undefined damping part stiffnesss will also be included in the total
- Returns:
number of damping part stiffnesss
- Return type:
int
Example
To get the total number of damping part stiffnesss in model m:
total = Oasys.PRIMER.DampingPartStiffness.Total(m)
- classmethod DampingPartStiffness.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the damping part stiffnesss in the model
- Parameters:
model (Model) –
Model
that all damping part stiffnesss 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 damping part stiffnesss in model m:
Oasys.PRIMER.DampingPartStiffness.UnblankAll(m)
- classmethod DampingPartStiffness.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the flagged damping part stiffnesss in the model
- Parameters:
model (Model) –
Model
that the flagged damping part stiffnesss will be unblanked inflag (Flag) – Flag set on the damping part stiffnesss 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 damping part stiffnesss in model m flagged with f:
Oasys.PRIMER.DampingPartStiffness.UnblankFlagged(m, f)
- classmethod DampingPartStiffness.UnflagAll(model, flag)¶
Unsets a defined flag on all of the damping part stiffnesss in the model
- Parameters:
model (Model) –
Model
that the defined flag for all damping part stiffnesss will be unset inflag (Flag) – Flag to unset on the damping part stiffnesss
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the damping part stiffnesss in model m:
Oasys.PRIMER.DampingPartStiffness.UnflagAll(m, f)
- classmethod DampingPartStiffness.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all damping part stiffnesss
- Parameters:
model (Model) –
Model
that all damping part stiffnesss will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the damping part stiffnesss 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 damping part stiffnesss in model m:
Oasys.PRIMER.DampingPartStiffness.UnsketchAll(m)
- classmethod DampingPartStiffness.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged damping part stiffnesss in the model
- Parameters:
model (Model) –
Model
that all damping part stiffnesss will be unsketched inflag (Flag) – Flag set on the damping part stiffnesss that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the damping part stiffnesss 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 damping part stiffnesss flagged with flag in model m:
Oasys.PRIMER.DampingPartStiffness.UnsketchAll(m, flag)
Instance methods¶
- DampingPartStiffness.AssociateComment(comment)¶
Associates a comment with a damping part stiffness
- Parameters:
comment (Comment) –
Comment
that will be attached to the damping part stiffness- Returns:
No return value
- Return type:
None
Example
To associate comment c to the damping part stiffness ps:
ps.AssociateComment(c)
- DampingPartStiffness.Blank()¶
Blanks the damping part stiffness
- Returns:
No return value
- Return type:
None
Example
To blank damping part stiffness ps:
ps.Blank()
- DampingPartStiffness.Blanked()¶
Checks if the damping part stiffness is blanked or not
- Returns:
True if blanked, False if not
- Return type:
bool
Example
To check if damping part stiffness ps is blanked:
if ps.Blanked(): do_something..
- DampingPartStiffness.ClearFlag(flag)¶
Clears a flag on the damping part stiffness
- Parameters:
flag (Flag) – Flag to clear on the damping part stiffness
- Returns:
No return value
- Return type:
None
Example
To clear flag f for damping part stiffness ps:
ps.ClearFlag(f)
- DampingPartStiffness.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the damping part stiffness. The target include of the copied damping part stiffness 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:
DampingPartStiffness object
- Return type:
DampingPartStiffness
Example
To copy damping part stiffness ps into damping part stiffness z:
z = ps.Copy()
- DampingPartStiffness.DetachComment(comment)¶
Detaches a comment from a damping part stiffness
- Parameters:
comment (Comment) –
Comment
that will be detached from the damping part stiffness- Returns:
No return value
- Return type:
None
Example
To detach comment c from the damping part stiffness ps:
ps.DetachComment(c)
- DampingPartStiffness.Flagged(flag)¶
Checks if the damping part stiffness is flagged or not
- Parameters:
flag (Flag) – Flag to test on the damping part stiffness
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if damping part stiffness ps has flag f set on it:
if ps.Flagged(f): do_something..
- DampingPartStiffness.GetComments()¶
Extracts the comments associated to a damping part stiffness
- 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 damping part stiffness ps:
comm_list = ps.GetComments()
- DampingPartStiffness.GetParameter(prop)¶
Checks if a DampingPartStiffness 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 theDampingPartStiffness.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – damping part stiffness property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if DampingPartStiffness property ps.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if ps.GetParameter(ps.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if DampingPartStiffness property ps.example is a parameter by using the GetParameter method:
if ps.ViewParameters().GetParameter(ps.example): do_something..
- DampingPartStiffness.Keyword()¶
Returns the keyword for this damping part stiffness (*DAMPING_PART_STIFFNESS). Note that a carriage return is not added. See also
DampingPartStiffness.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for damping part stiffness m:
key = fr.Keyword()
- DampingPartStiffness.KeywordCards()¶
Returns the keyword cards for the damping part stiffness. Note that a carriage return is not added. See also
DampingPartStiffness.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for damping part stiffness fr:
cards = fr.KeywordCards()
- DampingPartStiffness.Next()¶
Returns the next damping part stiffness in the model
- Returns:
DampingPartStiffness object (or None if there are no more damping part stiffnesss in the model)
- Return type:
DampingPartStiffness
Example
To get the damping part stiffness in model m after damping part stiffness ps:
ps = ps.Next()
- DampingPartStiffness.Previous()¶
Returns the previous damping part stiffness in the model
- Returns:
DampingPartStiffness object (or None if there are no more damping part stiffnesss in the model)
- Return type:
DampingPartStiffness
Example
To get the damping part stiffness in model m before damping part stiffness ps:
ps = ps.Previous()
- DampingPartStiffness.SetFlag(flag)¶
Sets a flag on the damping part stiffness
- Parameters:
flag (Flag) – Flag to set on the damping part stiffness
- Returns:
No return value
- Return type:
None
Example
To set flag f for damping part stiffness ps:
ps.SetFlag(f)
- DampingPartStiffness.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the damping part stiffness. The damping part stiffness will be sketched until you either call
DampingPartStiffness.Unsketch()
,DampingPartStiffness.UnsketchAll()
,Model.UnsketchAll()
, or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the damping part stiffness is sketched. If omitted redraw is true. If you want to sketch several damping part stiffnesss 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 damping part stiffness ps:
ps.Sketch()
- DampingPartStiffness.Unblank()¶
Unblanks the damping part stiffness
- Returns:
No return value
- Return type:
None
Example
To unblank damping part stiffness ps:
ps.Unblank()
- DampingPartStiffness.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the damping part stiffness
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the damping part stiffness is unsketched. If omitted redraw is true. If you want to unsketch several damping part stiffnesss 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 damping part stiffness ps:
ps.Unsketch()
- DampingPartStiffness.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:
DampingPartStiffness object
- Return type:
dict
Example
To check if DampingPartStiffness property ps.example is a parameter by using the
DampingPartStiffness.GetParameter()
method:if ps.ViewParameters().GetParameter(ps.example): do_something..
- DampingPartStiffness.Xrefs()¶
Returns the cross references for this damping part stiffness
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for damping part stiffness ps:
xrefs = ps.Xrefs()