Bases: object
solves the problem
u_i+k_{ij}*p_{,j} = g_i u_{i,i} = f
where p represents the pressure and u the Darcy flux. k represents the permeability,
Variables: |
|
---|
returns the flux for a given pressure p where the flux is equal to u0 on locations where location_of_fixed_flux is positive (see setValue). Notice that g is used, see setValue.
Parameters: |
|
---|---|
Returns: | flux |
Return type: | escript.Data |
Returns the solver options used to solve the flux problems :return: SolverOptions
Returns the solver options used to solve the pressure problems :return: SolverOptions
Sets the solver options used to solve the flux problems If options is not present, the options are reset to default :param options: SolverOptions
Sets the solver options used to solve the pressure problems If options is not present, the options are reset to default
Parameters: | options – SolverOptions |
---|---|
Note : | if the adaption of subtolerance is choosen, the tolerance set by options will be overwritten before the solver is called. |
assigns values to model parameters
Parameters: |
|
---|---|
Note : | the values of parameters which are not set by calling setValue are not altered. |
Note : | at any point on the boundary of the domain the pressure (location_of_fixed_pressure >0) or the normal component of the flux (location_of_fixed_flux[i]>0) if direction of the normal is along the x_i axis. |
solves the problem.
Parameters: |
|
---|---|
Returns: | flux and pressure |
Return type: | tuple of escript.Data. |
Bases: esys.escriptcore.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.