# LC Rotation - Simulation object

The Liquid crystal (LC) rotation grid attribute allows you to specify a spatially varying LC director orientation in terms of theta, phi.

Liquid crystals are composed of rod-like molecular structures which have rotational symmetry with respect to a long axis. Therefore, liquid crystals have spatially varying uni-axial optical properties. The refractive indices with respect to the long and short molecular axes are called extraordinary \( n_ e\) and ordinary \( n_o\) respectively, see figure above.

Rotational symmetry, allows the transformation matrix to reduced to a function of two rotational angles (θ, ϕ).

$$\mathbf{U} =U_z U_y= \begin{bmatrix} \cos\phi & -\sin\phi& 0 \\ \sin\phi & \cos\phi & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} \cos\theta & 0 & \sin\theta \\ 0 & 1 & 0 \\ -\sin\theta & 0 & \cos\theta \end{bmatrix}=\begin{bmatrix} \cos\theta \cos\phi & -\sin\theta & \sin\theta \sin\phi \\ \cos\theta \sin\phi & \cos\phi & \sin\theta \sin\phi \\ -\sin\theta & 0 & \cos\theta \end{bmatrix}$$

and the permittivity tensor in the reference (or simulation ) coordinate system (x,y,z) is transformed to the principal coordinate system (X,Y,Z) via a rotation about z, and the y.

$$ \mathbf{\tilde \varepsilon}_D =U^\ast(\theta,\phi)\tilde\varepsilon U(\theta,\phi)\tilde\varepsilon_D= \begin{bmatrix} \varepsilon_0 &0& 0 \\ 0& \varepsilon_0 & 0 \\ 0 & 0 & \varepsilon_0 \end{bmatrix}=\begin{bmatrix} n_0^2 &0& 0 \\ 0& n_0^2 & 0 \\ 0 & 0 & n_e^2\end{bmatrix}$$

In the following sections A and B, we explain how to set up an an uniform and a spatially varying orientation distribution of LCs, respectively. Note the order in which these angles are defined is important since rotations are in general non-commuting relations.

## A. Uniform distribution

As an example, we set up LCs with ne=1.74 and no=1.53 where the orientation angle of LCs is defined as θ =30° and φ=150°. Add a LC attribute object by selecting Attributes => LC orientation on the tool bar,

and set the properties "theta" and 'phi" in the edit window as shown below.

By setting these angles, FDTD creates the transformation matrix U automatically. Next, we open material database and define a diagonal anisotropic material as show below.

Note : Ordinary and Extraordinary refractive indices It is important that nxx and nyy are set to be the Ordinary index, and nzz is set to the Extraordinary index. |

Once we define the transformation matrix U and the diagonal refractive indexes, we assign these to "material" and "grid attribute names" properties on the Material tab of a structure object which we want to setup as liquid crystal.

## B. Spatially varying orientation distribution of LCs

### Method 1: Importing data using the script environment

In this case, we can use the addgridattribute , and optionally the importdataset script command to add the LC attribute and to set the spatially varying LC orientation. For example, if we want to set up LCs which are twisted in z direction as shown below, where the components of the LC director are given by ux(x,y,z)=cos(z*π), uy(x,y,z)=sin(z*π) and uz(x,y,z)=0,

we define the director distribution in a matrix variable and put the matrix into the LC attribute property. In the following script, matrix "n" is used to define the director distribution of the twisted nematic LCs, and this information is put into a dataset called LC which contains the x, y, z position data and the director orientations in an attribute called "u". At the second last line where addgridattribute command is used, a LC attribute is added to the simulation and the director distribution is set up.

Note : Magnitude of spatially varying orientation unit vector When specifying the LC orientation, it is important that the magnitude of the orientation vector be exactly 1, except in regions where you don't want the LC orientation to be set where the magnitude of the vector should be set to 0. |

# define x/y/z

x = 0;

y = 0;

z = linspace(0e-6,5e-6,100);

X = meshgrid3dx(x,y,z);

Y = meshgrid3dy(x,y,z);

Z = meshgrid3dz(x,y,z);

n = matrix(length(x),length(y),length(z),3);

# define the orientation function

n(1:length(x),1:length(y),1:length(z),1) = cos(Z*pi*1e5);

n(1:length(x),1:length(y),1:length(z),2) = sin(Z*pi*1e5);

n(1:length(x),1:length(y),1:length(z),3) = 0;

# create dataset containing orientation vectors and position parameters

LC=rectilineardataset("LC",x,y,z);

LC.addattribute("u",n);

# add LC import grid attribute

addgridattribute("lc orientation",LC);

setnamed("LC attribute","nz",50); # set resolution

Note : When setting angle theta via 'set' script command, the input must be in radians. For example: setnamed("LC attribute","theta",pi/4); |

We then add a material with diagonal anisotropy components and set up the object to use the LC attribute similarly to the case of uniform distribution.

### Method 2: Importing data from .mat file using the graphical user interface

In the edit window of the grid attribute, it is possible to import a .mat file containing a dataset with the required director distribution data by clicking on the "Import data..." button. The following code shows an example of how to save a .mat file to be imported by using the matlabsave script command.

# define x/y/z

x = 0;

y = 0;

z = linspace(0e-6,5e-6,100);

X = meshgrid3dx(x,y,z);

Y = meshgrid3dy(x,y,z);

Z = meshgrid3dz(x,y,z);

n = matrix(length(x),length(y),length(z),3);

# define the orientation function

n(1:length(x),1:length(y),1:length(z),1) = cos(Z*pi*1e5);

n(1:length(x),1:length(y),1:length(z),2) = sin(Z*pi*1e5);

n(1:length(x),1:length(y),1:length(z),3) = 0;

# create dataset containing orientation vectors and position parameters

LC=rectilineardataset("LC",x,y,z);

LC.addattribute("u",n);

# save data to .mat file

matlabsave("LC_import.mat",LC);

We then add a material with diagonal anisotropy components and set up the object to use the LC attribute similarly to the case of uniform distribution.

### Method 3: Importing data from a CSV (comma-separated values) file

From the Import menu in the top toolbar, click on Import from CSV to open the import wizard which allows you to select the CSV file to import. This file is typically created with TechWiz LCD from Sanayi System Co., Ltd. ( http://sanayisystem.com/ ).

For more details on the file format and steps for importing the data from the graphical wizard, see Import object - Liquid crystal from CSV .

The same data can also be imported using the importcsvlc script command.

### See also

Anisotropic grid attribute tips, Liquid crystal application examples