Skip to content

Source: examples/coupled

Coupled examples

The upstream examples/coupled folder covers coupled transport-mechanics problems: stress-assisted diffusion, stress-assisted Cahn-Hilliard, diffusion-plasticity on multiple domains, and a coupled diffusion-fracture logo example.

Files in this folder

Representative input

smallstrain-cahnhilliard-2d.json is the clearest compact example of how the coupled folder is organized:

json { "dofs": { "names": ["c", "mu", "ux", "uy"] }, "elements": { "elmt1": { "type": "stresscahnhilliard", "dofs": ["c", "mu", "ux", "uy"], "material": { "type": "smallstraincahnhilliard", "parameters": { "D": 1.0, "Height": 3.5, "kappa": 0.005, "Ca": 0.0, "Cb": 1.0, "cref": 0.1, "Omega": 0.06, "E": 150.0, "nu": 0.3 } } } }, "ics": { "conc": { "type": "const", "dofs": ["c"], "icvalue": 0.1, "domain": ["alldomain"] } }, "postprocess": { "conc": { "type": "volumeintegralvalue", "dof": "c", "domain": ["alldomain"] } }, "job": { "type": "transient", "print": "dep" } }

Notes

  • stressdiffusion examples use DoFs like ["c","ux","uy"] or ["c","ux","uy","uz"].
  • stresscahnhilliard examples add the chemical-potential DoF and are the main examples in this folder that use "postprocess".
  • The logo examples show how the same coupled element is repeated over many named mesh domains with different material parameters.
  • logo2d-diff-fracture.json belongs to the coupled folder structurally, but it is already covered in more detail by the dedicated fracture page.
  • Several upstream files still include "restart": true inside "job", but the current parser ignores that field.