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.

Zoom In Zoom Out<br />

Show View1<br />

Show View2<br />

Show View3<br />

Show View4 Module Name<br />

5.1.3 Build a program<br />

Figure 5-4 Instruction of Module Interface<br />

The previous section shows how to create a module in the sequence view. A simulation application can<br />

be built by creating a sequence of modules. Figure 5-5 shows an example of “Hybrid simulation” built<br />

in the sequence model. In this example three kinds of molecules are created: “water”, “oil” <strong>and</strong><br />

“surfactant”. Among these molecules, “oil” molecules are concentrated in a sphere. (It is a drop of oil).<br />

The red area in Figure 5-5(b) refers to this oil droplet. “Water” molecules are distributing in the other<br />

area out of the oil drop. And then 100 surfactant molecules are added to this environment (see the white<br />

<strong>and</strong> blue molecules in Figure 5-5(b)). Then the properties of each kind of molecule <strong>and</strong> the<br />

relationships among these molecules are specified. The properties about this environment such as the<br />

temperature are set as well. At the end, the parameter simulationstep is set.<br />

Figure<br />

5-5(a) shows a part of this application. Clicking the “run” item in the menu, the program will be<br />

executed. Figure 5-5(b) shows the initial state of the simulation. Figure 5-5(c) is a visual display<br />

generated during of the simulation. And Figure 5-5(d) is the end result of the simulation. As can be seen<br />

from these images, the surfactants first distribute r<strong>and</strong>omly in the whole area. Then they move to the oil<br />

gradually, <strong>and</strong> finally all of them surround the oil droplet.<br />

In the concept model, the creation of an instance of a module is almost the same as in the sequence<br />

model. The only difference is that only some kinds of modules are allowed to a certain area. For<br />

example, if the space is used to place the modules from SetViewer, the modules which are not belong to<br />

this category like DPDCalculator cannot be put in this space.<br />

Figure<br />

5-6 <strong>and</strong> Figure 5-7 show a DPD simulation program built in the concept model. First, when a<br />

DPD template is initialized, the system will show the general steps as can be seen in Figure 5-6(a).<br />

Then the first step “box1”(shown in Figure 5-6(b)), two instances of module createDPDMolecules are<br />

created. These two modules are used to add two molecules, Water <strong>and</strong> Oil. In the second step<br />

View1( Figure 5-7(a)), an instance of module AddDPDMoleucleViewable is created. In this module,<br />

only molecules Oil are chosen. So in the simulation window, only modules Oil will be displayed. Then,<br />

in the third step, Simulation1 (Figure 5-7(b)), an instance of the module Setbeadsinteractions <strong>and</strong> an<br />

- 44 -

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

Saved successfully!

Ooh no, something went wrong!