Region: Difference between revisions

From OpenSeesWiki
Jump to navigation Jump to search
(Created page with ' < Back '''region'''(''regTag[, '-ele', e1, e2, ...][, '-eleRange', e1, e2, ...][, '-node', nd1, nd2, ...][, '-nodeRange', nd1, nd2][, '-rayleigh', alphaM, betaK, beta...')
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[FSI | < Back]]
[[FSI | < Back]]


<span id="pyregion"></span>
'''region'''(''regTag[, '-ele', e1, e2, ...][, '-eleRange', e1, e2, ...][, '-node', nd1, nd2, ...][, '-nodeRange', nd1, nd2][, '-rayleigh', alphaM, betaK, betaKinit, betaKcomm][, 'getNodeTags'][, 'getConnectedEleTags'][, 'getEleTags'][, '-mass', m1, m2, ...]'') [[#pyregion|¶]]


'''region'''(''regTag[, '-ele', e1, e2, ...][, '-eleRange', e1, e2, ...][, '-node', nd1, nd2, ...][, '-nodeRange', nd1, nd2][, '-rayleigh', alphaM, betaK, betaKinit, betaKcomm][, 'getNodeTags'][, 'getConnectedEleTags'][, 'getEleTags'][, '-mass', m1, m2, ...]'') <span id="pyregion"> ¶</span>
<blockquote>an enhanced region command</blockquote>
 
<blockquote>remesh based on the nodes in regions.</blockquote>




{| class="wikitable"
{| class="wikitable"
|-
|-
! rowspan="6"| Parameters:
! rowspan="10"| Parameters:
|* '''type''' (''str'') -  a string of mesh type, currently 'tri'.
|* '''regTag''' (''int'') -  a predefined or new region tag.
|-
|* ''''-ele', e1, e2, ...''' (''int'') –  the region is defined by elements e1, e2, .... If no tag is given, then all elements are added.
|-
|* ''''-eleRange', e1, e2, ...''' (''int'') –  the region is defined by elements in the range [e1, e2].
|-
|* ''''-node', nd1, nd2, ...''' (''int'') – the region is defined by nodes nd1, nd2, .... If no tag is given, then all nodes are added.
|-
|* ''''-nodeRange', nd1, nd2, ...''' (''int'') – the region is defined by nodes in the range [nd1 nd2].
|-
|-
|* '''alpha''' (''float'') – the control parameter for alpha shape method. The value is usually between 1 and 2, e.g. alpha = 1.4.
|* ''''-rayleigh', alphaM, betaK, betaKinit, betaKcomm ''' (''float'') – arguments as in [[rayleigh]] command.
|-
|-
|* '''numfreeregs''' (''int'') – number of regions which need to be remeshed.
|* ''''-getNodeTags'''' (''str'') – return all node tags in the region.
|-
|-
|* '''numfixedregs''' (''int'') – number of regions which need not to be remeshed but used to form elements between free regions.
|* ''''-getConnectedEleTags'''' (''str'') – return all elements that connect to all nodes in the region.
|-
|-
|* '''reg1, reg2, ..''' (''int'') – tags of free or fixed regions.
|* ''''-getEleTags'''' (''str'') –   return all elements that are added by mesh/remesh commands.
|-
|-
|* '''eletype...''' (''str'') – the name of the element followed by element parameters.
|* '''''-mass', m1, m2, ...'''' (''float'') –   set the nodal mass for all nodes in the region.
|-
|-
! |Returns:
! |Returns:
| a list of node or element tags if ‘-getNodeTags’, ‘-getConnectedEleTags’, ‘-getEleTags’ are specified, otherwise, returns None.
|-
|-
! |Return Type:
! |Return Type:
|
list(int) or None
|}
|}
Example:
<source lang="python">
alpha = 1.4
freeregs = [1,2]
fixedregs = [3,4]
eleargs = ['PFEMElement2DBubble',rho,mu,b1,b2,thk,kappa]
remesh('tri', alpha, len(freeregs), *freeregs, len(fixedregs) *fixedregs, *eleargs)
</source>

Latest revision as of 18:34, 3 July 2017

< Back

region(regTag[, '-ele', e1, e2, ...][, '-eleRange', e1, e2, ...][, '-node', nd1, nd2, ...][, '-nodeRange', nd1, nd2][, '-rayleigh', alphaM, betaK, betaKinit, betaKcomm][, 'getNodeTags'][, 'getConnectedEleTags'][, 'getEleTags'][, '-mass', m1, m2, ...])

an enhanced region command


Parameters: * regTag (int) - a predefined or new region tag.
* '-ele', e1, e2, ... (int) – the region is defined by elements e1, e2, .... If no tag is given, then all elements are added.
* '-eleRange', e1, e2, ... (int) – the region is defined by elements in the range [e1, e2].
* '-node', nd1, nd2, ... (int) – the region is defined by nodes nd1, nd2, .... If no tag is given, then all nodes are added.
* '-nodeRange', nd1, nd2, ... (int) – the region is defined by nodes in the range [nd1 nd2].
* '-rayleigh', alphaM, betaK, betaKinit, betaKcomm (float) – arguments as in rayleigh command.
* '-getNodeTags' (str) – return all node tags in the region.
* '-getConnectedEleTags' (str) – return all elements that connect to all nodes in the region.
* '-getEleTags' (str) – return all elements that are added by mesh/remesh commands.
* -mass', m1, m2, ...' (float) – set the nodal mass for all nodes in the region.
Returns: a list of node or element tags if ‘-getNodeTags’, ‘-getConnectedEleTags’, ‘-getEleTags’ are specified, otherwise, returns None.
Return Type:

list(int) or None