Face classes
This class represents faces of 2D and 3D elements. The are used to store and compute surface loads on elements.
Future applications will include contact.
The Faces
class is an abstract class defining the interface for all face classes.
- class femedu.elements.Faces.Faces(id, *nds, **kwargs)
abstract class: representing one face of a 2D or 3D element
- computeNodalFlux()
This is a virtual method. Any class derived from
Faces
must implement this function.
- computeNodalForces()
This is a virtual method. Any class derived from
Faces
must implement this function.
- isFace(X, N)
Abstract interface for test function.
Note
This method needs to be implemented by every derived class.
- Parameters:
X (np.array) – position vector for a point
N (np.array) – outward normal vector at X
- Returns:
True if X and N match this face. False otherwise.
- setFlux(qn, influx=False)
Defines a scalar surface flux on this Face. Coordinates n is the outward normal.
- Parameters:
qn – normal flux per unit length (or unit area in 3d)
influx – set to True if given value is an in-flux. (same as entering a negative out-flux)
- setLoad(pn, ps)
Defines surface loading on this Face. Coordinates n and s are outward normal and tangent directions, respectively. The local tangent is defined from the first to th esecond (to the third) node.
- Parameters:
pn – normal force per unit length
ps – tangential force per unit length
Derived Classes
- class femedu.elements.Face2D.Face2D(id, *nds, **kwargs)
Implementation representing one face of a 2D element
The face may be defined by two nodes (liner interpolation) or three nodes (quadratic interpolation). The node order for quadratic elements is nodes at [-1, 0, +1]
- computeNodalFlux()
Implementation of nodal flux calculation from surface flux.
Surface out-flux (in-flux) is considered positive (negative).
The surface is described as
\[{\boldsymbol\varphi}(s) = \sum_k \phi_k(s) {\bf X}_k\]where \(\phi_k(s)\) is the k-th shape function on [-1,1], and \({\bf X}_k\) is the coordinate of the k-th node.
The nodal fluxes are obtained as
\[{\bf P}_i = \int_{-1}^{+1} \phi_i(s) \: q_n \: || \boldsymbol\varphi}_{,s} || \: ds\]
- computeNodalForces()
Implementation of nodal force calculation from surface loads.
The surface is described as
\[{\boldsymbol\varphi}(s) = \sum_k \phi_k(s) {\bf X}_k\]where \(\phi_k(s)\) is the k-th shape function on [-1,1], and \({\bf X}_k\) is the coordinate of the k-th node.
The nodal forces are obtained as
\[{\bf P}_i = \int_{-1}^{+1} \phi_i(s) \left( p_n \, {\boldsymbol\varphi}_{,s} \times {\bf k} + p_s \, {\boldsymbol\varphi}_{,s} \right) ds\]
- initialize()
This method computes area and normals for
Face2D
.It is called by the constructor of the
Faces
class.
- isFace(X, N)
Implementation of the test function.
- Parameters:
X (np.array) – position vector for a point
N (np.array) – outward normal vector at X
- Returns:
True if X and N match this face. False otherwise.
- class femedu.elements.Face3D.Face3D(id, *nds, **kwargs)
Implementation representing one face of a 3D brick or tetrahedral element
The face may be defined by
three nodes: liner interpolation of triangular face
four nodes: linear interpolation of an 8-node brick.
six nodes: quadratic interpolation of triangular face
eight nodes: quadratic interpolation of a 20-node brick.
nine nodes: quadratic interpolation of a 27-node brick.
Note
The node order of 3D faces follows the node order of similar shaped 2D elements.
- initialize()
This method computes area and normals for
Face3D
.It is called by the constructor of the
Faces
class.
- isFace(X, N)
Implementation of the test function.
- Parameters:
X (np.array) – position vector for a point
N (np.array) – outward normal vector at X
- Returns:
True if X and N match this face. False otherwise.