Exemplo n.º 1
0
 def boundaries(self):
     x, y = self.grid
     return [
         EquilibriumBoundaryPU(
             np.abs(y - 1) < 1e-6, self.units.lattice, self.units,
             np.array([1.0, 0.0])),
         BounceBackBoundary(np.abs(y) < 1e-6, self.units.lattice)
     ]
Exemplo n.º 2
0
 def boundaries(self):
     x, y = self.grid
     return [
         EquilibriumBoundaryPU(
             np.abs(x) < 1e-6, self.units.lattice, self.units,
             np.array([self.units.characteristic_velocity_pu, 0])),
         AntiBounceBackOutlet(self.units.lattice, [1, 0]),
         BounceBackBoundary(self.mask, self.units.lattice)
     ]
Exemplo n.º 3
0
 def boundaries(self):
     x = self.grid[0]
     return [
         EquilibriumBoundaryPU(
             np.abs(x) < 1e-6, self.units.lattice, self.units,
             self.units.characteristic_velocity_pu * self._unit_vector()),
         AntiBounceBackOutlet(self.units.lattice,
                              self._unit_vector().tolist()),
         BounceBackBoundary(self.mask, self.units.lattice)
     ]
Exemplo n.º 4
0
 def boundaries(self):
     mask = np.zeros(self.grid[0].shape, dtype=bool)
     mask[:, [0, -1]] = True
     boundary = BounceBackBoundary(mask=mask, lattice=self.units.lattice)
     return [boundary]