Yade simulation freezes
I'm running YADE-OpenFOAM coupling examples. And the simulation freezes at some time (in the middle of calculations) during the yade iteration. How can I view log of yade (better log to screen) of current iteration to understand why the calculation breaks down. There is also more general question: how to make simulation run stable?
Also the calculation never finishes by itself: it always freezes at "Finalising parallel run". So I need to kill it.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hello,
Can you provide the following information :
- the scripts you are runing.
- version of yade you are using.
- the openfoam solver you are using, (note the pimpleFoamYade solver requires some fixes)
Have you made sure that the simulation end time is the same in Yade and Openfoam ? ( if not one of them will be hanging).
Thanks,
Revision history for this message
|
#2 |
- Yade version: 2020-02-
- I'm running icoFoamYade
- Is there way to attach files or archive with my case to this question or it is better to copy files content here?
I have got problem to set the same simulation end time in Yade and OpenFOAM:
in OpenFOAM I set stopAt endTime (it is virtual time in YADE termins) and set a writeInterval (writeControl adjustableRunTime);
in YADE I set in VTKRecorder virtPeriod at the same as writeInterval and set run(100000) with dynamical time step (I think it is dynamical because otherwise I tried to set O.dt and O.dynDt=False and my calculation stopped unexpectedly)
Revision history for this message
|
#3 |
I want to note that one calculation falls down at different times every run, but these times are similar.
Revision history for this message
|
#4 |
Okay, this seems because of the mismatch in the simulation endtimes, you can post (copy paste) your yade script and the openfoam controlDict file and I can suggest how to fix it.
Can you be precise about the stability issue you are facing ?
Revision history for this message
|
#5 |
scriptYade.py:
from __future__ import print_function
import sys
from yadeimport 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):
epsilon = 1e-08
minval = epsilon
maxval = 1-epsilon
length = maxval - minval
halflength = length / 2
radius = 0.01
radiusEpsilon = 0.001
# O.periodic = True
# O.cell.
numspheres=1000
young = 1e6#ice#5e6#1
poisson = 0.2#0.4
density = 1000
O.materials.
O.materials.
#wall coords, use facets for wall BC:
v0 = Vector3(
v1 = Vector3(
v2 = Vector3(
v3 = Vector3(
v4 = Vector3(
v5 = Vector3(
v6 = Vector3(
v7 = Vector3(
df0 = facet([
O.bodies.
df1 = facet([
O.bodies.
uf0 = facet([
O.bodies.
uf1 = facet([
O.bodies.
lf0 = facet([
O.bodies.
lf1 = facet([
O.bodies.
rf0 = facet([
O.bodies.
rf1 = facet([
O.bodies.
ff0 = facet([
O.bodies.
ff1 = facet([
O.bodies.
bf0 = facet([
O.bodies.
bf1 = facet([
O.bodies.
#spheres
mn, mx= Vector3(
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.dt=1e-5
# O.dynDt=False
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffn
fluidCoup
PyRunner(
newton,
VTKRecord
]
def printMessage(self):
print(
# if O.iter == 4000:
# maxVel = 0.05
# for b in O.bodies:
# if type(b.
# bodyVel = abs(b.state.
# if bodyVel > maxVel:
# raise ValueError("Body velocity exceeds imposed shear velocity by ", abs(bodyVel-
def irun(self,num):
O.run(num,1)
if __name_
sim = simulation()
sim.irun(100000)
# print("body id = ", O.bodies[34].id)
fluidCoupling.
import builtins
builtins.sim=sim
Revision history for this message
|
#6 |
controlDict:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoFoamYade;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1;
deltaT 1e-3;
writeControl adjustableRunTi
writeInterval 0.02;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression on;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
Revision history for this message
|
#7 |
the endTime in controlDict is 1.0; this has tho be the same in your yade script:
what you can modify the function irun(self):
def irun(self,endTime):
if (O.time <= endTime):
O.step()
and calling it as :
sim.irun(1)
Revision history for this message
|
#8 |
The case freezes without taking a single YADE step =(
A have got one more question:
I commented lines
# O.periodic = True
# O.cell.
to make my boundaries solid (I want particles just to fall down in box) but despite this particles start to appear at top of the box...
Some times they also starts to move randomly in such a way that you can't understand in which direction each of them is moving and why.
Revision history for this message
|
#9 |
I see,
for the hanging porblem, you can set a constant dt, O.dt = 1e-05, and use sim.irun(100000), (with the original sim.irun) function, also comment on the GlobalStiffness
Are the same boundary conditions set in OpenFOAM too, that is you have set walls with no slip boundary condition, (the default case is periodic)?
Can you share the blockMeshDict files, files in 0, system and constant directory?
Revision history for this message
|
#10 |
https:/
There is my case of modeling of the snowdrift formation. It is assumed that snow will accumulate in the corner on the right because of wind and gravity. But in fact it just falls down through bottom. There is periodic condition set in YADE script and if I turns it off calculation drops. Can you help me to set up this case in a way I described (snow is accumulating in the angle at right side because of wind and gravity)?
Also I would like to run YADE part of this case in the separate way. I'm doing it using runYade.sh script which is represented in git repository after commenting fluid coupling engine in scriptYade.py; but it shows a lot of errors. How should I modify scriptYade.py to run it using YADE without OpenFOAM coupling?
Revision history for this message
|
#11 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#12 |
> I'm doing it using runYade.sh script which is represented in git repository after commenting fluid coupling engine in scriptYade.py; but it shows a lot of errors. How should I modify scriptYade.py to run it using YADE without OpenFOAM coupling?
I think this paragraph is sufficient to explain why the discussion was abandoned.
https:/
Bruno
Revision history for this message
|
#13 |
Case was updated on github. It is now working fine also some instructions were added. YADE case without CFD was added.
Revision history for this message
|
#14 |
>I think this paragraph is sufficient to explain why the discussion was abandoned.
>https:/
It's inefficient to copy the contents of all case files here
Revision history for this message
|
#15 |
> Case was updated on github. It is now working fine also some instructions were added. YADE case without CFD was added.
Any link to those things?
> inefficient to copy the contents of all case files here
Sure, but "it shows a lot of errors", unspecified, usually discourage further response.
Bruno
Revision history for this message
|
#16 |
Next time if question is answered please mark it answered and provide link to actual solution if it doesn't appear here.
That thread is cryptic.
Cheers
B
Revision history for this message
|
#17 |
There is problems with time settings in example_icoFoamYade again. The same problem is in example_
example_icoFoamYade worked till I tried to set more time to calculate, after it calculation freedzes too. Can you explain me how to set end time in example_icoFoam to 1 second for example.
Revision history for this message
|
#18 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.