The StressSolid class gives you access to define initial stress solid cards 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 |
| StressSolid.SET | Initial is *INITIAL_STRESS_SOLID_SET. |
| StressSolid.SOLID | Initial is *INITIAL_STRESS_SOLID. |
| Name | Type | Description |
| eid | integer | Solid Element ID or solid set ID |
| exists (read only) | logical | true if initial stress solid exists, false if referred to but not defined. |
| ialegp | integer | *ALE_MULTI-MATERIAL_GROUP or *ALE_STRUCTURED_MULTI-MATERIAL_GROUP id. |
| include | integer | The Include file number that the initial stress solid is in. |
| iveflg | integer | Initial volume energy flag (only used if large is TRUE). Valid values are 0, 1 and 2 only. |
| large | logical | true if large format, false otherwise. |
| model (read only) | integer | The Model number that the initial stress solid is in. |
| nhisv | integer | Number of additional history variables (only used if large is TRUE). |
| nint | integer | Number of integration points (should correspond to the solid element formulation). Valid values for hexadral solid elements are 1, 8 or 14. Valid values for tetrahedral elements are 1, 4 or 5. Valid values for pentraderal elements are 1 or 2. |
| nthhsv | integer | Number of thermal history variables per thermal integration point (only used if large is TRUE). |
| nthint | integer | Number of thermal integration points (only used if large is TRUE). |
| type | constant | The Intial stress solid type. Can be StressSolid.SOLID or StressSolid.SET. |
Detailed DescriptionThe StressSolid class allows you to create, modify, edit and manipulate *INITIAL_STRESS_SOLID cards. See the documentation below for more details. |
Constructornew StressSolid(Model[Model], type[constant], eid[integer], nint[integer], nhisv[integer], large[boolean], iveflg[integer])DescriptionCreate a new StressSolid object. |
Model that stress_solid will be created in
Specify the type of initial stress solid (Can be StressSolid.SOLID or StressSolid.SET)
Solid Element ID or solid set ID
Number of integration points (should correspond to the solid element formulation). Valid values for hexadral solid elements are 1, 8 or 14. Valid values for tetrahedral elements are 1, 4 or 5. Valid values for pentraderal elements are 1 or 2.
Number of additional history variables (only used if large is TRUE).
true if large format, false otherwise.
Initial volume energy flag (only used if large is TRUE). Valid values are 0, 1 and 2 only.
ReturnsStressSolid object Return typeStressSolid |
Details of functionsAssociateComment(Comment[Comment])DescriptionAssociates a comment with a initial stress solid. |
Comment that will be attached to the initial stress solid
ReturnsNo return value |
ExampleTo associate comment c to the initial stress solid iso: iso.AssociateComment(c);
|
ClearFlag(flag[Flag])DescriptionClears a flag on the initial stress solid. |
Flag to clear on the initial stress solid
ReturnsNo return value |
ExampleTo clear flag f for initial stress solid iso: iso.ClearFlag(f);
|
Copy(range (optional)[boolean])DescriptionCopies the initial stress solid. The target include of the copied initial stress solid 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().
ReturnsStressSolid object Return typeStressSolid |
ExampleTo copy initial stress solid iso into initial stress solid z: var z = iso.Copy();
|
DetachComment(Comment[Comment])DescriptionDetaches a comment from a initial stress solid. |
Comment that will be detached from the initial stress solid
ReturnsNo return value |
ExampleTo detach comment c from the initial stress solid iso: iso.DetachComment(c);
|
Error(message[string], details (optional)[string])DescriptionAdds an error for initial stress solid. 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 initial stress solid iso: iso.Error("My custom error");
|
First(Model[Model]) [static]DescriptionReturns the first initial stress solid in the model. |
Model to get first initial stress solid in
ReturnsStressSolid object (or null if there are no initial stress solids in the model). Return typeStressSolid |
ExampleTo get the first initial stress solid in model m: var iso = StressSolid.First(m);
|
FlagAll(Model[Model], flag[Flag]) [static]DescriptionFlags all of the initial stress solids in the model with a defined flag. |
Model that all initial stress solids will be flagged in
Flag to set on the initial stress solids
ReturnsNo return value |
ExampleTo flag all of the initial stress solids with flag f in model m: StressSolid.FlagAll(m, f);
|
Flagged(flag[Flag])DescriptionChecks if the initial stress solid is flagged or not. |
Flag to test on the initial stress solid
Returnstrue if flagged, false if not. Return typeBoolean |
ExampleTo check if initial stress solid iso has flag f set on it: if (iso.Flagged(f) ) do_something...
|
ForEach(Model[Model], func[function], extra (optional)[any]) [static]DescriptionCalls a function for each initial stress solid in the model. |
Model that all initial stress solids are in
Function to call for each initial stress solid
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 StressSolid objects or properties for all of the initial stress solids in a model in PRIMER. If the optional property argument is not given then an array of StressSolid objects is returned. If the property argument is given, that property value for each initial stress solid is returned in the array instead of a StressSolid object |
Model to get initial stress solids from
Name for property to get for all initial stress solids in the model
ReturnsArray of StressSolid objects or properties Return typeArray |
GetComments()DescriptionExtracts the comments associated to a initial stress solid. |
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 initial stress solid iso: var comm_array = iso.GetComments();
|
GetFlagged(Model[Model], flag[Flag], property (optional)[string]) [static]DescriptionReturns an array of StressSolid objects for all of the flagged initial stress solids in a model in PRIMER If the optional property argument is not given then an array of StressSolid objects is returned. If the property argument is given, then that property value for each initial stress solid is returned in the array instead of a StressSolid object |
Model to get initial stress solids from
Flag set on the initial stress solids that you want to retrieve
Name for property to get for all flagged initial stress solids in the model
ReturnsArray of StressSolid objects or properties Return typeArray |
GetFromID(Model[Model], number[integer]) [static]DescriptionReturns the StressSolid object for a initial stress solid ID. |
Model to find the initial stress solid in
number of the initial stress solid you want the StressSolid object for
ReturnsStressSolid object (or null if initial stress solid does not exist). Return typeStressSolid |
ExampleTo get the StressSolid object for initial stress solid 100 in model m var iso = StressSolid.GetFromID(m, 100);
|
GetIntegrationPoint(index[integer])DescriptionReturns the data for a specific integration point as an array. For each integration point there will be 7 values if large is FALSE. For each integration point there will be (7 + nhisv) values if large is TRUE. There are nint integration points. |
Index you want the integration point data for. Note that indices start at 0.
ReturnsAn array containing the integration point data. Return typeArray |
ExampleTo get the data for the 3rd integration point for initial stress solid iso: var data = iso.GetIntegrationPoint(2);
|
GetParameter(prop[string])DescriptionChecks if a StressSolid 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 StressSolid.ViewParameters() method and 'method chaining' (see the examples below). |
initial stress solid property to get parameter for
ReturnsParameter object if property is a parameter, null if not. Return typeParameter |
GetThermalIntegrationPoint(index[integer])DescriptionReturns the thermal data for a specific integration point as an array. For each integration point there will be nthhsv values. There are nthint integration points. |
Index you want the integration point data for. Note that indices start at 0.
ReturnsAn array containing the integration point data. Return typeArray |
ExampleTo get the data for the 3rd thermal integration point for initial stress solid iso: var data = iso.GetThermalIntegrationPoint(2);
|
Keyword()DescriptionReturns the keyword for this initial stress solid (*INITIAL_STRESS_SOLID). Note that a carriage return is not added. See also StressSolid.KeywordCards() |
No arguments
Returnsstring containing the keyword. Return typeString |
ExampleTo get the keyword for stress_solid i: var key = i.Keyword();
|
KeywordCards()DescriptionReturns the keyword cards for the initial stress solid. Note that a carriage return is not added. See also StressSolid.Keyword() |
No arguments
Returnsstring containing the cards. Return typeString |
ExampleTo get the cards for stress_solid i: var cards = i.KeywordCards();
|
Last(Model[Model]) [static]DescriptionReturns the last initial stress solid in the model. |
Model to get last initial stress solid in
ReturnsStressSolid object (or null if there are no initial stress solids in the model). Return typeStressSolid |
ExampleTo get the last initial stress solid in model m: var iso = StressSolid.Last(m);
|
Next()DescriptionReturns the next initial stress solid in the model. |
No arguments
ReturnsStressSolid object (or null if there are no more initial stress solids in the model). Return typeStressSolid |
ExampleTo get the initial stress solid in model m after initial stress solid iso: var iso = iso.Next();
|
Pick(prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean], button text (optional)[string]) [static]DescriptionAllows the user to pick a initial stress solid. |
Text to display as a prompt to the user
If the argument is a Model then only initial stress solids from that model can be picked. If the argument is a Flag then only initial stress solids that are flagged with limit can be selected. If omitted, or null, any initial stress solids from any model can be selected. from any model.
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.
By default the window with the prompt will have a button labelled 'Cancel' which if pressed will cancel the pick and return null. If you want to change the text on the button use this argument. If omitted 'Cancel' will be used.
ReturnsStressSolid object (or null if not picked) Return typeStressSolid |
ExampleTo pick a initial stress solid from model m giving the prompt 'Pick initial stress solid from screen': var iso = StressSolid.Pick('Pick initial stress solid from screen', m);
|
Previous()DescriptionReturns the previous initial stress solid in the model. |
No arguments
ReturnsStressSolid object (or null if there are no more initial stress solids in the model). Return typeStressSolid |
ExampleTo get the initial stress solid in model m before initial stress solid iso: var iso = iso.Previous();
|
Select(flag[Flag], prompt[string], limit (optional)[Model or Flag], modal (optional)[boolean]) [static]DescriptionAllows the user to select initial stress solids using standard PRIMER object menus. |
Flag to use when selecting initial stress solids
Text to display as a prompt to the user
If the argument is a Model then only initial stress solids from that model can be selected. If the argument is a Flag then only initial stress solids that are flagged with limit can be selected (limit should be different to flag). If omitted, or null, any initial stress solids 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 initial stress solids selected or null if menu cancelled Return typeNumber |
SetFlag(flag[Flag])DescriptionSets a flag on the initial stress solid. |
Flag to set on the initial stress solid
ReturnsNo return value |
ExampleTo set flag f for initial stress solid iso: iso.SetFlag(f);
|
SetIntegrationPoint(index[integer], data[Array of data])DescriptionSet the data for a specific integration point. For each integration point there will be 7 values if large is FALSE. For each integration point there will be (7 + nhisv) values if large is TRUE. There are nint integration points. |
Index you want the integration point data for. Note that indices start at 0.
Array containing the integration point data. The array length should be 7 if large is FALSE. The array length should be (7 + nhisv) if large is TRUE.
ReturnsNo return value. |
ExampleTo set the 3rd integration point data for initial stress solid iso to the values in array adata: iso.SetIntegrationPoint(2, adata);
|
SetThermalIntegrationPoint(index[integer], data[Array of data])DescriptionSet the thermal data for a specific integration point. For each integration point there will be nthhsv values. There are nthint thermal integration points. |
Index you want the thermal integration point data for. Note that indices start at 0.
Array containing the thermal integration point data. The array length should be nthhsv.
ReturnsNo return value. |
ExampleTo set the 3rd thermal integration point data for initial stress solid iso to the values in array adata: iso.SetThermalIntegrationPoint(2, adata);
|
Sketch(redraw (optional)[boolean])DescriptionSketches the initial stress solid. The initial stress solid will be sketched until you either call StressSolid.Unsketch(), StressSolid.UnsketchAll(), Model.UnsketchAll(), or delete the model |
If model should be redrawn or not after the initial stress solid is sketched. If omitted redraw is true. If you want to sketch several initial stress solids and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch initial stress solid iso: iso.Sketch();
|
SketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionSketches all of the flagged initial stress solids in the model. The initial stress solids will be sketched until you either call StressSolid.Unsketch(), StressSolid.UnsketchFlagged(), Model.UnsketchAll(), or delete the model |
Model that all the flagged initial stress solids will be sketched in
Flag set on the initial stress solids that you want to sketch
If model should be redrawn or not after the initial stress solids are sketched. If omitted redraw is true. If you want to sketch flagged initial stress solids several times and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo sketch all initial stress solids flagged with flag in model m: StressSolid.SketchFlagged(m, flag);
|
Total(Model[Model], exists (optional)[boolean]) [static]DescriptionReturns the total number of initial stress solids in the model. |
Model to get total for
true if only existing initial stress solids should be counted. If false or omitted referenced but undefined initial stress solids will also be included in the total.
Returnsnumber of initial stress solids Return typeNumber |
ExampleTo get the total number of initial stress solids in model m: var total = StressSolid.Total(m);
|
UnflagAll(Model[Model], flag[Flag]) [static]DescriptionUnsets a defined flag on all of the initial stress solids in the model. |
Model that the defined flag for all initial stress solids will be unset in
Flag to unset on the initial stress solids
ReturnsNo return value |
ExampleTo unset the flag f on all the initial stress solids in model m: StressSolid.UnflagAll(m, f);
|
Unsketch(redraw (optional)[boolean])DescriptionUnsketches the initial stress solid. |
If model should be redrawn or not after the initial stress solid is unsketched. If omitted redraw is true. If you want to unsketch several initial stress solids and only redraw after the last one then use false for redraw and call View.Redraw().
ReturnsNo return value |
ExampleTo unsketch initial stress solid iso: iso.Unsketch();
|
UnsketchAll(Model[Model], redraw (optional)[boolean]) [static]DescriptionUnsketches all initial stress solids. |
Model that all initial stress solids will be unblanked in
If model should be redrawn or not after the initial stress solids 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().
ReturnsNo return value |
ExampleTo unsketch all initial stress solids in model m: StressSolid.UnsketchAll(m);
|
UnsketchFlagged(Model[Model], flag[Flag], redraw (optional)[boolean]) [static]DescriptionUnsketches all flagged initial stress solids in the model. |
Model that all initial stress solids will be unsketched in
Flag set on the initial stress solids that you want to unsketch
If model should be redrawn or not after the initial stress solids 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().
ReturnsNo return value |
ExampleTo unsketch all initial stress solids flagged with flag in model m: StressSolid.UnsketchAll(m, flag);
|
No arguments
ReturnsStressSolid object. Return typeStressSolid |
ExampleTo check if StressSolid property iso.example is a parameter by using the StressSolid.GetParameter() method: if (iso.ViewParameters().GetParameter(iso.example) ) do_something...
|
Warning(message[string], details (optional)[string])DescriptionAdds a warning for initial stress solid. 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 initial stress solid iso: iso.Warning("My custom warning");
|
Xrefs()DescriptionReturns the cross references for this initial stress solid. |
No arguments
ReturnsXrefs object. Return typeXrefs |
ExampleTo get the cross references for initial stress solid iso: var xrefs = iso.Xrefs();
|
toString()DescriptionCreates a string containing the initial stress solid data in keyword format. Note that this contains the keyword header and the keyword cards. See also StressSolid.Keyword() and StressSolid.KeywordCards(). |
No arguments
Returnsstring Return typeString |
ExampleTo get data for stress_solid i in keyword format var s = i.toString();
|