What is FCPU?

FCPU is the acronym for FEM-CFD-Petsc-USG, i.e., a finite element method (FEM) computational fluid dynamics (CFD) software that is built on top of the Petsc library with the use of unstructured grid.

FCPU is developed by Dr. Shi Jin while he is a postdoc at University of Alberta, under the supervision of Dr. Nandakumar and Dr. Minev.

How to obtain the source code?

Currently FCPU is closed source. If you are interested int obtaining this code, take the following steps

  1. Go to http://xp-dev.com/app/ and register an account for free.
  2. Contact Dr. Jin by email at shi dot jin at ualberta dot ca. Please tell him about the reason you want this code and do include your account name you just created at xp-dev.com.
  3. If approved, Dr. Jin will add you to the subversion user list hosted by xp-dev.com
  4. Then you can login to xp-dev.com with your account name and under the Subversion Repositories menu, you should be able to find the repository called jinzishuai_fcpu.
  5. Click on the jinzishuai_fcpu link and you should see the following
The location of this repository is at:

    * https://svn.xp-dev.com/svn/jinzishuai_fcpu/ (SSL) or
    * http://svn.xp-dev.com/svn/jinzishuai_fcpu/ (No SSL)

To checkout this repository, please run the following:
svn checkout https://svn.xp-dev.com/svn/jinzishuai_fcpu/ (SSL) or
svn checkout http://svn.xp-dev.com/svn/jinzishuai_fcpu/ (No SSL)

Check out the source using one of the above method with subversion. If you are not familiar with subversion or has not have it installed on your system, read the 3-mintue-tutorial on xp-dev.com or the complete subversion book.
For example, on my system, I did
sjin1@opus public_html $ svn checkout http://svn.xp-dev.com/svn/jinzishuai_fcpu/ FCPU

Then I see the following
Authentication realm: <http://svn.xp-dev.com:80> XP-Dev repositories
Password for 'sjin1':
Authentication realm: <http://svn.xp-dev.com:80> XP-Dev repositories
Username: jinzishuai
Password for 'jinzishuai':

Note that the first request for password is for the local OS account (sjin1 in the above case) but this is not the same as my xp-dev.com account. So simply enter and then username will be promoted to enter. After entering my xp-dev.com account name (jinzishuai), I was asked to enter my password on xp-dev.com. If the password is correct, directory FCPU will be created and the source is located inside the trunk directory.

What libraries does FCPU depend on?

FCPU depends on a number of packages but they can all be obtained using PETSc. The current version requires the development version of PETSc (petsc-dev). Its source can be found at ftp://info.mcs.anl.gov/pub/petsc/petsc-dev.tar.gz or through mercurial (see the site for details).

How to install petsc-dev?

This is a non-trivial task. Please refer to the petsc-dev page.

How to build the code?

Once petsc-dev is installed, all you need to do is "make". There are a number of make choices.

  • make or make fcpu: this builds the code
  • make clean: to remove all the objects files
  • make rebuild: to do a complete rebuild of the code, useful when the header files are changed.
  • make doc: to build the doxygen documentation. Note that doxygen has to be iinstalled on your system.

How to run the code?

There are many command line options you can use. But the commonly used one looks like

nohup mpiexec -n 2 -l $CODE -Re 50.0 -Fr 1 -dt 0.02 -NSteps 20000 \
         -subSteps 1 -maxIter 100 \
        -updateOrder 3 -outputSieve 1 -loadSieve 0 -useLumpedMass -3 \
        -movingRF 1 -omegaMethod 0  -flowType 1 -Umax 1.0 -identicalVelBC 0 \
        -identicalVelStructure 1 -dumpStep 1000 -zeroVelBC 0 -debug 0 &>out2 &

The meaning of the options and even more options can be found in the Options class (see source file Options.h and Options.cxx) or command line options

How to access the documentation?

The code is self-documented with doxygen. To generate the documents, there are two methods:

  1. run the command "doxygen" directly under the trunk directory.
  2. run "make doc"

There is also an online documentation at http://www.ualberta.ca/~sjin1/FCPU/trunk/html/. However, it is not always update to date. For the most update-to-date documentation, you need to generate them yourself from the code.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License