Re: [Yade-users] [Question #295531]: Cohesion/Moment only work with TriaxialCompressionEngine?

2016-06-23 Thread Gary Pekmezi
Question #295531 on Yade changed:
https://answers.launchpad.net/yade/+question/295531

Status: Open => Solved

Gary Pekmezi confirmed that the question is solved:
Thanks Jerome,

My issue is resolved.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #295531]: Cohesion/Moment only work with TriaxialCompressionEngine?

2016-06-22 Thread Gary Pekmezi
Question #295531 on Yade changed:
https://answers.launchpad.net/yade/+question/295531

Status: Needs information => Open

Gary Pekmezi gave more information on the question:
Thanks for the reply Jerome,

I was in fact speaking of  Ip2_CohFrictMat_CohFrictMat_CohFrictPhys and
Law2_ScGeom6D_CohFrictPhys_CohesionMoment. My current problem however
was with the HM law with rolling moment.

I have spent the last day or so digging further into the apparent issue,
and I have finally found where the problem surfaced. As expected, it was
in my input. I was missing the "6D" in Ig2_Sphere_Sphere_ScGeom6D(),
once I added it in my current simulation worked and so did my old one
with the CohFrictMat.

The one thing that still puzzles me, is that TriaxialCompressionEngine()
apparently accounts for rolling moments even when one uses
Ig2_Sphere_Sphere_ScGeom() instead of Ig2_Sphere_Sphere_ScGeom6D().

Thanks,
Gary

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #295531]: Cohesion/Moment only work with TriaxialCompressionEngine?

2016-06-21 Thread Jérôme Duriez
Question #295531 on Yade changed:
https://answers.launchpad.net/yade/+question/295531

Status: Open => Needs information

Jérôme Duriez requested more information:
Hi,

Your issue sounds rather strange to me. The data saved (by
TriaxialStateRecorder() engine) in 'WallStresses' obviously should not
be affected by the contact law used, or the choice of
TriaxialStressController vs TriaxialCompressionEngine as a boundary
controller.

Apart for the (always possible) existence of a weird bug, it may also happen 
that your simulation is inconsistently defined when you try to include moment 
law in HM or "setCohesionNow" in "Cundall-Strack". 
In fact, please be more specific here as "setCohesionNow" is part of the 
"CohFrictMat" model (in terms of Ip2_CohFrictMat_CohFrictMat_CohFrictPhys -- 
Law2_ScGeom6D_CohFrictPhys_CohesionMoment) but is not part of the 
"CundallStrack" model (in terms of Ip2_FrictMat_FrictMat_FrictPhys -- 
Law2_ScGeom_FrictPhys_CundallStrack)


In order to help us to look at your issue, a first recommendation would be to 
provide us with a minimal working script that is
- minimal (we do not care about VTK things, particle size distribution, and so 
on...)
- and working: it will be impossible for anyone to try your script because of 
sp.load('sp.txt'), for instance.
;-)

Jerome

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #295531]: Cohesion/Moment only work with TriaxialCompressionEngine?

2016-06-21 Thread Gary Pekmezi
New question #295531 on Yade:
https://answers.launchpad.net/yade/+question/295531

This was an issue I ran into before with the Cundall-Strack law, and I am now 
also seeing with Hertz-Mindlin law.
If I have:

triax=TriaxialStressController(...)

then the "Wallstresses" file shows all stresses and porosity as "NaN" for 
Hertz-Mindlin, or I get a core dump for Cundall-Strack. This happens only when 
I set "includeMoment" to True for Hertz-Mindlin, or "setCohesionNow" to True 
for Cundall-Strack.  It's fairly simple to get my models to run, all I have to 
do is to switch to :

triax=TriaxialCompressionEngine(...)

So is the moment law and cohesion not supported with TriaxialStressController, 
is it a bug, or (probably most likely) am I doing something wrong?

I should add that I tested this with the latest version released last week and 
saw the same behavior

I am pasting my Hertz-Mindlin input below for completeness.

Thanks,
Gary



import math, os, sys
from yade import plot
from yade import pack

### DEFINE VARIABLES AND MATERIALS   ###

readParamsFromTable(krot=1.0,noTableOk=True)
from yade.params.table import *
desc='description'
key=O.tags[desc]
print key, krot

os.mkdir(key)

finalFricDegree=14.5
rate=-25.0 # loading rate (strain rate)
damp=0.2 # damping coefficient
stabilityThreshold=0.02
triaxialThreshold=0.005
young=20e9
poisson=0.33
triaxial_p = -5.0e6 

sp=pack.SpherePack()
sp.load('sp.txt')
print "Saved Confined State Loaded"
box=sp.aabb()
print box
print (sp.psd(bins=10))
# ###
# ###   DEFINE THE SCENE  ###
# ###
O.materials.append(FrictMat(young=young,
poisson=poisson,
frictionAngle=radians(finalFricDegree),
density=2600,
label='spheres'))
O.materials.append(FrictMat(young=young,
poisson=poisson,
frictionAngle=0,
density=0,
label='walls'))
walls=aabbWalls(box,thickness=0,oversizeFactor=2.0,material='walls')
wallIds=O.bodies.append(walls)
sp.toSimulation(material='spheres')

###   DEFINING ENGINES   ###

triax=TriaxialStressController( #replace 
with#TriaxialCompressionEngine(#
  maxMultiplier=1.005, # spheres growing factor (fast growth)
  finalMaxMultiplier=1.5, # spheres growing factor (slow growth)
  thickness = -1,
  stressMask = 7,
  internalCompaction=True,
  autoCompressionActivation=False,
  sigmaIsoCompaction=triaxial_p,
  sigmaLateralConfinement=triaxial_p,
  )
triax.goal1=triax.goal2=triax.goal3=confinement_p
  
newton=NewtonIntegrator(damping=damp)
  
vtkrec=VTKRecorder(recorders=['spheres','boxes','stress'],)
vtkrec.fileName=key+'/'+'vtkHC'
  
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
   [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
   [Ip2_FrictMat_FrictMat_MindlinPhys(krot=krot,eta=1.0)],
   
[Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True,label="mindlinLaw2")],  
 ),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
triax,
newton,
TriaxialStateRecorder(iterPeriod=100,file=key+'/'+'WallStresses'),
vtkrec, 
 ]
#
###Record and plot data ###
#
def history():
plot.addData(e1=triax.strain[1]*-100.0,
ev=-100.0*triax.volumetricStrain,
pDiff=pDiff,
i=O.iter)
vtkrec.fileName=key+'/'+'vtkTriaxial'
f=open(key+'/'+'./zout.txt', 'w+')
# ###
# ###   APPLYING TRIAXIAL PRESSURE   ###
# ###
triax.goal1=triax.goal2=triax.goal3=triaxial_p
while 1:
  O.run(1000, True)
  unb=unbalancedForce()
  triDiff=abs((triax.goal1-triax.meanStress)/(triax.goal1))
  print >>f,'unb:',unb,' triDiff: ',triDiff,' meanS: ',triax.meanStress,' 
porosity: ',triax.porosity,'pMult',triax.previousMultiplier
  sys.stdout.flush()
  if unbhttps://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp