An aeroelastic analysis package
WORK STILL IN PROGRESS
sharpy depends on xbeam and UVLM. For now, only structural simulations are supported.
Requirements
sharpy is developed and tested using:
- Anaconda Python 3.5.3
- GCC 4.8.5 or (recommended) GCC 5.4.0
- CentOS 7 and MacOS Sierra
Certain dependencies are required separately:
Steps
- Create a working folder and
cd
into it.
mkdir ~/working_dir
cd !$
- Clone
sharpy
in the working folder, if you agree with the license inlicense.txt
git clone http://github.com/fonsocarre/sharpy
- Clone
xbeam
inside the working folder
git clone http://github.com/fonsocarre/xbeam
cd xbeam
# This allows you to execute the run_make script
chmod +x ./run_make.sh
# Now we run run_make
./run_make.sh
This compiles a release version of xbeam calling to gfortran
. If you
have several versions of gcc
compiled, you might have to modify
the FC
flag in src/Makefile
and src/xbeam_base/Makefile
in order
to account for this. For example, I have gfortran-5.4.0
for the newer
version of gcc
not included with CentOS, so I need to modify the Makefiles
if I want to take advantage of the improved features.
After a (hopefully) successful compilation of the xbeam library, the
run_make
script automatically copies the library to the required folder in
sharpy
(this is why you need to clone sharpy
before xbeam
).
- Make sure your python version is at least 3.5:
python --version
# it returns:
#>>> Python 3.5.3 :: Anaconda custom (64-bit)
If it returns `Python 2.X.X` (where `X` does not matter), there are two possibilities:
1. You haven't installed the proper [Anaconda](https://www.continuum.io/Anaconda-Overview).
Make sure you install the python3 version.
2. You have the correct python installation, but the `python` command
points to the default python of the OS. In this case, try `python3`
-
Run a test case!!!
This command generates the required files for running a static, clamped beam.
cd ../sharpy
python ./tests/beam/static/geradin_cardona/generate_geradin_data.py
Now you should see a success message, and if you check the
./tests/beam/static/geradin_cardona/
folder, you should see two new files:
- geradin_cardona.solver.txt
- geradin_cardona.fem.h5
Try to open the solver.txt
file and have a quick look. The solver
file is
the main settings file. We'll get deeper into this later.
If you try to open the fem.h5
file, you'll get an error or something meaningless. This is because the structural data is stored in HDF5 format, which is compressed binary.
-
Now run it
The usual
sharpy
call is something like:# from the sharpy folder python __main__.py "solver.txt file" # from outside the sharpy folder (make sure working_dir is in your path:) python sharpy "solver.txt file"
So if you are in the sharpy folder, just run:
python __main__.py ./tests/beam/static/geradin_cardona/geradin_cardona.solver.txt
-
Results
After a successful execution, you should get something similar to:
Plotting the structure... Tip: Pos_def: 4.403530 0.000000 -2.159692 Psi_def: 0.000000 0.672006 0.000000 ...Finished
And a 3D plot in a matplotlib screen.
FYI, the correct solution for this test case by Geradin and Cardona is Delta R_3 = -2.159m and Psi_2 = 0.6720rad.
Congratulations, you've run your first case.
If you want to know how to configure your own cases, check the iPython notebook Geradin and Cardona Static Structural Case.