コード例 #1
0
 def boundary_conditions(self, hx, hy):
     where = (hx == hy)
     self.set_node(
         where,
         NTEquilibriumVelocity(
             multifield((0.01 * (hx - self.gy / 2)**2, 0.0), where)))
     self.set_node((hx > 10) & (hy < 5), NTFullBBWall)
コード例 #2
0
ファイル: subdomain.py プロジェクト: zliu72/sailfish
        def boundary_conditions(self, hx, hy):
            where = (hx == hy)
            self.set_node(
                where,
                NTEquilibriumVelocity(
                    multifield((0.01 * (hx - self.gy / 2)**2, 0.0), where)))

            where = ((hx == 5) & (hy == 7))
            self.set_node(where,
                          NTEquilibriumDensity(DynamicValue(0.1 * S.gx)))

            # Interpolated time series.
            data = np.linspace(0, 50, 10)
            where = ((hx == 5) & (hy == 8))
            self.set_node(
                where,
                NTEquilibriumDensity(
                    DynamicValue(0.1 * S.gx *
                                 LinearlyInterpolatedTimeSeries(data, 40))))

            # Same underlying data, but different time step.
            where = ((hx == 5) & (hy == 9))
            self.set_node(
                where,
                NTEquilibriumDensity(
                    DynamicValue(0.1 * S.gx *
                                 LinearlyInterpolatedTimeSeries(data, 30))))

            self.set_node((hx > 10) & (hy < 5), NTFullBBWall)
コード例 #3
0
 def boundary_conditions(self, hx, hy, hz):
     where = np.logical_and((hx == hy), (hy == hz))
     self.set_node(
         where,
         NTEquilibriumVelocity(
             multifield((0.01 * (hy - self.gy / 2)**2, 0.03 *
                         (hz - self.gz / 2)**2, 0.0), where)))
     self.set_node((hx > 10) & (hy < 5) & (hz < 7), NTFullBBWall)
コード例 #4
0
ファイル: subdomain.py プロジェクト: Mokosha/sailfish
 def boundary_conditions(self, hx, hy, hz):
     where = np.logical_and((hx == hy), (hy == hz))
     self.set_node(
         where,
         NTEquilibriumVelocity(
             multifield((0.01 * (hy - self.gy / 2) ** 2, 0.03 * (hz - self.gz / 2) ** 2, 0.0), where)
         ),
     )
     self.set_node((hx > 10) & (hy < 5) & (hz < 7), NTFullBBWall)
コード例 #5
0
ファイル: subdomain.py プロジェクト: brbr520/LBM-sailfish
    def boundary_conditions(self, hx, hy):
        where = (hx == hy)
        self.set_node(where, NTEquilibriumVelocity(
            multifield((0.01 * (hx - self.gy / 2)**2, 0.0), where)))

        where = ((hx == 5) & (hy == 7))
        self.set_node(where, NTEquilibriumDensity(
            DynamicValue(0.1 * S.gx)))

        # Interpolated time series.
        data = np.linspace(0, 50, 10)
        where = ((hx == 5) & (hy == 8))
        self.set_node(where, NTEquilibriumDensity(
            DynamicValue(0.1 * S.gx * LinearlyInterpolatedTimeSeries(data, 40))))

        # Same underlying data, but different time step.
        where = ((hx == 5) & (hy == 9))
        self.set_node(where, NTEquilibriumDensity(
            DynamicValue(0.1 * S.gx * LinearlyInterpolatedTimeSeries(data, 30))))

        self.set_node((hx > 10) & (hy < 5), NTFullBBWall)
コード例 #6
0
ファイル: subdomain.py プロジェクト: shawakaze/sailfish
 def boundary_conditions(self, hx, hy):
     where = (hx == hy)
     self.set_node(where,
             NTEquilibriumVelocity(
                 multifield((0.01 * (hx - self.gy / 2)**2, 0.0), where)))
コード例 #7
0
ファイル: subdomain.py プロジェクト: Mokosha/sailfish
 def boundary_conditions(self, hx, hy):
     where = hx == hy
     self.set_node(where, NTEquilibriumVelocity(multifield((0.01 * (hx - self.gy / 2) ** 2, 0.0), where)))
     self.set_node((hx > 10) & (hy < 5), NTFullBBWall)