Mesh: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
|- | |- | ||
! rowspan="8"| Parameters: | ! rowspan="8"| Parameters: | ||
|* '''type''' (''str'') - a string of mesh type, currently ' | |* '''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. | |* '''regTag''' (''int'') – a tag for the non-existed region to store the node and elements. |
Revision as of 21:46, 30 June 2017
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: |
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)