<HTML>
<CENTER><A HREF = "https://sparta.github.io">SPARTA WWW Site</A> - <A HREF = "Manual.html">SPARTA Documentation</A> - <A HREF = "Section_commands.html#comm">SPARTA Commands</A> 
</CENTER>






<HR>

<H3>boundary command 
</H3>
<P><B>Syntax:</B>
</P>
<PRE>boundary x y z 
</PRE>
<UL><LI>x,y,z = <I>o</I> or <I>p</I> or <I>r</I> or <I>a</I> or <I>s</I>, one or two letters 

<PRE>  <I>o</I> is outflow
  <I>p</I> is periodic
  <I>r</I> is specular reflection
  <I>a</I> is axi-symmetric
  <I>s</I> is treat boundary as a surface 
</PRE>

</UL>
<P><B>Examples:</B>
</P>
<PRE>boundary o p p
boundary os o o
boundary r p rs 
</PRE>
<P><B>Description:</B>
</P>
<P>Set the style of boundaries for the global simulation box in each of
the x, y, z dimensions.  A single letter assigns the same style to
both the lower and upper face of the box in that dimension.  Two
letters assigns the first style to the lower face and the second style
to the upper face.  The size of the simulation box is set by the
<A HREF = "create_box.html">create_box</A> command.
</P>
<P>The boundary style determines how particles exiting the box
are handled.
</P>
<P>Style <I>o</I> means an outflow boundary, so that particles freely exit
the simulation.
</P>
<P>Style <I>p</I> means the box is periodic, so that particles exit one
end of the box and re-enter the other end.  The <I>p</I> style must be
applied to both faces of a dimension.
</P>
<P>Style <I>r</I> means a specularly reflecting boundary.  Particles that
cross this boundary have their velocity reversed so as to re-enter the
box.  The new velocity is used to advect the particle for the reminder
of the timestep following the collision.
</P>
<P>Style <I>a</I> means an axi-symmetric boundary, which can only be used for
the lower y-dimension boundary in a 2d simulation.  The simulation box
must also have a value of 0.0 for <I>ylo</I>; see the
<A HREF = "create_box.html">create_box</A> command.  This effectively means that the
x-axis is the axis of symmetry.  The upper y-dimension boundary cannot
be periodic.
</P>
<P>Style <I>s</I> means the boundary is treated as a surface which allows the
particle-surface interaction to be treated in a variety of ways via
the options provided by the <A HREF = "surf_collide.html">surf_collide</A> command.
This is effectively the same as when a particle collides with a
triangulated surface read in and setup by the
<A HREF = "read_surf.html">read_surf</A> command.
</P>
<P>For style <I>s</I>, the boundary face must also be assigned to a surface
collision model defined by the <A HREF = "surf_collide.html">surf_collide</A>
command.  The assignment of the boundary to the model is done via the
<A HREF = "bound_modify.html">bound_modify</A> command.
</P>
<P><B>Restrictions:</B>
</P>
<P>This command must be used before the grid is defined, e.g. by a
<A HREF = "create_grid.html">create_grid</A> command.
</P>
<P>For 2d simulations, the z dimension must be periodic.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "bound_modify.html">bound_modify</A>, <A HREF = "surf_collide.html">surf_collide</A>
</P>
<P><B>Default:</B>
</P>
<PRE>boundary p p p 
</PRE>
</HTML>
