[cig-commits] commit: Add a minimum viscosity to DruckePrager

Mercurial hg at geodynamics.org
Fri Mar 12 13:52:23 PST 2010


changeset:   826:6af1bcb087d2
user:        Walter Landry <wlandry at caltech.edu>
date:        Fri Mar 12 13:49:00 2010 -0800
files:       Rheology/src/DruckerPrager.c Rheology/src/DruckerPrager.h
description:
Add a minimum viscosity to DruckePrager


diff -r 76a42ded0584 -r 6af1bcb087d2 Rheology/src/DruckerPrager.c
--- a/Rheology/src/DruckerPrager.c	Fri Mar 12 13:48:11 2010 -0800
+++ b/Rheology/src/DruckerPrager.c	Fri Mar 12 13:49:00 2010 -0800
@@ -77,6 +77,7 @@ DruckerPrager* DruckerPrager_New(
 	FeVariable*           pressureField,
 	SwarmVariable*        swarmPressure,
 	double                minimumYieldStress,
+	double                minimumViscosity,
 	double                frictionCoefficient,
 	double                frictionCoefficientAfterSoftening,
         double                boundaryCohesion,
@@ -111,6 +112,7 @@ DruckerPrager* DruckerPrager_New(
                         boundaryFront,
                         boundaryBack,
                         minimumYieldStress,
+                        minimumViscosity,
                         hydrostaticTerm );
    self->isConstructed = True;
    return self;
@@ -148,6 +150,7 @@ void _DruckerPrager_Init(
                 Bool                      boundaryFront,
                 Bool                      boundaryBack,
                 double                    minimumYieldStress,
+                double                    minimumViscosity,
                 HydrostaticTerm*          hydrostaticTerm )
 {
 	DruckerPrager_Particle*   particleExt;
@@ -159,6 +162,7 @@ void _DruckerPrager_Init(
 	self->pressureField       = pressureField;
 	self->frictionCoefficient = frictionCoefficient;
 	self->minimumYieldStress  = minimumYieldStress;
+	self->minimumViscosity    = minimumViscosity;
 	self->swarmPressure       = swarmPressure;
 	
 	/* Strain softening of Cohesion and friction - (linear
@@ -177,6 +181,7 @@ void _DruckerPrager_Init(
         self->boundaryBack=boundaryBack;
 
 	self->minimumYieldStress = minimumYieldStress;
+	self->minimumViscosity = minimumViscosity;
         self->hydrostaticTerm=hydrostaticTerm;
 
 	/* Update Drawing Parameters */
@@ -259,6 +264,7 @@ void _DruckerPrager_AssignFromXML( void*
                         Stg_ComponentFactory_GetBool(  cf,  self->name, (Dictionary_Entry_Key)"boundaryFront", False ),
                         Stg_ComponentFactory_GetBool(  cf,  self->name, (Dictionary_Entry_Key)"boundaryBack", False ),
 			Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minimumYieldStress", 0.0 ),
+			Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"minimumViscosity", 0.0),
                         Stg_ComponentFactory_ConstructByKey( cf, self->name, 
                                                              (Dictionary_Entry_Key)"HydrostaticTerm", HydrostaticTerm, False, data ) );
 }
@@ -345,6 +351,7 @@ double _DruckerPrager_GetYieldCriterion(
 	double                            frictionCoefficient;
 	double                            frictionCoefficientAfterSoftening;
 	double                            minimumYieldStress;
+	double                            minimumViscosity;
 	double                            effectiveCohesion;
 	double                            effectiveFrictionCoefficient;
 	double                            frictionalStrength;
@@ -364,6 +371,7 @@ double _DruckerPrager_GetYieldCriterion(
 	frictionCoefficient                = self->frictionCoefficient;
 	frictionCoefficientAfterSoftening  = self->frictionCoefficientAfterSoftening;
 	minimumYieldStress                 = self->minimumYieldStress;
+	minimumViscosity                   = self->minimumViscosity;
 	
 	particleExt = ExtensionManager_Get( materialPointsSwarm->particleExtensionMgr, materialPoint, self->particleExtHandle );
 
@@ -475,6 +483,9 @@ void _DruckerPrager_HasYielded(
    DruckerPrager* self = (DruckerPrager*)rheology;
    double old_viscosity = ConstitutiveMatrix_GetIsotropicViscosity( constitutiveMatrix );
    double viscosity = yieldCriterion/(2*self->strainRateSecondInvariant);
+
+   if(viscosity<self->minimumViscosity)
+     viscosity=self->minimumViscosity;
 
    ConstitutiveMatrix_SetIsotropicViscosity( constitutiveMatrix, viscosity );
 
diff -r 76a42ded0584 -r 6af1bcb087d2 Rheology/src/DruckerPrager.h
--- a/Rheology/src/DruckerPrager.h	Fri Mar 12 13:48:11 2010 -0800
+++ b/Rheology/src/DruckerPrager.h	Fri Mar 12 13:49:00 2010 -0800
@@ -71,6 +71,7 @@
       FeVariable*                                         pressureField;                         \
       SwarmVariable*                                      swarmPressure;                         \
       double                                              minimumYieldStress;                    \
+      double                                              minimumViscosity;                      \
       double                                              frictionCoefficient;                   \
       double                                              frictionCoefficientAfterSoftening;     \
 		double                                              boundaryCohesion;                              \
@@ -103,6 +104,7 @@
       FeVariable*           pressureField,
       SwarmVariable*        swarmPressure,
       double                minimumYieldStress,
+      double                minimumViscosity,
       double                frictionCoefficient,
       double                frictionCoefficientAfterSoftening,
       double                                              boundaryCohesion,
@@ -156,6 +158,7 @@
                 Bool                      boundaryFront,
                 Bool                      boundaryBack,
                 double                    minimumYieldStress,
+                double                    minimumViscosity,
                 HydrostaticTerm*          hydrostaticTerm );
 
 



More information about the CIG-COMMITS mailing list