morphogen.homogenization.zmat¶
Material files of Z-mat (the material library of Z-set: ARMINES, ONERA, Transvalor) read
into morphoGen’s materials, and what of that library morphoGen covers (COVERAGE).
A material file of Z-mat assembles a behaviour from bricks (Besson, Cailletaud, Chaboche & Forest, Non-linear mechanics of materials, 2010):
***behavior gen_evp
**elasticity isotropic
young 200000.
poisson 0.3
**thermal_strain isotropic
alpha 1.2e-5
**potential gen_evp ev
*criterion mises
*flow norton
n 7.
K 400.
*kinematic nonlinear
C 15000.
D 300.
*isotropic constant
R0 130.
***return
write_zmat() writes the elastic, von Mises and porous materials of morphoGen as such
files (a behaviour identified on the response of a morphology, for Z-set).
read_zmat() reads the behaviours gen_evp and reduced_plastic (an elasticity,
a thermal strain, potentials with their criterion, flow, isotropic and kinematic
hardening), porous_plastic (porous potentials: a porous criterion, a flow, an isotropic
hardening, a nucleation; coefficients that depend on the porosity as tables, fs = f;
the initial porosity from *initialize_variable) and linear_elastic; comments start
with %. zmat_material() turns one into a
Material:
integrated by morphoGen’s own kernels (finite elements, FFT, GPU), as
Plasticity, when it is one potential with the von Mises criterion, a Norton flow or time-independent plasticity, an isotropic hardeningconstant,linear,nonlinear,linear_nonlinearornonlinear_sum(three saturating terms at most, without softening) and kinematic hardeninglinear(Prager) ornonlinear(Armstrong-Frederick, four at most), on an isotropic elasticity (elastic behaviours: any elasticity);porous_plasticby morphoGen’s kernels (on the CPU), asPorousPlasticity: one porous potential with the criteriongurson(q1,q2,q3 = q1²as in Z-mat, the effective porosityfs: the porosity, or a table of it, Tvergaard and Needleman’s coalescence),rousselier,modified_rousselierorelliptic(C,F: numbers or tables of the porosity; Abouaf’s compaction), a Norton or rate-independent flow, the isotropic hardenings of gen_evp and the nucleationconstant,gaussianorexponential(with its thresholdyield), the kinematic hardening of gen_evp (*kinematic linearandnonlinear, four at most) with the criteriagursonandelliptic, on an isotropic elasticity; the modifiers of finite strains (lagrange_rotate_no_J…) give way to morphoGen’s logarithmic strains, chosen by the solver;otherwise, as an MFront behaviour (
zmat_mfront_source(), the brickStandardElastoViscoPlasticity: Hill’s criterion, the flowshyperbolic,double_norton,norton_exp,strain_hardening(as user-defined viscoplastic flows),power_lawand tabulated isotropic hardening, softening,nonlinear_evrad(Burlet-Cailletaud), several potentials), written in a cache folder and compiled by MFront, integrated by MGIS (morphogen.homogenization.mfront).
Conventions: the tensors of Z-set have the components (11, 22, 33, 12, 23, 31), so that the
coefficients hill1 … hill6 of its Hill criterion, sqrt(3/2 s : M : s) with
M diagonal on the deviator s (von Mises when they are all 1), become those of TFEL,
whose Hill stress is F (s11 - s22)^2 + G (s22 - s33)^2 + H (s33 - s11)^2 + 2 L s12^2 + 2 M
s13^2 + 2 N s23^2 (not the order of Hill’s paper): L = 3/2 hill4, M = 3/2 hill6,
N = 3/2 hill5, and F, G, H giving the same normal terms (checked by the yield
stresses in tension and in each shear); the reference temperature of the thermal strain is
morphoGen’s natural
state (the loading paths give changes of temperature). Coefficients depending on the
temperature or other variables, interactions between potentials, damage and the other
models are not translated: COVERAGE lists them with what morphoGen offers instead.
- morphogen.homogenization.zmat.BEHAVIOURS = ('gen_evp', 'reduced_plastic', 'linear_elastic', 'porous_plastic')¶
Behaviours of Z-mat read by
read_zmat()
- class morphogen.homogenization.zmat.ZmatPotential(name: str, criterion: tuple = ('mises', {}), flow: tuple = ('plasticity', {}), isotropic: list = <factory>, kinematic: list = <factory>, porous: bool = False, nucleation: tuple | None = None, shear_anisotropy: tuple | None = None)[source]¶
Bases:
objectA potential of a
gen_evpbehaviour, or a porous potential of aporous_plasticone: its name and bricks(type, coefficients): criterion (or porous criterion), flow, isotropic and kinematic hardening (lists), and for porous potentials the nucleation(type, coefficients, crack_like)and the shear anisotropy.
- class morphogen.homogenization.zmat.ZmatBehaviour(kind: str, elasticity: tuple, thermal_strain: tuple | None = None, potentials: list = <factory>, modifier: str = '', initial: dict = <factory>, options: dict = <factory>)[source]¶
Bases:
objectA behaviour of a material file of Z-mat: its type, elasticity and thermal strain
(type, coefficients)and potentials; its modifier (lagrange_rotate…), the values of*initialize_variableand the other options (**name-> lines).
- morphogen.homogenization.zmat.read_zmat(source) list[ZmatBehaviour][source]¶
The behaviours of a material file of Z-mat (a path or its text): see the module.
- morphogen.homogenization.zmat.zmat_mfront_source(behaviour: ZmatBehaviour, name: str = 'ZmatBehaviour') str[source]¶
The MFront source of a
gen_evpbehaviour (the brickStandardElastoViscoPlasticity, one inelastic flow per potential; see the module).
- morphogen.homogenization.zmat.zmat_material(source, *, name: str | None = None, directory=None, behaviour: int = 0, native: bool = True, porosity: float | None = None)[source]¶
The
Materialof the behaviourbehaviourof a material file of Z-mat (path or text): morphoGen’s kernels when they integrate it (unlessnativeis false: MFront for all plastic behaviours, e.g. for the exports to other codes), otherwise an MFront behaviour whose source is written indirectory(by default~/.cache/morphogen/zmat) under the namename(by default the stem of the file); see the module.porosity: the initial porosity of aporous_plasticbehaviour (by default that of its*initialize_variable).
- morphogen.homogenization.zmat.mfront_name(stem: str) str[source]¶
A name of MFront behaviour from the stem of a file:
Zmatand its letters and digits (the prefix avoids the names of TFEL’s classes, such asHill).
- morphogen.homogenization.zmat.describe(source, behaviour: int = 0) dict[source]¶
How a behaviour of a Z-mat file is translated:
"native"(morphoGen’s kernels, with the configuration of the material) or"mfront"(and why).
- morphogen.homogenization.zmat.write_zmat(material, path=None, *, title: str = '', digits: int | None = None) str[source]¶
The material file of Z-mat of a material (a
Materialor the mapping of its configuration), whichread_zmat()andzmat_material()read back as the same material: alinear_elasticbehaviour (isotropic, cubic or anisotropic elasticity); agen_evpbehaviour of one von Mises potential (a Norton flow or time-independent plasticity, one isotropic hardeningconstant,linear,nonlinear,linear_nonlinearornonlinear_sum, the kinematic termslinearornonlinear) on an isotropic elasticity, with an isotropic thermal strain; or aporous_plasticbehaviour of one porous potential (Gurson’s criterion with the table of its effective porosity, Rousselier’s or the elliptic one with the tables of its coefficients, the flow, kinematic terms and isotropic hardening of the matrix, the nucleation), its initial porosity in*initialize_variable(as in the examples of Z-mat’s manual). The numbers are written in full (they read back exactly), or withdigitssignificant digits. Written inpathwhen it is given;title: a comment at the top. Crystal plasticity and MFront behaviours are not written (MFront sources describe them).
- morphogen.homogenization.zmat.COVERAGE = [('model', 'linear_elastic', 'native', 'isotropic, cubic, orthotropic, transverse, anisotropic'), ('model', 'gen_evp', 'native', 'one potential of von Mises or Hill; the others through MFront'), ('model', 'reduced_plastic', 'native', 'as gen_evp'), ('model', 'finite_strain crystal (Méric-Cailletaud)', 'elsewhere', 'crystal_plasticity, small and finite strains (CrystalPlasticity)'), ('model', 'porous_plastic (one porous potential)', 'native', 'PorousPlasticity: small and finite strains, the CPU and the GPU'), ('porous_criterion', 'gurson, rousselier, modified_rousselier, elliptic', 'native', "GTN (q3 = q1², fs = f or a table: coalescence), Rousselier, Abouaf's elliptic (C, F tables of f)"), ('porous_criterion', 'cam_clay, fkm, zhang_niemi, elliptic_aniso, elliptic_fiber', 'no', ''), ('kinematic (porous_plastic)', 'linear, nonlinear', 'native', 'gurson and elliptic: the potential of σ - X (Besson & Guillemer-Neel 2003), four at most; not rousselier'), ('strain_nucleation', 'constant, gaussian, exponential (yield)', 'native', 'Chu-Needleman; not crack_like, porosity_yield'), ('porous_plastic', 'several porous potentials, Hf, Hp, *shear_anisotropy hill, broken_behavior, adiabatic_heating', 'no', ''), ('model', 'damage elasticity, aniso_damage', 'user', 'an MFront law'), ('model', 'hyper_elastic (Mooney, Ogden, Arruda-Boyce, neo-Hookean)', 'user', "an MFront law; morphoGen's finite strains: Hencky's elasticity"), ('model', 'linear_viscoelastic, viscoelastic_spectral', 'user', 'an MFront law'), ('model', 'needleman, crisfield, chaboche, generalized debonding', 'elsewhere', 'cohesive zone elements (morphogen.fracture.cohesive)'), ('model', 'diffusion, coefficient_diffusion', 'elsewhere', 'coupling.diffusion (transient)'), ('elasticity', 'isotropic, cubic, orthotropic, transverse, anisotropic', 'native', 'crystals turned by the orientations of their grains'), ('elasticity', 'coefficients depending on the temperature', 'no', ''), ('thermal_strain', 'isotropic', 'native', 'expansion (crystals: anisotropic)'), ('criterion', 'mises', 'native', ''), ('criterion', 'hill', 'native', 'hill1 ... hill6 (components 11, 22, 33, 12, 23, 31); Hill (F, G, H, L, M, N) for MFront with the models that need it'), ('criterion', 'tresca', 'user', "MFront's Hosford criterion with a large exponent"), ('criterion', 'linear_drucker_prager, cast_iron, karafillis_boyce, nouailhas, 2M1C', 'user', 'an MFront law'), ('flow', 'plasticity', 'native', 'rate-independent'), ('flow', 'norton', 'native', 'dp/dt = <f/K>^n (n >= 1; MFront otherwise)'), ('flow', 'hyperbolic, double_norton, norton_exp, strain_hardening', 'mfront', 'user-defined viscoplastic flows of the brick'), ('flow', 'sellars_tegart, gsell, modified_visco, function, flow_sum', 'user', "UserDefinedViscoplasticity of MFront's brick"), ('isotropic', 'constant, linear, nonlinear, linear_nonlinear, nonlinear_sum', 'native', 'three saturating terms at most, without softening (MFront otherwise)'), ('isotropic', 'power_law', 'mfront', 'UserDefined isotropic hardening'), ('isotropic', 'by_point, iso_table, linear_pp, nonlinear recovery', 'user', "MFront's Data hardening (tables)"), ('kinematic', 'linear, nonlinear', 'native', 'Prager, Armstrong-Frederick (four at most)'), ('kinematic', 'nonlinear_evrad', 'mfront', 'Burlet-Cailletaud'), ('kinematic', 'ziegler, aniso_nonlinear, nonlinear with recovery', 'user', 'an MFront law'), ('potential', 'several gen_evp potentials', 'mfront', 'one inelastic flow per potential'), ('potential', 'interactions between potentials', 'no', ''), ('modifier', 'lagrange_rotate, lagrange_polar (finite strains)', 'elsewhere', 'finite strains: logarithmic strains (Hencky) of the loading paths'), ('modifier', 'plane_stress', 'no', "morphoGen's volume elements are 3D"), ('simulation', '****simulate (material point)', 'elsewhere', 'loading paths of a single material point (PathResult) and of volume elements'), ('optimization', '****optimize (identification)', 'elsewhere', 'homogenization.identification: von Mises parameters on references (material points), the behaviour found written back by write_zmat')]¶
(category, Z-mat brick or model, status, what morphoGen offers). Status: “native” (morphoGen’s kernels), “mfront” (translated by
zmat_material()into an MFront behaviour), “elsewhere” (morphoGen has it under another form), “user” (an MFront law of the user), “no”.- Type:
What of Z-mat’s library morphoGen covers