morphogen.coupling.fenicsx¶
Diffusion and swelling of tetrahedral meshes with FEniCSx (dolfinx): moisture or a solvent enters a sample through its exposed faces, and the sample swells and bends as it does (Mou, Dirrenberger & Le Duigou 2025 model pine cone scales and 4D-printed hygromorphs this way with FEniCS).
The activity u of the species is continuous across interfaces, each phase holds
c = S u and lets it through with the permeability D S (as in
morphogen.coupling.diffusion): S du/dt = div(D S grad u), Lagrange elements of
the order of the mesh, the exposed faces held at the activity (a number or a function of
time), the other faces impermeable, implicit Euler steps. At each output time the
sample, free of tractions, deforms elastically under the swelling strains beta c I
(small strains; isotropic phases), held only by 3-2-1 supports at three corners: its
displacement field, and the curvature of a strip fitted to the deflection of its
mid-plane (strip_curvature()). FEniCSx runs on Linux (or WSL).
- class morphogen.coupling.fenicsx.SwellingResult(times: ndarray, uptake: ndarray, saturation: float, concentration: list, displacement: list, mesh: TetMesh)[source]¶
Bases:
objectAt the output
times: the mean concentration over the meshed volume (uptake;saturationat the activity of the last time), the concentration of the nodes (that of the phase of an element around each node,S u) and their displacement (morphoGen’s order of the nodes).- property relative_uptake: ndarray¶
- morphogen.coupling.fenicsx.swelling(mesh: TetMesh, phases: dict, times, *, exposed=('z-',), activity: float | Callable[[float], float] = 1.0, initial: float = 0.0, steps: int = 20, kinematics: str = 'small') SwellingResult[source]¶
Diffusion into
meshfrom itsexposedfaces and the free swelling of the sample at the outputtimes.phases: phase -> mapping withdiffusivity,solubility(default 1),swelling(the strain per unit concentration, default 0),youngandpoisson. Each output interval takesstepsimplicit Euler steps (the first one geometrically growing, for the sqrt(t) start).kinematics:"small"(linear elasticity under the swelling strains) or"finite"(large rotations and strains:F = F_e F_swith the swelling stretchF_s = (1 + beta c) I, Saint Venant-Kirchhoff’s law ofF_eper unit volume of the swollen state, so thatP = (1 + beta c) F S_e; Newton’s method, each output reached by continuation of the concentration field, halved when it fails).
- morphogen.coupling.fenicsx.strip_curvature(mesh: TetMesh, displacement, *, axis: int = 0, normal: int = 2) float[source]¶
Curvature of a strip along
axisbending in the plane ofnormal: minus the second derivative of the deflection of the nodes of its mid-plane (least squares,w = -k x^2 / 2 + a x + b + c y), so that it is positive when the strip bends towards its lower face (-normal), astimoshenko_curvature()andMultilayer.
- morphogen.coupling.fenicsx.arc_curvature(mesh: TetMesh, displacement, *, axis: int = 0, normal: int = 2) float[source]¶
Curvature of a strip that bends into an arc (large rotations): the circle fitted (least squares, Kasa) to the deformed nodes of its mid-plane in the plane of
axisandnormal; positive when the strip bends towards its lower face.
- class morphogen.coupling.fenicsx.OxidationResult(times: ndarray, tracer: list, stress: list, displacement: list, mesh: TetMesh)[source]¶
Bases:
objectAt the
times: the oxidation tracer (amide concentration, mol/l) of each element, their stresses (Voigt order 11 22 33 23 31 12) and the displacement of the nodes.
- morphogen.coupling.fenicsx.oxidation_stresses(mesh: TetMesh, law, times, *, oxidation=None, exposed=('z-', 'z+'), poisson: float = 0.37, nodes: int = 81) OxidationResult[source]¶
Stresses of a sample oxidized through its
exposedfaces (Ernault et al. 2019): the amide profile of the diffusion-limited oxidation (ClosedLoopOxidation, default: their DGEBA/IPDA at 110 °C) at the depth of each element below the nearest exposed face, Young’s modulus and the shrinkage (expansion, a strain) oflaw(PropertyLawof the amide concentration), and the linear elastic response of the free sample (3-2-1 supports) to these eigenstrains (Poisson’s ratiopoisson, 0.37 as theirs).