20.07.2015 Views

PhD Thesis - staffweb - University of Greenwich

PhD Thesis - staffweb - University of Greenwich

PhD Thesis - staffweb - University of Greenwich

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>PhD</strong> <strong>Thesis</strong> by John Ewer.momentum components. Also variable usage is determined by simulation type. Using explicitlydeclared cell class attributes for cell properties (e.g. "cell.pressure", "cell.old_pressure","cell.last_pressure", and "cell.previous_pressure") would always use storage regardless <strong>of</strong> theactual requirements <strong>of</strong> simulation. It was decided that simple "data" arrays <strong>of</strong> properties shouldbe created and then indexed by parameter type identifiers (See Figure 3.7.7-2). The "slots", inthe data array, can then be assigned as required by the simulation. This was particularlyimportant, for example, in a simple heat-transfer simulation where the overhead <strong>of</strong> storing theother flow variables is highly undesirable. This approach also allowed for functional data accesswith expressive selection arguments, and ease <strong>of</strong> data monitoring. The argument against usingsuch a method revolves around the fact that it is then possible to confuse the indexing to theslots. In order to prevent inappropriate access to the slots, the indexing mechanisms were madeprivate to the class and embedded within data access functions.Array <strong>of</strong> cell objectsdataPRESSURENEWESTCELLLASTOLDnum_<strong>of</strong>_facesArray <strong>of</strong> point objectsmaterialvolumeindex linkPOINTArray <strong>of</strong> face objectsdataxyindex linkFACEzSKIN_FRICTIONareanum_<strong>of</strong>_pointsFIGURE 3.7.7-2 : Re-engineered Object Oriented data structures in C++.3-63

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

Saved successfully!

Ooh no, something went wrong!