forked from nasa/CFL3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes
64 lines (54 loc) · 2.64 KB
/
notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
------------
This repository comprises the NASA CFL3D V6.7 code, as of year 2022. Though the entire package of files is extracted from official NASA Git,
(https://github.com/nasa/CFL3D), the purpose of creating this repository is to share the Cmake build system for the code.
This Cmake build system for CFL3D code was originally written by Dr. Cheng Di (https://github.com/nasa/CFL3D/pulls) few years back.
The procedure to install using this Cmake system is provided below.
### Compilation and running
```shell
## prerequirement (tested in Ubuntu 16.04)
sudo apt-get install libopenmpi-dev gfortran build-essential git cmake -y
# in RHEL/CentOS, you may try this:
sudo yum install openmpi-devel gcc gcc-gfortran git cmake
git clone https://github.com/SRkumar97/CFL3D.git
## manually build cgns 2.5 without hdf5 and mpi
# you can also use your own cgns library if you put your cgnslib_f.h and libcgns.a in /usr/share/include and /usr/share/lib respectively
cd CFL3D/external/
chmod +x build_cgns
./build_cgns
## build cfl3d executables out of source
cd ../build
cmake ..
# Now check that the paths for cgns include and lib are set correctly to CFL3D/external/cgns/include and CFL3D/external/cgns/lib respectively.
ccmake .
# Now press t for toggle, enter the two paths for cgns env. variables under CGNS_INCLUDE_DIR and CGNS_LIBRARY correctly, to the ones shown above
# Finally press c to configure, e to exit upon successful config. And then g to generate.
make
# or you may benefit from parallel run, try:
make -j`nproc`
# There will be a lot of warnings because I do not turn off all warnings as the original CFL3D build system do.
cd bin
# Add this path in the basic file for env. For Example see below #
pwd
# Add Environment in your bashrc (Modify the path according to your installation) #
#CFL3D
export PATH=~/CFL3D/build/bin:$PATH
alias use_cfl3d='export PATH=~/CFL3D/build/bin:$PATH'
Now, refresh the basrhrc file -
source ~/.bashrc
close the terminal and restart system/logout and login if using a cluster.
————————————————————————
THATS IT. YOU ARE GOOD TO GO!
————————————————————————
# FOR TESTING CFL3D
----------------------------------------------------
cd CFL3D/docs/Cfl3dv6/ (testcase directory)
cd 2DTestcases/Flatplate/ (2D Flatplate testcase)
gunzip Flatplate.tar.Z
tar -xvf Flatplate.tar
cd Flatplate
splitter < split.inp_1blk
cfl3d_seq < grdflat5.inp &
tail -f cfl3d.out # To monitor the steps and residuals
----------------------------------------------------
The complete set of instructions to run each such testcase, can be found in the official CFL3D site.
```