• The added line is THIS COLOR.
  • The deleted line is THIS COLOR.
* Tutorial [#f5c9dfdb]

** Normal procedure [#le4c697d]

- Obtain a sample UDF file.
- Obtain an appropriate sample UDF file for your purpose from our examples.

- Start "Gourmet" and open the sample UDF file. Modify it for your own purpose and save it as "input.udf".
- Start "Gourmet" and open the UDF file. Modify it for your own purpose and save it as "input.udf".

- Run KAPSEL as follows.
- Run KAPSEL as follows. (remove "./" if you use Windows command prompt)

    > ./kapsel/kapsel -Iinput.udf -Ooutput.udf -Ddefine.udf -Rrestart.udf
    > ./kapsel -Iinput.udf -Ooutput.udf -Ddefine.udf -Rrestart.udf

- Start "Gourmet" and open "output.udf". Load "plot.py" etc to visualize your simulation data. ([[See STEP4>InstallB]])
-- "-I" option defines the name of UDF file which contains details of simulation (type of simulation, initial conditions, physical and simulation parameters, etc...).
-- "-O" option defines the name of UDF file which contains the results (time-dependent positions and velocities of all the particles, etc...) of the simulation.
-- "-D" option defines the name of UDF file which contains definitions of KAPSEL data dormat. This is common for any simulations.
-- "-R" option defines the name of UDF file which contains values of all dynamical variables at the end of the simulation See "Re-start run" below.
-- Field data (fluid velocities, ionic densitied, etc...) is saved in a subdirectory specified in "input.udf" if "output.AVS" = "on". This requires huge disk space (GB order). No field data is saved if "output.AVS" = "off".

- Start "Gourmet" and open "output.udf". 
-- Instantaneous  positions and velocities of all the particles can be seen as variables in "Particles[]". Use slide bar at the bottom of Gourmet window to see variables at different time steps.
-- Load "plot.py" to plot time evolutions of the variables. ([[See STEP4>InstallB]])
-- Load "particleshow.py" to visualize motions of particles. ([[See STEP4>InstallB]])


** Re-start run  [#u7810c9a]

- One can re-start simulations from the end of the previous run.

- Start "Gourmet", and open "restart.udf"

- Set "resume.Calculation" = "CONTINUE"

- Increase "output.Num_step", and save it as "input2.udf"

- Run KAPSEL as follows.
- Run KAPSEL as follows.  (remove "./" if you use Windows command prompt)

    > ./kapsel/kapsel -Iinput2.udf -Ooutput2.udf -Ddefine.udf -Rrestart2.udf
    > ./kapsel -Iinput2.udf -Ooutput2.udf -Ddefine.udf -Rrestart2.udf