Oasys.PRIMER.Section class¶
Constants¶
- Section.ALE1D¶
Section ale1d type
- Section.ALE2D¶
Section ale2d type
- Section.BEAM¶
Section beam type
- Section.DISCRETE¶
Section discrete type
- Section.POINT_SOURCE¶
Section point source type
- Section.SEATBELT¶
Section seatbelt type
- Section.SHELL¶
Section shell type
- Section.SOLID¶
Section solid type
- Section.SPH¶
Section sph type
- Section.TSHELL¶
Section thick shell type
Properties¶
- property Section.aafac: float¶
ALE advection factor(SHELL, SOLID)
- property Section.aet: integer¶
Ambient element type (ALE1D, ALE2D, SOLID)
- property Section.afac: float¶
Smoothing weight factor - Simple average (SHELL, SOLID)
- property Section.ale: boolean¶
If _ALE option is set. Can be true or false (SHELL, SOLID)
- property Section.aleform: integer¶
ALE formulation (ALE1D, ALE2D)
- property Section.baselm: integer¶
Base element type for XFEM (SHELL)
- property Section.bfac: float¶
Smoothing weight factor - Volume weighting (SHELL, SOLID)
- property Section.cfac: float¶
Smoothing weight factor - Isoparametric (SHELL, SOLID)
- property Section.cmid: integer¶
Cohesive material (SHELL, SOLID)
- property Section.cohthk: float¶
Cohesive thickness (SOLID)
- property Section.colour: Colour¶
The colour of the section
- property Section.dfac: float¶
Smoothing weight factor - Equipotential (SHELL, SOLID)
- property Section.domint: integer¶
Domain integration in XFEM (SHELL)
- property Section.dr: float¶
PERI normalized horizon size (SOLID)
- property Section.dx: float¶
Normalized dilation parameter of kernel function in X (SHELL, SOLID)
- property Section.dy: float¶
Normalized dilation parameter of kernel function in Y (SHELL, SOLID)
- property Section.dz: float¶
Normalized dilation parameter of kernel function in Z (SOLID)
- property Section.efac: float¶
Smoothing weight factor - Equilibrium (SHELL)
- property Section.efg: boolean¶
If _EFG option is set. Can be true or false (SHELL, SOLID)
- property Section.elform: integer¶
Element formulation (ALE1D, ALE2D, BEAM, SHELL, SOLID, TSHELL)
- property Section.end: float¶
End time for smoothing (SHELL, SOLID)
- property Section.exists(read only): boolean¶
true if section exists, false if referred to but not defined
- property Section.failcr: integer¶
Different failure criteria (SHELL)
- property Section.fs: float¶
SPG Failure strain if IDAM = 1 (SOLID)
- property Section.icomp: integer¶
Composite flag (SHELL, TSHELL)
- property Section.idam: integer¶
SPG Option of damage mechanism (SOLID)
- property Section.idila: integer¶
Normalized dilation parameter definition (SOLID)
- property Section.idim: integer¶
Domain integration method (SOLID)
- property Section.iebt: integer¶
Essential boundary condition treatment (SOLID)
- property Section.ihgf: integer¶
Flag for using hourglass stabilization (SHELL, SOLID)
- property Section.iloc: integer¶
Coordinate system option (SHELL)
- property Section.ispline: integer¶
EFG kernel function definition (SHELL, SOLID)
- property Section.itaj: integer¶
Flag for setting up finite element matrices (SHELL, SOLID)
- property Section.itb: integer¶
SPG Stabilization flag (SOLID)
- property Section.ithelfm: integer¶
THERMAL shell formulation (SHELL)
- property Section.iunf: integer¶
Flag for using nodal fibre vectors (SHELL)
- property Section.kernel: integer¶
SPG kernel type approximation (SOLID)
- property Section.label: integer or string¶
Section
ID (all types) or character label. Also see thesecid
property which is an alternative name for this
- property Section.lmc: integer¶
Number of property parameters (SHELL, SOLID)
- property Section.lprint: integer¶
Debug printout option (SHELL)
- property Section.lscale: float¶
SPG length scale for displacement regularisation (SOLID)
- property Section.misc: boolean¶
If _MISC option is set. Can be true or false (SHELL, SOLID)
- property Section.nhsv: integer¶
Number of history variables (SHELL, SOLID)
- property Section.nip: integer¶
Number of integration points (SHELL, SOLID, TSHELL)
- property Section.nipp: integer¶
Number of in-plane integration points (SHELL)
- property Section.nxdof: integer¶
Number of extra degrees of freedom per node (SHELL, SOLID)
- property Section.peri: boolean¶
If _PERI option is set. Can be true or false (SOLID)
- property Section.propcr: integer¶
Not used (SHELL)
- property Section.propt: float¶
Printout option (SHELL, TSHELL)
- property Section.ptype: integer¶
PERI peridynamics formulation (SOLID)
- property Section.qr: float¶
Quadrature rule (BEAM, SHELL, TSHELL)
- property Section.secid: integer or string¶
Section
ID (all types) or character label. Also see thelabel
property which is an alternative name for this
- property Section.shrf: float¶
Shear correction factor (BEAM, SHELL, TSHELL)
- property Section.smstep: integer¶
SPG Interval of timestep to conduction displ regularisation (SOLID)
- property Section.spg: boolean¶
If _SPG option is set. Can be true or false (SOLID)
- property Section.start: float¶
Time imposed SPH approximation is activated (SPH) or
Start time for smoothing (SHELL, SOLID)
- property Section.stretch: float¶
SPG stretching parameter if IDAM = 1 (SOLID)
- property Section.swtime: float¶
SPG Time to switch from updated Lagrangian to Eulerian kernel (SOLID)
- property Section.thermal: boolean¶
If _THERMAL option is set. Can be true or false (SHELL)
- property Section.thick: float¶
Thickness (ALE1D, SEATBELT)
- property Section.toldef: float¶
Deformation tolerance (SOLID)
- property Section.transparency: integer¶
The transparency of the section (0-100) 0% is opaque, 100% is transparent
- property Section.type(read only): constant¶
Section type. Can be
Section.ALE1D
,Section.ALE2D
,Section.BEAM
,Section.DISCRETE
,Section.POINT_SOURCE
,Section.SEATBELT
,Section.SHELL
,Section.SOLID
,Section.SPH
orSection.TSHELL
- property Section.xfem: boolean¶
If _THERMAL option is set. Can be true or false (SHELL)
BEAM¶
- property Section.a: float¶
Cross sectional area
- property Section.aisc: boolean¶
If _AISC option is set. Can be true or false
- property Section.aisc_label: string¶
AISC section label
- property Section.ca: float¶
Cable area
- property Section.cid: integer¶
Coordinate system ID for orientation
- property Section.cst: float¶
Cross section type
- property Section.d1: float¶
Input parameter 1 for section type
- property Section.d2: float¶
Input parameter 2 for section type
- property Section.d3: float¶
Input parameter 3 for section type
- property Section.d4: float¶
Input parameter 4 for section type
- property Section.d5: float¶
Input parameter 5 for section type
- property Section.d6: float¶
Input parameter 6 for section type
- property Section.dofn1: float¶
Active degree of freedom at node 1
- property Section.dofn2: float¶
Active degree of freedom at node 2
- property Section.iner: float¶
Mass moment of inertia
- property Section.iovpr: integer¶
Print flag for the elbow ovalization degrees of freedom (elform 14)
- property Section.iprstr: integer¶
Flag for adding stress due to pressure into the material routine (elform 14)
- property Section.irr: float¶
Irr
- property Section.iss: float¶
Iss
- property Section.ist: float¶
Ist
- property Section.itoff: float¶
Option to specify torsional behaviour for spotwelds
- property Section.itorm: float¶
Itorm
- property Section.itt: float¶
Itt
- property Section.iw: float¶
Warping constant
- property Section.iwr: float¶
Warping constant
- property Section.iyr: float¶
IYR integral
- property Section.izr: float¶
IZR integral
- property Section.j: float¶
torsional constant
- property Section.nsloc: float¶
Location of s reference surface
- property Section.nsm: float¶
Non structural mass per unit length
- property Section.ntloc: float¶
Location of t reference surface
- property Section.offset: float¶
Offset for cable
- property Section.pr: float¶
Pressure inside elements (elform 14)
- property Section.print: float¶
Output spot force resultants from spotwelds
- property Section.rampt: float¶
Ramp up time for dynamic relaxation
- property Section.rrcon: float¶
r rotational constraint
- property Section.sa: float¶
Shear area
- property Section.scoor: float¶
Location of triad for discrete beam
- property Section.srcon: float¶
s rotational constraint
- property Section.stress: float¶
Initial stress for dynamic relaxation
- property Section.stype: string¶
Section type
- property Section.trcon: float¶
t rotational constraint
- property Section.ts1: float¶
s thickness or outer diameter at N1
- property Section.ts2: float¶
s thickness or outer diameter at N2
- property Section.tt1: float¶
t thickness or inner diameter at N1
- property Section.tt2: float¶
t thickness or inner diameter at N2
- property Section.vol: float¶
Volume of discrete beam
- property Section.ys: float¶
s coordinate of shear centre of cross section
- property Section.zs: float¶
t coordinate of shear centre of cross section
DISCRETE¶
- property Section.cdl: float¶
Deflection limit in compression
- property Section.cl: float¶
Clearance
- property Section.dro: integer¶
Displacement/rotation option
- property Section.fd: float¶
Failure deflection
- property Section.kd: float¶
Dynamic magnification factor
- property Section.tdl: float¶
Deflection limit in tension
- property Section.v0: float¶
Test velocity
POINT SOURCE¶
- property Section.lcidt: integer¶
Temperature loadcurve ID
- property Section.lcidvel: integer¶
Inlet flow velocity loadcurve ID
- property Section.lcidvolr: integer¶
Relative volume loadcurve ID
- property Section.lcmdot1: integer¶
Mass flowrate loadcurve for gas 1
- property Section.lcmdot2: integer¶
Mass flowrate loadcurve for gas 2
- property Section.lcmdot3: integer¶
Mass flowrate loadcurve for gas 3
- property Section.lcmdot4: integer¶
Mass flowrate loadcurve for gas 4
- property Section.lcmdot5: integer¶
Mass flowrate loadcurve for gas 5
- property Section.lcmdot6: integer¶
Mass flowrate loadcurve for gas 6
- property Section.lcmdot7: integer¶
Mass flowrate loadcurve for gas 7
- property Section.lcmdot8: integer¶
Mass flowrate loadcurve for gas 8
- property Section.mixture: boolean¶
If _MIXTURE option is set. Can be true or false
- property Section.nidlc001: integer¶
1st node ID defining a local coordinate
- property Section.nidlc002: integer¶
2nd node ID defining a local coordinate
- property Section.nidlc003: integer¶
3rd node ID defining a local coordinate
- property Section.points: integer¶
Number of point sources
SEATBELT¶
- property Section.area: float¶
Optional cross sectional area used in contact
SHELL¶
SOLID¶
- property Section.cohoff: float¶
Relative location of cohesive layer (for cohesive solid elements 20 and 22)
- property Section.ds: float¶
Displacement jump
- property Section.ecut: float¶
Minimum distance to the node that a crack surface can cut to the edge
- property Section.gaskett: float¶
Gasket thickness for converting elform 19-22 elements to gasket element
- property Section.ibr: integer¶
Branching
- property Section.iken: integer¶
approximation
- property Section.ips: integer¶
Pressure smoothing/recovery
- property Section.sf: float¶
Failure strain
- property Section.stime: float¶
Time to switch from stabilized EFG to standard EFG formulation
SPH¶
- property Section.cslh: float¶
Smoothing length constant
- property Section.death: float¶
Time imposed SPH approximation is stopped
- property Section.ellipse: boolean¶
If _ELLIPSE option is set (was _TENSOR pre R8). Can be true or false
- property Section.hmax: float¶
Max smoothing length scale factor
- property Section.hmin: float¶
Min smoothing length scale factor
- property Section.hxcslh: float¶
Constant for smoothing length in X for tensor/ellipse case
- property Section.hxini: float¶
Initial smoothing length in X for tensor/ellipse case
- property Section.hycslh: float¶
Constant for smoothing length in Y for tensor/ellipse case
- property Section.hyini: float¶
Initial smoothing length in Y for tensor/ellipse case
- property Section.hzcslh: float¶
Constant for smoothing length in Z for tensor/ellipse case
- property Section.hzini: float¶
Initial smoothing length in Z for tensor/ellipse case
- property Section.iform: integer¶
SPH element formulation
- property Section.interaction: boolean¶
If _INTERACTION option is set. Can be true or false
- property Section.sphini: float¶
Optional initial smoothing length
- property Section.tensor: boolean¶
If _TENSOR option is set (_ELLIPSE from R8 onwards). Can be true or false
- property Section.user: boolean¶
If _USER option is set. Can be true or false
TSHELL¶
- property Section.tshear: integer¶
Flag for transverse shear strain or stress distribution
Constructor¶
- classmethod Section(model, secid, type, title=Oasys.gRPC.defaultArg)¶
Create a new
Section
object
- Parameters:
model (Model) –
Model
that section will be created insecid (integer or string) –
Section
number or character labeltype (constant) – Section type. Can be
Section.BEAM
,Section.DISCRETE
,Section.POINT_SOURCE
,Section.SEATBELT
,Section.SHELL
,Section.SOLID
,Section.SPH
orSection.TSHELL
title (string) – Optional. Title for the section
- Returns:
Section object
- Return type:
dict
Example
To create a new section, type shell, called ‘Example’ in model m with label 100:
s = Oasys.PRIMER.Section(m, 100, Oasys.PRIMER.Section.SHELL, 'Example')
Static methods¶
- classmethod Section.BlankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the sections in the model
- Parameters:
model (Model) –
Model
that all sections will be blanked inredraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using
View.Redraw()
- Returns:
No return value
- Return type:
None
Example
To blank all of the sections in model m:
Oasys.PRIMER.Section.BlankAll(m)
- classmethod Section.BlankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Blanks all of the flagged sections in the model
- Parameters:
model (Model) –
Model
that all the flagged sections will be blanked inflag (Flag) – Flag set on the sections that you want to blank
redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using
View.Redraw()
- Returns:
No return value
- Return type:
None
Example
To blank all of the sections in model m flagged with f:
Oasys.PRIMER.Section.BlankFlagged(m, f)
- classmethod Section.Create(model, modal=Oasys.gRPC.defaultArg)¶
Starts an interactive editing panel to create a section
- Parameters:
model (Model) –
Model
that the sect 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:
Section object (or None if not made)
- Return type:
dict
Example
To start creating a section in model m:
d = Oasys.PRIMER.Section.Create(m)
- classmethod Section.First(model)¶
Returns the first section in the model
- Parameters:
model (Model) –
Model
to get first section in- Returns:
Section object (or None if there are no sections in the model)
- Return type:
Section
Example
To get the first section in model m:
s = Oasys.PRIMER.Section.First(m)
- classmethod Section.FirstFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the first free section label in the model. Also see
Section.LastFreeLabel()
,Section.NextFreeLabel()
andModel.FirstFreeItemLabel()
- Parameters:
- Returns:
Section label
- Return type:
int
Example
To get the first free section label in model m:
label = Oasys.PRIMER.Section.FirstFreeLabel(m)
- classmethod Section.FlagAll(model, flag)¶
Flags all of the sections in the model with a defined flag
- Parameters:
model (Model) –
Model
that all sections will be flagged inflag (Flag) – Flag to set on the sections
- Returns:
No return value
- Return type:
None
Example
To flag all of the sections with flag f in model m:
Oasys.PRIMER.Section.FlagAll(m, f)
- classmethod Section.GetAll(model)¶
Returns a list of Section objects for all of the sections in a model in PRIMER
- Parameters:
model (Model) –
Model
to get sections from- Returns:
List of Section objects
- Return type:
list
Example
To make a list of Section objects for all of the sections in model m
s = Oasys.PRIMER.Section.GetAll(m)
- classmethod Section.GetFlagged(model, flag)¶
Returns a list of Section objects for all of the flagged sections in a model in PRIMER
- Parameters:
model (Model) –
Model
to get sections fromflag (Flag) – Flag set on the sections that you want to retrieve
- Returns:
List of Section objects
- Return type:
list
Example
To make a list of Section objects for all of the sections in model m flagged with f
s = Oasys.PRIMER.Section.GetFlagged(m, f)
- classmethod Section.GetFromID(model, number)¶
Returns the Section object for a section ID
- Parameters:
model (Model) –
Model
to find the section innumber (integer) – number of the section you want the Section object for
- Returns:
Section object (or None if section does not exist)
- Return type:
Section
Example
To get the Section object for section 100 in model m
s = Oasys.PRIMER.Section.GetFromID(m, 100)
- classmethod Section.Last(model)¶
Returns the last section in the model
- Parameters:
model (Model) –
Model
to get last section in- Returns:
Section object (or None if there are no sections in the model)
- Return type:
Section
Example
To get the last section in model m:
s = Oasys.PRIMER.Section.Last(m)
- classmethod Section.LastFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the last free section label in the model. Also see
Section.FirstFreeLabel()
,Section.NextFreeLabel()
and seeModel.LastFreeItemLabel()
- Parameters:
- Returns:
Section label
- Return type:
int
Example
To get the last free section label in model m:
label = Oasys.PRIMER.Section.LastFreeLabel(m)
- classmethod Section.NextFreeLabel(model, layer=Oasys.gRPC.defaultArg)¶
Returns the next free (highest+1) section label in the model. Also see
Section.FirstFreeLabel()
,Section.LastFreeLabel()
andModel.NextFreeItemLabel()
- Parameters:
- Returns:
Section label
- Return type:
int
Example
To get the next free section label in model m:
label = Oasys.PRIMER.Section.NextFreeLabel(m)
- classmethod Section.Pick(prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg, button_text=Oasys.gRPC.defaultArg)¶
Allows the user to pick a section
- Parameters:
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only sections from that model can be picked. If the argument is aFlag
then only sections that are flagged with limit can be selected. If omitted, or None, any sections from any model can be selected. from any modelmodal (boolean) – Optional. 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
button_text (string) – Optional. By default the window with the prompt will have a button labelled ‘Cancel’ which if pressed will cancel the pick and return None. If you want to change the text on the button use this argument. If omitted ‘Cancel’ will be used
- Returns:
Section object (or None if not picked)
- Return type:
dict
Example
To pick a section from model m giving the prompt ‘Pick section from screen’:
s = Oasys.PRIMER.Section.Pick('Pick section from screen', m)
- classmethod Section.RenumberAll(model, start)¶
Renumbers all of the sections in the model
- Parameters:
model (Model) –
Model
that all sections will be renumbered instart (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the sections in model m, from 1000000:
Oasys.PRIMER.Section.RenumberAll(m, 1000000)
- classmethod Section.RenumberFlagged(model, flag, start)¶
Renumbers all of the flagged sections in the model
- Parameters:
model (Model) –
Model
that all the flagged sections will be renumbered inflag (Flag) – Flag set on the sections that you want to renumber
start (integer) – Start point for renumbering
- Returns:
No return value
- Return type:
None
Example
To renumber all of the sections in model m flagged with f, from 1000000:
Oasys.PRIMER.Section.RenumberFlagged(m, f, 1000000)
- classmethod Section.Select(flag, prompt, limit=Oasys.gRPC.defaultArg, modal=Oasys.gRPC.defaultArg)¶
Allows the user to select sections using standard PRIMER object menus
- Parameters:
flag (Flag) – Flag to use when selecting sections
prompt (string) – Text to display as a prompt to the user
limit (Model or Flag) – Optional. If the argument is a
Model
then only sections from that model can be selected. If the argument is aFlag
then only sections that are flagged with limit can be selected (limit should be different to flag). If omitted, or None, any sections 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 sections selected or None if menu cancelled
- Return type:
int
Example
To select sections from model m, flagging those selected with flag f, giving the prompt ‘Select sections’:
Oasys.PRIMER.Section.Select(f, 'Select sections', m)To select sections, flagging those selected with flag f but limiting selection to sections flagged with flag l, giving the prompt ‘Select sections’:
Oasys.PRIMER.Section.Select(f, 'Select sections', l)
- classmethod Section.SketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Sketches all of the flagged sections in the model. The sections will be sketched until you either call
Section.Unsketch()
,Section.UnsketchFlagged()
,Model.UnsketchAll()
, or delete the model
- Parameters:
model (Model) –
Model
that all the flagged sections will be sketched inflag (Flag) – Flag set on the sections that you want to sketch
redraw (boolean) – Optional. If model should be redrawn or not after the sections are sketched. If omitted redraw is true. If you want to sketch flagged sections several times and only redraw after the last one then use false for redraw and call
View.Redraw()
- Returns:
No return value
- Return type:
None
Example
To sketch all sections flagged with flag in model m:
Oasys.PRIMER.Section.SketchFlagged(m, flag)
- classmethod Section.Total(model, exists=Oasys.gRPC.defaultArg)¶
Returns the total number of sections in the model
- Parameters:
model (Model) –
Model
to get total forexists (boolean) – Optional. true if only existing sections should be counted. If false or omitted referenced but undefined sections will also be included in the total
- Returns:
number of sections
- Return type:
int
Example
To get the total number of sections in model m:
total = Oasys.PRIMER.Section.Total(m)
- classmethod Section.UnblankAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the sections in the model
- Parameters:
model (Model) –
Model
that all sections will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using
View.Redraw()
- Returns:
No return value
- Return type:
None
Example
To unblank all of the sections in model m:
Oasys.PRIMER.Section.UnblankAll(m)
- classmethod Section.UnblankFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unblanks all of the flagged sections in the model
- Parameters:
model (Model) –
Model
that the flagged sections will be unblanked inflag (Flag) – Flag set on the sections that you want to unblank
redraw (boolean) – Optional. If model should be redrawn or not. If omitted redraw is false. If you want to do several (un)blanks and only redraw after the last one then use false for all redraws apart from the last one. Alternatively you can redraw using
View.Redraw()
- Returns:
No return value
- Return type:
None
Example
To unblank all of the sections in model m flagged with f:
Oasys.PRIMER.Section.UnblankFlagged(m, f)
- classmethod Section.UnflagAll(model, flag)¶
Unsets a defined flag on all of the sections in the model
- Parameters:
model (Model) –
Model
that the defined flag for all sections will be unset inflag (Flag) – Flag to unset on the sections
- Returns:
No return value
- Return type:
None
Example
To unset the flag f on all the sections in model m:
Oasys.PRIMER.Section.UnflagAll(m, f)
- classmethod Section.UnsketchAll(model, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all sections
- Parameters:
model (Model) –
Model
that all sections will be unblanked inredraw (boolean) – Optional. If model should be redrawn or not after the sections 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()
- Returns:
No return value
- Return type:
None
Example
To unsketch all sections in model m:
Oasys.PRIMER.Section.UnsketchAll(m)
- classmethod Section.UnsketchFlagged(model, flag, redraw=Oasys.gRPC.defaultArg)¶
Unsketches all flagged sections in the model
- Parameters:
model (Model) –
Model
that all sections will be unsketched inflag (Flag) – Flag set on the sections that you want to unsketch
redraw (boolean) – Optional. If model should be redrawn or not after the sections 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()
- Returns:
No return value
- Return type:
None
Example
To unsketch all sections flagged with flag in model m:
Oasys.PRIMER.Section.UnsketchAll(m, flag)
Instance methods¶
- Section.AssociateComment(comment)¶
Associates a comment with a section
- Parameters:
comment (Comment) –
Comment
that will be attached to the section- Returns:
No return value
- Return type:
None
Example
To associate comment c to the section s:
s.AssociateComment(c)
- Section.Blank()¶
Blanks the section
- Returns:
No return value
- Return type:
None
Example
To blank section s:
s.Blank()
- Section.Blanked()¶
Checks if the section is blanked or not
- Returns:
True if blanked, False if not
- Return type:
bool
Example
To check if section s is blanked:
if s.Blanked(): do_something..
- Section.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 section s:
s.Browse()
- Section.ClearFlag(flag)¶
Clears a flag on the section
- Parameters:
flag (Flag) – Flag to clear on the section
- Returns:
No return value
- Return type:
None
Example
To clear flag f for section s:
s.ClearFlag(f)
- Section.Copy(range=Oasys.gRPC.defaultArg)¶
Copies the section. The target include of the copied section 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:
Section object
- Return type:
Section
Example
To copy section s into section z:
z = s.Copy()
- Section.DetachComment(comment)¶
Detaches a comment from a section
- Parameters:
comment (Comment) –
Comment
that will be detached from the section- Returns:
No return value
- Return type:
None
Example
To detach comment c from the section s:
s.DetachComment(c)
- Section.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 section s:
s.Edit()
- Section.ExtractColour()¶
Extracts the actual colour used for section.
By default in PRIMER many entities such as elements get their colour automatically from the part that they are in. PRIMER cycles through 13 default colours based on the label of the entity. In this case the sectioncolour
property will return the valueColour.PART
instead of the actual colour. This method will return the actual colour which is used for drawing the section
- Returns:
colour value (integer)
- Return type:
int
Example
To return the colour used for drawing section s:
colour = s.ExtractColour()
- Section.Flagged(flag)¶
Checks if the section is flagged or not
- Parameters:
flag (Flag) – Flag to test on the section
- Returns:
True if flagged, False if not
- Return type:
bool
Example
To check if section s has flag f set on it:
if s.Flagged(f): do_something..
- Section.GetBetaData(ipt)¶
Returns the beta angle data for an integration point in *SECTION_SHELL or *SECTION_TSHELL
- Parameters:
ipt (integer) – The integration point you want the data for. Note that integration points start at 0, not 1
- Returns:
float
- Return type:
float
Example
To get the beta angle for the 3rd integration point for section shell s:
if (s.icomp and s.nip >= 3 ): beta = s.GetBetaData(2)
- Section.GetComments()¶
Extracts the comments associated to a section
- 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 section s:
comm_list = s.GetComments()
- Section.GetLmcData(i)¶
Returns the LMC property parameter for *SECTION_SHELL or *SECTION_SOLID
- Parameters:
i (integer) – The point you want the parameter for. Note that points start at 0, not 1
- Returns:
float
- Return type:
float
Example
To get the 3rd LMC parameter for section shell s:
if (s.lmc >= 3): p = s.GetLmcData(2)
- Section.GetParameter(prop)¶
Checks if a Section 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 theSection.ViewParameters()
method and ‘method chaining’ (see the examples below)
- Parameters:
prop (string) – section property to get parameter for
- Returns:
Parameter object if property is a parameter, None if not
- Return type:
dict
Example
To check if Section property s.example is a parameter:
Oasys.PRIMER.Options.property_parameter_names = True if s.GetParameter(s.example): do_something... Oasys.PRIMER.Options.property_parameter_names = FalseTo check if Section property s.example is a parameter by using the GetParameter method:
if s.ViewParameters().GetParameter(s.example): do_something..
- Section.GetPointData(ipt)¶
Returns the point data for a single point in *SECTION_POINT_SOURCE
- Parameters:
ipt (integer) – The point you want the data for. Note that integration points start at 0, not 1
- Returns:
A list of numbers containing the node id, vector id and orifice area
- Return type:
list
Example
To get the data for the 3rd point for section point source s:
if s.points >= 3: pt_data = s.GetPointData(3)
- Section.GetUserData(ipt)¶
Returns the user defined data for an integration point in *SECTION_SHELL and *SECTION_SOLID
- Parameters:
ipt (integer) – The integration point you want the data for. Note that integration points start at 0, not 1
- Returns:
A list containing the data (XI, ETA, WGT for *SECTION_SHELL, XI, ETA, ZETA, WGT for *SECTION_SOLID)
- Return type:
list
Example
To get the data for the 3rd integration point for section shell s:
if (s.nipp >= 3): user_data = s.GetUserData(2)
- Section.Keyword()¶
Returns the keyword for this section (*SECT, *SECT_SCALAR or *SECT_SCALAR_VALUE). Note that a carriage return is not added. See also
Section.KeywordCards()
- Returns:
string containing the keyword
- Return type:
str
Example
To get the keyword for section s:
key = s.Keyword()
- Section.KeywordCards()¶
Returns the keyword cards for the section. Note that a carriage return is not added. See also
Section.Keyword()
- Returns:
string containing the cards
- Return type:
str
Example
To get the cards for section s:
cards = n.KeywordCards()
- Section.Next()¶
Returns the next section in the model
- Returns:
Section object (or None if there are no more sections in the model)
- Return type:
Section
Example
To get the section in model m after section s:
s = s.Next()
- Section.Previous()¶
Returns the previous section in the model
- Returns:
Section object (or None if there are no more sections in the model)
- Return type:
Section
Example
To get the section in model m before section s:
s = s.Previous()
- Section.SetBetaData(ipt, beta)¶
Sets the beta angle for an integration point in *SECTION_SHELL or *SECTION_TSHELL
- Parameters:
ipt (integer) – The integration point you want to set the data for. Note that integration points start at 0, not 1
beta (float) – Beta angle for the integration point
- Returns:
No return value
- Return type:
None
Example
To set the beta angle for the 3rd integration point to 45, for section s:
s.SetBetaData(2, 45)
- Section.SetFlag(flag)¶
Sets a flag on the section
- Parameters:
flag (Flag) – Flag to set on the section
- Returns:
No return value
- Return type:
None
Example
To set flag f for section s:
s.SetFlag(f)
- Section.SetLmcData(ipt, lmc)¶
Sets the lmc parameter for a point in *SECTION_SHELL or *SECTION_SOLID
- Parameters:
ipt (integer) – The point you want to set the data for. Note that points start at 0, not 1
lmc (float) – Lmc parameter for the point
- Returns:
No return value
- Return type:
None
Example
To set the 3rd lmc point to 0.1, for section s:
s.SetLmcData(2, 0.1)
- Section.SetPointData(ipt, nodeid, vecid, area)¶
Sets the data for a single point in *SECTION_POINT_SOURCE
- Parameters:
ipt (integer) – The point you want to set the data for. Note that integration points start at 0, not 1
nodeid (integer) – Node ID for the point
vecid (integer) – Vector ID for the point
area (real) – Orifice area for the point
- Returns:
No return value
- Return type:
None
Example
To set the data for the 3rd point to node 1, vector 10 and area 0.2, for section s:
s.SetPointData(2, 1, 10, 0.2)
- Section.SetUserData(ipt, xi, eta, zeta, wgt)¶
Sets the user defined data for an integration point in *SECTION_SHELL and *SECTION_SOLID
- Parameters:
ipt (integer) – The integration point you want to set the data for. Note that integration points start at 0, not 1
xi (real) – First isoparametric coordinate
eta (real) – Second isoparametric coordinate
zeta (real) – Second isoparametric coordinate (SOLID) or
Isoparametric weight (SHELL)wgt (real) – Isoparametric weight (SOLID)
- Returns:
No return value
- Return type:
None
Example
To set the user data for the 3rd integration point to xi 0.5, eta 0.5, zeta -0.5, wgt 0.125, for section solid s:
s.SetUserData(2, 0.5, 0.5, -0.5, 0.125)
- Section.Sketch(redraw=Oasys.gRPC.defaultArg)¶
Sketches the section. The section will be sketched until you either call
Section.Unsketch()
,Section.UnsketchAll()
,Model.UnsketchAll()
, or delete the model
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the section is sketched. If omitted redraw is true. If you want to sketch several sections and only redraw after the last one then use false for redraw and call
View.Redraw()
- Returns:
No return value
- Return type:
None
Example
To sketch section s:
s.Sketch()
- Section.Unblank()¶
Unblanks the section
- Returns:
No return value
- Return type:
None
Example
To unblank section s:
s.Unblank()
- Section.Unsketch(redraw=Oasys.gRPC.defaultArg)¶
Unsketches the section
- Parameters:
redraw (boolean) – Optional. If model should be redrawn or not after the section is unsketched. If omitted redraw is true. If you want to unsketch several sections and only redraw after the last one then use false for redraw and call
View.Redraw()
- Returns:
No return value
- Return type:
None
Example
To unsketch section s:
s.Unsketch()
- Section.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:
Section object
- Return type:
dict
Example
To check if Section property s.example is a parameter by using the
Section.GetParameter()
method:if s.ViewParameters().GetParameter(s.example): do_something..
- Section.Xrefs()¶
Returns the cross references for this section
- Returns:
Xrefs object
- Return type:
dict
Example
To get the cross references for section s:
xrefs = s.Xrefs()