Contents
SLFCFD HOME
GUI
Image Gallery
- Compressible
- Incompressible
Download
FAQ
Update
Development
Acknowledgments
Links
Youtube
Periodic Table
SLFFEA
- Main
- Philosophy
- Preamble
- GNU/Linux
- Links
SLFCEM HOME
Stuff About Me
San Le
Artwork
Email
|
Updates to SLFCFD
Updated 5/25/08
Here is a summary of the updates as of 5/25/08:
In the files ~/slfcfd-1.1/cfd_gr/fdpost.c and ~/slfcfd-1.1/cfd_gr/fdgetnew.c, I
changed the lines from:
if( incompressible_flag )
{
check = qikreader( matl, name, node, o3, path, streak);
if(!check) printf( " Problems with qikreader\n");
if(path.new_flag)
{
for( j = 0; j < path.num_pt0; ++j )
{
path.pt[j].x = path.pt0[j].x;
path.pt[j].y = path.pt0[j].y;
}
}
if(streak.new_flag)
{
for( j = 0; j < streak.num_pt0; ++j )
{
streak.pt[j].x = streak.pt0[j].x;
streak.pt[j].y = streak.pt0[j].y;
}
}
}
to:
if( incompressible_flag )
{
check = qikreader( matl, name, node, o3, path, streak);
if(!check) printf( " Problems with qikreader\n");
}
if(path.read_flag)
{
if(path.new_flag)
{
for( j = 0; j < path.num_pt0; ++j )
{
path.pt[j].x = path.pt0[j].x;
path.pt[j].y = path.pt0[j].y;
}
}
}
if(streak.read_flag)
{
if(streak.new_flag)
{
for( j = 0; j < streak.num_pt0; ++j )
{
streak.pt[j].x = streak.pt0[j].x;
streak.pt[j].y = streak.pt0[j].y;
}
}
}
Look near the lines 853 and 914 in "fdpost.c" and 668 and 729 in "fdgetnew.c. These lines are
inside the statements "if( post_flag )" and "if( input_flag )". Note that path and streak are
changed to path0 and streak0 for the code within the "if( input_flag )" statement. This change
is necessary because when you read in a new input file, the above code will check if there exits
corresponding pathline and streakline data.
|
Here is a summary of the updates as of 4/25/08:
For the Makefile in the main directory ~/slfcfd-1.1/, I
modified the make's pertaining to the AMR files, specifically:
clean:
cd common ; make clean
cd compressible ; make clean
cd AMR ; make
cd incompressible ; make clean
cd common_gr ; make clean
cd cfd_gr ; make clean
needs to change to:
clean:
cd common ; make clean
cd compressible ; make clean
cd AMR ; make clean
cd incompressible ; make clean
cd common_gr ; make clean
cd cfd_gr ; make clean
and
clean_science:
cd common ; make clean
cd compressible ; make clean
cd AMR ; make
cd incompressible ; make clean
needs to change to:
clean_science:
cd common ; make clean
cd compressible ; make clean
cd AMR ; make clean
cd incompressible ; make clean
As you can see, I need to add clean to the make for the
AMR code. This shouldn't affect anyone significantly.
|
Here is a summary of the updates as of 4/16/08:
Version 1.1 is finally here.
You can get it at the
download page. The major addition
is you can now solve 2-D compressible flows. I had originally planned for this
to be a 1.0 release after the 0.75 release prior to this, but the changes are
significant enough that I'm jumping to 1.1. Here is a list of the changes:
Science Code Changes
- As mentioned before, I have added an incompressible code which uses the 2-D
quickest algorithm given by Davis and Moore and which I have modified to keep
true upwinding. In addition to being more scientifically true, I think it dramatically
improves the results.
- Added new boundary conditions for the incompressible code. The most significant
new boundary, noslip for obstructions in the flow, has also been added to the
compressible code.
- Added the ability to calculate streaklines and pathlines. This is true
for both the compressible and incompressible code.
- In the compressible code, I had to change the way the steps are counted so that now
it stops one step less than the 0.75(or 1.0) release. This was done after careful consideration
of the way "dt" was added to the time. Slight numerical error would sometimes result in
an additional step, so I changed the code such that this error will not affect the results.
This changes the previous results though, in that they are often one step less than
the calculations of the previous release.
Graphics Code Changes
- The graphics code, fdpost, can handle both compressible and incompressible
data. And it will display the pathlines and streaklines.
Data Changes
- The data format for compressible data is almost the same with
the only difference being when you use the new noslip condition(I say more
about this below). For incompressible data, the header data at the top
is very similar. The major differences are that the SOR convergence
criteria is given on the line for time and time step parameters. And for
material properties, you only have the
Reynolds Number.
As an example, the beginning data looks like:
total nodes, nodes in x, nodes in y for the square obstruction problem at 0 degree
4590 102 45
Time step, number of steps, current step, current time, SOR tolerence
4.00000000e-02 7200 0 0.00000000e+00 1.0e-4
spatial discretization dx, dy
2.66000000e-01 2.66000000e-01
Reynolds Number
1.00000000e+03
For nodal data, the format of nodal indices, boundary condition, and list of numerical
value of nodal quantities is the same, except that for incompressible fluids, I only have
pressure, velocity x and y, and the velocity magnitude. So unlike the compressible
data, there is no column for density, temperature, enthalpy, energy, and mach number.
For example:
i j bc pressure velocity x velocity y velocity magnitude
0 0 prs0 0.0000e+00 1.0000e+00 0.0000e+00 1.0000e+00
0 1 ifxm -4.4819e+00 1.0000e+00 0.0000e+00 1.0000e+00
0 2 ifxm -5.7100e+00 1.0000e+00 0.0000e+00 1.0000e+00
0 3 ifxm -6.0169e+00 1.0000e+00 0.0000e+00 1.0000e+00
0 4 ifxm -6.0954e+00 1.0000e+00 0.0000e+00 1.0000e+00
0 5 ifxm -6.1224e+00 1.0000e+00 0.0000e+00 1.0000e+00
....
21 18 none -6.6126e+00 1.3931e+00 -1.4570e-01 1.4007e+00
21 19 none -6.6786e+00 1.0897e+00 -8.1584e-02 1.0928e+00
21 20 nsym 1 -6.6981e+00 1.9648e-01 -6.2475e-04 1.9648e-01
21 21 nsxp 1 -6.6940e+00 -6.4406e-04 8.4037e-02 8.4040e-02
21 22 nsxp 1 -6.7325e+00 0.0000e+00 6.7075e-02 6.7075e-02
21 23 nsxp 1 -6.7655e+00 0.0000e+00 4.0722e-02 4.0722e-02
21 24 nsxpyp 1 -6.8127e+00 -2.9244e-04 2.5593e-04 3.8862e-04
21 25 none -6.8144e+00 2.9871e-01 7.4387e-02 3.0784e-01
....
101 39 fr2xp -6.5077e+00 1.0044e+00 1.9623e-02 1.0046e+00
101 40 fr2xp -6.5061e+00 1.0103e+00 1.4121e-02 1.0104e+00
101 41 fr2xp -6.5049e+00 1.0130e+00 9.1262e-03 1.0131e+00
101 42 fr2xp -6.5042e+00 1.0139e+00 4.9290e-03 1.0139e+00
101 43 fr2xp -6.5038e+00 1.0143e+00 1.1551e-03 1.0143e+00
101 44 fsyp -6.5038e+00 1.0143e+00 1.1777e-03 1.0143e+00
Everything is clearly labeled so hopefully, there won't be too
much confusion. The only thing to note is that for noslip boundaries,
which are given by "ns" followed by the direction (e.g. xp, ym, etc.),
there is an integer number which specifies the body to which that particular
noslip boundary belongs. SLFCFD assumes every noslip boundary belongs to
a body and if this number is not given, SLFCFD will treat all noslip boundaries
as belonging to one.
- There are now 2 input data files for the pathlines and streaklines named
(filename).path and (filename).streak which can be either the beginning
points of the pathlines and streaklines or streakline and pathline data from
a previous calculation. The data format of both files are exactly the same.
These files are also written to be read into "gnuplot" which I will elaborate on
more below. You do not need these files to run the problem, but they
will enhance the results.
A typical beginning input file for streaklines with 21 seed points will look like:
number of streaklines
21
streakline number, initial x, initial y
0 2.92600000e+00 4.78800000e+00
1 2.92600000e+00 4.90770000e+00
2 2.92600000e+00 5.02740000e+00
3 2.92600000e+00 5.14710000e+00
4 2.92600000e+00 5.26680000e+00
5 2.92600000e+00 5.38650000e+00
....
15 2.92600000e+00 6.58350000e+00
16 2.92600000e+00 6.70320000e+00
17 2.92600000e+00 6.82290000e+00
18 2.92600000e+00 6.94260000e+00
19 2.92600000e+00 7.06230000e+00
20 2.92600000e+00 7.18200000e+00
The initial x and y columns represents the initial points at which the 21 streaklines
will be released. If this were a pathline file, they would represent the first
point of a pathline.
In the case of a continuing calculation, the streakline data would look like:
4.64240 4.96404 4.59325 5.06934 4.83451 ... 4.85146 7.69341 ... 4.87150 7.88612
4.59832 4.96735 4.55100 5.07675 4.78422 ... 4.80221 7.68081 ... 4.82419 7.87526
4.55568 4.97122 4.51051 5.08458 4.45475 ... 4.75348 7.66732 ... 4.77712 7.86362
4.51436 4.97540 4.47160 5.09136 4.41986 ... 4.70523 7.65316 ... 4.73028 7.85140
4.47431 4.97890 4.43415 5.09703 4.38617 ... 4.65747 7.63842 ... 4.68370 7.83866
...
2.96252 4.79574 2.96225 4.91559 2.96197 ... 2.96301 6.95662 ... 2.96372 7.19617
2.92600 4.78800 2.92600 4.90770 2.92600 ... 2.92600 6.94260 ... 2.92600 7.18200
Note that there is no beginning descriptive text. Also, there are 42 columns of numbers, one
for each of the 21 x coordinates and 21 y coordinates.
|
Go
here
to see the previous update page listing the modifications leading to Version
1.1.
.
|
|