[cig-commits] r6289 - short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel

willic3 at geodynamics.org willic3 at geodynamics.org
Mon Mar 19 09:59:48 PDT 2007


Author: willic3
Date: 2007-03-19 09:59:47 -0700 (Mon, 19 Mar 2007)
New Revision: 6289

Added:
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticZT.py
Removed:
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticESF.py
Modified:
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearElastic.py
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearGenMaxwellViscoelastic.py
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelastic.py
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelasticESF.py
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/MaterialModel.py
   short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/__init__.py
Log:
Fixed all material models to conform to new arrangement, and added
some documentation strings.
Also replaced commented-out print statements with journal calls.



Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearElastic.py	2007-03-19 16:56:29 UTC (rev 6288)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearElastic.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -28,10 +28,16 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #
 
+## @file pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearElastic.py
+
+## @brief Python PyLith-0.8 linear isotropic elastic material model
+
 from pylith3d.MaterialModel.MaterialModel import MaterialModel
 
 class IsotropicLinearElastic(MaterialModel):
-    """Basic definitions for an isotropic linear elastic material"""
+    """
+    Python PyLith-0.8 definitions for an isotropic linear elastic material
+    """
 
     def __init__(self):
         """Initialization for isotropic linear elastic material
@@ -48,17 +54,19 @@
         means that only a single material matrix is required for each
         material group of this type.
 
-        Only 2 state variables (stress and strain) are required to describe
+        Only 2 sets of state variables (stress and strain) are required to describe
         this material."""
 
         MaterialModel.__init__(self)
 
-        # print "Hello from IsotropicLinearElastic.__init__!"
-        # print ""
+        import journal
+        self.trace = journal.debug("pylith3d.trace")
+        self.trace.log("Hello from IsotropicLinearElastic.__init__!")
+
         self.materialModel = 1
         self.numberProperties = 3
         self.materialVariation = False
-        self.numberStateVariables = 2
+        self.numberStateVariables = 12
         self.propertyDict = {'density': None,
                              'youngsModulus': None,
                              'poissonsRatio': None}

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearGenMaxwellViscoelastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearGenMaxwellViscoelastic.py	2007-03-19 16:56:29 UTC (rev 6288)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearGenMaxwellViscoelastic.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -41,72 +41,21 @@
     For now, the standard linear solid may be approximated by setting one viscosity to
     a large value and setting one of the shear ratios to zero.
     """
-    # """
-    # Python PyLith-0.8 material model consisting of a linear elastic spring in parallel
-    # with N Maxwell elements.
-    """
-
-    # To prevent having to rewrite a bunch of other code sections, I am temporarily commenting
-    # out the specialized readprop function and setting the number of Maxwell elements to 3.
-    #temp def readprop(self,file):
-    #temp     """
-    #temp     We need to override the generic property reader since this
-    #temp     one has to increase the sizes of dictionaries and lists
-    #temp     depending on the input values.
-    #temp     """
-
-    #temp     from pylith3d.KeywordValueParse import KeywordValueParse
-    #temp     lineparse = KeywordValueParse()
-
-    #temp     # print "Hellof from IsotropicLinearGenMaxwellViscoelastic.readprop!"
-
-    #temp     endMaterial = False
-    #temp     count = 0
-    #temp     while not endMaterial:
-    #temp         line=file.readline()
-    #temp         if not line: break
-    #temp         keyvals = lineparse.parseline(line)
-    #temp         if count == 0:
-    #temp             if keyvals[0] != "numberMaxwellElements":
-    #temp                 raise ValueError, "First entry for this material type must be numberMaxwellElements"
-    #temp             else:
-    #temp                 numberModels = keyvals[1]
-    #temp                 self.numberProperties += 2*numberModels
-    #temp                 newModels = 1
-    #temp                 while newModels < numberModels + 1:
-    #temp                     shear = "shearModulus" + str(newModels)
-    #temp                     viscosity = "viscosity" + str(newModels)
-    #temp                     self.propertyDict += {shear: None, viscosity: None}
-    #temp                     self.propertyPosition += [shear, viscosity]
-    #temp                     self.propertyList += [0.0, 0.0]
-    #temp                     newModels += 1
-    #temp         count += 1
-    #temp         if keyvals[3]:
-    #temp             exec keyvals[0] + '=' + `keyvals[1]`
-    #temp     for propertyIndex in range(len(self.propertyPosition)):
-    #temp         self.propertyDict[self.propertyPosition[propertyIndex]] = eval(self.propertyPosition[propertyIndex])
-    #temp         self.propertyList[propertyIndex] = self.propertyDict[self.propertyPosition[propertyIndex]]
-
-    #temp     test = None in self.propertyDict.values()
-    #temp     if test:
-    #temp         position = self.propertyDict.values().index(None)
-    #temp         noneKey = self.propertyDict.keys()[position]
-    #temp         raise ValueError, "No value assigned for property: %r" % noneKey
-
-    #temp     return
-                
         
     def __init__(self):
         MaterialModel.__init__(self)
 
-        # print "Hello from IsotropicLinearGenMaxwellViscoelastic.__init__!"
-        # print ""
-        self.materialModel = 7
+        import journal
+        self.trace = journal.debug("pylith3d.trace")
+        self.trace.log("Hello from IsotropicLinearGenMaxwellViscoelastic.__init__!")
+
+        self.materialModel = 6
         self.numberProperties = 9
+        # materialVariation flag is set to false since the material matrix does not vary
+        # with the state variables.  It does vary with the time step size, however.
+        self.materialVariation = False
         self.numberStateVariables = 30
-        # This model starts with no Maxwell elements defined.
-        # They are added as the material properties file is read.
-        # NOTE: ** I have temporarily changed this behavior to allow exactly 3 Maxwell models.
+        # This model assumes exactly 3 Maxwell models.
         self.propertyDict = {'density': None,
                              'youngsModulus': None,
                              'poissonsRatio': None,

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelastic.py	2007-03-19 16:56:29 UTC (rev 6288)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelastic.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -28,17 +28,32 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #
 
+## @file pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelastic.py
+
+## @brief Python PyLith-0.8 linear Maxwell Model.
+
 from pylith3d.MaterialModel.MaterialModel import MaterialModel
 
 class IsotropicLinearMaxwellViscoelastic(MaterialModel):
+    """
+    Python PyLith-0.8 definitions for a linear Maxwell viscoelastic material.
+    This version uses an adaptation of the generalized Maxwell viscoelastic model
+    described by Zienkiewicz & Taylor.
+    """
 
     def __init__(self):
         MaterialModel.__init__(self)
 
-        # print "Hello from IsotropicLinearMaxwellViscoelastic.__init__!"
-        # print ""
+        import journal
+        self.trace = journal.debug("pylith3d.trace")
+        self.trace.log("Hello from IsotropicLinearMaxwellViscoelastic.__init__!")
+
         self.materialModel = 5
         self.numberProperties = 4
+        # materialVariation flag is set to false since the material matrix does not vary
+        # with the state variables.  It does vary with the time step size, however.
+        self.materialVariation = False
+        self.numberStateVariables = 18
         self.propertyDict = {'density': None,
                              'youngsModulus': None,
                              'poissonsRatio': None,

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelasticESF.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelasticESF.py	2007-03-19 16:56:29 UTC (rev 6288)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelasticESF.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -28,17 +28,32 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #
 
+## @file pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicLinearMaxwellViscoelasticESF.py
+
+## @brief Python PyLith-0.8 linear Maxwell Model using ESF approach.
+
 from pylith3d.MaterialModel.MaterialModel import MaterialModel
 
 class IsotropicLinearMaxwellViscoelasticESF(MaterialModel):
+    """Python PyLith-0.8 definitions for a linear Maxwell viscoelastic material.
+    This version uses the Bathe Effective Stress Function approach, although
+    the actuall stress functions are not needed for this linear material.
+    """
 
     def __init__(self):
         MaterialModel.__init__(self)
 
-        # print "Hello from IsotropicLinearMaxwellViscoelasticESF.__init__!"
-        # print ""
+        import journal
+        self.trace = journal.debug("pylith3d.trace")
+        self.trace.log("Hello from IsotropicLinearMaxwellViscoelasticESF.__init__!")
+
         self.materialModel = 8
         self.numberProperties = 4
+        # materialVariation flag is set to false since the material matrix does not vary
+        # with the state variables.  It does vary with the time step size, however.
+        self.materialVariation = False
+        self.numberStateVariables = 18
+
         self.propertyDict = {'density': None,
                              'youngsModulus': None,
                              'poissonsRatio': None,

Deleted: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py	2007-03-19 16:56:29 UTC (rev 6288)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -1,62 +0,0 @@
-#!/usr/bin/env python
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-#  PyLith by Charles A. Williams, Brad Aagaard, and Matt Knepley
-#
-#  Copyright (c) 2004-2006 Rensselaer Polytechnic Institute
-#
-#  Permission is hereby granted, free of charge, to any person obtaining
-#  a copy of this software and associated documentation files (the
-#  "Software"), to deal in the Software without restriction, including
-#  without limitation the rights to use, copy, modify, merge, publish,
-#  distribute, sublicense, and/or sell copies of the Software, and to
-#  permit persons to whom the Software is furnished to do so, subject to
-#  the following conditions:
-#
-#  The above copyright notice and this permission notice shall be
-#  included in all copies or substantial portions of the Software.
-#
-#  THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-#  EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-#  MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-#  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-#  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-#  OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-#  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-from pylith3d.MaterialModel.MaterialModel import MaterialModel
-
-class IsotropicPowerLawMaxwellViscoelastic(MaterialModel):
-
-    def __init__(self):
-        MaterialModel.__init__(self)
-
-        # print "Hello from IsotropicPowerLawMaxwellViscoelastic.__init__!"
-        # print ""
-        self.materialModel = 6
-        self.numberProperties = 5
-        self.propertyDict = {'density': None,
-                             'youngsModulus': None,
-                             'poissonsRatio': None,
-                             'powerLawExponent': None,
-                             'viscosityCoefficient': None}
-        self.propertyPosition = ['density',
-                                 'youngsModulus',
-                                 'poissonsRatio',
-                                 'powerLawExponent',
-                                 'viscosityCoefficient']
-        self.propertyList = [0.0,
-                             0.0,
-                             0.0,
-                             0.0,
-                             0.0]
-        return
-
-# version
-# $Id: IsotropicPowerLawMaxwellViscoelastic.py,v 1.2 2004/08/12 16:49:07 willic3 Exp $
-
-# End of file 

Copied: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py (from rev 6285, short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticESF.py)
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticESF.py	2007-03-19 05:08:57 UTC (rev 6285)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#  PyLith by Charles A. Williams, Brad Aagaard, and Matt Knepley
+#
+#  Copyright (c) 2004-2006 Rensselaer Polytechnic Institute
+#
+#  Permission is hereby granted, free of charge, to any person obtaining
+#  a copy of this software and associated documentation files (the
+#  "Software"), to deal in the Software without restriction, including
+#  without limitation the rights to use, copy, modify, merge, publish,
+#  distribute, sublicense, and/or sell copies of the Software, and to
+#  permit persons to whom the Software is furnished to do so, subject to
+#  the following conditions:
+#
+#  The above copyright notice and this permission notice shall be
+#  included in all copies or substantial portions of the Software.
+#
+#  THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+#  EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+#  MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+#  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+#  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+#  OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+#  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+## @file pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py
+
+## @brief Python PyLith-0.8 power-law Maxwell viscoelastic model.
+
+from pylith3d.MaterialModel.MaterialModel import MaterialModel
+
+class IsotropicPowerLawMaxwellViscoelastic(MaterialModel):
+    """
+    Python PyLith-0.8 definitions for a power-law Maxwell viscoelastic material.
+    This version uses the Bathe Effective Stress Function (ESF) approach.
+    """
+
+    def __init__(self):
+        MaterialModel.__init__(self)
+
+        import journal
+        self.trace = journal.debug("pylith3d.trace")
+        self.trace.log("Hello from IsotropicPowerLawMaxwellViscoelastic.__init__!")
+
+        self.materialModel = 7
+        self.numberProperties = 5
+        self.materialVariation = True
+        self.numberStateVariables = 18
+        self.propertyDict = {'density': None,
+                             'youngsModulus': None,
+                             'poissonsRatio': None,
+                             'powerLawExponent': None,
+                             'viscosityCoefficient': None}
+        self.propertyPosition = ['density',
+                                 'youngsModulus',
+                                 'poissonsRatio',
+                                 'powerLawExponent',
+                                 'viscosityCoefficient']
+        self.propertyList = [0.0,
+                             0.0,
+                             0.0,
+                             0.0,
+                             0.0]
+        return
+
+# version
+# $Id: IsotropicPowerLawMaxwellViscoelastic.py,v 1.2 2004/08/12 16:49:07 willic3 Exp $
+
+# End of file 

Deleted: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticESF.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticESF.py	2007-03-19 16:56:29 UTC (rev 6288)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticESF.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -1,62 +0,0 @@
-#!/usr/bin/env python
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-#  PyLith by Charles A. Williams, Brad Aagaard, and Matt Knepley
-#
-#  Copyright (c) 2004-2006 Rensselaer Polytechnic Institute
-#
-#  Permission is hereby granted, free of charge, to any person obtaining
-#  a copy of this software and associated documentation files (the
-#  "Software"), to deal in the Software without restriction, including
-#  without limitation the rights to use, copy, modify, merge, publish,
-#  distribute, sublicense, and/or sell copies of the Software, and to
-#  permit persons to whom the Software is furnished to do so, subject to
-#  the following conditions:
-#
-#  The above copyright notice and this permission notice shall be
-#  included in all copies or substantial portions of the Software.
-#
-#  THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-#  EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-#  MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-#  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-#  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-#  OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-#  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-from pylith3d.MaterialModel.MaterialModel import MaterialModel
-
-class IsotropicPowerLawMaxwellViscoelasticESF(MaterialModel):
-
-    def __init__(self):
-        MaterialModel.__init__(self)
-
-        # print "Hello from IsotropicPowerLawMaxwellViscoelasticESF.__init__!"
-        # print ""
-        self.materialModel = 9
-        self.numberProperties = 5
-        self.propertyDict = {'density': None,
-                             'youngsModulus': None,
-                             'poissonsRatio': None,
-                             'powerLawExponent': None,
-                             'viscosityCoefficient': None}
-        self.propertyPosition = ['density',
-                                 'youngsModulus',
-                                 'poissonsRatio',
-                                 'powerLawExponent',
-                                 'viscosityCoefficient']
-        self.propertyList = [0.0,
-                             0.0,
-                             0.0,
-                             0.0,
-                             0.0]
-        return
-
-# version
-# $Id: IsotropicPowerLawMaxwellViscoelasticESF.py,v 1.2 2004/08/12 16:49:07 willic3 Exp $
-
-# End of file 

Copied: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticZT.py (from rev 6285, short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py)
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelastic.py	2007-03-19 05:08:57 UTC (rev 6285)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticZT.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#  PyLith by Charles A. Williams, Brad Aagaard, and Matt Knepley
+#
+#  Copyright (c) 2004-2007 Rensselaer Polytechnic Institute
+#
+#  Permission is hereby granted, free of charge, to any person obtaining
+#  a copy of this software and associated documentation files (the
+#  "Software"), to deal in the Software without restriction, including
+#  without limitation the rights to use, copy, modify, merge, publish,
+#  distribute, sublicense, and/or sell copies of the Software, and to
+#  permit persons to whom the Software is furnished to do so, subject to
+#  the following conditions:
+#
+#  The above copyright notice and this permission notice shall be
+#  included in all copies or substantial portions of the Software.
+#
+#  THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+#  EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+#  MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+#  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+#  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+#  OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+#  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+## @file pylith-0.8/pylith3d/pylith3d/MaterialModel/IsotropicPowerLawMaxwellViscoelasticZT.py
+
+## @brief Python PyLith-0.8 power-law viscoelastic model using Zienkiewicz & Taylor approach
+
+from pylith3d.MaterialModel.MaterialModel import MaterialModel
+
+class IsotropicPowerLawMaxwellViscoelasticZT(MaterialModel):
+    """
+    Python PyLith-0.8 material model consisting of a linear isotropic spring in series
+    with a power-law dashpot. Implementation follows approach of Zienkiewicz & Taylor.
+    """
+
+    def __init__(self):
+        MaterialModel.__init__(self)
+
+        import journal
+        self.trace = journal.debug("pylith3d.trace")
+        self.trace.log("Hello from IsotropicPowerLawMaxwellViscoelasticZT.__init__!")
+
+        self.materialModel = 9
+        self.numberProperties = 5
+        self.propertyDict = {'density': None,
+                             'youngsModulus': None,
+                             'poissonsRatio': None,
+                             'powerLawExponent': None,
+                             'viscosityCoefficient': None}
+        self.propertyPosition = ['density',
+                                 'youngsModulus',
+                                 'poissonsRatio',
+                                 'powerLawExponent',
+                                 'viscosityCoefficient']
+        self.propertyList = [0.0,
+                             0.0,
+                             0.0,
+                             0.0,
+                             0.0]
+        return
+
+# version
+# $Id: IsotropicPowerLawMaxwellViscoelasticZT.py,v 1.2 2004/08/12 16:49:07 willic3 Exp $
+
+# End of file 

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/MaterialModel.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/MaterialModel.py	2007-03-19 16:56:29 UTC (rev 6288)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/MaterialModel.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -28,12 +28,17 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #
 
+## @file pylith-0.8/pylith3d/pylith3d/MaterialModel/MaterialModel.py
 
+## @brief Python PyLith-0.8 base class for material models
+
 from pylith3d.KeywordValueParse import KeywordValueParse
 
 class MaterialModel:
+    """
+    Python PyLith-0.8 base class for material model definitions.
+    """
 
-
     def readprop(self,file):
 
         lineparse = KeywordValueParse()

Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/__init__.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/__init__.py	2007-03-19 16:56:29 UTC (rev 6288)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/pylith3d/MaterialModel/__init__.py	2007-03-19 16:59:47 UTC (rev 6289)
@@ -36,7 +36,7 @@
 	   "IsotropicLinearMaxwellViscoelastic",
 	   "IsotropicLinearMaxwellViscoelasticESF",
 	   "IsotropicPowerLawMaxwellViscoelastic",
-	   "IsotropicPowerLawMaxwellViscoelasticESF",
+	   "IsotropicPowerLawMaxwellViscoelasticZT",
 	   "IsotropicLinearGenMaxwellViscoelastic"]
 
 def copyright():



More information about the cig-commits mailing list