Getting Started with PHASTA

From PHASTA Wiki
Revision as of 10:20, 27 February 2015 by Mkm06 (talk | contribs) (Setting up a problem)
Jump to: navigation, search

Introduction

CFD using PHASTA can be intimidating at the beginning. The very first things you'll need are some familiarity with UNIX and a connection to an HPC resource like one of our systems or Janus. Once you've got those two things, this page will take you through the basics of setting up and running a problem.

Setting up a problem

The tool used for preparing your model for computation is SimModeler, and instructions for running it are found on that page.

As of 4/15/14, the version of SimModeler and the tool suite for it are:

 simmodeler-3.0-140309
 simmodsuite-8.0-140406

After you have set up your model, you will have two files: model.smd and model.x_t. To run your problem, you will need to have geom.smd and geom.xmt_txt. You can create these by linking them to your existing files:

 ln -s model.smd geom.smd
 ln -s model.x_t geom.xmt_txt

The final step in model preparation is pre-processing using NSPre, which also requires a mesh file (a .sms file). As of 4/15/14, the script to run is

 /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O

If you are running a problem that is solving scalars in addition to flow, you must pass an additional argument to the pre-processing script. For example, if the problem is solving the level set and second distance scalar (for a total of seven variables), the command is

 /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O -v 7

More information on NSPre versions and scripts can be found on the NSPre page.

Running a problem

The first thing you should do is connect to a viz node or other computing resource. Do NOT run PHASTA on portal0!

In order to run PHASTA, you'll need to have a properly prepared geometric model, solver.inp and input.config files, and a PHASTA executable. To get your executable, you'll need to compile PHASTA using CMake.

Your model, solver.inp, and input.config files should all be in the same directory. From that directory, you can run PHASTA using MPI:

 mpirun -np XX path_to_your_executable

where XX is the number of processors.

To debug PHASTA using TotalView, first compile PHASTA with the DEBUG option turned on. Second, add TotalView to your environment (version as of 4/15/14):

 soft add +totalview-8.13.0

Then, you can run PHASTA through TotalView:

 mpirun -tv -np XX path_to_your_executable

Viewing your results

The main tool for viewing your results is ParaView. You will need your results (a series of restart files) and a .pht file that you will actually open in ParaView.