Package esys :: Package escript :: Module rheologies :: Class Rheology
[hide private]
[frames] | no frames]

Class Rheology

object --+
         |
        Rheology
Known Subclasses:

General framework to implement a rheology
Instance Methods [hide private]
 
__init__(self, domain, stress=None, v=None, p=None, t=0, verbose=True)
Initializes the rheology
bool
checkVerbose(self)
Returns True if verbose is switched on
Data of rank 2
getDeviatoricStrain(self, v=None)
Returns deviatoric strain of current velocity or if v is present the deviatoric strain of velocity v:
Data of rank 2
getDeviatoricStress(self)
Returns current deviatoric stress.
Domain
getDomain(self)
returns the domain.
Data
getForce(self)
Returns the external force
scalar Data
getGammaDot(self, D=None)
Returns current second invariant of deviatoric strain rate or if D is present the second invariant of D.
scalar Data
getPressure(self)
Returns current pressure.
 
getRestorationFactor(self)
Returns the restoring force factor
Data of rank 2
getStress(self)
Returns current stress.
Data
getSurfaceForce(self)
Returns the surface force
scalar Data
getTau(self)
Returns current second invariant of deviatoric stress
float
getTime(self)
Returns current time.
vector Data
getVelocity(self)
Returns current velocity.
tuple of Data s
getVelocityConstraint(self)
Returns the constraint for the velocity as a pair of the mask of the location of the constraint and the values.
 
setDeviatoricStrain(self, D=None)
set deviatoric strain
 
setDeviatoricStress(self, stress)
Sets the current deviatoric stress
 
setExternals(self, F=None, f=None, fixed_v_mask=None, v_boundary=None, restoration_factor=None)
sets external forces and velocity constraints
 
setGammaDot(self, gammadot=None)
set the second invariant of deviatoric strain rate.
 
setPressure(self, p)
Sets current pressure.
 
setStatus(self, t, v, p, stress)
Resets the current status given by pressure p and velocity v.
 
setTime(self, t=0.0)
Updates current time.
 
setVelocity(self, v)
Sets current velocity.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, domain, stress=None, v=None, p=None, t=0, verbose=True)
(Constructor)

 
Initializes the rheology
Parameters:
  • domain (Domain) - problem domain
  • stress (a tensor value/field of order 2) - initial (deviatoric) stress
  • v (a vector value/field) - initial velocity field
  • p (a scalar value/field) - initial pressure
  • t (float) - initial time
Overrides: object.__init__

checkVerbose(self)

 
Returns True if verbose is switched on
Returns: bool
value of verbosity flag

getDeviatoricStrain(self, v=None)

 
Returns deviatoric strain of current velocity or if v is present the deviatoric strain of velocity v:
Parameters:
  • v (Data of rank 1) - a velocity field
Returns: Data of rank 2
deviatoric strain of the current velocity field or if v is present the deviatoric strain of velocity v

getDeviatoricStress(self)

 
Returns current deviatoric stress.
Returns: Data of rank 2
current deviatoric stress

getDomain(self)

 
returns the domain.
Returns: Domain
the domain

getForce(self)

 
Returns the external force
Returns: Data
external force

getGammaDot(self, D=None)

 
Returns current second invariant of deviatoric strain rate or if D is present the second invariant of D.
Parameters:
  • D (Data of rank 0) - deviatoric strain rate tensor
Returns: scalar Data
second invariant of deviatoric strain

getPressure(self)

 
Returns current pressure.
Returns: scalar Data
current stress

getRestorationFactor(self)

 

Returns the restoring force factor

@return: restoring force factor @rtype: C{float} or L{Data}

getStress(self)

 
Returns current stress.
Returns: Data of rank 2
current stress

getSurfaceForce(self)

 
Returns the surface force
Returns: Data
surface force

getTau(self)

 
Returns current second invariant of deviatoric stress
Returns: scalar Data
second invariant of deviatoric stress

getTime(self)

 
Returns current time.
Returns: float
current time

getVelocity(self)

 
Returns current velocity.
Returns: vector Data
current velocity

getVelocityConstraint(self)

 
Returns the constraint for the velocity as a pair of the mask of the location of the constraint and the values.
Returns: tuple of Data s
the locations of fixed velocity and value of velocities at these locations

setDeviatoricStrain(self, D=None)

 
set deviatoric strain
Parameters:
  • D (Data of rank 2) - new deviatoric strain. If D is not present the current velocity is used.

setDeviatoricStress(self, stress)

 
Sets the current deviatoric stress
Parameters:
  • stress (Data of rank 2) - new deviatoric stress

setExternals(self, F=None, f=None, fixed_v_mask=None, v_boundary=None, restoration_factor=None)

 
sets external forces and velocity constraints
Parameters:
  • F (vector value/field) - external force
  • f (vector value/field on boundary) - surface force
  • fixed_v_mask (vector value/field) - location of constraints maked by positive values
  • v_boundary (vector value/field) - value of velocity at location of constraints
  • restoration_factor (scalar values/field) - factor for normal restoration force

Note: Only changing parameters need to be specified.

setGammaDot(self, gammadot=None)

 
set the second invariant of deviatoric strain rate. If gammadot is not present zero is used.
Parameters:
  • gammadot (Data of rank 1) - second invariant of deviatoric strain rate.

setPressure(self, p)

 
Sets current pressure. :param p: new deviatoric stress :type p: scalar Data

setStatus(self, t, v, p, stress)

 

Resets the current status given by pressure p and velocity v.

@param t: new time mark @type t: C{float} @param v: new current velocity @type v: vector L{Data} @param p: new deviatoric stress @type p: scalar L{Data} @param stress: new deviatoric stress @type stress: L{Data} of rank 2

setTime(self, t=0.0)

 
Updates current time.
Parameters:
  • t (float) - new time mark

setVelocity(self, v)

 
Sets current velocity.
Parameters:
  • v (vector Data) - new current velocity