[petsc-users] ex42 question
Sang pham van
pvsang002 at gmail.com
Wed Apr 16 16:48:38 CDT 2014
Hi Jed,
I modified the ex43 code to enforce no-slip BCs on all boundaries.
I run the code with volume force (0,-1) and isoviscosity. The expected
result is Vx = Vy = 0 everywhere, and linearly decreasing pressure (from to
to bottom).
In the attached is plot of velocity field and pressure, so there is still a
(light) flow in middle of the domain. Do you know why the solution is that,
and what should I do to get the expected result?
Thank you.
Sang
On Wed, Mar 26, 2014 at 2:38 PM, Jed Brown <jed at jedbrown.org> wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140416/876645a9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex43_result.png
Type: image/png
Size: 119323 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140416/876645a9/attachment-0001.png>
More information about the petsc-users
mailing list