Skip to content

materials: strain consumers name the strain property they read - #145

Closed
petlenz wants to merge 1 commit into
feature/material-reportsfrom
feature/strain-property
Closed

petlenz wants to merge 1 commit into
feature/material-reportsfrom
feature/strain-property

Conversation

@petlenz

@petlenz petlenz commented Oct 18, 2026

Copy link
Copy Markdown
Member

What

Every small-strain consumer read the fixed property strain of its source. This adds strain_property (default "strain") next to the existing strain_source / strain_producer_name on

  • linear_elasticity, linear_stress
  • j2_plasticity, drucker_prager_plasticity
  • strain_energy_state_function, vector_strain_state_function, von_mises_state_function

Nothing changes for existing documents; incremental_linear_elasticity gets the same parameter in its own PR (#134) when the stack is rebased onto this one.

Why

The mean-field rework (overview agreed in review) produces one strain per phase: mean_field_strain publishes strain_matrix, strain_<phase>, and the phase materials consume them like any other strain. That needs the property name to be a parameter, exactly as tangent_property and nu_property already are. It is the bottom PR of the rework so every material above it can rely on it.

JSON

{"materials": [
  {"type": "external_strain_source", "name": "strain"},
  {"type": "mean_field_strain", "name": "mt_strain", "strain_source": "strain", "...": "see the composite PRs"},
  {"type": "linear_elasticity", "name": "matrix", "K": 100, "G": 40,
   "strain_producer_name": "mt_strain", "strain_property": "strain_matrix"},
  {"type": "von_mises_state_function", "name": "state",
   "strain_source": "mt_strain", "strain_property": "strain_matrix"}
]}

Tests

tests/test_strain_property.cpp: a material reads another material's stress under the new name (σ_b = ℂ : 2G ε on a deviatoric strain, closed form), the default is unchanged, a state function on the renamed property scales by 2G, a missing property is rejected at finalize(), and the JSON form. 732/732 locally (g++-14).

…n_property)

Every small-strain consumer took the strain from the fixed property "strain"
of its source. The composites that follow produce one strain per phase
("strain_matrix", "strain_<phase>"), and the phase materials have to read
those. strain_property (default "strain") names the property next to the
existing strain_source / strain_producer_name, the same way tangent_property
and nu_property do; nothing changes for existing documents.

linear_elasticity, linear_stress, j2_plasticity, drucker_prager_plasticity and
the three state functions; tests wire a material to another's stress under
the new name and check the default and a missing property.
@petlenz
petlenz force-pushed the feature/material-reports branch from 707809a to 4549791 Compare October 19, 2026 04:06
@petlenz
petlenz force-pushed the feature/strain-property branch from 0718c70 to 32f4b5d Compare October 19, 2026 04:06
@petlenz

petlenz commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Superseded: its commit (32f4b5d) is part of the mean-field stack (in #127 → #157) and lands with it.

@petlenz petlenz closed this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant