Modelling flow around cylinder: particles fall into a closed cylinder
I have got case in which flow around cylinder is simulated. This is YADE-OpenFOAM coupling case. I have got closed cylinder, but at some time particles enter it and simulation fails. How can I fix it?
scriptYade.py
#####
from __future__ import print_function
import sys
from yadeimport import *
from yade.wrapper import *
from yade.utils import *
initMPI() #Initialize the mpi environment, always required.
fluidCoupling = yade.FoamCoupli
fluidCoupling.
#example of spheres in shear flow : two-way point force coupling
class simulation():
def __init__(self):
O.periodic = True
O.cell.
numspheres=1000
young = 1e10#5e6
young_steel = 2e11
density = 2#2000
density_steel = 7700
poisson = 0.3#0.5
normalCohesion = 1e7
shearCohesion = 1e7
frictionAngle = radians(15)
mat1 = CohFrictMat(
O.materials.
mat2 = CohFrictMat(
O.materials.
epsilon = 1e-08
minval = 0 + epsilon
maxx = 1.0 - epsilon
maxy = 0.4 - epsilon
maxz = 0.2 - epsilon
#wall coords, use facets for wall BC:
v0 = Vector3(minval, minval, minval)
v1 = Vector3(
v2 = Vector3(
v3 = Vector3(
v4 = Vector3(
v5 = Vector3(
v6 = Vector3(
v7 = Vector3(maxx, maxy, maxz)
lf0 = facet(vertices=
O.bodies.
lf1 = facet(vertices=
O.bodies.
uf0 = facet(vertices=
O.bodies.
uf1 = facet(vertices=
O.bodies.
ff0 = facet(vertices=
O.bodies.
ff1 = facet(vertices=
O.bodies.
bf0 = facet(vertices=
O.bodies.
bf1 = facet(vertices=
O.bodies.
oriBody = Quaternion(
radius = 0.05
O.bodies.
#spheres
mn, mx= Vector3(minval + epsilon, minval + epsilon, minval + epsilon), Vector3(maxx / 2 - radius - epsilon, maxy - epsilon, maxz - epsilon)
sp = pack.SpherePack();
sp.makeCloud(
O.bodies.
mn, mx= Vector3(maxx / 2 + radius + epsilon, minval + epsilon, minval + epsilon), Vector3(maxx - epsilon, maxy - epsilon, maxz - epsilon)
sp = pack.SpherePack();
sp.makeCloud(
O.bodies.
sphereIDs = [b.id for b in O.bodies if type(b.
#coupling engine settings
fluidCoupling
fluidCoupling
fluidCoupling
# Integrator
newton=
# add small damping in case of stability issues.. ~ 0.1 max, also note : If gravity is needed, set it in constant/g dir.
O.timingEnabl
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
GlobalStiffn
fluidCoupling, #to be called after timestepper
PyRunner(
VTKRecorder(
]
def printMessage(self):
print(
print(
def printState(self, n):
print('blaaaaa ' + str(n))
def printDt(self):
print(O.dt)
def setDt(self, dt):
O.dt = dt
def irun(self,num):
O.run(num,1)
if __name_
sim = simulation()
sim.irun(10000000)
fluidCoupling.
import builtins
builtins.sim=sim
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Daria
- Solved:
- Last query:
- Last reply: