def create_equations(self): equations = [ Group( equations=[RigidBodyMoments(dest='inner_core', sources=None)]), #Group(equations=[RigidBodyMoments(dest='outer_core', sources=None)]), Group(equations=[RigidBodyMotion(dest='inner_core', sources=None)] ), #Group(equations=[RigidBodyMotion(dest='outer_core', sources=None)]), Group(equations=[RigidBodyMoments(dest='mantle', sources=None)]), Group(equations=[RigidBodyMotion(dest='mantle', sources=None)]), # Equation of fluid body Group(equations=[ ContinuityEquation( dest='outer_core', sources=['mantle', 'outer_core', 'inner_core']) ]), Group(equations=[ MomentumEquation( dest='outer_core', sources=['mantle', 'outer_core', 'inner_core'], alpha=0.1, beta=0.0, c0=101, gy=0) ]), ] return equations
def create_equations(self): equations = [ Group(equations=[ TaitEOS(dest='fluid', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), TaitEOS(dest='tank', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), ], real=False), Group(equations=[ ContinuityEquation( dest='fluid', sources=['fluid', 'tank', 'cube'],), ContinuityEquation( dest='tank', sources=['fluid', 'tank', 'cube'], ), MomentumEquation(dest='fluid', sources=['fluid', 'tank'], alpha=self.alpha, beta=0.0, c0=self.co, gy=-9.81), SolidForceOnFluid(dest='fluid', sources=['cube']), XSPHCorrection(dest='fluid', sources=['fluid', 'tank']), ]), Group(equations=[ BodyForce(dest='cube', sources=None, gy=-9.81), FluidForceOnSolid(dest='cube', sources=['fluid']), # RigidBodyCollision( # dest='cube', # sources=['tank'], # kn=1e5, # en=0.5, ) ]), Group(equations=[RigidBodyMoments(dest='cube', sources=None)]), Group(equations=[RigidBodyMotion(dest='cube', sources=None)]), ] return equations
def create_equations(self): """Set up equations. Body force is necessary to reset fx,fy,fz, although not body force is applied. """ equations = [ Group(equations=[ BodyForce(dest='ellipsoid', sources=None), NumberDensity(dest='ellipsoid', sources=['ellipsoid']), NumberDensity(dest='walls', sources=['walls']) ]), # Tait equation of state Group(equations=[ TaitEOS(dest='fluid', sources=None, rho0=self.rho, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='ellipsoid', sources=None, rho0=self.rho, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='walls', sources=None, rho0=self.rho, c0=self.co, gamma=7.0), ], real=False), Group(equations=[ ContinuityEquation(dest='fluid', sources=['fluid', 'walls', 'ellipsoid']), ContinuityEquation(dest='ellipsoid', sources=['fluid']), ContinuityEquation(dest='walls', sources=['fluid']), LaminarViscosity( dest='fluid', sources=['fluid', 'walls'], nu=self.nu), MomentumEquation(dest='fluid', sources=['fluid', 'walls'], alpha=self.alpha, beta=0.0, c0=self.co), ViscosityRigidBody(dest='fluid', sources=['ellipsoid'], nu=self.nu, rho0=self.rho), PressureRigidBody(dest='fluid', sources=['ellipsoid'], rho0=self.rho), XSPHCorrection(dest='fluid', sources=['fluid']), ]), Group( equations=[RigidBodyMoments(dest='ellipsoid', sources=None)]), Group(equations=[RigidBodyMotion(dest='ellipsoid', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='ball', sources=None, gy=gz), ]), Group(equations=[ TaitEOS(dest='fluid', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), TaitEOS(dest='wall', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), TaitEOS(dest='temp_wall', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), ], real=False), Group(equations=[ ContinuityEquation( dest='fluid', sources=['fluid', 'temp_wall', 'wall'], ), ContinuityEquation( dest='temp_wall', sources=['fluid', 'temp_wall', 'wall'], ), ContinuityEquation( dest='wall', sources=['fluid', 'temp_wall', 'wall'], ), MomentumEquation(dest='fluid', sources=['fluid', 'wall', 'temp_wall'], alpha=self.alpha, beta=0.0, c0=self.co, gy=-9.81), SolidFluidForce( dest='fluid', sources=['ball'], ), XSPHCorrection(dest='fluid', sources=['fluid', 'temp_wall', 'wall']), ]), Group(equations=[ RigidBodyCollision( dest='ball', sources=['ball', 'wall', 'temp_wall'], kn=1e5) ]), Group(equations=[RigidBodyMoments(dest='ball', sources=None)]), Group(equations=[RigidBodyMotion(dest='ball', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='body', sources=None, gz=gz), RigidBodyCollision(dest='body', sources=['tank'], kn=1e4, en=1) ]), Group(equations=[RigidBodyMoments(dest='body', sources=None)]), Group(equations=[RigidBodyMotion(dest='body', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='body', sources=None, gz=gz), RigidBodyCollision( dest='body', sources=['tank'], k=1.0, d=2.0, eta=0.1, kt=0.1 )] ), Group(equations=[RigidBodyMoments(dest='body', sources=None)]), Group(equations=[RigidBodyMotion(dest='body', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='ball', sources=None, gy=gz), HertzRigidBody(dest='ball', sources=['wall', 'ball', 'temp_wall'], mu=0.45) ]), Group(equations=[RigidBodyMoments(dest='ball', sources=None)]), Group(equations=[RigidBodyMotion(dest='ball', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='cube', sources=None, gy=-9.81), SummationDensity(dest='cube', sources=['fluid', 'cube']) ], real=False), Group(equations=[ TaitEOSHGCorrection(dest='cube', sources=None, rho0=self.solid_rho, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='fluid', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='tank', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), ], real=False), Group(equations=[ ContinuityEquation( dest='fluid', sources=['fluid', 'tank', 'cube'], ), ContinuityEquation( dest='tank', sources=['fluid', 'tank', 'cube'], ), MomentumEquation(dest='fluid', sources=['fluid', 'tank', 'cube'], alpha=self.alpha, beta=0.0, c0=self.co, gy=-9.81), LiuFluidForce( dest='fluid', sources=['cube'], ), XSPHCorrection(dest='fluid', sources=['fluid', 'tank']), ]), Group(equations=[ RigidBodyCollision(dest='cube', sources=['tank'], kn=1e5) ]), Group(equations=[RigidBodyMoments(dest='cube', sources=None)]), Group(equations=[RigidBodyMotion(dest='cube', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='ball', sources=None, gy=gz), RigidBodyCollision(dest='ball', sources=['wall', 'ball', 'temp_wall'], kn=self.kn, gamma_n=self.gamma_n, mu=0.3) ]), Group(equations=[RigidBodyMoments(dest='ball', sources=None)]), Group(equations=[RigidBodyMotion(dest='ball', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='ball', sources=None, gy=gz), # RigidBodyCollision( # dest='ball', # sources=['wall'], # kn=self.kn, # gamma_n=self.gamma_n, ), HertzRigidBody(dest='ball', sources=['wall'], mu=0.45) ]), Group(equations=[RigidBodyMoments(dest='ball', sources=None)]), Group(equations=[RigidBodyMotion(dest='ball', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='cube', sources=None, gy=-9.81), ], real=False), Group(equations=[ ContinuityEquation(dest='fluid', sources=['fluid', 'tank', 'cube']), ContinuityEquation(dest='tank', sources=['tank', 'fluid', 'cube']) ]), # Tait equation of state Group(equations=[ TaitEOSHGCorrection(dest='fluid', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='tank', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), ], real=False), Group(equations=[ MomentumEquation(dest='fluid', sources=['fluid', 'tank'], alpha=self.alpha, beta=0.0, c0=self.co, gy=-9.81), AkinciRigidFluidCoupling(dest='fluid', sources=['cube']), XSPHCorrection(dest='fluid', sources=['fluid', 'tank']), ]), Group(equations=[ RigidBodyCollision( dest='cube', sources=['tank', 'cube'], kn=1e5) ]), Group(equations=[RigidBodyMoments(dest='cube', sources=None)]), Group(equations=[RigidBodyMotion(dest='cube', sources=None)]), ] return equations
def create_equations(self): eqns = self.scheme.get_equations() eqn1 = Group(equations=[ BodyForce(dest='cube', sources=None, gy=-9.81), RigidBodyCollision(dest='cube', sources=['wall', 'cube'], kn=1.0e5, en=0.8), LiuFluidForce(dest='fluid', sources=['cube'])], real=False) eqn2 = Group(equations=[ GroupParticles('cube', xmin=0.0, xmax=4.0, periodic_in_x=True)], real=False) eqn3 = Group(equations=[ RigidBodyMoments(dest='cube', sources=None)], real=False) eqn4 = Group(equations=[ RigidBodyMotion(dest='cube', sources=None)], real=False) eqns.append(eqn1) eqns.append(eqn2) eqns.append(eqn3) eqns.append(eqn4) return eqns
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='ball', sources=None, gy=gz), RigidBodyCollision( dest='ball', sources=['ball'], kn=1e5, en=0.1, mu=0.25), RigidBodyWallCollision( dest='ball', sources=['wall', 'temp_wall'], kn=1e5, en=0.2, mu=0.25) ]), Group(equations=[RigidBodyMoments(dest='ball', sources=None)]), Group(equations=[RigidBodyMotion(dest='ball', sources=None)]), ] return equations
def create_equations(self): eqns = self.scheme.get_equations() eqn1 = Group(equations=[ BodyForce(dest='obstacle', sources=None, gy=-9.81), RigidBodyCollision(dest='obstacle', sources=['wall'], kn=1.0e4, en=0.8) ], real=False) eqn2 = Group( equations=[LiuFluidForce(dest='fluid', sources=['obstacle'])]) eqn3 = Group( equations=[RigidBodyMoments(dest='obstacle', sources=None)]) eqn4 = Group( equations=[RigidBodyMotion(dest='obstacle', sources=None)]) eqns.append(eqn1) eqns.append(eqn2) eqns.append(eqn3) eqns.append(eqn4) return eqns
def create_equations(self): equations = [ Group(equations=[ BodyForce(dest='block', sources=None, gy=gy), NumberDensity(dest='block', sources=['block']), NumberDensity(dest='solid', sources=['solid']), ], ), # Equation of state is typically the Tait EOS with a suitable # exponent gamma Group(equations=[ TaitEOS(dest='fluid', sources=None, rho0=rho0, c0=c0, gamma=gamma), TaitEOSHGCorrection(dest='solid', sources=None, rho0=rho0, c0=c0, gamma=gamma), TaitEOSHGCorrection(dest='block', sources=None, rho0=rho0, c0=c0, gamma=gamma), ], ), # Main acceleration block Group(equations=[ # Continuity equation with dissipative corrections for fluid on fluid ContinuityEquationDeltaSPH( dest='fluid', sources=['fluid'], c0=c0, delta=0.1), ContinuityEquation(dest='fluid', sources=['solid', 'block']), ContinuityEquation(dest='solid', sources=['fluid']), ContinuityEquation(dest='block', sources=['fluid']), # Momentum equation MomentumEquation(dest='fluid', sources=['fluid', 'solid', 'block'], alpha=alpha, beta=beta, gy=-9.81, c0=c0, tensile_correction=True), PressureRigidBody(dest='fluid', sources=['block', 'solid'], rho0=rho0), ViscosityRigidBody( dest='fluid', sources=['block', 'solid' ], rho0=rho0, nu=nu), # Position step with XSPH XSPHCorrection(dest='fluid', sources=['fluid']), RigidBodyCollision(dest='block', sources=['solid'], k=1.0, d=2.0, eta=0.1, kt=0.1), ]), Group(equations=[RigidBodyMoments(dest='block', sources=None)]), Group(equations=[RigidBodyMotion(dest='block', sources=None)]), ] return equations
def create_equations(self): h0 = dx * hdx co = 10.0 * self.geom.get_max_speed(g=9.81) gamma = 7.0 alpha = 0.5 beta = 0.0 B = co * co * rho0 / gamma equations = [ Group(equations=[ BodyForce(dest='obstacle', sources=None, gz=-9.81), NumberDensity(dest='obstacle', sources=['obstacle']), NumberDensity(dest='boundary', sources=['boundary']), ], ), # Equation of state Group(equations=[ TaitEOS(dest='fluid', sources=None, rho0=rho0, c0=co, gamma=gamma), TaitEOSHGCorrection(dest='boundary', sources=None, rho0=rho0, c0=co, gamma=gamma), TaitEOSHGCorrection(dest='obstacle', sources=None, rho0=rho0, c0=co, gamma=gamma), ], real=False), # Continuity, momentum and xsph equations Group(equations=[ ContinuityEquation(dest='fluid', sources=['fluid', 'boundary', 'obstacle']), ContinuityEquation(dest='boundary', sources=['fluid']), ContinuityEquation(dest='obstacle', sources=['fluid']), MomentumEquation(dest='fluid', sources=['fluid', 'boundary'], alpha=alpha, beta=beta, gz=-9.81, c0=co, tensile_correction=True), PressureRigidBody(dest='fluid', sources=['obstacle'], rho0=rho0), XSPHCorrection(dest='fluid', sources=['fluid']), RigidBodyCollision(dest='obstacle', sources=['boundary'], k=1.0, d=2.0, eta=0.1, kt=0.1), ]), Group(equations=[RigidBodyMoments(dest='obstacle', sources=None)]), Group(equations=[RigidBodyMotion(dest='obstacle', sources=None)]), ] return equations
def create_equations(self): equations = [ Group(equations=[RigidBodyMoments(dest='body', sources=None)]), Group(equations=[RigidBodyMotion(dest='body', sources=None)]), ] return equations
def create_equations(self): equations = [ Group( equations=[ BodyForce(dest='cube', sources=None, gy=-9.81), BodyForce(dest='wood', sources=None, gy=-9.81), BodyForce(dest='small_tank', sources=None, gy=-9.81), BodyForce(dest='outside', sources=None, gy=-9.81), SummationDensity(dest='cube', sources=['fluid', 'cube']), SummationDensity(dest='wood', sources=['fluid', 'wood']), SummationDensity(dest='small_tank', sources=['fluid', 'small_tank']), SummationDensity(dest='outside', sources=['fluid', 'outside']) # NumberDensity(dest='cube', sources=['cube']), ], real=False), Group(equations=[ TaitEOSHGCorrection(dest='wood', sources=None, rho0=self.wood_rho, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='cube', sources=None, rho0=self.solid_rho, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='fluid', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='big_tank', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='small_tank', sources=None, rho0=self.wood_rho, c0=self.co, gamma=7.0), TaitEOSHGCorrection(dest='outside', sources=None, rho0=self.ro, c0=self.co, gamma=7.0), ], real=False), Group(equations=[ ContinuityEquation( dest='fluid', sources=[ 'fluid', 'small_tank', 'cube', 'wood', 'big_tank', 'outside' ], ), ContinuityEquation( dest='big_tank', sources=[ 'fluid', 'big_tank', 'cube', 'wood', 'small_tank', 'outside' ], ), MomentumEquation(dest='fluid', sources=['fluid', 'big_tank'], alpha=self.alpha, beta=0.0, c0=self.co, gy=-9.81), LiuFluidForce( dest='fluid', sources=['cube'], ), LiuFluidForce( dest='fluid', sources=['wood'], ), LiuFluidForce( dest='fluid', sources=['small_tank'], ), LiuFluidForce( dest='fluid', sources=['outside'], ), # PressureRigidBody(dest='fluid', sources=['cube'], # rho0=1500), XSPHCorrection(dest='fluid', sources=['fluid', 'big_tank']), ]), Group(equations=[ RigidBodyCollision( dest='cube', sources=['big_tank', 'wood', 'small_tank', 'outside'], kn=1e6) ]), Group(equations=[RigidBodyMoments(dest='cube', sources=None)]), Group(equations=[RigidBodyMotion(dest='cube', sources=None)]), Group(equations=[ RigidBodyCollision( dest='wood', sources=['big_tank', 'cube', 'small_tank', 'outside'], kn=1e6) ]), Group(equations=[RigidBodyMoments(dest='wood', sources=None)]), Group(equations=[RigidBodyMotion(dest='wood', sources=None)]), Group(equations=[ RigidBodyCollision( dest='small_tank', sources=['big_tank', 'cube', 'wood', 'outside'], kn=1e6) ]), Group( equations=[RigidBodyMoments(dest='small_tank', sources=None)]), Group( equations=[RigidBodyMotion(dest='small_tank', sources=None)]), Group(equations=[ RigidBodyCollision( dest='outside', sources=['big_tank', 'cube', 'small_tank', 'wood'], kn=1e6) ]), Group(equations=[RigidBodyMoments(dest='outside', sources=None)]), Group(equations=[RigidBodyMotion(dest='outside', sources=None)]), ] return equations