Ejemplo n.º 1
0
wall = Wall(dist=PADDING, normal=[1, 0, 0])
system.constraints.add(shape=wall, particle_type=1)

wall = Wall(dist=-(LENGTH + PADDING), normal=[-1, 0, 0])
system.constraints.add(shape=wall, particle_type=1)

# Setup cone
IRAD = 4.0
ANGLE = pi / 4.0
ORAD = (DIAMETER - IRAD) / sin(ANGLE)
SHIFT = 0.25 * ORAD * cos(ANGLE)

hollow_cone = HollowCone(
    center=[BOX_L[0] / 2.0 + SHIFT, BOX_L[1] / 2.0, BOX_L[2] / 2.0],
    axis=[-1, 0, 0],
    outer_radius=ORAD,
    inner_radius=IRAD,
    width=2.0,
    opening_angle=ANGLE,
    direction=1)
system.constraints.add(shape=hollow_cone, particle_type=1)

##########################################################################
#
# We set up a WCA (almost-hard) interaction between the particles and the
# confining geometry. We do not have particle-particle interactions, which
# are not necessary to observe rectification.
#
##########################################################################

SIGMA = 0.5
CUTOFF = 1.12246 * SIGMA
Ejemplo n.º 2
0
# from the edge of the box, with a normal along the x-axis
wall = ...

# Setup cone

irad = 4.0
angle = pi / 4.0
orad = (diameter - irad) / sin(angle)
shift = 0.25 * orad * cos(angle)

hollow_cone = LBBoundary(
    shape=HollowCone(
        center=[length / 2.0 + shift,
                (diameter + 4) / 2.0,
                (diameter + 4) / 2.0],
        axis=[-1, 0, 0],
        outer_radius=orad,
        inner_radius=irad,
        width=2.0,
        opening_angle=angle,
        direction=1))
system.lbboundaries.add(hollow_cone)

##########################################################################

# Output the geometry

lbf.print_vtk_boundary("{}/boundary.vtk".format(outdir))

################################################################################
## Exercise 2 ##
# Visualize this geometry using paraview
Ejemplo n.º 3
0
cylinder = Cylinder(...)
system.constraints.add(shape=cylinder, particle_type=1)

# Setup walls

wall = Wall(...)
system.constraints.add(shape=wall, particle_type=1)

wall = Wall(...)
system.constraints.add(shape=wall, particle_type=1)

# Setup cone

...

hollow_cone = HollowCone(...)
system.constraints.add(shape=hollow_cone, particle_type=1)

##########################################################################
#
# We set up a WCA (almost-hard) interaction between the particles and the
# confining geometry. We do not have particle-particle interactions, which
# are not necessary to observe rectification.
#
##########################################################################

SIGMA = 0.5
CUTOFF = 1.12246 * SIGMA
EPSILON = 1.0
SHIFT = 0.25
Ejemplo n.º 4
0
## Exercise 1 ##
# Set up two walls to cap the cylinder respecting the padding
# between them and the edge of the box, with a normal along the x-axis
wall = ...

# Setup cone

IRAD = 4.0
ANGLE = pi / 4.0
ORAD = (DIAMETER - IRAD) / sin(ANGLE)
SHIFT = 0.25 * ORAD * cos(ANGLE)

hollow_cone = LBBoundary(
    shape=HollowCone(
        center=[BOX_L[0] / 2. + SHIFT,
                BOX_L[1] / 2.,
                BOX_L[2] / 2.,
        axis=[-1, 0, 0],
        outer_radius=ORAD,
        inner_radius=IRAD,
        width=2.0,
        opening_angle=ANGLE,
        direction=1))
system.lbboundaries.add(hollow_cone)

##########################################################################

# Output the geometry

lbf.print_vtk_boundary("{}/boundary.vtk".format(outdir))
Ejemplo n.º 5
0
# from the edge of the box, with a normal along the x-axis
wall = ...

# Setup cone

irad = 4.0
angle = pi / 4.0
orad = (diameter - irad) / sin(angle)
shift = 0.25 * orad * cos(angle)

hollow_cone = LBBoundary(shape=HollowCone(position_x=length / 2.0 - shift,
                                          position_y=(diameter + 4) / 2.0,
                                          position_z=(diameter + 4) / 2.0,
                                          orientation_x=1,
                                          orientation_y=0,
                                          orientation_z=0,
                                          outer_radius=orad,
                                          inner_radius=irad,
                                          width=2.0,
                                          opening_angle=angle,
                                          direction=1))
system.lbboundaries.add(hollow_cone)

################################################################################

# Output the geometry

lbf.print_vtk_boundary("{}/boundary.vtk".format(outdir))

## Exercise 2 ##
# Visualize this geometry using paraview