The On Ramp/Level 1/Solve (Compressible)

From PHASTA Wiki
Revision as of 23:45, 2 June 2025 by Moam3950 (talk | contribs) (Creating the Executable)
Jump to: navigation, search


Overview

This page walks you through the process of configuring, compiling, and identifying the correct executable for running compressible PHASTA simulations. These steps assume you have generated and partitioned a mesh using Prepping the Grid for Chef and The On Ramp/Level 1/Partition.

Building PHASTA for Compressible Simulations

Use the following script to configure and compile PHASTA with compressible physics enabled. This ensures that both compressible and incompressible functionalities are available.

#!/bin/bash

Target=Example_Build
mkdir Example_Build
rm -r $Target/*
cd $Target

export PKG_CONFIG_PATH=/users/skinnerr/tools/git-petsc/build_ompi210_gnu63/lib/pkgconfig/

cmake \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_Fortran_COMPILER=gfortran \
-DCMAKE_BUILD_TYPE=Debug \
-DPHASTA_INCOMPRESSIBLE=ON \
-DPHASTA_COMPRESSIBLE=ON \
-DPHASTA_USE_LESLIB=ON \
-DLESLIB=/users/matthb2/libles1.5/libles-debianjessie-gcc-ompi.a \
-DCASES=/home/mrasquin/develop-phasta/phastaChefTests \
-DPHASTA_TESTING=OFF \
../../phasta-next/

make -j8
echo "Target: $Target"
date

After compilation, confirm that the compressible PHASTA executable has been built by locating:

Example_Build/bin/phastaC.exe

This is the executable specifically for compressible simulations. You can also see `phastaIC.exe` for incompressible cases.

Creating the Executable

Create the runPHASTA.sh bash script. Where you see <pathtoBuildDir> include your path to your build directory where you retrieved the input.config file.

#!/bin/bash

rm $1-procs_case/doubleRun-check

#export PHASTA_CONFIG=/users/jopa6460/git-phasta/build_phasta/Example_Build
export PHASTA_CONFIG=<pathtoBuildDir>

mpirun -np $1 $PHASTA_CONFIG/bin/phastaC.exe 2>&1 | tee $1.out

Remember to turn the file into an executable as was done for the build script above. Hint: chmod +x command.

This completes the setup needed to launch compressible simulations.