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 4/15/10



Here is a summary of the updates as of 4/16/12:

I have some of my art in the Bridges Organization's 2012 Conference .


Here is a summary of the updates as of 11/16/11:

My CFD paper memtioned below is now part of an issue. It is in the 20th December, 2011 issue which can be referenced as Int. J. Numer. Meth. Fluids 2011; 67:1470-1499., or completely, International Journal for Numerical Methods in Fluids, Volume 67, Issue 11, Pages 1341-1768.


Here is a summary of the updates as of 6/10/11:

I wrote a paper combining math and my art which I put on arXiv. The paper is titled, The Art of Space Filling in Penrose Tilings and Fractals . I submitted it to a math journal as well, but since it got covered by some Tech blogs like www.newscientist.com , www.technologyreview.com , and www.physorg.com , I may have exceeded the amount of pre-publishing that journals allow beyond pre-prints.


Here is a summary of the updates as of 10/11/10:

I got my first paper published. The paper is titled, Re-examining the QUICKEST algorithm for two-dimensional incompressible fluids , pubished in the journal, International Journal for Numerical Methods in Fluids .

Here is a summary of the updates as of 5/15/10:

There is a small mistake in
   ~/slfcfd-1.2/cfd_gr/cfdmshkey.c
For case 'm', go to the line 234 and move the nine lines pertaining to the desired material number to line 223. So the result should look like:
            case 'm':
                color_choice = 30;
                input_color_flag = 0;
                VelocityVec_flag = 0;
                Boundary_flag = 0;
                Element_flag = 0;
                Material_flag = 1;
                Node_flag = 0;
                printf("\n What is the desired material number?\n");
                scanf("%d", &matl_choice);
                if ( matl_choice > nmat - 1 )
                {
                        matl_choice = 0;
                }
                Solid_flag = 1;
                break;
I must have seperated the lines when i did case 'M'.

Here is a summary of the updates as of 4/15/10:

I made some mistakes in the application of the inflow bounary conditions in "qikbound.c" for the pressure in the "xp" and "yp" cases for incompressible flow. The reason they went undetected is because all my simulations had the flow coming from the left and bottom (the "xm" or "ym") directions. I found this bug when I used the "xp" and "yp" conditions for some simulations of Poiseuille flow. In "qikbound.c", near line 62, change:
        node[ce].prs = (node[yp1].prs + 2.0*node[xm1].prs + node[ym1].prs)/4.0 -
            dx/dt*(vx_xp1 - node[xm1].vxQ + node[ce].vyQ - node[ym1].vyQ)/4.0;
to
        node[ce].prs = (node[yp1].prs + 2.0*node[xm1].prs + node[ym1].prs)/4.0 -
            dx/dt*(node[ce].vxQ - node[xm1].vxQ + node[ce].vyQ - node[ym1].vyQ)/4.0;
and near line 96, change:
        node[ce].prs = (node[xp1].prs + 2.0*node[ym1].prs + node[xm1].prs)/4.0 -
            dx/dt*(node[ce].vxQ - node[xm1].vxQ + vy_yp1 - node[ym1].vyQ)/4.0;
to
        node[ce].prs = (node[xp1].prs + 2.0*node[ym1].prs + node[xm1].prs)/4.0 -
            dx/dt*(node[ce].vxQ - node[xm1].vxQ + node[ce].vxQ - node[ym1].vyQ)/4.0;
In "sor.c", I did not even deal with the "xp" and "yp" boundary, so the problem did not appear there. I hope no one tried to run a simulation requiring "xp" and "yp" inflow conditions.

Here is a summary of the updates as of 3/24/10:

This update is for a strange bug that revealed itself only in unique cases. I discovered it when I set the "number of steps" to 7200, with the "current step" also 7200. The reason both the beginning and ending steps are the same is because I only wanted to calculate the streamlines at the final time. I fixed the problem by adding 1 more unit of memory to the "XYZF doubles" for the streaklines and streamlines(I had alreadly done this for the pathlines by version 1.1). So in "cfdqik.c, near line 342, I changed the lines:
        sofmXYZF = streak.num_pt0 + streak.num_pt0*streak.nstep_out +
                path.num_pt0 + path.num_pt0*(path.nstep_out+1) +
                stream.num_pt0 + stream.num_pt0*stream.nstep_out;
to
        sofmXYZF = streak.num_pt0 + streak.num_pt0*(streak.nstep_out+1) +
                path.num_pt0 + path.num_pt0*(path.nstep_out+1) +
                stream.num_pt0 + stream.num_pt0*(stream.nstep_out+1);
and near lines 406:
        streak.pt0=(mem_XYZF+ptr_inc);        ptr_inc += streak.num_pt0;
        streak.pt=(mem_XYZF+ptr_inc);         ptr_inc += streak.num_pt0*streak.nstep_out;
        path.pt0=(mem_XYZF+ptr_inc);          ptr_inc += path.num_pt0;
        path.pt=(mem_XYZF+ptr_inc);           ptr_inc += path.num_pt0*(path.nstep_out+1);
        stream.pt0=(mem_XYZF+ptr_inc);        ptr_inc += stream.num_pt0;
        stream.pt=(mem_XYZF+ptr_inc);         ptr_inc += stream.num_pt0*stream.nstep_out;

to
        streak.pt0=(mem_XYZF+ptr_inc);        ptr_inc += streak.num_pt0;
        streak.pt=(mem_XYZF+ptr_inc);         ptr_inc += streak.num_pt0*(streak.nstep_out+1);
        path.pt0=(mem_XYZF+ptr_inc);          ptr_inc += path.num_pt0;
        path.pt=(mem_XYZF+ptr_inc);           ptr_inc += path.num_pt0*(path.nstep_out+1);
        stream.pt0=(mem_XYZF+ptr_inc);        ptr_inc += stream.num_pt0;
        stream.pt=(mem_XYZF+ptr_inc);         ptr_inc += stream.num_pt0*(stream.nstep_out+1);
I have also changed the lines, near line 309, from:
        path.nstep_out = nstep;
        streak.nstep_out = nstep;
        stream.nstep_out = stream_nstep;
to
        path.nstep_out = nstep;
        if( path.nstep_out < path.nstep_in ) path.nstep_out = path.nstep_in;
        streak.nstep_out = nstep;
        if( streak.nstep_out < streak.nstep_in ) streak.nstep_out = streak.nstep_in;
        stream.nstep_out = stream_nstep;
        if( stream.nstep_out < stream.nstep_in ) stream.nstep_out = stream.nstep_in;
which handles the case where the starting file for the pathlines, streaklines, or streamlines have more time steps than "nstep". This should never happen, but when I prepared some test data, I accidentally created this situation. I have modified version 1.1 to reflect these changes as well. Interestingly, for the compressible code, I had already added the extra unit to memory to the streaklines and streamlines(although not for version 1.1, although I will do that now), and I don't know why I didn't do it for the incompressible code at that time. I don't plan to add the second change mentioned above though.

Here is a summary of the updates as of 1/26/10:

Created a new project SLFCEM, which does finite element analysis for Computational Electromagnetics. You can see it at:

SLFCEM HOME



Here is a summary of the updates as of 1/7/10:

Another bug was found which causes a "bus error" when runnig the graphics code animation with the compressible code. This is fixed by adding the external variable declaration:
      double err = 0.0;
at about line 98 to the code "cfdflw.c" located in:
   ~/slfcfd-1.2/compressible/
Previously, I forgot to declare "err" at all in the compressible codes because "err" is a variable only used by the incompressible code. But because the animation file:
   ~/slfcfd-1.2/common/flow_anim.c
used by "cfdflw.c" reads in the global variable "err", I have to declare it. This wasn't an important bug in Linux but causes the bus error on Mac OS X (10.4.11).

Since I had to upload again anyway, I added some improvements to the way the "pathlines", "streamlines", and "streaklines" functions are called. Now they are only called when their respective input file exists. These changes were made to both slfcfd-1.1 and slfcfd-1.2.

Here is a summary of the updates as of 11/5/09:

There is a significant bug in the way parameters for streamlines are initialized. You can fix this by adding the line:
      if( stream_nstep < nstep) stream_nstep = nstep;
at about line 280 above the code:
      if(flag_2D)
      {
          path.nstep_out = nstep;
          streak.nstep_out = nstep;
          stream.nstep_out = stream_nstep;
      }
I also made some other changes with respect to the streamline calculations, but this is the only bug related change.

There are also some bugs in the way I calculated the magnitude of the velocity for the animations. On line 600 of "cfdflw.c" in
      ~/slfcfd-1.2/compressible/
you need to change:
            gr_node[node_num].vy  =   vx = node[node_num].vy;
to
            gr_node[node_num].vy  =   vy = node[node_num].vy;
This is true for the incompressible code as well. So in "cfdqik.c", near line 800, change:
            gr_node[node_num].vy  =   vx = node[node_num].vy;
to
            gr_node[node_num].vy  =   vy = node[node_num].vy;
These changes apply to slffea-1.2.

Here is a summary of the updates as of 1/15/09:

There are only minor fixes. The "template" file I had for the incompressible data was actually for the compressible data, so replaced it with the correct "template" file. I also made a few modifications to the template mesh generation code, "meshq.c" which I now rename as "meshtemplate.c". This should probably not affect anyone.

Here is a summary of the updates as of 9/2/08:

I found a bug in the way I applied the no-slip boundary condition for the pressure in the file "~/slfcfd-1.*/incompressible/qikbound.c". An example of the fix would be changing:
   node[xp1].prs = node[ce].prs + 2.0*node[xp2].vxQ*alp/dx;
to
   node[xp1].prs = node[ce].prs + 2.0*node[xp1].vxQ*alp/dx;
This is an example of the difficulty of working with a staggered grid. Note that this change only applies to the "xm" and "ym" parts of the no-slip boundary, and actually has no effect except at the corner nodes, where it will have little change on the results of most problems. An example of the fix for corner node pressures would be changing:
   node[ce].prs = .5*(node[xp1].prs + 2.0*node[xm1].vxQ*alp/dx +
       node[ym1].prs + 2.0*node[yp1].vyQ*alp/dy);
to
   node[ce].prs = .5*(node[xp1].prs + 2.0*node[xm1].vxQ*alp/dx +
       node[ym1].prs + 2.0*node[ce].vyQ*alp/dy);
Again, note that the changes only apply to the "xm" or "ym" no-slip boundaries. Another change is to remove "flow" from the Makefiles of the incompressible flow. So change:
all: flow qik drev meshq

PROGS = flow qik prstest
to
all: qik drev meshq

PROGS = qik drev meshq
This really isn't a bug, but since "flow" is outdated and depends on OpenGL/Mesa, it could cause problems if you don't have either. I have made the modifications for SLFCFD 1.1 and 1.2.

Here is a summary of the updates as of 7/3/08:

Version 1.2 is here.

You can get it at the download page. I have added animation for 2-D flows as well as streamlines. Here is a list of the changes:

Science Code Changes
  • I made a slight modification to the change I made to the quickest algorithm of version 1.1. This only causes a small change in the results for the incompressible code.
  • Added the ability to calculate streamlines. This is true for both the compressible and incompressible code.
  • There are new arguments which you can pass to the science executables. This applies mainly to animation.

Graphics Code Changes
  • The graphics code, fdpost, will also animate a flow in real time as well as generate frames for saving the animation (if you have FFmpeg installed. You can get it at http://ffmpeg.mplayerhq.hu/).
  • To save an animation, I added the code ffanim, which depends on FFmpeg to compile and save frames generated by fdpost.

Data Changes
  • There are no changes to existing data file formats. For animation, there are 2 new files, "fdview.anim" and "anim_name", not including the data generated and removed during animation. The only file you probably have to deal with is "fdview.anim". This is a file you generate when you position the view of the mesh. The last lines of this file are the quantities you want to display such as pressure or temperature, pathlines or streaklines.
Go here to see the previous update page listing the modifications leading to Version 1.2. .
Go here to see the previous update page listing the modifications leading to Version 1.1. .

Get San Le's Free Comp. Fluid
Dynamics at SourceForge.net. Fast, secure and Free Open Source software
downloads