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¶
smallstraindiff-2d.jsonandsmallstraindiff-3d.json: stress-assisted diffusion using"type":"stressdiffusion"andsmallstraindiffusionmaterial.smallstrain-cahnhilliard-2d.jsonandsmallstrain-cahnhilliard-3d.json: stress-assisted Cahn-Hilliard coupling using"type":"stresscahnhilliard"andsmallstraincahnhilliard.smallstrain-diff-j2-2d-logo.json: imported multi-domain logo mesh with domain-dependentsmallstraindiffusionj2plasticitymaterials.logo2d-diff-fracture.json: imported multi-domain diffusion-fracture problem usingdiffusionacfracture. This model is described in more detail in DiffusionACFracture.- Geometry helper:
logo2d-multi.geo.
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¶
stressdiffusionexamples use DoFs like["c","ux","uy"]or["c","ux","uy","uz"].stresscahnhilliardexamples 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.jsonbelongs to the coupled folder structurally, but it is already covered in more detail by the dedicated fracture page.- Several upstream files still include
"restart": trueinside"job", but the current parser ignores that field.