📄 cfd recipes chapter 21.mht
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject: CFD Recipes: Chapter 21
Date: Fri, 18 Jul 2003 17:29:24 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_NextPart_000_0051_01C34D52.21ED9060";
type="text/html"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
This is a multi-part message in MIME format.
------=_NextPart_000_0051_01C34D52.21ED9060
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://capella.colorado.edu/~laney/ch21code.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>CFD Recipes: Chapter 21</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"Free CFD Software" name=3DDESCRIPTION>
<META=20
content=3D"CFD, computational fluid dynamics, =
computational gasdynamics, flux correction, flux corrected, flux =
corrector, FCT, ENO, Shu, Osher, Boris, Book, ENO, essentially =
nonoscillatory, Harten, TVD"=20
name=3DKEYWORDS>
<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 21. Flux Averaging Methods II: Flux-Corrected =
Methods</H2>
<HR>
<BR>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D0>
<TBODY>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/fct.f">Boris-Book=20
Flux-Corrected Method (FCT)</A></TD></TR>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/harten.f">Harten's=20
Flux-Corrected Method (TVD)</A></TD></TR>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/eno2.f">Shu-Osher=20
Method (ENO): Second-Order</A></TD></TR>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/eno2sr.f">Shu-Osher=20
Method (ENO): Second-Order plus Subcell =
Resolution</A></TD></TR>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/eno3.f">Shu-Osher=20
Method (ENO): Third-Order Method</A></TD></TR>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/eno3sr.f">Shu-Osher=20
Method (ENO): Third-Order plus Subcell =
Resolution</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>These codes approximate the solution to the linear advection =
equation=20
on a periodic domain. By changing the statement functions f and =
df,=20
these codes can also approximate other scalar conservation laws, =
although the eno codes will only accept flux functions with =
positive=20
derivatives. See below for a full-up implementation of ENO =
without this=20
restriction. The enosr codes represent possible implementations =
of=20
subcell resolution. You may wish to experiment with others. See =
section=20
9.4 for basic background on subcell resolution.
<P>These codes require 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>These codes will produce two ASCII output =
files:=20
<UL>
<LI>fct.out, harten.out, eno2.out, eno2sr.out, eno3.out, or=20
eno3sr.out. Lists delta_t, delta_x, and lambda. Also lists the =
final=20
time requested vs. actual final time (these may differ if =
delta_t is=20
not an even divisor of tfinal). Finally, lists the intial vs. =
final=20
conditions at each point.=20
<LI>fct.plt, harten.plt, eno2.plt, eno2sr.plt, eno3.plt, or=20
eno3sr.plt. Approximate vs. real solution at each point. =
</LI></UL>Using=20
the sample input file, these codes will generate figures 21.3, =
21.8,=20
21.14, and 21.15 in the book. You can generate a variety of =
other input=20
files using the initial condition generator. The generator =
expects an=20
ASCII input file called nb.dat with the first line as defined =
above. The=20
file can contain additional lines or not. The generator produces =
an=20
ASCII output file, also called nb.dat, in the form defined =
above. The=20
user selects from a menu to determine the intial conditions =
found in=20
nb.dat after running the generator. With the initial condition =
generator=20
and the other routines found here, you can generate most of the =
figures=20
in Chapter 21 of the book.
<P>
<TABLE cellSpacing=3D0 cellPadding=3D5 border=3D0>
<TBODY>
<TR>
<TD><A=20
=
href=3D"http://capella.colorado.edu/~laney/ch21soft/enosho.f">Shu-Osher=20
Method (ENO): Arbitrary Grid and Order-of-Accuracy </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 approximates the solution to the linear advection =
equation=20
on a periodic domain. Unlike some of the other codes seen here, =
this=20
code allows arbitrary grids with non-constant grid spacings. By =
changing=20
the statement functions f and df, this code can also approximate =
other=20
scalar conservation laws. The order-of-accuracy is set by the =
parameter=20
m. You must change m in three places and recompile to change the =
order-of-accuracy. For m=3D1, forward-Euler time stepping is =
used. For=20
m=3D2, improved Euler time stepping is used. For m=3D3, you can =
choose=20
between three different Runge-Kutta time stepping schemes by=20
uncommenting your selection and compiling; the Shu-Osher =
Runge-Kutta=20
method is the default. For m=3D4, the "classic" Runge-Kutta =
method is=20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -