← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2819: 1. correct affiliation in doc/sphinx/conf.py

 

------------------------------------------------------------
revno: 2819
committer: Klaus Thoeni <klaus.thoeni@xxxxxxxxx>
branch nick: yade
timestamp: Mon 2011-04-18 13:39:47 +1000
message:
  1. correct affiliation in doc/sphinx/conf.py
  2. derive WirePM from FrictMat
  3. add value which indicates how far interactions are from normal failing (currently just used in WirePM)
modified:
  doc/sphinx/conf.py
  pkg/common/NormShearPhys.hpp
  pkg/dem/VTKRecorder.cpp
  pkg/dem/VTKRecorder.hpp
  pkg/dem/WirePM.cpp
  pkg/dem/WirePM.hpp


--
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/sphinx/conf.py'
--- doc/sphinx/conf.py	2011-02-14 13:38:40 +0000
+++ doc/sphinx/conf.py	2011-04-18 03:39:47 +0000
@@ -711,7 +711,7 @@
 \text{\sffamily\Large CVUT Prague}\\
 \\
 \text{\sffamily\bfseries\Large Klaus Thoeni}
-\text{\sffamily\Large University of Newcastle (Australia)}\\
+\text{\sffamily\Large The University of Newcastle (Australia)}\\
 
 \text{\sffamily\bfseries\large Citing this document}\\
 In order to let users cite Yade consistently in publications, we provide a list of bibliographic references for the different parts of the documentation. This way of acknowledging Yade is also a way to make developments and documentation of Yade more attractive for researchers, who are evaluated on the basis of citations of their work by others. We therefore kindly ask users to cite Yade as accurately as possible in their papers, as explained in http://yade-dem/doc/citing.html.

=== modified file 'pkg/common/NormShearPhys.hpp'
--- pkg/common/NormShearPhys.hpp	2010-10-13 16:23:08 +0000
+++ pkg/common/NormShearPhys.hpp	2011-04-18 03:39:47 +0000
@@ -9,7 +9,8 @@
 		virtual ~NormPhys();
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR(NormPhys,IPhys,"Abstract class for interactions that have normal stiffness.",
 		((Real,kn,NaN,,"Normal stiffness"))
-		((Vector3r,normalForce,Vector3r::Zero(),,"Normal force after previous step (in global coordinates).")),
+		((Vector3r,normalForce,Vector3r::Zero(),,"Normal force after previous step (in global coordinates)."))
+		((Real,limitNormalFactor,NaN,,"This value indicates on how far from failing the normal interaction is if failure is considered, e.g. actual normal displacement divided by admissible normal displacement multiplied by actual normal force divided by admissible normal force (currently just used in the :yref:`wire particle model<Law2_ScGeom_WirePhys_WirePM>`).")),
 		createIndex();
 	);
 	REGISTER_CLASS_INDEX(NormPhys,IPhys);

=== modified file 'pkg/dem/VTKRecorder.cpp'
--- pkg/dem/VTKRecorder.cpp	2011-01-21 19:55:58 +0000
+++ pkg/dem/VTKRecorder.cpp	2011-04-18 03:39:47 +0000
@@ -55,17 +55,22 @@
 		else if((rec=="colors") || (rec=="color"))recActive[REC_COLORS]=true;
 		else if(rec=="cpm") recActive[REC_CPM]=true;
 		else if(rec=="rpm") recActive[REC_RPM]=true;
+		else if(rec=="wpm") recActive[REC_WPM]=true;
 		else if(rec=="intr") recActive[REC_INTR]=true;
 		else if((rec=="ids") || (rec=="id")) recActive[REC_ID]=true;
 		else if(rec=="mask") recActive[REC_MASK]=true;
 		else if((rec=="clumpids") || (rec=="clumpId")) recActive[REC_CLUMPID]=true;
 		else if(rec=="materialId") recActive[REC_MATERIALID]=true;
 		else if(rec=="stress") recActive[REC_STRESS]=true;
-		else LOG_ERROR("Unknown recorder named `"<<rec<<"' (supported are: all, spheres, velocity, facets, color, stress, cpm, rpm, intr, id, clumpId, materialId). Ignored.");
+		else LOG_ERROR("Unknown recorder named `"<<rec<<"' (supported are: all, spheres, velocity, facets, color, stress, cpm, rpm, wpm, intr, id, clumpId, materialId). Ignored.");
 	}
 	// cpm needs interactions
 	if(recActive[REC_CPM]) recActive[REC_INTR]=true;
 
+	// wpm needs interactions
+	if(recActive[REC_WPM]) recActive[REC_INTR]=true;
+
+	
 	// spheres
 	vtkSmartPointer<vtkPoints> spheresPos = vtkSmartPointer<vtkPoints>::New();
 	vtkSmartPointer<vtkCellArray> spheresCells = vtkSmartPointer<vtkCellArray>::New();
@@ -180,6 +185,11 @@
 	vtkSmartPointer<vtkFloatArray> rpmSpecDiam = vtkSmartPointer<vtkFloatArray>::New();
 	rpmSpecDiam->SetNumberOfComponents(1);
 	rpmSpecDiam->SetName("rpmSpecDiam");
+	
+	// extras for WireMatPM
+	vtkSmartPointer<vtkFloatArray> wpmLimitNormalFactor = vtkSmartPointer<vtkFloatArray>::New();
+	wpmLimitNormalFactor->SetNumberOfComponents(1);
+	wpmLimitNormalFactor->SetName("wpmLimitNormalFactor");
 
 	if(recActive[REC_INTR]){
 		// holds information about cell distance between spatial and displayed position of each particle
@@ -246,6 +256,9 @@
 			for(int i=0; i<numAddValues; i++){
 				intrForceN->InsertNextValue(fn);
 				intrAbsForceT->InsertNextTupleValue(fs);
+				if(recActive[REC_WPM]) {
+					wpmLimitNormalFactor->InsertNextValue(phys->limitNormalFactor);
+				}
 			}
 		}
 	}
@@ -428,6 +441,9 @@
 		intrPd->SetLines(intrCells);
 		intrPd->GetCellData()->AddArray(intrForceN);
 		intrPd->GetCellData()->AddArray(intrAbsForceT);
+		if (recActive[REC_WPM]){
+			intrPd->GetCellData()->AddArray(wpmLimitNormalFactor);
+		}
 		#ifdef YADE_VTK_MULTIBLOCK
 			if(!multiblock)
 		#endif

=== modified file 'pkg/dem/VTKRecorder.hpp'
--- pkg/dem/VTKRecorder.hpp	2011-01-21 08:14:28 +0000
+++ pkg/dem/VTKRecorder.hpp	2011-04-18 03:39:47 +0000
@@ -9,7 +9,7 @@
 
 class VTKRecorder: public PeriodicEngine {
 	public:
-		enum {REC_SPHERES=0,REC_FACETS,REC_COLORS,REC_CPM,REC_INTR,REC_VELOCITY,REC_ID,REC_CLUMPID,REC_SENTINEL,REC_MATERIALID,REC_STRESS,REC_MASK,REC_RPM};
+		enum {REC_SPHERES=0,REC_FACETS,REC_COLORS,REC_CPM,REC_INTR,REC_VELOCITY,REC_ID,REC_CLUMPID,REC_SENTINEL,REC_MATERIALID,REC_STRESS,REC_MASK,REC_RPM,REC_WPM};
 		virtual void action();
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR(VTKRecorder,PeriodicEngine,"Engine recording snapshots of simulation into series of *.vtu files, readable by VTK-based postprocessing programs such as Paraview. Both bodies (spheres and facets) and interactions can be recorded, with various vector/scalar quantities that are defined on them.\n\n:yref:`PeriodicEngine.initRun` is initialized to ``True`` automatically.",
 		((bool,compress,false,,"Compress output XML files [experimental]."))
@@ -20,7 +20,7 @@
 			((bool,multiblock,false,,"Use multi-block (``.vtm``) files to store data, rather than separate ``.vtu`` files."))
 		#endif
 		((string,fileName,"",,"Base file name; it will be appended with {spheres,intrs,facets}-243100.vtu (unless *multiblock* is ``True``) depending on active recorders and step number (243100 in this case). It can contain slashes, but the directory must exist already."))
-		((vector<string>,recorders,vector<string>(1,string("all")),,"List of active recorders (as strings). ``all`` (the default value) enables all base and generic recorders.\n\n.. admonition:: Base recorders\n\n\tBase recorders save the geometry (unstructured grids) on which other data is defined. They are implicitly activated by many of the other recorders. Each of them creates a new file (or a block, if :yref:`multiblock <VTKRecorder.multiblock>` is set).\n\n\t``spheres``\n\t\tSaves positions and radii (``radii``) of :yref:`spherical<Sphere>` particles.\n\t``facets``\n\t\tSave :yref:`facets<Facet>` positions (vertices).\n\t``intr``\n\t\tStore interactions as lines between nodes at respective particles positions. Additionally stores magnitude of normal (``forceN``) and shear (``absForceT``) forces on interactions (the :yref:`geom<Interaction.geom> must be of type :yref:`NormShearPhys`). \n\n.. admonition:: Generic recorders\n\n\tGeneric recorders do not depend on specific model being used and save commonly useful data.\n\n\t``id``\n\t\tSaves id's (field ``id``) of spheres; active only if ``spheres`` is active.\n\t``clumpId``\n\t\tSaves id's of clumps to which each sphere belongs (field ``clumpId``); active only if ``spheres`` is active.\n\t``colors``\n\t\tSaves colors of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>` (field ``color``); only active if ``spheres`` or ``facets`` are activated.\n\t``mask``\n\t\tSaves groupMasks of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>` (field ``mask``); only active if ``spheres`` or ``facets`` are activated.\n\t``materialId``\n\t\tSaves materialID of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>`; only active if ``spheres`` or ``facets`` are activated.\n\t``velocity``\n\t\tSaves linear and angular velocities of spherical particles as Vector3 and length(fields ``linVelVec``, ``linVelLen`` and ``angVelVec``, ``angVelLen`` respectively``); only effective with ``spheres``.\n\t``stress``\n\t\tSaves stresses of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>`  as Vector3 and length; only active if ``spheres`` or ``facets`` are activated.\n\n.. admonition:: Specific recorders\n\n\tThe following should only be activated in appropriate cases, otherwise crashes can occur due to violation of type presuppositions.\n\n\t``cpm``\n\t\tSaves data pertaining to the :yref:`concrete model<Law2_Dem3DofGeom_CpmPhys_Cpm>`: ``cpmDamage`` (normalized residual strength averaged on particle), ``cpmSigma`` (stress on particle, normal components), ``cpmTau`` (shear components of stress on particle), ``cpmSigmaM`` (mean stress around particle); ``intr`` is activated automatically by ``cpm``\n\t``rpm``\n\t\tSaves data pertaining to the :yref:`rock particle model<Law2_Dem3DofGeom_RockPMPhys_Rpm>`: ``rpmSpecNum`` shows different pieces of separated stones, only ids. ``rpmSpecMass`` shows masses of separated stones.\n\n"))
+		((vector<string>,recorders,vector<string>(1,string("all")),,"List of active recorders (as strings). ``all`` (the default value) enables all base and generic recorders.\n\n.. admonition:: Base recorders\n\n\tBase recorders save the geometry (unstructured grids) on which other data is defined. They are implicitly activated by many of the other recorders. Each of them creates a new file (or a block, if :yref:`multiblock <VTKRecorder.multiblock>` is set).\n\n\t``spheres``\n\t\tSaves positions and radii (``radii``) of :yref:`spherical<Sphere>` particles.\n\t``facets``\n\t\tSave :yref:`facets<Facet>` positions (vertices).\n\t``intr``\n\t\tStore interactions as lines between nodes at respective particles positions. Additionally stores magnitude of normal (``forceN``) and shear (``absForceT``) forces on interactions (the :yref:`geom<Interaction.geom> must be of type :yref:`NormShearPhys`). \n\n.. admonition:: Generic recorders\n\n\tGeneric recorders do not depend on specific model being used and save commonly useful data.\n\n\t``id``\n\t\tSaves id's (field ``id``) of spheres; active only if ``spheres`` is active.\n\t``clumpId``\n\t\tSaves id's of clumps to which each sphere belongs (field ``clumpId``); active only if ``spheres`` is active.\n\t``colors``\n\t\tSaves colors of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>` (field ``color``); only active if ``spheres`` or ``facets`` are activated.\n\t``mask``\n\t\tSaves groupMasks of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>` (field ``mask``); only active if ``spheres`` or ``facets`` are activated.\n\t``materialId``\n\t\tSaves materialID of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>`; only active if ``spheres`` or ``facets`` are activated.\n\t``velocity``\n\t\tSaves linear and angular velocities of spherical particles as Vector3 and length(fields ``linVelVec``, ``linVelLen`` and ``angVelVec``, ``angVelLen`` respectively``); only effective with ``spheres``.\n\t``stress``\n\t\tSaves stresses of :yref:`spheres<Sphere>` and of :yref:`facets<Facet>`  as Vector3 and length; only active if ``spheres`` or ``facets`` are activated.\n\n.. admonition:: Specific recorders\n\n\tThe following should only be activated in appropriate cases, otherwise crashes can occur due to violation of type presuppositions.\n\n\t``cpm``\n\t\tSaves data pertaining to the :yref:`concrete model<Law2_Dem3DofGeom_CpmPhys_Cpm>`: ``cpmDamage`` (normalized residual strength averaged on particle), ``cpmSigma`` (stress on particle, normal components), ``cpmTau`` (shear components of stress on particle), ``cpmSigmaM`` (mean stress around particle); ``intr`` is activated automatically by ``cpm``\n\t``rpm``\n\t\tSaves data pertaining to the :yref:`rock particle model<Law2_Dem3DofGeom_RockPMPhys_Rpm>`: ``rpmSpecNum`` shows different pieces of separated stones, only ids. ``rpmSpecMass`` shows masses of separated stones.\n\t``wpm``\n\t\tSaves data pertaining to the :yref:`wire particle model<Law2_ScGeom_WirePhys_WirePM>`: ``wpmForceNFactor`` shows the loading factor for the wire, e.g. normal force devided by threshold normal force.\n\n"))
 		((int,mask,0,,"If mask defined, only bodies with corresponding groupMask will be exported. If 0, all bodies will be exported.")),
 		/*ctor*/
 		initRun=true;

=== modified file 'pkg/dem/WirePM.cpp'
--- pkg/dem/WirePM.cpp	2010-12-10 02:42:10 +0000
+++ pkg/dem/WirePM.cpp	2011-04-18 03:39:47 +0000
@@ -91,7 +91,13 @@
 	if (Fn > 0.) Fn = 0.;
 	
 	phys->normalForce = Fn*geom->normal; // NOTE: normal is position2-position1 - It is directed from particle1 to particle2
-	        
+
+	/* compute a limit value to check how far the interaction is from failing */
+	Real limitNormalFactor = 0.;
+	if (Fn < 0.) limitNormalFactor = fabs(D/(DFValues.back()(0)));
+	limitNormalFactor *= fabs(Fn/(DFValues.back()(1)));
+	phys->limitNormalFactor = limitNormalFactor;
+
 	State* st1 = Body::byId(id1,scene)->state.get();
 	State* st2 = Body::byId(id2,scene)->state.get();
 	

=== modified file 'pkg/dem/WirePM.hpp'
--- pkg/dem/WirePM.hpp	2010-12-11 23:01:30 +0000
+++ pkg/dem/WirePM.hpp	2011-04-18 03:39:47 +0000
@@ -36,13 +36,13 @@
 REGISTER_SERIALIZABLE(WireState);
 
 /** This class holds information associated with each body */
-class WireMat: public ElastMat {
+class WireMat: public FrictMat {
 	public:
 		virtual shared_ptr<State> newAssocState() const { return shared_ptr<State>(new WireState); }
 		virtual bool stateTypeOk(State* s) const { return (bool)dynamic_cast<WireState*>(s); }
 		void postLoad(WireMat&);
 	DECLARE_LOGGER;
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR(WireMat,ElastMat,"Material for use with the Wire classes",
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(WireMat,FrictMat,"Material for use with the Wire classes",
 		((Real,diameter,0.0027,," (Diameter of the single wire in [m] (the diameter is used to compute the cross-section area of the wire)."))
 		((vector<Vector2r>,strainStressValues,,Attr::triggerPostLoad,"Piecewise linear definition of the stress-strain curve by set of points (strain[-]>0,stress[Pa]>0) for one single wire. Tension only is considered and the point (0,0) is not needed!"))
 		((bool,isDoubleTwist,false,,"Type of the mesh. If true two particles of the same material which body ids differ by one will be considered as double-twisted interaction."))
@@ -52,7 +52,7 @@
 		,
 		createIndex();
 	);
-	REGISTER_CLASS_INDEX(WireMat,ElastMat);
+	REGISTER_CLASS_INDEX(WireMat,FrictMat);
 };
 REGISTER_SERIALIZABLE(WireMat);
 


Follow ups