Mesh: Difference between revisions

From OpenSeesWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 27: Line 27:
|-
|-
! |Returns:
! |Returns:
|
|-
|-
! |Return Type:
! |Return Type:
| None
|}
|}



Revision as of 22:00, 30 June 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)