morphogen.micromorphic.space¶
The mixed finite elements of micromorphic media and their Newton solver.
The displacement u is interpolated on the ten nodes of quadratic tetrahedra and the
n_g generalized degrees of freedom (the components of the microdeformation, a scalar
micromorphic variable…) on their four corners: one order lower, so that the relative
deformation ∇u - χ can vanish (a penalty on it with equal orders locks). The degrees
of freedom are numbered node by node (three components of u, then n_g on a
corner); the sparse pattern of the matrix follows from the node graph of the mesh, and
the element matrices, computed by chunks of elements in parallel, are added into it in
place (one pass, no list of triplets: an element of the full micromorphic medium has 66
degrees of freedom, 4356 entries).
Elements are integrated at the four points of the degree-two rule of the tetrahedron (exact for the products of the gradients of quadratic functions and of linear functions), where the behaviours keep their internal variables.
The solver (MixedProblem.run()) grows prescribed degrees of freedom with a load
factor; Newton’s method with a line search, the steps divided when it fails.
- morphogen.micromorphic.space.POINTS = array([[0.5854102, 0.1381966, 0.1381966, 0.1381966], [0.1381966, 0.5854102, 0.1381966, 0.1381966], [0.1381966, 0.1381966, 0.5854102, 0.1381966], [0.1381966, 0.1381966, 0.1381966, 0.5854102]])¶
Gauss points (barycentric coordinates) and weights of the elements
- morphogen.micromorphic.space.WEIGHTS = array([0.25, 0.25, 0.25, 0.25])¶
Gauss points (barycentric coordinates) and weights of the elements
- morphogen.micromorphic.space.CHUNK = 2048¶
8 x 66² bytes each)
- Type:
Elements whose matrices are computed together (memory
- class morphogen.micromorphic.space.MixedSpace(mesh: TetMesh, n_g: int)[source]¶
Bases:
objectThe degrees of freedom of a mesh (made quadratic if it is linear, with straight edges): three displacements per node,
n_ggeneralized ones per corner node (see the module).- property n_local: int¶
- dofs(nodes, components) ndarray[source]¶
The degrees of freedom (nodes x components) of components (0-2:
u, 3…: the generalized ones, on corner nodes only) of nodes.
- add(first, ke, fe, data, rhs) None[source]¶
Add the matrices
keand vectorsfeof the elementsfirst....
- class morphogen.micromorphic.space.PathResult(loads: ndarray, reactions: list, iterations: ndarray, values: ndarray, state: ndarray, fields: list = <factory>, states: list = <factory>, time_s: float = 0.0)[source]¶
Bases:
objectThe steps of a problem: load factors, reactions (steps x prescribed sets x components of each set, summed over its nodes), Newton iterations, the final degrees of freedom and internal variables and, with
fields, the degrees of freedom and the internal variables of the steps.
- class morphogen.micromorphic.space.MixedProblem[source]¶
Bases:
objectA boundary value problem on a
MixedSpace; subclasses give_assemble(values, state, tangent) -> (residual, matrix data or None, new state)(the residual: the internal forces, no external ones) and_initial_state().- run(prescribed, load: float = 1.0, *, steps: int = 10, tol: float = 1e-06, max_newton: int = 25, max_cuts: int = 12, fields: bool = False, refactor: float = 0.0, ordering: str = 'COLAMD', duration: float = 1.0, predictor: bool = False) PathResult[source]¶
Grow the prescribed degrees of freedom to
loadtimes their values instepssteps (divided when Newton’s method fails): entries(nodes, components, value), components 0-2 for the displacement and 3… for the generalized ones (corner nodes only), the value a number or an array of the nodes x components (0: held). The factors of the tangent (SuperLU, columnordering) are kept from an iteration to the next while each divides the residual by more than1 / refactor(a modified Newton method for large problems, whose cost the factorization dominates; by default 0, Newton’s method: stale tangents may miss the bifurcation of a softening body).duration: the time of the whole load, for viscous behaviours (a step lasts its fraction of it: the attribute_dtof the problem during its iterations).predictor: the iterations of a step start from the free degrees of freedom that the last converged tangent predicts for the prescribed increment (K_ff Δu_f = -K_fd Δu_d), instead of the converged ones, which strain the elements along the loaded boundary alone: there they may yield, and the iterations of a plastic body stall on that first guess; when they fail, the same step from the converged ones (near a bifurcation, the tangent may predict another branch).