morphogen.homogenization.materials¶
Materials of the phases: linear (thermo-)elasticity and the transport phenomena of one scalar potential (heat conduction, electrical conduction, dielectric and magnetic polarization, diffusion), isotropic or anisotropic (crystals), and voids.
Every transport phenomenon is a flux proportional to the gradient of a potential,
flux = -K grad(potential) without sources (TRANSPORT): Fourier’s law (q = -k
grad T, the conductivity), Ohm’s law (j = -sigma grad V, the
electrical_conductivity), electrostatics (D = -eps grad V, the permittivity),
magnetostatics without currents (B = -mu grad psi, the permeability) and Fick’s law
(J = -D grad c, the diffusivity). They share their solvers, their boundary
conditions and their bounds; a phase whose coefficient is zero is inert for that physics
(an insulator), as a void is for all.
Thermal expansion makes the stress sigma = D (eps - alpha dT) for a change of
temperature dT from the stress-free state; a crystal’s expansion tensor turns with it.
An isotropic elastic material may also yield: von Mises elasto-(visco)plasticity with
isotropic and kinematic hardening (Plasticity,
for the loading paths of morphogen.homogenization.nonlinear), or porous
elasto-(visco)plasticity (Gurson-Tvergaard-Needleman, Rousselier, the elliptic criterion
of compaction: PorousPlasticity); the linear
properties use its elasticity. A crystal may slip on its slip systems: the crystal
plasticity of Méric and Cailletaud (
CrystalPlasticity), which turns with the orientation of each grain.
Elasticity matrices use the Voigt order (11, 22, 33, 23, 31, 12) with engineering
shear strains, so that sigma = D eps (morphogen.homogenization.elements). The
matrices of a crystal are given in its own axes; a crystal orientation (Bunge Euler
angles (phi1, Phi, phi2) in degrees, morphogen.orientations) turns them into
the axes of the sample: C_ijkl = g_pi g_qj g_rk g_sl C'_pqrs with crystal = g @
sample.
- morphogen.homogenization.materials.TRANSPORT = {'dielectric': 'permittivity', 'diffusion': 'diffusivity', 'electrical': 'electrical_conductivity', 'magnetic': 'permeability', 'thermal': 'conductivity'}¶
the name of each physics and the parameter of
Materialthat holds itsK(thermal: theconductivity, or the tensorconductivitiesof a crystal)- Type:
The transport phenomena of one scalar potential,
flux = -K grad(potential)
- morphogen.homogenization.materials.TRANSPORT_LAWS = {'dielectric': ('electric potential', 'electric displacement', 'D = -eps grad V'), 'diffusion': ('concentration', 'mass flux', "Fick's law J = -D grad c"), 'electrical': ('electric potential', 'current density', "Ohm's law j = -sigma grad V"), 'magnetic': ('magnetic scalar potential', 'magnetic induction', 'B = -mu grad psi'), 'thermal': ('temperature', 'heat flux', "Fourier's law q = -k grad T")}¶
The potential, the flux and the law of each transport phenomenon (for the messages and the documentation)
- morphogen.homogenization.materials.PHYSICS = ('elastic', 'thermal', 'electrical', 'dielectric', 'magnetic', 'diffusion')¶
elasticity and the transport phenomena
- Type:
The physics of the linear problems
- morphogen.homogenization.materials.transport_physics(physics: str) bool[source]¶
Whether
physicsis a transport phenomenon ofTRANSPORT(a scalar potential), not elasticity; an unknown name is an error.
- morphogen.homogenization.materials.voigt_to_tensor4(d) ndarray[source]¶
Fourth-order tensor(s)
C_ijklof Voigt matrices (…, 6, 6).
- morphogen.homogenization.materials.tensor4_to_voigt(c) ndarray[source]¶
Voigt matrices (…, 6, 6) of fourth-order tensors with the minor symmetries.
- morphogen.homogenization.materials.rotate_stiffness(d, euler) ndarray[source]¶
Elasticity matrix of a crystal (crystal axes) in the sample axes, for one orientation (shape (6, 6)) or several (shape (n, 6, 6)).
- morphogen.homogenization.materials.rotate_conductivity(k, euler) ndarray[source]¶
Conductivity tensor of a crystal in the sample axes (
g^T K g).
- morphogen.homogenization.materials.isotropic_matrix(lam: float, mu: float) ndarray[source]¶
Elasticity matrix (6 x 6) of an isotropic material.
- morphogen.homogenization.materials.voigt_average(d) tuple[float, float][source]¶
Bulk and shear moduli of the Voigt average over uniform orientations.
- morphogen.homogenization.materials.reuss_average(d) tuple[float, float][source]¶
Bulk and shear moduli of the Reuss average over uniform orientations.
- morphogen.homogenization.materials.lame(young: float, poisson: float) tuple[float, float][source]¶
Lame coefficients (lambda, mu) from Young’s modulus and Poisson’s ratio.
- morphogen.homogenization.materials.bulk_shear(young: float, poisson: float) tuple[float, float][source]¶
Bulk and shear moduli (k, mu) from Young’s modulus and Poisson’s ratio.
- morphogen.homogenization.materials.young_poisson(bulk: float, shear: float) tuple[float, float][source]¶
Young’s modulus and Poisson’s ratio from the bulk and shear moduli.
- class morphogen.homogenization.materials.Material(young: float | None = None, poisson: float | None = None, conductivity: float | None = None, void: bool = False, stiffness: tuple | None = None, conductivities: tuple | None = None, symmetry: str = 'isotropic', expansion: float | tuple | None = None, density: float | None = None, plasticity: Plasticity | None = None, crystal_plasticity: CrystalPlasticity | None = None, mfront: object | None = None, porous_plasticity: PorousPlasticity | None = None, learned: object | None = None, electrical_conductivity: float | tuple | None = None, permittivity: float | tuple | None = None, permeability: float | tuple | None = None, diffusivity: float | tuple | None = None, refractive_index: complex | tuple | None = None, coupling: object | None = None, viscoelasticity: object | None = None, hyperelasticity: object | None = None, damage: object | None = None, swelling: float | tuple | None = None)[source]¶
Bases:
objectLinear material of a phase, or a void.
Isotropic materials:
youngandpoissondefine the elastic behaviour,conductivitythe thermal one; a material may define either or both. Crystals:stiffness, the 6 x 6 elasticity matrix in the axes of the crystal (seecubic(),hexagonal(),anisotropic()), andconductivities, the 3 x 3 conductivity tensor in the same axes (orconductivitywhen it is isotropic).expansionis the thermal expansion: one coefficient, or (crystals) principal values or a 3 x 3 tensor in the axes of the crystal. In a polycrystal, each grain turns them by its orientation.swellingis likewise the strain of a unit content of a species the phase absorbs (moisture, a solvent, lithium: the hygroscopic or chemical expansion), for the effective swelling ofmorphogen.homogenization.poroelastic.density(optional) gives the effective density and specific properties. The other transport phenomena (TRANSPORT) each have their coefficient:electrical_conductivity(Ohm),permittivity(dielectrics),permeability(magnetostatics) anddiffusivity(Fick), one value or, in the axes of the crystal, three principal values or a 3 x 3 tensor; zero makes the phase inert for that physics (an insulator in a conducting composite), as a void is for all.refractive_index: the complex refractive indexn + i kof the phase at optical frequencies (a number, a pair(n, k), or one pair per wavelength), for the effective index ofmorphogen.homogenization.harmonic.couplingholds the coefficients of the strong couplings between these physics (Coupling: piezoelectric, piezomagnetic, magnetoelectric, Seebeck and pyroelectric coefficients; a mapping of them), for the coupled problems ofmorphogen.homogenization.coupled.viscoelasticity(a generalized Maxwell model),hyperelasticity(a strain energy, in finite strains) anddamage(the isotropic damage of quasi-brittle solids, Mazars’ law of concrete) give an isotropic material one of the behaviours ofmorphogen.homogenization.lawsalong loading paths (a viscoelasticity and a hyperelasticity together: finite viscoelasticity; adamageof Lemaitre or of Kachanov goes with aplasticity, whose effective stress it degrades).plasticity(isotropic materials) makes it yield along loading paths,porous_plasticity(isotropic materials) makes it a porous plastic material,crystal_plasticitymakes it slip on the systems of its lattice,mfrontgives it an MFront behaviour along them (MFrontBehaviour; its elastic parameters remain those of the linear problems and of the reference media) andlearneda law learned from data (LearnedBehaviour; likewise). A void carries neither stress nor flux.- classmethod cubic(c11: float, c12: float, c44: float, *, conductivity: float | None = None, expansion: float | None = None)[source]¶
Cubic crystal (stiffness constants in its axes); its conductivity and thermal expansion are isotropic.
- classmethod hexagonal(c11: float, c12: float, c13: float, c33: float, c44: float, *, conductivity=None, expansion=None)[source]¶
Hexagonal (transversely isotropic) crystal, axis c along the third crystal axis;
conductivityandexpansion: one value, or (basal plane, axis c).
- classmethod anisotropic(stiffness=None, *, conductivity=None, expansion=None)[source]¶
Crystal of any symmetry: 6 x 6 elasticity matrix (Voigt order 11, 22, 33, 23, 31, 12, engineering shear strains), conductivity and thermal expansion (one value, three principal values along the crystal axes, or a 3 x 3 tensor), in the axes of the crystal.
- property elastic: bool¶
- property thermal: bool¶
- has(physics: str) bool[source]¶
Whether the material has the parameters of
physics(PHYSICS): elastic ones, or the coefficient of a transport phenomenon.
- inert(physics: str) bool[source]¶
Whether the material carries nothing for
physics: a void, or a phase whose transport coefficient is zero (an insulator), left out of that problem as a pore.
- property isotropic: bool¶
- property plastic: bool¶
Whether the material yields (von Mises; nonlinear loading paths).
- property crystal_plastic: bool¶
Whether the material slips on its slip systems (crystal plasticity).
- property porous: bool¶
Whether the material is porous plastic (Gurson, Rousselier, elliptic).
- property analytic: bool¶
Whether the material has a behaviour of
morphogen.homogenization.laws(viscoelasticity, hyperelasticity, damage).
- property nonlinear: bool¶
Whether the behaviour of the material is nonlinear (loading paths).
- property expands: bool¶
Whether the material has a (nonzero) thermal expansion.
- oriented(physics: str) bool[source]¶
Whether the behaviour for
physicsdepends on the orientation (a learned law runs in the axes of its material, unless it is not oriented).
- expansion_tensor(euler=None) ndarray[source]¶
Thermal expansion tensor (3 x 3, zero without expansion) in the axes of the sample: for the orientation
euler(shape (3,) or (n, 3)), or of the crystal.
- property lame: tuple[float, float]¶
- property bulk: float¶
Bulk modulus (isotropic), or of the Voigt average of a crystal.
- property shear: float¶
Shear modulus (isotropic), or of the Voigt average of a crystal.
- moduli(average: str = 'voigt') tuple[float, float][source]¶
Bulk and shear moduli: exact for isotropic materials; for crystals, the
"voigt","reuss"or"hill"average over uniform orientations.
- mean_conductivity(average: str = 'voigt', physics: str = 'thermal') float[source]¶
Conductivity (isotropic), or the arithmetic (
"voigt") or harmonic ("reuss") mean of the principal conductivities of a crystal; likewise the coefficient of another transportphysics(TRANSPORT).
- matrix(physics: str, euler=None) ndarray[source]¶
Elasticity matrix (6 x 6), or conductivity tensor (3 x 3; that of any transport
physicsofTRANSPORT) in the axes of the sample: for the orientationeuler(Bunge angles in degrees; shape (3,) or (n, 3) for n orientations), or in the axes of the crystal.
- classmethod from_config(spec) Material[source]¶
"void", or a mapping with young/poisson or bulk/shear (isotropic), orcubic: [c11, c12, c44],hexagonal: [c11, c12, c13, c33, c44]orstiffness: 6 x 6(crystals); and/orconductivity(one value, three principal values or a 3 x 3 tensor, in the axes of the crystal); andexpansion, the thermal expansion (likewise),swelling, the strain of a unit content of an absorbed species (likewise),density,plasticity(from_config()),porous_plasticity(from_config()),crystal_plasticity(from_config()),mfront(from_config()) andlearned(the file of a learned model,from_config()); orzmat, a material file of Z-mat (its path, or a mappingfile,behaviour,name,native,porosity:zmat_material()), with aconductivityand adensity.
- morphogen.homogenization.materials.any_oriented(materials: dict[int, Material]) bool[source]¶
Whether some material depends on the orientation of its grain (anisotropic elasticity, conductivity or expansion, or slip systems): the grains and their orientations are then needed.
- morphogen.homogenization.materials.materials_from_config(spec) dict[int, Material][source]¶
Phase -> material mapping from a configuration mapping (keys may be strings).
- class morphogen.homogenization.materials.MaterialTable(mat: ndarray, stat: ndarray, matrices: ndarray, phases: tuple[int, ...], isotropic: bool, eigen: ndarray | None = None, rotations: ndarray | None = None)[source]¶
Bases:
objectMaterial of every element (voxel or tetrahedron) of a sample, for one physics.
mat[e]indexesmatrices(-1 for voids): elasticity matrices (n, 6, 6) or conductivity tensors (n, 3, 3) in the axes of the sample; one per phase, or one per grain for the oriented phases of a polycrystal.stat[e]indexesphases.eigen(elasticity) holds the thermal strain of each material for a unit change of temperature (Voigt order, engineering shears),rotationsthe orientation of each material (crystal = g @ sample; the identity for the materials of the phases that are not oriented).- property active: ndarray¶
- morphogen.homogenization.materials.material_table(phase, materials: dict[int, Material], physics: str, *, grains=None, orientations=None) MaterialTable[source]¶
Materials of the elements of phases
phaseforphysics(PHYSICS: ‘elastic’, or a transport phenomenon such as ‘thermal’ or ‘electrical’). Crystals are turned by the orientation of their grain (grains: grain of each element,orientations: Bunge angles of each grain); without them, their axes are those of the sample. The phases inert for the physics (voids, insulators:Material.inert()) have no material (mat-1).