FreqVibration class

The FreqVibration class gives you access to *FREQUENCY_DOMAIN_RANDOM_VIBRATION 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:

Class functions

Member functions

FreqVibration constants

Name Description
FreqVibration.FATIGUE FreqVibration option for *FREQUENCY_DOMAIN_RANDOM_VIBRATION_FATIGUE.
FreqVibration.VIBRATION FreqVibration option for *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

FreqVibration properties

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.
dmptyp integer Tytpe of Damping.
exists (read only) logical true if *FREQUENCY_DOMAIN_RANDOM_VIBRATION exists, false if referred to but not defined.
fnmax real The maximum natural frequency in modal superposition method (optional).
fnmin real The minimum natural frequency in modal superposition method (optional).
icoarse integer Option for PSD curve coarsening.
include integer The Include file number that the *FREQUENCY_DOMAIN_RANDOM_VIBRATION is in.
inftg integer Flag for including initial damage ratio.
ipanelu integer Number of strips in U-direction (used only for vaflag = 5,6,7).
ipanelv integer Number of strips in V-direction (used only for vaflag = 5,6,7).
label (read only) integer The label the *FREQUENCY_DOMAIN_RANDOM_VIBRATION has in PRIMER.
lcdam integer Load Curve ID defining mode dependent modal damping coefficient.
lctyp integer Type of load curve defining modal damping coefficient.
ldflag integer Type of loading curves.
ldtyp Integer Excitation load type.
mdmax integer The last mode in modal superposition method (optional).
mdmin integer The first mode in modal superposition method (optional).
method integer Method for modal response analysis.
mftg integer Method for random fatigue analysis.
model (read only) integer The Model number that the *FREQUENCY_DOMAIN_RANDOM_VIBRATION is in.
napsd integer Number of auto PSD load definition.
ncpsd integer Number of cross PSD load definition.
nftg integer Field specifying the number of S-N curves to be defined.
option constant The *FREQUENCY_DOMAIN_RANDOM_VIBRATION option. Can be FreqVibration.VIBRATION, FreqVibration.FATIGUE.
pref real Reference pressure
restrm integer Restart option.
restrt integer Restart option.
strsf real Stress scale factor to accommodate different ordinates in S-N curve (not used if nftg = -999).
strtyp integer Stress type of S-N curve in fatigue analysis.
tcoarse real Tolerance for slope change percentage for removing intermediate points from PSD curve for icoarse = 2.
temper real Temperature.
texpos real Exposure time.
umlt real Multiplier for converting g to [length unit]/[time unit]^2 (used only for UNIT = -1).
unit integer Flag for acceleration unit conversion.
vaflag integer Loading type.
vapsd integer Flag for PSD output.
varms integer Flag for RMS output.

Detailed Description

The FreqVibration class allows you to create, modify, edit and manipulate *FREQUENCY_DOMAIN_RANDOM_VIBRATION. See the documentation below for more details.

Constructor

new FreqVibration(Model[Model], option[constant])

Description

Create a new FreqVibration object.

Arguments

  • Model (Model)

    Model that *FREQUENCY_DOMAIN_RANDOM_VIBRATION will be created in.

  • option (constant)

    Specify the type of *FREQUENCY_DOMAIN_RANDOM_VIBRATION. Can be FreqVibration.VIBRATION, FreqVibration.FATIGUE.

    Returns

    FreqVibration object

    Return type

    FreqVibration

    Example

    To create a new *FREQUENCY_DOMAIN_RANDOM_VIBRATION in model m, of type FATIGUE

    var f = new FreqVibration(m, FreqVibration.FATIGUE);

    Details of functions

    AddAutoPsdLoadData()

    Description

    Allows user to add a new Auto PSD load card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    The new card has uninitialised fields and should be updated by FreqVibration.SetAutoPsdLoadData().

    Arguments

    No arguments

    Returns

    Index of the new auto PSD load

    Return type

    integer

    Example

    To add a new auto PSD load data card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.AddAutoPsdLoadData();


    AddCrossPsdLoadData()

    Description

    Allows user to add a new Cross PSD load card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    The new card has uninitialised fields and should be updated by FreqVibration.SetCrossPsdLoadData().

    Arguments

    No arguments

    Returns

    Index of the new cross PSD load

    Return type

    integer

    Example

    To add a new cross PSD load data card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.AddCrossPsdLoadData();


    AddInftgData()

    Description

    Allows user to add new Initial Damage cards in *FREQUENCY_DOMAIN_RANDOM_VIBRATION. This method is only applicable when option is FreqVibration.FATIGUE.

    The new cards have uninitialised fields and should be updated by FreqVibration.SetInftgData().

    Arguments

    No arguments

    Returns

    Index of the new initial damage card

    Return type

    integer

    Example

    To add a new initial damage card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.AddInftgData();


    AddSNCurveData()

    Description

    Allows user to add new S-N curve cards in *FREQUENCY_DOMAIN_RANDOM_VIBRATION. This method is only applicable when option is FreqVibration.FATIGUE.

    The new cards have uninitialised fields and should be updated by FreqVibration.SetSNCurveData().

    Arguments

    No arguments

    Returns

    Index of the new S-N curve card

    Return type

    integer

    Example

    To add a new S-N curve card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.AddSNCurveData();


    AssociateComment(Comment[Comment])

    Description

    Associates a comment with a *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    Arguments

  • Comment (Comment)

    Comment that will be attached to the *FREQUENCY_DOMAIN_RANDOM_VIBRATION

    Returns

    No return value

    Example

    To associate comment c to the *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.AssociateComment(c);


    Browse(modal (optional)[boolean])

    Description

    Starts an edit panel in Browse mode.

    Arguments

  • modal (optional) (boolean)

    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

    Example

    To Browse *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.Browse();


    ClearFlag(flag[Flag])

    Description

    Clears a flag on the *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    Arguments

  • flag (Flag)

    Flag to clear on the *FREQUENCY_DOMAIN_RANDOM_VIBRATION

    Returns

    No return value

    Example

    To clear flag f for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.ClearFlag(f);


    Copy(range (optional)[boolean])

    Description

    Copies the *FREQUENCY_DOMAIN_RANDOM_VIBRATION. The target include of the copied *FREQUENCY_DOMAIN_RANDOM_VIBRATION can be set using Options.copy_target_include.

    Arguments

  • range (optional) (boolean)

    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

    FreqVibration object

    Return type

    FreqVibration

    Example

    To copy *FREQUENCY_DOMAIN_RANDOM_VIBRATION f into *FREQUENCY_DOMAIN_RANDOM_VIBRATION z:

    var z = f.Copy();


    Create(Model[Model], modal (optional)[boolean]) [static]

    Description

    Starts an interactive editing panel to create a *FREQUENCY_DOMAIN_RANDOM_VIBRATION

    Arguments

  • Model (Model)

    Model that the *FREQUENCY_DOMAIN_RANDOM_VIBRATION will be created in.

  • modal (optional) (boolean)

    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

    FreqVibration object (or null if not made).

    Return type

    FreqVibration

    Example

    To start creating a *FREQUENCY_DOMAIN_RANDOM_VIBRATION in model m:

    var f = FreqVibration.Create(m);


    DetachComment(Comment[Comment])

    Description

    Detaches a comment from a *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    Arguments

  • Comment (Comment)

    Comment that will be detached from the *FREQUENCY_DOMAIN_RANDOM_VIBRATION

    Returns

    No return value

    Example

    To detach comment c from the *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.DetachComment(c);


    Edit(modal (optional)[boolean])

    Description

    Starts an interactive editing panel.

    Arguments

  • modal (optional) (boolean)

    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

    Example

    To Edit *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.Edit();


    Error(message[string], details (optional)[string])

    Description

    Adds an error for *FREQUENCY_DOMAIN_RANDOM_VIBRATION. For more details on checking see the Check class.

    Arguments

  • message (string)

    The error message to give

  • details (optional) (string)

    An optional detailed error message

    Returns

    No return value

    Example

    To add an error message "My custom error" for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.Error("My custom error");


    First(Model[Model]) [static]

    Description

    Returns the first *FREQUENCY_DOMAIN_RANDOM_VIBRATION in the model.

    Arguments

  • Model (Model)

    Model to get first *FREQUENCY_DOMAIN_RANDOM_VIBRATION in

    Returns

    FreqVibration object (or null if there are no *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model).

    Return type

    FreqVibration

    Example

    To get the first *FREQUENCY_DOMAIN_RANDOM_VIBRATION in model m:

    var f = FreqVibration.First(m);


    FlagAll(Model[Model], flag[Flag]) [static]

    Description

    Flags all of the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model with a defined flag.

    Arguments

  • Model (Model)

    Model that all *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs will be flagged in

  • flag (Flag)

    Flag to set on the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs

    Returns

    No return value

    Example

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

    FreqVibration.FlagAll(m, f);


    Flagged(flag[Flag])

    Description

    Checks if the *FREQUENCY_DOMAIN_RANDOM_VIBRATION is flagged or not.

    Arguments

  • flag (Flag)

    Flag to test on the *FREQUENCY_DOMAIN_RANDOM_VIBRATION

    Returns

    true if flagged, false if not.

    Return type

    Boolean

    Example

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

    if (f.Flagged(f) ) do_something...


    ForEach(Model[Model], func[function], extra (optional)[any]) [static]

    Description

    Calls a function for each *FREQUENCY_DOMAIN_RANDOM_VIBRATION in the model.
    Note that ForEach has been designed to make looping over *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs as fast as possible and so has some limitations.
    Firstly, a single temporary FreqVibration object is created and on each function call it is updated with the current *FREQUENCY_DOMAIN_RANDOM_VIBRATION data. This means that you should not try to store the FreqVibration object for later use (e.g. in an array) as it is temporary.
    Secondly, you cannot create new *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs inside a ForEach loop.

    Arguments

  • Model (Model)

    Model that all *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs are in

  • func (function)

    Function to call for each *FREQUENCY_DOMAIN_RANDOM_VIBRATION

  • extra (optional) (any)

    An optional extra object/array/string etc that will appended to arguments when calling the function

    Returns

    No return value

    Example

    To call function test for all of the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in model m:

    FreqVibration.ForEach(m, test);
    function test(f)
    {
    // f is FreqVibration object
    }

    To call function test for all of the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in model m with optional object:

    var data = { x:0, y:0 };
    FreqVibration.ForEach(m, test, data);
    function test(f, extra)
    {
    // f is FreqVibration object
    // extra is data
    }


    GetAll(Model[Model], property (optional)[string]) [static]

    Description

    Returns an array of FreqVibration objects or properties for all of the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in a model in PRIMER. If the optional property argument is not given then an array of FreqVibration objects is returned. If the property argument is given, that property value for each *FREQUENCY_DOMAIN_RANDOM_VIBRATION is returned in the array instead of a FreqVibration object

    Arguments

  • Model (Model)

    Model to get *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs from

  • property (optional) (string)

    Name for property to get for all *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model

    Returns

    Array of FreqVibration objects or properties

    Return type

    Array

    Example

    To make an array of FreqVibration objects for all of the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in model m:

    var a = FreqVibration.GetAll(m);

    To return an array containing the value of property 'foo' (for example 'x' for a node) for each *FREQUENCY_DOMAIN_RANDOM_VIBRATION in model m:

    var a = FreqVibration.GetAll(m, 'foo');


    GetAutoPsdLoadData(index[integer]) [static]

    Description

    Returns the Auto PSD load data for a specific Auto PSD Load definition as an array. For each Auto PSD load definition there will be 8 values. There are napsd Auto PSD load definitions.

    Arguments

  • index (integer)

    Index you want the Auto PSD load data for. Note that indices start at 0.

    Returns

    An array containing the Auto PSD load data (values: sid[integer], stype[integer], dof[integer], ldpsd[integer], ldvel[integer], ldflw[integer], ldspn[integer], cid[integer]). The array length will be 8.

    Return type

    Number

    Example

    To get the data for the 3rd Auto PSD load data for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    var apsd_data = f.GetAutoPsdLoadData(2);


    GetComments()

    Description

    Extracts the comments associated to a *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    Arguments

    No arguments

    Returns

    Array of Comment objects (or null if there are no comments associated to the node).

    Return type

    Array

    Example

    To get the array of comments associated to the *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    var comm_array = f.GetComments();


    GetCrossPsdLoadData(index[integer]) [static]

    Description

    Returns the Cross PSD load data for a specific Cross PSD Load definition as an array. For each Cross PSD load definition there will be 5 values. There are ncpsd Cross PSD load definitions.

    Arguments

  • index (integer)

    Index you want the Cross PSD load data for. Note that indices start at 0.

    Returns

    An array containing the Cross PSD load data (values: load_i[integer], load_j[integer], lctyp2[integer], ldpsd1[integer], ldpsd2[integer]). The array length will be 5.

    Return type

    Number

    Example

    To get the data for the 3rd Cross PSD load data for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    var cpsd_data = f.GetCrossPsdLoadData(2);


    GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]

    Description

    Returns an array of FreqVibration objects for all of the flagged *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in a model in PRIMER If the optional property argument is not given then an array of FreqVibration objects is returned. If the property argument is given, then that property value for each *FREQUENCY_DOMAIN_RANDOM_VIBRATION is returned in the array instead of a FreqVibration object

    Arguments

  • Model (Model)

    Model to get *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs from

  • flag (Flag)

    Flag set on the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs that you want to retrieve

  • property (optional) (string)

    Name for property to get for all flagged *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model

    Returns

    Array of FreqVibration objects or properties

    Return type

    Array

    Example

    To make an array of FreqVibration objects for all of the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in model m flagged with f:

    var f = FreqVibration.GetFlagged(m, f);

    To return an array containing the value of property 'foo' (for example 'x' for a node) for all of the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in model m flagged with f:

    var a = FreqVibration.GetFlagged(m, f, 'foo');


    GetFromID(Model[Model], number[integer]) [static]

    Description

    Returns the FreqVibration object for a *FREQUENCY_DOMAIN_RANDOM_VIBRATION ID.

    Arguments

  • Model (Model)

    Model to find the *FREQUENCY_DOMAIN_RANDOM_VIBRATION in

  • number (integer)

    number of the *FREQUENCY_DOMAIN_RANDOM_VIBRATION you want the FreqVibration object for

    Returns

    FreqVibration object (or null if *FREQUENCY_DOMAIN_RANDOM_VIBRATION does not exist).

    Return type

    FreqVibration

    Example

    To get the FreqVibration object for *FREQUENCY_DOMAIN_RANDOM_VIBRATION 100 in model m

    var f = FreqVibration.GetFromID(m, 100);


    GetInftgData(index[integer]) [static]

    Description

    Returns the path and filename of a binary database for fatigue information from a specific initial damage card. There are inftg filenames.

    This method is only applicable when option is FreqVibration.FATIGUE.

    Arguments

  • index (integer)

    Index of an initial damage card that you want the filename from. Note that indices start at 0.

    Returns

    Return value from an initial damage card (values: filename[string])

    Return type

    String

    Example

    To get the filename from the 2nd initial damage card for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    var fdata = f.GetInftgData(1);


    GetParameter(prop[string])

    Description

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

    Arguments

  • prop (string)

    *FREQUENCY_DOMAIN_RANDOM_VIBRATION property to get parameter for

    Returns

    Parameter object if property is a parameter, null if not.

    Return type

    Parameter

    Example

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

    Options.property_parameter_names = true;
    if (f.GetParameter(f.example) ) do_something...
    Options.property_parameter_names = false;

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

    if (f.ViewParameters().GetParameter(f.example) ) do_something...


    GetSNCurveData(index[integer]) [static]

    Description

    Returns the data of a specific zone for fatigue analysis as an array. For each zone there will be 8 values. There are nftg zone definitions for fatigue analysis.

    This method is only applicable when option is FreqVibration.FATIGUE.

    Arguments

  • index (integer)

    Index you want the zone data for. Note that indices start at 0.

    Returns

    An array containing the zone data (values: pid[integer], lcid[integer], ptype[integer], ltype[integer], a[real], b[real], sthres[real], snlimt[integer]).

    The array length will be 8.

    Return type

    Number

    Example

    To get the data for the 4th zone for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    var sndata = f.GetSNCurveData(3);


    Keyword()

    Description

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

    Arguments

    No arguments

    Returns

    string containing the keyword.

    Return type

    String

    Example

    To get the keyword for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    var key = f.Keyword();


    KeywordCards()

    Description

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

    Arguments

    No arguments

    Returns

    string containing the cards.

    Return type

    String

    Example

    To get the cards for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    var cards = f.KeywordCards();


    Last(Model[Model]) [static]

    Description

    Returns the last *FREQUENCY_DOMAIN_RANDOM_VIBRATION in the model.

    Arguments

  • Model (Model)

    Model to get last *FREQUENCY_DOMAIN_RANDOM_VIBRATION in

    Returns

    FreqVibration object (or null if there are no *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model).

    Return type

    FreqVibration

    Example

    To get the last *FREQUENCY_DOMAIN_RANDOM_VIBRATION in model m:

    var f = FreqVibration.Last(m);


    Next()

    Description

    Returns the next *FREQUENCY_DOMAIN_RANDOM_VIBRATION in the model.

    Arguments

    No arguments

    Returns

    FreqVibration object (or null if there are no more *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model).

    Return type

    FreqVibration

    Example

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

    var f = f.Next();


    Previous()

    Description

    Returns the previous *FREQUENCY_DOMAIN_RANDOM_VIBRATION in the model.

    Arguments

    No arguments

    Returns

    FreqVibration object (or null if there are no more *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model).

    Return type

    FreqVibration

    Example

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

    var f = f.Previous();


    RemoveAutoPsdLoadData(index[integer])

    Description

    Allows user to remove a specified Auto PSD load card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    Arguments

  • index (integer)

    Index of the auto PSD load card you want to remove. Note that indices start at 0.

    Returns

    No return value

    Example

    To remove first load card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.RemoveAutoPsdLoadData(0);


    RemoveCrossPsdLoadData(index[integer])

    Description

    Allows user to remove a specified Cross PSD load card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    Arguments

  • index (integer)

    Index of the cross PSD load card you want to remove. Note that indices start at 0.

    Returns

    No return value

    Example

    To remove third load card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.RemoveCrossPsdLoadData(2);


    RemoveInftgData(index[integer])

    Description

    Allows user to remove a specified Initial Damage card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    This method is only applicable when option is FreqVibration.FATIGUE.

    Arguments

  • index (integer)

    Index of the Initrial Damage card you want to remove. Note that indices start at 0.

    Returns

    No return value

    Example

    To remove second Initial Damage card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.RemoveInftgData(1);


    RemoveSNCurveData(index[integer])

    Description

    Allows user to remove a specified S-N curve card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    This method is only applicable when option is FreqVibration.FATIGUE.

    Arguments

  • index (integer)

    Index of the S-N curve card you want to remove. Note that indices start at 0.

    Returns

    No return value

    Example

    To remove second S-N curve card in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.RemoveSNCurveData(1);


    Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]

    Description

    Allows the user to select *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs using standard PRIMER object menus.

    Arguments

  • flag (Flag)

    Flag to use when selecting *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs

  • prompt (string)

    Text to display as a prompt to the user

  • limit (optional) (Model or Flag)

    If the argument is a Model then only *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs from that model can be selected. If the argument is a Flag then only *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs can be selected. from any model.

  • modal (optional) (boolean)

    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_RANDOM_VIBRATIONs selected or null if menu cancelled

    Return type

    Number

    Example

    To select *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs from model m, flagging those selected with flag f, giving the prompt 'Select *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs':

    FreqVibration.Select(f, 'Select *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs', m);

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

    FreqVibration.Select(f, 'Select *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs', l);


    SetAutoPsdLoadData(index[integer], data[Array of data]) [static]

    Description

    Set the data for a specific Auto PSD load card. For each Auto PSD load card there will be 8 values. There are napsd Auto PSD load cards.

    Arguments

  • index (integer)

    Index you want to set Auto PSD load data for. Note that indices start at 0.

  • data (Array of data)

    An array containing the Auto PSD load data (values: sid[integer], stype[integer], dof[integer], ldpsd[integer], ldvel[integer], ldflw[integer], ldspn[integer], cid[integer]). The array length should be 8.

    Returns

    No return value.

    Example

    To set the 3rd Auto PSD load data for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f to the values in array adata:

    f.SetAutoPsdLoadData(2, adata);


    SetCrossPsdLoadData(index[integer], data[Array of data]) [static]

    Description

    Set the data for a specific Cross PSD load card. For each Cross PSD load card there will be 5 values. There are ncpsd Cross PSD load cards.

    Arguments

  • index (integer)

    Index you want to set Cross PSD load data for. Note that indices start at 0.

  • data (Array of data)

    An array containing the Cross PSD load data (values: load_i[integer], load_j[integer], lctyp2[integer], ldpsd1[integer], ldpsd2[integer]). The array length should be 5.

    Returns

    No return value.

    Example

    To set the 4th Cross PSD load data for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f to the values in array cdata:

    f.SetCrossPsdLoadData(2, cdata);


    SetFlag(flag[Flag])

    Description

    Sets a flag on the *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    Arguments

  • flag (Flag)

    Flag to set on the *FREQUENCY_DOMAIN_RANDOM_VIBRATION

    Returns

    No return value

    Example

    To set flag f for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.SetFlag(f);


    SetInftgData(index[integer], filename[string]) [static]

    Description

    Set the filename data for an existing binary database for fatigue infromation for a specific initial damage card. There are inftg filenames.

    This method is only applicable when option is FreqVibration.FATIGUE.

    Arguments

  • index (integer)

    Index of an initial damage card that you want the filename for. Note that indices start at 0.

  • filename (string)

    Path and name of existing binary database fro fatigue information.

    Returns

    No return value.

    Example

    To set the file name for the 2nd initial damage card of *FREQUENCY_DOMAIN_RANDOM_VIBRATION f to have filename "d3ftg":

    f.SetInftgData(1, "d3ftg");


    SetSNCurveData(index[integer], data[Array of data]) [static]

    Description

    Set the data for a specific zone for fatigue analysis. For each zone there will be 8 values. There are nftg zone definitions for fatigue analysis. This method is only applicable when option is FreqVibration.FATIGUE.

    Arguments

  • index (integer)

    Index you want to set the fatigue analysis zone data for. Note that indices start at 0.

  • data (Array of data)

    An array containing the zone data (values: pid[integer], lcid[integer], ptype[integer], ltype[integer], a[float], b[float], sthres[float], snlimt[integer]). The array length will be 8.

    Returns

    No return value.

    Example

    To set the data for 4th fatigue analysis zone in *FREQUENCY_DOMAIN_RANDOM_VIBRATION f to the values in array sndata:

    f.SetSNCurveData(3, sndata);


    Total(Model[Model], exists (optional)[boolean]) [static]

    Description

    Returns the total number of *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model.

    Arguments

  • Model (Model)

    Model to get total for

  • exists (optional) (boolean)

    true if only existing *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs should be counted. If false or omitted referenced but undefined *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs will also be included in the total.

    Returns

    number of *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs

    Return type

    Number

    Example

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

    var total = FreqVibration.Total(m);


    UnflagAll(Model[Model], flag[Flag]) [static]

    Description

    Unsets a defined flag on all of the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs in the model.

    Arguments

  • Model (Model)

    Model that the defined flag for all *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs will be unset in

  • flag (Flag)

    Flag to unset on the *FREQUENCY_DOMAIN_RANDOM_VIBRATIONs

    Returns

    No return value

    Example

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

    FreqVibration.UnflagAll(m, f);


    ViewParameters()

    Description

    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.

    Arguments

    No arguments

    Returns

    FreqVibration object.

    Return type

    FreqVibration

    Example

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

    if (f.ViewParameters().GetParameter(f.example) ) do_something...


    Warning(message[string], details (optional)[string])

    Description

    Adds a warning for *FREQUENCY_DOMAIN_RANDOM_VIBRATION. For more details on checking see the Check class.

    Arguments

  • message (string)

    The warning message to give

  • details (optional) (string)

    An optional detailed warning message

    Returns

    No return value

    Example

    To add a warning message "My custom warning" for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    f.Warning("My custom warning");


    Xrefs()

    Description

    Returns the cross references for this *FREQUENCY_DOMAIN_RANDOM_VIBRATION.

    Arguments

    No arguments

    Returns

    Xrefs object.

    Return type

    Xrefs

    Example

    To get the cross references for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f:

    var xrefs = f.Xrefs();


    toString()

    Description

    Creates a string containing the *FREQUENCY_DOMAIN_RANDOM_VIBRATION data in keyword format. Note that this contains the keyword header and the keyword cards. See also FreqVibration.Keyword() and FreqVibration.KeywordCards().

    Arguments

    No arguments

    Returns

    string

    Return type

    String

    Example

    To get data for *FREQUENCY_DOMAIN_RANDOM_VIBRATION f in keyword format

    var s = f.toString();