def create_solver(self): kernel = WendlandQuintic(dim=2) integrator = PECIntegrator(fluid=TransportVelocityStep()) solver = Solver( kernel=kernel, dim=dim, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False) return solver
def create_solver(self): kernel = QuinticSpline(dim=2) integrator = PECIntegrator(liquid=TransportVelocityStep(), gas=TransportVelocityStep()) solver = Solver( kernel=kernel, dim=dim, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False) return solver
def create_solver(self): kernel = WendlandQuintic(dim=2) integrator = PECIntegrator(fluid=VerletSymplecticWCSPHStep()) solver = Solver(kernel=kernel, dim=dim, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False) return solver
def create_solver(self): ''' Define solver ''' kernel = CubicSpline(dim=2) #Gaussian(dim=2) #QuinticSpline(dim=2) #WendlandQuintic(dim=2) ) if self.PST == False: integrator = PECIntegrator(fluid = WCSPHStep()) elif self.PST == True: integrator = PECIntegrator(fluid = DPSPHStep()) solver = Solver( kernel=kernel, dim=2, integrator=integrator, dt=self.dt, tf=self.tf, pfreq=30 ) return solver
def create_solver(self): # Create the kernel #kernel = Gaussian(dim=2) kernel = QuinticSpline(dim=2) integrator = PECIntegrator(fluid=WCSPHStep()) # Create a solver. solver = Solver(kernel=kernel, dim=2, integrator=integrator, tf=tf, dt=dt, output_at_times=output_at_times) return solver
def create_solver(self): kernel = QuinticSpline(dim=2) integrator = PECIntegrator(fluid=TransportVelocityStep()) solver = Solver(kernel=kernel, dim=dim, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False, output_at_times=[0., 0.08, 0.16, 0.26]) return solver
def create_solver(self): kernel = WendlandQuintic(dim=2) self.wdeltap = kernel.kernel(rij=dx, h=hdx * dx) integrator = PECIntegrator(bar=SolidMechStep()) solver = Solver(kernel=kernel, dim=2, integrator=integrator) dt = 1e-9 tf = 2.5e-5 solver.set_time_step(dt) solver.set_final_time(tf) return solver
def create_solver(self): kernel = CubicSpline(dim=2) integrator = PECIntegrator(fluid=WCSPHStep()) dt = 5e-6 tf = 0.0076 solver = Solver(kernel=kernel, dim=2, integrator=integrator, dt=dt, tf=tf) return solver
def test_invalid_kwarg_raises_error(self): # Given x = np.linspace(0, 1, 10) pa = get_particle_array(name='fluid', x=x) equations = [SummationDensity(dest='fluid', sources=['fluid'])] kernel = QuinticSpline(dim=1) a_eval = AccelerationEval([pa], equations, kernel=kernel) a_helper = AccelerationEvalCythonHelper(a_eval) # When/Then integrator = PECIntegrator(f=WCSPHStep()) self.assertRaises(RuntimeError, IntegratorCythonHelper, integrator, a_helper)
def create_solver(self): kernel = CubicSpline(dim=2) self.wdeltap = kernel.kernel(rij=dx, h=hdx * dx) integrator = PECIntegrator(solid=SolidMechStep()) solver = Solver(kernel=kernel, dim=2, integrator=integrator) dt = 1e-8 tf = 5e-5 solver.set_time_step(dt) solver.set_final_time(tf) solver.set_print_freq(500) return solver
def create_solver(self): # Create the kernel #kernel = Gaussian(dim=3) kernel = CubicSpline(dim=3) #kernel = QuinticSpline(dim=3) integrator = PECIntegrator(tahini=WCSPHStep(), spoon=WCSPHStep()) # Create a solver. solver = Solver(kernel=kernel, dim=3, integrator=integrator, tf=tf, dt=dt, adaptive_timestep=False ) return solver
def create_solver(self): kernel = CubicSpline(dim=2) integrator = PECIntegrator(fluid=InletOutletStep(), inlet=InletOutletStep(), outlet=InletOutletStep()) dt = 1e-2 tf = 6 solver = Solver(kernel=kernel, dim=2, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False, pfreq=20) return solver
def create_solver(self): kernel = CubicSpline(dim=3) integrator = PECIntegrator(fluid=WCSPHStep(), boundary=OneStageRigidBodyStep()) dt = 0.125 * self.h0 / c0 self.scheme.configure(h0=self.h0, hdx=self.hdx) solver = Solver(kernel=kernel, dim=3, integrator=integrator, tf=tf, dt=dt, adaptive_timestep=True, fixed_h=False) return solver
def create_solver(self): kernel = CubicSpline(dim=3) if self.options.test: integrator = PECIntegrator(fluid=WCSPHStep(), boundary=WCSPHStep()) adaptive, n_damp = False, 0 else: integrator = EPECIntegrator(fluid=WCSPHStep(), boundary=WCSPHStep()) adaptive, n_damp = True, 0 solver = Solver(dim=dim, kernel=kernel, integrator=integrator, adaptive_timestep=adaptive, tf=tf, dt=dt, n_damp=n_damp) return solver
def create_solver(self): self.iom = self._create_inlet_outlet_manager() kernel = CubicSpline(dim=2) integrator = PECIntegrator(fluid=InletOutletStepEDAC(), inlet=InletOutletStepEDAC(), outlet=InletOutletStepEDAC()) self.iom.active_stages = [2] self.iom.setup_iom(dim=2, kernel=kernel) self.iom.update_dx(dx=0.1) dt = 1e-2 tf = 12 solver = Solver(kernel=kernel, dim=2, integrator=integrator, dt=dt, tf=tf, adaptive_timestep=False, pfreq=20) return solver
def test_detect_missing_arrays_for_many_particle_arrays(self): # Given. x = np.asarray([1.0]) u = np.asarray([0.0]) h = np.ones_like(x) fluid = get_particle_array_wcsph(name='fluid', x=x, u=u, h=h, m=h) solid = get_particle_array(name='solid', x=x, u=u, h=h, m=h) arrays = [fluid, solid] # When integrator = PECIntegrator(fluid=TwoStageRigidBodyStep(), solid=TwoStageRigidBodyStep()) equations = [SHM(dest="fluid", sources=None)] kernel = CubicSpline(dim=1) a_eval = AccelerationEval(particle_arrays=arrays, equations=equations, kernel=kernel) comp = SPHCompiler(a_eval, integrator=integrator) # Then self.assertRaises(RuntimeError, comp.compile)