Skip to content

Commit

Permalink
Merge VPMgeneralized-formulation into Master
Browse files Browse the repository at this point in the history
  • Loading branch information
EdoAlvarezR committed May 13, 2021
2 parents d7d33d9 + d95a165 commit f4802f5
Show file tree
Hide file tree
Showing 38 changed files with 6,638 additions and 478 deletions.
10 changes: 9 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ version = "2.0.0"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Dierckx = "39dd38d3-220a-591b-8e3c-4c3a8c710a94"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
JLD = "4138dd39-2aa7-5051-a626-17a0bb65d9c8"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
GeometricTools = "83792f5e-c6a1-11e8-2e0a-93511f02ae5f"
FLOWVLM = "1a3ff0be-0410-4572-aa62-b496bdd1f33b"
FLOWNoise = "d27480ee-285d-533b-ae3d-5018956ae0bc"
Expand All @@ -25,3 +25,11 @@ FLOWVLM = "2.0.0"
FLOWNoise = "2.0.0"
BPM = "2.0.0"
# FLOWVPM = "0.1.0"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
FLOWVPM = "6e19019d-7c31-4940-9d16-c3f15dfe6020"

[targets]
test = ["Test", "Printf", "FLOWVPM"]
5 changes: 5 additions & 0 deletions data/rotors/VahanaStacked.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
property,file,description
Rtip,0.60, (m) Radius of blade tip
Rhub,0.05, (m) Radius of hub
B,2, Number of blades
blade,DJI9443_blade.csv, Blade file
5 changes: 5 additions & 0 deletions data/rotors/VahanaTilt.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
property,file,description
Rtip,0.75, (m) Radius of blade tip
Rhub,0.05, (m) Radius of hub
B,5, Number of blades
blade,VahanaTilt_blade.csv, Blade file
8 changes: 8 additions & 0 deletions data/rotors/VahanaTilt_blade.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
property,file,description
chorddist,VahanaTilt_chorddist.csv, Chord distribution
pitchdist,apc10x7_pitchdist.csv, Pitch distribution
sweepdist,apc10x7_sweepdist.csv, LE sweep distribution
heightdist,VahanaTilt_heightdist.csv, LE height distribution
airfoil_files,apc10x7_airfoils.csv, Airfoil distribution
spl_k,3, Spline order
spl_s,5.0e-6, Spline smoothing
22 changes: 22 additions & 0 deletions data/rotors/VahanaTilt_chorddist.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
r/R,c/R
0.0,0.134
0.086,0.137106
0.16,0.144606
0.2,0.154291
0.25,0.175
0.3,0.20500000000000002
0.35,0.20800000000000002
0.4,0.21200000000000002
0.45,0.20500000000000002
0.5,0.195
0.55,0.186
0.6,0.174
0.65,0.161
0.7,0.145
0.75,0.129
0.8,0.112
0.85,0.096
0.9,0.081
0.9245,0.071125
0.954,0.070
1.0,0.065
11 changes: 11 additions & 0 deletions data/rotors/VahanaTilt_heightdist.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
r/R,z/R (height of leading edge from top face of hub)
0.0,-0.0150591
0.075,-0.003
0.12,0.016
0.2,0.044
0.4,0.024
0.6,0.00278494
0.8,-0.02
0.90,-0.033
0.97,-0.045
1.0,-0.070
1,631 changes: 1,630 additions & 1 deletion docs/resources/colab/FLOWUnsteady-rotor-noise.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/src/tutorials/installation-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ v"3.8"
## Setting up PyPlot
Since PyCall now relies a custom install of Python3, make sure that:
- matplotlib is installed for that python
- for a best experience, verify that matplotlob uses Qt5Agg as a backend. Useful instructions can be found [here](https://github.com/JuliaPy/PyPlot.jl#os-x) and [here](https://stackoverflow.com/questions/58627696/warning-pyplot-is-using-tkagg-backend-which-is-known-to-cause-crashes-on-macos).
- for a best experience, verify that matplotlob uses Qt5Agg as a backend. Useful instructions can be found [here](https://github.com/JuliaPy/PyPlot.jl#os-x) and [here](https://stackoverflow.com/questions/58627696/warning-pyplot-is-using-tkagg-backend-which-is-known-to-cause-crashes-on-macos).

## `Paraview`

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
99.92633378894729, 27.976555047944146
123.397765223148, 16.000301219940745
157.0726087667979, 44.47838746925041
196.32145743137613, 44.923188915106124
246.66457509833174, 24.740950850946305
313.72456190648666, 16.409960339374457
397.03749089644253, 27.680355439530082
498.684874689902, 28.80867513429387
626.9349786159039, 26.29022541292231
790.3234344003919, 33.002409759526046
987.0366976285114, 36.52417290024596
1237.4058768752009, 45.059992971534655
1588.7590412725822, 39.46357748882971
1982.7143673092012, 45.94834078015958
2468.5355130681473, 41.720969928209186
3131.946233806828, 43.07671067824685
3953.200967821356, 44.77458707766449
4890.724638422591, 45.56177518951749
6203.656222956636, 47.82920829358897
7827.655582612773, 50.894623224057355
9880.212913918605, 52.59249962347501
12343.699873433363, 54.74672423314416
15740.205282283672, 56.21617551081873
19861.266006791066, 59.1676288970329
24828.4464304208, 58.92866107736323
31282.374710447446, 47.74913399267024
Binary file not shown.
1,414 changes: 1,414 additions & 0 deletions examples/rotornoise/singlerotor-BEMT.ipynb

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions examples/singlerotor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ II rotor.

# ------------ MODULES ---------------------------------------------------------
# Load simulation engine
# import FLOWUnsteady
reload("FLOWUnsteady")
import FLOWUnsteady
uns = FLOWUnsteady
vlm = uns.vlm

Expand Down Expand Up @@ -70,23 +69,28 @@ function singlerotor(; xfoil = true, # Whether to run XFOIL
DVinf = [1.0, 0, 0], # Freestream direction
nrevs = 6, # Number of revolutions
nsteps_per_rev = 72, # Time steps per revolution
shed_unsteady = true,
lambda = 2.125,
n = 10,
overwrite_overwrite_sigma = nothing,
# OUTPUT OPTIONS
save_path = nothing,
run_name = "singlerotor",
prompt = true,
verbose = true,
v_lvl = 0)
v_lvl = 0,
rotor_file = "DJI-II.csv", # Rotor geometry
optargs...)

# TODO: Wake removal ?

# ------------ PARAMETERS --------------------------------------------------

# Rotor geometry
rotor_file = "DJI-II.csv" # Rotor geometry
data_path = uns.def_data_path # Path to rotor database
pitch = 0.0 # (deg) collective pitch of blades
# n = 50 # Number of blade elements
n = 10
# n = 10
CW = false # Clock-wise rotation
# xfoil = false # Whether to run XFOIL

Expand All @@ -109,11 +113,13 @@ function singlerotor(; xfoil = true, # Whether to run XFOIL
p_per_step = 2 # Sheds per time step
ttot = nrevs/(RPM/60) # (s) total simulation time
nsteps = nrevs*nsteps_per_rev # Number of time steps
lambda = 2.125 # Core overlap
overwrite_sigma = lambda * 2*pi*R/(nsteps_per_rev*p_per_step) # Smoothing core size
# lambda = 2.125 # Core overlap
overwrite_sigma = overwrite_overwrite_sigma != nothing ? overwrite_overwrite_sigma :
lambda * 2*pi*R/(nsteps_per_rev*p_per_step) # Smoothing core size

surf_sigma = R/10 # Smoothing radius of lifting surface
vlm_sigma = surf_sigma # Smoothing radius of VLM
shed_unsteady = true # Shed particles from unsteady loading
# shed_unsteady = true # Shed particles from unsteady loading

max_particles = ((2*n+1)*B)*nrevs*nsteps_per_rev*p_per_step # Max particles for memory pre-allocation
plot_disc = true # Plot blade discretization for debugging
Expand Down Expand Up @@ -194,6 +200,7 @@ function singlerotor(; xfoil = true, # Whether to run XFOIL
run_name=run_name,
prompt=prompt,
verbose=verbose, v_lvl=v_lvl,
optargs...
)
return pfield, rotor
end
Expand Down
2 changes: 1 addition & 1 deletion examples/tandemheavingwing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function tandemheavingwing(; # TEST OPTIONS
run_name=run_name,
prompt=prompt,
verbose=verbose2, v_lvl=v_lvl+1,
save_horseshoes=!wake_coupled
save_horseshoes=!wake_coupled || VehicleType==uns.QVLMVehicle
)

return simulation, pfield
Expand Down
12 changes: 5 additions & 7 deletions examples/vahana/vahana.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@


# ------------ MODULES ---------------------------------------------------------
# Load simulation engine
# import FLOWUnsteady
reload("FLOWUnsteady")
import FLOWUnsteady

uns = FLOWUnsteady
vpm = uns.vpm
vlm = uns.vlm

import GeometricTools
gt = GeometricTools

# ------------ GLOBAL VARIABLES ------------------------------------------------
# Default path where to save data
extdrive_path = "/media/edoalvar/MyExtDrive/simulationdata7/"
extdrive_path = "/media/edoalvar/Samsung_T5/simulationdata202102/"

# Default data path where to find rotor and airfoil data
data_path = joinpath(splitdir(@__FILE__)[1], "../../data/")
data_path = uns.def_data_path

# ------------ HEADERS ---------------------------------------------------------
for header_name in ["geometry", "kinematics", "monitor"]
Expand Down
Loading

0 comments on commit f4802f5

Please sign in to comment.