<div dir="ltr">Hi Jed,<div><br></div><div>I modified the ex43 code to enforce no-slip BCs on all boundaries. </div><div>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). </div>
<div>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?</div><div><br></div>
<div>Thank you.</div><div><br></div><div>Sang</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 2:38 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">Sang pham van <<a href="mailto:pvsang002@gmail.com">pvsang002@gmail.com</a>> writes:<br>
<br>
> Hi Dave,<br>
> I guess you are the one contributed the ex42 in KSP's examples. I want to<br>
> modify the example to solve for stokes flow driven by volume force in 3D<br>
> duct. Please help me to understand the code by answering the following<br>
> questions:<br>
><br>
> 1. Firstly, just for confirmation, the equations you're solving are:<br>
> \nu * \nabla \cdot \nabla U - \nabla P = 0 and<br>
<br>
</div>For variable viscosity, it must be formulated as in the example:<br>
<br>
\nabla\cdot (\nu D U) - \nabla P = 0<br>
<br>
where D U = (\nabla U + (\nabla U)^T)/2<br>
<div class=""><br>
> \nabla \cdot U = 0<br>
><br>
> where U = (Ux,Uy,Uz), \nu is variable viscosity?<br>
><br>
> 2. Are U and P defined at all nodes? (I googled the Q1Q1 element, it looks<br>
> like a box element with U and P defined at 8 corners).<br>
<br>
</div>Yes.<br>
<div class=""><br>
> 3. Are nodes' coordinate defined though the DA coordinates?<br>
<br>
</div>Yes, though they are set to be uniform.<br>
<div class=""><br>
> 4. How can I enforce noslip BC, and where should I plug in volume force?<br>
<br>
</div>Enforce the Dirichlet condition for the entire node.<br>
</blockquote></div><br></div>