[cig-commits] r11874 - in long/3D/Gale/trunk: . src/Gale/Utils/src

walter at geodynamics.org walter at geodynamics.org
Wed Apr 30 15:36:58 PDT 2008


Author: walter
Date: 2008-04-30 15:36:58 -0700 (Wed, 30 Apr 2008)
New Revision: 11874

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/src/Gale/Utils/src/KineticFriction.c
   long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.c
Log:
 r2121 at earth:  boo | 2008-04-29 16:02:12 -0700
 Clean up Kinetic and Static Friction



Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
   - 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2120
   + 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2121

Modified: long/3D/Gale/trunk/src/Gale/Utils/src/KineticFriction.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/Utils/src/KineticFriction.c	2008-04-30 22:36:52 UTC (rev 11873)
+++ long/3D/Gale/trunk/src/Gale/Utils/src/KineticFriction.c	2008-04-30 22:36:58 UTC (rev 11874)
@@ -446,7 +446,7 @@
             v_dot_n=Vec_Dot2D(v_diff,n);
             Vec_Scale2D(v_perpendicular,n,v_dot_n);
             Vec_Sub2D(v_surface_diff,v_diff,v_perpendicular);
-/*             v_norm=Vec_Mag2D(v_surface_diff); */
+            v_norm=Vec_Mag2D(v_surface_diff);
           }
         else
           {
@@ -454,23 +454,13 @@
             v_dot_n=Vec_Dot3D(v,n);
             Vec_Scale3D(v_perpendicular,n,v_dot_n);
             Vec_Sub3D(v_surface_diff,v,v_perpendicular);
-/*             v_norm=Vec_Mag3D(v_surface_diff); */
+            v_norm=Vec_Mag3D(v_surface_diff);
           }
         friction_force=friction_coefficient*normal_stress*area/overcount;
 
-        if(friction_force<0)
-          friction_force=0;
-        printf("friction %lf %lf %lf %lf %lf %lf %lf %lf %lf %d %d\n",
-               friction_force,
-               v_surface_diff[0], v_surface_diff[1],
-               v_boundary[0], v_boundary[1],
-               v_diff[0], v_diff[1],
-               v_perpendicular[0], v_perpendicular[1],
-               eNode_I,lElement_I);
-
-          elForceVec[ eNode_I*nodeDofCount + I_AXIS]+=-friction_force;
-/*         for(d=0;d<dim;++d) */
-/*           elForceVec[ eNode_I*nodeDofCount + d]+=friction_force; */
+        if(!(friction_force<0 || v_norm==0))
+          for(d=0;d<dim;++d)
+            elForceVec[ eNode_I*nodeDofCount + d]+=friction_force*v_surface_diff[d]/v_norm;
       }
   }
 }

Modified: long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.c	2008-04-30 22:36:52 UTC (rev 11873)
+++ long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.c	2008-04-30 22:36:58 UTC (rev 11874)
@@ -1080,7 +1080,6 @@
   /* Add in the pressure.  The sign convention switches the direction
      of stress from the deviatoric stress. */
 
-  printf("normal %lf %lf\n",p,*normal_stress);
   *normal_stress=p-(*normal_stress);
   return True;
 }



More information about the cig-commits mailing list