[petsc-users] ex42 question

Jed Brown jed at jedbrown.org
Wed Mar 26 13:38:27 CDT 2014


Sang pham van <pvsang002 at gmail.com> writes:

> Hi Dave,
> I guess you are the one contributed the ex42 in KSP's examples. I want to
> modify the example to solve for stokes flow driven by volume force in 3D
> duct. Please help me to understand the code by answering the following
> questions:
>
> 1. Firstly, just for confirmation, the equations you're solving are:
>      \nu * \nabla \cdot \nabla U - \nabla P = 0 and

For variable viscosity, it must be formulated as in the example:

  \nabla\cdot (\nu D U) - \nabla P = 0

  where  D U = (\nabla U + (\nabla U)^T)/2

>      \nabla \cdot U = 0
>
>       where U = (Ux,Uy,Uz), \nu is variable viscosity?
>
>  2. Are U and P defined at all nodes? (I googled the Q1Q1 element, it looks
> like a box element with U and P defined at 8 corners).

Yes.

>  3. Are nodes' coordinate defined though the DA coordinates?

Yes, though they are set to be uniform.

>  4. How can I enforce noslip BC, and where should I plug in volume force?

Enforce the Dirichlet condition for the entire node.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140326/4cfb1251/attachment.pgp>


More information about the petsc-users mailing list