Working in 2D! And multiscale images

I am getting some good results in 1D and 2D now. My problem was one of the stupid little ones where I had the wrong index into an array, so instead of referencing the velocity in the vertical direction, I was referencing the velocity in the horizontal direction. This created a system that was, apparently, unsolvable. After correcting the problem, my netbook takes only a little bit of time to solve problems.

Getting better but still not there

I figured some good things out, but it still doesn't work in all cases. I noticed that my pressures were spiraling off to infinity during the solves so I tried to make them stop. That uncovered a couple of minor bugs in the way I was computing the velocity that were fairly easy to fix. Unfortunately, the way I was trying to stop the tendency to infinity didn't work.

Images Using FD Jacobian

Since I had difficulty getting my Jacobian to work, I am uploading some images that use PETSc's built in matrix free Jacobian routines. It works pretty well and generates results that seem to make sense to me. At least in 1D. Hopefully I can find the problem soon.

All of these images use $ K=1 $.

Update and Plots for Non-Darcy Solver

I ran my little script which does the driving of the program and got all kinds of errors! The reason was that I had written the code in such a way that it didn't play well with 1D examples. So, I went through and added code which dealt with 1D cases. Then, to make sure that it produced something usable, I had to run several test cases. To see a significant difference between Darcy and Non-Darcy flow, you need fairly high velocity.

Unfortunately, my Jacobian didn't work. I'm going to work on finding the flaw in it. See the next post for some images.

(Non) Darcy Solver Working

I think that my Non-Darcy solver is working. It is solving a system of the form
$ \left(K^{-1}+\beta\left|u\right|^{\alpha}\right)u&=&-\nabla p $
$ \nabla\cdot u&=&q $
where $ p $ is the pressure and $ u $ is the velocity. If $ \beta=0 $ then this is a Darcy flow, if $ \beta>0 $ and $ \alpha=1 $ then this is a Forchheimer flow.

I have written the program in Python using petsc4py which depends on PETSc. It is probably not optimally written at this time, and probably doesn't scale well since I was just trying to get something to work at first.

Subversion (SVN) and Apache 2 Webserver with SSL on Ubuntu

The purpose of this entry is to make it clear how to get Apache 2 with SSL and Subversion to play nice together. Subversion (SVN) is a version control system (like CVS or Git) which improves on older systems. I like it since there are many free GUI tools for interacting with it and it uses a client-server model which I like. Apache 2 is a web server which is supposed to play nice with SVN and also will serve this webpage (done in Drupal). SSL is necessary since it makes your passwords not be sent in plain text across unsecured networks.

PETSc with rsh and ssh

Information on getting PETSc to run jobs using rsh on the local machine are presented. PETSc uses MPICH to run jobs and MPICH uses rsh to connect to hosts (by default). In particular if you are only connecting to the local machine, this makes a lot of sense. If you are over a network then rsh may not be secure enough for you so ssh may be required.

Setting Up PETSc on Ubuntu

PETSc is a C library for high performance computing which I am learning to use. It depends on BLAS and LAPACK, but adds a lot more functionality. Of particular interest is that it does things in parallel. Ubuntu is currently my favorite Linux distro, but it doesn't make building from sources intuitive. In this, I will write about how to set up ATLAS (which implements BLAS), LAPACK, MPICH, and PETSc. This may be modified/expanded over time.

About Me

My name is Ken Kennedy and I am a Graduate Student at Oregon State University in the Math Department. I am currently a Research Assistant working with Malgo Peszynska doing research which is centered around modeling preferential flow and transport in porous media. My primary interest is in the computational aspects of these models like writing parallel solvers.

Syndicate content