← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2208: 1. Add Pournin article to references.bib

 

------------------------------------------------------------
revno: 2208
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-05-07 12:47:16 +0200
message:
  1. Add Pournin article to references.bib
  2. Fix some docstrings (still not clear)
modified:
  doc/references.bib
  py/_utils.cpp
  py/utils.py


--
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/references.bib'
--- doc/references.bib	2010-04-09 11:25:18 +0000
+++ doc/references.bib	2010-05-07 10:47:16 +0000
@@ -90,3 +90,19 @@
 	doi={10.1007/s10035-008-0116-0},
 	url={http://www.springerlink.com/content/w0x307g110421035}
 }
+
+@article{Pournin2001,
+  title = {Molecular-dynamics force models for better control of energy dissipation in numerical simulations of dense granular media},
+  author = {Pournin, L.  and Liebling, Th. M. and Mocellin, A. },
+  journal = {Phys. Rev. E},
+  volume = {65},
+  number = {1},
+  pages = {011302},
+  numpages = {7},
+  year = {2001},
+  month = {Dec},
+  doi = {10.1103/PhysRevE.65.011302},
+  publisher = {American Physical Society}
+}
+
+

=== modified file 'py/_utils.cpp'
--- py/_utils.cpp	2010-05-07 08:08:58 +0000
+++ py/_utils.cpp	2010-05-07 10:47:16 +0000
@@ -416,7 +416,7 @@
 
 	py::def("PWaveTimeStep",PWaveTimeStep,"Get timestep accoring to the velocity of P-Wave propagation; computed from sphere radii, rigidities and masses.");
 	py::def("getSpheresVolume",getSpheresVolume,"Compute the total volume of spheres in the simulation (might crash for now if dynamic bodies are not spheres)");
-	py::def("aabbExtrema",aabbExtrema,(py::arg("cutoff")=0.0,py::arg("centers")=false),"Return coordinates of box enclosing all bodies\n\n:Parameters:\n\tcenters : bool\n\t\tdo not take sphere radii in account, only their centroids\n\tcutoff : float ∈〈0…1〉\n\t\trelative dimension by which the box will be cut away at its boundaries.\n\n\n:return: (lower corner, upper corner) as (Vector3,Vector3)\n\n");
+	py::def("aabbExtrema",aabbExtrema,(py::arg("cutoff")=0.0,py::arg("centers")=false),"Return coordinates of box enclosing all bodies\n\n:param bool centers: do not take sphere radii in account, only their centroids\n:param float∈〈0…1〉 cutoff: relative dimension by which the box will be cut away at its boundaries.\n\n\n:return: (lower corner, upper corner) as (Vector3,Vector3)\n\n");
 	py::def("ptInAABB",ptInAABB,"Return True/False whether the point (3-tuple) p is within box given by its min (3-tuple) and max (3-tuple) corners");
 	py::def("negPosExtremeIds",negPosExtremeIds,negPosExtremeIds_overloads(py::args("axis","distFactor"),"Return list of ids for spheres (only) that are on extremal ends of the specimen along given axis; distFactor multiplies their radius so that sphere that do not touch the boundary coordinate can also be returned."));
 	py::def("approxSectionArea",approxSectionArea,"Compute area of convex hull when when taking (swept) spheres crossing the plane at coord, perpendicular to axis.");
@@ -434,7 +434,7 @@
 	py::def("sumForces",sumForces);
 	py::def("sumTorques",sumTorques);
 	py::def("sumFacetNormalForces",sumFacetNormalForces,(py::arg("axis")=-1));
-	py::def("forcesOnPlane",forcesOnPlane,(py::arg("planePt"),py::arg("normal")),"Find all interactions deriving from :yref:`NormShearPhys` that cross given plane and sum forces (both normal and shear) on them.\n\n:Parameters:\n\t`planePt`: Vector3\n\t\tAny point on the plane\n\t`normal`: Vector3\n\t\tPlane normal (may not be normalized).\n");
+	py::def("forcesOnPlane",forcesOnPlane,(py::arg("planePt"),py::arg("normal")),"Find all interactions deriving from :yref:`NormShearPhys` that cross given plane and sum forces (both normal and shear) on them.\n\n:param Vector3 planePt: a point on the plane\n:param Vector3 normal: plane normal (will be normalized).\n");
 	py::def("forcesOnCoordPlane",forcesOnCoordPlane);
 	py::def("totalForceInVolume",Shop__totalForceInVolume,"Return summed forces on all interactions and average isotropic stiffness, as tuple (Vector3,float)");
 	py::def("createInteraction",Shop__createExplicitInteraction,(py::arg("id1"),py::arg("id2")),"Create interaction between given bodies by hand.\n\nCurrent engines are searched for :yref:`InteractionGeometryDispatcher` and :yref:`InteractionPhysicsDispatcher` (might be both hidden in :yref:`InteractionDispatchers`). Geometry is created using ``force`` parameter of the :yref:`geometry dispatcher<InteractionGeometryDispatcher>`, wherefore the interaction will exist even if bodies do not spatially overlap and the functor would return ``false`` under normal circumstances. \n\n.. warning::\n\tThis function will very likely behave incorrectly for periodic simulations (though it could be extended it to handle it farily easily).");
@@ -446,5 +446,5 @@
 	py::def("wireNone",wireNone,"Set :yref:`Shape::wire` on all bodies to False, rendering them as solids.");
 	py::def("wireNoSpheres",wireNoSpheres,"Set :yref:`Shape::wire` to True on non-spherical bodies (:yref:`Facets<Facet>`, :yref:`Walls<Wall>`).");
 	py::def("flipCell",&Shop::flipCell,(py::arg("flip")=Matrix3r(Matrix3r::Zero())),"Flip periodic cell so that angles between $R^3$ axes and transformed axes are as small as possible. This function relies on the fact that periodic cell defines by repetition or its corners regular grid of points in $R^3$; however, all cells generating identical grid are equivalent and can be flipped one over another. This necessiatates adjustment of :yref:`Interaction.cellDist` for interactions that cross boundary and didn't before (or vice versa), and re-initialization of collider. The *flip* argument can be used to specify desired flip: integers, each column for one axis; if zero matrix, best fit (minimizing the angles) is computed automatically.\n\nIn c++, this function is accessible as ``Shop::flipCell``.\n\n.. warning::\n\t This function is currently broken and should not be used.");
-	py::def("getViscoelasticFromSpheresInteraction",getViscoelasticFromSpheresInteraction,(py::arg("m"),py::arg("tc"),py::arg("en"),py::arg("es")),"Get viscoelastic interaction parameters from analytical solution of a pair spheres collision problem. \n\n:Parameters:\n\tm : float\n\t\tsphere mass\n\ttc : float\n\t\tcollision time\n\ten : float\n\t\tnormal restitution coefficient\n\tes : float\n\t\ttangential restitution coefficient.\n\n\n:return: \n\tdict with keys:\n\n\tkn : float\n\t\tnormal elastic coefficient computed as:\n\n.. math: k_n=\\frac{m}{t_c^2}\\left(\\pi^2+(\\ln e_n)^2\\right)..\n\n\n\tcn : float\n\t\tnormal viscous coefficient computed as:\n\n.. math: c_n=-\\frac{2m}{t_c}\\ln e_n..\n\n\n\tkt : float\n\t\ttangential elastic coefficient computed as:\n\n.. math: k_t=\\frac27\\frac{m}{t_c^2}\\left(\\pi^2+(\\ln e_t)^2\\right)..\n\n\n\tct : float\n\t\ttangential viscous coefficient computed as:\n\n.. math: c_t=-\\frac27\\frac{m}{t_c}\\ln e_t..\n\n\nFor details see Pournin, L., Liebling, T. M. & Mocellin, A. Molecular-dynamics force models for better control of energy dissipation in numerical simulations of dense granular media, Phys. Rev. E, 2001, 65, 01130");
+	py::def("getViscoelasticFromSpheresInteraction",getViscoelasticFromSpheresInteraction,(py::arg("m"),py::arg("tc"),py::arg("en"),py::arg("es")),"Get viscoelastic interaction parameters from analytical solution of a pair spheres collision problem. \n\n:Parameters:\n\t`m` : float\n\t\tsphere mass\n\t`tc` : float\n\t\tcollision time\n\t`en` : float\n\t\tnormal restitution coefficient\n\t`es` : float\n\t\ttangential restitution coefficient.\n\n\n:return: \n\tdict with keys:\n\n\tkn : float\n\t\tnormal elastic coefficient computed as:\n\n.. math:: k_n=\\frac{m}{t_c^2}\\left(\\pi^2+(\\ln e_n)^2\\right)\n\n\tcn : float\n\t\tnormal viscous coefficient computed as:\n\n.. math:: c_n=-\\frac{2m}{t_c}\\ln e_n\n\n\n\tkt : float\n\t\ttangential elastic coefficient computed as:\n\n.. math:: k_t=\\frac27\\frac{m}{t_c^2}\\left(\\pi^2+(\\ln e_t)^2\\right)\n\n\tct : float\n\t\ttangential viscous coefficient computed as:\n\n.. math:: c_t=-\\frac27\\frac{m}{t_c}\\ln e_t.\n\n\nFor details see [Pournin2001]_. ");
 }

=== modified file 'py/utils.py'
--- py/utils.py	2010-05-05 21:36:25 +0000
+++ py/utils.py	2010-05-07 10:47:16 +0000
@@ -569,7 +569,11 @@
 	return {'negIds':negIds,'posIds':posIds,'axis':axis,'area':min(areas)}
 
 def NormalRestitution2DampingRate(en):
-	"""Compute the normal damping rate as a function of the normal coefficient of restitution. """
+	r"""Compute the normal damping rate as a function of the normal coefficient of restitution $e_n$. For $e_n\in\langle0,1\rangle$ damping rate equals
+	
+	.. math:: -\frac{\log e_n}{\sqrt{e_n^2+\pi^2}}
+
+	"""
 	if en == 0.0: return 0.999999999
 	if en == 1.0: return 0.0
 	from math import sqrt,log,pi