On Thu, Aug 13, 2009 at 2:02 AM, Stephen Wornom <span dir="ltr"><<a href="mailto:stephen.wornom@sophia.inria.fr">stephen.wornom@sophia.inria.fr</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Matthew Knepley wrote:<div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, Aug 12, 2009 at 10:39 AM, Stephen Wornom <<a href="mailto:stephen.wornom@sophia.inria.fr" target="_blank">stephen.wornom@sophia.inria.fr</a> <mailto:<a href="mailto:stephen.wornom@sophia.inria.fr" target="_blank">stephen.wornom@sophia.inria.fr</a>>> wrote:<br>
<br>
Matthew Knepley wrote:<br>
<br>
1) You should really handle this by creating the constant<br>
vector on the pressure<br>
space and using MatNullSpaceCreate()<br>
<br>
2) You can also easily handle this by fixing the pressure at<br>
one point<br>
<br>
At what indices or location does one fix the pressure? What value<br>
is it set. Usually pressure is part of the solution. It would seem<br>
to introduce an inconsistency.<br>
I would like to understand how to do it.<br>
<br>
<br>
It does not matter where you fix it or to what value. The absolute value of the pressure is not physically<br>
relevant, only pressure differences (which is why only grad p appears).<br>
</blockquote></div>
Thanks for clarification on this point which is confusing to many of us. So why is it necessary to fix a value at a point since as you point out that only the grad p appears? If the pressure is not set in the numerical eqns, will you agree that the initial pressure sets the value for the numerical pressure at least in time accurate solutions.<br>
</blockquote><div><br>No! This is the fundamental mathematical difference between compressible and incompressible flow (see article by Weinan E). In compressible flow, pressure is a true dynamical<br>variable, and this is why we need an equation of state to close the system. In incompressible flow, pressure is merely the Lagrange multiplier that enforces the divergence-free<br>
constraint. It is not a dynamical variable, and does not have initial conditions.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Fixing the pressure at any point<br>
to any value just sets the scale. There is no inconsistency. This is in many many elementary fluid mechanics<br>
books.<br>
</blockquote></div>
Pass along a reference for myself and students.</blockquote><div><br>There is a nice review of incompressible flow by Stefan Turek which goes over every solution method I have seen.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks again,<br>
Stephen<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
<br>
To do this mechanically. Change one row in the operator div (from the div u = 0 equation) to the identity.<br>
<br>
Matt<br>
<br>
<br>
Stephen<br>
<br>
<br>
Matt<br>
<br>
<br>
On Wed, Aug 12, 2009 at 10:19 AM, William A. Perkins<br>
<<a href="mailto:william.perkins@pnl.gov" target="_blank">william.perkins@pnl.gov</a> <mailto:<a href="mailto:william.perkins@pnl.gov" target="_blank">william.perkins@pnl.gov</a>><br>
<mailto:<a href="mailto:william.perkins@pnl.gov" target="_blank">william.perkins@pnl.gov</a><br>
<mailto:<a href="mailto:william.perkins@pnl.gov" target="_blank">william.perkins@pnl.gov</a>>>> wrote:<br>
<br>
<br>
Stephen,<br>
<br>
There are two ways that I know of to deal with pressure checker<br>
boarding: staggered grids or some form of Rhie-Chow<br>
interpolation.<br>
IMO, these are simple only for uniform, Cartesian grids.<br>
For grids<br>
that are curvilinear, unstructured, non-uniform, and/or<br>
non-orthogonal, things get real complicated. There may be other<br>
methods, but something is required.<br>
<br>
Regarding boundary conditions, I would suggest this text book:<br>
<br>
H. K. Versteeg and W. Malalasekera. An Introduction to<br>
Computational Fluid Dynamics, the Finite Volume Method. 2nd<br>
edition. Prentice-Hall. 2007<br>
<br>
While this book uses the finite volume method, the<br>
explanation of<br>
boundary conditions and staggered grids is very good and<br>
relatively<br>
easy to interpret for finite difference. I would also<br>
recommend<br>
<br>
Joel H. Ferziger and Milovan Peric. Computational<br>
Methods for<br>
Fluid Dynamics. Springer-Verlag, 3rd edition, 2002.<br>
<br>
This is a little more general with regard to method<br>
discussing finite<br>
difference and finite volume, but still settling on finite<br>
volume.<br>
<br>
My $0.02: I question the use of finite difference. For<br>
Navier-Stokes,<br>
the use of finite volume is much more prevalent in<br>
commercial and<br>
research codes. If your student follows Versteeg and<br>
Malalasekera a<br>
simple, working, staggered grid FV code could be built in a<br>
very short<br>
time. If something more complicated is needed, it's probably<br>
explained in Ferziger and Peric.<br>
<br>
Also My $0.02: Unless the point of your student's work is to<br>
experience building her own code, why not download<br>
something like<br>
OpenFOAM (<a href="http://www.opencfd.co.uk/openfoam/" target="_blank">http://www.opencfd.co.uk/openfoam/</a>) and just use<br>
it? I<br>
expect the effort to learn something like OpenFOAM for a simple<br>
application will be much less than writing a new code.<br>
<br>
Hope this helps.<br>
<br>
Bill<br>
<br>
>>>>> "Stephen" == Stephen Wornom<br>
<<a href="mailto:stephen.wornom@sophia.inria.fr" target="_blank">stephen.wornom@sophia.inria.fr</a><br>
<mailto:<a href="mailto:stephen.wornom@sophia.inria.fr" target="_blank">stephen.wornom@sophia.inria.fr</a>><br>
<mailto:<a href="mailto:stephen.wornom@sophia.inria.fr" target="_blank">stephen.wornom@sophia.inria.fr</a><br>
<mailto:<a href="mailto:stephen.wornom@sophia.inria.fr" target="_blank">stephen.wornom@sophia.inria.fr</a>>>> writes:<br>
<br>
Stephen> Shengyong wrote:<br>
>> Hi, Farshid<br>
>><br>
>> Maybe she should use the staggered grid method which<br>
is very<br>
simple to<br>
>> implement.<br>
Stephen> Does it remain simple for curvilinear meshes?<br>
Stephen> Stephen<br>
>><br>
>> On Tue, Aug 11, 2009 at 5:16 AM, Farshid Mossaiby<br>
<<a href="mailto:mossaiby@yahoo.com" target="_blank">mossaiby@yahoo.com</a> <mailto:<a href="mailto:mossaiby@yahoo.com" target="_blank">mossaiby@yahoo.com</a>><br>
<mailto:<a href="mailto:mossaiby@yahoo.com" target="_blank">mossaiby@yahoo.com</a> <mailto:<a href="mailto:mossaiby@yahoo.com" target="_blank">mossaiby@yahoo.com</a>>><br>
>> <mailto:<a href="mailto:mossaiby@yahoo.com" target="_blank">mossaiby@yahoo.com</a><br>
<mailto:<a href="mailto:mossaiby@yahoo.com" target="_blank">mossaiby@yahoo.com</a>> <mailto:<a href="mailto:mossaiby@yahoo.com" target="_blank">mossaiby@yahoo.com</a><br>
<mailto:<a href="mailto:mossaiby@yahoo.com" target="_blank">mossaiby@yahoo.com</a>>>>> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> Sorry for this off-topic post.<br>
>><br>
>> I am helping a master studnet which is working on solving<br>
>> Navier-Stokes equation with Finite Difference method.<br>
She is<br>
>> trying to eliminate spourious pressure modes from the<br>
solution.<br>
>> She needs to know some details that are not usually<br>
found in the<br>
>> papers but important when programming, e.g. boundary<br>
condition for<br>
>> pressure. If someone has expertise on this or know a<br>
*simple* FD<br>
>> code, I would be thankful to let me know.<br>
>><br>
>> Best regards,<br>
>> Farshid Mossaiby<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Pang Shengyong<br>
>> Solidification Simulation Lab,<br>
>> State Key Lab of Mould & Die Technology,<br>
>> Huazhong Univ. of Sci. & Tech. China<br>
<br>
<br>
--<br>
Bill Perkins<br>
Research Engineer<br>
Hydrology Group<br>
<br>
Pacific Northwest National Laboratory<br>
902 Battelle Boulevard<br>
P.O. Box 999, MSIN K9-36<br>
Richland, WA 99352 USA<br>
Tel: 509-372-6131<br>
Fax: 509-372-6089<br>
<a href="mailto:william.perkins@pnl.gov" target="_blank">william.perkins@pnl.gov</a> <mailto:<a href="mailto:william.perkins@pnl.gov" target="_blank">william.perkins@pnl.gov</a>><br></div></div>
<mailto:<a href="mailto:william.perkins@pnl.gov" target="_blank">william.perkins@pnl.gov</a> <mailto:<a href="mailto:william.perkins@pnl.gov" target="_blank">william.perkins@pnl.gov</a>>><br>
<a href="http://www.pnl.gov" target="_blank">www.pnl.gov</a> <<a href="http://www.pnl.gov" target="_blank">http://www.pnl.gov</a>> <<a href="http://www.pnl.gov" target="_blank">http://www.pnl.gov</a>><div class="im">
<br>
<br>
<br>
<br>
<br>
<br>
-- What most experimenters take for granted before they begin<br>
their experiments is infinitely more interesting than any<br>
results to which their experiments lead.<br>
-- Norbert Wiener<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>