The unusual properties of many multifunctional materials originate from a structural phase transformation and consequent martensitic microstructure. Phase-field models are typically used to predict the formation of microstructural patterns and subsequent evolution under applied loads. However, formulating a phase-field energy with the correct equilibrium crystal structures and that also respects the crystallographic symmetry is a formidable task in complex materials. This paper presents a simple method to construct such energy density functions for phase-field modeling. The method can handle complex equilibrium structures and crystallographic symmetry with ease. We demonstrate it on a shape memory alloy with 12 monoclinic variants. © 2010 American Institute of Physics. ͓doi:10.1063/1.3319503͔The unusual behavior of shape-memory alloys, ferroelectrics, and other multifunctional materials is driven by a structural phase transformation. Below the critical phasetransformation temperature, the crystal structure changes and this leads to multiple, symmetry-related variants. The different variants can form microstructural mixtures to satisfy applied boundary conditions. Changes in the applied loads can cause microstructural rearrangements rather than the lattice distortions that are characteristic of typical materials. This ability to rearrange microstructure leads to unusual and technologically important behavior as seen in shape-memory alloys, ferroelectrics, and other multifunctional materials. [1][2][3][4] To enable design with multifunctional materials, it is important to be able to predict the microstructural patterns. Phase field models are widely used for this purpose. 5,6,[11][12][13] They obtain microstructural patterns by minimizing the free energy E of a specimen ⍀. In the case of shape-memory alloys, that are the focus of this paper, E consists of W inter , the surface energy of the interfaces between different variants, and W aniso , the anisotropy energy that penalizes deviation of the strain ⑀͑x͒ from the crystallographically preferred states.W inter = A 0 ٌ͉⑀͉ 2 / 2 penalizes the gradient of the strain and hence the interface has finite thickness to allow easy computation. In general, constructing W aniso can be challenging; 7,14,15 it must have the appropriate minima in a high-dimensional space as well as reflect the symmetry of the crystal. This letter shows a simple method to construct W aniso by introducing a set of auxiliary scalar fields I ͑x͒. We also demonstrate the approach by calculating the microstructure in thin-film shape memory alloy NiTi with monoclinic symmetry that is of technological importance to small-scale actuators. 16 We start by introducing the scalar fields I ͑x͒, I =1, ... ,N where there are N variants. Each variant is associated with a tensor ⑀ 0 I that represents the stress-free strain. At every point, we define the average stress-free strain to be ⑀ 0 ͑x͒ = ͚ I=1 N I ͑x͒⑀ 0 I . We write the free energy of a shape-memory specimen in terms of ⑀͑x͒ and the set ͕ I ͑x͖͒ as foll...