12.08.2013 Views

Master's Thesis - Computer Graphics and Visualization - TU Delft

Master's Thesis - Computer Graphics and Visualization - TU Delft

Master's Thesis - Computer Graphics and Visualization - TU Delft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$g SetInputText MyBox:oil<br />

$g Render<br />

# Meaning of the three add viewable comm<strong>and</strong>s above:<br />

# The first asks to add the Box itself to the graphics<br />

# The second asks to add the surfactant molecules in the box to be added<br />

to graphics<br />

# The second asks to add the oil molecules in the box to be added to graphics<br />

# If you do not like any of the default bead colors you can change as follows<br />

# $Box SetBeadColors B Red<br />

# $g UpdateViewables<br />

# Assign repulsive Bead-bead interaction parameters<br />

# If parameters for A-B is defined, B-A is not required<br />

# as they would be considered same.<br />

$cal SetA W W 25<br />

$cal SetA W O 80<br />

$cal SetA O O 25<br />

# Alternatively it is also possible to set the interaction<br />

# parameters through the CulgiBeadParametersCmds<br />

# Set up the DPD simulation<br />

$cal SetTimeStep 0.05<br />

$cal SetTemperature 1.0<br />

# We want to save Instantaeous system energy during simulation<br />

# A file named MyBox_Energy.ctf would be generated due to this<br />

$cal SetEnergySaveFrequency 10<br />

# We want to add live graphics update during simulation<br />

$cal AddSystem<strong>Graphics</strong> $g<br />

$cal Set<strong>Graphics</strong>UpdateFrequency 50<br />

# We want to save coordinates during simulation for further analysis<br />

# A file named MyBox.cda would be generated due to this<br />

$cal SetCoordinateSaveFrequency 50<br />

# Launch the simulation. Comprehensive Simulation results would be<br />

# written out in the MyBox.out file<br />

$cal RunDPD 1000<br />

set plot [$c GetXYPlotCmds]<br />

$plot SetPosition 50 50<br />

- 68 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!