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