Mesh: Difference between revisions

From OpenSeesWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[FSI | < Back]]


'''mesh'''(''type, regTag, ndf, meshsize, numnodes, nd1, nd2, ..., bound1, bound2, ...[eletype, ...]'')
<span id="pymesh"></span>
'''mesh'''(''type, regTag, ndf, meshsize, numnodes, nd1, nd2, ..., bound1, bound2, ...[eletype, ...]'') [[#pymesh|¶]]
 
<blockquote>mesh a geometry and add created nodes and elements to a region.</blockquote>
 
 
{| class="wikitable"
|-
! rowspan="8"| Parameters:
|* '''type''' (''str'') -  a string of mesh type, currently 'line' and 'poly'.
|-
|* '''regTag''' (''int'') – a tag for the non-existed region to store the node and elements.
|-
|* '''ndf''' (''int'') – number of dofs for created nodes.
|-
|* '''meshsize''' (''float'') – the mesh size.
|-
|* '''numnodes''' (''int'') – number of input nodes and boundary tags. The nodes are used to define the geometry. For line mesh, nodes are given from start to end of lines. The end node will not be connected to the starting node. For poly mesh, nodes are given in one direction of a polygon. The end node will be automatically connected to the starting node.
|-
|* '''nd1, nd2...''' (''int'') – tags of nodes, there must be numnodes nodes.
|-
|* '''bound1, bound2 ...''' (''int'') – 1 or 0 indicates if the edge of a polygon or end point of a line is included.
|-
|* '''eletype''' (''str'') – the name of the element followed by element parameters.
|-
! |Returns:
|
|-
! |Return Type:
| None
|}
 
Example:
 
<source lang="python">
fluid = 1
ndf = 2
ndtags = [1,2,3,4]
bounds = [0,1,1,0]
eleargs = ['PFEMElement2DBubble',rho,mu,b1,b2,thk,kappa]
meshsize = 0.01
 
mesh('poly', flud, ndf, meshsize, len(ndtags), *ndtags, *bounds, *eleargs)
</source>

Latest revision as of 18:33, 3 July 2017

< Back

mesh(type, regTag, ndf, meshsize, numnodes, nd1, nd2, ..., bound1, bound2, ...[eletype, ...])

mesh a geometry and add created nodes and elements to a region.


Parameters: * type (str) - a string of mesh type, currently 'line' and 'poly'.
* regTag (int) – a tag for the non-existed region to store the node and elements.
* ndf (int) – number of dofs for created nodes.
* meshsize (float) – the mesh size.
* numnodes (int) – number of input nodes and boundary tags. The nodes are used to define the geometry. For line mesh, nodes are given from start to end of lines. The end node will not be connected to the starting node. For poly mesh, nodes are given in one direction of a polygon. The end node will be automatically connected to the starting node.
* nd1, nd2... (int) – tags of nodes, there must be numnodes nodes.
* bound1, bound2 ... (int) – 1 or 0 indicates if the edge of a polygon or end point of a line is included.
* eletype (str) – the name of the element followed by element parameters.
Returns:
Return Type: None

Example:

fluid = 1
ndf = 2
ndtags = [1,2,3,4]
bounds = [0,1,1,0]
eleargs = ['PFEMElement2DBubble',rho,mu,b1,b2,thk,kappa]
meshsize = 0.01

mesh('poly', flud, ndf, meshsize, len(ndtags), *ndtags, *bounds, *eleargs)