Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hybrid vortex sheet/point vortex model #60

Merged
merged 11 commits into from
Aug 29, 2023
7 changes: 4 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SchwarzChristoffel = "6e93f119-a087-51f0-a155-b73ce4943121"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"

[compat]
ColorTypes = "0.10, 0.11"
Expand All @@ -28,7 +30,7 @@ ForwardDiff = "<0.10.20"
Interpolations = "0.12.10, 0.13, 0.14"
MacroTools = "0.5.6"
MappedArrays = "0.3.0"
PlotUtils = "1.0"
PlotUtils = "1.0, 1.1, 1.2, 1.3"
RecipesBase = "1.0"
Reexport = "0.2.0, 1"
SchwarzChristoffel = "0.1.13"
Expand All @@ -37,9 +39,8 @@ julia = "1.6"
[extras]
NBInclude = "0db19996-df87-5ea3-a455-e3a50d440464"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "NBInclude", "Plots", "PyPlot", "Statistics"]
test = ["Test", "NBInclude", "Plots", "Statistics"]
1,346 changes: 1,315 additions & 31 deletions binder/notebooks/Airfoil in uniform flow.ipynb

Large diffs are not rendered by default.

1,426 changes: 1,426 additions & 0 deletions binder/notebooks/Hybrid Model.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions binder/notebooks/Moving bodies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2080,9 +2080,9 @@
"lastKernelId": null
},
"kernelspec": {
"display_name": "Julia 1.8.2",
"display_name": "Julia 1.9.2",
"language": "julia",
"name": "julia-1.8"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
Expand Down
6 changes: 3 additions & 3 deletions binder/notebooks/Pitching Plate - K07.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4407,15 +4407,15 @@
"lastKernelId": null
},
"kernelspec": {
"display_name": "Julia 1.4.2",
"display_name": "Julia 1.9.2",
"language": "julia",
"name": "julia-1.4"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.4.2"
"version": "1.9.2"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions binder/notebooks/Point Source Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60667,15 +60667,15 @@
"lastKernelId": null
},
"kernelspec": {
"display_name": "Julia 1.4.2",
"display_name": "Julia 1.9.2",
"language": "julia",
"name": "julia-1.4"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.4.2"
"version": "1.9.2"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions binder/notebooks/Translating Plate - 20°.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14447,15 +14447,15 @@
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.4.2",
"display_name": "Julia 1.9.2",
"language": "julia",
"name": "julia-1.4"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.4.2"
"version": "1.9.2"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions binder/notebooks/Translating Plate - 60°.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8456,9 +8456,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.4.2",
"display_name": "Julia 1.9.2",
"language": "julia",
"name": "julia-1.4"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
Expand Down
4 changes: 2 additions & 2 deletions binder/notebooks/Vortex Sheet Roll-up.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14568,9 +14568,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.4.2",
"display_name": "Julia 1.9.2",
"language": "julia",
"name": "julia-1.4"
"name": "julia-1.9"
},
"language_info": {
"file_extension": ".jl",
Expand Down
3 changes: 3 additions & 0 deletions src/PotentialFlow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __precompile__()
module PotentialFlow

using Reexport
using UnPack

include("Properties.jl")
include("Utils.jl")
Expand Down Expand Up @@ -52,6 +53,8 @@ import .Doublets: Doublet
import .Freestreams: Freestream


include("vorticity_transfer.jl")

#== Plot Recipes ==#

include("plot_recipes.jl")
Expand Down
1 change: 1 addition & 0 deletions src/elements/Plates.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module Plates

using UnPack
using DocStringExtensions
using LinearAlgebra: rmul!

Expand Down
16 changes: 10 additions & 6 deletions src/elements/plates/chebyshev.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,28 @@ import ..Utils: dz_partials, value, Dual, ComplexDual, Partials, valtype


import Base: *, \
struct Transform{T,I,D}
dct!::FFTW.r2rFFTWPlan{T,(3,),true,D}
struct Transform{T,I,FT}
dct!::FT #FFTW.r2rFFTWPlan{T,(3,),true,D}
end

function plan_transform!(x::Vector{T}) where T
Transform{T,true,1}(FFTW.plan_r2r!(x, FFTW.REDFT00))
plan = FFTW.plan_r2r!(x, FFTW.REDFT00)
Transform{T,true,typeof(plan)}(plan)
end

function plan_transform(x::Vector{T}) where T
Transform{T,false,1}(FFTW.plan_r2r!(x, FFTW.REDFT00))
plan = FFTW.plan_r2r!(x, FFTW.REDFT00)
Transform{T,false,typeof(plan)}(plan)
end

function plan_transform!(x::Array{T,2}) where T
Transform{T,true,2}(FFTW.plan_r2r!(x, FFTW.REDFT00,1))
plan = FFTW.plan_r2r!(x, FFTW.REDFT00,1)
Transform{T,true,typeof(plan)}(plan)
end

function plan_transform(x::Array{T,2}) where T
Transform{T,false,2}(FFTW.plan_r2r!(x, FFTW.REDFT00,1))
plan = FFTW.plan_r2r!(x, FFTW.REDFT00,1)
Transform{T,false,typeof(plan)}(plan)
end

(C::Transform{T,true} * x::Vector{T}) where T = transform!(x, C.dct!)
Expand Down
6 changes: 3 additions & 3 deletions src/plot_recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ using RecipesBase
using ColorTypes
import PlotUtils: cgrad

const mygreen = RGBA{Float64}(151/255,180/255,118/255,1)
const mygreen2 = RGBA{Float64}(113/255,161/255,103/255,1)
const myblue = RGBA{Float64}(74/255,144/255,226/255,1)
const mygreen = RGBA(151/255,180/255,118/255,1)
const mygreen2 = RGBA(113/255,161/255,103/255,1)
const myblue = RGBA(74/255,144/255,226/255,1)

@userplot Streamlines

Expand Down
Loading