Unable to locate NewtonIntegrator within O.engines.
Hi,
I got the following error:
FATAL /build/
InsertionSortCo
Any idea of this error?
Many thanks,
Leonard
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Leonard
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#2 |
Revision history for this message
|
#3 |
As the error says, you are using a >0 value for InsertionSortCo
[*] see this if-block at https:/
Revision history for this message
|
#4 |
Thanks rcaulk and jduriez,
Sorry for getting back late.
I met this problem by:
###
Firstly run script1 to generate sample and save it:
O.save(
Then using script2 to reload the sample: O.load(
Then, carrying out triaxial test in script2.
In script2, when I define the O.engines as follow, it shows error:
###Following engines shows error###
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
Ip2_
[Law2_
),
GlobalStiffnes
triax,
TriaxialStateR
PyRunner(
NewtonIntegrat
]
When I change the engines into the following one, it works well. The difference between the error one and good one is the position of NewtonIntegrato
##Following O.engines works well###
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
Ip2_
[Law2_
),
GlobalStiffnes
triax,
TriaxialStateR
NewtonIntegrat
PyRunner(
]
I don't know why but it works.
Cheers,
Leonard
Revision history for this message
|
#5 |
> I don't know why but it works.
for future reference, could you please post a complete script causing this strange problem?
Thanks
Jan
Revision history for this message
|
#6 |
Hi Jan,
Thanks for your suggestion.
Here are the two scripts based on Yade 2018.02b:
#########
The following is the script1 which is for generating sample (takes around 30 seconds):
# -*- coding: utf-8 -*-
#******
from __future__ import division
from yade import pack, plot
import math
import numpy as np
import timeit
########## this script is modified from https:/
utils.readParam
from yade.params import table
num_spheres=2000# number of spheres
targetPorosity = 0.5 #the porosity we want for the packing
compFricDegree = 30 # initial contact friction during the confining phase (will be decreased during the REFD compaction process)
finalFricDegree = 30 # contact friction during the deviatoric loading
rate=-0.01 # loading rate (strain rate)
damp=0.4 # damping coefficient
stabilityThresh
young=5e7 # contact stiffness
confinement=100e3
mn,mx=Vector3(
## create materials for spheres and plates
MatWall=
MatSand = O.materials.
## create walls around the packing
walls=aabbWalls
wallIds=
## use a SpherePack object to generate a random loose particles packing
sp=pack.
sp.makeCloud(
O.bodies.
Gl1_Sphere.
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness = 0,
stressMask = 7,
internalCompac
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
Ip2_
[Law2_
),
GlobalStiffnes
triax,
TriaxialStateR
newton,
]
#Display spheres with 2 colors for seeing rotations better
Gl1_Sphere.
#the value of (isotropic) confining stress defines the target stress to be applied in all three directions
triax.goal1=
while 1:
O.run(1000, True)
unb=unbalance
print 'unbF:',unb,' meanStress: ',-triax.
if unb<stabilityTh
break
print "### Isotropic completed ###"
import sys
while triax.porosity>
# we decrease friction value and apply it to all the bodies and contacts
compFricDegree = 0.95*compFricDegree
setContactFric
print "\r Friction: ",compFricDegree," porosity:
sys.stdout.flush()
O.run(500,1)
print "### state 2 Reach target porosity completed ###"
print 'top', -triax.
triax.internalC
triax.stressMask = 7
triax.goal1=
triax.max_vel=0.001
O.save(
#######
The following is script2 which is for triaxial test, it illustrates the problem.
##
# -*- coding: utf-8 -*-
#******
from yade import pack, plot
import math
import numpy as np
O.load(
Gl1_Sphere.
confinement=100e3
triax=TriaxialS
## TriaxialStressC
## this control of boundary conditions was used for instance in http://
thickness = 0,
stressMask = 5,
internalCompac
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
Ip2_
[Law2_
),
GlobalStiffnes
triax,
TriaxialStateR
PyRunner(
newton,
]
Gl1_Sphere.
yade.qt.
yade.qt.View()
setContactFrict
triax.stressMask = 5
triax.goal2=-0.015
triax.goal1=
triax.goal3=
from yade import plot
### a function saving variables
def history():
plot.addData(
Volumetric_
s11=
s22=
s33=
dev=
i=O.iter)
def stopIfDamaged():
if -triax.
O.pause()
plot.
if 1:
O.engines=
plot.plots=
plot.labels=
plot.plot()
########
Run script2 after script1, I have:
In [1]: FATAL /build/
InsertionSortCo
You may switch the position of newton with PyRunner in the O.engines (in script2) to see the difference. For me, the error is solved by this way.
Cheers,
Leonard
Revision history for this message
|
#7 |
Thanks for the complete script.
Next time please post it in the OP, we could save all the thread :-)
> if 1:
> O.engines=
just print O.engines before and after ;-)
cheers
Jan
Revision history for this message
|
#8 |
One more comment. Between O.engines=[...] and this error-prone O.engines=
Jan
Revision history for this message
|
#9 |
Thanks Jan for your comment.
Cheers,
Leonard