Oasys.PRIMER.FreqSSD class¶
Constants¶
- FreqSSD.DIRECT¶
FreqSSD option for *FREQUENCY_DOMAIN_SSD_DIRECT
- FreqSSD.DIRECT_FD¶
FreqSSD option for *FREQUENCY_DOMAIN_SSD_DIRECT_FREQUENCY_DEPENDENT
- FreqSSD.ERP¶
FreqSSD option for *FREQUENCY_DOMAIN_SSD_ERP
- FreqSSD.FATIGUE¶
FreqSSD option for *FREQUENCY_DOMAIN_SSD_FATIGUE
- FreqSSD.FRF¶
FreqSSD option for *FREQUENCY_DOMAIN_SSD_FRF
- FreqSSD.SUBCASE¶
FreqSSD option for *FREQUENCY_DOMAIN_SSD_SUBCASE
Properties¶
- property FreqSSD.c: float¶
Sound speed of the fluid (for option
FreqSSD.ERP
only)
- property FreqSSD.dampf: float¶
Modal damping coefficient
- property FreqSSD.dmpflg: integer¶
Damping flag
- property FreqSSD.dmpmas: float¶
Mass proportional damping constant in Rayleigh damping
- property FreqSSD.dmpstf: float¶
Stiffness proportional damping constant in Rayleigh damping
- property FreqSSD.erpref: float¶
ERP reference value (for option
FreqSSD.ERP
only)
- property FreqSSD.erprlf: float¶
ERP radiation loss factor (for option
FreqSSD.ERP
only)
- property FreqSSD.exists(read only): boolean¶
true if *FREQUENCY_DOMAIN_SSD exists, false if referred to but not defined
- property FreqSSD.fnmax: float¶
The maximum natural frequency in modal superposition method (optional)
- property FreqSSD.fnmin: float¶
The minimum natural frequency in modal superposition method (optional)
- property FreqSSD.istress: integer¶
Stress computation flag (for option
FreqSSD.DIRECT
only)
- property FreqSSD.label(read only): integer¶
The label the *FREQUENCY_DOMAIN_SSD has in PRIMER
- property FreqSSD.lcdam: integer¶
Load Curve
ID defining mode dependent modal damping coefficient
- property FreqSSD.lcflag: integer¶
Load curve definition flag
- property FreqSSD.lcftg: integer¶
Load Curve
ID defining duration of excitation for each frequency (for optionFreqSSD.FATIGUE
only)
- property FreqSSD.lctyp: integer¶
Type of load curve defining modal damping coefficient
- property FreqSSD.mdmax: integer¶
The last mode in modal superposition method (optional)
- property FreqSSD.mdmin: integer¶
The first mode in modal superposition method (optional)
- property FreqSSD.memory: integer¶
Memory flag
- property FreqSSD.nerp: integer¶
Number of ERP panels
- property FreqSSD.notyp: integer¶
Type of NOUT
- property FreqSSD.nout: integer¶
Part
,part set, segment set, or node set
ID for response output
- property FreqSSD.nova: integer¶
Response output type
- property FreqSSD.option: constant¶
The *FREQUENCY_DOMAIN_SSD option. Can be
FreqSSD.DIRECT
,FreqSSD.DIRECT_FD
,FreqSSD.FATIGUE
,FreqSSD.FRF
,FreqSSD.ERP
orFreqSSD.SUBCASE
- property FreqSSD.radeff: integer¶
Radiation efficiency computation flag (for option
FreqSSD.ERP
only)
- property FreqSSD.relatv: integer¶
Flag for displacement, velocity and acceleration results
- property FreqSSD.restdp: integer¶
Restart option
- property FreqSSD.restmd: integer¶
Restart option
- property FreqSSD.ro: float¶
Fluid density (for option
FreqSSD.ERP
only)
- property FreqSSD.strtyp: integer¶
Stress used in fatigue analysis
Constructor¶
- classmethod FreqSSD(model, option)¶
Create a new
FreqSSD
object
- Parameters:
model (Model) –
Model
that *FREQUENCY_DOMAIN_SSD will be created inoption (constant) – Specify the type of *FREQUENCY_DOMAIN_SSD. Can be
FreqSSD.DIRECT
,FreqSSD.DIRECT_FD
,FreqSSD.FATIGUE
,FreqSSD.FRF
,FreqSSD.ERP
orFreqSSD.SUBCASE
- Returns:
FreqSSD object
- Return type:
dict
Example
To create a new *FREQUENCY_DOMAIN_SSD in model m, of type FATIGUE
f = Oasys.PRIMER.FreqSSD(m, Oasys.PRIMER.FreqSSD.FATIGUE)
Static methods¶
- classmethod FreqSSD.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create a *FREQUENCY_DOMAIN_SSD card
- Parameters:
model (Model) –
Model
that the *FREQUENCY_DOMAIN_SSD card will be created inmodal (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:
FreqSSD object (or None if not made)
- Return type:
dict
Example
To start creating a *FREQUENCY_DOMAIN_SSD card in model m:
f = Oasys.PRIMER.FreqSSD.Create(m)
- classmethod FreqSSD.First(model)¶
Returns the first *FREQUENCY_DOMAIN_SSD in the model
- Parameters:
model (Model) –
Model
to get first *FREQUENCY_DOMAIN_SSD in- Returns:
FreqSSD object (or None if there are no *FREQUENCY_DOMAIN_SSDs in the model)
- Return type:
FreqSSD
Example
To get the first *FREQUENCY_DOMAIN_SSD in model m:
f = Oasys.PRIMER.FreqSSD.First(m)
- classmethod FreqSSD.FlagAll(model, flag)¶
Flags all of the *FREQUENCY_DOMAIN_SSDs in the model with a defined flag
- Parameters:
model (Model) –
Model
that all *FREQUENCY_DOMAIN_SSDs will be flagged inflag (Flag) – Flag to set on the *FREQUENCY_DOMAIN_SSDs
- Returns:
No return value
- Return type:
None
Example
To flag all of the *FREQUENCY_DOMAIN_SSDs with flag f in model m:
Oasys.PRIMER.FreqSSD.FlagAll(m, f)
- classmethod FreqSSD.GetAll(model)¶
Returns a list of FreqSSD objects for all of the *FREQUENCY_DOMAIN_SSDs in a model in PRIMER
- Parameters:
model (Model) –
Model
to get *FREQUENCY_DOMAIN_SSDs from- Returns:
List of FreqSSD objects
- Return type:
list
Example
To make a list of FreqSSD objects for all of the *FREQUENCY_DOMAIN_SSDs in model m
f = Oasys.PRIMER.FreqSSD.GetAll(m)
- classmethod FreqSSD.GetFlagged(model, flag)¶
Returns a list of FreqSSD objects for all of the flagged *FREQUENCY_DOMAIN_SSDs in a model in PRIMER
- Parameters:
model (Model) –
Model
to get *FREQUENCY_DOMAIN_SSDs fromflag (Flag) – Flag set on the *FREQUENCY_DOMAIN_SSDs that you want to retrieve
- Returns:
List of FreqSSD objects
- Return type:
list
Example
To make a list of FreqSSD objects for all of the *FREQUENCY_DOMAIN_SSDs in model m flagged with f
f = Oasys.PRIMER.FreqSSD.GetFlagged(m, f)
- classmethod FreqSSD.GetFromID(model, number)¶
Returns the FreqSSD object for a *FREQUENCY_DOMAIN_SSD ID
- Parameters:
model (Model) –
Model
to find the *FREQUENCY_DOMAIN_SSD innumber (integer) – number of the *FREQUENCY_DOMAIN_SSD you want the FreqSSD object for
- Returns:
FreqSSD object (or None if *FREQUENCY_DOMAIN_SSD does not exist)
- Return type:
FreqSSD
Example
To get the FreqSSD object for *FREQUENCY_DOMAIN_SSD 100 in model m
f = Oasys.PRIMER.FreqSSD.GetFromID(m, 100)
- classmethod FreqSSD.Last(model)¶
Returns the last *FREQUENCY_DOMAIN_SSD in the model
- Parameters:
model (Model) –
Model
to get last *FREQUENCY_DOMAIN_SSD in- Returns:
FreqSSD object (or None if there are no *FREQUENCY_DOMAIN_SSDs in the model)
- Return type:
FreqSSD
Example
To get the last *FREQUENCY_DOMAIN_SSD in model m:
f = Oasys.PRIMER.FreqSSD.Last(m)
- classmethod FreqSSD.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select *FREQUENCY_DOMAIN_SSDs using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting *FREQUENCY_DOMAIN_SSDs
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_SSDs from that model can be selected. If the argument is aFlag
then only *FREQUENCY_DOMAIN_SSDs that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any *FREQUENCY_DOMAIN_SSDs 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 *FREQUENCY_DOMAIN_SSDs selected or None if menu cancelled
- Return type:
int
Example
To select *FREQUENCY_DOMAIN_SSDs from model m, flagging those selected with flag f, giving the prompt ‘Select *FREQUENCY_DOMAIN_SSDs’:
Oasys.PRIMER.FreqSSD.Select(f, 'Select \*FREQUENCY_DOMAIN_SSDs', m)To select *FREQUENCY_DOMAIN_SSDs, flagging those selected with flag f but limiting selection to *FREQUENCY_DOMAIN_SSDs flagged with flag l, giving the prompt ‘Select *FREQUENCY_DOMAIN_SSDs’:
Oasys.PRIMER.FreqSSD.Select(f, 'Select \*FREQUENCY_DOMAIN_SSDs', l)
- classmethod FreqSSD.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of *FREQUENCY_DOMAIN_SSDs in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing *FREQUENCY_DOMAIN_SSDs should be counted. If false or omitted referenced but undefined *FREQUENCY_DOMAIN_SSDs will also be included in the total
- Returns:
number of *FREQUENCY_DOMAIN_SSDs
- Return type:
int
Example
To get the total number of *FREQUENCY_DOMAIN_SSDs in model m:
total = Oasys.PRIMER.FreqSSD.Total(m)
- classmethod FreqSSD.UnflagAll(model, flag)¶
Unsets a defined flag on all of the *FREQUENCY_DOMAIN_SSDs in the model
- Parameters:
model (Model) –
Model
that the defined flag for all *FREQUENCY_DOMAIN_SSDs will be unset inflag (Flag) – Flag to unset on the *FREQUENCY_DOMAIN_SSDs
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the *FREQUENCY_DOMAIN_SSDs in model m:
Oasys.PRIMER.FreqSSD.UnflagAll(m, f)
Instance methods¶
- FreqSSD.AddLoadData()¶
Allows user to add a new load card in *FREQUENCY_DOMAIN_SSD. This method is only applicable when option is not
FreqSSD.SUBCASE
. The new card has uninitialised fields and should be updated byFreqSSD.SetLoadData()
.
- Returns:
Index of the new load
- Return type:
integer
Example
To add a new load data card in *FREQUENCY_DOMAIN_SSD f:
f.AddLoadData()
- FreqSSD.AddSubcaseData()¶
Allows user to add new subcase cards in *FREQUENCY_DOMAIN_SSD. This method is only applicable when option is
FreqSSD.SUBCASE
. The new cards have uninitialised fields and should be updated byFreqSSD.SetSubcaseData()
.
- Returns:
Index of the new subcase
- Return type:
integer
Example
To add a new load data card in *FREQUENCY_DOMAIN_SSD f:
f.AddSubcaseData()
- FreqSSD.AssociateComment(comment)¶
Associates a comment with a *FREQUENCY_DOMAIN_SSD
- Parameters:
comment (Comment) –
Comment
that will be attached to the *FREQUENCY_DOMAIN_SSD- Returns:
No return value
- Return type:
None
Example
To associate comment c to the *FREQUENCY_DOMAIN_SSD f:
f.AssociateComment(c)
- FreqSSD.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_SSD f:
f.Browse()
- FreqSSD.ClearFlag(flag)¶
Clears a flag on the *FREQUENCY_DOMAIN_SSD
- Parameters:
flag (Flag) – Flag to clear on the *FREQUENCY_DOMAIN_SSD
- Returns:
No return value
- Return type:
None
Example
To clear flag f for *FREQUENCY_DOMAIN_SSD f:
f.ClearFlag(f)
- FreqSSD.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the *FREQUENCY_DOMAIN_SSD. The target include of the copied *FREQUENCY_DOMAIN_SSD 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:
FreqSSD object
- Return type:
FreqSSD
Example
To copy *FREQUENCY_DOMAIN_SSD f into *FREQUENCY_DOMAIN_SSD z:
z = f.Copy()
- FreqSSD.DetachComment(comment)¶
Detaches a comment from a *FREQUENCY_DOMAIN_SSD
- Parameters:
comment (Comment) –
Comment
that will be detached from the *FREQUENCY_DOMAIN_SSD- Returns:
No return value
- Return type:
None
Example
To detach comment c from the *FREQUENCY_DOMAIN_SSD f:
f.DetachComment(c)
- FreqSSD.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_SSD f:
f.Edit()
- FreqSSD.Flagged(flag)¶
Checks if the *FREQUENCY_DOMAIN_SSD is flagged or not
- Parameters:
flag (Flag) – Flag to test on the *FREQUENCY_DOMAIN_SSD
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if *FREQUENCY_DOMAIN_SSD f has flag f set on it:
if f.Flagged(f): do_something..
- FreqSSD.GetComments()¶
Extracts the comments associated to a *FREQUENCY_DOMAIN_SSD
- 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_SSD f:
comm_list = f.GetComments()
- FreqSSD.GetErpData(index)¶
Returns the ERP data for a specific ERP part as a list. For each ERP part there will be 2 values. There are
nerp
ERP parts. This method is only applicable when option isFreqSSD.ERP
.
- Parameters:
index (integer) – Index you want the ERP data for. Note that indices start at 0
- Returns:
A list containing the ERP data (values: pid[integer], ptyp[integer]). The list length will be 2
- Return type:
list
Example
To get the data for the 3rd ERP part for *FREQUENCY_DOMAIN_SSD f:
edata = f.GetErpData(2)
- FreqSSD.GetLoadData(index)¶
Returns the data for a specific excitation load as a list. For each load there will be 8 values. There can be as many loads as needed. This method is only applicable when option is not
FreqSSD.SUBCASE
.
- Parameters:
index (integer) – Index you want the load data for. Note that indices start at 0
- Returns:
An list containing the load data (values: nid[integer], ntyp[integer], dof[integer], vad[integer], lc1[integer], lc2[integer], sf[real], vid[integer]). The array length will be 8.
- Return type:
int
Example
To get the data for the 4th load for *FREQUENCY_DOMAIN_SSD f:
ldata = f.GetLoadData(3)
- FreqSSD.GetParameter(prop)¶
Checks if a FreqSSD 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 theFreqSSD.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – *FREQUENCY_DOMAIN_SSD property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if FreqSSD 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 = FalseTo check if FreqSSD property f.example is a parameter by using the GetParameter method:
if f.ViewParameters().GetParameter(f.example): do_something..
- FreqSSD.GetSubcaseData(index)¶
Returns the data for a specific subcase as a list. For each subcase there will be 3 + 8 x nload values. There can be as many subcases as needed. This method is only applicable when option is
FreqSSD.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: caseid[string], title[string], nload[integer], nid[integer], ntyp[integer], dof[integer], vad[integer], lc1[integer], lc2[integer], sf[real], vid[integer], …) Where values nid to vid are repeated nload times in the array. The array length will be 3 + 8 x nload.
- Return type:
int
Example
To get the data for the 2nd subcase for *FREQUENCY_DOMAIN_SSD f:
sdata = f.GetSubcaseData(1)
- FreqSSD.Keyword()¶
Returns the keyword for this *FREQUENCY_DOMAIN_SSD. Note that a carriage return is not added. See also
FreqSSD.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for *FREQUENCY_DOMAIN_SSD f:
key = f.Keyword()
- FreqSSD.KeywordCards()¶
Returns the keyword cards for the *FREQUENCY_DOMAIN_SSD. Note that a carriage return is not added. See also
FreqSSD.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for *FREQUENCY_DOMAIN_SSD f:
cards = f.KeywordCards()
- FreqSSD.Next()¶
Returns the next *FREQUENCY_DOMAIN_SSD in the model
- Returns:
FreqSSD object (or None if there are no more *FREQUENCY_DOMAIN_SSDs in the model)
- Return type:
FreqSSD
Example
To get the *FREQUENCY_DOMAIN_SSD in model m after *FREQUENCY_DOMAIN_SSD f:
f = f.Next()
- FreqSSD.Previous()¶
Returns the previous *FREQUENCY_DOMAIN_SSD in the model
- Returns:
FreqSSD object (or None if there are no more *FREQUENCY_DOMAIN_SSDs in the model)
- Return type:
FreqSSD
Example
To get the *FREQUENCY_DOMAIN_SSD in model m before *FREQUENCY_DOMAIN_SSD f:
f = f.Previous()
- FreqSSD.RemoveLoadData(index)¶
Allows user to remove a specified load card in *FREQUENCY_DOMAIN_SSD. This method is only applicable when option is not
FreqSSD.SUBCASE
.
- Parameters:
index (integer) – Index of the load card you want to remove. Note that indices start at 0
- Returns:
No return value
- Return type:
None
Example
To remove first load card in *FREQUENCY_DOMAIN_SSD f:
f.RemoveLoadData(0)
- FreqSSD.RemoveSubcaseData(index)¶
Allows user to remove cards for a specified subcase in *FREQUENCY_DOMAIN_SSD. This method is only applicable when option is
FreqSSD.SUBCASE
.
- Parameters:
index (integer) – Index of the subcase you want to remove cards for. Note that indices start at 0
- Returns:
No return value
- Return type:
None
Example
To remove cards corresponding to the second subcase in *FREQUENCY_DOMAIN_SSD f:
f.RemoveSubcaseData(1)
- FreqSSD.SetErpData(index, data)¶
Set the data for a specific ERP part. For each ERP part there will be 2 values. There are
nerp
ERP parts. This method is only applicable when option isFreqSSD.ERP
.
- Parameters:
index (integer) – Index you want to set ERP data for. Note that indices start at 0
data (List of data) – An list containing the ERP data (values: pid[integer], ptyp[integer]). The array length should be 2
- Returns:
No return value
- Return type:
None
Example
To set the 3rd ERP part data for *FREQUENCY_DOMAIN_SSD f to the values in list edata:
f.SetErpData(2, edata)
- FreqSSD.SetFlag(flag)¶
Sets a flag on the *FREQUENCY_DOMAIN_SSD
- Parameters:
flag (Flag) – Flag to set on the *FREQUENCY_DOMAIN_SSD
- Returns:
No return value
- Return type:
None
Example
To set flag f for *FREQUENCY_DOMAIN_SSD f:
f.SetFlag(f)
- FreqSSD.SetLoadData(index, data)¶
Set the data for a specific excitation load. For each load there will be 8 values. There can be as many loads as needed. This method is only applicable when option is not
FreqSSD.SUBCASE
.
- Parameters:
index (integer) – Index you want to set load data for. Note that indices start at 0
data (List of data) – An list containing the load data (values: nid[integer], ntyp[integer], dof[integer], vad[integer], lc1[integer], lc2[integer], sf[real], vid[integer]). The array length should be 8.
- Returns:
No return value
- Return type:
None
Example
To set the 4th load data for *FREQUENCY_DOMAIN_SSD f to the values in list ldata:
f.SetLoadData(3, ldata)
- FreqSSD.SetSubcaseData(index, caseid, title, nload, data)¶
Set the data for a specific subcase. For each subcase, data will have 8 x nload values. There can be as many subcases as needed. This method is only applicable when option is
FreqSSD.SUBCASE
.
- Parameters:
index (integer) – Index you want to set subcase data for. Note that indices start at 0
caseid (string) – Identification string to be used as the case ID (must include at least one letter)
title (string) – A description of the current loading case (can be blank)
nload (integer) – Number of loads for this loading case
data (List of data) – An list containing the subcase load data (values: nid[integer], ntyp[integer], dof[integer], vad[integer], lc1[integer], lc2[integer], sf[real], vid[integer], …) Where values nid to vid are repeated nload times in the array. The array length should be 8 x nload.
- Returns:
No return value
- Return type:
None
Example
To set the 2nd subcase data for *FREQUENCY_DOMAIN_SSD f to have caseid “ID2”, no title, 2 load cards and load data of ldata:
f.SetSubcaseData(1, "ID2", "", 2, ldata)
- FreqSSD.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:
FreqSSD object
- Return type:
dict
Example
To check if FreqSSD property f.example is a parameter by using the
FreqSSD.GetParameter()
method:if f.ViewParameters().GetParameter(f.example): do_something..
- FreqSSD.Xrefs()¶
Returns the cross references for this *FREQUENCY_DOMAIN_SSD
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for *FREQUENCY_DOMAIN_SSD f:
xrefs = f.Xrefs()