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

Need introductory examples with pictures! #3

Open
arturgower opened this issue Jul 27, 2023 · 0 comments
Open

Need introductory examples with pictures! #3

arturgower opened this issue Jul 27, 2023 · 0 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@arturgower
Copy link
Member

ksa = bearing.outer_radius * ω / steel.cs
# estimate the largest basis_order that a wave scattered from the inner boundary can be measured at the outer boundary
# basis_order = estimate_basisorder(ω, bearing; tol =1e-5)
basis_order = 5
basis_length = basisorder_to_basislength(Acoustic{Float64,2}, basis_order)
# 0.0 and 2pi are the same point
θs = LinRange(0.0,2pi, basis_length + 1)[1:end-1]
# let's create a focused pressure on the inner boundary
fs = θs .* 0 + θs .* 0im |> collect;
fp = θs .* 0 + θs .* 0im |> collect;
# fp[1:3] = 1e5 .* ones(3) - 1e5im .* ones(3)
fp[1] = 1e5
θ0 = θs[1]
x0 = radial_to_cartesian_coordinates([bearing.inner_radius, θ0])
bd1 = BoundaryData(TractionBoundary(inner = true); θs = θs, fields = hcat(fp,fs))
bd2 = BoundaryData(TractionBoundary(outer = true); θs = θs, fields = hcat(fs,fs))
sim = BearingSimulation(ω, bearing, bd1, bd2)
# let's have a look at the modes that were calculated during the Bearing. This is the field we will actual approximate
inner_field = fouriermodes_to_fields(θs,sim.boundarydata1.fourier_modes)
@test norm(inner_field[:,1] - fp) < 1e-10

The code above should form the basis of an introductory example on the landing page of this package. It is easier to explain the method in terms of the traction applied at boundaries rather than the Fourier modes. But can add Fourier mode example too.

@arturgower arturgower added the good first issue Good for newcomers label Jul 27, 2023
@jessica-kent jessica-kent self-assigned this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants