# Walls¶

Walls are used to represent time-independent stationary boundary conditions for the flows. They are described in the form of a signed distance function, such that a zero-level isosurface defines the wall surface. No slip and no through boundary conditions are enforced on that surface by bouncing the particles off the wall surface.

In order to prevent undesired density oscillations near the walls, so called frozen particles are used. These non-moving particles reside inside the walls and interact with the regular liquid particles. If the density and distribution of the frozen particles is the same as of the corresponding liquid particles, the density oscillations in the liquid in proximity of the wall is minimal. The frozen particles have to be created based on the wall in the beginning of the simulation, see ymero.makeFrozenWallParticles.

In the beginning of the simulation all the particles defined in the simulation (even not attached to the wall by ymero) will be checked against all of the walls. Those inside the wall as well as objects partly inside the wall will be deleted. The only exception are the frozen PVs, created by the ymero.makeFrozenWallParticles or the PVs manually set to be treated as frozen by Wall.attachFrozenParticles

## Summary¶

 Box() Rectangular cuboid wall with edges aligned with the coordinate axes. Cylinder() Cylindrical infinitely stretching wall, the main axis is aligned along OX or OY or OZ MovingPlane() Planar wall that is moving along itself with constant velocity. OscillatingPlane() Planar wall that is moving along itself with periodically changing velocity: Plane() Planar infinitely stretching wall. RotatingCylinder() Cylindrical wall rotating with constant angular velocity along its axis. SDF() This wall is based on an arbitrary Signed Distance Function defined in the simulation domain on a regular cartesian grid. Sphere() Spherical wall. Wall() Base wall class.

## Details¶

class Box

Rectangular cuboid wall with edges aligned with the coordinate axes.

__init__(name: str, low: Tuple[float, float, float], high: Tuple[float, float, float], inside: bool = False) → None
Parameters: name – name of the wall low – lower corner of the box high – higher corner of the box inside – whether the domain is inside the box or outside of it
attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.

class Cylinder

Cylindrical infinitely stretching wall, the main axis is aligned along OX or OY or OZ

__init__(name: str, center: Tuple[float, float], radius: float, axis: str, inside: bool = False) → None
Parameters: name – name of the wall center – point that belongs to the cylinder axis projected along that axis radius – cylinder radius axis – direction of cylinder axis, valid values are “x”, “y” or “z” inside – whether the domain is inside the cylinder or outside of it
attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.

class MovingPlane

Planar wall that is moving along itself with constant velocity. Can be used to produce Couette velocity profile in combination with The boundary conditions on such wall are no-through and constant velocity (specified).

__init__(name: str, normal: Tuple[float, float, float], pointThrough: Tuple[float, float, float], velocity: Tuple[float, float, float]) → None
Parameters: name – name of the wall normal – wall normal, pointing inside the wall pointThrough – point that belongs to the plane velocity – wall velocity, should be orthogonal to the normal
attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.

class OscillatingPlane

Planar wall that is moving along itself with periodically changing velocity:

$\mathbf{u}(t) = cos(2*\pi * t / T);$
__init__(name: str, normal: Tuple[float, float, float], pointThrough: Tuple[float, float, float], velocity: Tuple[float, float, float], period: float) → None
Parameters: name – name of the wall normal – wall normal, pointing inside the wall pointThrough – point that belongs to the plane velocity – velocity amplitude, should be orthogonal to the normal period – oscillation period dpd time units
attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.

class Plane

Planar infinitely stretching wall. Inside is determined by the normal direction .

__init__(name: str, normal: Tuple[float, float, float], pointThrough: Tuple[float, float, float]) → None
Parameters: name – name of the wall normal – wall normal, pointing inside the wall pointThrough – point that belongs to the plane
attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.

class RotatingCylinder

Cylindrical wall rotating with constant angular velocity along its axis.

__init__(name: str, center: Tuple[float, float], radius: float, axis: str, omega: float, inside: bool = False) → None
Parameters: name – name of the wall center – point that belongs to the cylinder axis projected along that axis radius – cylinder radius axis – direction of cylinder axis, valid values are “x”, “y” or “z” omega – angular velocity of rotation along the cylinder axis inside – whether the domain is inside the cylinder or outside of it
attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.

class SDF

This wall is based on an arbitrary Signed Distance Function defined in the simulation domain on a regular cartesian grid. The wall reads the SDF data from a .sdf file, that has a special structure.

First two lines define the header: three real number separated by spaces govern the size of the domain where the SDF is defined, and next three integer numbers ($$Nx\,\,Ny\,\,Nz$$) define the resolution. Next the $$Nx \times Ny \times Nz$$ single precision floating point values are written (in binary representation).

Negative SDF values correspond to the domain, and positive – to the inside of the wall. Therefore the boundary is defined by the zero-level isosurface.

__init__(name: str, sdfFilename: str, h: Tuple[float, float, float] = (0.25, 0.25, 0.25)) → None
Parameters: name – name of the wall sdfFilename – lower corner of the box h – resolution of the resampled SDF. In order to have a more accurate SDF representation, the initial function is resampled on a finer grid. The lower this value is, the better the wall will be, however, the more memory it will consume and the slower the execution will be
attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.

class Sphere

Spherical wall.

__init__(name: str, center: Tuple[float, float, float], radius: float, inside: bool = False) → None
Parameters: name – name of the wall center – sphere center radius – sphere radius inside – whether the domain is inside the sphere or outside of it
attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.

class Wall

Bases: object

Base wall class.

__init__()

Initialize self. See help(type(self)) for accurate signature.

attachFrozenParticles(arg0: ParticleVectors.ParticleVector) → None

Let the wall know that the following ParticleVector should be treated as frozen. As a result, its particles will not be removed from the inside of the wall.