/[escript]/trunk/modellib/py_src/crustal/setups.py
ViewVC logotype

Diff of /trunk/modellib/py_src/crustal/setups.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 999 by gross, Mon Feb 26 07:09:37 2007 UTC revision 1000 by gross, Wed Feb 28 00:34:42 2007 UTC
# Line 18  __url__="http://www.iservo.edu.au/esys/e Line 18  __url__="http://www.iservo.edu.au/esys/e
18  __version__="$Revision$"  __version__="$Revision$"
19  __date__="$Date$"  __date__="$Date$"
20    
21  from esys.escript.modelframe import Model  from esys.escript.modelframe import Model, ParameterSet
22  from esys.escript import *  from esys.escript import *
23  from esys.escript.linearPDEs import LinearPDE  from esys.escript.linearPDEs import LinearPDE
24  from mines import parse  from mines import parse
25    import numarray
26    
27  class MiningHistory(Model):  class MiningHistory(Model):
28      """      """
# Line 204  class LinearElasticStressChange(Model): Line 205  class LinearElasticStressChange(Model):
205          self.__displacement=self.displacement          self.__displacement=self.displacement
206          self.trace("displacement range : %s: %s"%(inf(self.displacement[2]),sup(self.displacement[2])))          self.trace("displacement range : %s: %s"%(inf(self.displacement[2]),sup(self.displacement[2])))
207          self.trace("stress range : %s: %s"%(inf(self.stress),sup(self.stress)))          self.trace("stress range : %s: %s"%(inf(self.stress),sup(self.stress)))
208    
209    class CoulombFailureStress(ParameterSet):
210        """
211        calculates the Coulomb failure stress an planes of a given orientation.
212    
213        @ivar domain: mining region
214        @type domain: L{Domian}
215        @ivar tag_map: a tagmap
216        @type tag_map: L{TagMap}
217        @ivar displacement: displacement field
218        @type displacement: L{Vector} or C{None}
219        @ivar stress: displacement field
220        @type stress: L{Vector}  or C{None}
221        @ivar density: initial density distribution
222        @type density: C{float} or L{Scalar}
223        @ivar density_rate: density rate by tag (may be changed of time)
224        @type density_rate:  C{dict}
225        @ivar lame_lambda: elasticity coefficient lambda (assumed to be constant over time)
226        @type lame_lambda: C{float} or L{Scalar}
227        @ivar lame_mu: elasticity coefficient mu (assumed to be constant over time)
228        @type lame_mu: C{float} or L{Scalar}
229        @ivar location_of_fixed_displacement: mask of locations and component with zero displacements
230        @type location_of_fixed_displacement: L{Vector} or C{None}
231        """
232        def __init__(self,**kwargs):
233            """
234            """
235            super(CoulombFailureStress,self).__init__(**kwargs)
236            self.declareParameter(stress=numarray.zeros((3,3)),
237                                  friction_coefficient=0.,
238                                  normal=numarray.array([1.,0.,0.]))
239        def cfs(self):
240            """
241            returns  Coulomb failure stress
242            """
243            sn=matrixmult(self.stress,self.normal)
244            nsn=inner(self.normal,sn)
245            nssn=inner(sn,sn)
246            return (sqrt(nssn-nsn**2)-self.friction_coefficient*nsn)/length(self.normal)
247    

Legend:
Removed from v.999  
changed lines
  Added in v.1000

  ViewVC Help
Powered by ViewVC 1.1.26