[cig-commits] r7662 - in long/3D/Gale/trunk: . src/Underworld/Rheology/src

walter at geodynamics.org walter at geodynamics.org
Fri Jul 13 16:15:01 PDT 2007


Author: walter
Date: 2007-07-13 16:15:00 -0700 (Fri, 13 Jul 2007)
New Revision: 7662

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/src/Underworld/Rheology/src/BuiterStrainWeakening.c
   long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.c
   long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.h
Log:
 r1869 at earth:  boo | 2007-07-13 15:21:08 -0700
 Make strain weakening start at initialSofteningStrain and finish at finalSofteningStrain, instead of always starting at 0 and ending at softeningStrain



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

Modified: long/3D/Gale/trunk/src/Underworld/Rheology/src/BuiterStrainWeakening.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/src/BuiterStrainWeakening.c	2007-07-13 23:14:53 UTC (rev 7661)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/src/BuiterStrainWeakening.c	2007-07-13 23:15:00 UTC (rev 7662)
@@ -111,7 +111,8 @@
 		BuiterStrainWeakening*                             self,
 		MaterialPointsSwarm*                               swarm,
 		double                                             healingRate,
-		double                                             softeningStrain,
+		double                                             initialSofteningStrain,
+		double                                             finalSofteningStrain,
 		double                                             initialDamageFraction,
 		double                                             initialDamageWavenumber,
 		double                                             initialDamageFactor,
@@ -119,7 +120,7 @@
 		Stg_Shape*                                         initialStrainShape  )
 {
 	_StrainWeakening_Init( (StrainWeakening*)self, 
-				swarm, healingRate, softeningStrain, 
+				swarm, healingRate, initialSofteningStrain, finalSofteningStrain, 
 				initialDamageFraction, initialDamageWavenumber, 				initialDamageFactor, randomSeed,
 				initialStrainShape );
 }

Modified: long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.c	2007-07-13 23:14:53 UTC (rev 7661)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.c	2007-07-13 23:15:00 UTC (rev 7662)
@@ -109,7 +109,8 @@
 		StrainWeakening*                                   self,
 		MaterialPointsSwarm*                               swarm,
 		double                                             healingRate,
-		double                                             softeningStrain,
+		double                                             initialSofteningStrain,
+		double                                             finalSofteningStrain,
 		double                                             initialDamageFraction,
 		double                                             initialDamageWavenumber,
 		double                                             initialDamageFactor,
@@ -119,7 +120,8 @@
 	/* Assign Values */
 	self->swarm                   = swarm;
 	self->healingRate             = healingRate;
-	self->softeningStrain         = softeningStrain;
+	self->initialSofteningStrain  = initialSofteningStrain;
+	self->finalSofteningStrain    = finalSofteningStrain;
 	self->initialDamageFraction   = initialDamageFraction;
 	self->initialDamageWavenumber = initialDamageWavenumber;
 	self->initialDamageFactor     = initialDamageFactor;
@@ -205,7 +207,8 @@
 	StrainWeakening*        self           = (StrainWeakening*) strainWeakening;
 	MaterialPointsSwarm*    materialPointsSwarm;
 	double                  healingRate;
-	double                  softeningStrain;
+	double                  initialSofteningStrain;
+	double                  finalSofteningStrain;
 	double                  initialDamageFraction;
 	double                  initialDamageWavenumber;
 	double                  initialDamageFactor;
@@ -224,7 +227,8 @@
 		data );
 
 	healingRate             = Stg_ComponentFactory_GetDouble( cf, self->name, "healingRate",              0.0 );
-	softeningStrain         = Stg_ComponentFactory_GetDouble( cf, self->name, "softeningStrain",          HUGE_VAL );
+	initialSofteningStrain  = Stg_ComponentFactory_GetDouble( cf, self->name, "initialSofteningStrain", HUGE_VAL );
+	finalSofteningStrain    = Stg_ComponentFactory_GetDouble( cf, self->name, "finalSofteningStrain",   HUGE_VAL );
 	initialDamageFraction   = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageFraction",    0.0 );
 	initialDamageWavenumber = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageWavenumber", -1.0 );
 	initialDamageFactor     = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageFactor",      1.0 );
@@ -235,7 +239,8 @@
 			self, 
 			materialPointsSwarm, 
 			healingRate,
-			softeningStrain,
+			initialSofteningStrain,
+			finalSofteningStrain,
 			initialDamageFraction,
 			initialDamageWavenumber, 
 			initialDamageFactor,
@@ -300,7 +305,7 @@
 					continue;
 				}
 				
-				postFailureWeakening = self->initialDamageFactor * rand() * self->softeningStrain/RAND_MAX;
+				postFailureWeakening = self->initialDamageFactor * rand() * self->finalSofteningStrain/RAND_MAX;
 
 				if ( self->initialDamageWavenumber > 0.0 ) {				
 					coord = Variable_GetPtrDouble( positionVariable, lParticle_I );
@@ -375,10 +380,13 @@
 	if ( particleExt->postFailureWeakening < 0.0 ) 
 		particleExt->postFailureWeakening = 0.0;
 
-	strainWeakeningRatio = particleExt->postFailureWeakening / self->softeningStrain;
+	strainWeakeningRatio = (particleExt->postFailureWeakening - self->initialSofteningStrain)
+          / (self->finalSofteningStrain - self->initialSofteningStrain);
 
 	if (strainWeakeningRatio > 1.0)
 		strainWeakeningRatio = 1.0;
+	if (strainWeakeningRatio < 0.0)
+		strainWeakeningRatio = 0.0;
 	
 	return strainWeakeningRatio;
 }

Modified: long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.h
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.h	2007-07-13 23:14:53 UTC (rev 7661)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.h	2007-07-13 23:15:00 UTC (rev 7662)
@@ -77,7 +77,8 @@
 		/* Param passed in */ \
 		MaterialPointsSwarm*                   swarm;                             \
 		double                                 healingRate;                       \
-		double                                 softeningStrain;                   \
+		double                                 initialSofteningStrain;                   \
+		double                                 finalSofteningStrain;                   \
 		double                                 initialDamageFraction;             \
 		double                                 initialDamageWavenumber;           \
 		double                                 initialDamageFactor;               \
@@ -108,7 +109,8 @@
 		StrainWeakening*                                   self,
 		MaterialPointsSwarm*                               swarm,
 		double                                             healingRate,
-		double                                             softeningStrain,
+		double                                             initialSofteningStrain,
+		double                                             finalSofteningStrain,
 		double                                             initialDamageFraction,
 		double                                             initialDamageWavenumber,
 		double                                             initialDamageFactor,



More information about the cig-commits mailing list