The FreqFRF class gives you access to *FREQUENCY_DOMAIN_FRF keyword in PRIMER. More...
The PRIMER JavaScript API provides many class constants, properties and methods. For Arup to
be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase
or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you
should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your
own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:
| Name | Description |
| FreqFRF.BLANK | FreqFRF option for *FREQUENCY_DOMAIN_FRF_BLANK. |
| FreqFRF.SUBCASE | FreqFRF option for *FREQUENCY_DOMAIN_FRF_SUBCASE. |
| Name | Type | Description |
| dampf | real | Modal damping coefficient. |
| dmpmas | real | Mass proportional damping constant in Rayleigh damping. |
| dmpstf | real | Stiffness proportional damping constant in Rayleigh damping. |
| dof1 | integer | Applicable degrees-of-freedom for excitation input (ignored if vad1 = 4). |
| dof2 | integer | Applicable degrees-of-freedom for response output. |
| exists (read only) | logical | true if *FREQUENCY_DOMAIN_FRF exists, false if referred to but not defined. |
| fmax | real | Maximum frequency for FRF output (cycles/time). |
| fmin | real | Minimum frequency for FRF output (cycles/time). |
| fnmax | real | Optional maximum natural frequency employed in FRF computation. |
| fspace | integer | Frequency spacing option for FRF output. |
| include | integer | The Include file number that the *FREQUENCY_DOMAIN_FRF is in. |
| label (read only) | integer | The label the *FREQUENCY_DOMAIN_FRF has in PRIMER. |
| lcdam | integer | Load Curve ID defining mode dependent modal damping coefficient. |
| lcfreq | integer | Load Curve ID defining the frequencies for FRF output. |
| lctyp | integer | Type of load curve defining modal damping coefficient. |
| mdmax | integer | The last mode employed in FRF computation (optional). |
| mdmin | integer | The first mode employed in FRF computation (optional). |
| model (read only) | integer | The Model number that the *FREQUENCY_DOMAIN_FRF is in. |
| n1 | integer | Node/ Node Set/ Segment Set ID for excitation input. |
| n11 | integer | Node/ Node Set/ Segment Set ID for excitation input. |
| 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 |
| 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 |
| n2 | integer | Node/ Node Set/ Segment Set ID for response output. |
| 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, |
| ncases | integer | Number of subcases. |
| nfreq | integer | Number of frequencies for FRF output. |
| option | constant | The *FREQUENCY_DOMAIN_FRF option. Can be FreqFRF.BLANK or FreqFRF.SUBCASE |
| output | integer | Output option. |
| relatv | integer | Flag for displacement, velocity and acceleration results. |
| restrt | integer | Restart option. |
| vad1 | integer | Excitation input type. |
| vad2 | integer | Response output type. |
| vid1 | integer | Vector ID (for dof1 = 0) for excitation input. |
| vid2 | integer | Vector ID (for dof2 = 0) for response direction. |
Detailed DescriptionThe FreqFRF class allows you to create, modify, edit and manipulate *FREQUENCY_DOMAIN_FRF. See the documentation below for more details. |
Constructornew FreqFRF(Model[Model], option[constant])DescriptionCreate a new FreqFRF object. |
Model that *FREQUENCY_DOMAIN_FRF will be created in.
Specify the type of *FREQUENCY_DOMAIN_FRF. Can be FreqFRF.BLANK, FreqFRF.SUBCASE.
ReturnsNo return value |
ExampleTo create a new *FREQUENCY_DOMAIN_FRF in model m for BLANK option var f = new FreqFRF(m, FreqFRF.BLANK);
|
new FreqFRF(Model[Model], n1[integer], n1typ[integer], n2[integer], n2typ[integer]) [deprecated]This function is deprecated in 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. DescriptionCreate a new FreqFRF object. |
Model that *FREQUENCY_DOMAIN_FRF will be created in.
Node/ Node Set/ Segment Set ID for excitation input.
Type of n1. Values can be FreqFRF.NODE, FreqFRF.NODE_SET or FreqFRF.SEGMENT_SET.
Node/ Node Set/ Segment Set ID for response output.
Type of n2. Values can be FreqFRF.NODE, FreqFRF.NODE_SET or FreqFRF.SEGMENT_SET.
ReturnsFreqFRF object Return typeFreqFRF |
ExampleTo create a new *FREQUENCY_DOMAIN_FRF in model m with node 10 for excitation output and node set 2 for response output var f = new FreqFRF(m, 10, FreqFRF.NODE, 2, FreqFRF.NODE_SET);
|
Details of functionsAddSubcaseData()DescriptionAllows 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(). |
No arguments
ReturnsIndex of the new subcase Return typeinteger |
ExampleTo add a new load data card in *FREQUENCY_DOMAIN_FRF f: f.AddSubcaseData();
|
AssociateComment(Comment[Comment])DescriptionAssociates a comment with a *FREQUENCY_DOMAIN_FRF. |
Comment that will be attached to the *FREQUENCY_DOMAIN_FRF
ReturnsNo return value |
ExampleTo associate comment c to the *FREQUENCY_DOMAIN_FRF f: f.AssociateComment(c);
|
Browse(modal (optional)[boolean])DescriptionStarts an edit panel in Browse mode. |
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.
Returnsno return value |
ExampleTo Browse *FREQUENCY_DOMAIN_FRF f: f.Browse();
|
ClearFlag(flag[Flag])DescriptionClears a flag on the *FREQUENCY_DOMAIN_FRF. |
Flag to clear on the *FREQUENCY_DOMAIN_FRF
ReturnsNo return value |
ExampleTo clear flag f for *FREQUENCY_DOMAIN_FRF f: f.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the *FREQUENCY_DOMAIN_FRF. The target include of the copied *FREQUENCY_DOMAIN_FRF can be set using Options.copy_target_include. |
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().
ReturnsFreqFRF object Return typeFreqFRF |
ExampleTo copy *FREQUENCY_DOMAIN_FRF f into *FREQUENCY_DOMAIN_FRF z: var z = f.Copy();
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a *FREQUENCY_DOMAIN_FRF. |
Comment that will be detached from the *FREQUENCY_DOMAIN_FRF
ReturnsNo return value |
ExampleTo detach comment c from the *FREQUENCY_DOMAIN_FRF f: f.DetachComment(c);
|
Edit(modal (optional)[boolean])DescriptionStarts an interactive editing panel. |
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.
Returnsno return value |
ExampleTo Edit *FREQUENCY_DOMAIN_FRF f: f.Edit();
|
Error(message[string], details (optional)[string])DescriptionAdds an error for *FREQUENCY_DOMAIN_FRF. For more details on checking see the Check class. |
The error message to give
An optional detailed error message
ReturnsNo return value |
ExampleTo add an error message "My custom error" for *FREQUENCY_DOMAIN_FRF f: f.Error("My custom error");
|
First(Model[Model]) [static]DescriptionReturns the first *FREQUENCY_DOMAIN_FRF in the model. |
Model to get first *FREQUENCY_DOMAIN_FRF in
ReturnsFreqFRF object (or null if there are no *FREQUENCY_DOMAIN_FRFs in the model). Return typeFreqFRF |
ExampleTo get the first *FREQUENCY_DOMAIN_FRF in model m: var f = FreqFRF.First(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the *FREQUENCY_DOMAIN_FRFs in the model with a defined flag. |
Model that all *FREQUENCY_DOMAIN_FRFs will be flagged in
Flag to set on the *FREQUENCY_DOMAIN_FRFs
ReturnsNo return value |
ExampleTo flag all of the *FREQUENCY_DOMAIN_FRFs with flag f in model m: FreqFRF.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the *FREQUENCY_DOMAIN_FRF is flagged or not. |
Flag to test on the *FREQUENCY_DOMAIN_FRF
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if *FREQUENCY_DOMAIN_FRF f has flag f set on it: if (f.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each *FREQUENCY_DOMAIN_FRF in the model. |
Model that all *FREQUENCY_DOMAIN_FRFs are in
Function to call for each *FREQUENCY_DOMAIN_FRF
An optional extra object/array/string etc that will appended to arguments when calling the function
ReturnsNo return value |
GetAll(Model[Model], property (optional)[string]) [static]DescriptionReturns an array 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 an array of FreqFRF objects is returned. If the property argument is given, that property value for each *FREQUENCY_DOMAIN_FRF is returned in the array instead of a FreqFRF object |
Model to get *FREQUENCY_DOMAIN_FRFs from
Name for property to get for all *FREQUENCY_DOMAIN_FRFs in the model
ReturnsArray of FreqFRF objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a *FREQUENCY_DOMAIN_FRF. |
No arguments
ReturnsArray of Comment objects (or null if there are no comments associated to the node). Return typeArray |
ExampleTo get the array of comments associated to the *FREQUENCY_DOMAIN_FRF f: var comm_array = f.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array 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 an array of FreqFRF objects is returned. If the property argument is given, then that property value for each *FREQUENCY_DOMAIN_FRF is returned in the array instead of a FreqFRF object |
Model to get *FREQUENCY_DOMAIN_FRFs from
Flag set on the *FREQUENCY_DOMAIN_FRFs that you want to retrieve
Name for property to get for all flagged *FREQUENCY_DOMAIN_FRFs in the model
ReturnsArray of FreqFRF objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the FreqFRF object for a *FREQUENCY_DOMAIN_FRF ID. |
Model to find the *FREQUENCY_DOMAIN_FRF in
number of the *FREQUENCY_DOMAIN_FRF you want the FreqFRF object for
ReturnsFreqFRF object (or null if *FREQUENCY_DOMAIN_FRF does not exist). Return typeFreqFRF |
ExampleTo get the FreqFRF object for *FREQUENCY_DOMAIN_FRF 100 in model m var f = FreqFRF.GetFromID(m, 100);
|
GetParameter(prop[string])DescriptionChecks 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). |
*FREQUENCY_DOMAIN_FRF property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
GetSubcaseData(index[integer])DescriptionReturns the data for a specific subcase as an array. 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. |
Index you want the subcase data for. Note that indices start at 0.
ExampleTo get the data for the 2nd subcase for *FREQUENCY_DOMAIN_FRF f: var sdata = f.GetSubcaseData(1);
|
Keyword()DescriptionReturns the keyword for this *FREQUENCY_DOMAIN_FRF Note that a carriage return is not added. See also FreqFRF.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for *FREQUENCY_DOMAIN_FRF f: var key = f.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the *FREQUENCY_DOMAIN_FRF. Note that a carriage return is not added. See also FreqFRF.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for *FREQUENCY_DOMAIN_FRF f: var cards = f.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last *FREQUENCY_DOMAIN_FRF in the model. |
Model to get last *FREQUENCY_DOMAIN_FRF in
ReturnsFreqFRF object (or null if there are no *FREQUENCY_DOMAIN_FRFs in the model). Return typeFreqFRF |
ExampleTo get the last *FREQUENCY_DOMAIN_FRF in model m: var f = FreqFRF.Last(m);
|
Next()DescriptionReturns the next *FREQUENCY_DOMAIN_FRF in the model. |
No arguments
ReturnsFreqFRF object (or null if there are no more *FREQUENCY_DOMAIN_FRFs in the model). Return typeFreqFRF |
ExampleTo get the *FREQUENCY_DOMAIN_FRF in model m after *FREQUENCY_DOMAIN_FRF f: var f = f.Next();
|
Previous()DescriptionReturns the previous *FREQUENCY_DOMAIN_FRF in the model. |
No arguments
ReturnsFreqFRF object (or null if there are no more *FREQUENCY_DOMAIN_FRFs in the model). Return typeFreqFRF |
ExampleTo get the *FREQUENCY_DOMAIN_FRF in model m before *FREQUENCY_DOMAIN_FRF f: var f = f.Previous();
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select *FREQUENCY_DOMAIN_FRFs using standard PRIMER object menus. |
Flag to use when selecting *FREQUENCY_DOMAIN_FRFs
Text to display as a prompt to the user
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 null, any *FREQUENCY_DOMAIN_FRFs can be selected. from any model.
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.
ReturnsNumber of *FREQUENCY_DOMAIN_FRFs selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the *FREQUENCY_DOMAIN_FRF. |
Flag to set on the *FREQUENCY_DOMAIN_FRF
ReturnsNo return value |
ExampleTo set flag f for *FREQUENCY_DOMAIN_FRF f: f.SetFlag(f);
|
SetSubcaseData(index[integer], title[string], vad1[integer], data[Array of data])DescriptionSet the data for a specific subcase. There can be as many subcases as needed. This method is only applicable when option is FreqFRF.SUBCASE. |
Index you want to set subcase data for. Note that indices start at 0.
A description of the current subcase (can be blank).
Value of vad1.
An array 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]
ReturnsNo return value. |
ExampleTo 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);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of *FREQUENCY_DOMAIN_FRFs in the model. |
Model to get total for
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.
Returnsnumber of *FREQUENCY_DOMAIN_FRFs Return typeNumber |
ExampleTo get the total number of *FREQUENCY_DOMAIN_FRFs in model m: var total = FreqFRF.Total(m);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the *FREQUENCY_DOMAIN_FRFs in the model. |
Model that the defined flag for all *FREQUENCY_DOMAIN_FRFs will be unset in
Flag to unset on the *FREQUENCY_DOMAIN_FRFs
ReturnsNo return value |
ExampleTo unset the flag f on all the *FREQUENCY_DOMAIN_FRFs in model m: FreqFRF.UnflagAll(m, f);
|
No arguments
ReturnsFreqFRF object. Return typeFreqFRF |
ExampleTo check if FreqFRF property f.example is a parameter by using the FreqFRF.GetParameter() method: if (f.ViewParameters().GetParameter(f.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for *FREQUENCY_DOMAIN_FRF. For more details on checking see the Check class. |
The warning message to give
An optional detailed warning message
ReturnsNo return value |
ExampleTo add a warning message "My custom warning" for *FREQUENCY_DOMAIN_FRF f: f.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this *FREQUENCY_DOMAIN_FRF. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for *FREQUENCY_DOMAIN_FRF f: var xrefs = f.Xrefs();
|
toString()DescriptionCreates a string containing the *FREQUENCY_DOMAIN_FRF data in keyword format. Note that this contains the keyword header and the keyword cards. See also FreqFRF.Keyword() and FreqFRF.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for *FREQUENCY_DOMAIN_FRF f in keyword format var str = f.toString();
|