"Q-tensor 3D" is an implementation of the Landau-de Gennes Q-tensor model for liquid crystals.
To use qtensor3d, a save folder needs to be created. The easiest way to do this is to use qsave
in the following manner:
qsave -b <savepath>
where <savepath>
is the save folder. This will create a save folder with the default settings, cosntants, and uflexpr files.
Settings files are in the '.yml' format. Visit PyYAML for more information.
mesh
:source
-builtin
,local
,global
, orlegacy
name
- See "Choosing a mesh" for more inforefs
- How many refinements of the mesh to complete
options
:strong_boundary
- May be given as a number or a list of numbers; specifies those boundaries where Dirichlet conditions will be enforcedweak_boundary
- May be given as a number or a list of numbers; specifies those boundaries where weak conditions will be enforced
pde
:formulation
-default
orlavrentovich
grad_desc
- If true, will use gradient descent to solve PDEgd_ls
-backtrack
,exact1
,exact2
, ornone
- Chooses the line search type of the gradient descentsolver
-dynamic
,newton
, orbuiltin_nonlinear
tol_u
- lower tolerance for dynamic solvertol_l
- upper tolerance for dynamic solvertol
- tolerance for finding a solution
solver
:ksp_type
- Krylov subspace methodpc_type
- Preconditioner type
time
:num
- Number of time stepssave_every
- Number of time steps at which to save the simulationstep
- The step size
vis
:normal
-upward
oroutwrd
- which direction the normal vector is pointing
To choose a mesh, we go into our settings.yml
file and edit the settings listed under mesh
.
We begin with the source
setting.
We may choose builtin
, local
, global
, or legacy
.
If using a builtin mesh, the only mesh implemented at the moment is the Box Mesh.
Let's say we want to create a Box Mesh of length, width and height x
, y
, and z
respectively.
Moreover, let's let xn
, yn
, and zn
be the number of nodes along the length, width, and height repectively.
To do this, we set source
to builtin
, and set name
to BoxMesh xn yn zn x y z
.
For example, for a slab with a 10 x 10 base and a height of 0.2, with a mesh size of 0.1, we would implement it as follows:
mesh:
source: builtin
name: BoxMesh 10 10 2 1 1 0.2
To use a local mesh, simply save a .msh
file inside of the save folder.
For example, if we want to use a mesh named mesh.msh
located in our save folder, we implement the following settings:
mesh:
source: local
name: mesh.msh
To use a mesh saved at an absolute file path, specify the absolute path.
For example, if we have a mesh located at /scratch/username/meshes/mesh.msh
, we would implement is as follows:
mesh:
source: global
name: /scratch/username/meshes/mesh.msh
Mainly used for the old mesh format. For instance, we would specify /scratch/username/meshes/meshX.msh
, where X
is the refinement number.
For example, the following implementation will cycle through 3 refinement levels of the mesh named as above:
mesh:
source: legacy
name: /scratch/username/meshes/mesh
refs: 0-2