Exemplo n.º 1
0
    def create_scheme(self):

        Re = 420
        nu = 0.125 / Re
        c0 = 1.25
        hdx = 1.2

        wcsph = WCSPHScheme(
            ['fluid'],
            ['boundary'],
            dim=2,
            c0=c0,
            h0=hdx,
            hdx=hdx,
            rho0=1,
            alpha=0.1,
            beta=0,
            gamma=7,
        )

        dt = 5e-3
        tf = 15

        wcsph.configure_solver(
            tf=tf,
            dt=dt,
        )

        return wcsph
Exemplo n.º 2
0
 def create_scheme(self):
     s = WCSPHScheme(['fluid'], ['top_wall', 'bottom_wall'],
                     dim=3,
                     rho0=rho0,
                     c0=co,
                     h0=dx * hdx,
                     hdx=hdx,
                     gamma=7.0,
                     alpha=0.5,
                     beta=0.0,
                     nu=mu / rho0,
                     tensile_correction=True)
     kernel = WendlandQuintic(dim=3)
     dt_cfl = 0.25 * (hdx * dx) / co
     dt_viscous = 0.125 * (hdx * dx)**2 * rho0 / mu
     print("CFL based time step: %.3E" % dt_cfl)
     print("Viscous time step:   %.3E" % dt_viscous)
     dt = min(dt_cfl, dt_viscous)
     s.configure_solver(kernel=kernel,
                        integrator_cls=EPECIntegrator,
                        tf=tf,
                        dt=dt,
                        adaptive_timestep=True,
                        n_damp=50,
                        pfreq=200)
     return s
Exemplo n.º 3
0
 def create_scheme(self):
     s = WCSPHScheme(
         ['fluid'], [], dim=2, rho0=self.ro, c0=self.co,
         h0=self.dx*self.hdx, hdx=self.hdx, gamma=7.0, alpha=0.1, beta=0.0
     )
     dt = 5e-6
     tf = 0.0076
     s.configure_solver(dt=dt, tf=tf)
     return s
Exemplo n.º 4
0
 def create_scheme(self):
     s = WCSPHScheme(
         ['fluid'], ['solid'], dim=3, rho0=1000, c0=c0,
         h0=hdx*dx, hdx=hdx, gz=-9.81, alpha=0.25, beta=0.0, gamma=7,
         hg_correction=True, tensile_correction=False
     )
     extra_steppers = dict(solid=OneStageRigidBodyStep())
     s.configure_solver(
         extra_steppers=extra_steppers, tf=10.0, dt=dt
     )
     return s
Exemplo n.º 5
0
 def create_scheme(self):
     s = WCSPHScheme(
         ['fluid'], ['boundary'], dim=dim, rho0=ro, c0=self.co,
         h0=h0, hdx=hdx, gz=-9.81, alpha=alpha, beta=beta, gamma=gamma,
         hg_correction=True, tensile_correction=True
     )
     kernel = WendlandQuintic(dim=dim)
     s.configure_solver(
         kernel=kernel, integrator_cls=EPECIntegrator, tf=tf, dt=dt,
         adaptive_timestep=True, n_damp=50
     )
     return s
 def create_scheme(self):
     s = WCSPHScheme(
         ['fluid'], [], dim=2, rho0=self.ro, c0=self.co,
         h0=self.dx*self.hdx, hdx=self.hdx, gamma=7.0, alpha=0.1, beta=0.0
     )
     kernel = Gaussian(dim=2)
     dt = 5e-6; tf = 0.0076
     s.configure_solver(
         kernel=kernel, integrator_cls=EPECIntegrator, dt=dt, tf=tf,
         adaptive_timestep=True, cfl=0.3, n_damp=50,
         output_at_times=[0.0008, 0.0038]
     )
     return s
Exemplo n.º 7
0
 def create_scheme(self):
     s = WCSPHScheme(['fluid'], [],
                     dim=2,
                     rho0=1.0,
                     c0=1400,
                     h0=1.3 * 0.025,
                     hdx=1.3,
                     gamma=7.0,
                     alpha=0.1,
                     beta=0.0)
     dt = 5e-6
     tf = 0.0076
     s.configure_solver(
         dt=dt,
         tf=tf,
     )
     return s