[american institute of aeronautics and astronautics 49th aiaa aerospace sciences meeting including...

10
GRASP: A New Object-Oriented Serial DSMC Simulation Package Hongli Liu * Chunpei Cai Srinivasa R. Makala New Mexico State University, Las Cruces, New Mexico, 88003-8001 A newly developed three-dimensional direct simulation Monte Carlo (DSMC) simulation package, named GRASP (“G eneralized R arefied gA sS imulation P ackage”), is reported in this paper. This package adopts a new concept of simulation engine and it utilizes many object-oriented programming features and software design patterns. As such, this package successfully resolves the problem of functionality/interface conflictions for multi-dimensional DSMC implementations. The single package has an open architecture which benefits further development and code maintenance. For three-dimensional simulations, to reduce engineering time, a hybrid grid scheme, combined with a flexible data structure which can automatically treat cubic cells adjacent to object surfaces, are implemented in this package. This package can utilize traditional structured, unstruc- tured or hybrid grids within the framework of a single code to model arbitrarily complex geometries and to simulate rarefied gas flows. Benchmark test cases indicate that this implementation has satisfactory accuracy for complex rarefied gas flow simulations. I. Introduction The spaceport program in the New Mexico state demands for more research effort and education on space weather and hypersonic flows, including rarefied gas and plasma flows, and radiations. As an initial effort, we developed a new set of compressible gas and plasma simulation packages, to serve as one of education and research platforms for rarefied gas and plasma flows. These packages are named GRASP (“G eneralized R arefied gA s S imulation P ackage”). This paper presents our implementation of the direct simulation Monte Carlo (DSMC) 1 method for multi-dimensional non-equilibrium rarefied gas flow simulations. The DSMC method is a stochastic simulation method where each simulation particle represents a large number of physical gas molecules. The simulated molecules possess physical properties such as position, velocity and, if applicable, internal energy information. If the gas is highly rarefied, molecular movements and collisions are decou- pled. Moving molecules either move freely or interact with boundaries according to a selected reflection model. In the collision step, translational and internal energy is re-distributed between molecules according to chosen collision models. When molecules cross inlet or outlet boundaries, they leave the domain without any further interactions. At the same time new molecules are introduced into the flow area from the free stream or inlet regions depending on the boundary conditions. For the DSMC method, there are several established implementations, including those educational programs by Bird 1 . Several other research groups developed different DSMC packages, such as SMILE 2 , MONACO 3 , DAC 4 , and MGDS 5 . Like most numerical methods, code architecture and grid scheme play important roles in efficient and accurate predictions by the DSMC method. One common issue for DSMC architecture is the crowdedness of code interface and functionalities, especially when people plan to design and implement one code for multi-dimensional flows, i.e., two-dimensional, axisymmetric, and three-dimensional situations. For such situations, many special conditional com- pilation sentences are generally used. In software engineering, this can be classified as conflictions between subroutine functionalities and interface. To resolve this challenging problem, we adopt Object-Oriented Programming (OOP) and several design patterns, especially the concept of abstract factory. Moreover, our DSMC implementation can utilize many different grid systems to simulate multi-dimensional rarefied gas flows. Figure 1 shows several grid types, and unstructured mesh systems are used for two-dimensional and axisymmetric simulations, to guarantee the program’s stability and precision. For three-dimensional case, this scheme divides the computational domain into uniform cu- bic solid grids to track molecular trajectories efficiently, whereas the object surface can be triangulated by any major CAD/CAE software and read in by the package. As such, GRASP is not only much efficient with unstructured meshes, but also capable of representing the objects’ surface details with high precision. During the simulation process, most of simulated molecules are efficiently tracked and moved within a cartesian coordinate system, while for a limited portion adjacent to the object surface is treated delicately like a unstructured grid scheme. Research Associate, Department of Mechanical and Aerospace Engineering. Assistant Professor, Department of Mechanical and Aerospace Engineering, AIAA Senior Member. Graduate Student, Department of Mechanical and Aerospace Engineering. 1 of 10 American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition 4 - 7 January 2011, Orlando, Florida AIAA 2011-668 Copyright © 2011 by the American Institute of Aeronautics and Astronautics, Inc. All rights reserved.

Upload: srinivasa

Post on 15-Dec-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

GRASP: A New Object-Oriented Serial DSMC Simulation Package

Hongli Liu∗ Chunpei Cai† Srinivasa R. Makala‡

New Mexico State University, Las Cruces, New Mexico, 88003-8001

A newly developed three-dimensional direct simulation Monte Carlo (DSMC) simulation package, namedGRASP (“Generalized Rarefied gAs Simulation Package”), is reported in this paper. This package adoptsa new concept of simulation engine and it utilizes many object-oriented programming features and softwaredesign patterns. As such, this package successfully resolves the problem of functionality/interface conflictionsfor multi-dimensional DSMC implementations. The single package has an open architecture which benefitsfurther development and code maintenance. For three-dimensional simulations, to reduce engineering time, ahybrid grid scheme, combined with a flexible data structure which can automatically treat cubic cells adjacentto object surfaces, are implemented in this package. This package can utilize traditional structured, unstruc-tured or hybrid grids within the framework of a single code to model arbitrarily complex geometries and tosimulate rarefied gas flows. Benchmark test cases indicate that this implementation has satisfactory accuracyfor complex rarefied gas flow simulations.

I. Introduction

The spaceport program in the New Mexico state demands for more research effort and education on space weatherand hypersonic flows, including rarefied gas and plasma flows,and radiations. As an initial effort, we developed anew set of compressible gas and plasma simulation packages,to serve as one of education and research platforms forrarefied gas and plasma flows. These packages are namedGRASP(“GeneralizedRarefied gAsSimulationPackage”).This paper presents our implementation of the direct simulation Monte Carlo (DSMC)1 method for multi-dimensionalnon-equilibrium rarefied gas flow simulations.

The DSMC method is a stochastic simulation method where eachsimulation particle represents a large numberof physical gas molecules. The simulated molecules possessphysical properties such as position, velocity and, ifapplicable, internal energy information. If the gas is highly rarefied, molecular movements and collisions are decou-pled. Moving molecules either move freely or interact with boundaries according to a selected reflection model. Inthe collision step, translational and internal energy is re-distributed between molecules according to chosen collisionmodels. When molecules cross inlet or outlet boundaries, they leave the domain without any further interactions. Atthe same time new molecules are introduced into the flow area from the free stream or inlet regions depending on theboundary conditions.

For the DSMC method, there are several established implementations, including those educational programs byBird1. Several other research groups developed different DSMC packages, such as SMILE2, MONACO3, DAC4, andMGDS5.

Like most numerical methods, code architecture and grid scheme play important roles in efficient and accuratepredictions by the DSMC method. One common issue for DSMC architecture is the crowdedness of code interfaceand functionalities, especially when people plan to designand implement one code for multi-dimensional flows, i.e.,two-dimensional, axisymmetric, and three-dimensional situations. For such situations, many special conditional com-pilation sentences are generally used. In software engineering, this can be classified as conflictions between subroutinefunctionalities and interface. To resolve this challenging problem, we adopt Object-Oriented Programming (OOP) andseveral design patterns, especially the concept of abstract factory. Moreover, our DSMC implementation can utilizemany different grid systems to simulate multi-dimensionalrarefied gas flows. Figure1 shows several grid types, andunstructured mesh systems are used for two-dimensional andaxisymmetric simulations, to guarantee the program’sstability and precision. For three-dimensional case, thisscheme divides the computational domain into uniform cu-bic solid grids to track molecular trajectories efficiently, whereas the object surface can be triangulated by any majorCAD/CAE software and read in by the package. As such, GRASP isnot only much efficient with unstructured meshes,but also capable of representing the objects’ surface details with high precision. During the simulation process, mostof simulated molecules are efficiently tracked and moved within a cartesian coordinate system, while for a limitedportion adjacent to the object surface is treated delicately like a unstructured grid scheme.

∗Research Associate, Department of Mechanical and Aerospace Engineering.†Assistant Professor, Department of Mechanical and Aerospace Engineering, AIAA Senior Member.‡Graduate Student, Department of Mechanical and Aerospace Engineering.

1 of 10

American Institute of Aeronautics and Astronautics

49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition4 - 7 January 2011, Orlando, Florida

AIAA 2011-668

Copyright © 2011 by the American Institute of Aeronautics and Astronautics, Inc. All rights reserved.

Page 2: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

Figure 1. Examples of grid scheme adopted in GRASP-P1.0. left: 2D; middle: object surface; right: 3D.

II. The Data Structure

There are two popular particle storage data structures. Oneis from the book by Bird1, to utilize a large wholearray storing information for all the particles; the other approach is to utilize linked lists inside each cell, i.e., todividethe single complete particle table into many more linked lists for each cell. In our implementation, we adopt the firstapproach1, which demands less attention since changing particle’s location from one cell to another requires onlya cell id change for the particle. As such, the computation efficiency can be high. Different from Bird’s originalimplementation, we design a special container class which serves as memory manager for the particle table. The classguarantees that there is always enough memory available. The memory for the mesh table is fixed. (shown in Fig.2)

Figure 2. Classes for resizable particle table and fixed meshtable inside a 2D simulation engine class.

One important concept that we adopted in this implementation is “simulation engine” to resolve the interface andfunctionality conflictions, and this new feature can benefitfuture development. For DSMC simulation packages, usu-ally there are two levels: cells and particles. However, only using these two levels cannot guarantee the packagehas a good architecture for further development and cannot fully utilize the advantages of OOP. We introduce sev-eral classes of simulation engines which have internal inherence relations, as such, two-dimensional, axisymmetric,and three-dimensional simulation codes can coexist in the same package, and the usage of conditional compilations,“#ifdef” can be reduced to minimum. Figure3 shows the internal relations for several engine classes. For this imple-mentation, we choose OOP with C++ language and utilize many special design patterns. One “abstract” class solelyregulates which function interfaces a class should consider, as such, it must be pure virtual. Its derived or daughterclasses, such as two-dimensional simulation engine class,concentrate on special function bodies development, i.e.,these virtual functions inherit the function names and parameter lists, defined in the abstract class and further developsome function bodies. The other further derived classes, e.g. the 3DDSMC engine, from the daughter classes con-centrate on overriding special virtual function bodies. Wewant to point it out that, some simulation engines maynot have too many functions to override the corresponding functions in their mother class, as such the code is highlyconcise and short. GRASP has an open architecture, and we canadd many more different simulation methods intothis single package as different simulation engines. Special design patterns, such as singleton,6 are implemented inthe simulation engine class, as such, it provides good code accessability.

The class concept in C++ is also used to package different elementary data variables and functions together intoone data structure representing a DSMC cell. Its features, such as encapsulation and inheritance, can maintain thecode favorable scalability, portability, and commonality. For a three-dimensional simulation situation, there are manyspace structures (such as cells) similar to cubic boxes. Many three-dimensional operations, such as particles’ motionsthrough inner cells, collisions at the wall, are incorporated inside the bounding box or vector classes (see Fig.3).

2 of 10

American Institute of Aeronautics and Astronautics

Page 3: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

Figure 3. Relations of various simulation engine classes inGRASP-P1.0.

III. The Hybrid Mesh System for 3D Simulations

For engineering applications, three-dimensional problems are of special interest because they can represent theflow fields more accurately. However, for three-dimensionalproblems, creating three-dimensional meshes with CADsoftware package usually requires much engineering effort. In this package, we implement a hybrid mesh method(shown in Figs.4 which requires simpler input of triangulated object surface, while the real three dimensional cubicmeshes are generated internally without user’s interactions.

Figure 4. The process to read in the object.

The mesh treatment in this package is highly automatic. Users only need to generate a triangulated object surfacewith any CAD software. In GRASP, there is a special function to read in the object configuration data prior to the mainDSMC loop. As shown in Fig.4, only triangular surface vertex coordinates are needed by the package. After readingthe object information, this scheme automatically generates a bounding box around the object using cartesian mesheswith proper size, according to the characteristic scale obtained from the inflow conditions. In the next step, based onthe bounding box, the mesh system will develop outwards according to the requested size of flow field.

In this three-dimensional grid system, the particle movement is highly efficient. Simulated molecules interact withwalls many times. It is a crucial process in the DSMC simulation to handle the interactions between particles and thebody surfaces accurately. Therefore, in this special three-dimensional scheme, the most important work is to find therelationship between the object wall and the space cartesian grids. It is one of the key pre-processing steps of thisscheme. There is a procedure which can directly and accurately identify and record body surfaces’s distribution withinthe three-dimensional cubic cells7.

Consequently, the main steps to create a whole hybrid mesh system for cartesian 3D DSMC simulation are asfollows:7

1). Triangulate the object body surfaces and record their geometry information. and output the results for GRASPto read, any major CAD software packages can accomplish thistask. This is the only external pre-processing steprequired by GRASP;

2). Automatically determine the bounding box around the object surface configuration and develop a larger sim-

3 of 10

American Institute of Aeronautics and Astronautics

Page 4: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

ulation domain for the flow field. This is achieved by a specialbounding box class, based on the read in object data.For example, the outer simulation domain of a spacecraft is automatically determined by offsetting the bounding boxof the spacecraft surface profile;

3). Divide the whole computational domain into uniform cubic solid cells according to the characteristic scale ofinflow conditions; currently, we utilize uniform cubic cells because the algorithm to determine a particle’s location issimple;

4). Determine the relationship between the object wall and the cartesian mesh adjacent to the surface. First,identify the surface triangles and the spatial three-dimensional cubic cells by two series of numbers; and if a bodysurface triangle is related to one cubic cell, record this relationship; then, record the numbers and the serial numbersofthe surface triangles related to the current cell, and record the related cells with every surface triangle one by one. InGRASP, we utilize two special fixed-size arrays, named Celltable[i].trianglelist[j] and Triangletable[jj].cell list[ii],to store the information of related cells and surface triangles.

Steps 3, 4 are accomplished by one C++ class. Obviously by automatically generating the three-dimensional mesh,this can reduce the engineering time for the whole simulation. At the same time, utilizing cubic mesh can significantlyincrease the simulation speed, because the module of particle movement is greatly simplified - no cell-by-cell particletracking is needed.

IV. Several Implementation Features

As a general purpose DSMC simulation package, GRASP has somegeneral features of the DSMC method. Thekey point of the DSMC method is to decouple molecular movements from collisions.1 Therefore, all functions relatedto the particles, such as particle indexing, moving, globalsorting, collisions, are the major cost of this method; and weendeavor significant effort on these aspects to design an efficient and accurate algorithm.

The preprocessing and postprocessing are separated from the simulation package. The preparation for hybrid meshsystem in GRASP-P1.0, is introduced in the previous section, which is the pre-processing step prior to the main DSMCloop. This process requires merely to be called once, as such, it has no significant cost on the whole DSMC loop inthe serial and parallel computing versions. We adopted cardcontrol in this package, which is a common treatment inindustrial software packages, as such many operations can be conveniently enabled/disabled by modifying a card inthe deck file.

Figure 5. The schematic illustration of particles moving through the mesh system.

Figure5 shows the moving process of a particle in the 3D hybrid grids.Obviously, for most cartesian cells outsidethe bounding box, the particle’s position(x1, y1, z1) could be determined conveniently, according to the initialposition(x0, y0, z0), particle velocity(u, v, w) and a time step∆t, i.e.:

par→pos + = (u, v, w)∆t. (1)

Indeed, this simple translation of a particle in cartesian mesh requires much less average time than a unstructuredmesh system. More over, we can index the particles to determine inside which cell they finally locate. Further, afterall particles complete their movement within one complete time step, particles could be conveniently sorted one byone globally under the rule proposed by Bird1. The processes mentioned above can save much time than the otheralgorithm with unstructured mesh system.

When particles move in those cells adjacent to the object surface, we adopt a particle-tracing algorithm to determineif the particle moves outside the current cell, and either one side of the current cell or one triangle surface it could

4 of 10

American Institute of Aeronautics and Astronautics

Page 5: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

reach, and which side of the current cell or which triangle surface it might reach. The particle-tracing function iscalled continuously for each face (either the side of cell orthe surface triangle of object) related to the cell adjacentto the object surface, respectively. The calling for particle-tracing function would provide the time to hit those faces,according to an inner product between the particle velocityvector and the normal vectors of those faces. The particleis then moved to the point with the minimum hitting time. The particle-tracing function is then called to move theparticle till completing the remaining of the whole time step, possibly crossing through multiple cells. This processmight spend more time than moving particles in the cells outside the bounding box, but more efficient than the similarprocess in unstructured mesh system.

In this package, the computational time spent in the collision functions in one cell is theoretically similar to thosein unstructured mesh system. The total time for collisions depends on the total number of the particles and the cellsadopted in the simulation. In general, for three-dimensional simulations with a hybrid grid system, this implementationcosts much less time than the code with unstructured mesh system. In the next section, we present some test cases ofsupersonic rarefied gas flows to verify our DSMC implementation.

V. Test Cases

To demonstrate the capability of the schemes and the implementation, we include several test cases in this paper.We compare the simulation results with results obtained from the MONACO code, or analytical, or experiment results.The object surfaces in the test cases are assumed fully diffuse.

A. Hypersonic Flow Over a Wedge

The first test case is a hypersonic flow over a40◦ wedge with a10◦ angle of attack. As such, the top side of the wedgeis equivalent to a10◦ wedge and the bottom side is equivalent to a30◦ one. The temperature of free stream argon gasflow is 200 K, the Mach number is10, and the number density is1.3× 1020 m−3. The wedge wall temperature is300K. The free stream Knudsen number is 0.05, and the characteristic length of this case is the wedge base length.

Figures6 and7 illustrate that GRASP-P1.0 and MONACO-V3.0 predict virtually identical temperature and densitycontours around the wedge, two different shock waves with different shapes at the ram sides and different expansionwaves at the rear side are displayed clearly.

12

345

6 4 5

3

2

45

678

9

10

X, m

Y,m

0 0.2 0.4 0.6 0.8 1-0.4

-0.2

0

0.2

0.4

10 40009 36008 32007 28006 24005 20004 16003 12002 8001 400

T (K)

Figure 6. Temperature contours for a hypersonic flow over a40◦ wedge, Ma=10, AoA=10◦, T∞ = 200 K, Tw = 300 K, solid: GRASP;dashed: MONACO. Unit: K.

B. Hypersonic Flow Over a 2D Cylinder

Maslach and Schaaf10 measured the drag coefficients for cylinders experimentally at Mach numbers∼ 2, ∼ 4 withKnudsen numbers extending from continuum conditions to free molecular flow conditions. In experiments, the spherediameter is0.0015 inch. The sphere surface temperatureTw is 300 K, and the ratio of the stagnation temperature (T0)of stream flow toTw is 0.87.

Figure8 and9 present the comparisons of the cylinder drag coefficient between GRASP results and experimentdata. In these simulations, we adopt fully diffuse r and specular reflections for the cylinder surfaces, respectively.

In Maslach’s paper, the experiment data indicated a smooth transition from inviscid values at low Knudsen numberto free molecular flow predictions for diffuse reflection at high Knudsen number. From the results we obtained, we

5 of 10

American Institute of Aeronautics and Astronautics

Page 6: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

1

2

3

3

4

2 1

12

34

5

67

89

X, m

Y,m

0 0.2 0.4 0.6 0.8 1-0.4

-0.2

0

0.2

0.4

10 1.2E-049 9.1E-058 6.9E-057 5.2E-056 4.0E-055 3.0E-054 2.3E-053 1.7E-052 1.3E-051 1.1E-05

ρ (kg/m 3)

Figure 7. Density contours for a hypersonic flow over a40◦ wedge, Ma=10, AoA=10◦, T∞ = 200 K, Tw = 300 K, solid: GRASP; dashed:MONACO. Unit: kg/m3.

Kn

CD

10-2 10-1 100 101 1021.0

1.5

2.0

2.5

3.0

3.5

4.0

DSMC, DiffuseDSMC, SpecularExperiment

Figure 8. Cylinder drag coefficient atM = 1.96, with Tw = 300 K, T0/Tw = 0.87.

can see that at high Knudsen number the simulation results with fully diffuse surface agree well with the experimentdata, and at low Knudsen number the simulation results with specular surface agrees with the experiment better.

C. Simulations of Hypersonic Flow Over a Sphere with Axisymmetric Version of GRASP

This section includes two simulation examples of hypersonic rarefied gas flow around a sphere with the GRASPmodule for axisymmetric flows. One case is the simulation of the drag coefficient over the entire flow regime fromnear continuum to free molecular flow. The other is to simulate the density distribution along the stagnation line infront of the sphere with different Reynolds numbers.

1. Drag Coefficients for Different Knudsen Number

Legge and Koppenwallner12 experimentally investigated the Knudsen number (Kn) dependence of drag coefficientfor hypersonic rarefied gas flows over a sphere. The diameter of the sphere is0.04 m. The stagnation temperatureof the free stream air gas flow and the sphere wall temperatureare both500 K. The Mach number of free stream is9.0. The DSMC simulations utilize the same flow conditions as experiment, with differentKn based on the spherediameter varying from0.01 to 100. The sphere surface is assumed to be fully diffuse.

Figure10 shows an comparison of drag coefficients. It’s evident that the GRASP results agree well with themeasured data over the entire flow regime.

2. Density Distributions Along the Stagnation Line

Russell13 measured density distributions along the stagnation line of a sphere. In experiment, the Mach number ofnitrogen gas were4.2 or 4.38. The total temperature and the surface temperature were both 300 K. The GRASP

6 of 10

American Institute of Aeronautics and Astronautics

Page 7: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

Kn

CD

10-2 10-1 100 101 1021.0

1.5

2.0

2.5

3.0

3.5

DSMC, DiffuseDSMC, SpecularExperiment

Figure 9. Cylinder drag coefficient atM = 4.00, with Tw = 300 K, T0/Tw = 0.87.

Figure 10. Drag coefficients of hypersonic rarefied gas flows over a R = 0.02 m sphere, predicted by GRASP and measured in experiment,at Ma = 9, T0 = Tw = 500 K.

calculation is performed at experimental conditions with different Reynolds numbers. Figure11, 12, 13 show thecomparisons between GRASP results and experiment data, where the normalized factors are the sphere radius and freestream density, respectively. As we can see, the agreement is remarkably consistent for all conditions.

D. Simulations of Hypersonic Rarefied Gas Flow Over a Sphere using 3D Version of GRASP

This test case is a hypersonic free molecular flow over a sphere, simulated with the three dimensional simulationscheme with hybrid grids. The temperatures of the free stream argon gas flow and the sphere wall are300 K. The freestream number density at inlet is1.0×1020 m−3, and the radius of the sphere is0.5 m. The purpose of this example isto validate the 3D particle movement module of the package, -which is crucial for the three-dimensional grid system;and to compare some surface properties.

The cartesian grid system is utilized in all of the flow fields.The simulation domain is a cubic zone, and the centeris the object region containing a sphere, while the other sixexternal surfaces are obtained by offsetting the boundingbox for the internal sphere. The offset values are determined by an input parameter from a card file, as such, adjustingthe simulation domain and generating the internal mesh are highly automatic - it can be achieved by altering oneparameter in the card file, and the corresponding engineering time to solve this problem is thus significantly reduced.The collisionless flow case is simulated with the GRASP code with ease by turning off the corresponding molecularcollision function inside the package.

Figure14 shows the temperature distributions in the middle plane, tobetter illustrate the comparison, only thefront side contours are presented. The solid lines represent the DSMC simulation results, while the dashed lines arethe analytical results for collisionless flow over a sphere8. As we can see, even the flow is collisionless, however

7 of 10

American Institute of Aeronautics and Astronautics

Page 8: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

Figure 11. Comparison of density distributions along the stagnation line of a sphere, by GRASP and measured data,T0 = Tw = 300 K,Re = 30.

Figure 12. Comparison of density distributions along the stagnation line of a sphere, by GRASP and measured data,T0 = Tw = 300 K,Re = 50.

with a high Mach number, at the front of the sphere the highesttemperature can reach over2, 200 K. It is evidentthat for the three-dimensional simulation, the DSMC results have ideal agreement with the analytical results as well.Figures15 and16 show the comparisons of sphere surface pressure and heat fluxresults from the DSMC simulationand the corresponding analytical results. It is evident that the three-dimensional simulation and analytical resultsaresufficiently close.

VI. Conclusions

We have reported our recent new serial object-oriented implementation of a DSMC simulation package, whichis named as GRASP-P1.0. This package is developed utilizingC++ classes and several design patterns, such asinheritance and singleton. We introduced the concept of simulation engine and implemented ten major classes in thepackage. The simulation engine concept successfully resolves the conflicts between subroutine functionalities andinterfaces. The architecture is open for further development and maintenance friendly, and we have implemented two-dimensional, axisymmetric, and three-dimensional simulation methods in a single package, and reduced the usages ofconditional compilation to minimum.

Another novel feature of this package is that we incorporated the three-dimensional cartesian grids into the packageas a special class. For reentry flow simulations, only triangulated object surface geometry is required as input, and

8 of 10

American Institute of Aeronautics and Astronautics

Page 9: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

Figure 13. Comparison of density distributions along the stagnation line of a sphere, by GRASP and measured data,T0 = Tw = 300 K,Re = 100.

1000

1200

1400

1600

1800

2000

2200

8001000

2200

2000

1800

1600

1400

1200

X, m-2.5 -2 -1.5 -1 -0.5 0

0

0.4

0.8

1.2

1.6

Figure 14. Temperature contours for a hypersonic flow over aR = 0.5 m sphere, Ma=5, Unit: K.

other major control information is provided through a card file. The three-dimensional mesh is generated internallyrather than externally, as such, the engineering time for the simulation can be greatly reduced. By utilizing cubic cells,the particle movement module is greatly simplified as well. Further, test case results indicate this implementation hashigh accuracy.

References

1Bird, G. A.,Molecular Gas Dynamics and the Direct Simulation of Gas Flows, Oxford University Press, New York, 1994.2Ivanov, M. S., Markelov, G. N., and Gimelshein, S.F., “Statistical Simulation of Reactive Rarefied Flows: Numerical Approach and Appli-

cations”, AIAA Paper 98-2669, 1998.3Dietrich, S., and Boyd, I. D, “Scalar and Parallel OptimizedImplementation of the Direct Simulation Monte Carlo Method”, Journal of

Computational Physics, Vol. 126, 1996, pp.328-342.4LeBeau, G.J., “A Parallel Implementation of the Direct Simulation Monte Carlo Method”,Computer Method in Applied Mechanics and

Engineering, Vol. 174, 1999, pp.319-337.5Gao, D., Zhang, C., and Schwartzentruber, T.E., “A Three-Level Cartesian Geometry Based Implementation of the DSMC Method”, AIAA-

2010-450,48th AIAA Aerospace Sciences Meeting, 4th-7th January 2010, Orlando, Florida.6Gamma, E., Helm, R., Johnson, R., and Vlissides, J.,(Addison-Wesley Profesional Computing Series) Design Paterns: Elements of Reusable

Object-Oriented Software,Addision-Wesley, Boston, 1995.7Liu, H., Fan, J., and Shen, C., “Validation of a Hybrid Schemeof DSMC in Simulating Three-Dimensional Rarefied Gas Flows”, Rarefied

Gas Dyanmics: 23rd International Symposium, Edited by Ketsdever and Muntz, pp. 382-389, 2002.

9 of 10

American Institute of Aeronautics and Astronautics

Page 10: [American Institute of Aeronautics and Astronautics 49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition - Orlando, Florida ()] 49th AIAA

θ2

p/(ρ

0U02 )

-90 -60 -30 0 30 60 900

0.5

1

1.5

2

2.5

Figure 15. Normalized pressure distribution on aR = 0.5 m sphere surface.

θ

2q/

(ρ0U

03 )

-90 -60 -30 0 30 60 900

0.2

0.4

0.6

0.8

1

1.2

Figure 16. Normalized heat flux distribution along aR = 0.5 m sphere surface.

8Cai, C., Khasawneh, K. R., Liu, H., and Wei, M., “Collisionless Gas Flows Over a Cylindrical or a Spherical Object”,Journal of Spacecraftand Rockets, Vol.46, No.6, November-December, 2009.

9Moss, J. N., Glass, C. E., & Greene, F. A., “Blunt Body Aerodynamics for Hypersonic Low Density Flows”, http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/200600281882006230545.pdf.

10Maslach, G. J., and Schaaf, S. A., “Cylinder Drag in the Transition from Continuum to Free-Molecular Flow”,Physics of Fluids, Vol. 6, No.3, 1963, pp. 315-321.

11Dogra, V. K, Moss, J. N., and Price, J. M., “Rarefied Flow Past aFlat Plate at Incidence”,NASA Technical Memorandum101493, 1988.12Legge, H. and Koppenwallner, G., “Sphere Drag Measurementsin a Free Jet and a Hypersonic Low Density Tunnel”, inRarefied Gas

Dynamics, edited by D. Dini, 1970, pp. 481-488.13Russell, D. A., “Density Distribution ahead of a Sphere in Rarefied Supersonic Flow”,Physics of Fluids, Vol.8, 1968, pp. 1679-1685.

10 of 10

American Institute of Aeronautics and Astronautics