**Syntax:**

app_style style grad_style nspins m0 convert Q T0 grad_x grad_y grad_z

- style =
*potts/grad* - grad_style =
*temp*or*mob* - nspins = number of possible spins
- m0 = mobility constant for
*temp*grad_style or mobility at the center of domain for*mob*grad_style - convert = conversion factor for the gradients
- Q = activation energy
- T0 = temperature at the center of domain (temperature units)
- grad_x = gradient in the x direction
- grad_y = gradient in the y direction
- grad_z = gradient in the z direction

**Examples:**

app_style potts/grad temp 10000 .0006 .25 1 350 3 -3 1 app_style potts/grad temp 10000 .0006 .1 1 375 3.5 3 app_style potts/grad mob 15000 .5 1 0 0 .0024 0 0

**Description:**

This is an on-lattice application derived from the app_style potts/neighonly application which applies gradients given in three directions x,y, and z. The gradients can be either temperature or mobility gradients. If grad_style *mob* is chosen, mobility gradients are used. If grad_style *temp* is chosen, temperature gradients are used.

When the grad_style *temp* is used, the mobility of each site is assumed to depend on temperature, according to the equation m0 * exp(-Q/(KT)), where m0 is the mobility constant, K is Boltzmann's constant, T is the temperature of the site, and Q is the activation energy. The temperature of a site depends linearly on its position in the lattice. The linear function is uniquely defined by the value T0 at the center and the gradients in the x,y, and z directions, grad_x, grad_y, and grad_z, respectively. The gradients are in units of temperature per lattice spacing (defined by the lattice constant).

When the grad_style *mob* is used each site is assigned a mobility directly from the mobility gradients. The arguments Q and T0 are not used during a mobility gradient simulation. m0 is the initial mobility at the center of the domain. The mobility of each site depends linearly on its position in the lattice. The linear function is defined by the mobility gradients. The mobility gradients are in units of mobility per lattice spacing (defined by the lattice constant).

Under most circumstances a gradient will break periodicity in the gradient direction. This app requires a special method for turning off periodicity. Refer to the examples under *potts_grad* for more details on how to turn periodicity off.

Convert is an argument multiplied by the given gradients and is used to convert units as a convenience for the user.

grad_z is an optional argument and will be defaulted to zero if not used.

Convert must be > 0.

Only compatible with square and square cubic lattices.

Can only be evolved by a rejection KMC (rKMC) algorithm. See sweep for more information.

nspins must be greater than the possible spins set with the set
*site range* command.

**Related commands:**

**Default:**

grad_z = 0

**(Garcia)** A.L. Garcia, V. Tikare and E.A. Holm, "Three-Dimensional Simulation of Grain Growth of in a Thermal Gradient with Non-Uniform Grain Boundary Mobility", Scripta Met 59[6] 661- 664 (2008).