Oasys.PRIMER.FreqFRF class

Constants

FreqFRF.BLANK

FreqFRF option for *FREQUENCY_DOMAIN_FRF_BLANK

FreqFRF.SUBCASE

FreqFRF option for *FREQUENCY_DOMAIN_FRF_SUBCASE

ID type for n1/ n11

FreqFRF.IGA_EDGE_UVW

Property n1typ/ n11typ value EQ.5.0: n1/ n11 is IGA edge UVW ID

FreqFRF.IGA_EDGE_UVW_SET

Property n1typ/ n11typ value EQ.6.0: n1/ n11 is IGA edge UVW Set ID

FreqFRF.IGA_FACE_XYZ

Property n1typ/ n11typ value EQ.7.0: n1/ n11 is IGA face XYZ Set ID

FreqFRF.IGA_FACE_XYZ_SET

Property n1typ/ n11typ value EQ.8.0: n1/ n11 is IGA face XYZ Set ID

ID type for n2

FreqFRF.IGA_POINT_UVW

Property n1typ/ n11typ value EQ.3.0: n2 is IGA point UVW ID

FreqFRF.IGA_POINT_UVW_SET

Property n1typ/ n11typ value EQ.4.0: n2 is IGA point UVW Set ID

FreqFRF.NODE

Property n1typ/ n2typ value EQ.0.0: n2 is Node ID (default)

FreqFRF.NODE_SET

Property n1typ/ n11typ value EQ.1.0: n2 is Node Set ID

FreqFRF.SEGMENT_SET

Property n1typ/ n11typ value EQ.2.0: n2 is Segment Set ID

Properties

property FreqFRF.dampf: float

Modal damping coefficient

property FreqFRF.dmpmas: float

Mass proportional damping constant in Rayleigh damping

property FreqFRF.dmpstf: float

Stiffness proportional damping constant in Rayleigh damping

property FreqFRF.dof1: integer

Applicable degrees-of-freedom for excitation input (ignored if vad1 = 4)

property FreqFRF.dof2: integer

Applicable degrees-of-freedom for response output

property FreqFRF.exists(read only): boolean

true if *FREQUENCY_DOMAIN_FRF exists, false if referred to but not defined

property FreqFRF.fmax: float

Maximum frequency for FRF output (cycles/time)

property FreqFRF.fmin: float

Minimum frequency for FRF output (cycles/time)

property FreqFRF.fnmax: float

Optional maximum natural frequency employed in FRF computation

property FreqFRF.fspace: integer

Frequency spacing option for FRF output

property FreqFRF.include: integer

The Include file number that the *FREQUENCY_DOMAIN_FRF is in

property FreqFRF.label(read only): integer

The label the *FREQUENCY_DOMAIN_FRF has in PRIMER

property FreqFRF.lcdam: integer

Load Curve ID defining mode dependent modal damping coefficient

property FreqFRF.lcfreq: integer

Load Curve ID defining the frequencies for FRF output

property FreqFRF.lctyp: integer

Type of load curve defining modal damping coefficient

property FreqFRF.mdmax: integer

The last mode employed in FRF computation (optional)

property FreqFRF.mdmin: integer

The first mode employed in FRF computation (optional)

property FreqFRF.model(read only): integer

The Model number that the *FREQUENCY_DOMAIN_FRF is in

property FreqFRF.n1: integer

Node/ Node Set/ Segment Set ID for excitation input

property FreqFRF.n11: integer

Node/ Node Set/ Segment Set ID for excitation input

property FreqFRF.n11typ: integer

Type of n11. Values can be FreqFRF.NODE, FreqFRF.NODE_SET, FreqFRF.SEGMENT_SET, FreqFRF.IGA_POINT_UVW, FreqFRF.IGA_POINT_UVW_SET, FreqFRF.IGA_EDGE_UVW, FreqFRF.IGA_EDGE_UVW_SET, FreqFRF.IGA_FACE_XYZ or FreqFRF.IGA_FACE_XYZ_SET

property FreqFRF.n1typ: integer

Type of n1. Values can be FreqFRF.NODE, FreqFRF.NODE_SET, FreqFRF.SEGMENT_SET. FreqFRF.IGA_POINT_UVW, FreqFRF.IGA_POINT_UVW_SET, FreqFRF.IGA_EDGE_UVW, FreqFRF.IGA_EDGE_UVW_SET, FreqFRF.IGA_FACE_XYZ or FreqFRF.IGA_FACE_XYZ_SET

property FreqFRF.n2: integer

Node/ Node Set/ Segment Set ID for response output

property FreqFRF.n2typ: integer

Type of n2. Values can be FreqFRF.NODE, FreqFRF.NODE_SET , FreqFRF.SEGMENT_SET, FreqFRF.IGA_POINT_UVW or FreqFRF.IGA_POINT_UVW_SET,

property FreqFRF.ncases: integer

Number of subcases

property FreqFRF.nfreq: integer

Number of frequencies for FRF output

property FreqFRF.option: constant

The *FREQUENCY_DOMAIN_FRF option. Can be FreqFRF.BLANK or FreqFRF.SUBCASE

property FreqFRF.output: integer

Output option

property FreqFRF.relatv: integer

Flag for displacement, velocity and acceleration results

property FreqFRF.restrt: integer

Restart option

property FreqFRF.vad1: integer

Excitation input type

property FreqFRF.vad2: integer

Response output type

property FreqFRF.vid1: integer

Vector ID (for dof1 = 0) for excitation input

property FreqFRF.vid2: integer

Vector ID (for dof2 = 0) for response direction

Constructor

classmethod FreqFRF(model, option)

Create a new FreqFRF object

Parameters:
  • model (Model) – Model that *FREQUENCY_DOMAIN_FRF will be created in

  • option (constant) – Specify the type of *FREQUENCY_DOMAIN_FRF. Can be FreqFRF.BLANK, FreqFRF.SUBCASE

Returns:

No return value

Return type:

None

Example

To create a new *FREQUENCY_DOMAIN_FRF in model m for BLANK option

f = Oasys.PRIMER.FreqFRF(m, Oasys.PRIMER.FreqFRF.BLANK)
classmethod FreqFRF(model, n1, n1typ, n2, n2typ)

Deprecated since version 22.0:
It is only provided to keep old scripts working. We strongly advise against using it in new scripts. Support may be removed in future versions.

Create a new FreqFRF object

Parameters:
Returns:

FreqFRF object

Return type:

FreqFRF

Example

To create a new *FREQUENCY_DOMAIN_FRF in model m with node 10 for excitation output and node set 2 for response output

f = Oasys.PRIMER.FreqFRF(m, 10, Oasys.PRIMER.FreqFRF.NODE, 2, Oasys.PRIMER.FreqFRF.NODE_SET)

Static methods

classmethod FreqFRF.First(model)

Returns the first *FREQUENCY_DOMAIN_FRF in the model

Parameters:

model (Model) – Model to get first *FREQUENCY_DOMAIN_FRF in

Returns:

FreqFRF object (or None if there are no *FREQUENCY_DOMAIN_FRFs in the model)

Return type:

FreqFRF

Example

To get the first *FREQUENCY_DOMAIN_FRF in model m:

f = Oasys.PRIMER.FreqFRF.First(m)
classmethod FreqFRF.FlagAll(model, flag)

Flags all of the *FREQUENCY_DOMAIN_FRFs in the model with a defined flag

Parameters:
  • model (Model) – Model that all *FREQUENCY_DOMAIN_FRFs will be flagged in

  • flag (Flag) – Flag to set on the *FREQUENCY_DOMAIN_FRFs

Returns:

No return value

Return type:

None

Example

To flag all of the *FREQUENCY_DOMAIN_FRFs with flag f in model m:

Oasys.PRIMER.FreqFRF.FlagAll(m, f)
classmethod FreqFRF.GetAll(model, property=Oasys.gRPC.defaultArg)

Returns a list of FreqFRF objects or properties for all of the *FREQUENCY_DOMAIN_FRFs in a model in PRIMER. If the optional property argument is not given then a list of FreqFRF objects is returned. If the property argument is given, that property value for each *FREQUENCY_DOMAIN_FRF is returned in the list instead of a FreqFRF object

Parameters:
  • model (Model) – Model to get *FREQUENCY_DOMAIN_FRFs from

  • property (string) – Optional. Name for property to get for all *FREQUENCY_DOMAIN_FRFs in the model

Returns:

List of FreqFRF objects or properties

Return type:

list

Example

To make a list of FreqFRF objects for all of the *FREQUENCY_DOMAIN_FRFs in model m:

a = Oasys.PRIMER.FreqFRF.GetAll(m)

To return a list containing the value of property ‘foo’ (for example ‘x’ for a node) for each *FREQUENCY_DOMAIN_FRF in model m:

a = Oasys.PRIMER.FreqFRF.GetAll(m, 'foo')
classmethod FreqFRF.GetFlagged(model, flag, property=Oasys.gRPC.defaultArg)

Returns a list of FreqFRF objects for all of the flagged *FREQUENCY_DOMAIN_FRFs in a model in PRIMER If the optional property argument is not given then a list of FreqFRF objects is returned. If the property argument is given, then that property value for each *FREQUENCY_DOMAIN_FRF is returned in the list instead of a FreqFRF object

Parameters:
  • model (Model) – Model to get *FREQUENCY_DOMAIN_FRFs from

  • flag (Flag) – Flag set on the *FREQUENCY_DOMAIN_FRFs that you want to retrieve

  • property (string) – Optional. Name for property to get for all flagged *FREQUENCY_DOMAIN_FRFs in the model

Returns:

List of FreqFRF objects or properties

Return type:

list

Example

To make a list of FreqFRF objects for all of the *FREQUENCY_DOMAIN_FRFs in model m flagged with f:

f = Oasys.PRIMER.FreqFRF.GetFlagged(m, f)

To return a list containing the value of property ‘foo’ (for example ‘x’ for a node) for all of the *FREQUENCY_DOMAIN_FRFs in model m flagged with f:

a = Oasys.PRIMER.FreqFRF.GetFlagged(m, f, 'foo')
classmethod FreqFRF.GetFromID(model, number)

Returns the FreqFRF object for a *FREQUENCY_DOMAIN_FRF ID

Parameters:
  • model (Model) – Model to find the *FREQUENCY_DOMAIN_FRF in

  • number (integer) – number of the *FREQUENCY_DOMAIN_FRF you want the FreqFRF object for

Returns:

FreqFRF object (or None if *FREQUENCY_DOMAIN_FRF does not exist)

Return type:

FreqFRF

Example

To get the FreqFRF object for *FREQUENCY_DOMAIN_FRF 100 in model m

f = Oasys.PRIMER.FreqFRF.GetFromID(m, 100)
classmethod FreqFRF.Last(model)

Returns the last *FREQUENCY_DOMAIN_FRF in the model

Parameters:

model (Model) – Model to get last *FREQUENCY_DOMAIN_FRF in

Returns:

FreqFRF object (or None if there are no *FREQUENCY_DOMAIN_FRFs in the model)

Return type:

FreqFRF

Example

To get the last *FREQUENCY_DOMAIN_FRF in model m:

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

Allows the user to select *FREQUENCY_DOMAIN_FRFs using standard PRIMER object menus

Parameters:
  • flag (Flag) – Flag to use when selecting *FREQUENCY_DOMAIN_FRFs

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

  • limit (Model or Flag) – Optional. If the argument is a Model then only *FREQUENCY_DOMAIN_FRFs from that model can be selected. If the argument is a Flag then only *FREQUENCY_DOMAIN_FRFs that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any *FREQUENCY_DOMAIN_FRFs 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 *FREQUENCY_DOMAIN_FRFs selected or None if menu cancelled

Return type:

int

Example

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

Oasys.PRIMER.FreqFRF.Select(f, 'Select \*FREQUENCY_DOMAIN_FRFs', m)

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

Oasys.PRIMER.FreqFRF.Select(f, 'Select \*FREQUENCY_DOMAIN_FRFs', l)
classmethod FreqFRF.Total(model, exists=Oasys.gRPC.defaultArg)

Returns the total number of *FREQUENCY_DOMAIN_FRFs in the model

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

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

Returns:

number of *FREQUENCY_DOMAIN_FRFs

Return type:

int

Example

To get the total number of *FREQUENCY_DOMAIN_FRFs in model m:

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

Unsets a defined flag on all of the *FREQUENCY_DOMAIN_FRFs in the model

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

  • flag (Flag) – Flag to unset on the *FREQUENCY_DOMAIN_FRFs

Returns:

No return value

Return type:

None

Example

To unset the flag f on all the *FREQUENCY_DOMAIN_FRFs in model m:

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

Instance methods

FreqFRF.AddSubcaseData()

Allows user to add new subcase cards in *FREQUENCY_DOMAIN_SSFRF. This method is only applicable when option is FreqFRF.SUBCASE. The new cards have uninitialised fields and should be updated by FreqFRF.SetSubcaseData().

Returns:

Index of the new subcase

Return type:

integer

Example

To add a new load data card in *FREQUENCY_DOMAIN_FRF f:

f.AddSubcaseData()
FreqFRF.AssociateComment(comment)

Associates a comment with a *FREQUENCY_DOMAIN_FRF

Parameters:

comment (Comment) – Comment that will be attached to the *FREQUENCY_DOMAIN_FRF

Returns:

No return value

Return type:

None

Example

To associate comment c to the *FREQUENCY_DOMAIN_FRF f:

f.AssociateComment(c)
FreqFRF.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 *FREQUENCY_DOMAIN_FRF f:

f.Browse()
FreqFRF.ClearFlag(flag)

Clears a flag on the *FREQUENCY_DOMAIN_FRF

Parameters:

flag (Flag) – Flag to clear on the *FREQUENCY_DOMAIN_FRF

Returns:

No return value

Return type:

None

Example

To clear flag f for *FREQUENCY_DOMAIN_FRF f:

f.ClearFlag(f)
FreqFRF.Copy(range=Oasys.gRPC.defaultArg)

Copies the *FREQUENCY_DOMAIN_FRF. The target include of the copied *FREQUENCY_DOMAIN_FRF 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:

FreqFRF object

Return type:

FreqFRF

Example

To copy *FREQUENCY_DOMAIN_FRF f into *FREQUENCY_DOMAIN_FRF z:

z = f.Copy()
FreqFRF.DetachComment(comment)

Detaches a comment from a *FREQUENCY_DOMAIN_FRF

Parameters:

comment (Comment) – Comment that will be detached from the *FREQUENCY_DOMAIN_FRF

Returns:

No return value

Return type:

None

Example

To detach comment c from the *FREQUENCY_DOMAIN_FRF f:

f.DetachComment(c)
FreqFRF.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 *FREQUENCY_DOMAIN_FRF f:

f.Edit()
FreqFRF.Flagged(flag)

Checks if the *FREQUENCY_DOMAIN_FRF is flagged or not

Parameters:

flag (Flag) – Flag to test on the *FREQUENCY_DOMAIN_FRF

Returns:

True if flagged, False if not

Return type:

bool

Example

To check if *FREQUENCY_DOMAIN_FRF f has flag f set on it:

if f.Flagged(f):
    do_something..
FreqFRF.GetComments()

Extracts the comments associated to a *FREQUENCY_DOMAIN_FRF

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 *FREQUENCY_DOMAIN_FRF f:

comm_list = f.GetComments()
FreqFRF.GetParameter(prop)

Checks if a FreqFRF 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 FreqFRF.ViewParameters() method and ‘method chaining’ (see the examples below)

Parameters:

prop (string) – *FREQUENCY_DOMAIN_FRF property to get parameter for

Returns:

Parameter object if property is a parameter, None if not

Return type:

Parameter

Example

To check if FreqFRF property f.example is a parameter:

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

To check if FreqFRF property f.example is a parameter by using the GetParameter method:

if f.ViewParameters().GetParameter(f.example):
    do_something..
FreqFRF.GetSubcaseData(index)

Returns the data for a specific subcase as a list. For each subcase there will be 13 values when vad1=12 else 11 values . There can be as many subcases as needed. This method is only applicable when option is FreqFRF.SUBCASE.

Parameters:

index (integer) – Index you want the subcase data for. Note that indices start at 0

Returns:

An list containing the subcase data (values: title[string], n1[integer], n1typ[integer], n1typ[integer], dof1[integer], vad1[integer], vid1[integer], n2[integer], n2typ[integer],dof2[integer], vad2[integer], vid2[integer], n11[integer], n11typ[integer]) n11 and n11typ are present only when vad1 =12

Return type:

int

Example

To get the data for the 2nd subcase for *FREQUENCY_DOMAIN_FRF f:

sdata = f.GetSubcaseData(1)
FreqFRF.Keyword()

Returns the keyword for this *FREQUENCY_DOMAIN_FRF Note that a carriage return is not added. See also FreqFRF.KeywordCards()

Returns:

string containing the keyword

Return type:

str

Example

To get the keyword for *FREQUENCY_DOMAIN_FRF f:

key = f.Keyword()
FreqFRF.KeywordCards()

Returns the keyword cards for the *FREQUENCY_DOMAIN_FRF. Note that a carriage return is not added. See also FreqFRF.Keyword()

Returns:

string containing the cards

Return type:

str

Example

To get the cards for *FREQUENCY_DOMAIN_FRF f:

cards = f.KeywordCards()
FreqFRF.Next()

Returns the next *FREQUENCY_DOMAIN_FRF in the model

Returns:

FreqFRF object (or None if there are no more *FREQUENCY_DOMAIN_FRFs in the model)

Return type:

FreqFRF

Example

To get the *FREQUENCY_DOMAIN_FRF in model m after *FREQUENCY_DOMAIN_FRF f:

f = f.Next()
FreqFRF.Previous()

Returns the previous *FREQUENCY_DOMAIN_FRF in the model

Returns:

FreqFRF object (or None if there are no more *FREQUENCY_DOMAIN_FRFs in the model)

Return type:

FreqFRF

Example

To get the *FREQUENCY_DOMAIN_FRF in model m before *FREQUENCY_DOMAIN_FRF f:

f = f.Previous()
FreqFRF.SetFlag(flag)

Sets a flag on the *FREQUENCY_DOMAIN_FRF

Parameters:

flag (Flag) – Flag to set on the *FREQUENCY_DOMAIN_FRF

Returns:

No return value

Return type:

None

Example

To set flag f for *FREQUENCY_DOMAIN_FRF f:

f.SetFlag(f)
FreqFRF.SetSubcaseData(index, title, vad1, data)

Set the data for a specific subcase. There can be as many subcases as needed. This method is only applicable when option is FreqFRF.SUBCASE.

Parameters:
  • index (integer) – Index you want to set subcase data for. Note that indices start at 0

  • title (string) – A description of the current subcase (can be blank)

  • vad1 (integer) – Value of vad1

  • data (List of data) – An list containing the subcase data (values: n1[integer], n1typ[integer], dof1[integer], vad1[integer], vid1[integer], n2[integer], n2typ[integer], dof2[integer], vad2[integer], vid2[integer]) For vad1=12 Extra 2 arguments to be given n1[integer], n11typ[integer]

Returns:

No return value

Return type:

None

Example

To set the 2nd subcase data for *FREQUENCY_DOMAIN_FRF to have title “subcase 1” and vad1 as 2:

f.SetSubcaseData(1, "subcase 1", 2, ldata)
FreqFRF.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:

FreqFRF object

Return type:

FreqFRF

Example

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

if f.ViewParameters().GetParameter(f.example):
    do_something..
FreqFRF.Xrefs()

Returns the cross references for this *FREQUENCY_DOMAIN_FRF

Returns:

Xrefs object

Return type:

Xrefs

Example

To get the cross references for *FREQUENCY_DOMAIN_FRF f:

xrefs = f.Xrefs()