Oasys.PRIMER.IntegrationShell class¶
Properties¶
- property IntegrationShell.esop: integer¶
Equal spacing of integration points option
- property IntegrationShell.exists(read only): boolean¶
true if ints exists, false if referred to but not defined
- property IntegrationShell.failopt: integer¶
Treatment of failure when mixing different constitutive types
- property IntegrationShell.irid: integer¶
Integration rule id
- property IntegrationShell.model(read only): integer¶
The
Model
number that the integration shell is in
- property IntegrationShell.nip: integer¶
Number of integration points
- property IntegrationShell.pid: Part¶
Optional part ID if different from the PID specified on the element card
- property IntegrationShell.s: float¶
Coordinate of integration point in range -1 to 1
- property IntegrationShell.wf: float¶
Weighting factor (thickness associated with integration point divided by actual shell thickness)
Constructor¶
- classmethod IntegrationShell(model, irid, nip, esop=Oasys.gRPC.defaultArg, failopt=Oasys.gRPC.defaultArg)¶
Create a new
IntegrationShell
object
- Parameters:
model (Model) –
Model
that ints will be created inirid (integer) – Integration_Beam ID
nip (integer) – Number of integration points
esop (integer) – Optional. Equal spacing of integration points option. If omitted esop will be 0
failopt (integer) – Optional. Treatment of failure when mixing different constitutive types. If omitted failopt will be 0
- Returns:
IntegrationShell object
- Return type:
dict
Example
To create a new ints 1000 in model m with the following specifiction: irid, nip, esop, failopt are 1000, 2, 0, 1 respectively
w = Oasys.PRIMER.IntegrationBeam(m, 1000, 2, 0, 1)
Static methods¶
- classmethod IntegrationShell.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create a ints
- Parameters:
model (Model) –
Model
that the ints 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:
IntegrationShell object (or None if not made)
- Return type:
dict
Example
To start creating an integration shell is in model m:
is = Oasys.PRIMER.IntegrationShell.Create(m)
- classmethod IntegrationShell.First(model)¶
Returns the first integration shell in the model
- Parameters:
model (Model) –
Model
to get first integration shell in- Returns:
IntegrationShell object (or None if there are no integration shells in the model)
- Return type:
IntegrationShell
Example
To get the first integration shell in model m:
is = Oasys.PRIMER.IntegrationShell.First(m)
- classmethod IntegrationShell.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the first free integration shell label in the model. Also see
IntegrationShell.LastFreeLabel()
,IntegrationShell.NextFreeLabel()
andModel.FirstFreeItemLabel()
- Parameters:
model (Model) –
Model
to get first free integration shell label inlayer (Include number) – Optional.
Include
file (0 for the main file) to search for labels in (Equivalent to First free in layer in editing panels). If omitted the whole model will be used (Equivalent to First free in editing panels)- Returns:
IntegrationShell label
- Return type:
int
Example
To get the first free integration shell label in model m:
label = Oasys.PRIMER.IntegrationShell.FirstFreeLabel(m)
- classmethod IntegrationShell.FlagAll(model, flag)¶
Flags all of the integration shells in the model with a defined flag
- Parameters:
model (Model) –
Model
that all integration shells will be flagged inflag (Flag) – Flag to set on the integration shells
- Returns:
No return value
- Return type:
None
Example
To flag all of the integration shells with flag f in model m:
Oasys.PRIMER.IntegrationShell.FlagAll(m, f)
- classmethod IntegrationShell.GetAll(model)¶
Returns a list of IntegrationShell objects for all of the integration shells in a model in PRIMER
- Parameters:
model (Model) –
Model
to get integration shells from- Returns:
List of IntegrationShell objects
- Return type:
list
Example
To make a list of IntegrationShell objects for all of the integration shells in model m
is = Oasys.PRIMER.IntegrationShell.GetAll(m)
- classmethod IntegrationShell.GetFlagged(model, flag)¶
Returns a list of IntegrationShell objects for all of the flagged integration shells in a model in PRIMER
- Parameters:
model (Model) –
Model
to get integration shells fromflag (Flag) – Flag set on the integration shells that you want to retrieve
- Returns:
List of IntegrationShell objects
- Return type:
list
Example
To make a list of IntegrationShell objects for all of the integration shells in model m flagged with f
is = Oasys.PRIMER.IntegrationShell.GetFlagged(m, f)
- classmethod IntegrationShell.GetFromID(model, number)¶
Returns the IntegrationShell object for a integration shell ID
- Parameters:
model (Model) –
Model
to find the integration shell innumber (integer) – number of the integration shell you want the IntegrationShell object for
- Returns:
IntegrationShell object (or None if integration shell does not exist)
- Return type:
IntegrationShell
Example
To get the IntegrationShell object for integration shell 100 in model m
is = Oasys.PRIMER.IntegrationShell.GetFromID(m, 100)
- classmethod IntegrationShell.Last(model)¶
Returns the last integration shell in the model
- Parameters:
model (Model) –
Model
to get last integration shell in- Returns:
IntegrationShell object (or None if there are no integration shells in the model)
- Return type:
IntegrationShell
Example
To get the last integration shell in model m:
is = Oasys.PRIMER.IntegrationShell.Last(m)
- classmethod IntegrationShell.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the last free integration shell label in the model. Also see
IntegrationShell.FirstFreeLabel()
,IntegrationShell.NextFreeLabel()
and seeModel.LastFreeItemLabel()
- Parameters:
- Returns:
IntegrationShell label
- Return type:
int
Example
To get the last free integration shell label in model m:
label = Oasys.PRIMER.IntegrationShell.LastFreeLabel(m)
- classmethod IntegrationShell.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the next free (highest+1) integration shell label in the model. Also see
IntegrationShell.FirstFreeLabel()
,IntegrationShell.LastFreeLabel()
andModel.NextFreeItemLabel()
- Parameters:
- Returns:
IntegrationShell label
- Return type:
int
Example
To get the next free integration shell label in model m:
label = Oasys.PRIMER.IntegrationShell.NextFreeLabel(m)
- classmethod IntegrationShell.RenumberAll(model, start)¶
Renumbers all of the integration shells in the model
- Parameters:
model (Model) –
Model
that all integration shells will be renumbered instart (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the integration shells in model m, from 1000000:
Oasys.PRIMER.IntegrationShell.RenumberAll(m, 1000000)
- classmethod IntegrationShell.RenumberFlagged(model, flag, start)¶
Renumbers all of the flagged integration shells in the model
- Parameters:
model (Model) –
Model
that all the flagged integration shells will be renumbered inflag (Flag) – Flag set on the integration shells that you want to renumber
start (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the integration shells in model m flagged with f, from 1000000:
Oasys.PRIMER.IntegrationShell.RenumberFlagged(m, f, 1000000)
- classmethod IntegrationShell.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select integration shells using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting integration shells
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only integration shells from that model can be selected. If the argument is aFlag
then only integration shells that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any integration shells 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 integration shells selected or None if menu cancelled
- Return type:
int
Example
To select integration shells from model m, flagging those selected with flag f, giving the prompt ‘Select integration shells’:
Oasys.PRIMER.IntegrationShell.Select(f, 'Select integration shells', m)To select integration shells, flagging those selected with flag f but limiting selection to integration shells flagged with flag l, giving the prompt ‘Select integration shells’:
Oasys.PRIMER.IntegrationShell.Select(f, 'Select integration shells', l)
- classmethod IntegrationShell.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of integration shells in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing integration shells should be counted. If false or omitted referenced but undefined integration shells will also be included in the total
- Returns:
number of integration shells
- Return type:
int
Example
To get the total number of integration shells in model m:
total = Oasys.PRIMER.IntegrationShell.Total(m)
- classmethod IntegrationShell.UnflagAll(model, flag)¶
Unsets a defined flag on all of the integration shells in the model
- Parameters:
model (Model) –
Model
that the defined flag for all integration shells will be unset inflag (Flag) – Flag to unset on the integration shells
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the integration shells in model m:
Oasys.PRIMER.IntegrationShell.UnflagAll(m, f)
Instance methods¶
- IntegrationShell.AssociateComment(comment)¶
Associates a comment with a integration shell
- Parameters:
comment (Comment) –
Comment
that will be attached to the integration shell- Returns:
No return value
- Return type:
None
Example
To associate comment c to the integration shell is:
is.AssociateComment(c)
- IntegrationShell.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 integration shell is:
is.Browse()
- IntegrationShell.ClearFlag(flag)¶
Clears a flag on the integration shell
- Parameters:
flag (Flag) – Flag to clear on the integration shell
- Returns:
No return value
- Return type:
None
Example
To clear flag f for integration shell is:
is.ClearFlag(f)
- IntegrationShell.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the integration shell. The target include of the copied integration shell 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:
IntegrationShell object
- Return type:
IntegrationShell
Example
To copy integration shell is into integration shell z:
z = is.Copy()
- IntegrationShell.DetachComment(comment)¶
Detaches a comment from a integration shell
- Parameters:
comment (Comment) –
Comment
that will be detached from the integration shell- Returns:
No return value
- Return type:
None
Example
To detach comment c from the integration shell is:
is.DetachComment(c)
- IntegrationShell.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 integration shell is:
is.Edit()
- IntegrationShell.Flagged(flag)¶
Checks if the integration shell is flagged or not
- Parameters:
flag (Flag) – Flag to test on the integration shell
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if integration shell is has flag f set on it:
if is.Flagged(f): do_something..
- IntegrationShell.GetComments()¶
Extracts the comments associated to a integration shell
- 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 integration shell is:
comm_list = is.GetComments()
- IntegrationShell.GetIntegrationPoint(index)¶
Returns the data for an integration point in *INTEGRATION_SHELL.**Note data is only available when NIP>0 and ESOP=0**
- Parameters:
index (integer) – Index you want the integration point data for. Note that indices start at 0
- Returns:
A list containing the integration point data
- Return type:
list
Example
To get the data for the 3rd integration point for integration shell:
data = is.GetIntegrationPoint(2)
- IntegrationShell.GetParameter(prop)¶
Checks if a IntegrationShell 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 theIntegrationShell.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – integration shell property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if IntegrationShell property is.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if is.GetParameter(is.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if IntegrationShell property is.example is a parameter by using the GetParameter method:
if is.ViewParameters().GetParameter(is.example): do_something..
- IntegrationShell.Keyword()¶
Returns the keyword for this ints (*INTEGRATION_SHELL). Note that a carriage return is not added. See also
IntegrationShell.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for ints n:
key = n.Keyword()
- IntegrationShell.KeywordCards()¶
Returns the keyword cards for the ints. Note that a carriage return is not added. See also
IntegrationShell.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for integration shell is:
cards = is.KeywordCards()
- IntegrationShell.Next()¶
Returns the next integration shell in the model
- Returns:
IntegrationShell object (or None if there are no more integration shells in the model)
- Return type:
IntegrationShell
Example
To get the integration shell in model m after integration shell is:
is = is.Next()
- IntegrationShell.Previous()¶
Returns the previous integration shell in the model
- Returns:
IntegrationShell object (or None if there are no more integration shells in the model)
- Return type:
IntegrationShell
Example
To get the integration shell in model m before integration shell is:
is = is.Previous()
- IntegrationShell.SetFlag(flag)¶
Sets a flag on the integration shell
- Parameters:
flag (Flag) – Flag to set on the integration shell
- Returns:
No return value
- Return type:
None
Example
To set flag f for integration shell is:
is.SetFlag(f)
- IntegrationShell.SetIntegrationPoint(index, s, wf, pid=Oasys.gRPC.defaultArg)¶
Sets the integration point data for an *INTEGRATION_SHELL
- Parameters:
index (integer) – Index you want to set the integration point data for. Note that indices start at 0
s (float) – Coordinate of integration point in range -1 to 1
wf (float) – Weighting factor, thickness associated with the integration point divided by actual shell thickness
pid (integer) – Optional. Optional part ID if different from the PID specified on the element card
- Returns:
No return value
- Return type:
None
Example
To set the 4th integration point for *INTEGRATION_SHELL is to the following specifiction: s, wf, pid are 0.1, 0.2, 1 respectively
is.SetIntegrationPoint(3, 0.1, 0.2, 1)
- IntegrationShell.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:
IntegrationShell object
- Return type:
dict
Example
To check if IntegrationShell property is.example is a parameter by using the
IntegrationShell.GetParameter()
method:if is.ViewParameters().GetParameter(is.example): do_something..
- IntegrationShell.Xrefs()¶
Returns the cross references for this integration shell
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for integration shell is:
xrefs = is.Xrefs()