📄 cfd recipes chapter 22.mht
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject: CFD Recipes: Chapter 22
Date: Fri, 18 Jul 2003 17:29:36 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_NextPart_000_005A_01C34D52.2903FC90";
type="text/html"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
This is a multi-part message in MIME format.
------=_NextPart_000_005A_01C34D52.2903FC90
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://capella.colorado.edu/~laney/ch22code.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>CFD Recipes: Chapter 22</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"Free CFD Software" name=3DDESCRIPTION>
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY text=3D#ffffff vLink=3D#cc9999 aLink=3D#ffcccc link=3D#999999 =
bgColor=3D#006666>
<DIV align=3Dcenter><IMG height=3D42 alt=3D"Cambridge University Press"=20
src=3D"http://capella.colorado.edu/~laney/graphics/cup.gif" width=3D189> =
<BR><IMG=20
height=3D79 alt=3D"Computational Gasdynamics"=20
src=3D"http://capella.colorado.edu/~laney/graphics/title.gif" =
width=3D537>=20
<BR></DIV>
<TABLE cellSpacing=3D0 cellPadding=3D10 width=3D"100%" border=3D0>
<TBODY>
<TR>
<TD vAlign=3Dtop align=3Dright><FONT size=3D+0><A=20
href=3D"http://capella.colorado.edu/~laney/home.htm">Home</A>=20
<P><A=20
=
href=3D"http://capella.colorado.edu/~laney/description.htm">Description</=
A>=20
<P><A href=3D"http://capella.colorado.edu/~laney/faq.htm">FAQ</A>=20
<P><A href=3D"http://capella.colorado.edu/~laney/toc.htm">Table of =
Contents</A>=20
<P><A =
href=3D"http://capella.colorado.edu/~laney/index.htm">Index</A>=20
<P><A =
href=3D"http://capella.colorado.edu/~laney/reviews.htm">Reviews</A>=20
<P><A =
href=3D"http://capella.colorado.edu/~laney/software.htm">Software</A>=20
<P><A =
href=3D"http://capella.colorado.edu/~laney/hwsolns.htm">Solutions to=20
Problems</A>=20
<P><A =
href=3D"http://capella.colorado.edu/~laney/additional.htm">Additional=20
Material</A>=20
<P><A =
href=3D"http://capella.colorado.edu/~laney/errata.htm">Errata </A>
<P><A =
href=3D"http://capella.colorado.edu/~laney/cover.htm">Cover</A>=20
<P><A =
href=3D"http://capella.colorado.edu/~laney/otherbooks.htm">Other Books=20
of Interest</A>=20
<P><A href=3D"http://capella.colorado.edu/~laney/links.htm">Other =
Sites of=20
Interest</A>=20
<P><A href=3D"http://capella.colorado.edu/~laney/author.htm">About =
the=20
Author</A>=20
<P><A =
href=3D"http://capella.colorado.edu/~laney/purchase.htm">Purchase the=20
Book</A> </FONT></P></TD>
<TD vAlign=3Dtop>
<BLOCKQUOTE>
<H1>Software for <I>Computational Gasdynamics</I></H1><BR><IMG=20
=
src=3D"http://capella.colorado.edu/~laney/graphics/cfdrecipes.jpg"=20
border=3D0> <BR><BR>
<HR>
<H2>Chapter 22. Flux Averaging Methods III: Self-Adjusting =
Hybrid=20
Methods</H2>
<HR>
<BR>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D0>
<TBODY>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch22soft/jameson.f">Jameson's =
Method</A></TD></TR>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch11soft/testf.f">Generator=20
for Initial Conditions</A></TD></TR>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch17soft/nb.dat">Sample=20
Input File</A></TD></TR></TBODY></TABLE>
<P>This code approximates the solution to the linear advection =
equation=20
on a periodic domain. By changing the statement functions f and =
df, this=20
code can also approximate other scalar conservation laws. The =
temporal=20
order-of-accuracy is set by the parameter m. For m=3D1, =
forward-Euler time=20
stepping is used. For m=3D2, improved Euler time stepping is =
used. For=20
m=3D3, Huen's third-order formula is used. For m=3D4, the =
"classic"=20
Runge-Kutta method is used. If you choose a value of m larger =
than 4,=20
you will have to change the source code to include appropriate =
values=20
for the Runge-Kutta coefficients.
<P>This code requires an ASCII input file nb.dat of the =
following form:=20
<BLOCKQUOTE><I>N: Number of Points, lambda: delta_t/delta_x, =
tfinal:=20
final time </I>
<P><I>Initial Conditions at 1st point (x1,y1)</I>
<P><I>Initial Conditions at 2nd point (x2,y2)</I>
<P>...
<P><I>Initial Conditions at Nth point (xN,yN)</I>
<P><I>Initial Conditions at N+1th point (xN+1,yN+1)<BR>(should =
repeat=20
the 1st Point)</I>
<P></P></BLOCKQUOTE>This code will produce two ASCII output =
files:=20
<UL>
<LI>jameson.out. Lists delta_t, delta_x, and lambda. Also =
lists the=20
final time requested vs. actual final time (these may differ =
if=20
delta_t is not an even divisor of tfinal). Finally, lists the =
intial=20
vs. final conditions at each point.=20
<LI>jameson.plt. Approximate vs. real solution at each point.=20
</LI></UL>Using the sample input file, this code will generate =
figure=20
22.10 in the book. You can generate a variety of other input =
files using=20
the initial condition generator. The generator expects an ASCII =
input=20
file called nb.dat with the first line as defined above. The =
file can=20
contain additional lines or not. The generator produces an ASCII =
output=20
file, also called nb.dat, in the form defined above. The user =
selects=20
from a menu to determine the intial conditions found in nb.dat =
after=20
running the generator. With the initial condition generator and =
the=20
other routines found here, you can generate most of the figures =
in=20
section 22.3 of the book.
<P>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D0>
<TBODY>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch22soft/jameson2.f">Jameson's=
=20
Method: Arbitrary Grid </A>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/cell.f">Generator=20
for Initial Conditions</A></TD></TR>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/cell.dat">Sample=20
Input File</A></TD></TR></TBODY></TABLE>
<P>This code is similar to the previous one, except that it =
allows=20
arbitrary grids with non-constant grid spacings.=20
<P>This code requires an ASCII input file cell.dat in one of two =
forms.=20
<P>EITHER:=20
<BLOCKQUOTE><I>N: Number of Cells, max lambda: max =
delta_t/delta_x,=20
tfinal: final time </I>
<P><I>1</I>
<P><I>Cell Edge x1</I>
<P><I>Cell Edge x2</I>
<P>...
<P><I>Cell Edge xN</I>
<P><I>Cell Edge xN+1</I>
<P><I>Cell-Centered Sample y1</I>
<P><I>Cell-Centered Sample y2</I>
<P>...
<P><I>Cell-Centered Sample yN</I>
<P></P></BLOCKQUOTE>OR:
<P>
<P>
<BLOCKQUOTE><I>N: Number of Cells, lambda: delta_t/delta_x, =
tfinal:=20
final time </I>
<P><I>-1</I>
<P><I>Cell Center x1</I>
<P><I>Cell Center x2</I>
<P>...
<P><I>Cell Center xN</I>
<P><I>Cell Center xN+1</I>
<P><I>Cell-Centered Sample y1</I>
<P><I>Cell-Centered Sample y2</I>
<P>...
<P><I>Cell-Centered Sample yN</I>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -