examples.phase.missOrientation.modCircle

In this example a phase equation is solved in one dimension with a misorientation present. The phase equation is given by:

τϕϕt=α22ϕ+ϕ(1ϕ)m1(ϕ,T)2sϕ|θ|ϵ2ϕ|θ|2

where

m1(ϕ,T)=ϕ12Tϕ(1ϕ)

The initial conditions are:

ϕ=1xθ={2π/3for (xL/2)2+(yL/2)2>(L/4)22π/3for (xL/2)2+(yL/2)2(L/4)2T=1x

and boundary conditions ϕ=1 for x=0 and x=L.

Here the phase equation is solved with an explicit technique.

The solution is allowed to evolve for steps = 100 time steps.

>>> from builtins import range
>>> for step in range(steps):
...     phaseEq.solve(phase, dt = timeStepDuration)

The solution is compared with test data. The test data was created with a FORTRAN code written by Ryo Kobayashi for phase field modeling. The following code opens the file modCircle.gz extracts the data and compares it with the phase variable.

>>> import os
>>> from future.utils import text_to_native_str
>>> testData = numerix.loadtxt(os.path.splitext(__file__)[0] + text_to_native_str('.gz'))
>>> print(phase.allclose(testData))
1
Last updated on Feb 06, 2025. Created using Sphinx 7.1.2.