Академический Документы
Профессиональный Документы
Культура Документы
dsmcFoam - Introduction.
Tom Scanlon, Craig White, Stephanie Docherty
University of Strathclyde
Glasgow, UK
www.jwfl.org.uk
DSMC13 Short Course - 20th
www.strath.ac.uk/mae
www.jwfl.org.uk
October 2013
tom.scanlon@strath.ac.uk Slide 1
Scope of introductory lecture:
• About ourselves.
• Multiscale flows research at Strathclyde.
• Background to dsmcFoam.
• Outline of DSMC13 short course.
0.0001
0.01
100
10,000
1,000,000
scale of metres length
• It is, however, missing some key features that most modern DSMC codes
have
• No chemical reactions
• Vibrational energy
• Chemical reactions
• New boundary condition framework
• New field measurement property framework
• Everything is easily extendible
• General bug fixes
lagrangian
Shared Object Library
dsmc
dsmc
solvers utilities
discreteMethods
preProcessing postProcessing
dsmc
dsmc miscellaneous
dsmcFoam
dsmcInitialise dsmc
dsmcFoam.C
dsmcInitialise dsmcFieldsCalc
dsmcInitialise.C dsmcFieldsCalc.C
lagrangian
Shared Object Library
dsmc
dsmcStrath
boundaryMeasu collisionPartne
boundaries clouds collisions controllers faceTracker initialise
rements rSelection
macroscopicPro
parcels reactions
perties
solvers utilities
discreteMethods
preProcessing postProcessing
dsmc
dsmc miscellaneous
dsmcStrath
dsmcInitialise dsmc
dsmcFoam.C
dsmcInitialiseStrath dsmcFieldsCalcStrath
dsmcInitialise.C dsmcFieldsCalc.C
Diffuse reflection
Surface orientation
• For each case, all input data is stored in a set of organised files
known as “dictionaries”.
case directory
controlDict
polyMesh dsmcPropertiesDict boundariesDict
dsmcInitialiseDict
blockMeshDict
decomposeParDict
…
o Collision properties
including the binary collision
model and the collision
partner selection model.
o Number density
o Temperature
(translational,
rotational, vibrational)
o Streaming velocity
• Skylon location in
computational
domain
flow direction
High quality
hexahedral layer on
body surface.
[1] G. A. Bird. Molecular Gas Dynamics and the Direct Simulation of Gas Flows.
Oxford Science Publications, Oxford University Press Inc, New York, 1994.
DSMC13 Short Course - 20th
www.strath.ac.uk/mae
October 2013
tom.scanlon@strath.ac.uk Slide 71
Example: Supersonic corner flow
• Both plates are 0.25 m in length and 0.18 m wide, and
there is a 0.05 m region upstream of the plates.
[2] G. A. Bird. Definition of mean free path for real gases. Physics of Fluids,
26(11):3222–3223, 1983.
DSMC13 Short Course - 20th
www.strath.ac.uk/mae
October 2013
tom.scanlon@strath.ac.uk Slide 72
blockMeshDict
• In this case we generate two blocks to allow definition
of the appropriate boundary patches.
• The surface of the plates are shown in solid grey, and the
mesh itself is shown as a wireframe.
DSMC13 Short Course - 20th
www.strath.ac.uk/mae
October 2013
tom.scanlon@strath.ac.uk Slide 75
dsmcPropertiesDict
• We try to ensure all post processing is done in free and open source software
• ParaView
– good for qualitative checks
• sampleDict
– OpenFOAM utility for extracting raw quantitative data from completed simulations
• gnuplot
– open source plotting software
• http://www.openfoam.org/docs/user/paraview.php
• To view flow field properties, select the ‘internalMesh’ option on the left hand
side
• To view surface properties, select the relevant surface on the left hand side
(deselect the internalMesh)
• Use the calculator tool to calculate the heat transfer coefficient from the heat
flux
• Enter the values you wish to plot – here we choose the same values as Bird
(page 397)
dsmcFoam DSMC3
• http://www.openfoam.org/docs/user/sample.php
• 10 million particles
• Scotch decomposition offers marginally better scaling performance than simply dividing the domain
into equally sized and spaced sections
• The particle weighted Scotch method allows for a significant improvement in parallel performance as
it improves the load balancing
DSMC13 Short Course - 20th
www.strath.ac.uk/mae
October 2013
tom.scanlon@strath.ac.uk Slide 108
Parallel Performance Tests
– can still be a worthwhile exercise for cases with large density gradients
• Best approach is not just to use as many cores as you have available!
– can still be a worthwhile exercise for cases with large density gradients
• Best approach is not just to use as many cores as you have available!
where:
and
• Q-K implemented
for the following
“Type-1” molecule-
molecule
dissociations:
Satisfactory
comparison
between
dsmcFoam,
analytical Q-
K and
previous
DSMC-Q-K
(Gallis, 2009)
Satisfactory
comparison
between
dsmcFoam,
analytical Q-
K and
previous
DSMC-Q-K
(Gallis, 2009)
Satisfactory
comparison
between
dsmcFoam,
analytical Q-
K and
previous
DSMC-Q-K
(Gallis, 2009)
Satisfactory
comparison
between
dsmcFoam,
analytical Q-
K and
previous
DSMC-Q-K
(Gallis, 2009)
• Note
differences
between
non-adjusted
Ea (Gallis,
2009) and
current work.
• Note also
differences
in Tmacro and
Tcoll results.
• Note
differences
between
non-adjusted
Ea (Gallis,
2009) and
current work.
• Note also
differences
in Tmacro and
Tcoll results.
• Note
differences
between
non-adjusted
Ea (Gallis,
2009) and
current work.
• Note also
differences
in Tmacro and
Tcoll results.
• Note
differences
between
non-adjusted
Ea (Gallis,
2009) and
current work.
• Note also
differences
in Tmacro and
Tcoll results.
• Necessary as:
Forward endothermic
exchange reaction
Species
Reverse exothermic
exchange reaction
Species
Forward endothermic
exchange reaction
Species
Reverse exothermic
exchange reaction
Species
Temperatures along
stagnation streamline.
Temperatures along
stagnation streamline.
dsmcFoam
Q-K - QK
dsmcFoam
Q-K
- QK
• Core region:
– Sampling of macroscopic fields is
performed.
• Referred to as the ‘sampling zone’.
• Cylindrical Couette flow showing rotating wall boundary and radial bins
measurements
• Wang & Li updated the inlet boundary condition to improve the convergence
behaviour
– M. Wang and Z. Li. Simulations in microgeometries using the direct simulation Monte Carlo
method. International Journal of Heat and Fluid Flow, 25(6):975-985, 2004.
Required to get
volume of bins. It
knows the height
of each bin, but we
need to give it the
cross-sectional
area of the bins.
DSMC13 Short Course - 20th
www.strath.ac.uk/mae
October 2013
tom.scanlon@strath.ac.uk Slide 198
Microscale Case Set Up
• Results written to caseDir/<processor0>/timeDir/uniform
• Bins method writes a lot of results; temperatures, velocities, stress tensor, etc
• A 2-dimensional investigation of argon gas flow in channels with one and two
sharp ninety degree bends
• createPlaneSurfaces utility
faceZoneName as defined in
planeSurfacesDict
• Results normalised with the mass flux from the equivalent straight channel
• Evident that in a small range of Knudsen number the presence of a bend
increases the mass flux relative to the straight channel
• Outside of this region, the bend decreases the mass flux
• Adding a second bend results in a larger increase or decrease
– Cuboid bins
– Spherical bins
www.strath.ac.uk/mae
tom.scanlon@strath.ac.uk
xxx Slide 217
www.strath.ac.uk/mae DSMC-CRBS 29th Aug.2013
tom.scanlon@strath.ac.uk
xxx Slide 218
www.strath.ac.uk/mae DSMC-CRBS 29th Aug.2013
tom.scanlon@strath.ac.uk
xxx Slide 219
www.strath.ac.uk/mae DSMC-CRBS 29th Aug.2013
tom.scanlon@strath.ac.uk
xxx Slide 220
www.strath.ac.uk/mae DSMC-CRBS 29th Aug.2013
tom.scanlon@strath.ac.uk
xxx Slide 221
www.strath.ac.uk/mae DSMC-CRBS 29th Aug.2013
tom.scanlon@strath.ac.uk
xxx Slide 222
www.strath.ac.uk/mae DSMC-CRBS 29th Aug.2013
tom.scanlon@strath.ac.uk
xxx Slide 223
www.strath.ac.uk/mae DSMC-CRBS 29th Aug.2013
tom.scanlon@strath.ac.uk
xxx Slide 224
www.strath.ac.uk/mae
tom.scanlon@strath.ac.uk
xxx Slide 225
Thermal Coeff = 1.6403e-05
Sound Damping Coeff = 1.39262e-05
Sound Speed Coeff = 312.077
Sine Coeff = 0.427287
• These include:
– Vibrational energy (see previous lecture on QK)
– Quantum kinetic chemical reactions (see previous lecture
on QK)
– New boundary conditions
– The CLL gas-surface interaction model
– A new measurement framework
– A controller framework
where,
where,
where,
• For both the MOZ and the MOB, we have created combined
measurement tools which measure all macroscopic
properties (velocity, pressure, temperature etc.).
• Combined bins
measurement tool
measures the
spatial average of all
macroscopic properties in
each bin in the specified
zone.
• We must define start and end points to include only one face.
• Planes are created by running the “createPlaneSurfaces”
command in the case directory.
– Executed after “blockMesh” and before “dsmcFoamStrath”.
• Example: Berendsen
temperature control
• For each zone we define
a start/end point, and the
number and cross-
sectional area of the bins.
• Must also define the start
and end temperature for
each zone.
– A linear temperature
gradient is assumed.