← Back to team overview

yade-users team mailing list archive

Re: [Question #575488]: Unexpected unbalancedForce when loading jcfpmMat sphere from txt file

 

Question #575488 on Yade changed:
https://answers.launchpad.net/yade/+question/575488

Description changed to:
Hi, all

When I tried to generate a jcfpmMat assembly from a txt file, I got
unexpected unbalanced force and no triaxial meanstress. The txt file was
previous saved from a isotropic compaction state, and unbalanced force&
meanstress was checked before saving.

The script looks like this:

####output spheres####
....
    if unbalancedForce()<0.01 and abs(-confiningPressure-triax.meanStress)/confiningPressure<0.0001:
            a = open(filepath +'/spheres.txt', "a")
            for i in O.bodies:
                if isinstance(i.shape,Sphere):
                    a.write(str(i.state.pos[0])+' '+str(i.state.pos[1])+' '+str(i.state.pos[2])+' '+str(i.shape.radius)+'\n')

####read spheres(in a new .py file)####
...
O.materials.append(JCFpmMat(type = 0,young=young, poisson=mu, frictionAngle=radians(FricDegree), cohesion = c, tensileStrength = t, density=2600, label='spheres'))
O.materials.append(JCFpmMat(type = 1,young=young, poisson=mu, frictionAngle = radians(0), density=2600, label='walls'))
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)
O.bodies.append(ymport.textExt(filepath+'/spheres.txt',material='spheres'))

triax=TriaxialStressController(stressMask = 7,internalCompaction = True)
triax.goal1=triax.goal2=triax.goal3=-confiningPressure
newton=NewtonIntegrator(damping=0.4)

O.engines=[
    ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor = intRadius,label = 'bo1s'),Bo1_Box_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor = intRadius,label = 'ig2ss'),Ig2_Box_Sphere_ScGeom()],
		[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,label = 'ip2jj')],
		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks = True)]
	),    
         PyRunner(command = 'check_force()', iterPeriod = 2, label = 'checker'),
	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
        triax,
        newton,
]

def check_force():
    print '*************************************************'
    print 'current step is ',O.iter
    print 'unbalanced force:',unbalancedForce(),' mean stress: ',triax.meanStress
...

And it outputs:
Yade [1]: *************************************************
current step is  2
unbalanced force: 0.73017916357  mean stress:  0.0
*************************************************
current step is  4
unbalanced force: 0.440130806809  mean stress:  0.0
*************************************************
current step is  6
unbalanced force: 0.512598901926  mean stress:  0.0
*************************************************
current step is  8
unbalanced force: 0.426567319055  mean stress:  0.0
*************************************************
current step is  10
unbalanced force: 0.37998054497  mean stress:  0.0
*************************************************
current step is  12
unbalanced force: 0.332840783134  mean stress:  -16062849.4928
*************************************************
current step is  14
unbalanced force: 0.300939867577  mean stress:  -16062849.4928
*************************************************
current step is  16
unbalanced force: 0.26768156305  mean stress:  -16062849.4928
*************************************************
current step is  18
unbalanced force: 0.242024099888  mean stress:  -16062849.4928
*************************************************
current step is  20
unbalanced force: 0.216086711122  mean stress:  -16062849.4928
*************************************************
current step is  22
unbalanced force: 0.197918966992  mean stress:  -15054959.4126
*************************************************
current step is  24
unbalanced force: 0.178792695789  mean stress:  -15054959.4126
*************************************************
current step is  26
unbalanced force: 0.160616897573  mean stress:  -15054959.4126
*************************************************
current step is  28
unbalanced force: 0.146767620681  mean stress:  -15054959.4126
*************************************************
current step is  30
unbalanced force: 0.132578789994  mean stress:  -15054959.4126
*************************************************
current step is  32
unbalanced force: 0.122317201601  mean stress:  -14753977.4581

(mean stress should be 7e6 = 7000000)
Material and size of the spheres& walls are the same. Why should this happened when I reload the state from the txt file?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.