Bases: esys.escript.rheologies.PowerLaw, esys.escript.rheologies.Rheology, esys.escript.flows.StokesProblemCartesian
This class implements the rheology of an isotropic Kelvin material.
Typical usage:
sp = IncompressibleIsotropicFlowCartesian(domain, stress=0, v=0)
sp.initialize(...)
v,p = sp.solve()
Note : | This model has been used in the self-consistent plate-mantle model proposed in U{Hans-Bernd Muhlhaus<emailto:h.muhlhaus@uq.edu.au>} and U{Klaus Regenauer-Lieb<mailto:klaus.regenauer-lieb@csiro.au>}: I{Towards a self-consistent plate mantle model that includes elasticity: simple benchmarks and application to basic modes of convection}, see U{doi: 10.1111/j.1365-246X.2005.02742.x<http://www3.interscience.wiley.com/journal/118661486/abstract>} |
---|
returns inner product of element p and div(v)
Parameters: | v – a residual |
---|---|
Returns: | inner product of element p and div(v) |
Return type: | float |
Returns True if verbose is switched on
Returns: | value of verbosity flag |
---|---|
Return type: | bool |
Returns the absolute tolerance.
Returns: | absolute tolerance |
---|---|
Return type: | float |
returns the effective viscosity used in the last iteration step of the last time step.
return the value for v for a given p
Parameters: |
|
---|---|
Returns: | dv given as Adv=(f-Av-B^*p) |
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: | deviatoric strain of the current velocity field or if v is present the deviatoric strain of velocity v |
Return type: | Data of rank 2 |
Returns current deviatoric stress.
Returns: | current deviatoric stress |
---|---|
Return type: | Data of rank 2 |
returns the domain.
Returns: | the domain |
---|---|
Return type: | Domain |
returns the elastic shear modulus.
Returns: | elastic shear modulus |
---|
returns the effective viscosity eta_eff such that
tau=eta_eff * gamma_dot
by solving a non-linear problem for tau.
Parameters: |
|
---|---|
Returns: | effective viscosity. |
returns the viscosity
Parameters: | id (int) – if present, the viscosity for material id is returned. |
---|---|
Returns: | the list of the viscosities for all matrials is returned. If id is present only the viscosity for material id is returned. |
returns the relative tolerance for the effectice viscosity.
Returns: | relative tolerance |
---|---|
Return type: | positive float |
Returns the external force
Returns: | external force |
---|---|
Return type: | Data |
returns the friction coefficient
Returns: | friction coefficient |
---|
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: | second invariant of deviatoric strain |
Return type: | scalar Data |
returns the numebr of materials
Returns: | number of materials |
---|---|
Return type: | int |
returns the power in the power law
Parameters: | id (int) – if present, the power for material id is returned. |
---|---|
Returns: | the list of the powers for all matrials is returned. If id is present only the power for material id is returned. |
Returns current pressure.
Returns: | current stress |
---|---|
Return type: | scalar Data |
Returns the restoring force factor
@return: restoring force factor @rtype: C{float} or L{Data}
returns the solver options for solving the equation to project the divergence of the velocity onto the function space of presure.
Return type: | SolverOptions |
---|
returns the solver options used solve the equation for pressure. :rtype: SolverOptions
returns the solver options used solve the equation for velocity.
Return type: | SolverOptions |
---|
Returns current stress.
Returns: | current stress |
---|---|
Return type: | Data of rank 2 |
Returns the surface force
Returns: | surface force |
---|---|
Return type: | Data |
Returns current second invariant of deviatoric stress
Returns: | second invariant of deviatoric stress |
---|---|
Return type: | scalar Data |
returns the transition stress
Parameters: | id (int) – if present, the transition stress for material id is returned. |
---|---|
Returns: | the list of the transition stresses for all matrials is returned. If id is present only the transition stress for material id is returned. |
returns the yield stress
Returns: | the yield stress |
---|
Returns current time.
Returns: | current time |
---|---|
Return type: | float |
Returns the relative tolerance.
Returns: | relative tolerance |
---|---|
Return type: | float |
Returns current velocity.
Returns: | current velocity |
---|---|
Return type: | vector Data |
Returns the constraint for the velocity as a pair of the mask of the location of the constraint and the values.
Returns: | the locations of fixed velocity and value of velocities at these locations |
---|---|
Return type: | tuple of Data s |
sets external forces and velocity constraints
Parameters: |
|
---|---|
Note : | Only changing parameters need to be specified. |
Returns inner product of p0 and p1
Parameters: |
|
---|---|
Returns: | inner product of p0 and p1 |
Return type: | float |
returns inner product of element p and Bv=-div(v)
Parameters: |
|
---|---|
Returns: | inner product of element p and Bv=-div(v) |
Return type: | float |
Returns Bv (overwrite).
Return type: | equal to the type of p |
---|---|
Note : | boundary conditions on p should be zero! |
calculates the norm of p
Parameters: | p – a pressure |
---|---|
Returns: | the norm of p using the inner product for pressure |
Return type: | float |
returns the norm of v
Parameters: | v – a velovity |
---|---|
Returns: | norm of v |
Return type: | non-negative float |
sets a control parameter
Parameters: |
|
---|
Sets the absolute tolerance.
Parameters: | tolerance (non-negative float) – tolerance to be used |
---|
sets a control parameter
Parameters: |
|
---|
set deviatoric strain
Parameters: | D (Data of rank 2) – new deviatoric strain. If D is not present the current velocity is used. |
---|
Sets the current deviatoric stress
Parameters: | stress (Data of rank 2) – new deviatoric stress |
---|
Sets the parameters for the Drucker-Prager model.
Parameters: |
|
---|
Sets the elastic shear modulus.
Parameters: | mu – elastic shear modulus |
---|
sets the relative tolerance for the effectice viscosity.
Parameters: | rtol (positive float) – relative tolerance |
---|
sets external forces and velocity constraints
Parameters: |
|
---|---|
Note : | Only changing parameters need to be specified. |
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. |
---|
Sets the power-law parameters for material id
Parameters: |
|
---|
Sets the parameters of the power-law for all materials.
Parameters: |
|
---|
Sets current pressure. :param p: new deviatoric stress :type p: scalar Data
set the solver options for solving the equation to project the divergence of the velocity onto the function space of presure.
Parameters: | options (SolverOptions) – new solver options |
---|
set the solver options for solving the equation for pressure. :param options: new solver options :type options: SolverOptions
set the solver options for solving the equation for velocity.
Parameters: | options (SolverOptions) – new solver options |
---|
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
assigns new values to the model parameters.
Parameters: |
|
---|
Updates current time.
Parameters: | t (float) – new time mark |
---|
Sets the relative tolerance for (v,p).
Parameters: | tolerance (non-negative float) – tolerance to be used |
---|
Sets current velocity.
Parameters: | v (vector Data) – new current velocity |
---|
Solves the saddle point problem using initial guesses v and p.
Parameters: |
|
---|---|
Return type: | tuple of Data objects |
Note : | typically this method is overwritten by a subclass. It provides a wrapper for the _solve method. |
Solves Av=B^*p with accuracy tol
Parameters: | p – a pressure increment |
---|---|
Returns: | the solution of Av=B^*p |
Note : | boundary conditions on v should be zero! |
applies preconditioner for for BA^{-1}B^* to Bv with accuracy self.getSubProblemTolerance()
Parameters: | Bv – velocity increment |
---|---|
Returns: | p=P(Bv) where P^{-1} is an approximation of BA^{-1}B^ * ) |
Note : | boundary conditions on p are zero. |
Updates stress, velocity and pressure for time increment dt.
Parameters: |
|
---|
updates the underlying Stokes equation to consider dependencies from v and p
checks if a given material id is valid
Parameters: | id (int) – a material id |
---|---|
Returns: | True is the id is valid |
Return type: | bool |
Bases: esys.escript.pdetools.SolverSchemeException
Exception thrown if the maximum number of iteration steps is reached.
Bases: object
this implements the power law for a composition of a set of materials where the viscosity eta of each material is given by a power law relationship of the form
eta=eta_N*(tau/tau_t)**(1./power-1.)
where tau is equivalent stress and eta_N, tau_t and power are given constant. Moreover an elastic component can be considered. Moreover tau meets the Drucker-Prager type yield condition
tau <= tau_Y + friction * pressure
where gamma_dot is the equivalent.
returns the elastic shear modulus.
Returns: | elastic shear modulus |
---|
returns the effective viscosity eta_eff such that
tau=eta_eff * gamma_dot
by solving a non-linear problem for tau.
Parameters: |
|
---|---|
Returns: | effective viscosity. |
returns the viscosity
Parameters: | id (int) – if present, the viscosity for material id is returned. |
---|---|
Returns: | the list of the viscosities for all matrials is returned. If id is present only the viscosity for material id is returned. |
returns the relative tolerance for the effectice viscosity.
Returns: | relative tolerance |
---|---|
Return type: | positive float |
returns the friction coefficient
Returns: | friction coefficient |
---|
returns the numebr of materials
Returns: | number of materials |
---|---|
Return type: | int |
returns the power in the power law
Parameters: | id (int) – if present, the power for material id is returned. |
---|---|
Returns: | the list of the powers for all matrials is returned. If id is present only the power for material id is returned. |
returns the transition stress
Parameters: | id (int) – if present, the transition stress for material id is returned. |
---|---|
Returns: | the list of the transition stresses for all matrials is returned. If id is present only the transition stress for material id is returned. |
returns the yield stress
Returns: | the yield stress |
---|
Sets the parameters for the Drucker-Prager model.
Parameters: |
|
---|
Sets the elastic shear modulus.
Parameters: | mu – elastic shear modulus |
---|
sets the relative tolerance for the effectice viscosity.
Parameters: | rtol (positive float) – relative tolerance |
---|
Sets the power-law parameters for material id
Parameters: |
|
---|
Sets the parameters of the power-law for all materials.
Parameters: |
|
---|
checks if a given material id is valid
Parameters: | id (int) – a material id |
---|---|
Returns: | True is the id is valid |
Return type: | bool |
Bases: object
General framework to implement a rheology
Returns True if verbose is switched on
Returns: | value of verbosity flag |
---|---|
Return type: | bool |
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: | deviatoric strain of the current velocity field or if v is present the deviatoric strain of velocity v |
Return type: | Data of rank 2 |
Returns current deviatoric stress.
Returns: | current deviatoric stress |
---|---|
Return type: | Data of rank 2 |
returns the domain.
Returns: | the domain |
---|---|
Return type: | Domain |
Returns the external force
Returns: | external force |
---|---|
Return type: | Data |
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: | second invariant of deviatoric strain |
Return type: | scalar Data |
Returns current pressure.
Returns: | current stress |
---|---|
Return type: | scalar Data |
Returns the restoring force factor
@return: restoring force factor @rtype: C{float} or L{Data}
Returns current stress.
Returns: | current stress |
---|---|
Return type: | Data of rank 2 |
Returns the surface force
Returns: | surface force |
---|---|
Return type: | Data |
Returns current second invariant of deviatoric stress
Returns: | second invariant of deviatoric stress |
---|---|
Return type: | scalar Data |
Returns current time.
Returns: | current time |
---|---|
Return type: | float |
Returns current velocity.
Returns: | current velocity |
---|---|
Return type: | vector Data |
Returns the constraint for the velocity as a pair of the mask of the location of the constraint and the values.
Returns: | the locations of fixed velocity and value of velocities at these locations |
---|---|
Return type: | tuple of Data s |
set deviatoric strain
Parameters: | D (Data of rank 2) – new deviatoric strain. If D is not present the current velocity is used. |
---|
Sets the current deviatoric stress
Parameters: | stress (Data of rank 2) – new deviatoric stress |
---|
sets external forces and velocity constraints
Parameters: |
|
---|---|
Note : | Only changing parameters need to be specified. |
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. |
---|
Sets current pressure. :param p: new deviatoric stress :type p: scalar Data
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
Updates current time.
Parameters: | t (float) – new time mark |
---|
Sets current velocity.
Parameters: | v (vector Data) – new current velocity |
---|
Bases: esys.escript.pdetools.HomogeneousSaddlePointProblem
solves
- -(eta*(u_{i,j}+u_{j,i}))_j + p_i = f_i-stress_{ij,j}
- u_{i,i}=0
u=0 where fixed_u_mask>0 eta*(u_{i,j}+u_{j,i})*n_j-p*n_i=surface_stress +stress_{ij}n_j
if surface_stress is not given 0 is assumed.
typical usage:
sp=StokesProblemCartesian(domain) sp.setTolerance() sp.initialize(...) v,p=sp.solve(v0,p0) sp.setStokesEquation(...) # new values for some parameters v1,p1=sp.solve(v,p)
returns inner product of element p and div(v)
Parameters: | v – a residual |
---|---|
Returns: | inner product of element p and div(v) |
Return type: | float |
Returns the absolute tolerance.
Returns: | absolute tolerance |
---|---|
Return type: | float |
return the value for v for a given p
Parameters: |
|
---|---|
Returns: | dv given as Adv=(f-Av-B^*p) |
returns the solver options for solving the equation to project the divergence of the velocity onto the function space of presure.
Return type: | SolverOptions |
---|
returns the solver options used solve the equation for pressure. :rtype: SolverOptions
returns the solver options used solve the equation for velocity.
Return type: | SolverOptions |
---|
Returns the relative tolerance.
Returns: | relative tolerance |
---|---|
Return type: | float |
assigns values to the model parameters
Parameters: |
|
---|
Returns inner product of p0 and p1
Parameters: |
|
---|---|
Returns: | inner product of p0 and p1 |
Return type: | float |
returns inner product of element p and Bv=-div(v)
Parameters: |
|
---|---|
Returns: | inner product of element p and Bv=-div(v) |
Return type: | float |
Returns Bv (overwrite).
Return type: | equal to the type of p |
---|---|
Note : | boundary conditions on p should be zero! |
calculates the norm of p
Parameters: | p – a pressure |
---|---|
Returns: | the norm of p using the inner product for pressure |
Return type: | float |
returns the norm of v
Parameters: | v – a velovity |
---|---|
Returns: | norm of v |
Return type: | non-negative float |
sets a control parameter
Parameters: |
|
---|
Sets the absolute tolerance.
Parameters: | tolerance (non-negative float) – tolerance to be used |
---|
sets a control parameter
Parameters: |
|
---|
set the solver options for solving the equation to project the divergence of the velocity onto the function space of presure.
Parameters: | options (SolverOptions) – new solver options |
---|
set the solver options for solving the equation for pressure. :param options: new solver options :type options: SolverOptions
set the solver options for solving the equation for velocity.
Parameters: | options (SolverOptions) – new solver options |
---|
assigns new values to the model parameters.
Parameters: |
|
---|
Sets the relative tolerance for (v,p).
Parameters: | tolerance (non-negative float) – tolerance to be used |
---|
Solves the saddle point problem using initial guesses v and p.
Parameters: |
|
---|---|
Return type: | tuple of Data objects |
Note : | typically this method is overwritten by a subclass. It provides a wrapper for the _solve method. |
Solves Av=B^*p with accuracy tol
Parameters: | p – a pressure increment |
---|---|
Returns: | the solution of Av=B^*p |
Note : | boundary conditions on v should be zero! |
applies preconditioner for for BA^{-1}B^* to Bv with accuracy self.getSubProblemTolerance()
Parameters: | Bv – velocity increment |
---|---|
Returns: | p=P(Bv) where P^{-1} is an approximation of BA^{-1}B^ * ) |
Note : | boundary conditions on p are zero. |
updates the Stokes equation to consider dependencies from v and p :note: This method can be overwritten by a subclass. Use setStokesEquation to set new values to model parameters.