Finite element models are geometrical models that consist of a unique set of nodal coordinates and one of more sets of elements.
Classes defined in module fe
Contains all FE model data.
Return the parts as a list of meshes
Return the number of nodes in the model.
Return the number of elements in the model.
Return the number of element groups in the model.
Return the maximum plexitude of the model.
Splits a set of element numbers over the element groups.
Returns two lists of element sets, the first in global numbering, the second in group numbering. Each item contains the element numbers from the given set that belong to the corresponding group.
Return the global element numbers for elements set in group
Return the definitions of the elements in sets.
sets should be a list of element sets with length equal to the number of element groups. Each set contains element numbers local to that group.
As the elements can be grouped according to plexitude, this function returns a list of element arrays matching the element groups in self.elems. Some of these arrays may be empty.
It also provide the global and group element numbers, since they had to be calculated anyway.
Renumber a set of nodes.
old and new are equally sized lists with unique node numbers, each smaller that the number of nodes in the model. The old numbers will be renumbered to the new numbers. If one of the lists is None, a range with the length of the other is used. If the lists are shorter than the number of nodes, the remaining nodes will be numbered in an unspecified order. If both lists are None, the nodes are renumbered randomly.
This function returns a tuple (old,new) with the full renumbering vectors used. The first gives the old node numbers of the current numbers, the second gives the new numbers cooresponding with the old ones.
Apply ‘addNoise’ transformation to the Geometry object.
See coords.Coords.addNoise() for details.
Apply ‘affine’ transformation to the Geometry object.
See coords.Coords.affine() for details.
Apply ‘align’ transformation to the Geometry object.
See coords.Coords.align() for details.
Apply ‘bump’ transformation to the Geometry object.
See coords.Coords.bump() for details.
Apply ‘bump1’ transformation to the Geometry object.
See coords.Coords.bump1() for details.
Apply ‘bump2’ transformation to the Geometry object.
See coords.Coords.bump2() for details.
Apply ‘centered’ transformation to the Geometry object.
See coords.Coords.centered() for details.
Apply ‘cylindrical’ transformation to the Geometry object.
See coords.Coords.cylindrical() for details.
Apply ‘egg’ transformation to the Geometry object.
See coords.Coords.egg() for details.
Apply ‘flare’ transformation to the Geometry object.
See coords.Coords.flare() for details.
Apply ‘hyperCylindrical’ transformation to the Geometry object.
See coords.Coords.hyperCylindrical() for details.
Apply ‘isopar’ transformation to the Geometry object.
See coords.Coords.isopar() for details.
Apply ‘map’ transformation to the Geometry object.
See coords.Coords.map() for details.
Apply ‘map1’ transformation to the Geometry object.
See coords.Coords.map1() for details.
Apply ‘mapd’ transformation to the Geometry object.
See coords.Coords.mapd() for details.
Apply ‘position’ transformation to the Geometry object.
See coords.Coords.position() for details.
Apply ‘projectOnCylinder’ transformation to the Geometry object.
See coords.Coords.projectOnCylinder() for details.
Apply ‘projectOnPlane’ transformation to the Geometry object.
See coords.Coords.projectOnPlane() for details.
Apply ‘projectOnSphere’ transformation to the Geometry object.
See coords.Coords.projectOnSphere() for details.
Apply ‘reflect’ transformation to the Geometry object.
See coords.Coords.reflect() for details.
Apply ‘replace’ transformation to the Geometry object.
See coords.Coords.replace() for details.
Apply ‘rollAxes’ transformation to the Geometry object.
See coords.Coords.rollAxes() for details.
Apply ‘rotate’ transformation to the Geometry object.
See coords.Coords.rotate() for details.
Apply ‘rotate’ transformation to the Geometry object.
See coords.Coords.rotate() for details.
Apply ‘scale’ transformation to the Geometry object.
See coords.Coords.scale() for details.
Apply ‘shear’ transformation to the Geometry object.
See coords.Coords.shear() for details.
Apply ‘spherical’ transformation to the Geometry object.
See coords.Coords.spherical() for details.
Apply ‘superSpherical’ transformation to the Geometry object.
See coords.Coords.superSpherical() for details.
Apply ‘swapAxes’ transformation to the Geometry object.
See coords.Coords.swapAxes() for details.
Apply ‘toCylindrical’ transformation to the Geometry object.
See coords.Coords.toCylindrical() for details.
Apply ‘toSpherical’ transformation to the Geometry object.
See coords.Coords.toSpherical() for details.
Apply ‘transformCS’ transformation to the Geometry object.
See coords.Coords.transformCS() for details.
Apply ‘translate’ transformation to the Geometry object.
See coords.Coords.translate() for details.
Apply ‘translate’ transformation to the Geometry object.
See coords.Coords.translate() for details.
Create or destroy the property array for the Geometry.
A property array is a rank-1 integer array with dimension equal to the number of elements in the Geometry. Each element thus has its own property number. These numbers can be used for any purpose. They play an import role when creating new geometry: new elements inherit the property number of their parent element. Properties are also preserved on most geometrical transformations.
Because elements with different property numbers can be drawn in different colors, the property numbers are also often used to impose color.
Parameters:
prop: a single integer value or a list/array of integer values. If the number of passed values is less than the number of elements, they wil be repeated. If you give more, they will be ignored.
The special value ‘range’ will set the property numbers equal to the element number.
A value None (default) removes the properties from the Geometry.
blocks: a single integer value or a list/array of integer values. If the number of passed values is less than the length of prop, they wil be repeated. If you give more, they will be ignored. Every prop will be repeated the corresponding number of times specified in blocks.
Get the coords data.
Returns the full array of coordinates stored in the Geometry object. Note that subclasses may store more points in this array than are used to define the geometry.
Return the dimensionality of the Geometry, or -1 if unknown
Return a deep copy of the Geometry object.
The returned object is an exact copy of the input, but has all of its data independent of the former.
Return a copy of the Geometry scaled to the given size.
size can be a single value or a list of three values for the three coordinate directions. If it is a single value, all directions are scaled to the same size. Directions for which the geometry has a size smaller than tol times the maximum size are not rescaled.
Write a Geometry to a .pgf file.
If fil is a string, a file with that name is opened. Else fil should be an open file. The Geometry is then written to that file in a native format, using sep as separator between the coordinates. If fil is a string, the file is closed prior to returning.
A Finite Element Model.
This class is intended to collect all data concerning a Finite Element Model. In due time it may replace the Model class. Currently it only holds geometrical data, but will probably be expanded later to include a property database holding material data, boundary conditions, loading conditions and simulation step data.
While the Model class stores the geometry in a single coords block and multiple elems blocks, the new FEModel class uses a list of Meshes. The Meshes do not have to be compact though, and thus all Meshes in the FEModel could used the same coords block, resulting in an equivalent model as the old Model class. But the Meshes may also use different coords blocks, allowing to accomodate better to versatile applications.
Return the number of elements in the Geometry.
This method should be re-implemented by the derived classes. For the (empty) Geometry class it always returns 0.
Apply ‘addNoise’ transformation to the Geometry object.
See coords.Coords.addNoise() for details.
Apply ‘affine’ transformation to the Geometry object.
See coords.Coords.affine() for details.
Apply ‘align’ transformation to the Geometry object.
See coords.Coords.align() for details.
Apply ‘bump’ transformation to the Geometry object.
See coords.Coords.bump() for details.
Apply ‘bump1’ transformation to the Geometry object.
See coords.Coords.bump1() for details.
Apply ‘bump2’ transformation to the Geometry object.
See coords.Coords.bump2() for details.
Apply ‘centered’ transformation to the Geometry object.
See coords.Coords.centered() for details.
Apply ‘cylindrical’ transformation to the Geometry object.
See coords.Coords.cylindrical() for details.
Apply ‘egg’ transformation to the Geometry object.
See coords.Coords.egg() for details.
Apply ‘flare’ transformation to the Geometry object.
See coords.Coords.flare() for details.
Apply ‘hyperCylindrical’ transformation to the Geometry object.
See coords.Coords.hyperCylindrical() for details.
Apply ‘isopar’ transformation to the Geometry object.
See coords.Coords.isopar() for details.
Apply ‘map’ transformation to the Geometry object.
See coords.Coords.map() for details.
Apply ‘map1’ transformation to the Geometry object.
See coords.Coords.map1() for details.
Apply ‘mapd’ transformation to the Geometry object.
See coords.Coords.mapd() for details.
Apply ‘position’ transformation to the Geometry object.
See coords.Coords.position() for details.
Apply ‘projectOnCylinder’ transformation to the Geometry object.
See coords.Coords.projectOnCylinder() for details.
Apply ‘projectOnPlane’ transformation to the Geometry object.
See coords.Coords.projectOnPlane() for details.
Apply ‘projectOnSphere’ transformation to the Geometry object.
See coords.Coords.projectOnSphere() for details.
Apply ‘reflect’ transformation to the Geometry object.
See coords.Coords.reflect() for details.
Apply ‘replace’ transformation to the Geometry object.
See coords.Coords.replace() for details.
Apply ‘rollAxes’ transformation to the Geometry object.
See coords.Coords.rollAxes() for details.
Apply ‘rotate’ transformation to the Geometry object.
See coords.Coords.rotate() for details.
Apply ‘rotate’ transformation to the Geometry object.
See coords.Coords.rotate() for details.
Apply ‘scale’ transformation to the Geometry object.
See coords.Coords.scale() for details.
Apply ‘shear’ transformation to the Geometry object.
See coords.Coords.shear() for details.
Apply ‘spherical’ transformation to the Geometry object.
See coords.Coords.spherical() for details.
Apply ‘superSpherical’ transformation to the Geometry object.
See coords.Coords.superSpherical() for details.
Apply ‘swapAxes’ transformation to the Geometry object.
See coords.Coords.swapAxes() for details.
Apply ‘toCylindrical’ transformation to the Geometry object.
See coords.Coords.toCylindrical() for details.
Apply ‘toSpherical’ transformation to the Geometry object.
See coords.Coords.toSpherical() for details.
Apply ‘transformCS’ transformation to the Geometry object.
See coords.Coords.transformCS() for details.
Apply ‘translate’ transformation to the Geometry object.
See coords.Coords.translate() for details.
Apply ‘translate’ transformation to the Geometry object.
See coords.Coords.translate() for details.
Create or destroy the property array for the Geometry.
A property array is a rank-1 integer array with dimension equal to the number of elements in the Geometry. Each element thus has its own property number. These numbers can be used for any purpose. They play an import role when creating new geometry: new elements inherit the property number of their parent element. Properties are also preserved on most geometrical transformations.
Because elements with different property numbers can be drawn in different colors, the property numbers are also often used to impose color.
Parameters:
prop: a single integer value or a list/array of integer values. If the number of passed values is less than the number of elements, they wil be repeated. If you give more, they will be ignored.
The special value ‘range’ will set the property numbers equal to the element number.
A value None (default) removes the properties from the Geometry.
blocks: a single integer value or a list/array of integer values. If the number of passed values is less than the length of prop, they wil be repeated. If you give more, they will be ignored. Every prop will be repeated the corresponding number of times specified in blocks.
Get the coords data.
Returns the full array of coordinates stored in the Geometry object. Note that subclasses may store more points in this array than are used to define the geometry.
Return the dimensionality of the Geometry, or -1 if unknown
Return a deep copy of the Geometry object.
The returned object is an exact copy of the input, but has all of its data independent of the former.
Return a copy of the Geometry scaled to the given size.
size can be a single value or a list of three values for the three coordinate directions. If it is a single value, all directions are scaled to the same size. Directions for which the geometry has a size smaller than tol times the maximum size are not rescaled.
Write a Geometry to a .pgf file.
If fil is a string, a file with that name is opened. Else fil should be an open file. The Geometry is then written to that file in a native format, using sep as separator between the coordinates. If fil is a string, the file is closed prior to returning.
Functions defined in module fe
Returns the fe Model obtained from merging individual meshes.
The input arguments are (coords,elems) tuples. The return value is a merged fe Model.
Sort a set of face loaded elements by the loaded face local number
ind is a (nelems,2) array, where ind[:,0] are element numbers and ind[:,1] are the local numbers of the loaded faces
Returns a dict with the loaded face number as key and a list of element numbers as value.
For a typical use case, see the FePlast example.