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)
Returns deviatoric strain of current velocity.
Data of rank 2
getDeviatoricStress(self)
Returns current deviatoric stress.
Domain
getDomain(self)
returns the domain.
float
getFlowTolerance(self)
Returns the relative tolerance for the flow solver
Data
getForce(self)
Returns the external force
scalar Data
getGammaDot(self)
Returns current second invariant of deviatoric strain
scalar Data
getPressure(self)
Returns current pressure.
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.
positive float
getTolerance(self)
Returns the set tolerance for terminate the iteration on a time step.
vector Data
getVelocity(self)
Returns current velocity.
tuple of Datas
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)
sets external forces and velocity constraints
 
setFlowTolerance(self, tol=0.0001)
Sets the relative tolerance for the flow solver
 
setPressure(self, p)
Sets current pressure.
 
setTime(self, t=0.0)
Updates current time.
 
setTolerance(self, tol=0.0001)
Sets the tolerance used to terminate the iteration on a time step.
 
setVelocity(self, v)
Sets current velocity.

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

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 - 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)

 

Returns deviatoric strain of current velocity.

Returns: Data of rank 2
deviatoric strain

getDeviatoricStress(self)

 

Returns current deviatoric stress.

Returns: Data of rank 2
current deviatoric stress

getDomain(self)

 

returns the domain.

Returns: Domain
the domain

getFlowTolerance(self)

 

Returns the relative tolerance for the flow solver

Returns: float
tolerance of the flow solver

Note: Typically this method is overwritten by a subclass.

getForce(self)

 

Returns the external force

Returns: Data
external force

getGammaDot(self)

 

Returns current second invariant of deviatoric strain

Returns: scalar Data
second invariant of deviatoric strain

getPressure(self)

 

Returns current pressure.

Returns: scalar Data
current stress

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 Datas
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)

 

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

Note: Only changing parameters need to be specified.

setFlowTolerance(self, tol=0.0001)

 

Sets the relative tolerance for the flow solver

Parameters:
  • tol (positive float) - desired relative tolerance for the flow solver

Note: Typically this method is overwritten by a subclass.

setPressure(self, p)

 

Sets current pressure.

Parameters:
  • p (scalar Data) - new deviatoric stress

setTime(self, t=0.0)

 

Updates current time.

Parameters:
  • t (float) - new time mark

setTolerance(self, tol=0.0001)

 

Sets the tolerance used to terminate the iteration on a time step. See the implementation of the rheology for details.

Parameters:
  • tol (positive float) - relative tolerance to terminate iteration on time step.

setVelocity(self, v)

 

Sets current velocity.

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