yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #08156
[Branch ~yade-dev/yade/trunk] Rev 2980: - fix one bug mentionned in https://bugs.launchpad.net/yade/+bug/901146 (makeCloud with undefined...
------------------------------------------------------------
revno: 2980
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
branch nick: trunk
timestamp: Wed 2011-12-07 22:01:08 +0100
message:
- fix one bug mentionned in https://bugs.launchpad.net/yade/+bug/901146 (makeCloud with undefined num and psd)
- more articles
modified:
doc/yade-articles.bib
pkg/dem/SpherePack.cpp
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'doc/yade-articles.bib'
--- doc/yade-articles.bib 2011-12-02 17:24:35 +0000
+++ doc/yade-articles.bib 2011-12-07 21:01:08 +0000
@@ -277,7 +277,8 @@
title={Incrementally non-linear plasticity applied to rock joint modelling},
author={Duriez, J. and Darve, F. and Donzé, F.V.},
journal={International Journal for Numerical and Analytical Methods in Geomechanics},
- year={2011}
+ year={2011},
+ doi = {10.1002/nag.1105}
}
@article{Donze2008,
@@ -312,4 +313,25 @@
volume={2009},
pages={P06012},
year={2009}
-}
\ No newline at end of file
+}
+
+@article {Chareyre2011b,
+ author = {Chareyre, B. and Cortis, A. and Catalano, E. and Barthélemy, E.},
+ title = {Pore-Scale Modeling of Viscous Flow and Induced Forces in Dense Sphere Packings},
+ journal = {Transport in Porous Media},
+ publisher = {Springer Netherlands},
+ pages = {1-21},
+ url = {http://dx.doi.org/10.1007/s11242-011-9915-6},
+ doi = {10.1007/s11242-011-9915-6}
+}
+
+@Article{ Duriez2011,
+ author = {J. Duriez and F. Darve and F.-V. Donze},
+ title = {A discrete modeling-based constitutive relation for infilled rock joints},
+ year = {2011},
+ journal = {International Journal of Rock Mechanics \& Mining Sciences},
+ volume = {48},
+ number = {3},
+ pages = {458--468},
+ doi = {10.1016/j.ijrmms.2010.09.008}
+}
=== modified file 'pkg/dem/SpherePack.cpp'
--- pkg/dem/SpherePack.cpp 2011-11-02 15:09:47 +0000
+++ pkg/dem/SpherePack.cpp 2011-12-07 21:01:08 +0000
@@ -97,7 +97,7 @@
Matrix3r invHsize =hSize.inverse();
Real area=abs(size[0]*size[2]+size[0]*size[1]+size[1]*size[2]);//2 terms will be null if one coordinate is 0, the other is the area
if (!volume) {
- if (hSizeFound || !periodic) throw invalid_argument("The box as null volume, this is not supported. One exception is for for flat box defined by min-max in periodic conditions, if hSize argument defines a non-null volume (or if the hSize argument is left undefined).");
+ if (hSizeFound || !periodic) throw invalid_argument("The box as null volume, this is not supported. One exception is for flat box defined by min-max in periodic conditions, if hSize argument defines a non-null volume (or if the hSize argument is left undefined).");
else LOG_WARN("The volume of the min-max box is null, we will assume that the packing is 2D. If it is not what you want then you defined wrong input values; check that min and max corners are defined correctly.");}
int mode=-1; bool err=false;
// determine the way we generate radii
@@ -109,7 +109,7 @@
// the term (1+rRelFuzz²) comes from the mean volume for uniform distribution : Vmean = 4/3*pi*Rmean*(1+rRelFuzz²)
if (volume) rMean=pow(volume*(1-porosity)/(Mathr::PI*(4/3.)*(1+rRelFuzz*rRelFuzz)*num),1/3.);
else {//The volume is null, we will generate a 2D packing with the following rMean
- if (!area) throw invalid_argument("The box defined as null volume AND null surface. Define at least maxCorner of the box, or hSize if periodic.");
+ if (!area) throw invalid_argument("The box defined has null volume AND null surface. Define at least maxCorner of the box, or hSize if periodic.");
rMean=pow(area*(1-porosity)/(Mathr::PI*(1+rRelFuzz*rRelFuzz)*num),0.5);}
}
if(psdSizes.size()>0){
@@ -121,7 +121,7 @@
for(size_t i=0; i<psdSizes.size(); i++) {
psdRadii.push_back(/* radius, not diameter */ .5*psdSizes[i]);
if(distributeMass) {
- //psdCumm2 is first obtained by integrating the number of particles over the volumic PSD (dN/dSize = totV*(dPassing/dSize)*1/(4/3πr³)). I suspect similar reasoning behind pow3Interp, since the expressions are a bit similar. The total cumulated number will be the number of spheres in volume*(1-porosity), it is used to decide if the PSD will be scaled down. psdCumm2 is normalized below in order to fit in [0,1]. (B.C.)
+ //psdCumm2 is first obtained by integrating the number of particles over the volumic PSD (dN/dSize = totV*(dPassing/dSize)*1/(4/3πr³)). The total cumulated number will be the number of spheres in volume*(1-porosity), it is used to decide if the PSD will be scaled down. psdCumm2 is normalized below in order to fit in [0,1]. (Bruno C.)
if (i==0) psdCumm2.push_back(0);
else psdCumm2.push_back(psdCumm2[i-1] + 3.0* (volume?volume:(area*psdSizes[psdSizes.size()-1])) *(1-porosity)/Mathr::PI*(psdCumm[i]-psdCumm[i-1])/(psdSizes[i]-psdSizes[i-1])*(pow(psdSizes[i-1],-2)-pow(psdSizes[i],-2)));
}
@@ -129,11 +129,13 @@
// check monotonicity
if(i>0 && (psdSizes[i-1]>psdSizes[i] || psdCumm[i-1]>psdCumm[i])) throw invalid_argument("SpherePack:makeCloud: psdSizes and psdCumm must be both non-decreasing.");
}
- // check the consistency between sizes, num, and poro. If target number will not fit in (1-poro)*volume, scale down particles sizes
+ //Normalize psdCumm2 so it's between 0 and 1
+ if(distributeMass) for(size_t i=1; i<psdSizes.size(); i++) psdCumm2[i]/=psdCumm2[psdSizes.size()-1];
+
+ // check the consistency between sizes, num, and poro if all three are imposed. If target number will not fit in (1-poro)*volume, scale down particles sizes
if (num>1){
appliedPsdScaling=1;
if(distributeMass) {
-
if (psdCumm2[psdSizes.size()-1]<num) appliedPsdScaling=pow(psdCumm2[psdSizes.size()-1]/num,1./3.);
//Normalize psdCumm2 so it's between 0 and 1
for(size_t i=1; i<psdSizes.size(); i++) psdCumm2[i]/=psdCumm2[psdSizes.size()-1];