nan time step
O.dt is equal nan after function
GlobalStiffness
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 = 5e6
density = 1000
mat1 = FrictMat(
O.materials.
mat2 = FrictMat(
O.materials.
epsilon = 1e-08
minval = 0 + epsilon
maxval = 0.4 - 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(maxval, maxval, maxval)
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.
cyl = Cylinder(
b = Body()
b.shape = cyl
b.mat = O.materials[
O.bodies.
#spheres
#mn, mx= Vector3(minval + epsilon, minval + epsilon, minval + epsilon), Vector3(maxval - epsilon, maxval - epsilon, maxval - epsilon)
mn, mx= Vector3(minval + epsilon, minval + epsilon, minval + epsilon), Vector3(-0.06, maxval - epsilon, maxval - 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.dynDt = False
#O.dt=1e-4
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffn
fluidCoupling, #to be called after timestepper
PyRunner(
newton,
VTKRecorder(
]
def printMessage(self):
print(
print(
def irun(self,num):
O.run(num,1)
if __name_
sim = simulation()
sim.irun(10)
fluidCoupling.
import builtins
builtins.sim=sim
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: