SPHKernels
Julia implementation of some common SPH kernels
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org, researchgate.net, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.0%) to scientific vocabulary
Keywords from Contributors
Repository
Julia implementation of some common SPH kernels
Basic Info
Statistics
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 15
Metadata Files
README.md
| Documentation | Build Status | Licence | Citation |
|:-----------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:| :-----------------------------------------------------------------------------------------------:|:-----------:|
|
|
|
|
SPHKernels.jl
This package supplies a number of kernels frequently used in Smoothed-Particle Hydrodynamics (SPH), as well as functions to evaluate their values and derivatives in 2D and 3D.
The implementation closely follows the one in Gadget2, see Springel (2005) for details.
These kernels include the B-splines (Cubic and Quintic) suggested in Monaghan & Lattanzio (1985), the Wendland functions (WendlandC2, WendlandC4 and WendlandC6 from Wendland (2009)) as suggested in Dehnen & Aly (2012) and WendlandC8 as suggested by Kummer et. al. (2019).
:warning: The version numbering of this package is unfortunately not really reflective of the state. I made an error on the original setup of the repository, so I had to start out with version 1.0. View this more as v0.2, instead of v2.0!: Please sanity-check everything before you use it in production!
Evaluating Kernels
To evaluate a 3D kernel you need to use the function
julia
kernel_value(k::AbstractSPHKernel, u::Real, h_inv::Real)
where AbstractSPHKernel is the supertype for an implemented SPH kernel, u = \frac{x}{h} is the distance to the kernel origin in measures of the smoothing length and h_inv is the inverse of the smoothing length.
If you want your code to look a little more fancy you can also use the alternative functions 𝒲:
julia
𝒲( kernel::AbstractSPHKernel, u::Real, h_inv::Real) = kernel_value(kernel, u, h_inv)
As an example: ```julia using SPHKernels
Wendland C6 kernel with double precision in 3D
k = WendlandC6(Float64, 3)
distance between the particle and the origin of the kernel
r = 0.5 h = 1.0 hinv = 1.0 / h u = r * hinv
kernel value at position r
val = 𝒲(k, u, h_inv) ```
Evaluating Derivatives
Similar to Evaluating Kernels you can evluate a kernel derivative with
julia
kernel_deriv(k::AbstractSPHKernel, u::Real, h_inv::Real)
or in the fancy way:
julia
d𝒲(kernel::AbstractSPHKernel, u::Real, h_inv::Real) = kernel_deriv(kernel, u, h_inv)
Bias Correction
You can correct for the kernel bias of the Wendland kernels as described in Dehnen & Aly (2012), Eq. 18 + 19 with the functions:
julia
bias_correction(kernel::AbstractSPHKernel, density::Real, m::Real, h_inv::Real, n_neighbours::Integer)
or again in the fancy way
julia
δρ(kernel::AbstractSPHKernel, density::Real, m::Real, h_inv::Real, n_neighbours::Integer) = bias_correction(kernel, density, m, h_inv, n_neighbours)
This will return a new value for the density:
```julia using SPHKernels density = 1.0 kernel = WendlandC6(3)
correct density
density = bias_correction(kernel, density, 1.0, 0.5, 295) ```
Owner
- Name: Ludwig
- Login: LudwigBoess
- Kind: user
- Location: Munich
- Repositories: 20
- Profile: https://github.com/LudwigBoess
I'm a PhD student at the University Observatory Munich working on cosmological MHD simulations.
GitHub Events
Total
- Delete event: 1
- Issue comment event: 2
- Push event: 2
- Pull request event: 3
- Create event: 2
Last Year
- Delete event: 1
- Issue comment event: 2
- Push event: 2
- Pull request event: 3
- Create event: 2
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 119
- Total Committers: 7
- Avg Commits per committer: 17.0
- Development Distribution Score (DDS): 0.378
Top Committers
| Name | Commits | |
|---|---|---|
| LudwigBoess | l****s@u****e | 74 |
| Ludwig Böss | l****s@o****e | 23 |
| Ludwig Boess | d****g@c****e | 11 |
| Ludwig | 3****s@u****m | 6 |
| github-actions[bot] | 4****]@u****m | 2 |
| Julia Package Butler | 2 | |
| CompatHelper Julia | c****y@j****g | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 10
- Total pull requests: 28
- Average time to close issues: 5 months
- Average time to close pull requests: 2 days
- Total issue authors: 4
- Total pull request authors: 3
- Average comments per issue: 6.2
- Average comments per pull request: 0.93
- Merged pull requests: 26
- Bot issues: 0
- Bot pull requests: 8
Past Year
- Issues: 0
- Pull requests: 6
- Average time to close issues: N/A
- Average time to close pull requests: about 19 hours
- Issue authors: 0
- Pull request authors: 3
- Average comments per issue: 0
- Average comments per pull request: 0.67
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 3
Top Authors
Issue Authors
- AhmedSalih3d (4)
- LudwigBoess (3)
- PharmCat (2)
- JuliaTagBot (1)
Pull Request Authors
- LudwigBoess (23)
- github-actions[bot] (8)
- dependabot[bot] (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 30 total
- Total dependent packages: 1
- Total dependent repositories: 0
- Total versions: 16
juliahub.com: SPHKernels
Julia implementation of some common SPH kernels
- Documentation: https://docs.juliahub.com/General/SPHKernels/stable/
- License: MIT
-
Latest release: 2.4.1
published about 1 year ago
Rankings
Dependencies
- actions/checkout v2 composite
- davidanthoff/julia-pkgbutler releases/v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest latest composite
- julia-actions/setup-julia latest composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest latest composite
- julia-actions/setup-julia latest composite
- actions/checkout v2 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-docdeploy releases/v1 composite
- JuliaRegistries/TagBot v1 composite