Source: examples/phasefield
Phase-field examples¶
The upstream examples/phasefield folder contains transient diffuse-interface problems that are not fracture-specific: Allen-Cahn, Cahn-Hilliard, and Kobayashi dendrite growth.
Files in this folder¶
allencahn-2d.json: single-order-parameter Allen-Cahn evolution with a circular nucleus.cahnhilliard-2d.json: 2D Cahn-Hilliard spinodal-decomposition setup with random concentration initialization.cahnhilliard-3d.json: 3D Cahn-Hilliard version of the same model.kobayashi-dendrite.json: two-field dendrite-growth problem with order parameteretaand temperatureT.
Representative input¶
cahnhilliard-2d.json shows the standard two-field setup used in this folder:
json
{
"dofs": {
"names": ["c", "mu"]
},
"elements": {
"elmt1": {
"type": "cahnhilliard",
"dofs": ["c", "mu"],
"material": {
"type": "binarymixture",
"parameters": {
"D": 1.0e1,
"chi": 2.5,
"kappa": 0.005
}
}
}
},
"ics": {
"seed": {
"type": "random",
"dofs": ["c"],
"icvalue": 0.0,
"domain": ["alldomain"],
"parameters": {
"minval": 0.495,
"maxval": 0.505
}
}
},
"projection": {
"type": "default",
"scalarmate": ["F", "dFdC", "d2FdC2"],
"vectormate": ["gradc"]
},
"job": {
"type": "transient",
"print": "dep"
}
}
Notes¶
allencahn-2d.jsonuses the DoF name"eta", the"allencahn"element, anddoublewellmaterial parameters.cahnhilliard-*.jsonuse the DoF names["c","mu"], the"cahnhilliard"element, andbinarymixturematerial parameters.kobayashi-dendrite.jsonuses["eta","T"], the"kobayashi"element,kobayashimate, and two separate initial-condition blocks.- Every file in this folder is transient and uses
"timestepping":{"type":"be",...}. - Several upstream files still include
"restart": trueinside"job", but the current parser ignores that field.