Repository navigation
Conversation
b6b98af to
ed86d1b
Compare
aef4718 to
d159bc3
Compare
|
Review findings (design, tmech expressions instead of component loops, modern C++, comments, tests, correctness). Severity: must = wrong result, hang, build break or unreachable feature; should = design, duplication, accuracy; nit = style. inclusion + mean_field_composite — needs changes
|
ed86d1b to
46c99de
Compare
d159bc3 to
3188477
Compare
|
Rebased on the Eshelby-node refactor of #128:
Still open from the review (not part of the refactor): symmetrising the self-consistent tangent for mixed shapes, the ½ relaxation, dilute's |
46c99de to
cced83c
Compare
3188477 to
a4f0b0a
Compare
cced83c to
7d5a01f
Compare
a4f0b0a to
9c83c8c
Compare
|
Producer/consumer pass: |
7d5a01f to
1a2e21a
Compare
9c83c8c to
2bcebfa
Compare
1a2e21a to
13a8bd0
Compare
2bcebfa to
c88bed0
Compare
13a8bd0 to
f64e188
Compare
5434109 to
7bd385b
Compare
f64e188 to
6528f13
Compare
7bd385b to
c23516a
Compare
6528f13 to
5d53585
Compare
c23516a to
4e04cb7
Compare
5d53585 to
57ada14
Compare
4e04cb7 to
c43505c
Compare
…ent producer over phases The composite consumes the phases' produced tangents, fractions and Eshelby tensors and produces the effective tangent and the concentrations; the stress is a linear_stress on the tangent. It reaches into no other node: no material_ref, no eshelby(nu), no isotropisation of the matrix. Self-consistent is a graph cycle closed by one local edge: isotropic_moduli on the composite tangent produces nu of the effective medium, the Eshelby nodes read it with nu_edge = local (from nu_initial on the first pass), and one update() is one relaxed Picard step with "residual" as its error. The matrix is a phase with its own Eshelby node, so its shape is no longer a hard-coded sphere. material_point_evaluator closes the fixed point per host call (residual_property, residual_tolerance, max_passes; the report point names them). isotropic_moduli with a non-positive tolerance projects without the isotropy check, which the effective medium needs.
57ada14 to
6520437
Compare
c43505c to
655efa4
Compare
Closes #107, closes #143. Part of the uvwmaterial port (#94); stacked on #130.
mean_field_tangent: dilute, Mori–Tanaka and self-consistent effective stiffness as a tangent producer overphasenodes (#130).matrixandphasesare phases (produced tangent, fraction and Eshelby tensor);kerneldilute | mori_tanaka | self_consistent. Outputstangent,concentration_<phase>for every phase (the matrix included) andresidual; the stress is alinear_stresson the tangent. Dilute: Tᵢ = (I + Sᵢ : Cₘ⁻¹ : (Cᵢ − Cₘ))⁻¹; Mori–Tanaka: Aᵢ = Tᵢ : (cₘ I + Σ cⱼ Tⱼ)⁻¹. The Eshelby tensors come in as properties, so their Poisson's ratio is whatever node produces it (isotropic_moduliof the matrix tangent, or a constant) — the composite reaches into no other node and isotropises nothing.Self-consistent as a graph cycle. Every phase, the matrix included (its own Eshelby node — closes #143), is embedded in the effective medium, whose ν is
isotropic_modulion this node'stangent(tolerance: 0, the projection without the isotropy check). The Eshelby nodes consume that ν over a local edge ("nu_edge": "local", starting fromnu_initial):EdgeKind::Localimposes no ordering, so oneupdate()is one relaxed Picard step (relaxation, default 0.5) on the tangent of the previous pass, andresidual= ‖C_new − C‖/‖C_new‖. The fixed point is run by whoever callsupdate():material_point_evaluatorgetsresidual_property,residual_tolerance,max_passesand repeats the graph update per host call until the residual is below tolerance (report documents:"point": {..., "residual": "scs::residual", "tolerance": 1e-10, "max_passes": 200}).The old version iterated inside the node with
material_refcallseshelby(nu)into the inclusions and a hard-coded sphere for the matrix; both are gone.isotropic_moduliwith a non-positivetoleranceprojects without the check (needed for the effective medium).Tests (
test_mean_field_tangent, 13): a phase republishes sphere, cylinder and spheroid tensors from its node; a phase without a shape is rejected atfinalize(); Mori–Tanaka spheres match the analytic K and G (= Hashin–Shtrikman lower bound) at c = 0.05, 0.3, 0.6 to 1e-10 with zero residual; dilute matches its closed-form K and the Mori–Tanaka limit as c → 0; two phases of one material equal one; voids soften with the exact K; Σ c A = I and thelinear_stressgives C : ε for every kernel; the self-consistent fixed point is symmetric under swapping matrix and inclusion (1e-8) and stiffer than Mori–Tanaka, converges within the pass loop and stays put on another pass; the evaluator closes the fixed point in one call; aligned fibres are transversely isotropic with E_L near Voigt; overfull composites and unknown kernels throw; JSON.Report
docs/materials/mean_field_tangent/report.json: Mori–Tanaka, dilute, self-consistent (its own Eshelby node at ν_eff over the local edge, converged per step through the point'sresidual) and unidirectional on one point, the closed forms as checks.862/862 tests pass (GCC 14, reports on).
JSON input
New material type:
mean_field_tangent. Ajson_modeldocument that loads (theFromJsontest of the PR):{"materials": [ {"type": "external_strain_source", "name": "strain"}, {"type": "constant_scalar", "name": "Km", "value": 3.0}, {"type": "constant_scalar", "name": "Gm", "value": 1.0}, {"type": "constant_scalar", "name": "Ki", "value": 60.0}, {"type": "constant_scalar", "name": "Gi", "value": 30.0}, {"type": "isotropic_tangent", "name": "Cm", "K_source": "Km", "G_source": "Gm"}, {"type": "isotropic_tangent", "name": "Ci", "K_source": "Ki", "G_source": "Gi"}, {"type": "isotropic_moduli", "name": "moduli", "tangent_source": "Cm"}, {"type": "eshelby_sphere", "name": "sphere", "nu_source": "moduli", "nu_property": "poisson_ratio"}, {"type": "constant_scalar", "name": "c", "value": 0.3}, {"type": "constant_scalar", "name": "cm", "value": 0.7}, {"type": "phase", "name": "spheres", "tangent_source": "Ci", "fraction_source": "c", "eshelby_source": "sphere"}, {"type": "phase", "name": "matrix", "tangent_source": "Cm", "fraction_source": "cm"}, {"type": "mean_field_tangent", "name": "mf", "matrix": "matrix", "phases": ["spheres"], "kernel": "mori_tanaka"}, {"type": "linear_stress", "name": "composite", "tangent_source": "mf", "strain_source": "strain"} ]}Self-consistent: the matrix phase carries an Eshelby node too, both nodes read ν of the effective medium over a local edge, and the point closes the fixed point:
{"materials": [ {"type": "isotropic_moduli", "name": "moduli_eff", "tangent_source": "mf", "tolerance": 0}, {"type": "eshelby_sphere", "name": "sphere", "nu_source": "moduli_eff", "nu_property": "poisson_ratio", "nu_edge": "local", "nu_initial": 0.35}, {"type": "phase", "name": "spheres", "tangent_source": "Ci", "fraction_source": "c", "eshelby_source": "sphere"}, {"type": "phase", "name": "matrix", "tangent_source": "Cm", "fraction_source": "cm", "eshelby_source": "sphere"}, {"type": "mean_field_tangent", "name": "mf", "matrix": "matrix", "phases": ["spheres"], "kernel": "self_consistent", "relaxation": 0.5}, {"type": "linear_stress", "name": "composite", "tangent_source": "mf", "strain_source": "strain"} ], "point": {"strain_source": "strain", "stress_source": "composite", "tangent_source": "mf", "residual": "mf::residual", "tolerance": 1e-10, "max_passes": 200}}Outputs
tangent,concentration_<phase>(matrix included),residual. Several inclusions: morephaseentries (each with its own Eshelby node) inphases.