ABSTRACT
RIVORD, TRAVIS AARON. NCSU’s Immersed Boundary Method: Recent Improvements and Applications. (Under the direction of Dr. Jack Edwards.)
In the present work, REACTMB-INS’ Immersed Boundary Method (IBM) implementation is documented, demonstrated, and improved upon. The IBM is motivated by the desire to use relatively
simple non-body-fitted meshes to simulate complex objects and their motion. To define immersed
objects, stereolithography (STL) files, which are triangulated geometry files, are used and rendered as signed distance fields in the computational domain. Sequences of STL files (one file per iteration) can
be used to perform complex motion events. The process used to generate these STL file sequences,
outlined within this work, occasionally produces non-watertight files that are unusable by REACTMB-INS. The repair of the damaged STL files is relatively simple but does not maintain the uniform
elemental connectivity required by the essential surface vertex velocity calculation. REACTMB-INS
is modified to read STL files with different connectivity every iteration and the reference point method is developed (and validated) to calculate the surface velocity of these non-uniform STL files,
allowing the repair of STL files in a sequence.
To demonstrate REACTMB-INS’ IBM implementation and ability to track gaseous contami-nants, simulations of a C-17 MedEvac unit, downed-pilot, person buried in rubble, and collapsing
building are performed. The meshes used in these simulations range between 7 and 326 million
computational cells and between 3 and 325 immersed objects are included; these simulation sizes extend the envelope of REACTMB-INS applications. The purpose of many of these simulations
is to produce quality animations, necessitating the post-processing and visualization of massive
quantities of data. Converting the raw data written by REACTMB-INS to the Tecplot data format and visualizing the data in Tecplot is prohibitively expensive, which motivated the integration of the Silo
library into REACTMB-INS. The Silo library was developed by Lawrence Livermore National Labs
(LLNL) and enables the writing of binary data files that do not require post-processing. When read by VisIt, a parallel-capable visualization program capable of reading data on remote high performance
computers (HPC) also developed by LLNL, rapid visualization of data can be achieved without the
© Copyright 2017 by Travis Aaron Rivord
NCSU’s Immersed Boundary Method: Recent Improvements and Applications
by
Travis Aaron Rivord
A thesis submitted to the Graduate Faculty of North Carolina State University
in partial fulfillment of the requirements for the Degree of
Master of Science
Aerospace Engineering
Raleigh, North Carolina
2017
APPROVED BY:
Dr. Hong Luo Dr. Pramod Subbareddy
DEDICATION
To Merlin, our loving dog who lost his life when our apartment burned down last year. I wish you were here to cheer me up, motivate my studies, and inspire me to keep going but your memory will
BIOGRAPHY
Travis Rivord was born in Fayetteville, NC in April of 1992 to Susan and Robert Rivord. Soon after, he moved to Fort Polk, LA until the age of four, where he moved back to Fayetteville, NC. He attended
school in Fayetteville until graduating in 2010, subsequently attending NC State University for
Aerospace Engineering. In 2014, Dr. Edwards convinced him to join his lab and stay at NC State for a masters degree. Upon graduation of undergraduate studies, he enrolled at NC State for a masters
ACKNOWLEDGEMENTS
I would first like to thank Dr. Edwards, who convinced me to pursue a masters degree and patiently guided me through research. I would also like to think my parents and friends who helped me
deal with the joys and stress of life. Also included in friends, but whom deserve receiving special
praise, are my lab mates. They helped me deal with stress of some classes that others could not fully understand, helped me learn the most difficult subjects, and made spending countless hours in lab
bearable.
Last but not least, I would like to thank my wife Caitlin. She helped guide me through the tears
and joys of the last 6 years. I could not have accomplished any of this without her loving support
TABLE OF CONTENTS
LIST OF TABLES . . . vii
LIST OF FIGURES. . . .viii
Chapter 1 Introduction. . . 1
Chapter 2 Immersed Boundary Method for Incompressible Flows. . . 4
2.1 Introduction . . . 5
2.2 Cell Classification Procedure . . . 7
2.2.1 Closed surface classification . . . 7
2.2.2 Open surfaces classification . . . 11
2.3 Interface Blocking . . . 12
2.3.1 Closed Surface Interface Blocking . . . 12
2.3.2 Open Surface Interface Blocking . . . 12
2.4 Band Cell Interpolation . . . 14
2.4.1 Velocity Interpolation . . . 14
2.4.2 Pressure Interpolation . . . 15
2.4.3 Temperature and other Interpolations . . . 15
2.5 Determination of Information at the Interpolation Point . . . 16
2.6 Vertex Velocity Calculation: Reference Point Method . . . 18
Chapter 3 STL Information & Creation . . . 20
3.1 Pre-processor Guide . . . 21
3.2 STL generation and 3ds Max Guide . . . 22
3.2.1 Biped and Body Creation . . . 22
3.2.2 Walking Animation Guide . . . 23
3.2.3 Hints and Errors . . . 28
3.3 STL Repair . . . 29
Chapter 4 VisIt & Silo . . . 30
4.1 Silo File Information . . . 30
4.1.1 Metadata Option . . . 31
4.2 Using Silo in REACTMB-INS . . . 31
4.3 Using VisIt on Henry2 . . . 32
4.4 Using VisIt on DOD HPC . . . 34
Chapter 5 Results . . . 35
5.1 C-17 Simulations . . . 35
5.1.1 Transport . . . 38
5.1.2 Simulation scenario . . . 38
5.1.3 C-17 Results . . . 39
5.2.1 Downed-pilot simulation . . . 46
5.2.2 Buried person simulation . . . 52
5.3 Collapsing Building Simulation . . . 54
5.4 Reference Point Method Validation . . . 56
Chapter 6 Conclusion and Future Work . . . 58
BIBLIOGRAPHY . . . 59
APPENDICES . . . 61
Appendix A STL Export 3ds Max Script . . . 62
Appendix B Point Tracking 3ds Max Script . . . 63
Appendix C Modifying Silo File Writing . . . 65
Appendix D Inflow Turbulence Forcing - Temperature Perturbation Method . . . 67
LIST OF TABLES
LIST OF FIGURES
Figure 2.1 Schematic illustrating classification of cell-centered points for a complex immersed body surface. Open, gray, and closed circles representfield,band, andinteriorpoints respectively, and the thick line represents an immersed
body surface. Figure from Choi et al.[3]. . . 8
Figure 2.2 Schematic for a minimal distance from the points in a computation domain to surface points. Based on figure from Edwards et al.[5]. . . 9
Figure 2.3 Schematic for nearest neighbors of triangle elements. Based on figure from Edwards et al.[5]. . . 9
Figure 2.4 Schematic showing the approximate nearest surface pointxs for anyband pointxk and the signed distance functionΦ; open circles:fieldnodes (cell centers), closed circles: surface node points. Figure from Choi et al.[3]. . . 10
Figure 2.5 The incident angles(α1,α2,α3, ...)of triangle elements shared with vertexxv. The corresponding outward normal vectors are(n1,n2,n3, ...)at the cell center (x1,x2,x3, ...). Based on figure from Choi et al.[3]. . . 11
Figure 2.6 Schematic of classification for interface blocking. (a) non-blocking; (b) block-ing. Figure from Edwards and Eischen[6]. . . 13
Figure 2.7 Schematic determination of the distancedI between the interpolation point xI and surface node point for a given band pointxk using the projected dis-tancedI from neighbor pointsxl to outward normal line based on surface normal vectornat the immersed surface nodexs. Large closed circles repre-sent the band point to be interpolated with the information at neighbor point. Hatched black and gray circles represent the field points and band points associated with the present determination, respectively. Figure from Choi et al.[3]. . . 18
Figure 3.1 3ds Max Layout: (a)Commandmenu (b)Animationmenu (c)Objectmenu . . 22
Figure 3.2 Biped skeleton (a) and body (b) . . . 23
Figure 3.3 3ds MaxCommandmenu: (a)Motiontab (b)Footstep Modebutton (c)Create Multiple Footstepsbutton (d)Create Keysbutton (e)BendorScaleselection (f )Create Multiple Footstepswindow . . . 25
Figure 3.4 3ds Max Command Window: (a) Create tab (b) Helpers tab (c) Dummy object 26 Figure 3.5 Footsteps positioned for a pause . . . 27
Figure 3.6 Track View - Dope Sheetwindow . . . 27
Figure 4.1 VisIt Henry2 setup . . . 33
Figure 5.1 C-17 interior rendered with objects showing mesh slices . . . 36
Figure 5.2 Photograph showing the C-17 manifold and return vents . . . 37
Figure 5.3 Snapshots of medical person’s movement and contaminated gas plumes . . . 40
Figure 5.4 Snapshots of velocity magnitude (top), contagious persons’ breath mass frac-tion (middle) and temperature (bottom)[Left set: 3 minutes; Right set: 15 minutes]. . . 41
Figure 5.6 Breathing-zone concentration and walking distance versus time . . . 43
Figure 5.7 New C-17 mesh rendering with objects . . . 44
Figure 5.8 Snapshots of medics motion and contagious breath gas transport on higher fidelity mesh . . . 45
Figure 5.9 Release of taggant by downed pilot moving in an irregular pattern in quiescent flow . . . 47
Figure 5.10 Close-up of downed pilot . . . 47
Figure 5.11 Taggant dispersal within an X-Z plane located 1 m above the surface. Time increases from left to right, top to bottom . . . 48
Figure 5.12 : Integrated effect of taggant dispersion due to human wake motion and wind field . . . 49
Figure 5.13 Swirl-strength slices in the X-Y center-plane illustrating transition to turbu-lence due to boundary layer forcing . . . 50
Figure 5.14 Velocity magnitude slice showing transition to turbulence due to inflow forcing 51 Figure 5.15 Collapsed building containing injured person . . . 52
Figure 5.16 Collapsed building containing injured person . . . 53
Figure 5.17 Rendering of building with interior shown by a cut plane . . . 54
Figure 5.18 Snapshots of collapsing building . . . 55
Figure 5.19 Reference point velocity method demonstration: (a) unmodified STL, (b) modified handless STL (c) percent difference in vertex velocity graphed on the surface of (a) . . . 56
1
Introduction
The work presented here serves to document, demonstrate, and improve upon the capabilities of
the Immersed Boundary Method (IBM) implementation in REACTMB-INS (our lab’s incompressible Navier-Stokes equation solver). The primary motivation of the IBM is to use relatively simple
non-body-fitted meshes to simulate complex geometry and motion. Charles Peskin first proposed the
IBM [19]and applied it to simulations of the human heart ([20]and [21]). In these works, the computational domain boundaries were replaced with force fields applied at a series of elastic
boundary points. This treatment reproduced the same effects as a computational boundary but
allowed for the use of a non-deforming rectangular domain. Goldstein et al[10]applied the IBM to rigid boundaries by using a feedback scheme in which the velocity is used to iteratively calculate
the desired force value. This was succesfully applied to ribbed channels ([11]and[12]). These formulations of the IBM were easy to implement in existing flow-solvers, but blurred the interface
between the solid and the fluid causing a reduction in the order of accuracy near the surface. Yusof [25]and Fadlun et al[7]developed an IBM based on direct forcing involving the addition of a force term to the discretized Navier-Stokes equations, eliminating the interface blur associated with the
previous methods. The forcing is direct in the sense that the value of the velocity is applied directly to
the boundary, meaning that the boundary conditions are maintained regardless of the flow features. In Fadlun et al[7], the velocity values at the nearest grid-point to the surface were interpreted using a linear-approximation.
REACTMB-INS’ IBM is based upon Fadlun et al’s[7]direct forcing, with its novel features being its ability to work on arbitrary mesh topologies and handle the movement of immersed objects. The
major difference between the IBM in Fadlun et al[7]and REACTMB-INS is that the velocity near the surface is decomposed into normal and tangential components in REACTMB-INS, with the tangential component formed as a power-law function to mimic turbulent boundary layer velocity
profiles[3]. Choi et al[3]tested this velocity interpolation on static cylinders, airfoils, and spheres. Further tests were conducted to demonstrate REACTMB-INS’ ability to simulate flow induced by walking humans. At this stage of development, immersed surfaces were represented as clouds of
surface points and rendered as signed distance fields (also referred to as level set fields) in the
computational domain. This representation was limited in that the maximum spacing between cloud points needed to be much less than the minimum dimension of any nearby computational
surface.
Ghosh[8]extended the IBM to function for compressible flows, including the addition of a temperature interpolation scheme based on Walz’s relation for the temperature distribution within
a compressible boundary layer[24]. RANS and LES/RANS type turbulent closures suitable for wall-bounded internal flows were also added to the IBM. These extensions were demonstrated on control
devices used in mitigating shock/boundary layer interactions. The compressible additions are also useful for incompressible flow if certain assumptions are made.
Edwards’, Choi’s, and Eischen’s study of the ingress/egress of modular general purpose tent systems (MGPTS tents) on an open plane ([5],[6]) made switching the immersed surface treatment from point clouds to stereolithography (STL) files desirable. STL files, triangulated geometry files containing each triangle’s vertex coordinates and face centered normal vectors, can render flat walls
as two triangles consisting of three points each. The flat MGPTS tent walls could be rendered with
much less information as STL files than as a cloud of points spaced with a dimension smaller than the smallest grid spacing. While STL file surface representation requires more computationally
expensive searching algorithms, it is more flexible, since direct output from CAD software can be
used, and economical, since less information is required to define the surface. Edwards, Choi, and Eischen ([5],[6]) also developed interpolations for pressure to minimize mass losses.
REACTMB-INS’ ability to simulate complex motion events was switched to the STL format as well by using sequences of STL files (one STL file per iteration). The method used to calculate the
immersed surface velocity calculation method requires that the number of vertices in an STL file
and the elemental connectivity remain the same for the whole sequence, which causes problems when the process of creating STL file sequences produces non-watertight STL files. While repairing
the damaged STL files is relatively easy, the STL elemental connectivity is changed in the process.
The work presented here includes the modification of REACTMB-INS to read different elemental connectivities at each iteration as well as the development of the reference point method, a new
method for calculating the immersed surface vertex velocity. Additionally, the process of generating
and pre-processing the STL sequences used by REACTMB-INS to simulate complex motion events is discussed and guidance is given for future use.
Simulations demonstrating REACTMB-INS’ IBM and ability to track gaseous contaminants in
internal and external flows are performed. Included in these demonstrations are infectious patients in a C-17 MedEvac unit, a downed-pilot, a person buried in rubble, and a collapsing building.
These simulations range in size from 7 to 326 million computational cells and use between 3 and
Since producing quality animations is the goal of many of these simulations, massive quantities of raw 3D data must be written. The conversion of this data written by REACTMB-INS to the
necessary Tecplot binary format and subsequent visualization is prohibitively expensive for practical
use. Therefore, the Silo file library, which allows the writing of binary Silo data files with metadata capabilities and is developed by Lawrence Livermore National Labs (LLNL), is introduced into
the code. By reading the Silo files with the parallel-capable VisIt visualization program that is also
2
Immersed Boundary Method for Incompressible Flows
This chapter serves as a summary and compilation of previous works on the Immersed Boundary
Method (IMB) used in REACTMB-INS as well as the current modifications made. Sections 2.1 through 2.5 consolidate (and sometimes elaborate upon) the information from previous lab papers on the
IBM (including Oberoi[17], Choi et al.[3], Ghosh[8], Ghosh et al.[9], Edwards et al.[5], and Edwards and Eischen[6]) to a single document. Section 2.6 discusses the calculation of the surface velocity and the current contributions in this area.
The computational fluid dynamics code used here is REACTMB-INS. REACTMB-INS solves the
time dependent, incompressible Navier-Stokes equations, expanded to include temperature and gas-phase agent transport. The solution procedure utilizes parallel implicit methods to advance
a time-dependent form of the governing equations, which are discretized using either a 3r d/5t h order weighted essentially non-oscillatory (WENO) scheme[15]or a 4t horder piecewise parabolic method (PPM)[4]. Both provide the high-bandwidth, minimally dissipative properties necessary to simulate turbulence. REACTMB-INS is optimized for operation on parallel computers.
Although the code is written as an artificial compressibility (AC) code, the density is treated as a
function of pressure and free-stream temperature rather than a constant. This allows the code to
function as a loosely compressible code. The AC form of the continuity equation is given as
1 β2
∂p ∂ τ+
∂ ρ ∂t +
∂(ρui) ∂xi =
0
ρ=ρ(p,T∞) = p RT∞ β2=min
u2r e f,u2+v2+w2
(2.1)
whereβis the AC parameter,p is pressure,ρis density,uis velocity,T∞is the free-stream tempera-ture,t is time, andτis pseudo-time. The momentum equations are given as
∂(ρui) ∂t +
∂(ρuiuj) ∂xj =
∂
∂xj −δi j p+τi j
−fb u o y,i τi j= (µ+µt)
∂ui ∂xj
+∂uj
∂xi −2
3δi j ∂uk ∂xk
fb u o y,i=ρgi
− Te T
,
whereµis the dynamic viscosity,µt is a turbulent viscosity,fb u o y is the buoyant force modeled according to the Boussinesq approximation,giis the gravitational acceleration, andTeis the gauge
temperature (T−T∞). The value of the turbulent viscosity term is dependent upon the turbulence model used.
In addition to the Navier Stokes equations, REACTMB-INS includes the passive scalar equations
for gauge temperatureTeand species mass fractionYk, which are given as
∂(ρφ)
∂t +
∂ ρφuj
∂xj = ∂ ∂xj
µ
S c + µt S ct
∂ φ
∂xj
φ= e T Yk , (2.3)
whereφis the passive scalar,S c is the Schmidt number, and the subscriptt denotes a turbulent variable.
In order to solve the system of equations, residual vectors for continuity, momentum, and passive scalar are formed respectively as
Rcn+1,l =1.5ρ
n+1,l −2.0ρn+0.5ρn−1
∆t +
∂(ρui) ∂xi
n+1,l
RMn+,i1,l =1.5(ρui)
n+1,l −2.0(ρu
i)n+0.5(ρui)n−1
∆t +
∂ ∂xj
ρuiuj+δi jp−τi j
n+1,l
−fb u o yn+1,l
RSn+1,l =1.5(ρφ)
n+1,l −2.0(ρφ)n+0.5(ρφ)n−1
∆t +
∂ ∂xj
ρφuj−
µ
S c + µt S ct
∂ φ
∂xj
n+1,l
,
(2.4)
wheren+1 is the current time level andl is the sub-iteration used to eliminate time linearization errors.
2.1
Introduction
To couple the flow field with the presence/motion of immersed objects, an IBM based on thedirect forcingtechnique of Fadlun et al.[7]is used. The key idea of IBMs, developed originally by Peskin [19], is that the velocity of the fluid at the surface of an immersed body must be equal to the velocity of the surface itself. This is achieved by applying a forcing function to the momentum equations to
ensure that the surface velocity is recovered as the flow solution at each time step. Additionally, the
The IBM used here embeds a surface mesh, which may be closed (ie. enclosing a volume of space) or open (zero thickness surfaces), within a flow. These surface meshes are generated as
stereolithography (STL) files using Autodesk®3ds Max. STL files are triangulated 3D geometry files
containing each vertex’s coordinates and each triangle’s face center normal vector (see Chapter 3 for more information). The Navier-Stokes equations are solved in cells outside the immersed
body (or immersed surface) (fieldcells), boundary conditions are enforced by the specification of distributions of fluid properties in cells just outside the immersed body (bandcells), and constant properties are enforced for cells inside the immersed body (interiorcells). The classification of the computational cells is determined by the signed distance function, calculated using approximate
nearest-neighbor (ANN) searching and computational geometry. The information at thefieldcells is then used to interpolate the flow information at thebandcells, imposing the presence and velocity of the immersed surface. The steps in the outlined processes are detailed in the sections that follow,
but can be summarized as:
1. Generation of the STL files for each time frame
2. Preprocessing of the STL files into a format usable by the code
3. Calculation and storage of each triangle element’s cell center, each edge’s midpoints and
normal vectors, and each vertex’s pseudo-normal vectors
4. Classification of computational cells
5. Calculation of the interpolation points’ locations and fluid properties
6. Calculation of the band cell properties
7. Application of the forcing function.
The application of the band cell properties is done by the addition of forcing terms to the original residuals. The sub-iterations used to eliminate time linearization errors discussed above serve to
adjust the velocity and pressure fields to the updated motion of the immersed body. The original
momentum and passive scalar residuals (Eq. 2.4) are modified as
Rmodn+1,l =1−G Φn+1Rorign+1,l+G Φn+1
Vn+1,l−VnB+1,l ∆t
, (2.5)
whereVis the variable vector consisting of velocities and passive scalars, the subscriptBdenotes a band cell value,G(Φ)is a sharp Heaviside function, andΦis a signed distance function at locationx
2.2
Cell Classification Procedure
A crucial step in the IBM is the classification of domain cells. The domain is split into three categories:
fieldcells, which are outside the immersed object and away from the surface,bandcells, which are outside the immersed object but very close to the surface, andinteriorcells, which are inside the immersed object. This classification is based on a signed distance function (Φ) that gives the distance
from any computational node (grid point) to its nearest surface point and is derived from concepts of computational geometry. Computational cells outside the immersed object have positive values
ofΦ(x,t)while cells inside the immersed object have negative values ofΦ(x,t). The classification process is different for closed (enclosing a volume) and open (zero-thickness) surfaces.
2.2.1 Closed surface classification
The sharp Heaviside functionG(Φ)is defined as one for points within and just outside of the immersed boundary and zero otherwise. The Heaviside function is initialized as zero for all points
xk. Then, given a pointxk, ifΦ(xk,t)>0 and if anyΦ(xk0,t)<0, wherexk0is a nearest neighbor of
xk, thenG(Φ(xk,t))is set to 1. IfΦ(xk,t)≤0, thenG(Φ(xk,t))is also set equal to 1. The set of nearest neighbors, for a structured grid discretized according to a cell-centered finite volume method, is generally defined as the 26 cells that are immediately adjacent to a particular mesh cell, though
smaller subsets can be used. Finally, the Heaviside function can be defined as
G(Φ(xk,t)) =
0, ifxk∈ΩF 1, ifxk6∈ΩF,
(2.6)
whereΩF represents the set of field points (open circles in Fig. 2.1). Classification of the node points can be summarized as follows:
• Field Points : xk ∈ΩF if Φ(xk,t)>0 and G(Φ) =0 • Band Points : xk ∈ΩB if Φ(xk,t)>0 and G(Φ) =1 • Interior Points : xk∈ΩI if Φ(xk,t)<0 and G(Φ) =1
whereΩBandΩI represent thebandandinteriorcells respectively (gray and closed circles respec-tively Fig. 2.1). The zero iso-surface of the signed distance function defines the immersed body surface. Note that the flow properties at band and interior points for use in Eq. 2.5 are only calculated
Figure 2.1Schematic illustrating classification of cell-centered points for a complex immersed body surface. Open, gray, and closed circles representfield,band, andinteriorpoints respectively, and the thick line
represents an immersed body surface. Figure from Choi et al.[3].
2.2.1.1 Unsigned Distance Computation
The distanced from grid pointsxk in a computational domainΩC to the closest surface pointxs on triangle meshesΓl for thelt hcomponent is defined asd=kx
k−xskin Fig. 2.2. Computation of the distance to 3D objects can be achieved by using brute force computation, Voronoi diagram ([14]), or hierarchical data structure ([18],[13]). Among these methods, we use akd-tree hierarchical data structure with a bounding box to accelerate finding the nearest triangle mesh. For simplicity, we consider the one component closed surface as shown in Fig. 2.3. At first, a cloud of nearby surface
verticesxvi from the given grid pointxk in a bounding box is found, in the order of the closest distance (ie.xv1 is closer thanxv2, etc), using the approximate nearest-neighbor (ANN) searching algorithm[1]. Next, since the closest vertex is usually not the closest point on a triangle mesh to a given grid pointxk, a search for the closest point in the set of neighboring triangle meshes∆ki ∈Γi that share the cloud vertexxvi is conducted. We can define the subsetΓs={Γi}of the total triangle meshesΓ. Based on the subsetΓs, the minimum distance can be obtained using point-triangle,
point-edge, and point-vertex distance calculation.
The subsetΓs above can be reduced using geometric restriction. Typical CAD programs enhance
the uniformity of the triangle and control the edge distance. For a given edge distancede, we can get a restriction for the searching algorithm. As seen in in Fig. 2.3, the circles show the spheres with radiusde and originxiv. All triangle neighbors∆ki sharing the vertexxvi are included within the spheres. The distancesdik in the subsetΓi are bounded as|dik−di| ≤de with respect to the point-vertex distancedi. Also the distance is|d
j
can be written asdik−d1j −2de <di−d1<dik−d j
1 +2de. Ifdik <d j
1, the difference should be
bounded asdi−d1<2de. Therefore, the above nearest distance calculation should be repeated for the it hnearest vertex point in ANN list which satisfiesd
i−d1<2de.
𝒙𝑘 𝒙𝑘
Figure 2.2Schematic for a minimal distance from the points in a computation domain to surface points. Based on figure from Edwards et al.[5].
𝒙𝑘 𝒙𝑘
Figure 2.3Schematic for nearest neighbors of triangle elements. Based on figure from Edwards et al.[5].
2.2.1.2 Signed Distance Computation
The signed distance functionΦfor thelt h immersed object can be obtained by multiplying the unsigned distance with the sign of the dot product of the distance vector with the outward normal
vectorn.
Φl =sgn((xk−xs)·n)d, (2.7)
where sgn(Φ)returns a value of 1 and -1 for positive and negative values ofΦrespectively. This is
done for all cells lying within the bounding box, while all cells lying outside the bounding box are assigned a large positive value. Fig. 2.4 shows a schematic of the distance vector (oriented from the
Figure 2.4Schematic showing the approximate nearest surface pointxsfor anybandpointxk and the signed distance functionΦ; open circles:fieldnodes (cell centers), closed circles: surface node points. Figure from
Choi et al.[3].
This simple procedure was found not to work poperly for some very complex CAD objects[3]. If a nearest surface point at a given field point is located on an edge or vertex, the simple signed distance
function may not be calculated correctly. Therefore, we consider an angle-weighted pseudo-normal vector[2], which is defined at surface nodes (vertices) or edges, rather than cell centers of surface triangles. For a given vertexxv, we can define the triangle elements shared with the vertex and calcualte the incident angleαifor each element with outward-pointing face normal vectorni[3] (Fig. 2.5). The angle weighted pseudo-normal vectornvat the vertex can be defined as
nv=
P
i αini kP
i αinik
, (2.8)
whereidenotes the triangle elements that surround the vertex. Based on the pseudo-normal vector at the vertex and face normal vectorni at the center of element centerxi, we can determine an inside/outside decision using the same signed distance function in Eq. 2.7 with the data set of the vertices. This procedure essentially averages local fluctuations in the outward normal that could
result from small features in the CAD file.
To define a global signed distance functionΦat any given mesh point, a simple priority rule is exercised. First, the global distance function is initialized to a large number. Then, the global signed
𝒏𝒗
Figure 2.5The incident angles(α1,α2,α3, ...)of triangle elements shared with vertexxv. The corresponding outward normal vectors are(n1,n2,n3, ...)at the cell center(x1,x2,x3, ...). Based on figure from Choi et al.[3].
functions for each immersed surfacelat that point:
Φ=min(Φl). (2.9)
The collections of points that comprise the surfaces are allowed to move according to prescribed
rate laws or dictated by a time-sequence of immersed objects. This is further discussed in Chapter 3.
2.2.2 Open surfaces classification
The cell classification processes for closed surfaces was found to fail for open (or zero-thickness) immersed surfaces[6]. Because open surfaces are represented as a single sheet of triangles, there is only one outward normal defining them, which causes the signed distance function to be
non-unique. This led to the modification of the classification process to avoid relying on the ambiguous pseudo-normal vector.
2.3
Interface Blocking
The determination of whether or not fluxes at grid interfaces are blocked due to the immersed
surface is another key of the IBM. Since flux schemes use neighboring cells’ flow information, it must be decided whether or not the interface centerxi j of adjacent cellsxiandxj is classified as blocking (no mass transport allowed) or non-blocking (transport allowed). This distinction is used to
modify the fluxes at interfaces by limiting the transport between adjacent mesh cells and modifying the interpolation stencil used to determine the flow quantities at the adjacent band cells.
2.3.1 Closed Surface Interface Blocking
For closed surfaces, the blocking distinction is quite simple, being decided upon cell classification previously done. For two adjacent cellsxiandxj with the center of the interfacexi j, the blocking indexBScan be defined as
BS(xi j) =
1, forΦi·Φj≤0 andG(xi) =G(xj) =1 0, otherwise,
(2.10)
whereG is the Heaviside function andΦis the signed distance function . Here,BS=1 indicates that the interface is a virtual wall, meaning that mass cannot be transferred through the interface and
the information at the cellxj is excluded in the interpolation stencil for the cellxiand vice versa.
2.3.2 Open Surface Interface Blocking
For an open surface, the blocking index defined for closed surfaces (Eq. 2.10) is invalid and further
classification constraints must be used. This is due to the ambiguous pseudo normal vector of open
surfaces (Section 2.2.2) and the fact that edges on the boundary of an open surface (disconnected edges) belong to only one triangle rather than two. To correct this issue, consider that the nearest
blocking index. The angles are defined as
θl
1=cos− 1
(xi−xi j)·nle |xi−xi j||nle|
θl
2=cos− 1
(xls−xi j)·nle |xls−xi j||nle|
,
(2.11)
wherenl
e is a unit vector that is orthogonal to the line segment of the disconnected edge and the plane involving with the triangle element containing the segment. Thus, the blocking indexBl(xi j) for thelt himmersed object can be defined as
Bl(xi j) =
1, ifθ1l ≥θ2l forxls is on a disconnected edge 1, if(xi−xls)·(xj−xls)≤0 forxls is not on a disconnected edge 0, otherwise.
(2.12)
We can defineBm(xi j)based on themt himmersed object in a similar manner. Finally, the blocking indexBS(xi j)for all the immersed objects at the interfacexi j can be defined as
BS(xi j) =
1, ifBl(xi j) +Bm(xi j)≥1 0, ifBl(xi j) +Bm(xi j) =0.
(2.13)
For the blocking index, we need to obtain the list of the nearest surface points with tags representing whether the points are on a disconnected edge for all of the immersed objects at all thebandcells.
2.4
Band Cell Interpolation
The primitive variables in thebandandinteriorcells are interpolated using first order approxima-tions as a function of the solution at its neighboringfieldcells and the velocity (and temperature if required) at the immersed surface.
2.4.1 Velocity Interpolation
To reconstruct the velocity, the relative velocity at thebandcellxBwith respect to the velocity at its nearest surface pointxs is split into normal and tangential components as
uB,i−us,i=uT,i(dB) +uN,i(dB), (2.14) where the subscripts T and N denote the tangential and normal components in a plane orthogonal to the immersed surface atxs,uB,iis theit hcomponent of thebandcell velocity, andus,iis theit h component of the surface velocity. It should be noted that the normal vectors given from here on
are in reference to the nearest surface point, but the subscript "s" was removed for ease of notation. The tangential velocityuT,i(dB)(relative tous,i), in the vicinity of the surface, is chosen as a power law function of the distance from the nearest surface point to the band cell, which is oriented along
the normaln, given by
uT,i(dB) =uT,i(dI)
d
B dI
k
uT,i(dI) = ui(dI)−us,i
−uN,i(dI),
(2.15)
wheredI is the distance from the immersed surface to the interpolation point (the point at which the interpolated flow variables are calculated, discussed in section 2.5) anddBis the distance from the surface to the band cell, both of which are in the direction of the surface normal vector. The choice of the power law variablekallows the model to replicate a turbulent velocity profile (k=1/7 or 1/9) or a laminar profile (k=1). The normal velocity (again relative tous,i) is given as
uN,i(dB) =uN,i(dI)c(ρ,dI,dB) uN,i(dI) = uj(dI)−us,jnjni,
(2.16)
2.4.2 Pressure Interpolation
The determination of the pressure is dependent upon whether or not the immersed surface is
moving. For a static immersed surface, there are two options: solving continuity in the band cells or
setting the band cell pressurepB equal to the interpolation point pressurep(dI)and not solving continuity. The former better conserves mass but introduces pressure oscillations on the solution
due to the exact volume of the cell occupied by the immersed object being unknown. The latter
can cause mass loss depending on the situation, degrading the solution, but does not introduce pressure oscillations. The pressure method must be chosen on a case-by-case basis based on which
solution traits are desired.
For a moving immersed surface, the continuity equation is solved in the band cells with an
added dissipation term to minimize the pressure oscillations while still enforcing mass conservation.
The continuity residual is obtained from Edwards and Eischen[6]as
Rc,m o d =Rc,o r i g+CFmax
0,−X k
nB·nkAk
∆t2p(dB)−p(dI)
(dI−dB)2
|uB·nB|, (2.17)
whereCF is a model constant set to 100,nB is the normal vector associated with the nearest surface point,nk is the outward-pointing normal vector associated with cell-facek, andAkis the area of cell-facek.
2.4.3 Temperature and other Interpolations
The temperature distribution near the surface is obtained using Walz’s relation for the temperature distribution within a compressible boundary layer[24]. For an isothermal wall, the following relation is used
TB T(dI)
= Tw
T(dI)
+
1− Tw T(dI)
+ r γ−1
2γRT(dI)
uT,i(dI)2
d
B dI
k
− r γ−1
2γRT(dI)
uT,i(dI)2
d
B dI
2k
. (2.18)
For an adiabatic wall, the following equation is used
TB T(dI)
=1+ r γ−1
2γRT(dI)
uT,i(dI)
2 1− d B dI
2k
, (2.19)
where r is the recovery factor anduT,i(dI)
2
is the kinetic energy associated with the tangential
terms proportional to the kinetic energy can be neglected.
The scaling functionc(ρ,dI,dB)in Eq. 2.16 is derived by forcing a discrete form of the continuity equation at each band cell using a locally-parallel flow assumption. The details of this derivation
can be viewed in Ghosh et al.[9]. The derivation, assuming an adiabatic wall with compressible flow, yields
c(ρ,dI,dB) = 1
e
ρ
dB
dId
−
e
ρ−
d
B
dId
−
e
ρ−+1−dB
dI
e
ρ+
d−=
d
B 2dI
k
, d+=
1
2
1+dB
dI
k
1
e
ρ=1+
r γ−1 2γRT(dI)
uT,i(dI)
2 1− d B dI
2k
1
e
ρ−=1+
r γ−1 2γRT(dI)
uT,i(dI)
2
1− d−2
1
e
ρ+=1+
r γ−1 2γRT(dI)
uT,i(dI)21− d+2.
(2.20)
For incompressible flow,ρe,ρe−, and
e
ρ+are set to unity.
For completeness of this document, the Reynolds-averaged turbulence variables in the band
cells are defined as
kB= u
2
τ
Æ
Cµ , ωB= uτ2
Æ
CµκdB
: d+>10.934
kB=k(dI)
d
B dI
2
, ωB= 60νw 0.075dB2 : d
+<10.934
d+=uτdB
n uw , uτ=
|uT,i(dI)|
ln(d+)
κ +5.1
.
(iterative solution)
(2.21)
To arrive at this form, we assume equivalence between the result provided by the power-law profile
and the law of the wall within the band cells.
2.5
Determination of Information at the Interpolation Point
point, a merit function,wl, is defined. For anybandpointxk and its nearest neighborsxl, the merit function is defined as,
wl =
1
p
kxl−xkk2−[(xl−xk)·n]2+ε
, if(xl−xk)·n>0
0, otherwise,
(2.22)
where(xl −xk)·nis the projection of the distance fromxk toxl onto the outward normalnand kxl −xkkis the magnitude of that distance. A small positive valueε∼10−12is added to the denomi-nator to prevent a numerical singularity in the event thatxl lies along the outward normal vector corresponding to pointxk. Should this be the case, the merit function is very large (∼ε−1).
Three stages are used for the calculation of the merit function. First, onlyfieldpoints are consid-ered as nearest neighbors. IfPmwm is nonzero, the weight functionωl is calculated by
ωl = wl
P
m wm
. (2.23)
Otherwise, the process outlined above is redone consideringfieldand band points as nearest neighbors. If this sum is still zero, thebandcell,xk, is treated as an interior point.
The location of the interpolation point forbandcellxk is then calculated as dI=X
l
ωl(xl −xk)·n. (2.24)
Note that this distance is in the direction of the normal vectorn. Any flow property at the interpola-tion point is calculated as
q(dI) =
X
l
Figure 2.7Schematic determination of the distancedI between the interpolation pointxI and surface node point for a given band pointxkusing the projected distancedI from neighbor pointsxl to outward normal line based on surface normal vectornat the immersed surface nodexs. Large closed circles represent the
band point to be interpolated with the information at neighbor point. Hatched black and gray circles represent the field points and band points associated with the present determination, respectively. Figure
from Choi et al.[3].
2.6
Vertex Velocity Calculation: Reference Point Method
A complex animation (such as a person walking) can be simulated in REACTMB-INS by forming
a sequence of immersed objects represented as binary STL files. As previously mentioned, a key
concept of the IBM is that the fluid velocity must equal the immersed surface velocity at the surface. As long as every binary STL file has the same number of vertices and the same elemental connectivity,
theit hvertex’s velocityuivto be calculated as
uvi =x v i −x
v i,o
∆t , (2.26)
wherexvi is the current time level’sit hvertex position,xv
i,o is the previous time level’sit hvertex position, and∆t is the physical time step. This simple technique works well as long as the elemen-tal connectivity remains the same, but this is not always the case; in practice, the STL sequence exportation and preprocessing does not always yield uniform elemental connectivity. This occurs
because an error in the CAD model from which the ASCII STL files are exported causes a surface to
be non-watertight. If this STL file were to be used in the simulation, REACTMB-INS would generate inaccurate results. While it is relatively simple to repair non-watertight ASCII STL files using software
impossible to diagnose and thus fix the original issue, the STL file must be repaired and a new method for calculating vertex velocity must be developed.
The solution proposed here is to write every ASCII STL’s vertex coordinates in an animation
sequence as a sequence of simple data files. These data files are created by setting the flag "dam-agedseq"=1 in the preprocessor (see Section 3.1) to export the "pointposition#.txt" files. Here on, these exported vertices are referred to as reference points. Since repairing the non-watertight STL
files causes little change in the overall surface, the reference points should be quite similar to the repaired STL files’ vertices. Using a similar form to Eq. 2.26, the velocity at the reference points can
be calculated as
ur e fj =x r e f j −x
r e f j,o
∆t , (2.27)
wherexr e fj is the current time level’s jt h reference point’s position andxr e fj,o is the previous time level’sjt hreference point’s position. The newly repaired and preprocessed binary STL sequence can then be used by REACTMB-INS by mapping the nearest reference point’s velocity to each vertex
3
STL Information & Creation
REACTMB-INS uses stereolithography (STL) files to define immersed surfaces for the Immersed
Boundary Method discussed in Chapter 2. Within a STL file, multiple immersed objects can exist, with each being represented as a separate level set (or signed distance) field. STL files are triangulated
geometry files containing the vertices and face-centered normal vectors of each triangle. While
many CAD packages can export STL files, the primary ones used here are SOLIDWORKS® and Autodesk®3ds Max. SOLIDWORKS® is typically well known and available to most engineering
students, making it a good choice to make stationary STL models. 3ds Max, however, is very useful
in that it can be used to create an animation and export it as a sequence of STL files, as discussed further in the sections that follow.
Exporting a STL file for each time step enables REACTMB-INS to simulate a complex animation (such as a person walking). To efficiently conduct such a simulation, reducing the I/O access time associated with reading the STL files is crucial. To reduce the I/O times, a pre-processor written in Fortran is used to convert the STL files from ASCII to binary, eliminate duplicate nodes, and store the elemental connectivity in only the first frame. The pre-processor also has the ability to merge
multiple STL files for a time-step into one STL file if required. Using the pre-processor reduces the
file size by roughly an order of magnitude.
The pre-processor and REACTMB-INS were originally written in such a way that required the
number of level sets, number of elements, and elemental connectivity to remain constant between
time-steps. Sometimes, however, some of the STL files are exported from the CAD software as non-watertight objects. This can be fixed by either repairing the CAD model and re-exporting
the sequence (not always possible) or repairing the damaged STL files using another software
package, such as Autodesk®Netfabb (see Section 3.3). While the latter is relatively simple, doing so redefines the elemental connectivity non-uniformly, necessitating the modification of the code
to allow non-uniform elemental connectivity. To enable the code to read STL files containing
non-uniform elemental connectivity, the pre-processor was modified to calculate and export the connectivity of every STL file in the sequence while REACTMB-INS was modified to be able to read
the different connectivity at every time-step. The central idea of these modifications is that the
elemental connectivity must be included in every binary STL file, and then be read by REACTMB-INS at each time-step. This was accomplished by redefining all of the STL data structures at each
but did require the development of a new method for calculating the vertex velocity needed by the Immersed Boundary Method (see Section 2.6). The following sections describe some of the steps
required to generate and pre-process STL file sequences for use in the flow solver. They are written
as "mini-user-guides" and contain step-by-step instructions for the processes.
3.1
Pre-processor Guide
To pre-process ASCII STL files to the binary format used by REACTMB-INS, the directory "ann_1.1.2"
and the files "gensurf.preprocess.f," "main.gensurf.preprocess.f," "walldist.cpp," "makefile-henry,"
and "makefile-topaz" are needed. The directory "ann_1.1.2" contains the approximate nearest neighbor (ANN) library, "gensurf.preprocess.f," "main.gensurf.preprocess.f," and "walldist.cpp"
are the pre-processing code files, and "makefile*" are the make files for Henry2 and Topaz. The
directories "Output-Node", "Output-Tec", and "Output-STL" that the pre-processor writes files to also need to be created. To run, modify the variables described below in "main.gensurf.preprocess.f"
and compile.
• "damagedseq": flag=1 allows the code to export the vertices for all frames into "pointposi-tion#.txt" and does not export the "*.bin" files
• "diffstl": flag=1 tells the code to calculate and export the elemental connectivity to each "*.bin" file
• "nseqstart": first ASCII STL frame number
• "nseqmx": last ASCII STL frame number
• "trans": translation vector used if desired. If no translation, set to 0.0
• "fscalenls": scaling factor applied to STL files if desired
• "nlsfscale": flag=1 turns on scaling
• "fileout": location and name of "*.bin" files to be exported
• "fileseq": ASCII STL file location and name to be pre-processed
The "damagedseq" flag above exists to export the vertices for each time-step to "pointposition#.txt"
for a STL sequence that contains some non-watertight ASCII STL files. These files are used in the
vertex velocity calculation discussed in Section 2.6. Since this flag is used to handle damaged STL files, no pre-processed binary STL files are exported.
Note that the pre-processor contains logic to combine multiple ASCII STL files that exist at a
3.2
STL generation and 3ds Max Guide
Autodesk®3ds Max is used to create the STL file sequences. 3ds Max has some nice features other
CAD software packages lack that, once learned, are actually quite easy to use. This guide was created to help new users overcome the steep learning curve associated with 3ds Max and become proficient
in the basic use of the tools required to create the STL file sequences. Once the basic tools are
learned, they can be expanded upon by searching through the 3ds Max menus or online guides. The layout of the 3ds Max window can be seen in Fig. 3.1. The three most used menus on the
layout are theCommandmenu (a), theAnimationmenu (b), and theObjectmenu (c). TheCommand
menu is where object creation, modification, motion, etc. are located. TheAnimationmenu is used to advance the animation, set frame-rates, and everything else pertaining to the animation. The
Objectmenu is where objects can be selected by name, hierarchy trees expanded/collapsed, and deleted by name. The white workspace that contains the objects is where objects can be selected, manually moved, linked, and deleted.
b
a
c
Figure 3.13ds Max Layout: (a)Commandmenu (b)Animationmenu (c)Objectmenu
3.2.1 Biped and Body Creation
In 3ds Max, animations of people walking can be made using the biped tool, which creates an
animatable human skeleton (Fig. 3.2 a). A body (or skin) object can be linked to the biped and follow
not necessary. Should the creation of a new skinned biped be needed, several YouTube video guides exist that provide detailed step-by-step instructions.
a b
Figure 3.2Biped skeleton (a) and body (b)
3.2.2 Walking Animation Guide
A very useful feature of the biped is that, through the use of the biped footstep tool, a walking animation can be made with very little effort. The animation includes full-body movement including
arm, leg, hip, etc. movement. Within this tool, running and jumping animations can also be made.
The biped footstep tool works by placing footsteps on a plane and automatically generating the movement that would be associated with them. The animation can then be edited by moving the
footsteps around. To make a walking animation, the following steps are taken:
1. Select the biped in theObjectmenu
2. Click on theMotiontab in theCommandmenu (Fig. 3.3 a) 3. Click on theFootstep Modebutton (Fig. 3.3 b)
4. Click on theCreate Multiple Footstepsbutton (Fig. 3.3 c), which opens a new window (Fig. 3.3 f )
5. Select the number of footsteps to be added and clickOK
• This menu also allows the stride length, stride width, and other parameters to be edited. It is useful to adjust these to get a feel for them
• Note that whenOK is clicked, the footsteps will form and will likely be in the wrong location and have the wrong orientation. Ignore this and continue to the next step.
6. Back in theCommandmenu, click theCreate Keysbutton (Fig. 3.3 d), which will create the animation for the biped. It is likely that the biped and attached body will suddenly change
positions and orientation. To modify the position and orientation, see Section 3.2.2.1
7. To delete footsteps, select them in theObjectmenu or Workspace and delete. Note that to edit footsteps,Footstep Modemust be active.
8. Adjust the frame rate by clicking in theAnimationmenu to correspond to the desired time step used in the simulation (ie.∆t =0.01 seconds corresponds to 100 frames per second) 9. Export the animation as a sequence of ASCII STL files (see Section 3.2.2.3)
Once the basic walking animation is made, the footsteps can be moved around, bent, or scaled
(Fig. 3.3 e) to generate the desired sequence. To add a pause (where the biped’s feet come together
a
b
c
d e
f
3.2.2.1 Rotating walking scene & Dummy object creation
To rotate or translate the biped and its footsteps, a "Dummy" object must be created and linked to the biped. A Dummy is a helper in 3ds Max that does not serve as a physical object, but as a reference
type object. Once created and linked, moving/rotating the Dummy object causes the biped and its footsteps to do the same. To create and link the Dummy, the following steps are taken:
1. Click on theCreatetab in theCommandmenu (Fig. 3.4 a) 2. Click on theHelperstab in theCommandmenu (Fig. 3.4 b) 3. Select the Dummy object (Fig. 3.4 c)
4. Click, hold, and drag on the work space to create a Dummy object. The size and location of the Dummy is not important since it is a reference object
5. Click the Link icon , then click and hold on the biped’s root and drag the mouse over to
any part the Dummy (the mouse icon will change when over the Dummy), then unclick
• The root is the diamond that gets highlighted when the biped is selected in the object menu, usually located near or inside the pelvis
• The wireframe view may be needed to select the root
6. Now, the Dummy object may be moved/rotated to move/rotate the biped and its footsteps
a
c
b
3.2.2.2 Adding a pause in walking
Adding a pause where the biped’s feet close for a time before resuming can be accomplished by moving the footsteps and editing theDope Sheet. This is done by the following:
1. Selectallfootsteps after the point where the pause should be
2. Move the footsteps selected until the footsteps are side by side where the pause is desired
(Fig. 3.5). This will have the biped bring its feet together, but it will continue moving instead of pausing
3. To have the biped pause where the feet come together, click onTrack View - Dope Sheet...in theGraph Editorsdrop down menu at the top of 3ds Max, which opens up theDope Sheet
window (Fig. 3.6). Note thatFootstep Modemust still be active
4. In theDope Sheetwindow, scroll down on the left menu and select the footsteps. This will bring up a view with colored bars for each footstep similar to Fig. 3.6
5. Select all footsteps after the pause, and the right side of the two footsteps at the pause
6. Hold the Ctrl key and drag the bars to the give the desired offset, where the offset is the number of frames the pause will last. Doing so should elongate the bars where the biped should pause
Figure 3.5Footsteps positioned for a pause
3.2.2.3 Exporting ASCII STL sequence
To export the animation as a sequence of ASCII STL files:
1. Create a directory to contain the ASCII STL files
2. Open the animation to be exported in 3ds Max
3. ClickOpen Script...in theMAXScriptdrop down menu at the top of 3ds Max and paste the script from Appendix A
4. Edit the following items in the script:
• Biped body name
• "seqmx": the last frame of the sequence
5. Save the script
6. ClickRun Script...in theMAXScriptdrop down menu at the top of 3ds Max 7. Select the newly created script
8. Select the directory created to hold the ASCII STL files, enter the STL root name (ie. typing "curve" and clickingSavecreates "curve#.stl"), then clickSave
9. In the dialog box that pops up, make sure theASCIIandSelected onlyboxes are checked 10. Download and open an automatic mouse clicker and set it to click repeatedly
11. Hover the mouse over theOKbutton in the dialog box
12. Engage the automatic mouse clicker to start exporting the STL sequence
13. Once done with the sequence, stop the automatic mouse clicker
The use of the automatic mouse clicker is needed because the provided script does not selectOK. Note that once the script starts running, the only way to stop it is to finish the sequence or exit 3ds Max.
3.2.3 Hints and Errors
Provided here are some quirks and hints associated with the 3ds Max program that were encountered
during animation creation.
• If a footstep surrounded by other footsteps is deleted, the biped may act like it is still there
• Make sure the coordinate system used is the same as the computational grid. This cannot be easily fixed
• Once key frames are created, it can sometimes be impossible to get the biped back to the original orientation. Therefore, save backup copies often, especially after substantial progress
is made in one area
• When inFootstep Mode, only footsteps can be edited, and likewise footsteps can only be edited by selecting the biped and enteringFootstep Mode
• Once the export script is started, the only way to stop it is to finish exporting the sequence or
quit 3ds Max. It is recommend to export a small sequence (10 frames) first and check the STL
files in Netfabb before doing the whole sequence
• Included in Appendix B is a script that exports the coordinates of points to a text file for an
animation. This script is not used in this thesis, but is a good example of a 3ds Max script
3.3
STL Repair
Checking and repairing multiple ASCII STL files is quite simple using Autodesk®Netfabb (a free
student edition can be downloaded from the Autodesk®website). To check and repair (if necessary) ASCII STL files:
1. Open Netfabb and clickAdd Partunder theFiledrop down menu 2. Add the entire STL sequence by highlighting all files and clickOpen
3. This will open a window showing the files opened with either a green check or a red warning
sign next to it for undamaged and damaged STL files respectively
4. If no STL files are damaged, nothing needs to be done. If there are damaged files, continue to
the next step
5. Should any files be damaged, note the damaged file numbers, make sure theAutomatic Part Repairbox is selected, and clickAdd Parts
4
VisIt & Silo
VisIt is an open-source visualization tool with parallel capabilities developed and supported by
Lawrence Livermore National Laboratory. Because of VisIt’s parallel processing capabilities, it can interactively analyze and visualize large data files. Silo is a library for reading and writing binary data
files, also developed by Lawrence Livermore National Laboratory, that is intended to be a universal
file format readable by multiple data-processing applications. We have chosen VisIt to read and visualize the Silo data files.
Reading Silo files with VisIt can be a powerful combination if properly utilized. One benefit of
reading Silo files with VisIt is that data being written by a flow solver can be viewed immediately, without the need for post-processing. Additionally, VisIt being run on a local computer can visualize
data still on a HPC cluster and can use the HPC’s processors in parallel. This allows for rapid access of data and visualization without the need of a high-power local computer. Another benefit of using
VisIt to read Silo files is that the metadata option, if utilized, can further accelerate the visualization
of data (discussed in Section 4.1.1). The final benefit of using VisIt to read Silo files is that variables constant in time (such as the grid, signed distance fields of non-moving immersed boundaries, etc.)
can be stored in the first time set of data. Doing this can immensely reduce the total data set size for
a large run.
The main drawback of using VisIt and Silo is the difficulty of implementing and modifying the
Silo file writing in the flow solver. Due to this difficulty, it is common to encounter coding errors
that tend to be very difficult to debug.
The purpose of this chapter is to provide information on VisIt and Silo and provide guidance on
modifying the Silo file writing once implemented. For further information, one can reference the
manuals for VisIt and Silo on the Lawrence Livermore National Lab website. While these manuals tend to lack the depth of information needed for their use, they offer a good starting point. It
is recommended to join visitusers.org, an organization that offers further online VisIt and Silo
information as well as email support.