def create_solver(self): """Create Solver with min. time step from CFL and viscous step.""" kernel = CubicSpline(dim=3) integrator = EPECIntegrator(fluid=WCSPHStep(), walls=WCSPHStep(), ellipsoid=RK2StepRigidBody()) h = self.hdx * self.dx dt_cfl = 0.4 * h / (1.1 * self.co) dt_viscous = 0.125 * h**2 / self.nu dt = min(dt_viscous, dt_cfl) print("dt_cfl: %s" % dt_cfl) print("dt_viscous: %s" % dt_viscous) print("DT: %s" % dt) tf = 12 solver = Solver( kernel=kernel, dim=3, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False, ) return solver
def create_solver(self): kernel = CubicSpline(dim=dim) integrator = EPECIntegrator(body=RK2StepRigidBody()) solver = Solver(kernel=kernel, dim=dim, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False) solver.set_print_freq(10) return solver
def create_solver(self): dim = 3 kernel = CubicSpline(dim=dim) #kernel = WendlandQuintic(dim=dim) self.wdeltap = kernel.kernel(rij=dx, h=hdx * dx) integrator = EPECIntegrator(inner_core=RK2StepRigidBody(), outer_core=WCSPHStep(), mantle=RK2StepRigidBody()) solver = Solver(kernel=kernel, dim=dim, integrator=integrator) dt = 1e-9 tf = 8e-6 solver.set_time_step(dt) solver.set_final_time(tf) solver.set_print_freq(100) return solver
def create_solver(self): kernel = WendlandQuintic(dim=dim) integrator = EPECIntegrator(fluid=WCSPHStep(), obstacle=RK2StepRigidBody(), boundary=WCSPHStep()) solver = Solver(kernel=kernel, dim=dim, integrator=integrator, tf=tf, dt=dt, adaptive_timestep=True, n_damp=0) return solver
def configure_scheme(self): s = self.scheme scheme = self.options.scheme if scheme == 'wcsph': s.configure(h0=self.h0, hdx=self.hdx) elif scheme == 'edac': s.configure(h=self.h0) step = dict(cube=RK2StepRigidBody()) s.configure_solver(kernel=CubicSpline(dim=2), dt=self.dt, tf=3.0, adaptive_timestep=False, extra_steppers=step)
def create_solver(self): kernel = CubicSpline(dim=2) integrator = EPECIntegrator(fluid=WCSPHStep(), tank=WCSPHStep(), cube=RK2StepRigidBody(), wood=RK2StepRigidBody()) dt = 0.125 * self.dx * self.hdx / (self.co * 1.1) / 2. print("DT: %s" % dt) tf = 1.5 solver = Solver( kernel=kernel, dim=2, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False, ) return solver
def create_solver(self): kernel = WendlandQuintic(dim=2) integrator = EPECIntegrator(fluid=WCSPHStep(), block=RK2StepRigidBody()) solver = Solver(kernel=kernel, dim=2, integrator=integrator, tf=tf, dt=dt, adaptive_timestep=False) return solver
def create_solver(self): print(self.gamma_n) print(self.dt) kernel = CubicSpline(dim=dim) integrator = EPECIntegrator(ball=RK2StepRigidBody()) solver = Solver(kernel=kernel, dim=dim, integrator=integrator, dt=self.dt, tf=tf, output_at_times=[wall_time-0.025, wall_time-0.05, wall_time+0.1, wall_time+0.3, wall_time+0.5], pfreq=1000000) return solver
def create_solver(self): kernel = CubicSpline(dim=2) integrator = EPECIntegrator(fluid=WCSPHStep(), cube=RK2StepRigidBody(), tank=WCSPHStep()) dt = 1 * 1e-4 print("DT: %s" % dt) tf = 1 solver = Solver( kernel=kernel, dim=2, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False, ) return solver
def create_solver(self): print(self.gamma_n) print(self.dt) kernel = CubicSpline(dim=dim) # integrator = EPECIntegrator(ball=RK2StepRigidBody()) integrator = EPECIntegrator(wall=WCSPHStep(), temp_wall=WCSPHStep(), fluid=WCSPHStep(), ball=RK2StepRigidBody()) solver = Solver(kernel=kernel, dim=dim, integrator=integrator, dt=self.dt, tf=tf, adaptive_timestep=False) return solver