* UDF for KAPSEL (version 3.1) [#sbf148c5]

**  List of variables in UDF for KAPSEL (input.udf) [#y1d5b4c6]

constitutive_eq: type: {Navier_Stokes, Shear_Navier_Stokes, Shear_Navier_Stokes_Lees_Edwards,Electrolyte}

Navier_Stokes
- DX: &color(blue){Girid width (this is the unit of length)};
- RHO: &color(blue){Density of fluid};
- ETA:  &color(blue){Viscosity of fluid};
- kBT:  &color(blue){Temperature of dispersion};
- alpha_v:  &color(blue){Scaling factor for fluctuating force (translation)};
- alpha_o:  &color(blue){Scaling factor for fluctuating torque (rotation)};

Shear_Navier_Stokes&br;(This type implements shear flow with zigzag shape.)
- DX:  &color(blue){Girid width  (this is the unit of length)};
- RHO:  &color(blue){Density of fluid};
- ETA:  &color(blue){Viscosity of fluid};
- kBT:  &color(blue){Temperature of dispersion};
- alpha_v:  &color(blue){Scaling factor for fluctuating force (translation)};
- alpha_o:  &color(blue){Scaling factor for fluctuating torque (rotation)};
- External_field: type: {DC, AC}:  &color(blue){Steady  shear (DC) or Oscillatory shear (AC)};
: DC|
-- shear_rate:  &color(blue){Shear rate (DC)};
: AC|
-- shear_rate:  &color(blue){Max shear rate (AC)};
-- Frequency:  &color(blue){Alternating frequency of shear flow};

Shear_Navier_Stokes_Lees_Edwards&br;(This type implements shear flow with Lees-Edwards periodic boundary condition.)
- DX:  &color(blue){Girid width  (this is the unit of length)};
- RHO:  &color(blue){Density of fluid};
- ETA:  &color(blue){Viscosity of fluid};
- kBT:  &color(blue){Temperature of dispersion};
- alpha_v:  &color(blue){Scaling factor for fluctuating force (translation)};
- alpha_o:  &color(blue){Scaling factor for fluctuating torque (rotation)};
- External_field: type: {DC, AC}:  &color(blue){Steady  shear (DC) or Oscillatory shear (AC)};
: DC|
-- shear_rate:  &color(blue){Shear rate (DC)};
: AC(unpopulated)|
-- shear_rate:  &color(blue){Max shear rate (AC)};
-- Frequency:  &color(blue){Alternating frequency of shear flow};


Electrolyte
- DX:  &color(blue){Girid width  (this is the unit of length)};
- RHO:  &color(blue){Density of fluid};
- ETA:  &color(blue){Viscosity of fluid};
- kBT:  &color(blue){Temperature of dispersion};
- alpha_v:  &color(blue){Scaling factor for fluctuating force (translation)};
- alpha_o:  &color(blue){Scaling factor for fluctuating torque (rotation)};
- Dielectric_cst:  &color(blue){Dielectric constant of fluid};
- INIT_profile: 
-- Uniform: &color(blue){use uniform ionic densities as initial state.}; 
-- Poisson_Boltzmann: &color(blue){use optimal ionic densities as initial state by solving Poisson-Boltzman Eq. for a given initial particle configuration in advance to start simulation.};
- Add_salt: type:  &color(blue){salt: salt is added, saltfree: no salt is added};
: salt|
-- Valency_positive_ion:  &color(blue){Valency of positive ions};
-- Valency_negative_ion:  &color(blue){Valency of negative ions};
-- Onsager_coeff_positive_ion:  &color(blue){Onsager transport coefficient of positive ions};
-- Onsager_coeff_negative_ion:  &color(blue){Onsager transport coefficient of negative ions};
-- Debye_length:  &color(blue){Debye screening length This causes the corresponding salt concentration to be specified automatically.};
: saltfree|
-- Valency_counterion:  &color(blue){Valency of counter ions};
-- Onsager_coeff_counterion:  &color(blue){{Onsager transport coefficient of counter ions};
- Electric_field: type:  &color(blue){ON: apply external electric field, OFF: no external electric field};
-- ON: type:  &color(blue){DC: apply steady electric field, AC: apply oscillatory electric field};
:: DC|
--- Ex:  &color(blue){Intensity of electric field in x-direction};
--- Ey:  &color(blue){Intensity of electric field in y-direction};
--- Ez:  &color(blue){Intensity of electric field in z-direction};
:: AC|
--- Ex:  &color(blue){Max intensity of electric field in x-direction};
--- Ey:  &color(blue){Max intensity of electric field in y-direction};
--- Ez:  &color(blue){Max intensity of electric field in z-direction};
--- Frequency:  &color(blue){Alternating frequency of oscillatory electric field.};

object_type: type: {spherical_particle, chain, rigid}

spherical_particle
- Particle_spec[]
-- Particle_spec[0]:  &color(blue){(0 means the 1st component)};
--- Particle_number:  &color(blue){Number of particles};
--- MASS_RATIO:  &color(blue){Density of particle / density of fluid};
--- Surface_charge:  &color(blue){Valency of particles (total charge carried by a single particle in unit of electron charge)};
--- janus_axis: select {'NONE', 'X', 'Y', 'Z'}: &color(blue){janus axis in body_fixed frame};
--- janus_propulsion: select{'OFF', 'TUMBLER', 'SQUIRMER', 'OBSTACLE'}:&color(blue){OFF=inert particle, TUMBLER=rotating particle by external torque, SQUIRMER=swimming particles by surface tangential slip, OBSTACLE=non-moving (pinned) particle};
--- janus_force: x, y, z: &color(blue){self-propulsion force};
--- janus_torque: x, y, z: &color(blue){self-propulsion torque};
--- janus_slip_vel: &color(blue){Slip velocity coeff B1};
--- janus_slip_mode: &color(blue){Blake squirmer mode B2/B1};

chain
- Chain_spec[]
-- Chain_spec[0] &color(blue){(0 means the 1st component)};
--- Beads_number:  &color(blue){Number of beads in a single chain};
--- Chain_number:  &color(blue){Number of chains in a simulation box};
--- MASS_RATIO:  &color(blue){Density of beads / density of fluid};
--- Surface_charge:  &color(blue){Valency of beads (total charge carried by a single bead in unit of electron charge)};
--- janus_axis: select {'NONE', 'X', 'Y', 'Z'}: &color(blue){janus axis in body_fixed frame};

rigid
- Rigid_spec[]
-- Rigid_spec[0] &color(blue){(0 means the 1st component)};
--- Beads_number: &color(blue){number of beads in a chain};
--- Chain_number: &color(blue){number of chains};
--- MASS_RATIO: &color(blue){mass density ratio chain/solvent};
--- Surface_charge: &color(blue){surface charge of colloid};
--- Rigid_motion: select {'fix','free'}: &color(blue){fix=forced motion, free=non-forced motion};
--- Rigid_velocity: x, y, z: &color(blue){speed of translation ### fix only ###};
--- Rigid_omega: x, y, z: &color(blue){angular velocity ### fix only ###};




A_XI:  &color(blue){Thickness of the particle-fluid boundary};

A:  &color(blue){Radius pd particles or beads};

gravity
- G:  &color(blue){Gravitational acceleration};
- G_direction:  &color(blue){Select the direction in which gravity is applied from -X , -Y , -Z.};

EPSILON:  &color(blue){Energy unit of Lennard-Jones potential};

LJ_powers: {12:6, 24:12, 36:18}:  &color(blue){Set of power exponents of the Lennard-Jones potential};

mesh
- NPX:  &color(blue){Defines the size of simulation box in x-direction as Lx=2^NPX};
- NPY:  &color(blue){Defines the size of simulation box in y-direction as Ly=2^NPY};
- NPZ:  &color(blue){Defines the size of simulation box in z-direction as Lz=2^NPZ};

time_increment: type:  
- auto: &color(blue){set delta_t automatically};
- manual: &color(blue){set delta_t manually};

auto
- factor:  &color(blue){Set delta_t = factor * min [ rho/(eta k_max^2), 1/(k_B T Gamma_a k_max^2)],};

manual
- delta_t:  &color(blue){Set delta_t manually};

switch

- ROTATION:  
-- &color(blue){ON: solve rotational motion of particles properly};
-- &color(blue){OFF: no rotational motion of particles};
//- HYDRO_int:  &color(blue){Set Correct (other options are obsolete)};
//- Stokes:  &color(blue){Set with advection (other options are obsolete)};
- LJ_truncate:  
-- &color(blue){ON: LJ without attraction (WCA potential)};
-- &color(blue){OFF: LJ with attractive part};
-- &color(blue){NONE: no pair potential at all};
- INIT_distribution: type:  
-- &color(blue){uniform_random: randomly generate initial particle positions};
-- &color(blue){random_walk:' add some deviations to a perfect FCC lattice};
-- &color(blue){FCC: place particles on FCC lattice};
-- &color(blue){BCC: place particles on a BCC lattice};
-- &color(blue){user_specify: Set initial particle positions and velocities manually};
:: (If object_type = chain, all the above options are omitted and initial chain configurations are generated by self-avoided random walk unless user_specify is selected.)|
: random_walk|
-- iteration:  &color(blue){Number of trial iteration to avoid bead-overlapping in the process of random walk};
: user_specify|
-- Particles[]
--- Particles[0]  
::: (0 means properties of the 1st particle. If you want to inclease/decrease the number of particles, select "Edit" menu -> "Add Array Elements"/"Delete Array Elements" to change the number of "Particles[]" box. Modify also "Particle_number" in "object_type" section to be consistent.)|
 - R
  - x:  x-component of initial particle position
  - y:  y-component of initial particle position
  - z:  z-component of initial particle position
 - v
  - x:  x-component of initial particle velocity
  - y:  y-component of initial particle velocity
  - z:  z-component of initial particle velocity
 - q
  - q0:  0th-component of initial quaternion
  - q1:  1st-component of initial quaternion
  - q2:  2nd-component of initial quaternion
  - q3:  3rd-component of initial quaternion
 - omega
  - x:  x-component of initial angular velocity
  - y:  y-component of initial angular velocity
  - z:  z-component of initial angular velocity

//(v3.00): pin: (Use janus_propulsion = 'OBSTACLE' if you want to pin some of the particles)|
//(v3.00)-- &color(blue){NO: do not pin any particles};
//(v3.00)-- &color(blue){YES: pin specified particles};

: FIX_CELL|
-- x: {ON, OFF} &color(blue){Set ON to avoid the drift of center of gravity in x-direction};
-- y: {ON, OFF} &color(blue){Set ON to avoid the drift of center of gravity in y-direction};
-- z: {ON, OFF} &color(blue){Set ON to avoid the drift of center of gravity in z-direction};

: pin: type:| 
-- &color(blue){''NO:'' do not pin any particles};
-- &color(blue){''YES:'' pin specified particles};
 - pin[]
  - pin[0]: Index of the 1st particle to be transitionally pined.
 - pin_rot[]
  - pin_rot[0]: Index of the 1st particle to be rotationally pined.
:: If you want to inclease/decrease the number of pined particles, select "Edit" menu -> "Add Array Elements"/"Delete Array Elements" to change the number of "pin[#]" and "pin_rot[#]" box.|

//boundary_condition: type: &color(blue){Set full_periodic  (other options are obsolete)};
//
//z_dirichlet
//- wall_velocity_x:  &color(blue){Unused};
//- wall_velocity_y:  &color(blue){Unused};
//- wall_velocity_z:  &color(blue){Unused};

: free_rigid: type:|
-- &color(blue){''NO:'' free all degrees of freedom of all rigid particles};
-- &color(blue){''YES:'' freeze some degrees of freedom of some rigid particles};
 - DOF[]
  - DOF[0]
   - spec_id: Index of the 1st particle to freeze.
   - vel (x,y,z)
   - omega (x,y,z)
:: If you want to inclease/decrease the number of freezing particles, select "Edit" menu -> "Add Array Elements"/"Delete Array Elements" to change the number of "DOF[#]" box.|

: ns_solver: OBL_INT:|
-- &color(blue){''linear:'' };
-- &color(blue){''spline:'' };

output
- GTS:  &color(blue){Number of intervals between data saving};
- Num_snap:  &color(blue){Number of data saving. Total number of simulation step is GTS * Num_snap.};
- AVS: {ON, OFF} &color(blue){Set ON if AVS data is needed. Huge disk space is used if ON.};
: ON|
-- Out_dir:  &color(blue){Name of subdirectory in which AVS data is saved. Make subdirectories ./"Out_dir" and ./"Out_dir"/avs  in advance to run KAPSEL.};
-- Out_name:  &color(blue){Set a name of AVS field data file "Out_name".fld};
-- File_Type: {BINARY, ASCII, EXTENDED};
--- &color(blue){EXTENDED};: support for HDF-5 and Paraview

- UDF:  &color(blue){Set ON};

E: &color(blue){Unused};

t:  &color(blue){Present time};

Particles[]  &color(blue){There is no data in this section of input UDF. Temporal particle positions and velocities are stored here in restart and output UDF.};
- Particles[]
 - R
 - R_raw
 - v
 - q
 - omega
 - f_hydro
 - torque_hydro
 - f_slip
 - torque_slip

RigidParticles[]  &color(blue){There is no data in this section of input UDF. Temporal particle positions and velocities are stored here in restart and output UDF.};
- RigidParticles[]
Rigidparticles[]  &color(blue){There is no data in this section of input UDF. Temporal particle positions and velocities are stored here in restart and output UDF.};
- Rigidparticles[]
 - R
 - R_raw
 - v
 - q
 - omega
 - f_hydro
 - torque_hydro
 - f_slip
 - torque_slip

resume
- Calculation: {NEW, CONTINUE} 
-- NEW: &color(blue){start a new simulation run};
-- CONTINUE: &color(blue){restart continuing simulation run from the end of the previous run.};