diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml index 23e8cec2f..e68bc1023 100644 --- a/.JuliaFormatter.toml +++ b/.JuliaFormatter.toml @@ -1,14 +1,8 @@ # Use SciML style: https://github.com/SciML/SciMLStyle style = "sciml" -# Python style alignment. See https://github.com/domluna/JuliaFormatter.jl/pull/732. -yas_style_nesting = true - # Align struct fields for better readability of large struct definitions align_struct_field = true # No whitespaces in kwargs because this is more common in Julia whitespace_in_kwargs = false - -# Allow Dict definitions to be aligned like arrays. See https://github.com/domluna/JuliaFormatter.jl/pull/676 -variable_call_indent = ["Dict"] diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 77707aa1d..000000000 --- a/.codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ -github_checks: - annotations: false diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d60f0707f..700707ced 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,4 +4,4 @@ updates: - package-ecosystem: "github-actions" directory: "/" # Location of package manifests schedule: - interval: "monthly" + interval: "weekly" diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index f77210b70..d298b8589 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -13,4 +13,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} # optional - run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "test", "docs"])' + run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "test"])' diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml deleted file mode 100644 index a748be851..000000000 --- a/.github/workflows/Documenter.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Documentation - -on: - push: - branches: - - 'main' - tags: '*' - paths-ignore: - - '.github/workflows/ci.yml' - - '.github/workflows/CompatHelper.yml' - - '.github/workflows/TagBot.yml' - pull_request: - paths-ignore: - - '.github/workflows/ci.yml' - - '.github/workflows/CompatHelper.yml' - - '.github/workflows/TagBot.yml' - workflow_dispatch: - -concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: only if it is a pull request build. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} - -jobs: - build-docs: - name: Build and Deploy Documentation - runs-on: ubuntu-latest - steps: - - name: Check out project - uses: actions/checkout@v4 - - name: Set up Julia - uses: julia-actions/setup-julia@v2 - with: - version: '1' - show-versioninfo: true - - uses: julia-actions/cache@v2 - - name: Build package - uses: julia-actions/julia-buildpkg@v1 - - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key - run: julia --project=docs --color=yes docs/make.jl diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml deleted file mode 100644 index bdd275a5c..000000000 --- a/.github/workflows/FormatCheck.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Format Check - -on: - push: - branches: - - 'main' - tags: '*' - pull_request: - -jobs: - check-format: - name: Check format with JuliaFormatter.jl - runs-on: ubuntu-latest - steps: - - name: Check out project - uses: actions/checkout@v4 - - name: Set up Julia - uses: julia-actions/setup-julia@v2 - with: - version: '1' - - run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)' - - uses: julia-actions/cache@v2 - - name: Install JuliaFormatter and format - # This will use the latest version by default but you can set the version like so: - # - # julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))' - run: | - julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"))' - julia -e 'using JuliaFormatter; format(".")' - - name: Format check - run: | - julia -e ' - out = Cmd(`git diff --name-only`) |> read |> String - if out == "" - exit(0) - else - @error "Some files have not been formatted !!!" - write(stdout, out) - exit(1) - end' diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 10bcc2278..024953789 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -8,6 +8,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Check spelling - uses: crate-ci/typos@v1.21.0 + uses: crate-ci/typos@v1.14.10 diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml deleted file mode 100644 index 2bacdb87e..000000000 --- a/.github/workflows/TagBot.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: TagBot -on: - issue_comment: - types: - - created - workflow_dispatch: - inputs: - lookback: - default: 3 -permissions: - actions: read - checks: read - contents: write - deployments: read - issues: read - discussions: read - packages: read - pages: read - pull-requests: read - repository-projects: read - security-events: read - statuses: read -jobs: - TagBot: - if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' - runs-on: ubuntu-latest - steps: - - uses: JuliaRegistries/TagBot@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ssh: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b115c6937..0b647e5d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,30 +4,9 @@ on: push: branches: - main - paths-ignore: - - 'AUTHORS.md' - - 'CITATION.bib' - - 'CONTRIBUTING.md' - - 'LICENSE.md' - - 'NEWS.md' - - 'README.md' - - '.github/workflows/CompatHelper.yml' - - '.github/workflows/TagBot.yml' - - 'docs/**' pull_request: - paths-ignore: - - 'AUTHORS.md' - - 'CITATION.bib' - - 'CONTRIBUTING.md' - - 'LICENSE.md' - - 'NEWS.md' - - 'README.md' - - '.github/workflows/CompatHelper.yml' - - '.github/workflows/TagBot.yml' - - 'docs/**' workflow_dispatch: - # Cancel redundant CI tests automatically concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -35,62 +14,39 @@ concurrency: jobs: build: - name: Run Tests (Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}) runs-on: ubuntu-latest - strategy: - # Don't cancel all running jobs when one job fails - fail-fast: false - matrix: - version: - - '1.9' - - '1' - os: - - ubuntu-latest - arch: - - x64 - include: - # Also run tests on Windows and macOS-ARM, but only with the latest Julia version - - version: '1' - os: windows-latest - arch: x64 - - version: '1' - os: macos-14 - arch: arm64 steps: - name: Check out project - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Set up Julia - uses: julia-actions/setup-julia@v2 + uses: julia-actions/setup-julia@v1 with: - version: ${{ matrix.version }} - - uses: julia-actions/cache@v2 + version: '1' + - name: Apply JuliaFormatter and check format + run: | + julia -e 'using Pkg; Pkg.add("JuliaFormatter")' + julia -e 'using JuliaFormatter; !format(".", verbose=true) && + error("Code not properly formatted")' - name: Build package uses: julia-actions/julia-buildpkg@v1 - name: Run unit tests uses: julia-actions/julia-runtest@v1 with: - annotate: true - # Only run coverage in one Job (Ubuntu and latest Julia version) - coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.version == '1' }} + coverage: true env: TRIXIPARTICLES_TEST: unit - name: Process coverage results - # Only run coverage in one Job (Ubuntu and latest Julia version) - if: matrix.os == 'ubuntu-latest' && matrix.version == '1' uses: julia-actions/julia-processcoverage@v1 with: - directories: src,test + directories: src,test,examples - name: Upload coverage report to Codecov - # Only run coverage in one Job (Ubuntu and latest Julia version) - if: matrix.os == 'ubuntu-latest' && matrix.version == '1' - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} files: lcov.info fail_ci_if_error: true flags: unit - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Run example tests uses: julia-actions/julia-runtest@v1 with: diff --git a/.gitignore b/.gitignore index 982d00835..637a572c5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,20 +4,4 @@ Manifest.toml out out_* docs/build -docs/src/authors.md -docs/src/contributing.md -docs/src/license.md -docs/src/code_of_conduct.md -docs/src/news.md -*_replaced.md -run -*.json -!.zenodo.json -*.png -*.jpg -*.gif -*.svg -*.vtu -*.pvd -*.mp4 -*.csv +env diff --git a/.typos.toml b/.typos.toml index ce360954c..1de025e42 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,6 +1,2 @@ [default.extend-words] ba = "ba" -Shepard = "Shepard" -shepard = "shepard" -Strack = "Strack" -Lok = "Lok" diff --git a/.zenodo.json b/.zenodo.json deleted file mode 100644 index 1b2cefaeb..000000000 --- a/.zenodo.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "description": "Particle-based multiphysics simulations in Julia", - "license": "MIT", - "title": "TrixiParticles.jl", - "upload_type": "software", - "creators": [ - { - "affiliation": "Department of Mathematics and Computer Science, University of Cologne, Germany", - "name": "Faulhaber, Erik", - "orcid": "0000-0001-9788-5949" - }, - { - "affiliation": "High-Performance Computing Center Stuttgart, University of Stuttgart, Germany", - "name": "Neher, Niklas", - "orcid": "0009-0004-2472-0923" - }, - { - "affiliation": "Institute of Surface Science, Helmholtz-Zentrum hereon, Germany", - "name": "Berger, Sven", - "orcid": "0000-0001-6083-7038" - }, - { - "affiliation": "High-Performance Scientific Computing, University of Augsburg, Germany", - "name": "Schlottke-Lakemper, Michael", - "orcid": "0000-0002-3195-2536" - }, - { - "affiliation": "Department of Mathematics and Computer Science, University of Cologne, Germany", - "name": "Gassner, Gregor J.", - "orcid": "0000-0002-1752-1158" - } - ], - "access_right": "open" -} diff --git a/AUTHORS.md b/AUTHORS.md deleted file mode 100644 index 073e9317c..000000000 --- a/AUTHORS.md +++ /dev/null @@ -1,25 +0,0 @@ -# Authors - -TrixiParticles.jl's development is coordinated by a group of *principal developers*, -who are also its main contributors and who can be contacted in case of -questions about TrixiParticles.jl. In addition, there are *contributors* who have -provided substantial additions or modifications. Together, these two groups form -"The TrixiParticles.jl Authors" as mentioned in the [LICENSE.md](LICENSE.md) file. - -## Principal Developers -* [Erik Faulhaber](https://www.mi.uni-koeln.de/NumSim/erik-faulhaber/), - University of Cologne, Germany -* [Niklas Neher](https://www.ihr.uni-stuttgart.de/institut/team/Neher-00004/), - High-Performance Computing Center Stuttgart (HLRS), Germany -* [Sven Berger](https://www.hereon.de/institutes/surface_science/interface_modeling/team/098972/index.php.de), - Helmholtz Center Hereon, Germany - -## Contributors -The following people contributed major additions or modifications to TrixiParticles.jl and -are listed in alphabetical order: -* Sven Berger -* Erik Faulhaber -* Gregor Gassner -* Niklas Neher -* Hendrik Ranocha -* Michael Schlottke-Lakemper diff --git a/CITATION.bib b/CITATION.bib deleted file mode 100644 index 739a83c65..000000000 --- a/CITATION.bib +++ /dev/null @@ -1,8 +0,0 @@ -@misc{trixiparticles, - title={{T}rixi{P}articles.jl: {P}article-based multiphysics simulations in {J}ulia}, - author={Erik Faulhaber and Niklas Neher and Sven Berger and - Michael Schlottke-Lakemper and Gregor Gassner}, - year={2024}, - howpublished={\url{https://github.com/trixi-framework/TrixiParticles.jl}}, - doi={10.5281/zenodo.10797541} -} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index e9f99ce1b..000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,131 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to -[Michael Schlottke-Lakemper](mailto:michael.schlottke-lakemper@uni-a.de), -[Sven Berger](mailto:sven.berger@hereon.de), -or any other of the principal developers responsible for enforcement listed in -[AUTHORS.md](AUTHORS.md). -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index a989300b7..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,54 +0,0 @@ -# Contributing - -TrixiParticles.jl is an open-source project and we are very happy to accept contributions -from the community. Please feel free to open issues or submit patches (preferably -as pull requests) any time. For planned larger contributions, it is often -beneficial to get in contact with one of the principal developers first (see -[AUTHORS.md](AUTHORS.md)). - -TrixiParticles.jl and its contributions are licensed under the MIT license (see -[LICENSE.md](LICENSE.md)). As a contributor, you certify that all your -contributions are in conformance with the *Developer Certificate of Origin -(Version 1.1)*, which is reproduced below. - -## Developer Certificate of Origin (Version 1.1) -The following text was taken from -[https://developercertificate.org](https://developercertificate.org): - - Developer Certificate of Origin - Version 1.1 - - Copyright (C) 2004, 2006 The Linux Foundation and its contributors. - 1 Letterman Drive - Suite D4700 - San Francisco, CA, 94129 - - Everyone is permitted to copy and distribute verbatim copies of this - license document, but changing it is not allowed. - - - Developer's Certificate of Origin 1.1 - - By making a contribution to this project, I certify that: - - (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - - (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - - (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - - (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index a2a9dfc69..000000000 --- a/LICENSE.md +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2023-present The TrixiParticles.jl Authors (see [AUTHORS.md](AUTHORS.md)) \ -Copyright (c) 2023-present Helmholtz-Zentrum hereon GmbH, Institute of Surface Science \ - \ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/NEWS.md b/NEWS.md deleted file mode 100644 index 5d7a295d8..000000000 --- a/NEWS.md +++ /dev/null @@ -1,55 +0,0 @@ -# Changelog - -TrixiParticles.jl follows the interpretation of [semantic versioning (semver)](https://julialang.github.io/Pkg.jl/dev/compatibility/#Version-specifier-format-1) -used in the Julia ecosystem. Notable changes will be documented in this file for human readability. -We aim at 3 to 4 month between major release versions and about 2 weeks between minor versions. - -## Version 0.2.x - -### Highlights - -### Added - -### Removed - -### Deprecated - -## Version 0.1.3 - -### Added -Open boundaries using the method of characteristics based on the work of Lastiwka et al., "Permeable and non-reflecting boundary conditions in SPH" (2009) were added for WCSPH and EDAC. - -## Version 0.1.2 - -### Added -A surface tension and adhesion model based on the work by Akinci et al., "Versatile Surface Tension and Adhesion for SPH Fluids" (2013) was added to WCSPH. - -## Version 0.1.1 - -### Highlights - -#### Discrete Element Method -A basic implementation of the discrete element method was added. - -# Pre Initial Release (v0.1.0) -This section summarizes the initial features that TrixiParticles.jl was released with. - -## Highlights -### EDAC -An implementation of EDAC (Entropically Damped Artificial Compressibility) was added, -which allows for more stable simulations compared to basic WCSPH and reduces spurious pressure oscillations. - -### WCSPH -An implementation of WCSPH (Weakly Compressible Smoothed Particle Hydrodynamics), which is the classical SPH approach. - -Features: -- Correction schemes (Shepard (0. Order) ... MixedKernelGradient (1. Order)) -- Density reinitialization -- Kernel summation and Continuity equation density formulations -- Flexible boundary conditions e.g. dummy particles with Adami pressure extrapolation, pressure zeroing, pressure mirroring... -- Moving boundaries -- Density diffusion based on the models by Molteni & Colagrossi (2009), Ferrari et al. (2009) and Antuono et al. (2010). - - -### TLSPH -An implementation of TLSPH (Total Lagrangian Smoothed Particle Hydrodynamics) for solid bodies enabling FSI (Fluid Structure Interactions). diff --git a/Project.toml b/Project.toml index 981c36192..11121676d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,52 +1,33 @@ name = "TrixiParticles" uuid = "66699cd8-9c01-4e9d-a059-b96c86d16b3a" authors = ["erik.faulhaber <44124897+efaulhaber@users.noreply.github.com>"] -version = "0.1.4-dev" +version = "0.1.0" [deps] -Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" -FastPow = "c0e83750-1142-43a8-81cf-6c956b72b4d1" -ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" -GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" -PointNeighbors = "1c4d5385-0a27-49de-8e2c-43b175c8985c" +Morton = "2a6d852e-3fac-5a38-885c-fe708af2d09e" Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" -RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +SimpleUnPack = "ce78b400-467f-4804-87d8-8f486da07d0a" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StrideArrays = "d1fa6d79-ef01-42a6-86c9-f7c551f8593b" +ThreadingUtilities = "8290d209-cae3-49c0-8002-c8c24d57dab5" TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -TrixiBase = "9a0f1c46-06d5-4909-a5a3-ce25d3fa3284" WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192" [compat] -Adapt = "3, 4" -CSV = "0.10" -DataFrames = "1.6" -DiffEqCallbacks = "2.25, 3" -FastPow = "0.1" -ForwardDiff = "0.10" -GPUArrays = "9, 10" -JSON = "0.21" -KernelAbstractions = "0.9" -MuladdMacro = "0.2" -PointNeighbors = "0.2.3" -Polyester = "0.7.5" -RecipesBase = "1" +DiffEqCallbacks = "2.25" +Morton = "0.1" +Polyester = "0.7" Reexport = "1" -SciMLBase = "1, 2" +SciMLBase = "1" +SimpleUnPack = "1" StaticArrays = "1" StrideArrays = "0.1" +ThreadingUtilities = "0.5" TimerOutputs = "0.5" -TrixiBase = "0.1.3" WriteVTK = "1" -julia = "1.9" diff --git a/README.md b/README.md index 76b288ed2..60a4f7188 100644 --- a/README.md +++ b/README.md @@ -1,152 +1,5 @@ # TrixiParticles.jl -[![Docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://trixi-framework.github.io/TrixiParticles.jl/stable) -[![Docs-dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://trixi-framework.github.io/TrixiParticles.jl/dev) -[![Slack](https://img.shields.io/badge/chat-slack-e01e5a)](https://join.slack.com/t/trixi-framework/shared_invite/zt-sgkc6ppw-6OXJqZAD5SPjBYqLd8MU~g) -[![Youtube](https://img.shields.io/youtube/channel/views/UCpd92vU2HjjTPup-AIN0pkg?style=social)](https://www.youtube.com/@trixi-framework) [![CI](https://github.com/trixi-framework/TrixiParticles.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/trixi-framework/TrixiParticles.jl/actions/workflows/ci.yml) [![codecov](https://codecov.io/github/trixi-framework/TrixiParticles.jl/branch/main/graph/badge.svg?token=RDZXYbij0b)](https://codecov.io/github/trixi-framework/TrixiParticles.jl) [![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle) -[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT) -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10797541.svg)](https://zenodo.org/doi/10.5281/zenodo.10797541) - -**TrixiParticles.jl** is a numerical simulation framework designed for particle-based numerical methods, with an emphasis on multiphysics applications, written in [Julia](https://julialang.org). -A primary goal of the framework is to be user-friendly for engineering, science, and educational purposes. In addition to its extensible design and optimized implementation, we prioritize the user experience, including installation, pre- and postprocessing. -Its features include: - -## Features -- Incompressible Navier-Stokes - - Methods: Weakly Compressible Smoothed Particle Hydrodynamics (WCSPH), Entropically Damped Artificial Compressibility (EDAC) - - Models: Surface Tension, Open Boundaries -- Solid-body mechanics - - Methods: Total Lagrangian SPH (TLSPH), Discrete Element Method (DEM) -- Fluid-Structure Interaction -- Output formats: - - VTK - -## Examples -We provide several example simulation setups in the `examples` folder (which can be accessed from Julia via `examples_dir()`). - - - - - - - - - - - - - - -
-
2D Dam Break
-
-
Moving Wall
-
-
Oscillating Beam
-
-
Dam Break with Elastic Plate
-
- - -## Installation -If you have not yet installed Julia, please [follow the instructions for your -operating system](https://julialang.org/downloads/platform/). TrixiParticles.jl works -with Julia v1.9 and newer. We recommend using the latest stable release of Julia. - -### For users -TrixiParticles.jl is a registered Julia package. -You can install TrixiParticles.jl, -[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) (used for time integration) -and [Plots.jl](https://github.com/JuliaPlots/Plots.jl) by executing the following commands -in the Julia REPL: -```julia -julia> using Pkg - -julia> Pkg.add(["TrixiParticles", "OrdinaryDiffEq", "Plots"]) -``` - -### For developers -If you plan on editing TrixiParticles.jl itself, you can download TrixiParticles.jl -to a local folder and use the code from the cloned directory: -```bash -git clone git@github.com:trixi-framework/TrixiParticles.jl.git -cd TrixiParticles.jl -mkdir run -julia --project=run -e 'using Pkg; Pkg.develop(PackageSpec(path="."))' # Add TrixiParticles.jl to `run` project -julia --project=run -e 'using Pkg; Pkg.add("OrdinaryDiffEq", "Plots")' # Add additional packages -``` - -If you installed TrixiParticles.jl this way, you always have to start Julia with the -`--project` flag set to your `run` directory, e.g., -```bash -julia --project=run -``` -from the TrixiParticles.jl root directory. -Further details can be found in the [documentation](https://trixi-framework.github.io/TrixiParticles.jl/stable). - -## Usage - -In the Julia REPL, first load the package TrixiParticles.jl. -```jldoctest getting_started -julia> using TrixiParticles -``` - -Then start the simulation by executing -```jldoctest getting_started; filter = r".*"s -julia> trixi_include(joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl")) -``` - -This will open a new window with a 2D visualization of the final solution: - - -Further details can be found in the [documentation](https://trixi-framework.github.io/TrixiParticles.jl/stable). - -## Documentation - -You can find the documentation for the latest release -[here](https://trixi-framework.github.io/TrixiParticles.jl/stable). - -## Publications - -## Cite Us - -If you use TrixiParticles.jl in your own research or write a paper using results obtained -with the help of TrixiParticles.jl, please cite it as -```bibtex -@misc{trixiparticles, - title={{T}rixi{P}articles.jl: {P}article-based multiphysics simulations in {J}ulia}, - author={Erik Faulhaber and Niklas Neher and Sven Berger and - Michael Schlottke-Lakemper and Gregor Gassner}, - year={2024}, - howpublished={\url{https://github.com/trixi-framework/TrixiParticles.jl}}, - doi={10.5281/zenodo.10797541} -} -``` - -## Authors -Erik Faulhaber (University of Cologne) and Niklas Neher (HLRS) implemented the foundations -for TrixiParticles.jl and are principal developers along with Sven Berger (hereon). -The project was started by Michael Schlottke-Lakemper (University of Augsburg) -and Gregor Gassner (University of Cologne), who provide scientific direction and technical advice. -The full list of contributors can be found in [AUTHORS.md](AUTHORS.md). - -## License and contributing -TrixiParticles.jl is licensed under the MIT license (see [LICENSE.md](LICENSE.md)). Since TrixiParticles.jl is -an open-source project, we are very happy to accept contributions from the -community. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for more details. -Note that we strive to be a friendly, inclusive open-source community and ask all members -of our community to adhere to our [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md). -To get in touch with the developers, -[join us on Slack](https://join.slack.com/t/trixi-framework/shared_invite/zt-sgkc6ppw-6OXJqZAD5SPjBYqLd8MU~g) -or [create an issue](https://github.com/trixi-framework/TrixiParticles.jl/issues/new). - -## Acknowledgments -

-     -     -

- -The project has benefited from funding from [hereon](https://www.hereon.de/) and [HiRSE](https://www.helmholtz-hirse.de/). diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 008cae1aa..000000000 --- a/SECURITY.md +++ /dev/null @@ -1,30 +0,0 @@ -# Security Policy - -The Trixi.jl development team takes security issues seriously. We appreciate -all efforts to responsibly disclose any security issues and will make every -effort to acknowledge contributions. - - -## Supported Versions - -The current stable release following the interpretation of -[semantic versioning (SemVer)](https://julialang.github.io/Pkg.jl/dev/compatibility/#Version-specifier-format-1) -used in the Julia ecosystem is supported with security updates. - - -## Reporting a Vulnerability - -To report a security issue, please use the GitHub Security Advisory -["Report a Vulnerability"](https://github.com/trixi-framework/TrixiParticles.jl/security/advisories/new) -tab. - -We will send a response indicating the next steps in handling your report. -After the initial reply to your report, we will keep you informed of the -progress towards a fix and full announcement, and may ask for additional -information or guidance. - -Please report security bugs in third-party modules directly to the person -or team maintaining the module. - -Public notifications of vulnerabilities will be shared in community channels -such as Slack. diff --git a/docs/Project.toml b/docs/Project.toml deleted file mode 100644 index 7ada97297..000000000 --- a/docs/Project.toml +++ /dev/null @@ -1,9 +0,0 @@ -[deps] -Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -TrixiBase = "9a0f1c46-06d5-4909-a5a3-ce25d3fa3284" - -[compat] -Documenter = "1" -OrdinaryDiffEq = "6" -TrixiBase = "0.1" diff --git a/docs/make.jl b/docs/make.jl index 3fcf40ece..d42d009be 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,140 +1,3 @@ -using Documenter -using TrixiParticles -using TrixiBase +using Documenter, TrixiParticles -# Get TrixiParticles.jl root directory -trixiparticles_root_dir = dirname(@__DIR__) - -# Copy files to not need to synchronize them manually -function copy_file(filename, replaces...; - new_file=joinpath(@__DIR__, "src", lowercase(filename))) - source_path = joinpath(trixiparticles_root_dir, filename) - - if !isfile(source_path) - error("File $filename not found. Ensure that you provide a path relative to the TrixiParticles.jl root directory.") - return - end - - content = read(source_path, String) - content = replace(content, replaces...) - - header = """ - ```@meta - EditURL = "https://github.com/trixi-framework/TrixiParticles.jl/blob/main/$filename" - ``` - """ - content = header * content - - write(new_file, content) -end - -function replace_with_code(filename) - if !isfile(filename) - cwd = pwd() - error("Markdown file not found: $filename in directory: $cwd") - return - end - - # Define a regex pattern to match the include markers - pattern = r"!!include:([^\s!]+\.jl)!!" - - function replace_include(match_::SubString{String}) - # Extract the filename using regex - m = match(pattern, match_) - if m === nothing - error("Invalid include format in: $match") - end - file_to_include = joinpath(trixiparticles_root_dir, m.captures[1]) - - try - # Check if the Julia file exists - if !isfile(file_to_include) - error("File to include not found: $(file_to_include)") - end - - # Read the content of the file to include - return read(file_to_include, String) - catch e - # In case of any error - error("Unable to include file $(file_to_include): $(e)") - end - end - - # Replace all occurrences in the markdown content - filename_noext, extension = splitext(filename) - copy_file(filename, new_file="$(filename_noext)_replaced$extension", - pattern => replace_include) -end - -replace_with_code("docs/src/tutorials/tut_setup.md") -replace_with_code("docs/src/tutorials/tut_dam_break.md") -replace_with_code("docs/src/tutorials/tut_beam.md") -replace_with_code("docs/src/tutorials/tut_falling.md") - -copy_file("AUTHORS.md", - "in the [LICENSE.md](LICENSE.md) file" => "under [License](@ref)") -copy_file("CONTRIBUTING.md", - "[AUTHORS.md](AUTHORS.md)" => "[Authors](@ref)", - "[LICENSE.md](LICENSE.md)" => "[License](@ref)") -# Add section `# License` and add `>` in each line to add a quote -copy_file("LICENSE.md", - "[AUTHORS.md](AUTHORS.md)" => "[Authors](@ref)", - "\n" => "\n> ", r"^" => "# License\n\n> ") -# Add section `# Code of Conduct` and add `>` in each line to add a quote -copy_file("CODE_OF_CONDUCT.md", - "[AUTHORS.md](AUTHORS.md)" => "[Authors](@ref)", - "\n" => "\n> ", r"^" => "# Code of Conduct\n\n> ") -copy_file("NEWS.md") - -# Define module-wide setups such that the respective modules are available in doctests -DocMeta.setdocmeta!(TrixiParticles, :DocTestSetup, :(using TrixiParticles); recursive=true) - -makedocs(sitename="TrixiParticles.jl", - # Run doctests and check docs for the following modules - modules=[TrixiParticles], - format=Documenter.HTML(), - # Explicitly specify documentation structure - pages=[ - "Home" => "index.md", - "News" => "news.md", - "Installation" => "install.md", - "Getting started" => "getting_started.md", - "Development" => "development.md", - "Tutorial" => "tutorial.md", - "Examples" => "examples.md", - "Visualization" => "visualization.md", - "Components" => [ - "Overview" => "overview.md", - "General" => [ - "Semidiscretization" => joinpath("general", "semidiscretization.md"), - "Initial Condition and Setups" => joinpath("general", - "initial_condition.md"), - "Interpolation" => joinpath("general", "interpolation.md"), - "Density Calculators" => joinpath("general", "density_calculators.md"), - "Smoothing Kernels" => joinpath("general", "smoothing_kernels.md"), - "Neighborhood Search" => joinpath("general", "neighborhood_search.md"), - "Util" => joinpath("general", "util.md"), - ], - "Systems" => [ - "Discrete Element Method (Solid)" => joinpath("systems", - "dem.md"), - "Weakly Compressible SPH (Fluid)" => joinpath("systems", - "weakly_compressible_sph.md"), - "Entropically Damped Artificial Compressibility for SPH (Fluid)" => joinpath("systems", - "entropically_damped_sph.md"), - "Total Lagrangian SPH (Elastic Structure)" => joinpath("systems", - "total_lagrangian_sph.md"), - "Boundary" => joinpath("systems", "boundary.md"), - ], - "Time Integration" => "time_integration.md", - "Callbacks" => "callbacks.md", - "TrixiBase.jl API Reference" => "reference-trixibase.md", - ], - "Authors" => "authors.md", - "Contributing" => "contributing.md", - "Code of Conduct" => "code_of_conduct.md", - "License" => "license.md", - ]) - -deploydocs(repo="github.com/trixi-framework/TrixiParticles.jl", - devbranch="main", push_preview=true) +makedocs(sitename="TrixiParticles.jl") diff --git a/docs/src/callbacks.md b/docs/src/callbacks.md deleted file mode 100644 index c96ccc7db..000000000 --- a/docs/src/callbacks.md +++ /dev/null @@ -1,16 +0,0 @@ -# Callbacks - -```@autodocs -Modules = [TrixiParticles] -Pages = map(file -> joinpath("callbacks", file), readdir(joinpath("..", "src", "callbacks"))) -``` - -# [Custom Quantities](@id custom_quantities) - -The following pre-defined custom quantities can be used with the -[`SolutionSavingCallback`](@ref) and [`PostprocessCallback`](@ref). - -```@autodocs -Modules = [TrixiParticles] -Pages = ["general/custom_quantities.jl"] -``` diff --git a/docs/src/development.md b/docs/src/development.md deleted file mode 100644 index 8ffb75af5..000000000 --- a/docs/src/development.md +++ /dev/null @@ -1,68 +0,0 @@ -# [Development](@id development) - - -## Preview of the documentation - -To generate the Documentation, first instantiate the `docs` environment -by executing the following command from the TrixiParticles.jl root directory: -```bash -julia --project=docs -e "using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()" -``` -This command only has to be run once. After that, maintain the `docs` environment -as described under [Installation](@ref installation-issues). - -With an instantiated `docs` environment, generate the docs with the following command (again from the TrixiParticles.jl root directory): -```bash -julia --project=docs --color=yes docs/make.jl -``` -You can then open the generated files in `docs/build` with your webbrowser. -Alternatively, run -```bash -python3 -m http.server -d docs/build -``` -and open `localhost:8000` in your webbrowser. - - -## Release management - -To create a new release for TrixiParticles.jl, perform the following steps: -1) Make sure that all PRs and changes that you want to go into the release are merged to - `main` and that the latest commit on `main` has passed all CI tests. -2) Determine the currently released version of TrixiParticles.jl, e.g., on the - [release page](https://github.com/trixi-framework/TrixiParticles.jl/releases). For this manual, - we will assume that the latest release was `v0.2.3`. -3) Decide on the next version number. We follow [semantic versioning](https://semver.org/), - thus each version is of the form `vX.Y.Z` where `X` is the major version, `Y` the minor - version, and `Z` the patch version. In this manual, we assume that the major version is - always `0`, thus the decision process on the new version is as follows: - * If the new release contains *breaking changes* (i.e., user code might not work as - before without modifications), increase the *minor* version by one and set the - *patch* version to zero. In our example, the new version should thus be `v0.3.0`. - * If the new release only contains minor modifications and/or bug fixes, the *minor* - version is kept as-is and the *patch* version is increased by one. In our example, the - new version should thus be `v0.2.4`. -4) Edit the `version` string in the - [`Project.toml`](https://github.com/trixi-framework/TrixiParticles.jl/blob/main/Project.toml) - and set it to the new version. Push/merge this change to `main`. -5) Go to GitHub and add a comment to the commit that you would like to become the new - release (typically this will be the commit where you just updated the version). You can - comment on a commit by going to the - [commit overview](https://github.com/trixi-framework/TrixiParticles.jl/commits/main/) and clicking - on the title of the commit. The comment should contain the following text: - ``` - @JuliaRegistrator register - ``` -6) Wait for the magic to happen! Specifically, JuliaRegistrator will create a new PR to the - Julia registry with the new release information. After a grace period of ~15 minutes, - this PR will be merged automatically. A short while after, - [TagBot](https://github.com/trixi-framework/TrixiParticles.jl/blob/main/.github/workflows/TagBot.yml) - will create a new release of TrixiParticles.jl in our GitHub repository. -7) Once the new release has been created, the new version can be obtained through the Julia - package manager as usual. -8) To make sure people do not mistake the latest state of `main` as the latest release, we - set the version in the `Project.toml` to a *development* version. The development version - should be the latest released version, with the patch version incremented by one, and the - `-dev` suffix added. For example, if you just released `v0.3.0`, the new development - version should be `v0.3.1-dev`. If you just released `v0.2.4`, the new development - version should be `v0.2.5-dev`. - diff --git a/docs/src/examples.md b/docs/src/examples.md deleted file mode 100644 index 57ac2eb7c..000000000 --- a/docs/src/examples.md +++ /dev/null @@ -1,68 +0,0 @@ -# Examples - -## Fluid - -### Accelerated Tank 2D (`fluid/accelerated_tank_2d.jl`) -```@raw html - -``` - -### Dam Break 2D (`fluid/dam_break_2d.jl`) -```@raw html - -``` - -### Dam Break 3D (`fluid/dam_break_3d.jl`) -```@raw html - -``` - -### Falling Water Column (`fluid/falling_water_column_2d.jl`) -```@raw html - -``` - -### Hydrostatic Water Column (`fluid/hydrostatic_water_column_*.jl`) -```@raw html - -``` - -### Moving Wall (`fluid/moving_wall_2d.jl`) -```@raw html - -``` - -### Oscillating Drop (`fluid/oscillating_drop_2d.jl`) -```@raw html - -``` - -### Periodic Channel (`fluid/periodic_channel_2d.jl`) -```@raw html - -``` - -## Fluid Structure Interaction - -### Dam Break with Elastic Plate (`fsi/dam_break_plate_2d.jl`) -```@raw html - -``` - -### Falling Sphere 2D (`fsi/falling_sphere_2d.jl`) -```@raw html - -``` - -### Falling Spheres 2D (`fsi/falling_spheres_2d.jl`) -```@raw html - -``` - -## Structure Mechanics - -### Oscillating Beam (`solid/oscillating_beam_2d.jl`) -```@raw html - -``` - \ No newline at end of file diff --git a/docs/src/general/density_calculators.md b/docs/src/general/density_calculators.md deleted file mode 100644 index a4ab5f14e..000000000 --- a/docs/src/general/density_calculators.md +++ /dev/null @@ -1,7 +0,0 @@ -# [Density Calculators](@id density_calculator) - - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("general", "density_calculators.jl")] -``` diff --git a/docs/src/general/initial_condition.md b/docs/src/general/initial_condition.md deleted file mode 100644 index 4f6ba6f72..000000000 --- a/docs/src/general/initial_condition.md +++ /dev/null @@ -1,13 +0,0 @@ -# [Initial Condition](@id initial_condition) - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("general", "initial_condition.jl")] -``` - -## Setups - -```@autodocs -Modules = [TrixiParticles] -Pages = map(file -> joinpath("setups", file), readdir(joinpath("..", "src", "setups"))) -``` diff --git a/docs/src/general/interpolation.md b/docs/src/general/interpolation.md deleted file mode 100644 index a931d0c43..000000000 --- a/docs/src/general/interpolation.md +++ /dev/null @@ -1,6 +0,0 @@ -# Interpolation - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("general", "interpolation.jl")] -``` diff --git a/docs/src/general/neighborhood_search.md b/docs/src/general/neighborhood_search.md deleted file mode 100644 index e611f5350..000000000 --- a/docs/src/general/neighborhood_search.md +++ /dev/null @@ -1,44 +0,0 @@ -# Neighborhood Search - -The neighborhood search is the most essential component for performance. -We provide several implementations in the package -[PointNeighbors.jl](https://github.com/trixi-framework/PointNeighbors.jl). -See the docs of this package for an overview and a comparison of different implementations. - -!!! note "Usage" - To run a simulation with a neighborhood search implementation, just pass the type - to the constructor of the [`Semidiscretization`](@ref): - ```jldoctest semi_example; output=false, setup = :(using TrixiParticles; trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol=nothing); system1 = fluid_system; system2 = boundary_system) - semi = Semidiscretization(system1, system2, - neighborhood_search=GridNeighborhoodSearch) - - # output - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Semidiscretization │ - │ ══════════════════ │ - │ #spatial dimensions: ………………………… 2 │ - │ #systems: ……………………………………………………… 2 │ - │ neighborhood search: ………………………… GridNeighborhoodSearch │ - │ total #particles: ………………………………… 636 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘ - ``` - The keyword arguments `periodic_box_min_corner` and `periodic_box_max_corner` mentioned - in the PointNeighbors.jl docs can also be passed to the - [`Semidiscretization`](@ref) and will internally be forwarded to the neighborhood search. - See the docs of [`Semidiscretization`](@ref) for more details. - ```jldoctest semi_example; output = false - semi = Semidiscretization(system1, system2, - neighborhood_search=GridNeighborhoodSearch, - periodic_box_min_corner=[0.0, -0.25], - periodic_box_max_corner=[1.0, 0.75]) - - # output - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Semidiscretization │ - │ ══════════════════ │ - │ #spatial dimensions: ………………………… 2 │ - │ #systems: ……………………………………………………… 2 │ - │ neighborhood search: ………………………… GridNeighborhoodSearch │ - │ total #particles: ………………………………… 636 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘ - ``` diff --git a/docs/src/general/semidiscretization.md b/docs/src/general/semidiscretization.md deleted file mode 100644 index 93334679e..000000000 --- a/docs/src/general/semidiscretization.md +++ /dev/null @@ -1,6 +0,0 @@ -# Semidiscretization - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("general", "semidiscretization.jl")] -``` diff --git a/docs/src/general/smoothing_kernels.md b/docs/src/general/smoothing_kernels.md deleted file mode 100644 index b15d4949a..000000000 --- a/docs/src/general/smoothing_kernels.md +++ /dev/null @@ -1,48 +0,0 @@ -# [Smoothing Kernels](@id smoothing_kernel) -The following smoothing kernels are currently available: - -| Smoothing Kernel | Compact Support | Typ. Smoothing Length | Recommended Application | Stability | -| :---------------------------------------- | :---------------- | :-------------------- | :---------------------- | :-------- | -| [`SchoenbergCubicSplineKernel`](@ref) | $[0, 2h]$ | $1.1$ to $1.3$ | General + sharp waves | ++ | -| [`SchoenbergQuarticSplineKernel`](@ref) | $[0, 2.5h]$ | $1.1$ to $1.5$ | General | +++ | -| [`SchoenbergQuinticSplineKernel`](@ref) | $[0, 3h]$ | $1.1$ to $1.5$ | General | ++++ | -| [`GaussianKernel`](@ref) | $[0, 3h]$ | $1.0$ to $1.5$ | Literature | +++++ | -| [`WendlandC2Kernel`](@ref) | $[0, 1h]$ | $2.5$ to $4.0$ | General (recommended) | ++++ | -| [`WendlandC4Kernel`](@ref) | $[0, 1h]$ | $3.0$ to $4.5$ | General | +++++ | -| [`WendlandC6Kernel`](@ref) | $[0, 1h]$ | $3.5$ to $5.0$ | General | +++++ | -| [`Poly6Kernel`](@ref) | $[0, 1h]$ | $1.5$ to $2.5$ | Literature | + | -| [`SpikyKernel`](@ref) | $[0, 1h]$ | $1.5$ to $3.0$ | Sharp corners + waves | + | - -We recommend to use the [`WendlandC2Kernel`](@ref) for most applications. -If less smoothing is needed, try [`SchoenbergCubicSplineKernel`](@ref), for more smoothing try [`WendlandC6Kernel`](@ref). - -!!! note "Usage" - The kernel can be called as - ``` - TrixiParticles.kernel(smoothing_kernel, r, h) - ``` - The length of the compact support can be obtained as - ``` - TrixiParticles.compact_support(smoothing_kernel, h) - ``` - - Note that ``r`` has to be a scalar, so in the context of SPH, the kernel - should be used as - ```math - W(\Vert r_a - r_b \Vert, h). - ``` - - The gradient required in SPH, - ```math - \nabla_{r_a} W(\Vert r_a - r_b \Vert, h) - ``` - can be called as - ``` - TrixiParticles.kernel_grad(smoothing_kernel, pos_diff, distance, h) - ``` - where `pos_diff` is $r_a - r_b$ and `distance` is $\Vert r_a - r_b \Vert$. - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("general", "smoothing_kernels.jl")] -``` diff --git a/docs/src/general/util.md b/docs/src/general/util.md deleted file mode 100644 index 1056ecd64..000000000 --- a/docs/src/general/util.md +++ /dev/null @@ -1,6 +0,0 @@ -# Util - -```@autodocs -Modules = [TrixiParticles] -Pages = ["util.jl"] -``` diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md deleted file mode 100644 index 3c71aa83b..000000000 --- a/docs/src/getting_started.md +++ /dev/null @@ -1,50 +0,0 @@ -# [Getting started](@id getting_started) -If you have not installed TrixiParticles.jl, please follow the instructions given [here](install.md). - -In the following sections, we will give a short introduction. For a more thorough discussion, take a look at our [Tutorials](tutorial.md). - -## Running an Example -The easiest way to run a simulation is to run one of our predefined example files. -We will run the file `examples/fluid/hydrostatic_water_column_2d.jl`, which simulates a fluid resting in a rectangular tank. -Since TrixiParticles.jl uses multithreading, you should start Julia with the flag `--threads auto` (or, e.g. `--threads 4` for 4 threads). - -In the Julia REPL, first load the package TrixiParticles.jl. -```jldoctest getting_started -julia> using TrixiParticles -``` - -Then start the simulation by executing -```jldoctest getting_started; filter = r".*"s -julia> trixi_include(joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl")) -``` - -This will open a new window with a 2D visualization of the final solution: -![plot_hydrostatic_water_column](https://github.com/trixi-framework/TrixiParticles.jl/assets/44124897/95821154-577d-4323-ba57-16ef02ea24e0) - -For more information about visualization, see [Visualization](visualization.md). - -## Running other Examples -You can find a list of our other predefined examples under [Examples](examples.md). -Execute them as follows from the Julia REPL by replacing `subfolder` and `example_name` -```julia -julia> trixi_include(joinpath(examples_dir(), "subfolder", "example_name.jl")) -``` - -## Modifying an example -You can pass keyword arguments to the function `trixi_include` to overwrite assignments in the file. - -With `trixi_include`, we can overwrite variables defined in the example file to run a different simulation without modifying the example file. -```jldoctest getting_started; filter = r".*"s -julia> trixi_include(joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), initial_fluid_size=(1.0, 0.5)) -``` -This for example, will change the fluid size from ``(0.9, 1.0)`` to ``(1.0, 0.5)``. - -To understand why, take a look into the file `hydrostatic_water_column_2d.jl` in the subfolder `fluid` inside the examples directory, which is the file that we executed earlier. -You can see that the initial size of the fluid is defined in the variable `initial_fluid_size`, which we could overwrite with the `trixi_include` call above. -Another variable that is worth experimenting with is `fluid_particle_spacing`, which controls the resolution of the simulation in this case. -A lower value will increase the resolution and the runtime. - -## Set up you first simulation from scratch -See [Set up your first simulation](tutorials/tut_setup.md). - -Find an overview over the available tutorials under [Tutorials](tutorial.md). diff --git a/docs/src/index.md b/docs/src/index.md index 42c2c42c6..8d10d80c0 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,48 +1,122 @@ -# TrixiParticles.jl - -TrixiParticles.jl is a numerical simulation framework designed for particle-based numerical methods, with an emphasis on multiphysics applications, written in Julia. A primary goal of the framework is to be user-friendly for engineering, science, and educational purposes. In addition to its extensible design and optimized implementation, we prioritize the user experience, including installation, pre- and postprocessing. Its features include: - -## Features -- Incompressible Navier-Stokes - - Methods: Weakly Compressible Smoothed Particle Hydrodynamics (WCSPH), Entropically Damped Artificial Compressibility (EDAC) - - Models: Surface Tension -- Solid-body mechanics - - Methods: Total Lagrangian SPH (TLSPH) -- Fluid-Structure Interaction -- Output formats: - - VTK - -## Examples -```@raw html - - - - - - - - - -
-
2D Dam Break
-
-
Moving Wall
-
-
Oscillating Beam
-
-
Dam Break with Elastic Plate
-
-``` - -## Quickstart -1. [Installation](@ref installation) -2. [Getting started](@ref getting_started) - -If you have any questions concerning **TrixiParticles.jl** you can join our community [on Slack](https://join.slack.com/t/trixi-framework/shared_invite/zt-sgkc6ppw-6OXJqZAD5SPjBYqLd8MU~g) or open an issue with your question. - -## Start with development -To get started with development have a look at these pages: - -1. [Installation](@ref installation) -2. [Development](@ref development) -3. [Contributing](@ref) +# TrixiParticles.jl API + +## Callbacks + +```@autodocs +Modules = [TrixiParticles] +Pages = map(file -> joinpath("callbacks", file), readdir(joinpath("..", "src", "callbacks"))) +``` + +## General + +### File density_calculators.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("general", "density_calculators.jl")] +``` + +### File initial_condition.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("general", "initial_condition.jl")] +``` + +### File neighborhood_search.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("general", "neighborhood_search.jl")] +``` + +### File semidiscretization.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("general", "semidiscretization.jl")] +``` + +### File smoothing_kernels.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("general", "smoothing_kernels.jl")] +``` + +## Schemes + +### Boundary + +#### File system.jl +```@autodocs +Modules = [TrixiParticles] +Pages = map(file -> joinpath("boundary", file), readdir(joinpath("..", "src", "schemes", "boundary"))) +``` + +#### File dummy_particles.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("schemes", "boundary", "dummy_particles", "dummy_particles.jl")] +``` +#### File monaghan_kajtar.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("schemes", "boundary", "monaghan_kajtar", "monaghan_kajtar.jl")] +``` + +### Weakly Compressible SPH + +#### File system.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("schemes", "fluid", "weakly_compressible_sph", "system.jl")] +``` + +#### File state_equations.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("schemes", "fluid", "weakly_compressible_sph", "state_equations.jl")] +``` + +#### File viscosity.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("schemes", "fluid", "weakly_compressible_sph", "viscosity.jl")] +``` + +### Total Lagrangian SPH + +#### File system.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("schemes", "solid", "total_lagrangian_sph", "system.jl")] +``` + +#### File penalty_force.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("schemes", "solid", "total_lagrangian_sph", "penalty_force.jl")] +``` + +## Setups + +### File rectangular_tank.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("setups", "rectangular_tank.jl")] +``` + +### File rectangular_shape.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("setups", "rectangular_shape.jl")] +``` + +### File circular_shape.jl +```@autodocs +Modules = [TrixiParticles] +Pages = [joinpath("setups", "circular_shape.jl")] +``` + +## Util + +```@autodocs +Modules = [TrixiParticles] +Pages = ["util.jl"] +``` diff --git a/docs/src/install.md b/docs/src/install.md deleted file mode 100644 index f88a10121..000000000 --- a/docs/src/install.md +++ /dev/null @@ -1,66 +0,0 @@ -# [Installation](@id installation) - -## Setting up Julia -If you have not yet installed Julia, please [follow the instructions for your -operating system](https://julialang.org/downloads/platform/). TrixiParticles.jl works -with Julia v1.9 and newer. We recommend using the latest stable release of Julia. - -## For users -TrixiParticles.jl is a registered Julia package. -You can install TrixiParticles.jl, -[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) (used for time integration) -and [Plots.jl](https://github.com/JuliaPlots/Plots.jl) by executing the following commands -in the Julia REPL: -```julia -julia> using Pkg - -julia> Pkg.add(["TrixiParticles", "OrdinaryDiffEq", "Plots"]) -``` - -## [For developers](@id for-developers) -If you plan on editing TrixiParticles.jl itself, you can download TrixiParticles.jl -to a local folder and use the code from the cloned directory: -```bash -git clone git@github.com:trixi-framework/TrixiParticles.jl.git -cd TrixiParticles.jl -mkdir run -julia --project=run -e 'using Pkg; Pkg.develop(PackageSpec(path="."))' # Add TrixiParticles.jl to `run` project -julia --project=run -e 'using Pkg; Pkg.add("OrdinaryDiffEq", "Plots")' # Add additional packages -``` - -If you installed TrixiParticles.jl this way, you always have to start Julia with the -`--project` flag set to your `run` directory, e.g., -```bash -julia --project=run -``` -from the TrixiParticles.jl root directory. - -The advantage of using a separate `run` directory is that you can also add other -related packages (e.g., OrdinaryDiffEq.jl, see above) to the project in the `run` folder -and always have a reproducible environment at hand to share with others. - -## Optional software/packages -- [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) -- A Julia package of ordinary differential equation solvers that is used in the examples -- [Plots.jl](https://github.com/JuliaPlots/Plots.jl) -- Julia Plotting library that is used in some examples -- [PythonPlot.jl](https://github.com/JuliaPy/PythonPlot.jl) -- Plotting library that can be used instead of Plots.jl -- [ParaView](https://www.paraview.org/) -- Software that can be used for visualization of results - -## [Common issues](@id installation-issues) - -If you followed the [installation instructions for developers](@ref for-developers) and you -run into any problems with packages when pulling the latest version of TrixiParticles.jl, -start Julia with the project in the `run` folder, -```bash - julia --project=run -``` -update all packages in that project, resolve all conflicts in the project, and install all -new dependencies: -```julia -julia> using Pkg - -julia> Pkg.update() - -julia> Pkg.resolve() - -julia> Pkg.instantiate() -``` diff --git a/docs/src/overview.md b/docs/src/overview.md deleted file mode 100644 index a113d1f9f..000000000 --- a/docs/src/overview.md +++ /dev/null @@ -1,23 +0,0 @@ -# Overview -The following page gives a rough overview of important parts of the code. - -## Program flow - -To initiate a simulation, the goal is to solve an ordinary differential equation, for example, -by employing the time integration schemes provided by OrdinaryDiffEq.jl. These schemes are then -utilized to integrate ``\mathrm{d}u/\mathrm{d}t`` and ``\mathrm{d}v/\mathrm{d}t``, where ``u`` -represents the particles' positions and ``v`` their properties such as velocity and density. -During a single time step or an intermediate step of the time integration scheme, the functions -`drift!` and `kick!` are invoked, followed by the functions depicted in this diagram -(with key parts highlighted in orange/yellow). - -![Main Program Flow](https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/d7c6eedd-7173-4879-b62e-3e6d4bc5091f) - - -## Structure -What we refer to as schemes are various models such as Weakly Compressible Smoothed Particle Hydrodynamics (WCSPH) -or Total Lagrangian Smoothed Particle Hydrodynamics (TLSPH). These schemes are categorized based on the applicable -physical regimes, namely fluid, solid, gas, and others. Each scheme comprises at least two files: a `system.jl` file -and an `rhs.jl` file. The `system.jl` file provides the data structure holding the particles of this scheme and some -routines, particularly those for allocation and the main update routines, excluding system interactions. -The interactions between particles of this scheme (and with particles of other schemes) are handled in the `rhs.jl` file. diff --git a/docs/src/reference-trixibase.md b/docs/src/reference-trixibase.md deleted file mode 100644 index c7a970f88..000000000 --- a/docs/src/reference-trixibase.md +++ /dev/null @@ -1,9 +0,0 @@ -# TrixiBase.jl API - -```@meta -CurrentModule = TrixiBase -``` - -```@autodocs -Modules = [TrixiBase] -``` diff --git a/docs/src/systems/boundary.md b/docs/src/systems/boundary.md deleted file mode 100644 index ae4b9b676..000000000 --- a/docs/src/systems/boundary.md +++ /dev/null @@ -1,319 +0,0 @@ -# Boundary System - -```@docs - BoundarySPHSystem -``` - -```@docs - BoundaryDEMSystem -``` - -```@docs - BoundaryMovement -``` - - -# [Boundary Models](@id boundary_models) - -## Dummy Particles - -Boundaries modeled as dummy particles, which are treated like fluid particles, -but their positions and velocities are not evolved in time. Since the force towards the fluid -should not change with the material density when used with a [`TotalLagrangianSPHSystem`](@ref), the -dummy particles need to have a mass corresponding to the fluid's rest density, which we call -"hydrodynamic mass", as opposed to mass corresponding to the material density of a -[`TotalLagrangianSPHSystem`](@ref). - -Here, `initial_density` and `hydrodynamic_mass` are vectors that contains the initial density -and the hydrodynamic mass respectively for each boundary particle. -Note that when used with [`SummationDensity`](@ref) (see below), this is only used to determine -the element type and the number of boundary particles. - -To establish a relationship between density and pressure, a `state_equation` has to be passed, -which should be the same as for the adjacent fluid systems. -To sum over neighboring particles, a `smoothing_kernel` and `smoothing_length` needs to be passed. -This should be the same as for the adjacent fluid system with the largest smoothing length. - -In the literature, this kind of boundary particles is referred to as -"dummy particles" (Adami et al., 2012 and Valizadeh & Monaghan, 2015), -"frozen fluid particles" (Akinci et al., 2012) or "dynamic boundaries (Crespo et al., 2007). -The key detail of this boundary condition and the only difference between the boundary models -in these references is the way the density and pressure of boundary particles is computed. - -Since boundary particles are treated like fluid particles, the force -on fluid particle ``a`` due to boundary particle ``b`` is given by -```math -f_{ab} = m_a m_b \left( \frac{p_a}{\rho_a^2} + \frac{p_b}{\rho_b^2} \right) \nabla_{r_a} W(\Vert r_a - r_b \Vert, h). -``` -The quantities to be defined here are the density ``\rho_b`` and pressure ``p_b`` -of the boundary particle ``b``. - -```@docs - BoundaryModelDummyParticles -``` - - -### Hydrodynamic density of dummy particles - -We provide five options to compute the boundary density and pressure, determined by the `density_calculator`: -1. (Recommended) With [`AdamiPressureExtrapolation`](@ref), the pressure is extrapolated from the pressure of the - fluid according to (Adami et al., 2012), and the density is obtained by applying the inverse of the state equation. - This option usually yields the best results of the options listed here. -2. With [`SummationDensity`](@ref), the density is calculated by summation over the neighboring particles, - and the pressure is computed from the density with the state equation. -3. With [`ContinuityDensity`](@ref), the density is integrated from the continuity equation, - and the pressure is computed from the density with the state equation. - Note that this causes a gap between fluid and boundary where the boundary is initialized - without any contact to the fluid. This is due to overestimation of the boundary density - as soon as the fluid comes in contact with boundary particles that initially did not have - contact to the fluid. - Therefore, in dam break simulations, there is a visible "step", even though the boundary is supposed to be flat. - See also [dual.sphysics.org/faq/#Q_13](https://dual.sphysics.org/faq/#Q_13). -4. With [`PressureZeroing`](@ref), the density is set to the reference density and the pressure - is computed from the density with the state equation. - This option is not recommended. The other options yield significantly better results. -5. With [`PressureMirroring`](@ref), the density is set to the reference density. The pressure - is not used. Instead, the fluid pressure is mirrored as boundary pressure in the - momentum equation. - This option is not recommended due to stability issues. See [`PressureMirroring`](@ref) - for more details. - -#### 1. [`AdamiPressureExtrapolation`](@ref) - -The pressure of the boundary particles is obtained by extrapolating the pressure of the fluid -according to (Adami et al., 2012). -The pressure of a boundary particle ``b`` is given by -```math -p_b = \frac{\sum_f (p_f + \rho_f (\bm{g} - \bm{a}_b) \cdot \bm{r}_{bf}) W(\Vert r_{bf} \Vert, h)}{\sum_f W(\Vert r_{bf} \Vert, h)}, -``` -where the sum is over all fluid particles, ``\rho_f`` and ``p_f`` denote the density and pressure of fluid particle ``f``, respectively, -``r_{bf} = r_b - r_f`` denotes the difference of the coordinates of particles ``b`` and ``f``, -``\bm{g}`` denotes the gravitational acceleration acting on the fluid, and ``\bm{a}_b`` denotes the acceleration of the boundary particle ``b``. -```@docs - AdamiPressureExtrapolation -``` - -#### 4. [`PressureZeroing`](@ref) - -This is the simplest way to implement dummy boundary particles. -The density of each particle is set to the reference density and the pressure to the -reference pressure (the corresponding pressure to the reference density by the state equation). -```@docs - PressureZeroing -``` - -#### 5. [`PressureMirroring`](@ref) - -Instead of calculating density and pressure for each boundary particle, we modify the -momentum equation, -```math -\frac{\mathrm{d}v_a}{\mathrm{d}t} = -\sum_b m_b \left( \frac{p_a}{\rho_a^2} + \frac{p_b}{\rho_b^2} \right) \nabla_a W_{ab} -``` -to replace the unknown density $\rho_b$ if $b$ is a boundary particle by the reference density -and the unknown pressure $p_b$ if $b$ is a boundary particle by the pressure $p_a$ of the -interacting fluid particle. -The momentum equation therefore becomes -```math -\frac{\mathrm{d}v_a}{\mathrm{d}t} = -\sum_f m_f \left( \frac{p_a}{\rho_a^2} + \frac{p_f}{\rho_f^2} \right) \nabla_a W_{af} --\sum_b m_b \left( \frac{p_a}{\rho_a^2} + \frac{p_a}{\rho_0^2} \right) \nabla_a W_{ab}, -``` -where the first sum is over all fluid particles and the second over all boundary particles. - -This approach was first mentioned by Akinci et al. (2012) and written down in this form -by Band et al. (2018). -```@docs - PressureMirroring -``` - -### No-slip conditions - -For the interaction of dummy particles and fluid particles, Adami et al. (2012) -impose a no-slip boundary condition by assigning a wall velocity ``v_w`` to the dummy particle. - -The wall velocity of particle ``a`` is calculated from the prescribed boundary particle -velocity ``v_a`` and the smoothed velocity field -```math -v_w = 2 v_a - \frac{\sum_b v_b W_{ab}}{\sum_b W_{ab}}, -``` -where the sum is over all fluid particles. - -By choosing the viscosity model [`ViscosityAdami`](@ref) for `viscosity`, a no-slip -condition is imposed. It is recommended to choose `nu` in the order of either the kinematic -viscosity parameter of the adjacent fluid or the equivalent from the artificial parameter -`alpha` of the adjacent fluid (``\nu = \frac{\alpha h c }{2d + 4}``). When omitting the -viscous interaction (default `viscosity=nothing`), a free-slip wall boundary -condition is applied. - -!!! warning - The viscosity model [`ArtificialViscosityMonaghan`](@ref) for [`BoundaryModelDummyParticles`](@ref) - has not been verified yet. - -### References -- S. Adami, X. Y. Hu, N. A. Adams. - "A generalized wall boundary condition for smoothed particle hydrodynamics". - In: Journal of Computational Physics 231, 21 (2012), pages 7057–7075. - [doi: 10.1016/J.JCP.2012.05.005](https://doi.org/10.1016/J.JCP.2012.05.005) -- Alireza Valizadeh, Joseph J. Monaghan. - "A study of solid wall models for weakly compressible SPH". - In: Journal of Computational Physics 300 (2015), pages 5–19. - [doi: 10.1016/J.JCP.2015.07.033](https://doi.org/10.1016/J.JCP.2015.07.033) -- Nadir Akinci, Markus Ihmsen, Gizem Akinci, Barbara Solenthaler, Matthias Teschner. - "Versatile rigid-fluid coupling for incompressible SPH". - ACM Transactions on Graphics 31, 4 (2012), pages 1–8. - [doi: 10.1145/2185520.2185558](https://doi.org/10.1145/2185520.2185558) -- A. J. C. Crespo, M. Gómez-Gesteira, R. A. Dalrymple. - "Boundary conditions generated by dynamic particles in SPH methods" - In: Computers, Materials and Continua 5 (2007), pages 173-184. - [doi: 10.3970/cmc.2007.005.173](https://doi.org/10.3970/cmc.2007.005.173) -- Stefan Band, Christoph Gissler, Andreas Peer, and Matthias Teschner. - "MLS Pressure Boundaries for Divergence-Free and Viscous SPH Fluids." - In: Computers & Graphics 76 (2018), pages 37–46. - [doi: 10.1016/j.cag.2018.08.001](https://doi.org/10.1016/j.cag.2018.08.001) - -## Repulsive Particles - -Boundaries modeled as boundary particles which exert forces on the fluid particles (Monaghan, Kajtar, 2009). -The force on fluid particle ``a`` due to boundary particle ``b`` is given by -```math -f_{ab} = m_a \left(\tilde{f}_{ab} - m_b \Pi_{ab} \nabla_{r_a} W(\Vert r_a - r_b \Vert, h)\right) -``` -with -```math -\tilde{f}_{ab} = \frac{K}{\beta^{n-1}} \frac{r_{ab}}{\Vert r_{ab} \Vert (\Vert r_{ab} \Vert - d)} \Phi(\Vert r_{ab} \Vert, h) -\frac{2 m_b}{m_a + m_b}, -``` -where ``m_a`` and ``m_b`` are the masses of fluid particle ``a`` and boundary particle ``b`` -respectively, ``r_{ab} = r_a - r_b`` is the difference of the coordinates of particles -``a`` and ``b``, ``d`` denotes the boundary particle spacing and ``n`` denotes the number of -dimensions (see (Monaghan, Kajtar, 2009, Equation (3.1)) and (Valizadeh, Monaghan, 2015)). -Note that the repulsive acceleration $\tilde{f}_{ab}$ does not depend on the masses of -the boundary particles. -Here, ``\Phi`` denotes the 1D Wendland C4 kernel, normalized to ``1.77`` for ``q=0`` -(Monaghan, Kajtar, 2009, Section 4), with ``\Phi(r, h) = w(r/h)`` and -```math -w(q) = -\begin{cases} - (1.77/32) (1 + (5/2)q + 2q^2)(2 - q)^5 & \text{if } 0 \leq q < 2 \\ - 0 & \text{if } q \geq 2. -\end{cases} -``` - -The boundary particles are assumed to have uniform spacing by the factor ``\beta`` smaller -than the expected fluid particle spacing. -For example, if the fluid particles have an expected spacing of ``0.3`` and the boundary particles -have a uniform spacing of ``0.1``, then this parameter should be set to ``\beta = 3``. -According to (Monaghan, Kajtar, 2009), a value of ``\beta = 3`` for the Wendland C4 that -we use here is reasonable for most computing purposes. - -The parameter ``K`` is used to scale the force exerted by the boundary particles. -In (Monaghan, Kajtar, 2009), a value of ``gD`` is used for static tank simulations, -where ``g`` is the gravitational acceleration and ``D`` is the depth of the fluid. - -The viscosity ``\Pi_{ab}`` is calculated according to the viscosity used in the -simulation, where the density of the boundary particle if needed is assumed to be -identical to the density of the fluid particle. - -### No-slip condition - -By choosing the viscosity model [`ArtificialViscosityMonaghan`](@ref) for `viscosity`, -a no-slip condition is imposed. When omitting the viscous interaction -(default `viscosity=nothing`), a free-slip wall boundary condition is applied. - -!!! warning - The no-slip conditions for `BoundaryModelMonaghanKajtar` have not been verified yet. - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "boundary", "monaghan_kajtar", "monaghan_kajtar.jl")] -``` - -### References -- Joseph J. Monaghan, Jules B. Kajtar. "SPH particle boundary forces for arbitrary boundaries". - In: Computer Physics Communications 180.10 (2009), pages 1811–1820. - [doi: 10.1016/j.cpc.2009.05.008](https://doi.org/10.1016/j.cpc.2009.05.008) -- Alireza Valizadeh, Joseph J. Monaghan. "A study of solid wall models for weakly compressible SPH." - In: Journal of Computational Physics 300 (2015), pages 5–19. - [doi: 10.1016/J.JCP.2015.07.033](https://doi.org/10.1016/J.JCP.2015.07.033) - -# [Open Boundaries](@id open_boundary) - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "boundary", "open_boundary", "system.jl")] -``` - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "boundary", "open_boundary", "boundary_zones.jl")] -``` - -### [Method of characteristics](@id method_of_characteristics) - -The difficulty in non-reflecting boundary conditions, also called open boundaries, is to determine -the appropriate boundary values of the exact characteristics of the Euler equations. -Assuming the flow near the boundaries is normal to the boundary -and free of shock waves and significant viscous effects, it can be shown that three characteristic variables exist: - -- ``J_1``, associated with convection of entropy and propagates at flow velocity, -- ``J_2``, downstream-running characteristics, -- ``J_3``, upstream-running characteristics. - -Giles (1990) derived those variables based on a linearized set of governing equations: -```math -J_1 = -c_s^2 (\rho - \rho_{\text{ref}}) + (p - p_{\text{ref}}) -``` -```math -J_2 = \rho c_s (v - v_{\text{ref}}) + (p - p_{\text{ref}}) -``` -```math -J_3 = - \rho c_s (v - v_{\text{ref}}) + (p - p_{\text{ref}}) -``` -where the subscript "ref" denotes the reference flow near the boundaries, which can be prescribed. - -Specifying the reference variables is **not** equivalent to prescription of ``\rho``, ``v`` and ``p`` -directly, since the perturbation from the reference flow is allowed. - -Lastiwka et al. (2009) applied the method of characteristic to SPH and determined the number of variables that should be -**prescribed** at the boundary and the number which should be **propagated** from the fluid domain to the boundary: - -- For an **inflow** boundary: - - Prescribe *downstream*-running characteristics ``J_1`` and ``J_2`` - - Transmit ``J_3`` from the fluid domain (allow ``J_3`` to propagate upstream to the boundary). - -- For an **outflow** boundary: - - Prescribe *upstream*-running characteristic ``J_3`` - - Transmit ``J_1`` and ``J_2`` from the fluid domain. - -Prescribing is done by simply setting the characteristics to zero. To transmit the characteristics from the fluid -domain, or in other words, to carry the information of the fluid to the boundaries, Negi et al. (2020) use a Shepard Interpolation -```math -f_i = \frac{\sum_j^N f_j W_{ij}}{\sum_j^N W_{ij}}, -``` -where the ``i``-th particle is a boundary particle, ``f`` is either ``J_1``, ``J_2`` or ``J_3`` and ``N`` is the set of -neighboring fluid particles. - -To express pressure ``p``, density ``\rho`` and velocity ``v`` as functions of the characteristic variables, the system of equations -from the characteristic variables is inverted and gives -```math - \rho - \rho_{\text{ref}} = \frac{1}{c_s^2} \left( -J_1 + \frac{1}{2} J_2 + \frac{1}{2} J_3 \right), -``` -```math -u - u_{\text{ref}}= \frac{1}{2\rho c_s} \left( J_2 - J_3 \right), -``` -```math -p - p_{\text{ref}} = \frac{1}{2} \left( J_2 + J_3 \right). -``` -With ``J_1``, ``J_2`` and ``J_3`` determined, we can easily solve for the actual variables for each particle. - -### References -- M. B. Giles. "Nonreflecting boundary conditions for Euler equation calculations". - In: AIAA Journal, 28.12 pages 2050--2058. - [doi: 10.2514/3.10521](https://doi.org/10.2514/3.10521) -- M. Lastiwka, M. Basa, N. J. Quinlan. - "Permeable and non-reflecting boundary conditions in SPH". - In: International Journal for Numerical Methods in Fluids 61, (2009), pages 709--724. - [doi: 10.1002/fld.1971](https://doi.org/10.1002/fld.1971) -- P. Negi, P. Ramachandran, A. Haftu. - "An improved non-reflecting outlet boundary condition for weakly-compressible SPH". - In: Computer Methods in Applied Mechanics and Engineering 367, (2020), pages 113--119. - [doi: 10.1016/j.cma.2020.113119](https://doi.org/10.1016/j.cma.2020.113119) diff --git a/docs/src/systems/dem.md b/docs/src/systems/dem.md deleted file mode 100644 index a593db01e..000000000 --- a/docs/src/systems/dem.md +++ /dev/null @@ -1,33 +0,0 @@ -# [Discrete Element Method](@id dem) -The Discrete Element Method (DEM) is a computational technique widely used in physics, engineering, -and applied mathematics for simulating the mechanical behavior of granular materials, such as powders, -sand, soil, or rock, as well as other discontinua. Unlike continuum mechanics that treats materials as -continuous, DEM considers individual particles or elements and their interactions. This approach provides -detailed insights into the micro-mechanical behavior of materials, making it particularly valuable -in fields such as geomechanics, material science, and mechanical engineering. - -## Fundamental Principles -The core idea behind DEM is the discretization of a material system into a finite set of distinct, -interacting mass elements (particles). These elements (particles) can vary in shape, size, and properties, and -they interact with each other and possibly with their boundaries through contact forces and potential fields. -The motion and behavior of each mass element are governed by Newton's laws of motion, accounting for the forces -and moments acting upon them. - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "solid", "discrete_element_method", "system.jl")] -``` - -## References -- N. Bićanić. "Discrete element methods". - In: Encyclopedia of Computational Mechanics (2007). - [doi: 10.1002/0470091355.ecm006.pub2](https://doi.org/10.1002/0470091355.ecm006.pub2) - -- P. Cundall and O. Strack. "A discrete numerical model for granular assemblies". - In: Géotechnique 29.1 (1979), pages 47--65. - [doi: 10.1680/geot.1979.29.1.47](https://doi.org/10.1680/geot.1979.29.1.47) - -- A. Renzo and F. Maio. "Comparison of contact-force models for the simulation of collisions in DEM-based granular flow codes" - In: Chemical Engineering Science 59.3 (2004), pages 525--541. - [doi: 10.1016/j.ces.2003.09.037](https://doi.org/10.1016/j.ces.2003.09.037) - diff --git a/docs/src/systems/entropically_damped_sph.md b/docs/src/systems/entropically_damped_sph.md deleted file mode 100644 index 499c5aafe..000000000 --- a/docs/src/systems/entropically_damped_sph.md +++ /dev/null @@ -1,56 +0,0 @@ -# [Entropically Damped Artificial Compressibility (EDAC) for SPH](@id edac) - -As opposed to the [weakly compressible SPH scheme](weakly_compressible_sph.md), which uses an equation of state, -this scheme uses a pressure evolution equation to calculate the pressure -```math -\frac{\mathrm{d} p_a}{\mathrm{d}t} = - \rho c_s^2 \nabla \cdot v + \nu \nabla^2 p, -``` -which is derived by Clausen (2013). This equation is similar to the continuity equation (first term, see -[`ContinuityDensity`](@ref)), but also contains a pressure damping term (second term, similar to density diffusion -see [`DensityDiffusion`](@ref)), which reduces acoustic pressure waves through an entropy-generation mechanism. - -The pressure evolution is discretized with the SPH method by Ramachandran (2019) as following: - -The first term is equivalent to the classical artificial compressible methods, which are commonly -motivated by assuming the artificial equation of state ([`StateEquationCole`](@ref) with `exponent=1`) -and is discretized as -```math -- \rho c_s^2 \nabla \cdot v = \sum_{b} m_b \frac{\rho_a}{\rho_b} c_s^2 v_{ab} \cdot \nabla_{r_a} W(\Vert r_a - r_b \Vert, h), -``` -where ``\rho_a``, ``\rho_b``, ``r_a``, ``r_b``, denote the density and coordinates of particles ``a`` and ``b`` respectively, ``c_s`` -is the speed of sound and ``v_{ab} = v_a - v_b`` is the difference in the velocity. - -The second term smooths the pressure through the introduction of entropy and is discretized as -```math -\nu \nabla^2 p = \frac{V_a^2 + V_b^2}{m_a} \tilde{\eta}_{ab} \frac{p_{ab}}{\Vert r_{ab}^2 \Vert + \eta h_{ab}^2} \nabla_{r_a} -W(\Vert r_a - r_b \Vert, h) \cdot r_{ab}, -``` -where ``V_a``, ``V_b`` denote the volume of particles ``a`` and ``b`` respectively and ``p_{ab}= p_a -p_b`` is the difference in the pressure. - -The viscosity parameter ``\eta_a`` for a particle ``a`` is given as -```math -\eta_a = \rho_a \frac{\alpha h c_s}{8}, -``` -where it is found in the numerical experiments of Ramachandran (2019) that ``\alpha = 0.5`` -is a good choice for a wide range of Reynolds numbers (0.0125 to 10000). - -!!! note - > The EDAC formulation keeps the density constant and this eliminates the need for the continuity equation - > or the use of a summation density to find the pressure. However, in SPH discretizations, ``m/\rho`` - > is typically used as a proxy for the particle volume. The density of the fluids can - > therefore be computed using the summation density approach. - Ramachandran (2019) - - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "fluid", "entropically_damped_sph", "system.jl")] -``` - -### References -- Prabhu Ramachandran. "Entropically damped artificial compressibility for SPH". - In: Computers and Fluids 179 (2019), pages 579--594. - [doi: 10.1016/j.compfluid.2018.11.023](https://doi.org/10.1016/j.compfluid.2018.11.023) -- Jonathan R. Clausen. "Entropically damped form of artificial compressibility for explicit simulation of incompressible flow". - In: American Physical Society 87 (2013), page 13309. - [doi: 10.1103/PhysRevE.87.013309](http://dx.doi.org/10.1103/PhysRevE.87.013309) diff --git a/docs/src/systems/total_lagrangian_sph.md b/docs/src/systems/total_lagrangian_sph.md deleted file mode 100644 index 4245793be..000000000 --- a/docs/src/systems/total_lagrangian_sph.md +++ /dev/null @@ -1,121 +0,0 @@ -# [Total Lagrangian SPH](@id tlsph) - -A Total Lagrangian framework is used wherein the governing equations are formulated such that -all relevant quantities and operators are measured with respect to the -initial configuration (O’Connor & Rogers 2021, Belytschko et al. 2000). - -The governing equations with respect to the initial configuration are given by: -```math -\frac{\mathrm{D}\bm{v}}{\mathrm{D}t} = \frac{1}{\rho_0} \nabla_0 \cdot \bm{P} + \bm{g}, -``` -where the zero subscript denotes a derivative with respect to the initial configuration -and $\bm{P}$ is the first Piola-Kirchhoff (PK1) stress tensor. - -The discretized version of this equation is given by O’Connor & Rogers (2021): -```math -\frac{\mathrm{d}\bm{v}_a}{\mathrm{d}t} = \sum_b m_{0b} - \left( \frac{\bm{P}_a \bm{L}_{0a}}{\rho_{0a}^2} + \frac{\bm{P}_b \bm{L}_{0b}}{\rho_{0b}^2} \right) - \nabla_{0a} W(\bm{X}_{ab}) + \frac{\bm{f}_a^{PF}}{m_{0a}} + \bm{g}, -``` -with the correction matrix (see also [`GradientCorrection`](@ref)) -```math -\bm{L}_{0a} := \left( -\sum_{b} \frac{m_{0b}}{\rho_{0b}} \nabla_{0a} W(\bm{X}_{ab}) \bm{X}_{ab}^T \right)^{-1} \in \R^{d \times d}. -``` -The subscripts $a$ and $b$ denote quantities of particle $a$ and $b$, respectively. -The zero subscript on quantities denotes that the quantity is to be measured in the initial configuration. -The difference in the initial coordinates is denoted by $\bm{X}_{ab} = \bm{X}_a - \bm{X}_b$, -the difference in the current coordinates is denoted by $\bm{x}_{ab} = \bm{x}_a - \bm{x}_b$. - -For the computation of the PK1 stress tensor, the deformation gradient $\bm{F}$ is computed per particle as -```math -\bm{F}_a = \sum_b \frac{m_{0b}}{\rho_{0b}} \bm{x}_{ba} (\bm{L}_{0a}\nabla_{0a} W(\bm{X}_{ab}))^T \\ - \qquad = -\left(\sum_b \frac{m_{0b}}{\rho_{0b}} \bm{x}_{ab} (\nabla_{0a} W(\bm{X}_{ab}))^T \right) \bm{L}_{0a}^T -``` -with $1 \leq i,j \leq d$. -From the deformation gradient, the Green-Lagrange strain -```math -\bm{E} = \frac{1}{2}(\bm{F}^T\bm{F} - \bm{I}) -``` -and the second Piola-Kirchhoff stress tensor -```math -\bm{S} = \lambda \operatorname{tr}(\bm{E}) \bm{I} + 2\mu \bm{E} -``` -are computed to obtain the PK1 stress tensor as -```math -\bm{P} = \bm{F}\bm{S}. -``` - -Here, -```math -\mu = \frac{E}{2(1 + \nu)} -``` -and -```math -\lambda = \frac{E\nu}{(1 + \nu)(1 - 2\nu)} -``` -are the Lamé coefficients, where $E$ is the Young's modulus and $\nu$ is the Poisson ratio. - -The term $\bm{f}_a^{PF}$ is an optional penalty force. See e.g. [`PenaltyForceGanzenmueller`](@ref). - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "solid", "total_lagrangian_sph", "system.jl")] -``` - -### References -- Joseph O’Connor, Benedict D. Rogers. - "A fluid-structure interaction model for free-surface flows and flexible structures using - smoothed particle hydrodynamics on a GPU". - In: Journal of Fluids and Structures 104 (2021). - [doi: 10.1016/J.JFLUIDSTRUCTS.2021.103312](https://doi.org/10.1016/J.JFLUIDSTRUCTS.2021.103312) -- Ted Belytschko, Yong Guo, Wing Kam Liu, Shao Ping Xiao. - "A unified stability analysis of meshless particle methods". - In: International Journal for Numerical Methods in Engineering 48 (2000), pages 1359–1400. - [doi: 10.1002/1097-0207](https://doi.org/10.1002/1097-0207) - -## Penalty Force - -In FEM, underintegrated elements can deform without an associated increase of energy. -This is caused by the stiffness matrix having zero eigenvalues (so-called hourglass modes). -The name "hourglass modes" comes from the fact that elements can deform into an hourglass shape. - -Similar effects can occur in SPH as well. -Particles can change positions without changing the SPH approximation of the deformation gradient $\bm{F}$, -thus, without causing an increase of energy. -To ensure regular particle positions, we can apply similar correction forces as are used in FEM. - -Ganzenmüller (2015) introduced a so-called hourglass correction force or penalty force $f^{PF}$, -which is given by -```math -\bm{f}_a^{PF} = \frac{1}{2} \alpha \sum_b \frac{m_{0a} m_{0b} W_{0ab}}{\rho_{0a}\rho_{0b} |\bm{X}_{ab}|^2} - \left( E \delta_{ab}^a + E \delta_{ba}^b \right) \frac{\bm{x}_{ab}}{|\bm{x}_{ab}|} -``` -The subscripts $a$ and $b$ denote quantities of particle $a$ and $b$, respectively. -The zero subscript on quantities denotes that the quantity is to be measured in the initial configuration. -The difference in the initial coordinates is denoted by $\bm{X}_{ab} = \bm{X}_a - \bm{X}_b$, -the difference in the current coordinates is denoted by $\bm{x}_{ab} = \bm{x}_a - \bm{x}_b$. -Note that Ganzenmüller (2015) has a flipped sign here because they define $\bm{x}_{ab}$ the other way around. - -This correction force is based on the potential energy density of a Hookean material. -Thus, $E$ is the Young's modulus and $\alpha$ is a dimensionless coefficient that controls -the amplitude of hourglass correction. -The separation vector $\delta_{ab}^a$ indicates the change of distance which the particle separation should attain -in order to minimize the error and is given by -```math - \delta_{ab}^a = \frac{\bm{\epsilon}_{ab}^a \cdot \bm{x_{ab}}}{|\bm{x}_{ab}|}, -``` -where the error vector is defined as -```math - \bm{\epsilon}_{ab}^a = \bm{F}_a \bm{X}_{ab} - \bm{x}_{ab}. -``` - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "solid", "total_lagrangian_sph", "penalty_force.jl")] -``` - -### References -- Georg C. Ganzenmüller. - "An hourglass control algorithm for Lagrangian Smooth Particle Hydrodynamics". - In: Computer Methods in Applied Mechanics and Engineering 286 (2015). - [doi: 10.1016/j.cma.2014.12.005](https://doi.org/10.1016/j.cma.2014.12.005) diff --git a/docs/src/systems/weakly_compressible_sph.md b/docs/src/systems/weakly_compressible_sph.md deleted file mode 100644 index 353b6b5cb..000000000 --- a/docs/src/systems/weakly_compressible_sph.md +++ /dev/null @@ -1,211 +0,0 @@ -# [Weakly Compressible SPH](@id wcsph) - -Weakly compressible SPH as introduced by Monaghan (1994). This formulation relies on a stiff -[equation of state](@ref equation_of_state) that generates large pressure changes -for small density variations. - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "fluid", "weakly_compressible_sph", "system.jl")] -``` - -### References -- Joseph J. Monaghan. "Simulating Free Surface Flows in SPH". - In: Journal of Computational Physics 110 (1994), pages 399--406. - [doi: 10.1006/jcph.1994.1034](https://doi.org/10.1006/jcph.1994.1034) - -## [Equation of State](@id equation_of_state) - -The equation of state is used to relate fluid density to pressure and thus allow -an explicit simulation of the [WCSPH system](@ref WeaklyCompressibleSPHSystem). -The equation in the following formulation was introduced by Cole (Cole 1948, pp. 39 and 43). -The pressure ``p`` is calculated as -```math - p = B \left(\left(\frac{\rho}{\rho_0}\right)^\gamma - 1\right) + p_{\text{background}}, -``` -where ``\rho`` denotes the density, ``\rho_0`` the reference density, -and ``p_{\text{background}}`` the background pressure, which is set to zero when applied to -free-surface flows (Adami et al., 2012). - -The bulk modulus, ``B = \frac{\rho_0 c^2}{\gamma}``, is calculated from the artificial -speed of sound ``c`` and the isentropic exponent ``\gamma``. - -An ideal gas equation of state with a linear relationship between pressure and density can -be obtained by choosing `exponent=1`, i.e. -```math - p = B \left( \frac{\rho}{\rho_0} -1 \right) = c^2(\rho - \rho_0). -``` - -For higher Reynolds numbers, `exponent=7` is recommended, whereas at lower Reynolds -numbers `exponent=1` yields more accurate pressure estimates since pressure and -density are proportional. - -When using [`SummationDensity`](@ref) (or [`DensityReinitializationCallback`](@ref)) -and free surfaces, initializing particles with equal spacing will cause underestimated -density and therefore strong attractive forces between particles at the free surface. -Setting `clip_negative_pressure=true` can avoid this. -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "fluid", "weakly_compressible_sph", "state_equations.jl")] -``` - -## References -- Robert H. Cole. "Underwater Explosions". Princeton University Press, 1948. -- J. P. Morris, P. J. Fox, Y. Zhu - "Modeling Low Reynolds Number Incompressible Flows Using SPH ". - In: Journal of Computational Physics , Vol. 136, No. 1, pages 214--226. - [doi: 10.1006/jcph.1997.5776](https://doi.org/10.1006/jcph.1997.5776) -- S. Adami, X. Y. Hu, N. A. Adams. - "A generalized wall boundary condition for smoothed particle hydrodynamics". - In: Journal of Computational Physics 231, 21 (2012), pages 7057–7075. - [doi: 10.1016/J.JCP.2012.05.005](https://doi.org/10.1016/J.JCP.2012.05.005) - -## [Viscosity](@id viscosity_wcsph) - -TODO: Explain viscosity. - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "fluid", "viscosity.jl")] -``` - -## Density Diffusion - -Density diffusion can be used with [`ContinuityDensity`](@ref) to remove the noise in the -pressure field. It is highly recommended to use density diffusion when using WCSPH. - -### Formulation - -All density diffusion terms extend the continuity equation (see [`ContinuityDensity`](@ref)) -by an additional term -```math -\frac{\mathrm{d}\rho_a}{\mathrm{d}t} = \sum_{b} m_b v_{ab} \cdot \nabla_{r_a} W(\Vert r_{ab} \Vert, h) - + \delta h c \sum_{b} V_b \psi_{ab} \cdot \nabla_{r_a} W(\Vert r_{ab} \Vert, h), -``` -where ``V_b = m_b / \rho_b`` is the volume of particle ``b`` and ``\psi_{ab}`` depends on -the density diffusion method (see [`DensityDiffusion`](@ref) for available terms). -Also, ``\rho_a`` denotes the density of particle ``a`` and ``r_{ab} = r_a - r_b`` is the -difference of the coordinates, ``v_{ab} = v_a - v_b`` of the velocities of particles -``a`` and ``b``. - -### Numerical Results - -All density diffusion terms remove numerical noise in the pressure field and produce more -accurate results than weakly commpressible SPH without density diffusion. -This can be demonstrated with dam break examples in 2D and 3D. Here, ``δ = 0.1`` has -been used for all terms. -Note that, due to added stability, the adaptive time integration method that was used here -can choose higher time steps in the simulations with density diffusion. -For the cheap [`DensityDiffusionMolteniColagrossi`](@ref), this results in reduced runtime. - -```@raw html -
- density_diffusion_2d -
Dam break in 2D with different density diffusion terms
-
-``` - -```@raw html -
- density_diffusion_3d -
Dam break in 3D with different density diffusion terms
-
-``` - -The simpler terms [`DensityDiffusionMolteniColagrossi`](@ref) and -[`DensityDiffusionFerrari`](@ref) do not solve the hydrostatic problem and lead to incorrect -solutions in long-running steady-state hydrostatic simulations with free surfaces -(Antuono et al., 2012). This can be seen when running the simple rectangular tank example -until ``t = 40`` (again using ``δ = 0.1``): - -```@raw html -
- density_diffusion_tank -
Tank in rest under gravity in 3D with different density diffusion terms
-
-``` - -[`DensityDiffusionAntuono`](@ref) adds a correction term to solve this problem, but this -term is very expensive and adds about 40--50% of computational cost. - -### References -- M. Antuono, A. Colagrossi, S. Marrone. - "Numerical Diffusive Terms in Weakly-Compressible SPH Schemes." - In: Computer Physics Communications 183.12 (2012), pages 2570--2580. - [doi: 10.1016/j.cpc.2012.07.006](https://doi.org/10.1016/j.cpc.2012.07.006) - -### API - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "fluid", "weakly_compressible_sph", "density_diffusion.jl")] -``` - -## [Corrections](@id corrections) - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("general", "corrections.jl")] -``` - -## [Surface Tension](@id surface_tension) - -### Akinci-based intra-particle force surface tension and wall adhesion model -The work by Akinci proposes three forces: -- a cohesion force -- a surface area minimization force -- a wall adhesion force - -The classical model is composed of the curvature minimization and cohesion force. - -#### Cohesion force -The model calculates the cohesion force based on the distance between particles and the support radius ``h_c``. -This force is determined using two distinct regimes within the support radius: -- For particles closer than half the support radius, - a repulsive force is calculated to prevent particle clustering too tightly, - enhancing the simulation's stability and realism. -- Beyond half the support radius and within the full support radius, - an attractive force is computed, simulating the effects of surface tension that draw particles together. -The cohesion force, ``F_{\text{cohesion}}``, for a pair of particles is given by: -```math -F_{\text{cohesion}} = -\sigma m_b C(r) \frac{r}{\Vert r \Vert}, -``` -where: -- ``\sigma`` represents the surface tension coefficient, adjusting the overall strength of the cohesion effect. -- ``C`` is a scalar function of the distance between particles. - -The cohesion kernel ``C`` is defined as -```math -C(r)=\frac{32}{\pi h_c^9} -\begin{cases} -(h_c-r)^3 r^3, & \text{if } 2r > h_c \\ -2(h_c-r)^3 r^3 - \frac{h^6}{64}, & \text{if } r > 0 \text{ and } 2r \leq h_c \\ -0, & \text{otherwise} -\end{cases} -``` - -#### Surface area minimization force -To model the minimization of the surface area and curvature of the fluid, a curvature force is used, which is calculated as -```math -F_{\text{curvature}} = -\sigma (n_a - n_b) -``` - -#### Wall adhesion force -The wall adhesion model proposed by Akinci et al. is based on a kernel function which is 0 from 0.0 to 0.5 support radiia with a maximum at 0.75. -With the force calculated with an adhesion coefficient ``\beta`` as -```math -F_{\text{adhesion}} = -\beta m_b A(r) \frac{r}{\Vert r \Vert}, -``` -with ``A`` being the adhesion kernel defined as -```math -A(r)= \frac{0.007}{h_c^{3.25}} -\begin{cases} -\sqrt[4]{- \frac{4r^2}{h_c} + 6r - 2h_c}, & \text{if } 2r > h_c \text{ and } r \leq h_c \\ -0, & \text{otherwise.} -\end{cases} -``` - -```@autodocs -Modules = [TrixiParticles] -Pages = [joinpath("schemes", "fluid", "surface_tension.jl")] -``` diff --git a/docs/src/time_integration.md b/docs/src/time_integration.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/src/tutorial.md b/docs/src/tutorial.md deleted file mode 100644 index 5b253a7f4..000000000 --- a/docs/src/tutorial.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tutorial - - -## Fluid -- [Setting up your simulation from scratch](tutorials/tut_setup_replaced.md) -- [Setting up a dam break simulation](tutorials/tut_dam_break_replaced.md) - -## Mechanics -- [Deforming a beam](tutorials/tut_beam_replaced.md) - - -## Fluid-Structure Interaction -- [Setting up a falling structure](tutorials/tut_falling_replaced.md) diff --git a/docs/src/tutorials/tut_beam.md b/docs/src/tutorials/tut_beam.md deleted file mode 100644 index e1e80e7e6..000000000 --- a/docs/src/tutorials/tut_beam.md +++ /dev/null @@ -1,5 +0,0 @@ -# Example file -```julia -!!include:examples/solid/oscillating_beam_2d.jl!! - -``` \ No newline at end of file diff --git a/docs/src/tutorials/tut_dam_break.md b/docs/src/tutorials/tut_dam_break.md deleted file mode 100644 index 62dc0609f..000000000 --- a/docs/src/tutorials/tut_dam_break.md +++ /dev/null @@ -1,5 +0,0 @@ -# Example file -```julia -!!include:examples/fluid/dam_break_2d.jl!! - -``` \ No newline at end of file diff --git a/docs/src/tutorials/tut_falling.md b/docs/src/tutorials/tut_falling.md deleted file mode 100644 index 36466b61f..000000000 --- a/docs/src/tutorials/tut_falling.md +++ /dev/null @@ -1,5 +0,0 @@ -# Example file -```julia -!!include:examples/fsi/falling_spheres_2d.jl!! - -``` \ No newline at end of file diff --git a/docs/src/tutorials/tut_setup.md b/docs/src/tutorials/tut_setup.md deleted file mode 100644 index 0edb01d82..000000000 --- a/docs/src/tutorials/tut_setup.md +++ /dev/null @@ -1,13 +0,0 @@ -# Setting up your simulation from scratch - -## Hydrostatic tank - - - - -# Example file -```julia -!!include:examples/fluid/hydrostatic_water_column_2d.jl!! - -``` - diff --git a/docs/src/visualization.md b/docs/src/visualization.md deleted file mode 100644 index b4fd89ef7..000000000 --- a/docs/src/visualization.md +++ /dev/null @@ -1,30 +0,0 @@ -# Visualization - -## Export VTK files -You can export particle data as VTK files by using the [`SolutionSavingCallback`](@ref). -All our [predefined examples](examples.md) are already using this callback to export VTK files to the `out` directory (relative to the directory that you are running Julia from). -VTK files can be read by visualization tools like [ParaView](https://www.paraview.org/) and [VisIt](https://visit.llnl.gov/). - -### ParaView - -Follow these steps to view the exported VTK files in ParaView: - -1. Click `File -> Open`. -2. Navigate to the `out` directory (relative to the directory that you are running Julia from). -3. Open both `boundary_1.pvd` and `fluid_1.pvd`. -4. Click "Apply", which by default is on the left pane below the "Pipeline Browser". -5. Hold the left mouse button to move the solution around. - -You will now see the following: -![image](https://github.com/svchb/TrixiParticles.jl/assets/10238714/45c90fd2-984b-4eee-b130-e691cefb33ab) - -To now view the result variables **first** make sure you have "fluid_1.pvd" highlighted in the "Pipeline Browser" then select them in the variable selection combo box (see picture below). -Let's, for example, pick "density". To now view the time progression of the result hit the "play button" (see picture below). -![image](https://github.com/svchb/TrixiParticles.jl/assets/10238714/7565a13f-9532-4a69-9f81-e79505400b1c) - -## API - -```@autodocs -Modules = [TrixiParticles] -Pages = map(file -> joinpath("visualization", file), readdir(joinpath("..", "src", "visualization"))) -``` diff --git a/examples/dem/rectangular_tank_2d.jl b/examples/dem/rectangular_tank_2d.jl deleted file mode 100644 index c7daa31e2..000000000 --- a/examples/dem/rectangular_tank_2d.jl +++ /dev/null @@ -1,50 +0,0 @@ -using TrixiParticles -using OrdinaryDiffEq - -gravity = -9.81 - -# ========================================================================================== -# ==== Falling rocks - -particle_spacing = 0.1 - -rock_width = 2.0 -rock_height = 2.0 -rock_density = 3000.0 - -tank_width = 2.0 -tank_height = 4.0 - -tank = RectangularTank(particle_spacing, (rock_width, rock_height), - (tank_width, tank_height), rock_density, - n_layers=2) - -# ========================================================================================== -# ==== Systems - -# Move the rocks up to let them fall -tank.fluid.coordinates[2, :] .+= 0.5 -rock_system = DEMSystem(tank.fluid, 2 * 10e5, 10e9, 0.3, acceleration=(0.0, gravity)) -boundary_system = BoundaryDEMSystem(tank.boundary, 10e7) - -# ========================================================================================== -# ==== Simulation - -semi = Semidiscretization(rock_system, boundary_system, - neighborhood_search=GridNeighborhoodSearch) - -tspan = (0.0, 5.0) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=5000) -saving_callback = SolutionSavingCallback(dt=0.02) - -callbacks = CallbackSet(info_callback, saving_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control -sol = solve(ode, RDPK3SpFSAL49(), - abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) - reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) - dtmax=1e-3, # Limit stepsize to prevent crashing - dt=1e-7, # Initial step size - save_everystep=false, callback=callbacks); diff --git a/examples/fluid/accelerated_tank_2d.jl b/examples/fluid/accelerated_tank_2d.jl deleted file mode 100644 index a179a035c..000000000 --- a/examples/fluid/accelerated_tank_2d.jl +++ /dev/null @@ -1,66 +0,0 @@ -# This setup is identical to `hydrostatic_water_column_2d.jl`, except that now there is -# no gravity, and the tank is accelerated upwards instead. -# Note that the two setups are physically identical, but produce different numerical errors. -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.05 - -# Make sure that the kernel support of fluid particles at a boundary is always fully sampled -boundary_layers = 3 - -# ========================================================================================== -# ==== Experiment Setup -tspan = (0.0, 1.0) - -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (1.0, 0.9) -tank_size = (1.0, 1.0) - -fluid_density = 1000.0 -sound_speed = 10.0 -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7, clip_negative_pressure=false) - -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - acceleration=(0.0, -9.81), state_equation=state_equation, - n_layers=boundary_layers, spacing_ratio=1.0) - -# Function for moving boundaries -movement_function(t) = SVector(0.0, 0.5 * 9.81 * t^2) - -is_moving(t) = true - -boundary_movement = BoundaryMovement(movement_function, is_moving) - -# Import the setup from `hydrostatic_water_column_2d.jl` -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - fluid_particle_spacing=fluid_particle_spacing, movement=boundary_movement, - acceleration=(0.0, 0.0), tank=tank, semi=nothing, ode=nothing, - sol=nothing) # Overwrite `sol` assignment to skip time integration - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=50) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") - -callbacks = CallbackSet(info_callback, saving_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control. -# Limiting of the maximum stepsize is necessary to prevent crashing. -# When particles are approaching a wall in a uniform way, they can be advanced -# with large time steps. Close to the wall, the stepsize has to be reduced drastically. -# Sometimes, the method fails to do so because forces become extremely large when -# fluid particles are very close to boundary particles, and the time integration method -# interprets this as an instability. -sol = solve(ode, RDPK3SpFSAL35(), - abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) - reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) - dtmax=1e-2, # Limit stepsize to prevent crashing - save_everystep=false, callback=callbacks); diff --git a/examples/fluid/dam_break_2d.jl b/examples/fluid/dam_break_2d.jl index a1eeb2f38..288ff4a21 100644 --- a/examples/fluid/dam_break_2d.jl +++ b/examples/fluid/dam_break_2d.jl @@ -8,100 +8,116 @@ using TrixiParticles using OrdinaryDiffEq -# Size parameters -H = 0.6 -W = 2 * H +gravity = -9.81 # ========================================================================================== -# ==== Resolution -fluid_particle_spacing = H / 40 +# ==== Fluid -# Change spacing ratio to 3 and boundary layers to 1 when using Monaghan-Kajtar boundary model -boundary_layers = 4 -spacing_ratio = 1 +particle_spacing = 0.02 -boundary_particle_spacing = fluid_particle_spacing / spacing_ratio +# Spacing ratio between fluid and boundary particles +beta = 1 +boundary_layers = 3 -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 +water_width = 2.0 +water_height = 1.0 +water_density = 1000.0 + +tank_width = floor(5.366 / particle_spacing * beta) * particle_spacing / beta +tank_height = 4 + +sound_speed = 20 * sqrt(9.81 * water_height) -tspan = (0.0, 5.7 / sqrt(gravity)) +smoothing_length = 1.2 * particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{2}() -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (W, H) -tank_size = (floor(5.366 * H / boundary_particle_spacing) * boundary_particle_spacing, 4.0) +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) -fluid_density = 1000.0 -sound_speed = 20 * sqrt(gravity * H) -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=1, clip_negative_pressure=false) +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio, - acceleration=(0.0, -gravity), state_equation=state_equation) +tank = RectangularTank(particle_spacing, (water_width, water_height), + (tank_width, tank_height), water_density, + n_layers=boundary_layers, spacing_ratio=beta) + +# Move right boundary +# Recompute the new water column width since the width has been rounded in `RectangularTank`. +new_wall_position = (tank.n_particles_per_dimension[1] + 1) * particle_spacing +reset_faces = (false, true, false, false) +positions = (0, new_wall_position, 0, 0) + +reset_wall!(tank, reset_faces, positions) # ========================================================================================== -# ==== Fluid -smoothing_length = 3.5 * fluid_particle_spacing -smoothing_kernel = WendlandC2Kernel{2}() - -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) -# Alternatively the density diffusion model by Molteni & Colagrossi can be used, -# which will run faster. -# density_diffusion = DensityDiffusionMolteniColagrossi(delta=0.1) -density_diffusion = DensityDiffusionAntuono(tank.fluid, delta=0.1) - -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - density_diffusion=density_diffusion, - acceleration=(0.0, -gravity), correction=nothing, - surface_tension=nothing) +# ==== Boundary models + +boundary_model = BoundaryModelDummyParticles(tank.boundary.density, + tank.boundary.mass, state_equation, + AdamiPressureExtrapolation(), smoothing_kernel, + smoothing_length) + +# K = 9.81 * water_height +# boundary_model = BoundaryModelMonaghanKajtar(K, beta, particle_spacing / beta, +# tank.boundary.mass) # ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length, - correction=nothing) +# ==== Systems + +fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, ContinuityDensity(), state_equation, + smoothing_kernel, smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity)) -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model, adhesion_coefficient=0.0) +boundary_system = BoundarySPHSystem(tank.boundary.coordinates, boundary_model) # ========================================================================================== # ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system, - neighborhood_search=GridNeighborhoodSearch, - threaded_nhs_update=true) -ode = semidiscretize(semi, tspan, data_type=nothing) - -info_callback = InfoCallback(interval=100) -solution_prefix = "" -saving_callback = SolutionSavingCallback(dt=0.02, prefix=solution_prefix) +semi = Semidiscretization(fluid_system, boundary_system, + neighborhood_search=SpatialHashingSearch, + damping_coefficient=1e-5) -# Save at certain timepoints which allows comparison to the results of Marrone et al., -# i.e. (1.5, 2.36, 3.0, 5.7, 6.45). -# Please note that the images in Marrone et al. are obtained at a particle_spacing = H/320, -# which takes between 2 and 4 hours. -saving_paper = SolutionSavingCallback(save_times=[0.0, 0.371, 0.584, 0.743, 1.411, 1.597], - prefix="marrone_times") +tspan = (0.0, 3.0) +ode = semidiscretize(semi, tspan) -# This can be overwritten with `trixi_include` -extra_callback = nothing +info_callback = InfoCallback(interval=100) +saving_callback_relaxation = SolutionSavingCallback(dt=0.02, prefix="relaxation") +callbacks_relaxation = CallbackSet(info_callback, saving_callback_relaxation) + +# Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. +# Limiting of the maximum stepsize is necessary to prevent crashing. +# When particles are approaching a wall in a uniform way, they can be advanced +# with large time steps. Close to the wall, the stepsize has to be reduced drastically. +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. +sol = solve(ode, RDPK3SpFSAL49(), + abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-2, # Limit stepsize to prevent crashing + save_everystep=false, callback=callbacks_relaxation); + +# Move right boundary +positions = (0, tank_width, 0, 0) +reset_wall!(tank, reset_faces, positions) + +# Run full simulation +tspan = (0.0, 5.7 / sqrt(9.81)) + +# Use solution of the relaxing step as initial coordinates +restart_with!(semi, sol) -use_reinit = false -density_reinit_cb = use_reinit ? - DensityReinitializationCallback(semi.systems[1], interval=10) : - nothing -stepsize_callback = StepsizeCallback(cfl=0.9) +semi = Semidiscretization(fluid_system, boundary_system, + neighborhood_search=SpatialHashingSearch) +ode = semidiscretize(semi, tspan) -callbacks = CallbackSet(info_callback, saving_callback, stepsize_callback, extra_callback, - density_reinit_cb, saving_paper) +saving_callback = SolutionSavingCallback(dt=0.02) +callbacks = CallbackSet(info_callback, saving_callback) -sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false), - dt=1.0, # This is overwritten by the stepsize callback +# See above for an explanation of the parameter choice +sol = solve(ode, RDPK3SpFSAL49(), + abstol=1e-6, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-5, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-2, # Limit stepsize to prevent crashing save_everystep=false, callback=callbacks); diff --git a/examples/fluid/dam_break_2d_surface_tension.jl b/examples/fluid/dam_break_2d_surface_tension.jl deleted file mode 100644 index d83eb9865..000000000 --- a/examples/fluid/dam_break_2d_surface_tension.jl +++ /dev/null @@ -1,31 +0,0 @@ -# This example shows how surface tension can be applied to existing cases -# and which parameters have to be changed! -using TrixiParticles - -fluid_density = 1000.0 - -H = 0.6 -fluid_particle_spacing = H / 60 - -# Set the surface tension to a value that is accurate in your case. -# Note: This usually requires calibration to be physically accurate! -surface_tension = SurfaceTensionAkinci(surface_tension_coefficient=0.025) - -# `density_diffusion` is deactivated since the interaction with the surface tension model can -# cause stability problems. -# `adhesion_coefficient` needs to be set to a value so that the fluid doesn't separate -# from the boundary. -# Note: The surface tension model leads to an increase in compressibility of the fluid, -# which needs to be rectified by an increase of the `sound_speed`. -# Note: The Wendland Kernels don't work very well here since the `SurfaceTensionAkinci` -# model is optimized for a compact support of `2 * particle_spacing`, which would result -# in a too small `smoothing_length` for the Wendland Kernel functions. -# Note: Adhesion will result in additional friction at the boundary. -trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), - surface_tension=surface_tension, - fluid_particle_spacing=fluid_particle_spacing, - smoothing_kernel=SchoenbergCubicSplineKernel{2}(), - smoothing_length=1.0 * fluid_particle_spacing, - correction=AkinciFreeSurfaceCorrection(fluid_density), - density_diffusion=nothing, adhesion_coefficient=0.05, - sound_speed=100.0, tspan=(0.0, 2.0)) diff --git a/examples/fluid/dam_break_3d.jl b/examples/fluid/dam_break_3d.jl index ad01dde42..3bfb44ee9 100644 --- a/examples/fluid/dam_break_3d.jl +++ b/examples/fluid/dam_break_3d.jl @@ -1,76 +1,113 @@ using TrixiParticles using OrdinaryDiffEq +gravity = -9.81 + # ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.08 +# ==== Fluid -# Change spacing ratio to 3 and boundary layers to 1 when using Monaghan-Kajtar boundary model -boundary_layers = 4 -spacing_ratio = 1 +particle_spacing = 0.08 -boundary_particle_spacing = fluid_particle_spacing / spacing_ratio +# Spacing ratio between fluid and boundary particles +beta = 1 +boundary_layers = 3 -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 5.7 / sqrt(gravity)) +water_width = floor(2.0 / particle_spacing) * particle_spacing # x-direction +water_height = floor(1.0 / particle_spacing) * particle_spacing # y-direction +water_length = floor(1.0 / particle_spacing) * particle_spacing # z-direction +water_density = 1000.0 -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (2.0, 1.0, 1.0) -tank_size = (floor(5.366 / boundary_particle_spacing) * boundary_particle_spacing, 4.0, 1.0) +tank_width = floor(5.366 / particle_spacing * beta) * particle_spacing / beta +tank_height = floor(4.0 / particle_spacing) * particle_spacing +tank_length = floor(1.0 / particle_spacing) * particle_spacing -fluid_density = 1000.0 -sound_speed = 20 * sqrt(gravity * initial_fluid_size[2]) -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7) +sound_speed = 20 * sqrt(9.81 * water_height) -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio, - acceleration=(0.0, -gravity, 0.0), state_equation=state_equation) +smoothing_length = 1.2 * particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{3}() -# ========================================================================================== -# ==== Fluid -smoothing_length = 3.0 * fluid_particle_spacing -smoothing_kernel = WendlandC2Kernel{3}() +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) + +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) -density_diffusion = DensityDiffusionMolteniColagrossi(delta=0.1) +tank = RectangularTank(particle_spacing, (water_width, water_height, water_length), + (tank_width, tank_height, tank_length), water_density, + n_layers=boundary_layers, spacing_ratio=beta) -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - density_diffusion=density_diffusion, - acceleration=(0.0, -gravity, 0.0)) +# Move right boundary +new_wall_position = (tank.n_particles_per_dimension[1] + 1) * particle_spacing +reset_faces = (false, true, false, false, false, false) +positions = (0, new_wall_position, 0, 0, 0, 0) + +reset_wall!(tank, reset_faces, positions) + +# ========================================================================================== +# ==== Boundary models + +boundary_model = BoundaryModelDummyParticles(tank.boundary.density, + tank.boundary.mass, state_equation, + AdamiPressureExtrapolation(), smoothing_kernel, + smoothing_length) +# K = 9.81 * water_height +# boundary_model = BoundaryModelMonaghanKajtar(K, beta, particle_spacing / beta, +# tank.boundary.mass) # ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length) +# ==== Systems + +fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, ContinuityDensity(), state_equation, + smoothing_kernel, smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity, 0.0)) -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model) +boundary_system = BoundarySPHSystem(tank.boundary.coordinates, boundary_model) # ========================================================================================== # ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system) + +semi = Semidiscretization(fluid_system, boundary_system, + neighborhood_search=SpatialHashingSearch, + damping_coefficient=1e-5) + +tspan = (0.0, 3.0) ode = semidiscretize(semi, tspan) info_callback = InfoCallback(interval=10) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") -callbacks = CallbackSet(info_callback, saving_callback) # Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. # Limiting of the maximum stepsize is necessary to prevent crashing. # When particles are approaching a wall in a uniform way, they can be advanced # with large time steps. Close to the wall, the stepsize has to be reduced drastically. -# Sometimes, the method fails to do so because forces become extremely large when -# fluid particles are very close to boundary particles, and the time integration method -# interprets this as an instability. -sol = solve(ode, RDPK3SpFSAL35(), +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. +sol = solve(ode, RDPK3SpFSAL49(), + abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-2, # Limit stepsize to prevent crashing + save_everystep=false, callback=info_callback); + +# Move right boundary +positions = (0, tank_width, 0, 0) +reset_wall!(tank, reset_faces, positions) + +# Run full simulation +tspan = (0.0, 5.7 / sqrt(9.81)) + +# Use solution of the relaxing step as initial coordinates +restart_with!(semi, sol) + +semi = Semidiscretization(fluid_system, boundary_system, + neighborhood_search=SpatialHashingSearch) +ode = semidiscretize(semi, tspan) + +saving_callback = SolutionSavingCallback(dt=0.02) +callbacks = CallbackSet(info_callback, saving_callback) + +# See above for an explanation of the parameter choice +sol = solve(ode, RDPK3SpFSAL49(), abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) dtmax=1e-2, # Limit stepsize to prevent crashing diff --git a/examples/fluid/falling_water_column_2d.jl b/examples/fluid/falling_water_column_2d.jl index 8174ce117..39a38b322 100644 --- a/examples/fluid/falling_water_column_2d.jl +++ b/examples/fluid/falling_water_column_2d.jl @@ -1,77 +1,87 @@ using TrixiParticles using OrdinaryDiffEq +gravity = -9.81 + # ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.02 +# ==== Fluid -# Change spacing ratio to 3 and boundary layers to 1 when using Monaghan-Kajtar boundary model +particle_spacing = 0.02 + +# Spacing ratio between fluid and boundary particles +beta = 1 boundary_layers = 3 -spacing_ratio = 1 -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 2.0) +water_width = 0.5 +water_height = 1.0 +water_density = 1000.0 + +tank_width = 4.0 +tank_height = 4.0 + +sound_speed = 10 * sqrt(9.81 * water_height) +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (0.5, 1.0) -tank_size = (4.0, 4.0) +smoothing_length = 1.2 * particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{2}() -fluid_density = 1000.0 -sound_speed = 10 * sqrt(gravity * initial_fluid_size[2]) -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7) +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio) +tank = RectangularTank(particle_spacing, (water_width, water_height), + (tank_width, tank_height), water_density, + n_layers=boundary_layers, spacing_ratio=beta) # Move water column for i in axes(tank.fluid.coordinates, 2) - tank.fluid.coordinates[:, i] .+= [0.5 * tank_size[1] - 0.5 * initial_fluid_size[1], 0.2] + tank.fluid.coordinates[:, i] .+= [0.5 * tank_width - 0.5 * water_width, 0.2] end # ========================================================================================== -# ==== Fluid -smoothing_length = 1.2 * fluid_particle_spacing -smoothing_kernel = SchoenbergCubicSplineKernel{2}() +# ==== Boundary models -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) +boundary_model = BoundaryModelDummyParticles(tank.boundary.density, + tank.boundary.mass, state_equation, + AdamiPressureExtrapolation(), smoothing_kernel, + smoothing_length) -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - acceleration=(0.0, -gravity)) +# K = 9.81 * water_height +# boundary_model = BoundaryModelMonaghanKajtar(K, beta, particle_spacing / beta, +# tank.boundary.mass) # ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length) +# ==== Systems + +fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, ContinuityDensity(), state_equation, + smoothing_kernel, smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity)) -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model) +boundary_system = BoundarySPHSystem(tank.boundary.coordinates, boundary_model) # ========================================================================================== # ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system) + +semi = Semidiscretization(fluid_system, boundary_system, + neighborhood_search=SpatialHashingSearch) + +tspan = (0.0, 2.0) ode = semidiscretize(semi, tspan) info_callback = InfoCallback(interval=100) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") +saving_callback = SolutionSavingCallback(dt=0.02) callbacks = CallbackSet(info_callback, saving_callback) # Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. # Limiting of the maximum stepsize is necessary to prevent crashing. # When particles are approaching a wall in a uniform way, they can be advanced # with large time steps. Close to the wall, the stepsize has to be reduced drastically. -# Sometimes, the method fails to do so because forces become extremely large when -# fluid particles are very close to boundary particles, and the time integration method -# interprets this as an instability. -sol = solve(ode, RDPK3SpFSAL35(), +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. +sol = solve(ode, RDPK3SpFSAL49(), abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) dtmax=1e-2, # Limit stepsize to prevent crashing diff --git a/examples/fluid/falling_water_spheres_2d.jl b/examples/fluid/falling_water_spheres_2d.jl deleted file mode 100644 index 37132d70b..000000000 --- a/examples/fluid/falling_water_spheres_2d.jl +++ /dev/null @@ -1,95 +0,0 @@ -# In this example two circles of water drop to the floor demonstrating the difference -# between the behavior with and without surface tension modelling. -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.005 - -boundary_layers = 3 -spacing_ratio = 1 - -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 0.3) - -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (0.0, 0.0) -tank_size = (2.0, 0.5) - -fluid_density = 1000.0 -sound_speed = 100 -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=1) - -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio, - faces=(true, true, true, false), - acceleration=(0.0, -gravity), state_equation=state_equation) - -sphere_radius = 0.05 - -sphere1_center = (0.5, 0.2) -sphere2_center = (1.5, 0.2) -sphere1 = SphereShape(fluid_particle_spacing, sphere_radius, sphere1_center, - fluid_density, sphere_type=VoxelSphere(), velocity=(0.0, -3.0)) -sphere2 = SphereShape(fluid_particle_spacing, sphere_radius, sphere2_center, - fluid_density, sphere_type=VoxelSphere(), velocity=(0.0, -3.0)) - -# ========================================================================================== -# ==== Fluid -fluid_smoothing_length = 1.0 * fluid_particle_spacing -fluid_smoothing_kernel = SchoenbergCubicSplineKernel{2}() - -fluid_density_calculator = ContinuityDensity() - -nu = 0.005 -alpha = 8 * nu / (fluid_smoothing_length * sound_speed) -viscosity = ArtificialViscosityMonaghan(alpha=alpha, beta=0.0) -density_diffusion = DensityDiffusionAntuono(sphere2, delta=0.1) - -sphere_surface_tension = WeaklyCompressibleSPHSystem(sphere1, fluid_density_calculator, - state_equation, fluid_smoothing_kernel, - fluid_smoothing_length, - viscosity=viscosity, - acceleration=(0.0, -gravity), - surface_tension=SurfaceTensionAkinci(surface_tension_coefficient=0.05), - correction=AkinciFreeSurfaceCorrection(fluid_density)) - -sphere = WeaklyCompressibleSPHSystem(sphere2, fluid_density_calculator, - state_equation, fluid_smoothing_kernel, - fluid_smoothing_length, viscosity=viscosity, - density_diffusion=density_diffusion, - acceleration=(0.0, -gravity)) - -# ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -wall_viscosity = nu -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - fluid_smoothing_kernel, fluid_smoothing_length, - viscosity=ViscosityAdami(nu=wall_viscosity)) - -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model, - adhesion_coefficient=0.001) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(boundary_system, sphere_surface_tension, sphere) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=50) -saving_callback = SolutionSavingCallback(dt=0.01, output_directory="out", prefix="", - write_meta_data=true) - -callbacks = CallbackSet(info_callback, saving_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control. -sol = solve(ode, RDPK3SpFSAL35(), - abstol=1e-6, # Default abstol is 1e-6 - reltol=1e-4, # Default reltol is 1e-3 - save_everystep=false, callback=callbacks); diff --git a/examples/fluid/falling_water_spheres_3d.jl b/examples/fluid/falling_water_spheres_3d.jl deleted file mode 100644 index a4ebb799e..000000000 --- a/examples/fluid/falling_water_spheres_3d.jl +++ /dev/null @@ -1,37 +0,0 @@ -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.008 - -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -nu = 0.01 -fluid_density = 1000.0 -sound_speed = 50 - -sphere1_radius = 0.05 - -sphere1_center = (0.5, 0.5, 0.2) -sphere2_center = (1.5, 0.5, 0.2) -sphere1 = SphereShape(fluid_particle_spacing, sphere1_radius, sphere1_center, - fluid_density, sphere_type=VoxelSphere(), velocity=(0.0, 0.0, -2.0)) -sphere2 = SphereShape(fluid_particle_spacing, sphere1_radius, sphere2_center, - fluid_density, sphere_type=VoxelSphere(), velocity=(0.0, 0.0, -2.0)) - -# `compact_support` needs to be `2.0 * particle_spacing` to be correct -fluid_smoothing_length = 1.0 * fluid_particle_spacing - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "falling_water_spheres_2d.jl"), - fluid_particle_spacing=fluid_particle_spacing, tspan=(0.0, 0.2), - initial_fluid_size=(0.0, 0.0, 0.0), - tank_size=(2.0, 1.0, 0.1), sound_speed=sound_speed, - faces=(true, true, true, true, true, false), - acceleration=(0.0, 0.0, -gravity), sphere1=sphere1, sphere2=sphere2, - fluid_smoothing_length=fluid_smoothing_length, - fluid_smoothing_kernel=SchoenbergCubicSplineKernel{3}(), - nu=nu, alpha=10 * nu / (fluid_smoothing_length * sound_speed), - surface_tension_coefficient=1.5, adhesion_coefficient=0.5) diff --git a/examples/fluid/hydrostatic_water_column_2d.jl b/examples/fluid/hydrostatic_water_column_2d.jl deleted file mode 100644 index b35b6933f..000000000 --- a/examples/fluid/hydrostatic_water_column_2d.jl +++ /dev/null @@ -1,72 +0,0 @@ -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.05 - -# Make sure that the kernel support of fluid particles at a boundary is always fully sampled -boundary_layers = 3 - -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 1.0) - -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (1.0, 0.9) -tank_size = (1.0, 1.0) - -fluid_density = 1000.0 -sound_speed = 10.0 -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7, clip_negative_pressure=false) - -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, - acceleration=(0.0, -gravity), state_equation=state_equation) - -# ========================================================================================== -# ==== Fluid -smoothing_length = 1.2 * fluid_particle_spacing -smoothing_kernel = SchoenbergCubicSplineKernel{2}() - -viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) - -fluid_density_calculator = ContinuityDensity() -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - acceleration=(0.0, -gravity), - source_terms=nothing) - -# ========================================================================================== -# ==== Boundary - -# This is to set another boundary density calculation with `trixi_include` -boundary_density_calculator = AdamiPressureExtrapolation() - -# This is to set wall viscosity with `trixi_include` -viscosity_wall = nothing -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length, - viscosity=viscosity_wall) -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model, movement=nothing) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=50) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") - -# This is to easily add a new callback with `trixi_include` -extra_callback = nothing - -callbacks = CallbackSet(info_callback, saving_callback, extra_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control -sol = solve(ode, RDPK3SpFSAL35(), save_everystep=false, callback=callbacks); diff --git a/examples/fluid/hydrostatic_water_column_3d.jl b/examples/fluid/hydrostatic_water_column_3d.jl deleted file mode 100644 index 7168b0557..000000000 --- a/examples/fluid/hydrostatic_water_column_3d.jl +++ /dev/null @@ -1,9 +0,0 @@ -using TrixiParticles - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - fluid_particle_spacing=0.05, initial_fluid_size=(1.0, 1.0, 0.9), - tank_size=(1.0, 1.0, 1.2), acceleration=(0.0, 0.0, -9.81), - smoothing_kernel=SchoenbergCubicSplineKernel{3}(), tspan=(0.0, 1.0), - maxiters=10^5, fluid_density_calculator=ContinuityDensity(), - clip_negative_pressure=false) diff --git a/examples/fluid/hydrostatic_water_column_edac_2d.jl b/examples/fluid/hydrostatic_water_column_edac_2d.jl deleted file mode 100644 index 701a1ccdb..000000000 --- a/examples/fluid/hydrostatic_water_column_edac_2d.jl +++ /dev/null @@ -1,35 +0,0 @@ -using TrixiParticles - -# Import the setup from `hydrostatic_water_column_2d.jl` -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - fluid_particle_spacing=0.05, initial_fluid_size=(1.0, 0.9), - tank_size=(1.0, 1.0), state_equation=nothing, fluid_system=nothing, - semi=nothing, ode=nothing, sol=nothing) # Overwrite `sol` assignment to skip time integration - -# ========================================================================================== -# ==== Experiment Setup -tspan = (0.0, 1.0) - -# ========================================================================================== -# ==== Fluid -alpha = 0.02 -viscosity = ViscosityAdami(nu=alpha * smoothing_length * sound_speed / 8) - -fluid_system = EntropicallyDampedSPHSystem(tank.fluid, smoothing_kernel, smoothing_length, - sound_speed, viscosity=viscosity, - density_calculator=ContinuityDensity(), - acceleration=(0.0, -gravity)) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=50) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") - -callbacks = CallbackSet(info_callback, saving_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control -sol = solve(ode, RDPK3SpFSAL35(), save_everystep=false, callback=callbacks); diff --git a/examples/fluid/moving_wall_2d.jl b/examples/fluid/moving_wall_2d.jl deleted file mode 100644 index ff31aca85..000000000 --- a/examples/fluid/moving_wall_2d.jl +++ /dev/null @@ -1,84 +0,0 @@ -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.05 - -# Make sure that the kernel support of fluid particles at a boundary is always fully sampled -boundary_layers = 3 - -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 2.0) - -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (1.0, 0.8) -tank_size = (4.0, 1.0) - -fluid_density = 1000.0 -sound_speed = 10 * sqrt(gravity * initial_fluid_size[2]) -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7) - -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=1.0, - acceleration=(0.0, -gravity), state_equation=state_equation) - -reset_wall!(tank, (false, true, false, false), (0.0, tank.fluid_size[1], 0.0, 0.0)) - -# Movement function -movement_function(t) = SVector(0.5t^2, 0.0) - -is_moving(t) = t < 1.5 - -boundary_movement = BoundaryMovement(movement_function, is_moving, - moving_particles=tank.face_indices[2]) - -# ========================================================================================== -# ==== Fluid -smoothing_length = 1.2 * fluid_particle_spacing -smoothing_kernel = SchoenbergCubicSplineKernel{2}() - -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.1, beta=0.0) - -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - acceleration=(0.0, -gravity)) - -# ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length) - -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model, - movement=boundary_movement) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=100) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") - -callbacks = CallbackSet(info_callback, saving_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control. -# Limiting of the maximum stepsize is necessary to prevent crashing. -# When particles are approaching a wall in a uniform way, they can be advanced -# with large time steps. Close to the wall, the stepsize has to be reduced drastically. -# Sometimes, the method fails to do so because forces become extremely large when -# fluid particles are very close to boundary particles, and the time integration method -# interprets this as an instability. -sol = solve(ode, RDPK3SpFSAL35(), - abstol=1e-6, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) - reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) - dtmax=1e-2, # Limit stepsize to prevent crashing - save_everystep=false, callback=callbacks); diff --git a/examples/fluid/oscillating_drop_2d.jl b/examples/fluid/oscillating_drop_2d.jl deleted file mode 100644 index da4e855ac..000000000 --- a/examples/fluid/oscillating_drop_2d.jl +++ /dev/null @@ -1,93 +0,0 @@ -# Oscillating drop in a central force field, based on -# -# J. J. Monaghan, Ashkan Rafiee. -# "A Simple SPH Algorithm for Multi-Fluid Flow with High Density Ratios." -# In: International Journal for Numerical Methods in Fluids 71, no. 5 (2013), pages 537-61. -# https://doi.org/10.1002/fld.3671. - -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.05 - -# ========================================================================================== -# ==== Experiment Setup -radius = 1.0 -sigma = 0.5 -# Make this a constant because global variables in the source terms are slow -const OMEGA = 1.0 - -source_terms = (coords, velocity, density, pressure) -> -OMEGA^2 * coords - -# 1 period in the exact solution as computed below (but integrated with a small timestep) -period = 4.567375 -tspan = (0.0, 1period) - -fluid_density = 1000.0 -sound_speed = 10.0 -state_equation = StateEquationCole(; sound_speed, exponent=7, - reference_density=fluid_density) - -# Equation A.19 in the paper rearranged. -# sigma^2 = Q / rho * (a^2 + b^2) / (a^2 b^2) - OMEGA^2. -Q = (sigma^2 + OMEGA^2) * fluid_density / 2 -pressure = coords -> Q * (1 - coords[1]^2 - coords[2]^2) -density = coords -> TrixiParticles.inverse_state_equation(state_equation, pressure(coords)) - -fluid = SphereShape(fluid_particle_spacing, radius, (0.0, 0.0), - density, pressure=pressure, - sphere_type=RoundSphere(), - velocity=coords -> sigma .* (coords[1], -coords[2])) - -# ========================================================================================== -# ==== Fluid -smoothing_length = 3.0 * fluid_particle_spacing -smoothing_kernel = WendlandC2Kernel{2}() - -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.01, beta=0.0) - -density_diffusion = DensityDiffusionAntuono(fluid, delta=0.1) -fluid_system = WeaklyCompressibleSPHSystem(fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - density_diffusion=density_diffusion, - source_terms=source_terms) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=50) -saving_callback = SolutionSavingCallback(dt=0.04, prefix="") - -callbacks = CallbackSet(info_callback, saving_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control. -sol = solve(ode, RDPK3SpFSAL49(), - abstol=1e-7, # Default abstol is 1e-6 (may need to be tuned to prevent intabilities) - reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent intabilities) - save_everystep=false, callback=callbacks); - -@inline function exact_solution_rhs(u, p, t) - sigma, A, B = u - - dsigma = (sigma^2 + OMEGA^2) * ((B^2 - A^2) / (B^2 + A^2)) - dA = sigma * A - dB = -sigma * B - - return SVector(dsigma, dA, dB) -end - -exact_u0 = SVector(sigma, radius, radius) -exact_solution_ode = ODEProblem(exact_solution_rhs, exact_u0, tspan) - -# Use the same time integrator to avoid compilation of another integrator in CI -sol_exact = solve(exact_solution_ode, RDPK3SpFSAL49(), save_everystep=false) - -# Error in the semi-major axis of the elliptical drop -error_A = maximum(sol.u[end].x[2]) + 0.5fluid_particle_spacing - - maximum(sol_exact.u[end][2:3]) diff --git a/examples/fluid/periodic_channel_2d.jl b/examples/fluid/periodic_channel_2d.jl deleted file mode 100644 index 55899df44..000000000 --- a/examples/fluid/periodic_channel_2d.jl +++ /dev/null @@ -1,80 +0,0 @@ -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.02 - -# Change spacing ratio to 3 and boundary layers to 1 when using Monaghan-Kajtar boundary model -boundary_layers = 3 -spacing_ratio = 1 - -# ========================================================================================== -# ==== Experiment Setup -tspan = (0.0, 1.0) - -# Boundary geometry and initial fluid particle positions -tank_size = (1.0, 0.5) -initial_fluid_size = tank_size -initial_velocity = (1.0, 0.0) - -fluid_density = 1000.0 -sound_speed = initial_velocity[1] -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7) - -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio, - faces=(false, false, true, true), velocity=initial_velocity) - -# ========================================================================================== -# ==== Fluid -smoothing_length = 1.2 * fluid_particle_spacing -smoothing_kernel = SchoenbergCubicSplineKernel{2}() - -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) - -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity) - -# ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -viscosity_wall = nothing -# Activate to switch to no-slip walls -#viscosity_wall = ViscosityAdami(nu=0.0025 * smoothing_length * sound_speed / 8) - -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length, - viscosity=viscosity_wall) - -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system, - periodic_box_min_corner=[0.0, -0.25], - periodic_box_max_corner=[1.0, 0.75]) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=100) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") - -callbacks = CallbackSet(info_callback, saving_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control. -# Limiting of the maximum stepsize is necessary to prevent crashing. -# When particles are approaching a wall in a uniform way, they can be advanced -# with large time steps. Close to the wall, the stepsize has to be reduced drastically. -# Sometimes, the method fails to do so because forces become extremely large when -# fluid particles are very close to boundary particles, and the time integration method -# interprets this as an instability. -sol = solve(ode, RDPK3SpFSAL35(), - abstol=1e-8, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) - reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) - dtmax=1e-2, # Limit stepsize to prevent crashing - save_everystep=false, callback=callbacks); diff --git a/examples/fluid/pipe_flow_2d.jl b/examples/fluid/pipe_flow_2d.jl deleted file mode 100644 index 3d642696e..000000000 --- a/examples/fluid/pipe_flow_2d.jl +++ /dev/null @@ -1,131 +0,0 @@ -# 2D channel flow simulation with open boundaries. - -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -particle_spacing = 0.05 - -# Make sure that the kernel support of fluid particles at a boundary is always fully sampled -boundary_layers = 3 - -# Make sure that the kernel support of fluid particles at an open boundary is always -# fully sampled. -# Note: Due to the dynamics at the inlets and outlets of open boundaries, -# it is recommended to use `open_boundary_layers > boundary_layers` -open_boundary_layers = 6 - -# ========================================================================================== -# ==== Experiment Setup -tspan = (0.0, 2.0) - -# Boundary geometry and initial fluid particle positions -domain_size = (1.0, 0.4) - -flow_direction = [1.0, 0.0] -reynolds_number = 100 -const prescribed_velocity = 2.0 - -boundary_size = (domain_size[1] + 2 * particle_spacing * open_boundary_layers, - domain_size[2]) - -fluid_density = 1000.0 - -# For this particular example, it is necessary to have a background pressure. -# Otherwise the suction at the outflow is to big and the simulation becomes unstable. -pressure = 1000.0 - -sound_speed = 10 * prescribed_velocity - -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7, background_pressure=pressure) - -pipe = RectangularTank(particle_spacing, domain_size, boundary_size, fluid_density, - pressure=pressure, n_layers=boundary_layers, - faces=(false, false, true, true)) - -# Shift pipe walls in negative x-direction for the inflow -pipe.boundary.coordinates[1, :] .-= particle_spacing * open_boundary_layers - -n_buffer_particles = 4 * pipe.n_particles_per_dimension[2] - -# ========================================================================================== -# ==== Fluid -smoothing_length = 3.0 * particle_spacing -smoothing_kernel = WendlandC2Kernel{2}() - -fluid_density_calculator = ContinuityDensity() - -kinematic_viscosity = prescribed_velocity * domain_size[2] / reynolds_number - -viscosity = ViscosityAdami(nu=kinematic_viscosity) - -fluid_system = EntropicallyDampedSPHSystem(pipe.fluid, smoothing_kernel, smoothing_length, - sound_speed, viscosity=viscosity, - density_calculator=fluid_density_calculator, - buffer_size=n_buffer_particles) - -# Alternatively the WCSPH scheme can be used -# alpha = 8 * kinematic_viscosity / (smoothing_length * sound_speed) -# viscosity = ArtificialViscosityMonaghan(; alpha, beta=0.0) - -# fluid_system = WeaklyCompressibleSPHSystem(pipe.fluid, fluid_density_calculator, -# state_equation, smoothing_kernel, -# smoothing_length, viscosity=viscosity, -# buffer_size=n_buffer_particles) - -# ========================================================================================== -# ==== Open Boundary -function velocity_function(pos, t) - # Use this for a time-dependent inflow velocity - # return SVector(0.5prescribed_velocity * sin(2pi * t) + prescribed_velocity, 0) - - return SVector(prescribed_velocity, 0.0) -end - -inflow = InFlow(; plane=([0.0, 0.0], [0.0, domain_size[2]]), flow_direction, - open_boundary_layers, density=fluid_density, particle_spacing) - -open_boundary_in = OpenBoundarySPHSystem(inflow; sound_speed, fluid_system, - buffer_size=n_buffer_particles, - reference_pressure=pressure, - reference_velocity=velocity_function) - -outflow = OutFlow(; plane=([domain_size[1], 0.0], [domain_size[1], domain_size[2]]), - flow_direction, open_boundary_layers, density=fluid_density, - particle_spacing) - -open_boundary_out = OpenBoundarySPHSystem(outflow; sound_speed, fluid_system, - buffer_size=n_buffer_particles, - reference_pressure=pressure, - reference_velocity=velocity_function) - -# ========================================================================================== -# ==== Boundary - -boundary_model = BoundaryModelDummyParticles(pipe.boundary.density, pipe.boundary.mass, - AdamiPressureExtrapolation(), - state_equation=state_equation, - #viscosity=ViscosityAdami(nu=1e-4), - smoothing_kernel, smoothing_length) - -boundary_system = BoundarySPHSystem(pipe.boundary, boundary_model) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system, open_boundary_in, open_boundary_out, - boundary_system) - -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=100) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") - -callbacks = CallbackSet(info_callback, saving_callback, UpdateCallback()) - -sol = solve(ode, RDPK3SpFSAL35(), - abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) - reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) - dtmax=1e-2, # Limit stepsize to prevent crashing - save_everystep=false, callback=callbacks); diff --git a/examples/fluid/rectangular_tank_2d.jl b/examples/fluid/rectangular_tank_2d.jl new file mode 100644 index 000000000..b09a0f234 --- /dev/null +++ b/examples/fluid/rectangular_tank_2d.jl @@ -0,0 +1,85 @@ +using TrixiParticles +using OrdinaryDiffEq + +gravity = -9.81 + +# ========================================================================================== +# ==== Fluid + +particle_spacing = 0.02 + +# Ratio of fluid particle spacing to boundary particle spacing +beta = 1 +boundary_layers = 3 + +water_width = 2.0 +water_height = 0.9 +water_density = 1000.0 + +tank_width = 2.0 +tank_height = 1.0 + +sound_speed = 10 * sqrt(9.81 * water_height) +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) + +smoothing_length = 1.2 * particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{2}() + +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) + +tank = RectangularTank(particle_spacing, (water_width, water_height), + (tank_width, tank_height), water_density, + n_layers=boundary_layers, spacing_ratio=beta) + +# ========================================================================================== +# ==== Boundary models + +boundary_model = BoundaryModelDummyParticles(tank.boundary.density, + tank.boundary.mass, state_equation, + AdamiPressureExtrapolation(), + smoothing_kernel, + smoothing_length) + +# K = 9.81 * water_height +# boundary_model = BoundaryModelMonaghanKajtar(K, beta, particle_spacing / beta, +# tank.boundary.mass) + +# ========================================================================================== +# ==== Systems + +fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, ContinuityDensity(), state_equation, + smoothing_kernel, smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity)) + +boundary_system = BoundarySPHSystem(tank.boundary.coordinates, boundary_model) + +# ========================================================================================== +# ==== Simulation + +semi = Semidiscretization(fluid_system, boundary_system, + neighborhood_search=SpatialHashingSearch, + damping_coefficient=1e-5) + +tspan = (0.0, 2.0) +ode = semidiscretize(semi, tspan) + +info_callback = InfoCallback(interval=10) +saving_callback = SolutionSavingCallback(dt=0.02) + +callbacks = CallbackSet(info_callback, saving_callback) + +# Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. +# Limiting of the maximum stepsize is necessary to prevent crashing. +# When particles are approaching a wall in a uniform way, they can be advanced +# with large time steps. Close to the wall, the stepsize has to be reduced drastically. +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. +sol = solve(ode, RDPK3SpFSAL49(), + abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-2, # Limit stepsize to prevent crashing + save_everystep=false, callback=callbacks); diff --git a/examples/fluid/sphere_surface_tension_2d.jl b/examples/fluid/sphere_surface_tension_2d.jl deleted file mode 100644 index 9006ebf0e..000000000 --- a/examples/fluid/sphere_surface_tension_2d.jl +++ /dev/null @@ -1,59 +0,0 @@ -# In this example we can observe that the `SurfaceTensionAkinci` surface tension model correctly leads to a -# surface minimization of the water square and approaches a sphere. -using TrixiParticles -using OrdinaryDiffEq - -fluid_density = 1000.0 - -particle_spacing = 0.1 - -# Note: Only square shapes will result in a sphere. -# Furthermore, changes of the coefficients might be necessary for higher resolutions or larger squares. -fluid_size = (0.5, 0.5) - -sound_speed = 20.0 -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7, clip_negative_pressure=true) - -# For all surface tension simulations, we need a compact support of `2 * particle_spacing` -# smoothing_length = 2.0 * particle_spacing -# smoothing_kernel = WendlandC2Kernel{2}() -# nu = 0.01 - -smoothing_length = 1.0 * particle_spacing -smoothing_kernel = SchoenbergCubicSplineKernel{2}() -nu = 0.025 - -fluid = RectangularShape(particle_spacing, round.(Int, fluid_size ./ particle_spacing), - zeros(length(fluid_size)), density=fluid_density) - -alpha = 8 * nu / (smoothing_length * sound_speed) -source_terms = SourceTermDamping(; damping_coefficient=0.5) -fluid_system = WeaklyCompressibleSPHSystem(fluid, SummationDensity(), - state_equation, smoothing_kernel, - smoothing_length, - viscosity=ArtificialViscosityMonaghan(alpha=alpha, - beta=0.0), - surface_tension=SurfaceTensionAkinci(surface_tension_coefficient=0.02), - correction=AkinciFreeSurfaceCorrection(fluid_density), - source_terms=source_terms) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system) - -tspan = (0.0, 3.0) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=100) - -# For overwriting via `trixi_include` -saving_callback = SolutionSavingCallback(dt=0.02) - -stepsize_callback = StepsizeCallback(cfl=1.0) - -callbacks = CallbackSet(info_callback, saving_callback, stepsize_callback) - -sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false), - dt=1.0, # This is overwritten by the stepsize callback - save_everystep=false, callback=callbacks); diff --git a/examples/fluid/sphere_surface_tension_3d.jl b/examples/fluid/sphere_surface_tension_3d.jl deleted file mode 100644 index 58a506294..000000000 --- a/examples/fluid/sphere_surface_tension_3d.jl +++ /dev/null @@ -1,25 +0,0 @@ -# In this example we can observe that the `SurfaceTensionAkinci` surface tension model correctly leads to a -# surface minimization of the water cube and approaches a sphere. -using TrixiParticles -using OrdinaryDiffEq - -fluid_density = 1000.0 - -particle_spacing = 0.1 -fluid_size = (0.9, 0.9, 0.9) - -sound_speed = 20.0 - -# For all surface tension simulations, we need a compact support of `2 * particle_spacing` -smoothing_length = 1.0 * particle_spacing - -nu = 0.01 - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "sphere_surface_tension_2d.jl"), - dt=0.1, cfl=1.2, surface_tension_coefficient=0.1, - tspan=(0.0, 10.0), nu=nu, - alpha=10 * nu / (smoothing_length * sound_speed), - smoothing_kernel=SchoenbergCubicSplineKernel{3}(), - particle_spacing=particle_spacing, sound_speed=sound_speed, - fluid_density=fluid_density, fluid_size=fluid_size) diff --git a/examples/fluid/sphere_surface_tension_wall_2d.jl b/examples/fluid/sphere_surface_tension_wall_2d.jl deleted file mode 100644 index 3e1cbdb80..000000000 --- a/examples/fluid/sphere_surface_tension_wall_2d.jl +++ /dev/null @@ -1,44 +0,0 @@ -# In this example we try to approach the static shape of a water droplet on a horizontal plane. -# The shape of a static droplet can be calculated from the Young-Laplace equation. -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.0025 - -# ========================================================================================== -# ==== Experiment Setup -tspan = (0.0, 0.5) - -# Boundary geometry and initial fluid particle positions -tank_size = (0.5, 0.1) - -fluid_density = 1000.0 -sound_speed = 120.0 - -sphere_radius = 0.05 - -sphere1_center = (0.25, sphere_radius) -sphere1 = SphereShape(fluid_particle_spacing, sphere_radius, sphere1_center, - fluid_density, sphere_type=VoxelSphere()) - -# ========================================================================================== -# ==== Fluid -fluid_smoothing_length = 1.0 * fluid_particle_spacing - -# For perfect wetting -# nu = 0.0005 -# For no wetting -nu = 0.001 - -alpha = 8 * nu / (fluid_smoothing_length * sound_speed) -# `adhesion_coefficient = 1.0` and `surface_tension_coefficient = 0.01` for perfect wetting -# `adhesion_coefficient = 0.001` and `surface_tension_coefficient = 2.0` for no wetting -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "falling_water_spheres_2d.jl"), - sphere=nothing, sphere1=sphere1, adhesion_coefficient=0.001, - wall_viscosity=4.0 * nu, surface_tension_coefficient=2.0, alpha=alpha, - sound_speed=sound_speed, fluid_density=fluid_density, nu=nu, - fluid_particle_spacing=fluid_particle_spacing, tspan=tspan, - tank_size=tank_size) diff --git a/examples/fsi/bending_beam_2d.jl b/examples/fsi/bending_beam_2d.jl new file mode 100644 index 000000000..2f6fad632 --- /dev/null +++ b/examples/fsi/bending_beam_2d.jl @@ -0,0 +1,207 @@ +# To test FSI, this example simulates a beam which is clamped on both ends and is bent by +# the load of a water column. Thereafter, the y-deflection of the beam is compared with the +# analytical deflection curve. +# +# The analytical approach assumes that the beam is made from homogeneous material, is much +# longer than any dimension of its cross-section and also the beam does not bend severely +# or coming close to deforming or fracturing (for more details see the "analytical solution" +# section of this example). +# +# In addition to these assumptions, we replaced the uniform load of the beam +# under gravity (by its own weight) by the load of the water column under gravity. +# Therefore, the load is not uniformly distributed anymore, since the height +# of the water column is higher towards the center of the beam. +# +# Because of these assumptions/modifications, we cannot expect +# a good agreement with the analytical solution. + +using TrixiParticles +using OrdinaryDiffEq + +gravity = -9.81 + +# ========================================================================================== +# ==== Solid + +length_beam = 1.0 +thickness_beam = length_beam / 10 +n_particles_y = 15 +solid_density = 1500.0 + +# The structure starts at the position of the first particle and ends +# at the position of the last particle. +solid_particle_spacing = thickness_beam / (n_particles_y - 1) + +# Lamé constants +E = 1.4e6 +nu = 0.0 # e.g. for a rod: Diameter does not change when its length will change + +solid_smoothing_length = sqrt(2) * solid_particle_spacing +solid_smoothing_kernel = SchoenbergCubicSplineKernel{2}() + +n_particles_per_dimension = (round(Int, length_beam / solid_particle_spacing - 1), + n_particles_y) + +# Shift the beam outwards since coordinates start in negative coordinate directions +y_position = -(n_particles_y - 1) * solid_particle_spacing + +beam = RectangularShape(solid_particle_spacing, n_particles_per_dimension, + (solid_particle_spacing, y_position), solid_density) + +n_boundary_layers = 5 + +# The beam is clamped between two rigid "pillars". Calculate the start coordinates of the fixed +# particles for the left pillar (A) and the right pillar (B). +# Since coordinates start in negative coordinate directions, +# shift x and y coordinates outwards and downwards respectively. +x_start_clamp_A = -(n_boundary_layers - 1) * solid_particle_spacing +x_start_clamp_B = (n_particles_per_dimension[1] + 1) * solid_particle_spacing + +n_particles_per_dimension_clamp = (n_boundary_layers, 10 * n_particles_y) +n_fixed_particles = prod(n_particles_per_dimension_clamp) * 2 + +# Start point of the pillars in y-direction. +y_start_clamp = -(2 * n_particles_y - 1) * solid_particle_spacing + +clamp_A = RectangularShape(solid_particle_spacing, n_particles_per_dimension_clamp, + (x_start_clamp_A, y_start_clamp), solid_density) + +clamp_B = RectangularShape(solid_particle_spacing, n_particles_per_dimension_clamp, + (x_start_clamp_B, y_start_clamp), solid_density) + +solid = InitialCondition(beam, clamp_A, clamp_B) + +# ========================================================================================== +# ==== Fluid + +water_density = 1000.0 +water_height = thickness_beam * solid_density / water_density +water_width = 1.0 +fluid_particle_spacing = solid_particle_spacing * 2 + +fluid_smoothing_length = 1.2 * fluid_particle_spacing +fluid_smoothing_kernel = SchoenbergCubicSplineKernel{2}() + +sound_speed = 10 * sqrt(9.81 * water_height) + +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) + +# Remove one particle in x-direction, so that the water column fits in between the two +# pillars, even though the load of the water is not correct anymore. The simulation is not +# physically correct anyway (see comment above). +n_particles_per_dimension = (round(Int, water_width / fluid_particle_spacing) - 1, + round(Int, water_height / fluid_particle_spacing)) + +fluid = RectangularShape(fluid_particle_spacing, n_particles_per_dimension, + (fluid_particle_spacing, fluid_particle_spacing), water_density) + +# ========================================================================================== +# ==== Boundary models + +hydrodynamic_densites = water_density * ones(size(solid.density)) +hydrodynamic_masses = hydrodynamic_densites * solid_particle_spacing^2 + +boundary_model_solid = BoundaryModelDummyParticles(hydrodynamic_densites, + hydrodynamic_masses, state_equation, + AdamiPressureExtrapolation(), + fluid_smoothing_kernel, + fluid_smoothing_length) + +# beta = 3 +# K = 9.81 * water_height +# boundary_model_solid = BoundaryModelMonaghanKajtar(K, beta, fluid_particle_spacing / beta) + +# ========================================================================================== +# ==== Systems + +solid_system = TotalLagrangianSPHSystem(solid, + solid_smoothing_kernel, solid_smoothing_length, + E, nu, boundary_model_solid, + n_fixed_particles=n_fixed_particles, + acceleration=(0.0, 0.0), + penalty_force=PenaltyForceGanzenmueller(alpha=0.1)) + +fluid_system = WeaklyCompressibleSPHSystem(fluid, + ContinuityDensity(), state_equation, + fluid_smoothing_kernel, fluid_smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity)) + +# Replace the elastic solid by a boundary for testing purposes. +# rigid_solid_system = BoundarySPHSystem(solid.coordinates, boundary_model_solid) + +# ========================================================================================== +# ==== Simulation + +tspan = (0.0, 2.0) + +semi = Semidiscretization(solid_system, fluid_system,# rigid_solid_system, + neighborhood_search=SpatialHashingSearch, + damping_coefficient=10.0) + +ode = semidiscretize(semi, tspan) + +info_callback = InfoCallback(interval=100) +saving_callback = SolutionSavingCallback(dt=0.02) + +callbacks = CallbackSet(info_callback, saving_callback) + +# Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. +# Limiting of the maximum stepsize is necessary to prevent crashing. +# When particles are approaching a wall in a uniform way, they can be advanced +# with large time steps. Close to the wall, the stepsize has to be reduced drastically. +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. +sol = solve(ode, RDPK3SpFSAL49(), + abstol=1e-6, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-2, # Limit stepsize to prevent crashing + save_everystep=false, callback=callbacks); + +# ========================================================================================== +# ==== analytical solution + +# In the following, the y deflection of the beam is compared with the analytical +# deflection curve (one of the most widely used formulas in structural engineering). +# Note that this is not the correct analytical solution for this example, +# but just an approximation (see comment at the top of this file). +# +# The equation is derived in e.g.: +# Lubliner, J. & Papadopoulos, P., "Introduction to Solid Mechanics", Ch. 8, +# DOI: 10.1007/978-3-319-18878-2 + +function plot_analytical(solid_system) + # Distributed transverse force + q_0 = gravity * solid_density * thickness_beam^2 + + # Second moment of area about z-axis (beam bends in the plane perpendicular to the z-axis) + I_z = thickness_beam^4 / 12 + + L = length_beam + + # d⁴v/dx⁴ = q_0 / (E * I_z) + # (This "v" should not be confused with the same symbol used for velocity. To denote displacement + # in solid mechanics the symbol u, v and w are used for x, y and z-direction, respectively) + v(x) = q_0 * L^4 / (24 * E * I_z) * ((x / L)^4 - 2 * (x / L)^3 + (x / L)^2) + + # The upper edge of the beam is at position y = 0.0 + centroidal_fiber_position = (n_particles_y - 1) / 2 * solid_particle_spacing + + # In a homogeneous linearly elastic beam in pure bending, the neutral fiber (zero stress) + # coincides with the centroidal fiber + neutral_fiber_position = [solid_system.current_coordinates[:, i] + for i in TrixiParticles.each_moving_particle(solid_system) + if isapprox(solid_system.initial_coordinates[2, i], + -centroidal_fiber_position)] + + neutral_fiber_position = hcat(neutral_fiber_position...) + neutral_fiber_position[2, :] .+= centroidal_fiber_position + + plot(neutral_fiber_position[1, :], neutral_fiber_position[2, :], xlims=(0, L), + xlabel="x", ylabel="y", lab="sph") + plot!(v, lab="analytical") +end diff --git a/examples/fsi/dam_break_2d.jl b/examples/fsi/dam_break_2d.jl new file mode 100644 index 000000000..e3dce1f6c --- /dev/null +++ b/examples/fsi/dam_break_2d.jl @@ -0,0 +1,178 @@ +# 2D dam break flow against an elastic plate based on Section 6.5 of +# +# L. Zhan, C. Peng, B. Zhang, W. Wu. +# "A stabilized TL–WC SPH approach with GPU acceleration for three-dimensional fluid–structure interaction". +# In: Journal of Fluids and Structures 86 (2019), pages 329-353. +# https://doi.org/10.1016/j.jfluidstructs.2019.02.002 + +using TrixiParticles +using OrdinaryDiffEq + +gravity = -9.81 + +# ========================================================================================== +# ==== Fluid + +fluid_particle_spacing = 0.01 + +# Spacing ratio between fluid and boundary particles +beta = 1 +boundary_layers = 3 + +water_width = 0.146 +water_height = 0.292 +water_density = 1000.0 + +tank_width = 0.584 +tank_height = 4.0 + +sound_speed = 20 * sqrt(9.81 * water_height) + +smoothing_length = 1.2 * fluid_particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{2}() + +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) + +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) + +tank = RectangularTank(fluid_particle_spacing, (water_width, water_height), + (tank_width, tank_height), water_density, + n_layers=boundary_layers, spacing_ratio=beta) + +# Move right boundary +# Recompute the new water column width since the width has been rounded in `RectangularTank`. +new_wall_position = (tank.n_particles_per_dimension[1] + 1) * fluid_particle_spacing +reset_faces = (false, true, false, false) +positions = (0, new_wall_position, 0, 0) + +reset_wall!(tank, reset_faces, positions) + +# ========================================================================================== +# ==== Solid + +length_beam = 0.08 +thickness = 0.012 +solid_density = 2500 +n_particles_x = 5 + +# The structure starts at the position of the first particle and ends +# at the position of the last particle. +solid_particle_spacing = thickness / (n_particles_x - 1) + +solid_smoothing_length = sqrt(2) * solid_particle_spacing +solid_smoothing_kernel = SchoenbergCubicSplineKernel{2}() + +# Young's modulus and Poisson ratio +E = 1e6 +nu = 0.0 + +n_particles_per_dimension = (n_particles_x, + round(Int, length_beam / solid_particle_spacing) + 1) + +# The bottom layer is sampled separately below. +plate = RectangularShape(solid_particle_spacing, + (n_particles_per_dimension[1], n_particles_per_dimension[2] - 1), + (0.292, solid_particle_spacing), solid_density) +fixed_particles = RectangularShape(solid_particle_spacing, + (n_particles_per_dimension[1], 1), (0.292, 0.0), + solid_density) + +solid = InitialCondition(plate, fixed_particles) + +# ========================================================================================== +# ==== Boundary models + +boundary_model = BoundaryModelDummyParticles(tank.boundary.density, + tank.boundary.mass, state_equation, + AdamiPressureExtrapolation(), smoothing_kernel, + smoothing_length) + +# K = 9.81 * water_height +# boundary_model = BoundaryModelMonaghanKajtar(K, beta, particle_spacing / beta, +# tank.boundary.mass) + +# For the FSI we need the hydrodynamic masses and densities in the solid boundary model +hydrodynamic_densites = water_density * ones(size(solid.density)) +hydrodynamic_masses = hydrodynamic_densites * solid_particle_spacing^2 + +solid_boundary_model = BoundaryModelDummyParticles(hydrodynamic_densites, + hydrodynamic_masses, state_equation, + AdamiPressureExtrapolation(), + smoothing_kernel, smoothing_length) + +# Use bigger K to prevent penetration into the solid +# solid_K = 5 * 9.81 * water_height +# solid_beta = fluid_particle_spacing / solid_particle_spacing +# solid_boundary_model = BoundaryModelMonaghanKajtar(solid_K, solid_beta, +# solid_particle_spacing, +# hydrodynamic_masses) + +# ========================================================================================== +# ==== Systems + +fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, ContinuityDensity(), state_equation, + smoothing_kernel, smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity)) + +boundary_system = BoundarySPHSystem(tank.boundary.coordinates, boundary_model) + +solid_system = TotalLagrangianSPHSystem(solid, + solid_smoothing_kernel, solid_smoothing_length, + E, nu, + n_fixed_particles=n_particles_x, + acceleration=(0.0, gravity), + solid_boundary_model, + penalty_force=PenaltyForceGanzenmueller(alpha=0.01)) + +# ========================================================================================== +# ==== Simulation + +# Relaxing of the fluid without solid +semi = Semidiscretization(fluid_system, boundary_system, + neighborhood_search=SpatialHashingSearch, + damping_coefficient=1e-5) + +tspan_relaxing = (0.0, 3.0) +ode = semidiscretize(semi, tspan_relaxing) + +info_callback = InfoCallback(interval=100) + +# Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. +# Limiting of the maximum stepsize is necessary to prevent crashing. +# When particles are approaching a wall in a uniform way, they can be advanced +# with large time steps. Close to the wall, the stepsize has to be reduced drastically. +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. +sol = solve(ode, RDPK3SpFSAL49(), + abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-2, # Limit stepsize to prevent crashing + save_everystep=false, callback=info_callback); + +# Move right boundary +positions = (0, tank_width, 0, 0) +reset_wall!(tank, reset_faces, positions) + +# Run full simulation +tspan = (0.0, 1.0) + +# Use solution of the relaxing step as initial coordinates +restart_with!(semi, sol) + +semi = Semidiscretization(fluid_system, boundary_system, solid_system, + neighborhood_search=SpatialHashingSearch) +ode = semidiscretize(semi, tspan) + +saving_callback = SolutionSavingCallback(dt=0.02) +callbacks = CallbackSet(info_callback, saving_callback) + +# See above for an explanation of the parameter choice +sol = solve(ode, RDPK3SpFSAL49(), + abstol=1e-6, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-3, # Limit stepsize to prevent crashing + save_everystep=false, callback=callbacks); diff --git a/examples/fsi/dam_break_gate_2d.jl b/examples/fsi/dam_break_gate_2d.jl index 7efc6cf02..c8e0515a7 100644 --- a/examples/fsi/dam_break_gate_2d.jl +++ b/examples/fsi/dam_break_gate_2d.jl @@ -8,166 +8,201 @@ using TrixiParticles using OrdinaryDiffEq +gravity = -9.81 + # ========================================================================================== -# ==== Resolution -# Note that the effect of the gate is less pronounced with lower fluid resolutions, -# since "larger" particles don't fit through the slightly opened gate. Lower fluid -# resolutions thereforce cause a later and more violent fluid impact against the gate. +# ==== Fluid + +# Note that the effect of the gate is less pronounced with lower resolutions, +# since "larger" particles don't fit through the slightly opened gate. fluid_particle_spacing = 0.02 -n_particles_x = 5 -# Change spacing ratio to 3 and boundary layers to 1 when using Monaghan-Kajtar boundary model -boundary_layers = 3 -spacing_ratio = 1 +# Spacing ratio between fluid and boundary particles +beta_tank = 1 +beta_gate = 3 +tank_layers = 3 +gate_layers = 1 -boundary_particle_spacing = fluid_particle_spacing / spacing_ratio +water_width = 0.2 +water_height = 0.4 +water_density = 997.0 -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 1.0) +tank_width = 0.8 +tank_height = 4.0 +gate_height = water_height + 4 * fluid_particle_spacing # Make sure that it overlaps the fluid. -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (0.2, 0.4) -tank_size = (0.8, 0.8) +sound_speed = 20 * sqrt(9.81 * water_height) -fluid_density = 997.0 -sound_speed = 10 * sqrt(2 * gravity * initial_fluid_size[2]) -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7) +smoothing_length = 1.2 * fluid_particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{2}() -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio, - acceleration=(0.0, -gravity), state_equation=state_equation) +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) -# Make the gate slightly higher than the fluid -gate_height = initial_fluid_size[2] + 4 * fluid_particle_spacing +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) -gate = RectangularShape(boundary_particle_spacing, - (boundary_layers, - round(Int, gate_height / boundary_particle_spacing)), - (initial_fluid_size[1], 0.0), density=fluid_density) +tank = RectangularTank(fluid_particle_spacing, (water_width, water_height), + (tank_width, tank_height), water_density, + n_layers=tank_layers, spacing_ratio=beta_tank) -# Movement of the gate according to the paper -movement_function(t) = SVector(0.0, -285.115t^3 + 72.305t^2 + 0.1463t) -is_moving(t) = t < 0.1 +gate_position = (tank.n_particles_per_dimension[1] + 1) * fluid_particle_spacing -gate_movement = BoundaryMovement(movement_function, is_moving) +gate = RectangularShape(fluid_particle_spacing / beta_gate, + (gate_layers, + round(Int, gate_height / fluid_particle_spacing * beta_gate)), + (gate_position, fluid_particle_spacing / beta_gate), + water_density) + +# No moving boundaries for the relaxing step +movement_function(coordinates, t) = false + +# ========================================================================================== +# ==== Solid -# Elastic plate/beam length_beam = 0.09 thickness = 0.004 solid_density = 1161.54 - -# Young's modulus and Poisson ratio -E = 3.5e6 -nu = 0.45 +n_particles_x = 5 # The structure starts at the position of the first particle and ends # at the position of the last particle. solid_particle_spacing = thickness / (n_particles_x - 1) -n_particles_y = round(Int, length_beam / solid_particle_spacing) + 1 +solid_smoothing_length = sqrt(2) * solid_particle_spacing +solid_smoothing_kernel = SchoenbergCubicSplineKernel{2}() + +# Young's modulus and Poisson ratio +E = 3.5e6 +nu = 0.45 + +n_particles_per_dimension = (n_particles_x, + round(Int, length_beam / solid_particle_spacing) + 1) -# The bottom layer is sampled separately below. Note that the `RectangularShape` puts the -# first particle half a particle spacing away from the boundary, which is correct for fluids, -# but not for solids. We therefore need to pass `tlsph=true`. -# -# The right end of the plate is 0.2 from the right end of the tank. -plate_position = 0.6 - n_particles_x * solid_particle_spacing plate = RectangularShape(solid_particle_spacing, - (n_particles_x, n_particles_y - 1), - (plate_position, solid_particle_spacing), - density=solid_density, tlsph=true) + (n_particles_per_dimension[1], n_particles_per_dimension[2] - 1), + (0.6, solid_particle_spacing), solid_density) fixed_particles = RectangularShape(solid_particle_spacing, - (n_particles_x, 1), (plate_position, 0.0), - density=solid_density, tlsph=true) + (n_particles_per_dimension[1], 1), (0.6, 0.0), + solid_density) -solid = union(plate, fixed_particles) +solid = InitialCondition(plate, fixed_particles) # ========================================================================================== -# ==== Fluid -smoothing_length = 3.5 * fluid_particle_spacing -smoothing_kernel = WendlandC2Kernel{2}() +# ==== Boundary models -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.1, beta=0.0) +boundary_model_tank = BoundaryModelDummyParticles(tank.boundary.density, + tank.boundary.mass, state_equation, + AdamiPressureExtrapolation(), + smoothing_kernel, + smoothing_length) -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - acceleration=(0.0, -gravity)) +# K_tank = 9.81 * water_height +# boundary_model_tank = BoundaryModelMonaghanKajtar(K_tank, beta_tank, +# fluid_particle_spacing / beta_tank, +# tank.boundary.mass) -# ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -boundary_model_tank = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length) +K_gate = 9.81 * water_height +boundary_model_gate = BoundaryModelMonaghanKajtar(K_gate, beta_gate, + fluid_particle_spacing / beta_gate, + gate.mass) -boundary_model_gate = BoundaryModelDummyParticles(gate.density, gate.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length) +hydrodynamic_densites = water_density * ones(size(solid.density)) +hydrodynamic_masses = hydrodynamic_densites * solid_particle_spacing^2 -boundary_system_tank = BoundarySPHSystem(tank.boundary, boundary_model_tank) -boundary_system_gate = BoundarySPHSystem(gate, boundary_model_gate, movement=gate_movement) +# For the FSI we need the hydrodynamic masses and densities in the solid boundary model +boundary_model_solid = BoundaryModelDummyParticles(hydrodynamic_densites, + hydrodynamic_masses, state_equation, + AdamiPressureExtrapolation(), + smoothing_kernel, smoothing_length) + +# Use bigger K to prevent penetration into the solid +# K_solid = 9.81 * water_height +# beta_solid = fluid_particle_spacing / solid_particle_spacing +# boundary_model_solid = BoundaryModelMonaghanKajtar(K_solid, beta_solid, +# solid_particle_spacing, +# hydrodynamic_masses) # ========================================================================================== -# ==== Solid -solid_smoothing_length = 2 * sqrt(2) * solid_particle_spacing -solid_smoothing_kernel = WendlandC2Kernel{2}() +# ==== Systems -# For the FSI we need the hydrodynamic masses and densities in the solid boundary model -hydrodynamic_densites = fluid_density * ones(size(solid.density)) -hydrodynamic_masses = hydrodynamic_densites * solid_particle_spacing^2 +fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, ContinuityDensity(), state_equation, + smoothing_kernel, smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity)) -k_solid = gravity * initial_fluid_size[2] -beta_solid = fluid_particle_spacing / solid_particle_spacing -boundary_model_solid = BoundaryModelMonaghanKajtar(k_solid, beta_solid, - solid_particle_spacing, - hydrodynamic_masses) - -# `BoundaryModelDummyParticles` usually produces better results, since Monaghan-Kajtar BCs -# tend to introduce a non-physical gap between fluid and boundary. -# However, `BoundaryModelDummyParticles` can only be used when the plate thickness is -# at least two fluid particle spacings, so that the compact support is fully sampled, -# or fluid particles can penetrate the solid. -# For higher fluid resolutions, uncomment the code below for better results. -# -# boundary_model_solid = BoundaryModelDummyParticles(hydrodynamic_densites, -# hydrodynamic_masses, -# state_equation=state_equation, -# AdamiPressureExtrapolation(), -# smoothing_kernel, smoothing_length) +boundary_system_tank = BoundarySPHSystem(tank.boundary.coordinates, + boundary_model_tank) + +boundary_system_gate = BoundarySPHSystem(gate.coordinates, + boundary_model_gate, + movement_function=movement_function) solid_system = TotalLagrangianSPHSystem(solid, solid_smoothing_kernel, solid_smoothing_length, - E, nu, boundary_model=boundary_model_solid, + E, nu, boundary_model_solid, n_fixed_particles=n_particles_x, - acceleration=(0.0, -gravity)) + acceleration=(0.0, gravity)) # ========================================================================================== # ==== Simulation + +# Relaxing of the fluid without solid semi = Semidiscretization(fluid_system, boundary_system_tank, - boundary_system_gate, solid_system) + boundary_system_gate, + neighborhood_search=SpatialHashingSearch) + +tspan = (0.0, 3.0) ode = semidiscretize(semi, tspan) info_callback = InfoCallback(interval=100) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") - -callbacks = CallbackSet(info_callback, saving_callback) # Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. # Limiting of the maximum stepsize is necessary to prevent crashing. # When particles are approaching a wall in a uniform way, they can be advanced # with large time steps. Close to the wall, the stepsize has to be reduced drastically. -# Sometimes, the method fails to do so because forces become extremely large when -# fluid particles are very close to boundary particles, and the time integration method -# interprets this as an instability. +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. +sol = solve(ode, RDPK3SpFSAL49(), + abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-2, # Limit stepsize to prevent crashing + save_everystep=false, callback=info_callback); + +# Run full simulation +tspan = (0.0, 1.0) + +function movement_function(coordinates, t) + if t < 0.1 + particle_spacing = coordinates[2, 2] - coordinates[2, 1] + f(t) = -285.115t^3 + 72.305t^2 + 0.1463t + particle_spacing + pos_1 = coordinates[2, 1] + pos_2 = f(t) + diff_pos = pos_2 - pos_1 + coordinates[2, :] .+= diff_pos + + return true + end + + return false +end + +# Use solution of the relaxing step as initial coordinates +restart_with!(semi, sol) + +semi = Semidiscretization(fluid_system, boundary_system_tank, + boundary_system_gate, solid_system, + neighborhood_search=SpatialHashingSearch) + +ode = semidiscretize(semi, tspan) + +saving_callback = SolutionSavingCallback(dt=0.02) +callbacks = CallbackSet(info_callback, saving_callback) + +# See above for an explanation of the parameter choice sol = solve(ode, RDPK3SpFSAL49(), abstol=1e-6, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) - dtmax=1e-3, # Limit stepsize to prevent crashing + dtmax=1e-2, # Limit stepsize to prevent crashing save_everystep=false, callback=callbacks); diff --git a/examples/fsi/dam_break_plate_2d.jl b/examples/fsi/dam_break_plate_2d.jl deleted file mode 100644 index 4db77b44a..000000000 --- a/examples/fsi/dam_break_plate_2d.jl +++ /dev/null @@ -1,145 +0,0 @@ -# 2D dam break flow against an elastic plate based on Section 6.5 of -# -# L. Zhan, C. Peng, B. Zhang, W. Wu. -# "A stabilized TL–WC SPH approach with GPU acceleration for three-dimensional fluid–structure interaction". -# In: Journal of Fluids and Structures 86 (2019), pages 329-353. -# https://doi.org/10.1016/j.jfluidstructs.2019.02.002 - -using TrixiParticles -using OrdinaryDiffEq - -# ========================================================================================== -# ==== Resolution -fluid_particle_spacing = 0.01 -n_particles_x = 5 - -# Change spacing ratio to 3 and boundary layers to 1 when using Monaghan-Kajtar boundary model -boundary_layers = 4 -spacing_ratio = 1 - -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 1.0) - -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (0.146, 2 * 0.146) -tank_size = 4 .* initial_fluid_size - -fluid_density = 1000.0 -sound_speed = 20 * sqrt(gravity * initial_fluid_size[2]) -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=1) - -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio, - acceleration=(0.0, -gravity), state_equation=state_equation) - -# Elastic plate/beam -length_beam = 0.08 -thickness = 0.012 -solid_density = 2500 - -# Young's modulus and Poisson ratio -E = 1e6 -nu = 0.0 - -# The structure starts at the position of the first particle and ends -# at the position of the last particle. -solid_particle_spacing = thickness / (n_particles_x - 1) - -n_particles_y = round(Int, length_beam / solid_particle_spacing) + 1 - -# The bottom layer is sampled separately below. Note that the `RectangularShape` puts the -# first particle half a particle spacing away from the boundary, which is correct for fluids, -# but not for solids. We therefore need to pass `tlsph=true`. -plate = RectangularShape(solid_particle_spacing, - (n_particles_x, n_particles_y - 1), - (2initial_fluid_size[1], solid_particle_spacing), - density=solid_density, tlsph=true) -fixed_particles = RectangularShape(solid_particle_spacing, - (n_particles_x, 1), (2initial_fluid_size[1], 0.0), - density=solid_density, tlsph=true) - -solid = union(plate, fixed_particles) - -# ========================================================================================== -# ==== Fluid -smoothing_length = 3.5 * fluid_particle_spacing -smoothing_kernel = WendlandC2Kernel{2}() - -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) - -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - acceleration=(0.0, -gravity)) - -# ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - smoothing_kernel, smoothing_length) - -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model) - -# ========================================================================================== -# ==== Solid -solid_smoothing_length = 2 * sqrt(2) * solid_particle_spacing -solid_smoothing_kernel = WendlandC2Kernel{2}() - -# For the FSI we need the hydrodynamic masses and densities in the solid boundary model -hydrodynamic_densites = fluid_density * ones(size(solid.density)) -hydrodynamic_masses = hydrodynamic_densites * solid_particle_spacing^2 - -k_solid = gravity * initial_fluid_size[2] -spacing_ratio_solid = fluid_particle_spacing / solid_particle_spacing -boundary_model_solid = BoundaryModelMonaghanKajtar(k_solid, spacing_ratio_solid, - solid_particle_spacing, - hydrodynamic_masses) - -# `BoundaryModelDummyParticles` usually produces better results, since Monaghan-Kajtar BCs -# tend to introduce a non-physical gap between fluid and boundary. -# However, `BoundaryModelDummyParticles` can only be used when the plate thickness is -# at least two fluid particle spacings, so that the compact support is fully sampled, -# or fluid particles can penetrate the solid. -# With higher fluid resolutions, uncomment the code below for better results. -# -# boundary_model_solid = BoundaryModelDummyParticles(hydrodynamic_densites, -# hydrodynamic_masses, -# state_equation=state_equation, -# boundary_density_calculator, -# smoothing_kernel, smoothing_length) - -solid_system = TotalLagrangianSPHSystem(solid, - solid_smoothing_kernel, solid_smoothing_length, - E, nu, boundary_model=boundary_model_solid, - n_fixed_particles=n_particles_x, - acceleration=(0.0, -gravity), - penalty_force=PenaltyForceGanzenmueller(alpha=0.01)) - -# ========================================================================================== -# ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system, solid_system) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=100) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="") - -callbacks = CallbackSet(info_callback, saving_callback) - -# Use a Runge-Kutta method with automatic (error based) time step size control. -# Limiting of the maximum stepsize is necessary to prevent crashing. -# When particles are approaching a wall in a uniform way, they can be advanced -# with large time steps. Close to the wall, the stepsize has to be reduced drastically. -# Sometimes, the method fails to do so because forces become extremely large when -# fluid particles are very close to boundary particles, and the time integration method -# interprets this as an instability. -sol = solve(ode, RDPK3SpFSAL49(), - abstol=1e-6, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) - reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) - dtmax=1e-3, # Limit stepsize to prevent crashing - save_everystep=false, callback=callbacks); diff --git a/examples/fsi/falling_sphere_2d.jl b/examples/fsi/falling_sphere_2d.jl deleted file mode 100644 index 99a69bc2c..000000000 --- a/examples/fsi/falling_sphere_2d.jl +++ /dev/null @@ -1,7 +0,0 @@ -using TrixiParticles - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fsi", "falling_spheres_2d.jl"), - solid_system_2=nothing, fluid_particle_spacing=0.02, - initial_fluid_size=(1.0, 0.9), tank_size=(1.0, 1.0), - tspan=(0.0, 1.0), abstol=1e-6, reltol=1e-3) diff --git a/examples/fsi/falling_sphere_3d.jl b/examples/fsi/falling_sphere_3d.jl deleted file mode 100644 index d44911409..000000000 --- a/examples/fsi/falling_sphere_3d.jl +++ /dev/null @@ -1,14 +0,0 @@ -using TrixiParticles - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fsi", "falling_spheres_2d.jl"), - solid_system_2=nothing, fluid_particle_spacing=0.05, - initial_fluid_size=(1.0, 0.9, 1.0), tank_size=(1.0, 1.0, 1.0), - faces=(true, true, true, false, true, true), - acceleration=(0.0, -9.81, 0.0), sphere1_center=(0.5, 2.0, 0.5), - fluid_smoothing_kernel=WendlandC2Kernel{3}(), - solid_smoothing_kernel=WendlandC2Kernel{3}(), - sphere_type=RoundSphere(), - output_directory="out", prefix="", - write_meta_data=false, # Files with meta data can't be read by meshio - tspan=(0.0, 1.0), abstol=1e-6, reltol=1e-3) diff --git a/examples/fsi/falling_spheres_2d.jl b/examples/fsi/falling_spheres_2d.jl index 6a2397a4b..eed0c7376 100644 --- a/examples/fsi/falling_spheres_2d.jl +++ b/examples/fsi/falling_spheres_2d.jl @@ -1,129 +1,142 @@ +# In this example, two solid spheres of different densities fall into a tank of water. +# Note that the solids don't interact with boundaries (yet), so that the sphere with larger +# density is going to fall out of the tank. + using TrixiParticles using OrdinaryDiffEq +gravity = -9.81 + # ========================================================================================== -# ==== Resolution +# ==== Fluid + fluid_particle_spacing = 0.02 -solid_particle_spacing = fluid_particle_spacing -# Change spacing ratio to 3 and boundary layers to 1 when using Monaghan-Kajtar boundary model +# Ratio of fluid particle spacing to boundary particle spacing +beta = 1 boundary_layers = 3 -spacing_ratio = 1 - -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 1.0) -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (2.0, 0.9) -tank_size = (2.0, 1.0) +water_width = 2.0 +water_height = 0.9 +water_density = 1000.0 -fluid_density = 1000.0 -sound_speed = 10 * sqrt(gravity * initial_fluid_size[2]) -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=1) +tank_width = 2.0 +tank_height = 1.0 -tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio, - faces=(true, true, true, false), - acceleration=(0.0, -gravity), state_equation=state_equation) +sound_speed = 10 * sqrt(9.81 * water_height) +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) -sphere1_radius = 0.3 -sphere2_radius = 0.2 -sphere1_density = 500.0 -sphere2_density = 1100.0 +fluid_smoothing_length = 1.2 * fluid_particle_spacing +fluid_smoothing_kernel = SchoenbergCubicSplineKernel{2}() -# Young's modulus and Poisson ratio -sphere1_E = 7e4 -sphere2_E = 1e5 -nu = 0.0 +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) -sphere1_center = (0.5, 1.6) -sphere2_center = (1.5, 1.6) -sphere1 = SphereShape(solid_particle_spacing, sphere1_radius, sphere1_center, - sphere1_density, sphere_type=VoxelSphere()) -sphere2 = SphereShape(solid_particle_spacing, sphere2_radius, sphere2_center, - sphere2_density, sphere_type=VoxelSphere()) +tank = RectangularTank(fluid_particle_spacing, (water_width, water_height), + (tank_width, tank_height), water_density, + n_layers=boundary_layers, spacing_ratio=beta, + faces=(true, true, true, false)) # ========================================================================================== -# ==== Fluid -fluid_smoothing_length = 3.0 * fluid_particle_spacing -fluid_smoothing_kernel = WendlandC2Kernel{2}() +# ==== Solid -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) -density_diffusion = DensityDiffusionMolteniColagrossi(delta=0.1) +solid_radius_1 = 0.3 +solid_radius_2 = 0.2 +solid_density_1 = 500.0 +solid_density_2 = 1100.0 +solid_particle_spacing = fluid_particle_spacing -fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator, - state_equation, fluid_smoothing_kernel, - fluid_smoothing_length, viscosity=viscosity, - density_diffusion=density_diffusion, - acceleration=(0.0, -gravity)) +solid_smoothing_length = sqrt(2) * solid_particle_spacing +solid_smoothing_kernel = SchoenbergCubicSplineKernel{2}() -# ========================================================================================== -# ==== Boundary -boundary_density_calculator = AdamiPressureExtrapolation() -boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass, - state_equation=state_equation, - boundary_density_calculator, - fluid_smoothing_kernel, fluid_smoothing_length) +# Young's modulus and Poisson ratio +E1 = 7e4 +E2 = 1e5 +nu = 0.0 -boundary_system = BoundarySPHSystem(tank.boundary, boundary_model) +sphere_1 = CircularShape(solid_particle_spacing, solid_radius_1, (0.5, 1.6), + solid_density_1) +sphere_2 = CircularShape(solid_particle_spacing, solid_radius_2, (1.5, 1.6), + solid_density_2) # ========================================================================================== -# ==== Solid -solid_smoothing_length = 2 * sqrt(2) * solid_particle_spacing -solid_smoothing_kernel = WendlandC2Kernel{2}() +# ==== Boundary models + +boundary_model = BoundaryModelDummyParticles(tank.boundary.density, + tank.boundary.mass, state_equation, + AdamiPressureExtrapolation(), + fluid_smoothing_kernel, + fluid_smoothing_length) # For the FSI we need the hydrodynamic masses and densities in the solid boundary model -hydrodynamic_densites_1 = fluid_density * ones(size(sphere1.density)) -hydrodynamic_masses_1 = hydrodynamic_densites_1 * solid_particle_spacing^ndims(fluid_system) +hydrodynamic_densites_1 = water_density * ones(size(sphere_1.density)) +hydrodynamic_masses_1 = hydrodynamic_densites_1 * solid_particle_spacing^2 solid_boundary_model_1 = BoundaryModelDummyParticles(hydrodynamic_densites_1, - hydrodynamic_masses_1, - state_equation=state_equation, - boundary_density_calculator, + hydrodynamic_masses_1, state_equation, + AdamiPressureExtrapolation(), fluid_smoothing_kernel, fluid_smoothing_length) -hydrodynamic_densites_2 = fluid_density * ones(size(sphere2.density)) -hydrodynamic_masses_2 = hydrodynamic_densites_2 * solid_particle_spacing^ndims(fluid_system) +hydrodynamic_densites_2 = water_density * ones(size(sphere_2.density)) +hydrodynamic_masses_2 = hydrodynamic_densites_2 * solid_particle_spacing^2 solid_boundary_model_2 = BoundaryModelDummyParticles(hydrodynamic_densites_2, - hydrodynamic_masses_2, - state_equation=state_equation, - boundary_density_calculator, + hydrodynamic_masses_2, state_equation, + AdamiPressureExtrapolation(), fluid_smoothing_kernel, fluid_smoothing_length) -solid_system_1 = TotalLagrangianSPHSystem(sphere1, +# ========================================================================================== +# ==== Systems + +fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, ContinuityDensity(), state_equation, + fluid_smoothing_kernel, + fluid_smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity)) + +boundary_system = BoundarySPHSystem(tank.boundary.coordinates, boundary_model) + +solid_system_1 = TotalLagrangianSPHSystem(sphere_1, solid_smoothing_kernel, solid_smoothing_length, - sphere1_E, nu, - acceleration=(0.0, -gravity), - boundary_model=solid_boundary_model_1, + E1, nu, + acceleration=(0.0, gravity), + solid_boundary_model_1, penalty_force=PenaltyForceGanzenmueller(alpha=0.3)) -solid_system_2 = TotalLagrangianSPHSystem(sphere2, +solid_system_2 = TotalLagrangianSPHSystem(sphere_2, solid_smoothing_kernel, solid_smoothing_length, - sphere2_E, nu, - acceleration=(0.0, -gravity), - boundary_model=solid_boundary_model_2, + E2, nu, + acceleration=(0.0, gravity), + solid_boundary_model_2, penalty_force=PenaltyForceGanzenmueller(alpha=0.3)) # ========================================================================================== # ==== Simulation -semi = Semidiscretization(fluid_system, boundary_system, solid_system_1, solid_system_2) + +semi = Semidiscretization(fluid_system, boundary_system, solid_system_1, + solid_system_2, + neighborhood_search=SpatialHashingSearch) + +tspan = (0.0, 2.0) ode = semidiscretize(semi, tspan) info_callback = InfoCallback(interval=10) -saving_callback = SolutionSavingCallback(dt=0.02, output_directory="out", prefix="", - write_meta_data=true) +saving_callback = SolutionSavingCallback(dt=0.02) callbacks = CallbackSet(info_callback, saving_callback) # Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. +# Limiting of the maximum stepsize is necessary to prevent crashing. +# When particles are approaching a wall in a uniform way, they can be advanced +# with large time steps. Close to the wall, the stepsize has to be reduced drastically. +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. sol = solve(ode, RDPK3SpFSAL49(), - abstol=1e-6, # Default abstol is 1e-6 - reltol=1e-3, # Default reltol is 1e-3 + abstol=1e-5, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) + reltol=1e-3, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) + dtmax=1e-2, # Limit stepsize to prevent crashing save_everystep=false, callback=callbacks); diff --git a/examples/fsi/falling_water_column_2d.jl b/examples/fsi/falling_water_column_2d.jl index 430512e07..cb50f9fd2 100644 --- a/examples/fsi/falling_water_column_2d.jl +++ b/examples/fsi/falling_water_column_2d.jl @@ -1,85 +1,121 @@ using TrixiParticles using OrdinaryDiffEq +gravity = -9.81 + # ========================================================================================== -# ==== Resolution -n_particles_y = 5 +# ==== Fluid -# Load setup from oscillating beam example -trixi_include(@__MODULE__, joinpath(examples_dir(), "solid", "oscillating_beam_2d.jl"), - thickness=0.05, n_particles_y=n_particles_y, - sol=nothing) # Don't run simulation, only include the setup part +fluid_particle_spacing = 0.0125 * 3 -# Fluid resolution -fluid_particle_spacing = 3particle_spacing +water_width = 0.525 +water_height = 1.0125 +water_density = 1000.0 -# ========================================================================================== -# ==== Experiment Setup -gravity = 9.81 -tspan = (0.0, 1.0) +sound_speed = 10 * sqrt(9.81 * water_height) + +smoothing_length = 1.2 * fluid_particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{2}() -# Boundary geometry and initial fluid particle positions -initial_fluid_size = (0.525, 1.0125) -tank_size = (2.0, 4.0) +state_equation = StateEquationCole(sound_speed, 7, water_density, 100000.0, + background_pressure=100000.0) -fluid_density = 1000.0 -sound_speed = 10 * sqrt(gravity * initial_fluid_size[2]) -state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density, - exponent=7) +viscosity = ArtificialViscosityMonaghan(0.02, 0.0) fluid = RectangularShape(fluid_particle_spacing, - round.(Int, (initial_fluid_size ./ fluid_particle_spacing)), - (0.1, 0.2), density=fluid_density) + (round(Int, (water_width / fluid_particle_spacing)), + round(Int, (water_height / fluid_particle_spacing))), (0.1, 0.2), + water_density) # ========================================================================================== -# ==== Fluid -fluid_smoothing_length = 1.2 * fluid_particle_spacing -fluid_smoothing_kernel = SchoenbergCubicSplineKernel{2}() +# ==== Solid + +length_beam = 0.35 +thickness = 0.05 +n_particles_y = 5 +clamp_radius = 0.05 +solid_density = 1000.0 + +# The structure starts at the position of the first particle and ends +# at the position of the last particle. +solid_particle_spacing = thickness / (n_particles_y - 1) + +smoothing_length = sqrt(2) * solid_particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{2}() -fluid_density_calculator = ContinuityDensity() -viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) +# Lamé constants +E = 1.4e6 +nu = 0.4 -fluid_system = WeaklyCompressibleSPHSystem(fluid, fluid_density_calculator, - state_equation, fluid_smoothing_kernel, - fluid_smoothing_length, viscosity=viscosity, - acceleration=(0.0, -gravity)) +fixed_particles = CircularShape(solid_particle_spacing, + clamp_radius + solid_particle_spacing / 2, + (0.0, thickness / 2), + shape_type=FillCircle(x_recess=(0.0, clamp_radius), + y_recess=(0.0, thickness)), + solid_density) + +n_particles_clamp_x = round(Int, clamp_radius / solid_particle_spacing) + +# Cantilever and clamped particles +n_particles_per_dimension = (round(Int, length_beam / solid_particle_spacing) + + n_particles_clamp_x + 1, n_particles_y) + +beam = RectangularShape(solid_particle_spacing, n_particles_per_dimension, (0, 0), + solid_density) + +solid = InitialCondition(beam, fixed_particles) # ========================================================================================== -# ==== Solid -k = gravity * initial_fluid_size[2] -spacing_ratio = fluid_particle_spacing / particle_spacing +# ==== Boundary models + +K = 9.81 * water_height +beta = fluid_particle_spacing / solid_particle_spacing # For the FSI we need the hydrodynamic masses and densities in the solid boundary model -hydrodynamic_densites = fluid_density * ones(size(solid.density)) -hydrodynamic_masses = hydrodynamic_densites * particle_spacing^2 +hydrodynamic_densites = water_density * ones(size(solid.density)) +hydrodynamic_masses = hydrodynamic_densites * solid_particle_spacing^2 -boundary_model = BoundaryModelMonaghanKajtar(k, spacing_ratio, particle_spacing, +boundary_model = BoundaryModelMonaghanKajtar(K, beta, solid_particle_spacing, hydrodynamic_masses) +# ========================================================================================== +# ==== Systems + +fluid_system = WeaklyCompressibleSPHSystem(fluid, + ContinuityDensity(), state_equation, + smoothing_kernel, smoothing_length, + viscosity=viscosity, + acceleration=(0.0, gravity)) + solid_system = TotalLagrangianSPHSystem(solid, smoothing_kernel, smoothing_length, - material.E, material.nu, - boundary_model=boundary_model, + E, nu, n_fixed_particles=nparticles(fixed_particles), - acceleration=(0.0, -gravity)) + acceleration=(0.0, gravity), boundary_model, + penalty_force=PenaltyForceGanzenmueller(alpha=0.1)) # ========================================================================================== # ==== Simulation -semi = Semidiscretization(fluid_system, solid_system) + +semi = Semidiscretization(fluid_system, solid_system, + neighborhood_search=SpatialHashingSearch) + +tspan = (0.0, 1.0) ode = semidiscretize(semi, tspan) info_callback = InfoCallback(interval=100) -saving_callback = SolutionSavingCallback(dt=0.005, prefix="") +saving_callback = SolutionSavingCallback(dt=0.005) callbacks = CallbackSet(info_callback, saving_callback) # Use a Runge-Kutta method with automatic (error based) time step size control. +# Enable threading of the RK method for better performance on multiple threads. # Limiting of the maximum stepsize is necessary to prevent crashing. # When particles are approaching a wall in a uniform way, they can be advanced # with large time steps. Close to the wall, the stepsize has to be reduced drastically. -# Sometimes, the method fails to do so because forces become extremely large when -# fluid particles are very close to boundary particles, and the time integration method -# interprets this as an instability. +# Sometimes, the method fails to do so with Monaghan-Kajtar BC because forces +# become extremely large when fluid particles are very close to boundary particles, +# and the time integration method interprets this as an instability. sol = solve(ode, RDPK3SpFSAL49(), abstol=1e-6, # Default abstol is 1e-6 (may need to be tuned to prevent boundary penetration) reltol=1e-4, # Default reltol is 1e-3 (may need to be tuned to prevent boundary penetration) diff --git a/examples/n_body/n_body_benchmark_trixi.jl b/examples/n_body/n_body_benchmark_trixi.jl index b47f689e7..7f03f11ee 100644 --- a/examples/n_body/n_body_benchmark_trixi.jl +++ b/examples/n_body/n_body_benchmark_trixi.jl @@ -9,13 +9,12 @@ using Polyester include("n_body_system.jl") -# Redefine interact in a more optimized way -function TrixiParticles.interact!(dv, v_particle_system, u_particle_system, - v_neighbor_system, u_neighbor_system, +# Redefine interact in a more optimized way. +function TrixiParticles.interact!(du, u_particle_system, u_neighbor_system, neighborhood_search, particle_system::NBodySystem, neighbor_system::NBodySystem) - (; mass, G) = neighbor_system + @unpack mass, G = neighbor_system for particle in TrixiParticles.each_moving_particle(particle_system) particle_coords = TrixiParticles.current_coords(u_particle_system, @@ -35,15 +34,16 @@ function TrixiParticles.interact!(dv, v_particle_system, u_particle_system, tmp1 = mass[neighbor] * tmp tmp2 = mass[particle] * tmp - @inbounds for i in 1:ndims(particle_system) - # This is slightly faster than dv[...] += tmp1 * pos_diff[i] - dv[i, particle] = muladd(tmp1, pos_diff[i], dv[i, particle]) - dv[i, neighbor] = muladd(tmp2, -pos_diff[i], dv[i, neighbor]) + for i in 1:ndims(particle_system) + j = i + ndims(particle_system) + # This is slightly faster than du[...] += tmp1 * pos_diff[i] + du[j, particle] = muladd(tmp1, pos_diff[i], du[j, particle]) + du[j, neighbor] = muladd(tmp2, -pos_diff[i], du[j, neighbor]) end end end - return dv + return du end # ========================================================================================== @@ -55,10 +55,10 @@ coordinates = [0.0 4.84143144246472090e+0 8.34336671824457987e+0 1.2894369562139 0.0 -1.16032004402742839e+0 4.12479856412430479e+0 -1.51111514016986312e+1 -2.59193146099879641e+1; 0.0 -1.03622044471123109e-1 -4.03523417114321381e-1 -2.23307578892655734e-1 1.79258772950371181e-1] -velocity = [0.0 1.66007664274403694e-3 -2.76742510726862411e-3 2.96460137564761618e-3 2.68067772490389322e-3; - 0.0 7.69901118419740425e-3 4.99852801234917238e-3 2.37847173959480950e-3 1.62824170038242295e-3; - 0.0 -6.90460016972063023e-5 2.30417297573763929e-5 -2.96589568540237556e-5 -9.51592254519715870e-5] * - DAYS_PER_YEAR +velocities = [0.0 1.66007664274403694e-3 -2.76742510726862411e-3 2.96460137564761618e-3 2.68067772490389322e-3; + 0.0 7.69901118419740425e-3 4.99852801234917238e-3 2.37847173959480950e-3 1.62824170038242295e-3; + 0.0 -6.90460016972063023e-5 2.30417297573763929e-5 -2.96589568540237556e-5 -9.51592254519715870e-5] * + DAYS_PER_YEAR masses = [ 1.0, 9.54791938424326609e-4, 2.85885980666130812e-4, 4.36624404335156298e-5, @@ -66,9 +66,9 @@ masses = [ ] * SOLAR_MASS # Offset sun momentum -velocity[:, 1] = -velocity[:, 2:end] * masses[2:end] / SOLAR_MASS +velocities[:, 1] = -velocities[:, 2:end] * masses[2:end] / SOLAR_MASS -initial_condition = InitialCondition(; coordinates, velocity, density=1.0, mass=masses) +initial_condition = InitialCondition(coordinates, velocities, masses, zeros(size(masses))) G = 1.0 particle_system = NBodySystem(initial_condition, G) @@ -76,11 +76,11 @@ particle_system = NBodySystem(initial_condition, G) # ========================================================================================== # ==== Simulation -semi = Semidiscretization(particle_system, neighborhood_search=nothing) +semi = Semidiscretization(particle_system) # This is significantly faster than using OrdinaryDiffEq. -function symplectic_euler!(velocity, coordinates, semi) - v = vec(velocity) +function symplectic_euler!(velocities, coordinates, semi) + v = vec(velocities) u = vec(coordinates) dv = copy(v) du = copy(u) @@ -98,32 +98,19 @@ function symplectic_euler!(velocity, coordinates, semi) u[i] += 0.01 * du[i] end end - - return v, u end # One RHS evaluation is so fast that timers make it multiple times slower. -# Disabling timers throws a warning, which we suppress here in order to make the tests pass. -# For some reason, this only works with a file and not with devnull. See issue #332. -filename = tempname() -open(filename, "w") do f - redirect_stderr(f) do - TrixiParticles.disable_debug_timings() - end -end +TrixiParticles.TimerOutputs.disable_debug_timings(TrixiParticles) -@printf("%.9f\n", energy(velocity, coordinates, particle_system, semi)) +@printf("%.9f\n", energy(velocities, coordinates, particle_system, semi)) # Disable multithreading, since it adds a significant overhead for this small problem. disable_polyester_threads() do - symplectic_euler!(velocity, coordinates, semi) + symplectic_euler!(velocities, coordinates, semi) end -@printf("%.9f\n", energy(velocity, coordinates, particle_system, semi)) +@printf("%.9f\n", energy(velocities, coordinates, particle_system, semi)) -# Enable timers again -open(filename, "w") do f - redirect_stderr(f) do - TrixiParticles.enable_debug_timings() - end -end +# Enable timers again. +TrixiParticles.TimerOutputs.enable_debug_timings(TrixiParticles) diff --git a/examples/n_body/n_body_solar_system.jl b/examples/n_body/n_body_solar_system.jl index b4da85aeb..ecc875d79 100644 --- a/examples/n_body/n_body_solar_system.jl +++ b/examples/n_body/n_body_solar_system.jl @@ -15,15 +15,15 @@ include("n_body_system.jl") coordinates = [5.5850e+08 5.1979e+10 -1.5041e+10 -1.1506e+09 -4.8883e+10 -8.1142e+11 -4.2780e+11 2.7878e+12 4.2097e+12; 5.5850e+08 7.6928e+09 9.7080e+10 -1.3910e+11 -1.9686e+11 4.5462e+10 -1.3353e+12 9.9509e+11 -1.3834e+12; 5.5850e+08 -1.2845e+09 4.4635e+10 -6.0330e+10 -8.8994e+10 3.9229e+10 -5.3311e+11 3.9639e+08 -6.7105e+11] -velocity = [-1.4663 -1.5205e+04 -3.4770e+04 2.9288e+04 2.4533e+04 -1.0724e+03 8.7288e+03 -2.4913e+03 1.8271e+03; - 11.1238 4.4189e+04 -5.5933e+03 -398.5759 -2.7622e+03 -1.1422e+04 -2.4369e+03 5.5197e+03 4.7731e+03; - 4.8370 2.5180e+04 -316.8994 -172.5873 -1.9295e+03 -4.8696e+03 -1.3824e+03 2.4527e+03 1.9082e+03] +velocities = [-1.4663 -1.5205e+04 -3.4770e+04 2.9288e+04 2.4533e+04 -1.0724e+03 8.7288e+03 -2.4913e+03 1.8271e+03; + 11.1238 4.4189e+04 -5.5933e+03 -398.5759 -2.7622e+03 -1.1422e+04 -2.4369e+03 5.5197e+03 4.7731e+03; + 4.8370 2.5180e+04 -316.8994 -172.5873 -1.9295e+03 -4.8696e+03 -1.3824e+03 2.4527e+03 1.9082e+03] masses = [ 1.99e30, 3.30e23, 4.87e24, 5.97e24, 6.42e23, 1.90e27, 5.68e26, 8.68e25, 1.02e26, ] -initial_condition = InitialCondition(; coordinates, velocity, density=1.0, mass=masses) +initial_condition = InitialCondition(coordinates, velocities, masses, zeros(size(masses))) G = 6.6743e-11 particle_system = NBodySystem(initial_condition, G) @@ -31,7 +31,7 @@ particle_system = NBodySystem(initial_condition, G) # ========================================================================================== # ==== Simulation -semi = Semidiscretization(particle_system, neighborhood_search=nothing) +semi = Semidiscretization(particle_system) day = 24 * 3600.0 year = 365day @@ -39,30 +39,19 @@ tspan = (0.0, 10year) ode = semidiscretize(semi, tspan) info_callback = InfoCallback(interval=100000) -saving_callback = SolutionSavingCallback(dt=10day, max_coordinates=Inf) +saving_callback = SolutionSavingCallback(dt=10day) callbacks = CallbackSet(info_callback, saving_callback) # One RHS evaluation is so fast that timers make it multiple times slower. -# Disabling timers throws a warning, which we suppress here in order to make the tests pass. -# For some reason, this only works with a file and not with devnull. See issue #332. -filename = tempname() -open(filename, "w") do f - redirect_stderr(f) do - TrixiParticles.disable_debug_timings() - end -end +TrixiParticles.TimerOutputs.disable_debug_timings(TrixiParticles) sol = solve(ode, SymplecticEuler(), dt=1.0e5, save_everystep=false, callback=callbacks); @printf("%.9e\n", energy(ode.u0.x..., particle_system, semi)) -@printf("%.9e\n", energy(sol.u[end].x..., particle_system, semi)) +@printf("%.9e\n", energy(sol[end].x..., particle_system, semi)) -# Enable timers again -open(filename, "w") do f - redirect_stderr(f) do - TrixiParticles.enable_debug_timings() - end -end +# Enable timers again. +TrixiParticles.TimerOutputs.enable_debug_timings(TrixiParticles) diff --git a/examples/n_body/n_body_system.jl b/examples/n_body/n_body_system.jl index 556147ed4..1dce97de1 100644 --- a/examples/n_body/n_body_system.jl +++ b/examples/n_body/n_body_system.jl @@ -1,26 +1,25 @@ using TrixiParticles using LinearAlgebra -# The second type parameter of `System` can't be `Nothing`, or TrixiParticles will launch -# GPU kernel for `for_particle_neighbor` loops. -struct NBodySystem{NDIMS, ELTYPE <: Real} <: TrixiParticles.System{NDIMS, 0} +struct NBodySystem{NDIMS, ELTYPE <: Real} <: TrixiParticles.System{NDIMS} initial_condition :: InitialCondition{ELTYPE} mass :: Array{ELTYPE, 1} # [particle] G :: ELTYPE - buffer :: Nothing function NBodySystem(initial_condition, G) mass = copy(initial_condition.mass) new{size(initial_condition.coordinates, 1), - eltype(mass)}(initial_condition, mass, G, nothing) + eltype(mass)}(initial_condition, mass, G) end end -TrixiParticles.timer_name(::NBodySystem) = "nbody" - @inline Base.eltype(system::NBodySystem) = eltype(system.initial_condition.coordinates) +@inline function TrixiParticles.add_acceleration!(dv, particle, system::NBodySystem) + return dv +end + function TrixiParticles.write_u0!(u0, system::NBodySystem) u0 .= system.initial_condition.coordinates @@ -34,12 +33,9 @@ function TrixiParticles.write_v0!(v0, system::NBodySystem) end # NHS update -function TrixiParticles.update_nhs!(neighborhood_search, - system::NBodySystem, neighbor::NBodySystem, - u_system, u_neighbor) - TrixiParticles.PointNeighbors.update!(neighborhood_search, - u_system, u_neighbor, - particles_moving=(true, true)) +function TrixiParticles.nhs_coords(system::NBodySystem, + neighbor::NBodySystem, u) + return u end function TrixiParticles.compact_support(system::NBodySystem, @@ -53,10 +49,13 @@ function TrixiParticles.interact!(dv, v_particle_system, u_particle_system, neighborhood_search, particle_system::NBodySystem, neighbor_system::NBodySystem) - (; mass, G) = neighbor_system + @unpack mass, G = neighbor_system + + system_coords = TrixiParticles.current_coordinates(u_particle_system, + particle_system) - system_coords = TrixiParticles.current_coordinates(u_particle_system, particle_system) - neighbor_coords = TrixiParticles.current_coordinates(u_neighbor_system, neighbor_system) + neighbor_coords = TrixiParticles.current_coordinates(u_neighbor_system, + neighbor_system) # Loop over all pairs of particles and neighbors within the kernel cutoff. TrixiParticles.for_particle_neighbor(particle_system, neighbor_system, @@ -82,12 +81,12 @@ function TrixiParticles.interact!(dv, v_particle_system, u_particle_system, end function energy(v_ode, u_ode, system, semi) - (; mass) = system + @unpack mass = system e = zero(eltype(system)) - v = TrixiParticles.wrap_v(v_ode, system, semi) - u = TrixiParticles.wrap_u(u_ode, system, semi) + v = TrixiParticles.wrap_v(v_ode, 1, system, semi) + u = TrixiParticles.wrap_u(u_ode, 1, system, semi) for particle in TrixiParticles.eachparticle(system) e += 0.5 * mass[particle] * @@ -109,8 +108,8 @@ end TrixiParticles.vtkname(system::NBodySystem) = "n-body" -function TrixiParticles.write2vtk!(vtk, v, u, t, system::NBodySystem; write_meta_data=true) - (; mass) = system +function TrixiParticles.write2vtk!(vtk, v, u, t, system::NBodySystem) + @unpack mass = system vtk["velocity"] = v vtk["mass"] = mass diff --git a/examples/postprocessing/interpolation_plane.jl b/examples/postprocessing/interpolation_plane.jl deleted file mode 100644 index ea273d0fc..000000000 --- a/examples/postprocessing/interpolation_plane.jl +++ /dev/null @@ -1,120 +0,0 @@ -# Example for using interpolation -####################################################################################### -using TrixiParticles -using Plots -using Plots.PlotMeasures - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - tspan=(0.0, 0.1)) - -# Interpolation parameters -interpolation_start = [0.0, 0.0] -interpolation_end = [1.0, 1.0] -resolution = 0.005 - -# We can interpolate a plane by providing the lower left and top right coordinates of a plane. -# Per default the same `smoothing_length` will be used as during the simulation. -original_plane = interpolate_plane_2d(interpolation_start, interpolation_end, resolution, - semi, fluid_system, sol) -original_x = [point[1] for point in original_plane.coord] -original_y = [point[2] for point in original_plane.coord] -original_pressure = original_plane.pressure - -# To export the interpolated plane as a VTI file, which can be read by tools like ParaView, -# run `interpolate_plane_2d_vtk` with the same arguments as above. When no other filename -# is specified with the kwarg `filename`, it will be exported to `out/plane.vti`. -interpolate_plane_2d_vtk(interpolation_start, interpolation_end, resolution, - semi, fluid_system, sol) - -# Plane with double smoothing length. -# Utilizing a higher `smoothing_length` in SPH interpolation increases the amount of smoothing, -# thereby reducing the visibility of disturbances. It also increases the distance -# from free surfaces where the fluid is cut off. This adjustment in `smoothing_length` -# can affect both the accuracy and smoothness of the interpolated results. -double_smoothing_plane = interpolate_plane_2d(interpolation_start, interpolation_end, - resolution, semi, fluid_system, sol, - smoothing_length=2.0 * smoothing_length) -double_x = [point[1] for point in double_smoothing_plane.coord] -double_y = [point[2] for point in double_smoothing_plane.coord] -double_pressure = double_smoothing_plane.pressure - -# Plane with half smoothing length. -# Employing a lower `smoothing_length` in SPH interpolation reduces the amount of smoothing, -# consequently increasing the visibility of disturbances. Simultaneously, it allows for a more -# precise cutoff of the fluid at free surfaces. This change in `smoothing_length` can impact the -# balance between the detail of disturbances captured and the precision of fluid representation near surfaces. -half_smoothing_plane = interpolate_plane_2d(interpolation_start, interpolation_end, - resolution, semi, fluid_system, sol, - smoothing_length=0.5 * smoothing_length) -half_x = [point[1] for point in half_smoothing_plane.coord] -half_y = [point[2] for point in half_smoothing_plane.coord] -half_pressure = half_smoothing_plane.pressure - -scatter1 = Plots.scatter(original_x, original_y, zcolor=original_pressure, marker=:circle, - markersize=2, markercolor=:viridis, markerstrokewidth=0) -scatter2 = Plots.scatter(double_x, double_y, zcolor=double_pressure, marker=:circle, - markersize=2, markercolor=:viridis, markerstrokewidth=0) -scatter3 = Plots.scatter(half_x, half_y, zcolor=half_pressure, marker=:circle, markersize=2, - markercolor=:viridis, markerstrokewidth=0) - -plot1 = Plots.plot(scatter1, xlabel="X Coordinate", ylabel="Y Coordinate", - title="Pressure Distribution", colorbar_title="Pressure", - ylim=(0.0, 1.0), legend=false, clim=(0, 9000), colorbar=true) -plot2 = Plots.plot(scatter2, xlabel="X Coordinate", ylabel="Y Coordinate", - title="Pressure with 2x Smoothing Length", colorbar_title="Pressure", - ylim=(0.0, 1.0), legend=false, clim=(0, 9000), colorbar=true) -plot3 = Plots.plot(scatter3, xlabel="X Coordinate", ylabel="Y Coordinate", - title="Pressure with 0.5x Smoothing Length", colorbar_title="Pressure", - ylim=(0.0, 1.0), legend=false, clim=(0, 9000), colorbar=true) - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_3d.jl"), - tspan=(0.0, 0.01), initial_fluid_size=(2.0, 1.0, 0.9), - tank_size=(2.0, 1.0, 1.2)) - -# Interpolation parameters -p1 = [0.0, 0.0, 0.0] -p2 = [1.0, 1.0, 0.1] -p3 = [1.0, 0.5, 0.2] -resolution = 0.025 - -# We can also interpolate a 3D plane but in this case we have to provide 3 points instead! -original_plane = interpolate_plane_3d(p1, p2, p3, resolution, semi, - fluid_system, sol) -original_x = [point[1] for point in original_plane.coord] -original_y = [point[2] for point in original_plane.coord] -original_z = [point[3] for point in original_plane.coord] -original_pressure = original_plane.pressure - -scatter_3d = Plots.scatter3d(original_x, original_y, original_z, marker_z=original_pressure, - color=:viridis, markerstrokewidth=0) - -plot_3d = Plots.plot(scatter_3d, xlabel="X", ylabel="Y", zlabel="Z", - title="3D Scatter Plot with Pressure Coloring", legend=false, - clim=(0, 9000), colorbar=false) - -combined_plot = Plots.plot(plot1, plot2, plot3, plot_3d, layout=(2, 2), - size=(1000, 1500), margin=3mm) - -# If we want to save planes at regular intervals, we can use the postprocessing callback. -function save_interpolated_plane(v, u, t, system) - # Size of the patch to be interpolated - interpolation_start = [0.0, 0.0] - interpolation_end = [tank_size[1], tank_size[2]] - - # The resolution the plane is interpolated to. In this case twice the original resolution. - resolution = 0.5 * fluid_particle_spacing - - file_id = ceil(Int, t * 10000) - interpolate_plane_2d_vtk(interpolation_start, interpolation_end, resolution, - semi, system, v, u, filename="plane_$file_id.vti") - return nothing -end - -save_interpolation_cb = PostprocessCallback(; dt=0.1, write_file_interval=0, - save_interpolated_plane) - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), tspan=(0.0, 0.2), - extra_callback=save_interpolation_cb, fluid_particle_spacing=0.01) diff --git a/examples/postprocessing/interpolation_point_line.jl b/examples/postprocessing/interpolation_point_line.jl deleted file mode 100644 index bc595f670..000000000 --- a/examples/postprocessing/interpolation_point_line.jl +++ /dev/null @@ -1,71 +0,0 @@ -# Example for using interpolation -####################################################################################### -using TrixiParticles -# this needs to be commented out to use PythonPlot -using Plots - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl")) - -position_x = tank_size[1] / 2 - -# `interpolate_point` can be used to interpolate the properties of the `fluid_system` with the original kernel and `smoothing_length` -println(interpolate_point([position_x, 0.01], semi, fluid_system, sol)) -# Or with an increased `smoothing_length` smoothing the result -println(interpolate_point([position_x, 0.01], semi, fluid_system, sol, - smoothing_length=2.0 * smoothing_length)) - -# A point outside of the domain will result in properties with value 0 -# On the boundary a result can still be obtained -println(interpolate_point([position_x, 0.0], semi, fluid_system, sol)) -# Slightly outside of the fluid domain the result is 0 -println(interpolate_point([position_x, -0.01], semi, fluid_system, sol)) - -# Multiple points can be interpolated by providing an array -println(interpolate_point([ - [position_x, 0.01], - [position_x, 0.1], - [position_x, 0.0], - [position_x, -0.01], - [position_x, -0.05], - ], semi, fluid_system, sol)) - -# It is also possible to interpolate along a line -n_interpolation_points = 10 -start_point = [position_x, -fluid_particle_spacing] -end_point = [position_x, tank_size[2]] -result = interpolate_line(start_point, end_point, n_interpolation_points, - semi, fluid_system, sol) -result_endpoint = interpolate_line(start_point, end_point, n_interpolation_points, - semi, fluid_system, sol, endpoint=false) - -# Extracting wall distance for the standard and endpoint cases -walldistance = [coord[2] for coord in result.coord] -walldistance_endpoint = [coord[2] for coord in result_endpoint.coord] - -# Instead of using Plots.jl one can also use PythonPlot which uses matplotlib -# using PythonPlot - -# figure() -# plot(walldistance, result.density, marker="o", linestyle="-", label="With Endpoint") -# plot(walldistance_endpoint, result_endpoint.density, marker="x", linestyle="--", -# label="Without Endpoint") - -# xlabel("Wall distance") -# ylabel("Density") -# title("Density Interpolation Along a Line") -# legend() - -# plotshow() - -# Replace NaNs with zeros for visualization -replace!(result.density, NaN => 0.0) - -p = Plots.plot(walldistance, result.density, marker=:circle, color=:blue, - markerstrokecolor=:blue, linewidth=2, label="With Endpoint") - -Plots.plot!(p, walldistance_endpoint, result_endpoint.density, marker=:xcross, linewidth=2, - linestyle=:dash, label="Without Endpoint", color=:orange) - -Plots.plot!(p, framestyle=:box, legend=:best, xlabel="Wall distance", ylabel="Density", - title="Density Interpolation Along a Line", size=(800, 600), dpi=300) diff --git a/examples/postprocessing/postprocessing.jl b/examples/postprocessing/postprocessing.jl deleted file mode 100644 index 11612f2f7..000000000 --- a/examples/postprocessing/postprocessing.jl +++ /dev/null @@ -1,46 +0,0 @@ -using TrixiParticles -using Plots -using CSV -using DataFrames -using JSON - -# Any custom function with the arguments `v, u, t, system` can be passed to the callback -# to be called every 10th timestep. See example below: -function hello(v, u, t, system) - # Will write "hello" and the current simulation time - println("hello at ", t) - - # Value stored for output in the postprocessing output file - return 2 * t -end -example_cb = PostprocessCallback(; interval=10, hello, write_file_interval=0) - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - extra_callback=example_cb, tspan=(0.0, 0.1)); - -# Lets write the average pressure and kinetic energy every 0.01s -pp = PostprocessCallback(; dt=0.005, filename="example_pressure_ekin", avg_pressure, - kinetic_energy, write_file_interval=0) - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - extra_callback=pp, tspan=(0.0, 0.1)); - -data = CSV.read("out/example_pressure_ekin.csv", DataFrame) - -# Or, alternatively using JSON (data is not used in the plot) -file_content = read("out/example_pressure_ekin.json", String) -data_json = JSON.parse(file_content) -time = data_json["kinetic_energy_fluid_1"]["time"] -values_ekin = data_json["kinetic_energy_fluid_1"]["values"] -values_avg_p = data_json["avg_pressure_fluid_1"]["values"] - -# Create side-by-side subplots -p1 = Plots.plot(data.time, data.kinetic_energy_fluid_1, color=:blue, - title="Kinetic Energy", xlabel="Time", ylabel="Kinetic Energy") -p2 = Plots.plot(data.time, data.avg_pressure_fluid_1, color=:red, - title="Average Pressure", xlabel="Time", ylabel="Pressure") - -# Combine plots into a single figure -Plots.plot(p1, p2, legend=false) diff --git a/examples/solid/oscillating_beam_2d.jl b/examples/solid/oscillating_beam_2d.jl index 362b98c1e..c73ec8537 100644 --- a/examples/solid/oscillating_beam_2d.jl +++ b/examples/solid/oscillating_beam_2d.jl @@ -1,83 +1,69 @@ using TrixiParticles using OrdinaryDiffEq -# ========================================================================================== -# ==== Resolution -n_particles_y = 5 +acceleration = -2.0 # ========================================================================================== -# ==== Experiment Setup -gravity = 2.0 -tspan = (0.0, 5.0) +# ==== Solid -elastic_beam = (length=0.35, thickness=0.02) -material = (density=1000.0, E=1.4e6, nu=0.4) +length_beam = 0.35 +thickness = 0.02 +n_particles_y = 5 clamp_radius = 0.05 +particle_density = 1000.0 # The structure starts at the position of the first particle and ends # at the position of the last particle. -particle_spacing = elastic_beam.thickness / (n_particles_y - 1) +particle_spacing = thickness / (n_particles_y - 1) + +smoothing_length = sqrt(2) * particle_spacing +smoothing_kernel = SchoenbergCubicSplineKernel{2}() -# Add particle_spacing/2 to the clamp_radius to ensure that particles are also placed on the radius -fixed_particles = SphereShape(particle_spacing, clamp_radius + particle_spacing / 2, - (0.0, elastic_beam.thickness / 2), material.density, - cutout_min=(0.0, 0.0), - cutout_max=(clamp_radius, elastic_beam.thickness), - tlsph=true) +# Lamé constants +E = 1.4e6 +nu = 0.4 + +# Add particle_spacing/2 to the clamp_radius to ensure that particles are also placed on the radius. +fixed_particles = CircularShape(particle_spacing, clamp_radius + particle_spacing / 2, + (0.0, thickness / 2), + shape_type=FillCircle(x_recess=(0.0, clamp_radius), + y_recess=(0.0, thickness)), + particle_density) n_particles_clamp_x = round(Int, clamp_radius / particle_spacing) -# Beam and clamped particles -n_particles_per_dimension = (round(Int, elastic_beam.length / particle_spacing) + +# cantilever and clamped particles +n_particles_per_dimension = (round(Int, length_beam / particle_spacing) + n_particles_clamp_x + 1, n_particles_y) -# Note that the `RectangularShape` puts the first particle half a particle spacing away -# from the boundary, which is correct for fluids, but not for solids. -# We therefore need to pass `tlsph=true`. -beam = RectangularShape(particle_spacing, n_particles_per_dimension, - (0.0, 0.0), density=material.density, tlsph=true) +beam = RectangularShape(particle_spacing, n_particles_per_dimension, (0, 0), + particle_density) -solid = union(beam, fixed_particles) +solid = InitialCondition(beam, fixed_particles) # ========================================================================================== -# ==== Solid -# The kernel in the reference uses a differently scaled smoothing length, -# so this is equivalent to the smoothing length of `sqrt(2) * particle_spacing` used in the paper. -smoothing_length = 2 * sqrt(2) * particle_spacing -smoothing_kernel = WendlandC2Kernel{2}() +# ==== Systems -solid_system = TotalLagrangianSPHSystem(solid, smoothing_kernel, smoothing_length, - material.E, material.nu, +solid_system = TotalLagrangianSPHSystem(solid, + smoothing_kernel, smoothing_length, + E, nu, n_fixed_particles=nparticles(fixed_particles), - acceleration=(0.0, -gravity), - penalty_force=nothing) + acceleration=(0.0, acceleration), + nothing) # No boundary model # ========================================================================================== # ==== Simulation -semi = Semidiscretization(solid_system) -ode = semidiscretize(semi, tspan) - -info_callback = InfoCallback(interval=100) - -# Track the position of the particle in the middle of the tip of the beam. -middle_particle_id = Int(n_particles_per_dimension[1] * (n_particles_per_dimension[2] + 1) / - 2) -startposition_x = beam.coordinates[1, middle_particle_id] -startposition_y = beam.coordinates[2, middle_particle_id] -function deflection_x(v, u, t, system) - return system.current_coordinates[1, middle_particle_id] - startposition_x -end +semi = Semidiscretization(solid_system, neighborhood_search=SpatialHashingSearch) +tspan = (0.0, 5.0) -function deflection_y(v, u, t, system) - return system.current_coordinates[2, middle_particle_id] - startposition_y -end +ode = semidiscretize(semi, tspan) -saving_callback = SolutionSavingCallback(dt=0.02, prefix="", - deflection_x=deflection_x, - deflection_y=deflection_y) +info_callback = InfoCallback(interval=100) +saving_callback = SolutionSavingCallback(dt=0.02) callbacks = CallbackSet(info_callback, saving_callback) # Use a Runge-Kutta method with automatic (error based) time step size control +# Enable threading of the RK method for better performance on multiple threads sol = solve(ode, RDPK3SpFSAL49(), save_everystep=false, callback=callbacks); diff --git a/src/TrixiParticles.jl b/src/TrixiParticles.jl index 9fe23e3d4..69f00a02c 100644 --- a/src/TrixiParticles.jl +++ b/src/TrixiParticles.jl @@ -2,80 +2,49 @@ module TrixiParticles using Reexport: @reexport -using Adapt: Adapt -using CSV: CSV using Dates -using DataFrames: DataFrame -using DiffEqCallbacks: PeriodicCallback, PeriodicCallbackAffect, PresetTimeCallback -using FastPow: @fastpow -using ForwardDiff: ForwardDiff -using GPUArrays: AbstractGPUArray -using JSON: JSON -using KernelAbstractions: KernelAbstractions, @kernel, @index -using LinearAlgebra: norm, dot, I, tr, inv, pinv, det -using MuladdMacro: @muladd -using Polyester: Polyester, @batch -using Printf: @printf, @sprintf -using RecipesBase: RecipesBase, @series +using DiffEqCallbacks: PeriodicCallback, PeriodicCallbackAffect +using LinearAlgebra: norm, dot, I, tr +using Morton: cartesian2morton +using Polyester: @batch +using Printf: @printf using SciMLBase: CallbackSet, DiscreteCallback, DynamicalODEProblem, u_modified!, - get_tmp_cache, set_proposed_dt!, ODESolution, ODEProblem + get_tmp_cache @reexport using StaticArrays: SVector -using StaticArrays: @SMatrix, SMatrix, setindex +using StaticArrays: @SMatrix, SMatrix using StrideArrays: PtrArray, StaticInt +using ThreadingUtilities using TimerOutputs: TimerOutput, TimerOutputs, print_timer, reset_timer! -using TrixiBase: trixi_include, @trixi_timeit, timer, timeit_debug_enabled, - disable_debug_timings, enable_debug_timings -@reexport using PointNeighbors: TrivialNeighborhoodSearch, GridNeighborhoodSearch -using PointNeighbors: PointNeighbors, for_particle_neighbor -using WriteVTK: vtk_grid, MeshCell, VTKCellTypes, paraview_collection, vtk_save +@reexport using SimpleUnPack: @unpack +using WriteVTK: vtk_grid, MeshCell, VTKCellTypes -# `util.jl` depends on the `GPUSystem` type defined in `system.jl` -include("general/system.jl") -# `util.jl` needs to be next because of the macros `@trixi_timeit` and `@threaded` +# util needs to be first because of macro @trixi_timeit include("util.jl") include("callbacks/callbacks.jl") include("general/general.jl") include("setups/setups.jl") include("schemes/schemes.jl") - # Note that `semidiscretization.jl` depends on the system types and has to be -# included separately. `gpu.jl` in turn depends on the semidiscretization type. +# included separately. include("general/semidiscretization.jl") -include("general/gpu.jl") include("visualization/write2vtk.jl") -include("visualization/recipes_plots.jl") export Semidiscretization, semidiscretize, restart_with! export InitialCondition -export WeaklyCompressibleSPHSystem, EntropicallyDampedSPHSystem, TotalLagrangianSPHSystem, - BoundarySPHSystem, DEMSystem, BoundaryDEMSystem, OpenBoundarySPHSystem, InFlow, - OutFlow -export InfoCallback, SolutionSavingCallback, DensityReinitializationCallback, - PostprocessCallback, StepsizeCallback, UpdateCallback +export WeaklyCompressibleSPHSystem, TotalLagrangianSPHSystem, BoundarySPHSystem +export InfoCallback, SolutionSavingCallback export ContinuityDensity, SummationDensity export PenaltyForceGanzenmueller export SchoenbergCubicSplineKernel, SchoenbergQuarticSplineKernel, - SchoenbergQuinticSplineKernel, GaussianKernel, WendlandC2Kernel, WendlandC4Kernel, - WendlandC6Kernel, SpikyKernel, Poly6Kernel -export StateEquationCole -export ArtificialViscosityMonaghan, ViscosityAdami -export DensityDiffusion, DensityDiffusionMolteniColagrossi, DensityDiffusionFerrari, - DensityDiffusionAntuono -export BoundaryModelMonaghanKajtar, BoundaryModelDummyParticles, AdamiPressureExtrapolation, - PressureMirroring, PressureZeroing -export BoundaryMovement -export examples_dir, validation_dir, trixi_include + SchoenbergQuinticSplineKernel +export StateEquationIdealGas, StateEquationCole +export ArtificialViscosityMonaghan +export BoundaryModelMonaghanKajtar, BoundaryModelDummyParticles, AdamiPressureExtrapolation +export SpatialHashingSearch +export examples_dir, trixi_include export trixi2vtk -export RectangularTank, RectangularShape, SphereShape -export VoxelSphere, RoundSphere, reset_wall!, extrude_geometry -export SourceTermDamping -export ShepardKernelCorrection, KernelCorrection, AkinciFreeSurfaceCorrection, - GradientCorrection, BlendedGradientCorrection, MixedKernelGradientCorrection +export RectangularTank, RectangularShape, CircularShape +export DrawCircle, FillCircle, reset_wall! export nparticles -export kinetic_energy, total_mass, max_pressure, min_pressure, avg_pressure, - max_density, min_density, avg_density -export interpolate_line, interpolate_point, interpolate_plane_3d, interpolate_plane_2d, - interpolate_plane_2d_vtk -export SurfaceTensionAkinci, CohesionForceAkinci end # module diff --git a/src/callbacks/callbacks.jl b/src/callbacks/callbacks.jl index 1aefdff72..20da95052 100644 --- a/src/callbacks/callbacks.jl +++ b/src/callbacks/callbacks.jl @@ -1,33 +1,2 @@ -# Used by `SolutionSavingCallback` and `DensityReinitializationCallback` -get_iter(::Integer, integrator) = integrator.stats.naccept -function get_iter(dt::AbstractFloat, integrator) - # Basically `(t - tspan[1]) / dt` as `Int`. - Int(div(integrator.t - first(integrator.sol.prob.tspan), dt, RoundNearest)) -end - -# Used by `InfoCallback` and `PostProcessCallback` -@inline function isfinished(integrator) - # Checking for floating point equality is OK here as `DifferentialEquations.jl` - # sets the time exactly to the final time in the last iteration - return integrator.t == last(integrator.sol.prob.tspan) || - isempty(integrator.opts.tstops) || - integrator.iter == integrator.opts.maxiters -end - -@inline function condition_integrator_interval(integrator, interval; - save_final_solution=true) - # With error-based step size control, some steps can be rejected. Thus, - # `integrator.iter >= integrator.stats.naccept` - # (total #steps) (#accepted steps) - # We need to check the number of accepted steps since callbacks are not - # activated after a rejected step. - return interval > 0 && ((integrator.stats.naccept % interval == 0) || - (save_final_solution && isfinished(integrator))) -end - include("info.jl") include("solution_saving.jl") -include("density_reinit.jl") -include("post_process.jl") -include("stepsize.jl") -include("update.jl") diff --git a/src/callbacks/density_reinit.jl b/src/callbacks/density_reinit.jl deleted file mode 100644 index 74c6fe5c9..000000000 --- a/src/callbacks/density_reinit.jl +++ /dev/null @@ -1,110 +0,0 @@ -""" - DensityReinitializationCallback(; interval::Integer=0, dt=0.0) - -Callback to reinitialize the density field when using [`ContinuityDensity`](@ref). - -# Keywords -- `interval=0`: Reinitialize the density every `interval` time steps. -- `dt`: Reinitialize the density in regular intervals of `dt` in terms - of integration time. -- `reinit_initial_solution`: Reinitialize the initial solution (default=false) - -## References -- Panizzo, Andrea, Giovanni Cuomo, and Robert A. Dalrymple. "3D-SPH simulation of landslide generated waves." - In: Coastal Engineering 2006 (2007), pages 1503-1515. - [doi: 10.1142/9789812709554_0128](https://doi.org/10.1142/9789812709554_0128) -""" -mutable struct DensityReinitializationCallback{I} - interval::I - last_t::Float64 - reinit_initial_solution::Bool -end - -function Base.show(io::IO, cb::DiscreteCallback{<:Any, <:DensityReinitializationCallback}) - @nospecialize cb # reduce precompilation time - callback = cb.affect! - print(io, "DensityReinitializationCallback(interval=", callback.interval, - ", reinit_initial_solution=", callback.reinit_initial_solution, ")") -end - -function Base.show(io::IO, ::MIME"text/plain", - cb::DiscreteCallback{<:Any, <:DensityReinitializationCallback}) - @nospecialize cb # reduce precompilation time - if get(io, :compact, false) - show(io, cb) - else - callback = cb.affect! - setup = [ - "interval" => callback.interval, - "reinit_initial_solution" => callback.reinit_initial_solution, - ] - summary_box(io, "DensityReinitializationCallback", setup) - end -end - -function DensityReinitializationCallback(particle_system; interval::Integer=0, dt=0.0, - reinit_initial_solution=true) - if dt > 0 && interval > 0 - error("Setting both interval and dt is not supported!") - end - - if dt > 0 - interval = Float64(dt) - end - - if particle_system.density_calculator isa SummationDensity - throw(ArgumentError("density reinitialization doesn't provide any advantage for summation density")) - end - - last_t = -Inf - - reinit_cb = DensityReinitializationCallback(interval, last_t, reinit_initial_solution) - - return DiscreteCallback(reinit_cb, reinit_cb, save_positions=(false, false), - initialize=initialize_reinit_cb!) -end - -function initialize_reinit_cb!(cb, u, t, integrator) - initialize_reinit_cb!(cb.affect!, u, t, integrator) -end - -function initialize_reinit_cb!(cb::DensityReinitializationCallback, u, t, integrator) - # Reinitialize initial solution - if cb.reinit_initial_solution - # Update systems to compute quantities like density and pressure. - semi = integrator.p - v_ode, u_ode = u.x - update_systems_and_nhs(v_ode, u_ode, semi, t; update_from_callback=true) - - # Apply the callback. - cb(integrator) - end - - cb.last_t = t - - return nothing -end - -# condition with interval -function (reinit_callback::DensityReinitializationCallback{Int})(u, t, integrator) - (; interval) = reinit_callback - - return condition_integrator_interval(integrator, interval, save_final_solution=false) -end - -# condition with dt -function (reinit_callback::DensityReinitializationCallback)(u, t, integrator) - (; interval, last_t) = reinit_callback - - return (t - last_t) > interval -end - -# affect! -function (reinit_callback::DensityReinitializationCallback)(integrator) - vu_ode = integrator.u - semi = integrator.p - - @trixi_timeit timer() "reinit density" reinit_density!(vu_ode, semi) - - reinit_callback.last_t = integrator.t -end diff --git a/src/callbacks/info.jl b/src/callbacks/info.jl index 3ae8fd2fb..66cdcb219 100644 --- a/src/callbacks/info.jl +++ b/src/callbacks/info.jl @@ -32,22 +32,17 @@ Create and return a callback that prints a human-readable summary of the simulat beginning of a simulation and then resets the timer. When the returned callback is executed directly, the current timer values are shown. """ -function InfoCallback(; interval=0, reset_threads=true) +function InfoCallback(; interval=0) info_callback = InfoCallback(0.0, interval) - function initialize(cb, u, t, integrator) - initialize_info_callback(cb, u, t, integrator; - reset_threads) - end - DiscreteCallback(info_callback, info_callback, save_positions=(false, false), - initialize=initialize) + initialize=initialize_info_callback) end # condition function (info_callback::InfoCallback)(u, t, integrator) - (; interval) = info_callback + @unpack interval = info_callback return interval != 0 && integrator.stats.naccept % interval == 0 || @@ -70,15 +65,9 @@ function (info_callback::InfoCallback)(integrator) allocations=true, linechars=:unicode, compact=false) println() else - t = integrator.t - t_initial = first(integrator.sol.prob.tspan) - t_final = last(integrator.sol.prob.tspan) - sim_time_percentage = (t - t_initial) / (t_final - t_initial) * 100 runtime_absolute = 1.0e-9 * (time_ns() - info_callback.start_time) - println(rpad(@sprintf("#timesteps: %6d │ Δt: %.4e │ sim. time: %.4e (%5.3f%%)", - integrator.stats.naccept, integrator.dt, t, - sim_time_percentage), 71) * - @sprintf("│ run time: %.4e s", runtime_absolute)) + @printf("#timesteps: %6d │ Δt: %.4e │ sim. time: %.4e │ run time: %.4e s\n", + integrator.stats.naccept, integrator.dt, integrator.t, runtime_absolute) end # Tell OrdinaryDiffEq that u has not been modified @@ -87,19 +76,19 @@ function (info_callback::InfoCallback)(integrator) return nothing end +@inline function isfinished(integrator) + # Checking for floating point equality is OK here as `DifferentialEquations.jl` + # sets the time exactly to the final time in the last iteration + return integrator.t == last(integrator.sol.prob.tspan) || + isempty(integrator.opts.tstops) || + integrator.iter == integrator.opts.maxiters +end + # Print information about the current simulation setup # Note: This is called *after* all initialization is done, but *before* the first time step -function initialize_info_callback(discrete_callback, u, t, integrator; - reset_threads=true) +function initialize_info_callback(discrete_callback, u, t, integrator) info_callback = discrete_callback.affect! - # Optionally reset Polyester.jl threads. See - # https://github.com/trixi-framework/Trixi.jl/issues/1583 - # https://github.com/JuliaSIMD/Polyester.jl/issues/30 - if reset_threads - Polyester.reset_threads!() - end - print_startup_message() io = stdout @@ -112,7 +101,8 @@ function initialize_info_callback(discrete_callback, u, t, integrator; semi = integrator.p show(io_context, MIME"text/plain"(), semi) println(io, "\n") - foreach_system(semi) do system + systems = semi.systems + for system in systems show(io_context, MIME"text/plain"(), system) println(io, "\n") end diff --git a/src/callbacks/post_process.jl b/src/callbacks/post_process.jl deleted file mode 100644 index 9c39f3eb4..000000000 --- a/src/callbacks/post_process.jl +++ /dev/null @@ -1,381 +0,0 @@ -""" - PostprocessCallback(; interval::Integer=0, dt=0.0, exclude_boundary=true, filename="values", - output_directory="out", append_timestamp=false, write_csv=true, - write_json=true, write_file_interval=1, funcs...) - -Create a callback to post-process simulation data at regular intervals. -This callback allows for the execution of a user-defined function `func` at specified -intervals during the simulation. The function is applied to the current state of the simulation, -and its results can be saved or used for further analysis. The provided function cannot be -anonymous as the function name will be used as part of the name of the value. - -The callback can be triggered either by a fixed number of time steps (`interval`) or by -a fixed interval of simulation time (`dt`). - -# Keywords -- `funcs...`: Functions to be executed at specified intervals during the simulation. - Each function must have the arguments `(v, u, t, system)`, - and will be called for every system, where `v` and `u` are the - wrapped solution arrays for the corresponding system and `t` is - the current simulation time. Note that working with these `v` - and `u` arrays requires undocumented internal functions of - TrixiParticles. See [Custom Quantities](@ref custom_quantities) - for a list of pre-defined functions that can be used here. -- `interval=0`: Specifies the number of time steps between each invocation of the callback. - If set to `0`, the callback will not be triggered based on time steps. - Either `interval` or `dt` must be set to something larger than 0. -- `dt=0.0`: Specifies the simulation time interval between each invocation of the callback. - If set to `0.0`, the callback will not be triggered based on simulation time. - Either `interval` or `dt` must be set to something larger than 0. -- `exclude_boundary=true`: If set to `true`, boundary particles will be excluded from the post-processing. -- `filename="values"`: The filename of the postprocessing files to be saved. -- `output_directory="out"`: The path where the results of the post-processing will be saved. -- `write_csv=true`: If set to `true`, write a csv file. -- `write_json=true`: If set to `true`, write a json file. -- `append_timestep=false`: If set to `true`, the current timestamp will be added to the filename. -- `write_file_interval=1`: Files will be written after every `write_file_interval` number of - postprocessing execution steps. A value of 0 indicates that files - are only written at the end of the simulation, eliminating I/O overhead. - -# Examples -```jldoctest; output = false -# Create a callback that is triggered every 100 time steps -postprocess_callback = PostprocessCallback(interval=100, example_quantity=kinetic_energy) - -# Create a callback that is triggered every 0.1 simulation time units -postprocess_callback = PostprocessCallback(dt=0.1, example_quantity=kinetic_energy) - -# output -┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ PostprocessCallback │ -│ ═══════════════════ │ -│ dt: ……………………………………………………………………… 0.1 │ -│ write file: ………………………………………………… always │ -│ exclude boundary: ………………………………… yes │ -│ filename: ……………………………………………………… values │ -│ output directory: ………………………………… out │ -│ append timestamp: ………………………………… no │ -│ write json file: …………………………………… yes │ -│ write csv file: ……………………………………… yes │ -│ function1: …………………………………………………… example_quantity │ -└──────────────────────────────────────────────────────────────────────────────────────────────────┘ -``` -""" -struct PostprocessCallback{I, F} - interval :: I - write_file_interval :: Int - data :: Dict{String, Vector{Any}} - times :: Array{Float64, 1} - exclude_boundary :: Bool - func :: F - filename :: String - output_directory :: String - append_timestamp :: Bool - write_csv :: Bool - write_json :: Bool - git_hash :: Ref{String} -end - -function PostprocessCallback(; interval::Integer=0, dt=0.0, exclude_boundary=true, - output_directory="out", filename="values", - append_timestamp=false, write_csv=true, write_json=true, - write_file_interval::Integer=1, funcs...) - if isempty(funcs) - throw(ArgumentError("`funcs` cannot be empty")) - end - - if dt > 0 && interval > 0 - throw(ArgumentError("setting both `interval` and `dt` is not supported")) - end - - if dt > 0 - interval = Float64(dt) - end - - post_callback = PostprocessCallback(interval, write_file_interval, - Dict{String, Vector{Any}}(), Float64[], - exclude_boundary, funcs, filename, output_directory, - append_timestamp, write_csv, write_json, - Ref("UnknownVersion")) - if dt > 0 - # Add a `tstop` every `dt`, and save the final solution - return PeriodicCallback(post_callback, dt, - initialize=initialize_postprocess_callback!, - save_positions=(false, false), final_affect=true) - else - # The first one is the `condition`, the second the `affect!` - return DiscreteCallback(post_callback, post_callback, - save_positions=(false, false), - initialize=initialize_postprocess_callback!) - end -end - -function Base.show(io::IO, cb::DiscreteCallback{<:Any, <:PostprocessCallback}) - @nospecialize cb # reduce precompilation time - callback = cb.affect! - print(io, "PostprocessCallback(interval=", callback.interval) - print(io, ", functions=[") - print(io, join(keys(callback.func), ", ")) - print(io, "])") -end - -function Base.show(io::IO, - cb::DiscreteCallback{<:Any, - <:PeriodicCallbackAffect{<:PostprocessCallback}}) - @nospecialize cb # reduce precompilation time - callback = cb.affect!.affect! - print(io, "PostprocessCallback(dt=", callback.interval) - print(io, ", functions=[") - print(io, join(keys(callback.func), ", ")) - print(io, "])") -end - -function Base.show(io::IO, ::MIME"text/plain", - cb::DiscreteCallback{<:Any, <:PostprocessCallback}) - @nospecialize cb # reduce precompilation time - if get(io, :compact, false) - show(io, cb) - else - callback = cb.affect! - - function write_file_interval(interval) - if interval > 1 - return "every $(interval) * interval" - elseif interval == 1 - return "always" - elseif interval == 0 - return "no" - end - end - - setup = [ - "interval" => string(callback.interval), - "write file" => write_file_interval(callback.write_file_interval), - "exclude boundary" => callback.exclude_boundary ? "yes" : "no", - "filename" => callback.filename, - "output directory" => callback.output_directory, - "append timestamp" => callback.append_timestamp ? "yes" : "no", - "write json file" => callback.write_csv ? "yes" : "no", - "write csv file" => callback.write_json ? "yes" : "no", - ] - - for (i, key) in enumerate(keys(callback.func)) - push!(setup, "function$i" => string(key)) - end - summary_box(io, "PostprocessCallback", setup) - end -end - -function Base.show(io::IO, ::MIME"text/plain", - cb::DiscreteCallback{<:Any, - <:PeriodicCallbackAffect{<:PostprocessCallback}}) - @nospecialize cb # reduce precompilation time - if get(io, :compact, false) - show(io, cb) - else - callback = cb.affect!.affect! - - function write_file_interval(interval) - if interval > 1 - return "every $(interval) * dt" - elseif interval == 1 - return "always" - elseif interval == 0 - return "no" - end - end - - setup = [ - "dt" => string(callback.interval), - "write file" => write_file_interval(callback.write_file_interval), - "exclude boundary" => callback.exclude_boundary ? "yes" : "no", - "filename" => callback.filename, - "output directory" => callback.output_directory, - "append timestamp" => callback.append_timestamp ? "yes" : "no", - "write json file" => callback.write_csv ? "yes" : "no", - "write csv file" => callback.write_json ? "yes" : "no", - ] - - for (i, key) in enumerate(keys(callback.func)) - push!(setup, "function$i" => string(key)) - end - summary_box(io, "PostprocessCallback", setup) - end -end - -function initialize_postprocess_callback!(cb, u, t, integrator) - # The `PostprocessCallback` is either `cb.affect!` (with `DiscreteCallback`) - # or `cb.affect!.affect!` (with `PeriodicCallback`). - # Let recursive dispatch handle this. - initialize_postprocess_callback!(cb.affect!, u, t, integrator) -end - -function initialize_postprocess_callback!(cb::PostprocessCallback, u, t, integrator) - cb.git_hash[] = compute_git_hash() - - # Apply the callback - cb(integrator) - - return cb -end - -# `condition` with interval -function (pp::PostprocessCallback)(u, t, integrator) - (; interval) = pp - - return condition_integrator_interval(integrator, interval) -end - -# `affect!` -function (pp::PostprocessCallback)(integrator) - vu_ode = integrator.u - v_ode, u_ode = vu_ode.x - semi = integrator.p - t = integrator.t - filenames = system_names(semi.systems) - new_data = false - - # Update systems to compute quantities like density and pressure - update_systems_and_nhs(v_ode, u_ode, semi, t; update_from_callback=true) - - foreach_system(semi) do system - if system isa BoundarySystem && pp.exclude_boundary - return - end - - system_index = system_indices(system, semi) - - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) - for (key, f) in pp.func - result = f(v, u, t, system) - if result !== nothing - add_entry!(pp, string(key), t, result, filenames[system_index]) - new_data = true - end - end - end - - if new_data - push!(pp.times, t) - end - - if isfinished(integrator) || - (pp.write_file_interval > 0 && backup_condition(pp, integrator)) - write_postprocess_callback(pp) - end - - # Tell OrdinaryDiffEq that `u` has not been modified - u_modified!(integrator, false) -end - -@inline function backup_condition(cb::PostprocessCallback{Int}, integrator) - return integrator.stats.naccept > 0 && - round(integrator.stats.naccept / cb.interval) % cb.write_file_interval == 0 -end - -@inline function backup_condition(cb::PostprocessCallback, integrator) - return integrator.stats.naccept > 0 && - round(Int, integrator.t / cb.interval) % cb.write_file_interval == 0 -end - -# After the simulation has finished, this function is called to write the data to a JSON file -function write_postprocess_callback(pp::PostprocessCallback) - isempty(pp.data) && return - - mkpath(pp.output_directory) - - data = Dict{String, Any}() - write_meta_data!(data, pp.git_hash[]) - prepare_series_data!(data, pp) - - time_stamp = "" - if pp.append_timestamp - time_stamp = string("_", Dates.format(now(), "YY-mm-ddTHHMMSS")) - end - - filename_json = pp.filename * time_stamp * ".json" - filename_csv = pp.filename * time_stamp * ".csv" - - if pp.write_json - abs_file_path = joinpath(abspath(pp.output_directory), filename_json) - - open(abs_file_path, "w") do file - # Indent by 4 spaces - JSON.print(file, data, 4) - end - end - if pp.write_csv - abs_file_path = joinpath(abspath(pp.output_directory), filename_csv) - - write_csv(abs_file_path, data) - end -end - -# This function prepares the data for writing to a JSON file by creating a dictionary -# that maps each key to separate arrays of times and values, sorted by time, and includes system name. -function prepare_series_data!(data, post_callback) - for (key, data_array) in post_callback.data - data_values = [value for value in data_array] - - # The penultimate string in the key is the system_name - system_name = split(key, '_')[end - 1] - - data[key] = create_series_dict(data_values, post_callback.times, system_name) - end - - return data -end - -function create_series_dict(values, times, system_name="") - return Dict("type" => "series", - "datatype" => eltype(values), - "n_values" => length(values), - "system_name" => system_name, - "values" => values, - "time" => times) -end - -function write_meta_data!(data, git_hash) - meta_data = Dict("solver_name" => "TrixiParticles.jl", - "solver_version" => git_hash, - "julia_version" => string(VERSION)) - - data["meta"] = meta_data - return data -end - -function write_csv(abs_file_path, data) - times = Float64[] - - for val in values(data) - if haskey(val, "time") - times = val["time"] - break - end - end - - # Initialize DataFrame with time column - df = DataFrame(time=times) - - for (key, series) in data - # Ensure we only process data entries, excluding any meta data or non-data entries. - # Metadata is stored as `data["meta"]`, while data entries contain `_$(system_name)` - if occursin("_", key) - values = series["values"] - # Add a new column to the DataFrame for each series of values - df[!, Symbol(key)] = values - end - end - - # Write the DataFrame to a CSV file - CSV.write(abs_file_path, df) -end - -function add_entry!(pp, entry_key, t, value, system_name) - # Get the list of data entries for the system, or initialize it if it doesn't exist - entries = get!(pp.data, entry_key * "_" * system_name, Any[]) - - # Add the new entry to the list - push!(entries, value) -end diff --git a/src/callbacks/solution_saving.jl b/src/callbacks/solution_saving.jl index 468a72a1c..69319e4fc 100644 --- a/src/callbacks/solution_saving.jl +++ b/src/callbacks/solution_saving.jl @@ -1,11 +1,10 @@ -@doc raw""" - SolutionSavingCallback(; interval::Integer=0, dt=0.0, save_times=Array{Float64, 1}([]), - save_initial_solution=true, save_final_solution=true, - output_directory="out", append_timestamp=false, prefix="", - verbose=false, write_meta_data=true, max_coordinates=2^15, +""" + SolutionSavingCallback(; interval::Integer=0, dt=0.0, + save_initial_solution=true, + save_final_solution=true, + output_directory="out", append_timestamp=false, custom_quantities...) - Callback to save the current numerical solution in VTK format in regular intervals. Either pass `interval` to save every `interval` time steps, or pass `dt` to save in intervals of `dt` in terms of integration time by adding @@ -21,74 +20,52 @@ To ignore a custom quantity for a specific system, return `nothing`. - `dt`: Save the solution in regular intervals of `dt` in terms of integration time by adding additional `tstops` (note that this may change the solution). -- `save_times=[]` List of times at which to save a solution. - `save_initial_solution=true`: Save the initial solution. - `save_final_solution=true`: Save the final solution. - `output_directory="out"`: Directory to save the VTK files. - `append_timestamp=false`: Append current timestamp to the output directory. -- 'prefix=""': Prefix added to the filename. +- 'prefix': Prefix added to the filename. - `custom_quantities...`: Additional user-defined quantities. -- `write_meta_data=true`: Write meta data. - `verbose=false`: Print to standard IO when a file is written. -- `max_coordinates=2^15`: The coordinates of particles will be clipped if their - absolute values exceed this threshold. -- `custom_quantities...`: Additional custom quantities to include in the VTK output. - Each custom quantity must be a function of `(v, u, t, system)`, - which will be called for every system, where `v` and `u` are the - wrapped solution arrays for the corresponding system and `t` is - the current simulation time. Note that working with these `v` - and `u` arrays requires undocumented internal functions of - TrixiParticles. See [Custom Quantities](@ref custom_quantities) - for a list of pre-defined custom quantities that can be used here. # Examples -```jldoctest; output = false, filter = [r"output directory:.*", r"\s+│"] -# Save every 100 time steps +```julia +# Save every 100 time steps. saving_callback = SolutionSavingCallback(interval=100) -# Save in intervals of 0.1 in terms of simulation time +# Save in intervals of 0.1 in terms of simulation time. saving_callback = SolutionSavingCallback(dt=0.1) -# Additionally store the kinetic energy of each system as "my_custom_quantity" -saving_callback = SolutionSavingCallback(dt=0.1, my_custom_quantity=kinetic_energy) - -# output -┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ SolutionSavingCallback │ -│ ══════════════════════ │ -│ dt: ……………………………………………………………………… 0.1 │ -│ custom quantities: ……………………………… [:my_custom_quantity => TrixiParticles.kinetic_energy] │ -│ save initial solution: …………………… yes │ -│ save final solution: ………………………… yes │ -│ output directory: ………………………………… *path ignored with filter regex above* │ -│ prefix: …………………………………………………………… │ -└──────────────────────────────────────────────────────────────────────────────────────────────────┘ +# Additionally store the norm of the particle velocity for fluid systems as "v_mag". +using LinearAlgebra +function v_mag(v, u, t, system) + # Ignore for other systems. + return nothing +end +function v_mag(v, u, t, system::WeaklyCompressibleSPHSystem) + return [norm(v[1:ndims(system), i]) for i in axes(v, 2)] +end +saving_callback = SolutionSavingCallback(dt=0.1, v_mag=v_mag) ``` """ -mutable struct SolutionSavingCallback{I, CQ} +struct SolutionSavingCallback{I, CQ} interval :: I - save_times :: Array{Float64, 1} save_initial_solution :: Bool save_final_solution :: Bool - write_meta_data :: Bool verbose :: Bool output_directory :: String prefix :: String - max_coordinates :: Float64 custom_quantities :: CQ - latest_saved_iter :: Int - git_hash :: Ref{String} end function SolutionSavingCallback(; interval::Integer=0, dt=0.0, - save_times=Array{Float64, 1}([]), - save_initial_solution=true, save_final_solution=true, + save_initial_solution=true, + save_final_solution=true, output_directory="out", append_timestamp=false, - prefix="", verbose=false, write_meta_data=true, - max_coordinates=Float64(2^15), custom_quantities...) - if (dt > 0 && interval > 0) || (length(save_times) > 0 && (dt > 0 || interval > 0)) - throw(ArgumentError("Setting multiple save times for the same solution " * - "callback is not possible. Use either `dt`, `interval` or `save_times`.")) + prefix="", verbose=false, + custom_quantities...) + if dt > 0 && interval > 0 + throw(ArgumentError("Setting both interval and dt is not supported!")) end if dt > 0 @@ -99,23 +76,18 @@ function SolutionSavingCallback(; interval::Integer=0, dt=0.0, output_directory *= string("_", Dates.format(now(), "YY-mm-ddTHHMMSS")) end - solution_callback = SolutionSavingCallback(interval, save_times, + solution_callback = SolutionSavingCallback(interval, save_initial_solution, save_final_solution, - write_meta_data, verbose, output_directory, - prefix, max_coordinates, custom_quantities, - -1, Ref("UnknownVersion")) - - if length(save_times) > 0 - # See the large comment below for an explanation why we use `finalize` here - return PresetTimeCallback(save_times, solution_callback, finalize=solution_callback) - elseif dt > 0 - # Add a `tstop` every `dt`, and save the final solution + verbose, output_directory, prefix, + custom_quantities) + + if dt > 0 + # Add a `tstop` every `dt`, and save the final solution. return PeriodicCallback(solution_callback, dt, initialize=initialize_save_cb!, - save_positions=(false, false), final_affect=save_final_solution) else - # The first one is the `condition`, the second the `affect!` + # The first one is the condition, the second the affect! return DiscreteCallback(solution_callback, solution_callback, save_positions=(false, false), initialize=initialize_save_cb!) @@ -130,83 +102,60 @@ function initialize_save_cb!(cb, u, t, integrator) end function initialize_save_cb!(solution_callback::SolutionSavingCallback, u, t, integrator) - # Reset `latest_saved_iter` - solution_callback.latest_saved_iter = -1 - solution_callback.git_hash[] = compute_git_hash() - # Save initial solution if solution_callback.save_initial_solution - # Update systems to compute quantities like density and pressure + # Update systems to compute quantities like density and pressure. semi = integrator.p v_ode, u_ode = u.x - update_systems_and_nhs(v_ode, u_ode, semi, t; update_from_callback=true) + update_systems_and_nhs(v_ode, u_ode, semi, t) - # Apply the callback + # Apply the callback. solution_callback(integrator) end return nothing end -# `condition` +# condition function (solution_callback::SolutionSavingCallback)(u, t, integrator) - (; interval, save_final_solution) = solution_callback - - return condition_integrator_interval(integrator, interval, - save_final_solution=save_final_solution) + @unpack interval, save_final_solution = solution_callback + + # With error-based step size control, some steps can be rejected. Thus, + # `integrator.iter >= integrator.stats.naccept` + # (total #steps) (#accepted steps) + # We need to check the number of accepted steps since callbacks are not + # activated after a rejected step. + return interval > 0 && (((integrator.stats.naccept % interval == 0) && + !(integrator.stats.naccept == 0 && integrator.iter > 0)) || + (save_final_solution && isfinished(integrator))) end -# `affect!` +# affect! function (solution_callback::SolutionSavingCallback)(integrator) - (; interval, output_directory, custom_quantities, write_meta_data, git_hash, - verbose, prefix, latest_saved_iter, max_coordinates) = solution_callback + @unpack interval, output_directory, custom_quantities, verbose, prefix = solution_callback vu_ode = integrator.u semi = integrator.p iter = get_iter(interval, integrator) - if iter == latest_saved_iter - # This should only happen at the end of the simulation when using `dt` and the - # final time is not a multiple of the saving interval. - @assert isfinished(integrator) - - # Avoid overwriting the previous file - iter += 1 - end - - latest_saved_iter = iter - if verbose println("Writing solution to $output_directory at t = $(integrator.t)") end - @trixi_timeit timer() "save solution" trixi2vtk(vu_ode, semi, integrator.t; - iter, output_directory, prefix, - write_meta_data, git_hash=git_hash[], - max_coordinates, custom_quantities...) + @trixi_timeit timer() "save solution" trixi2vtk(vu_ode, semi, integrator.t; iter=iter, + output_directory=output_directory, + prefix=prefix, custom_quantities...) - # Tell OrdinaryDiffEq that `u` has not been modified + # Tell OrdinaryDiffEq that u has not been modified u_modified!(integrator, false) return nothing end -# `finalize` -# This is a hack to make dispatch on a `PresetTimeCallback` possible. -# -# The type of the returned `DiscreteCallback` is -# `DiscreteCallback{typeof(condition), typeof(affect!), typeof(initialize), typeof(finalize)}`. -# For the `PeriodicCallback`, `typeof(affect!)` contains the type of the -# `SolutionSavingCallback`. The `PresetTimeCallback` uses anonymous functions as `condition` -# and `affect!`, so this doesn't work here. -# -# This hacky workaround makes use of the type parameter `typeof(finalize)` above. -# It's set to `FINALIZE_DEFAULT` by default in the `PresetTimeCallback`, which is a function -# that just returns `nothing`. -# Instead, we pass the `SolutionSavingCallback` as `finalize`, and define it to also just -# return `nothing` when called as `initialize`. -function (finalize::SolutionSavingCallback)(c, u, t, integrator) - return nothing +get_iter(::Integer, integrator) = integrator.stats.naccept +function get_iter(dt::AbstractFloat, integrator) + # Basically `(t - tspan[1]) / dt` as `Int`. + Int(div(integrator.t - first(integrator.sol.prob.tspan), dt, RoundNearest)) end function Base.show(io::IO, cb::DiscreteCallback{<:Any, <:SolutionSavingCallback}) @@ -225,14 +174,6 @@ function Base.show(io::IO, print(io, "SolutionSavingCallback(dt=", solution_saving.interval, ")") end -function Base.show(io::IO, - cb::DiscreteCallback{<:Any, <:Any, <:Any, <:SolutionSavingCallback}) - @nospecialize cb # reduce precompilation time - - solution_saving = cb.finalize - print(io, "SolutionSavingCallback(save_times=", solution_saving.save_times, ")") -end - function Base.show(io::IO, ::MIME"text/plain", cb::DiscreteCallback{<:Any, <:SolutionSavingCallback}) @nospecialize cb # reduce precompilation time @@ -250,32 +191,7 @@ function Base.show(io::IO, ::MIME"text/plain", "yes" : "no", "save final solution" => solution_saving.save_final_solution ? "yes" : "no", - "output directory" => abspath(solution_saving.output_directory), - "prefix" => solution_saving.prefix, - ] - summary_box(io, "SolutionSavingCallback", setup) - end -end - -function Base.show(io::IO, ::MIME"text/plain", - cb::DiscreteCallback{<:Any, <:Any, <:Any, <:SolutionSavingCallback}) - @nospecialize cb # reduce precompilation time - - if get(io, :compact, false) - show(io, cb) - else - solution_saving = cb.finalize - cq = collect(solution_saving.custom_quantities) - - setup = [ - "save_times" => solution_saving.save_times, - "custom quantities" => isempty(cq) ? nothing : cq, - "save initial solution" => solution_saving.save_initial_solution ? - "yes" : "no", - "save final solution" => solution_saving.save_final_solution ? "yes" : - "no", - "output directory" => abspath(solution_saving.output_directory), - "prefix" => solution_saving.prefix, + "output directory" => abspath(normpath(solution_saving.output_directory)), ] summary_box(io, "SolutionSavingCallback", setup) end @@ -299,8 +215,7 @@ function Base.show(io::IO, ::MIME"text/plain", "yes" : "no", "save final solution" => solution_saving.save_final_solution ? "yes" : "no", - "output directory" => abspath(solution_saving.output_directory), - "prefix" => solution_saving.prefix, + "output directory" => abspath(normpath(solution_saving.output_directory)), ] summary_box(io, "SolutionSavingCallback", setup) end diff --git a/src/callbacks/stepsize.jl b/src/callbacks/stepsize.jl deleted file mode 100644 index 7c3840bd1..000000000 --- a/src/callbacks/stepsize.jl +++ /dev/null @@ -1,116 +0,0 @@ -struct StepsizeCallback{ISCONSTANT, ELTYPE} - cfl_number::ELTYPE -end - -@inline is_constant(::StepsizeCallback{ISCONSTANT}) where {ISCONSTANT} = ISCONSTANT - -@doc raw""" - StepsizeCallback(; cfl::Real) - -Set the time step size according to a CFL condition if the time integration method isn't -adaptive itself. - -The current implementation is using the simplest form of CFL condition, which chooses a -time step size that is constant during the simulation. -The step size is therefore only applied once at the beginning of the simulation. - -The step size ``\Delta t`` is chosen as the minimum -```math - \Delta t = \min(\Delta t_\eta, \Delta t_a, \Delta t_c), -``` -where -```math - \Delta t_\eta = 0.125 \, h^2 / \eta, \quad \Delta t_a = 0.25 \sqrt{h / \lVert g \rVert}, - \quad \Delta t_c = \text{CFL} \, h / c, -``` -with ``\nu = \alpha h c / (2n + 4)``, where ``\alpha`` is the parameter of the viscosity -and ``n`` is the number of dimensions. - -!!! warning "Experimental implementation" - This is an experimental feature and may change in future releases. - -## References -- M. Antuono, A. Colagrossi, S. Marrone. - "Numerical Diffusive Terms in Weakly-Compressible SPH Schemes." - In: Computer Physics Communications 183, no. 12 (2012), pages 2570--80. - [doi: 10.1016/j.cpc.2012.07.006](https://doi.org/10.1016/j.cpc.2012.07.006) -- S. Adami, X. Y. Hu, N. A. Adams. - "A generalized wall boundary condition for smoothed particle hydrodynamics". - In: Journal of Computational Physics 231, 21 (2012), pages 7057--7075. - [doi: 10.1016/J.JCP.2012.05.005](https://doi.org/10.1016/J.JCP.2012.05.005) -- P. N. Sun, A. Colagrossi, S. Marrone, A. M. Zhang. - "The δplus-SPH Model: Simple Procedures for a Further Improvement of the SPH Scheme." - In: Computer Methods in Applied Mechanics and Engineering 315 (2017), pages 25--49. - [doi: 10.1016/j.cma.2016.10.028](https://doi.org/10.1016/j.cma.2016.10.028) -- M. Antuono, S. Marrone, A. Colagrossi, B. Bouscasse. - "Energy Balance in the δ-SPH Scheme." - In: Computer Methods in Applied Mechanics and Engineering 289 (2015), pages 209--26. - [doi: 10.1016/j.cma.2015.02.004](https://doi.org/10.1016/j.cma.2015.02.004) -""" -function StepsizeCallback(; cfl::Real) - # TODO adapt for non-constant CFL conditions - is_constant = true - stepsize_callback = StepsizeCallback{is_constant, typeof(cfl)}(cfl) - - # The first one is the `condition`, the second the `affect!` - return DiscreteCallback(stepsize_callback, stepsize_callback, - save_positions=(false, false), - initialize=initialize_stepsize_callback) -end - -function initialize_stepsize_callback(discrete_callback, u, t, integrator) - stepsize_callback = discrete_callback.affect! - - stepsize_callback(integrator) -end - -# `condition` -function (stepsize_callback::StepsizeCallback)(u, t, integrator) - # Only apply the callback when the stepsize is not constant and the time integrator - # is not adaptive. - return !is_constant(stepsize_callback) && !integrator.opts.adaptive -end - -# `affect!` -function (stepsize_callback::StepsizeCallback)(integrator) - (; cfl_number) = stepsize_callback - - v_ode, u_ode = integrator.u.x - semi = integrator.p - - dt = @trixi_timeit timer() "calculate dt" calculate_dt(v_ode, u_ode, cfl_number, semi) - - set_proposed_dt!(integrator, dt) - integrator.opts.dtmax = dt - integrator.dtcache = dt - - # Tell OrdinaryDiffEq that `u` has not been modified - u_modified!(integrator, false) - - return stepsize_callback -end - -function Base.show(io::IO, cb::DiscreteCallback{<:Any, <:StepsizeCallback}) - @nospecialize cb # reduce precompilation time - - stepsize_callback = cb.affect! - print(io, "StepsizeCallback(is_constant=", is_constant(stepsize_callback), - ", cfl_number=", stepsize_callback.cfl_number, ")") -end - -function Base.show(io::IO, ::MIME"text/plain", - cb::DiscreteCallback{<:Any, <:StepsizeCallback}) - @nospecialize cb # reduce precompilation time - - if get(io, :compact, false) - show(io, cb) - else - stepsize_callback = cb.affect! - - setup = [ - "is constant" => string(is_constant(stepsize_callback)), - "CFL number" => stepsize_callback.cfl_number, - ] - summary_box(io, "StepsizeCallback", setup) - end -end diff --git a/src/callbacks/update.jl b/src/callbacks/update.jl deleted file mode 100644 index 3595d5c36..000000000 --- a/src/callbacks/update.jl +++ /dev/null @@ -1,137 +0,0 @@ -struct UpdateCallback{I} - interval::I -end - -""" - UpdateCallback(; interval::Integer, dt=0.0) - -Callback to update quantities either at the end of every `interval` time steps or -in intervals of `dt` in terms of integration time by adding additional `tstops` -(note that this may change the solution). - -# Keywords -- `interval=1`: Update quantities at the end of every `interval` time steps. -- `dt`: Update quantities in regular intervals of `dt` in terms of integration time - by adding additional `tstops` (note that this may change the solution). -""" -function UpdateCallback(; interval::Integer=-1, dt=0.0) - if dt > 0 && interval !== -1 - throw(ArgumentError("Setting both interval and dt is not supported!")) - end - - # Update in intervals in terms of simulation time - if dt > 0 - interval = Float64(dt) - - # Update every time step (default) - elseif interval == -1 - interval = 1 - end - - update_callback! = UpdateCallback(interval) - - if dt > 0 - # Add a `tstop` every `dt`, and save the final solution. - return PeriodicCallback(update_callback!, dt, - initialize=initial_update!, - save_positions=(false, false)) - else - # The first one is the `condition`, the second the `affect!` - return DiscreteCallback(update_callback!, update_callback!, - initialize=initial_update!, - save_positions=(false, false)) - end -end - -# `initialize` -function initial_update!(cb, u, t, integrator) - # The `UpdateCallback` is either `cb.affect!` (with `DiscreteCallback`) - # or `cb.affect!.affect!` (with `PeriodicCallback`). - # Let recursive dispatch handle this. - - initial_update!(cb.affect!, u, t, integrator) -end - -function initial_update!(cb::UpdateCallback, u, t, integrator) - semi = integrator.p - - # Tell systems that `UpdateCallback` is used - foreach_system(semi) do system - update_callback_used!(system) - end - - return cb(integrator) -end - -# `condition` -function (update_callback!::UpdateCallback)(u, t, integrator) - (; interval) = update_callback! - - return condition_integrator_interval(integrator, interval) -end - -# `affect!` -function (update_callback!::UpdateCallback)(integrator) - t = integrator.t - semi = integrator.p - v_ode, u_ode = integrator.u.x - - # Update quantities that are stored in the systems. These quantities (e.g. pressure) - # still have the values from the last stage of the previous step if not updated here. - update_systems_and_nhs(v_ode, u_ode, semi, t; update_from_callback=true) - - # Other updates might be added here later (e.g. Transport Velocity Formulation). - @trixi_timeit timer() "update open boundary" foreach_system(semi) do system - update_open_boundary_eachstep!(system, v_ode, u_ode, semi, t) - end - - # Tell OrdinaryDiffEq that `u` has been modified - u_modified!(integrator, true) - - return integrator -end - -function Base.show(io::IO, cb::DiscreteCallback{<:Any, <:UpdateCallback}) - @nospecialize cb # reduce precompilation time - print(io, "UpdateCallback(interval=", cb.affect!.interval, ")") -end - -function Base.show(io::IO, - cb::DiscreteCallback{<:Any, - <:PeriodicCallbackAffect{<:UpdateCallback}}) - @nospecialize cb # reduce precompilation time - print(io, "UpdateCallback(dt=", cb.affect!.affect!.interval, ")") -end - -function Base.show(io::IO, ::MIME"text/plain", - cb::DiscreteCallback{<:Any, <:UpdateCallback}) - @nospecialize cb # reduce precompilation time - - if get(io, :compact, false) - show(io, cb) - else - update_cb = cb.affect! - setup = [ - "interval" => update_cb.interval, - ] - summary_box(io, "UpdateCallback", setup) - end -end - -function Base.show(io::IO, ::MIME"text/plain", - cb::DiscreteCallback{<:Any, - <:PeriodicCallbackAffect{<:UpdateCallback}}) - @nospecialize cb # reduce precompilation time - - if get(io, :compact, false) - show(io, cb) - else - update_cb = cb.affect!.affect! - setup = [ - "dt" => update_cb.interval, - ] - summary_box(io, "UpdateCallback", setup) - end -end - -update_callback_used!(system) = system diff --git a/src/general/buffer.jl b/src/general/buffer.jl deleted file mode 100644 index b12cf05f3..000000000 --- a/src/general/buffer.jl +++ /dev/null @@ -1,87 +0,0 @@ -struct SystemBuffer{V} - active_particle :: BitVector - eachparticle :: V # Vector{Int} - buffer_size :: Int - - function SystemBuffer(active_size, buffer_size::Integer) - active_particle = vcat(trues(active_size), falses(buffer_size)) - eachparticle = collect(1:active_size) - - return new{typeof(eachparticle)}(active_particle, eachparticle, buffer_size) - end -end - -allocate_buffer(initial_condition, buffer) = initial_condition - -function allocate_buffer(initial_condition, buffer::SystemBuffer) - (; buffer_size) = buffer - - # Initialize particles far away from simulation domain - coordinates = fill(1e16, ndims(initial_condition), buffer_size) - - if all(rho -> isapprox(rho, first(initial_condition.density), atol=eps(), rtol=eps()), - initial_condition.density) - density = first(initial_condition.density) - else - throw(ArgumentError("`initial_condition.density` needs to be constant when using `SystemBuffer`")) - end - - particle_spacing = initial_condition.particle_spacing - - buffer_ic = InitialCondition(; coordinates, density, particle_spacing) - - return union(initial_condition, buffer_ic) -end - -@inline update_system_buffer!(buffer::Nothing) = buffer - -# TODO `resize` allocates. Find a non-allocating version -@inline function update_system_buffer!(buffer::SystemBuffer) - (; active_particle) = buffer - - resize!(buffer.eachparticle, count(active_particle)) - - i = 1 - for j in eachindex(active_particle) - if active_particle[j] - buffer.eachparticle[i] = j - i += 1 - end - end - - return buffer -end - -@inline each_moving_particle(system, buffer) = buffer.eachparticle - -@inline active_coordinates(u, system, buffer) = view(u, :, buffer.active_particle) - -@inline active_particles(system, buffer) = buffer.eachparticle - -@inline function activate_next_particle(system) - (; active_particle) = system.buffer - - next_particle = findfirst(x -> !x, active_particle) - - if isnothing(next_particle) - error("0 out of $(system.buffer.buffer_size) buffer particles available") - end - - active_particle[next_particle] = true - - return next_particle -end - -@inline function deactivate_particle!(system, particle, u) - (; active_particle) = system.buffer - - active_particle[particle] = false - - # Set particle far away from simulation domain - for dim in 1:ndims(system) - # Inf or NaN causes instability outcome. - u[dim, particle] = 1e16 - end - - return system -end diff --git a/src/general/corrections.jl b/src/general/corrections.jl deleted file mode 100644 index ee894fec4..000000000 --- a/src/general/corrections.jl +++ /dev/null @@ -1,474 +0,0 @@ -# Sorted in order of computational cost -@doc raw""" - AkinciFreeSurfaceCorrection(rho0) - -Free surface correction according to Akinci et al. (2013). -At a free surface, the mean density is typically lower than the reference density, -resulting in reduced surface tension and viscosity forces. -The free surface correction adjusts the viscosity, pressure, and surface tension forces -near free surfaces to counter this effect. -It's important to note that this correlation is unphysical and serves as an approximation. -The computation time added by this method is about 2--3%. - -Mathematically the idea is quite simple. If we have an SPH particle in the middle of a volume -at rest, its density will be identical to the rest density ``\rho_0``. If we now consider an SPH -particle at a free surface at rest, it will have neighbors missing in the direction normal to -the surface, which will result in a lower density. If we calculate the correction factor -```math -k = \rho_0/\rho_\text{mean}, -``` -this value will be about ~1.5 for particles at the free surface and can then be used to increase -the pressure and viscosity accordingly. - -# Arguments -- `rho0`: Rest density. - -## References -- Akinci, N., Akinci, G., & Teschner, M. (2013). - "Versatile Surface Tension and Adhesion for SPH Fluids". - ACM Transactions on Graphics (TOG), 32(6), 182. - [doi: 10.1145/2508363.2508405](https://doi.org/10.1145/2508363.2508395) -""" -struct AkinciFreeSurfaceCorrection{ELTYPE} - rho0::ELTYPE - - function AkinciFreeSurfaceCorrection(rho0) - ELTYPE = eltype(rho0) - return new{ELTYPE}(rho0) - end -end - -# `rho_mean` is the mean density of the fluid, which is used to determine correction values near the free surface. -# Return a tuple `(viscosity_correction, pressure_correction, surface_tension_correction)` representing the correction terms. -@inline function free_surface_correction(correction::AkinciFreeSurfaceCorrection, - particle_system, rho_mean) - # Equation 4 in ref - k = correction.rho0 / rho_mean - - # Viscosity, pressure, surface_tension - return k, 1.0, k -end - -@inline function free_surface_correction(correction, particle_system, rho_mean) - return 1.0, 1.0, 1.0 -end - -@doc raw""" - ShepardKernelCorrection() - -Kernel correction uses Shepard interpolation to obtain a 0-th order accurate result, which -was first proposed by Li et al. - -The kernel correction coefficient is determined by -```math -c(x) = \sum_{b=1} V_b W_b(x), -``` -where ``V_b = m_b / \rho_b`` is the volume of particle ``b``. - -This correction is applied with [`SummationDensity`](@ref) to correct the density and leads -to an improvement, especially at free surfaces. - -!!! note - - It is also referred to as "0th order correction". - - In 2D, we can expect an increase of about 5--6% in computation time. - - -## References -- J. Bonet, T.-S.L. Lok. - "Variational and momentum preservation aspects of Smooth Particle Hydrodynamic formulations". - In: Computer Methods in Applied Mechanics and Engineering 180 (1999), pages 97-115. - [doi: 10.1016/S0045-7825(99)00051-1](https://doi.org/10.1016/S0045-7825(99)00051-1) -- Mihai Basa, Nathan Quinlan, Martin Lastiwka. - "Robustness and accuracy of SPH formulations for viscous flow". - In: International Journal for Numerical Methods in Fluids 60 (2009), pages 1127--1148. - [doi: 10.1002/fld.1927](https://doi.org/10.1002/fld.1927) -- Shaofan Li, Wing Kam Liu. - "Moving least-square reproducing kernel method Part II: Fourier analysis". - In: Computer Methods in Applied Mechanics and Engineering 139 (1996), pages 159--193. - [doi:10.1016/S0045-7825(96)01082-1](https://doi.org/10.1016/S0045-7825(96)01082-1) -""" -struct ShepardKernelCorrection end - -@doc raw""" - KernelCorrection() - -Kernel correction uses Shepard interpolation to obtain a 0-th order accurate result, which -was first proposed by Li et al. This can be further extended to obtain a kernel corrected gradient -as shown by Basa et al. - -The kernel correction coefficient is determined by -```math -c(x) = \sum_{b=1} V_b W_b(x) -``` -The gradient of corrected kernel is determined by -```math -\nabla \tilde{W}_{b}(r) =\frac{\nabla W_{b}(r) - W_b(r) \gamma(r)}{\sum_{b=1} V_b W_b(r)} , \quad \text{where} \quad -\gamma(r) = \frac{\sum_{b=1} V_b \nabla W_b(r)}{\sum_{b=1} V_b W_b(r)}. -``` - -This correction can be applied with [`SummationDensity`](@ref) and -[`ContinuityDensity`](@ref), which leads to an improvement, especially at free surfaces. - -!!! note - - This only works when the boundary model uses [`SummationDensity`](@ref) (yet). - - It is also referred to as "0th order correction". - - In 2D, we can expect an increase of about 10--15% in computation time. - - -## References -- J. Bonet, T.-S.L. Lok. - "Variational and momentum preservation aspects of Smooth Particle Hydrodynamic formulations". - In: Computer Methods in Applied Mechanics and Engineering 180 (1999), pages 97-115. - [doi: 10.1016/S0045-7825(99)00051-1](https://doi.org/10.1016/S0045-7825(99)00051-1) -- Mihai Basa, Nathan Quinlan, Martin Lastiwka. - "Robustness and accuracy of SPH formulations for viscous flow". - In: International Journal for Numerical Methods in Fluids 60 (2009), pages 1127--1148. - [doi: 10.1002/fld.1927](https://doi.org/10.1002/fld.1927) -- Shaofan Li, Wing Kam Liu. - "Moving least-square reproducing kernel method Part II: Fourier analysis". - In: Computer Methods in Applied Mechanics and Engineering 139 (1996), pages 159-193. - [doi:10.1016/S0045-7825(96)01082-1](https://doi.org/10.1016/S0045-7825(96)01082-1) -""" -struct KernelCorrection end - -@doc raw""" - MixedKernelGradientCorrection() - -Combines [`GradientCorrection`](@ref) and [`KernelCorrection`](@ref), -which results in a 1st-order-accurate SPH method. - -# Notes: -- Stability issues, especially when particles separate into small clusters. -- Doubles the computational effort. - -## References -- J. Bonet, T.-S.L. Lok. - "Variational and momentum preservation aspects of Smooth Particle Hydrodynamic formulations". - In: Computer Methods in Applied Mechanics and Engineering 180 (1999), pages 97--115. - [doi: 10.1016/S0045-7825(99)00051-1](https://doi.org/10.1016/S0045-7825(99)00051-1) -- Mihai Basa, Nathan Quinlan, Martin Lastiwka. - "Robustness and accuracy of SPH formulations for viscous flow". - In: International Journal for Numerical Methods in Fluids 60 (2009), pages 1127--1148. - [doi: 10.1002/fld.1927](https://doi.org/10.1002/fld.1927) -""" -struct MixedKernelGradientCorrection end - -function kernel_correction_coefficient(system::FluidSystem, particle) - return system.cache.kernel_correction_coefficient[particle] -end - -function kernel_correction_coefficient(system::BoundarySystem, particle) - return system.boundary_model.cache.kernel_correction_coefficient[particle] -end - -function compute_correction_values!(system, correction, u, v_ode, u_ode, semi) - return system -end - -function compute_correction_values!(system, ::ShepardKernelCorrection, u, v_ode, u_ode, - semi) - return compute_shepard_coeff!(system, current_coordinates(u, system), v_ode, u_ode, - semi, - system.cache.kernel_correction_coefficient) -end - -function compute_correction_values!(system::BoundarySystem, ::ShepardKernelCorrection, u, - v_ode, u_ode, semi) - return compute_shepard_coeff!(system, current_coordinates(u, system), v_ode, u_ode, - semi, - system.boundary_model.cache.kernel_correction_coefficient) -end - -function compute_shepard_coeff!(system, system_coords, v_ode, u_ode, semi, - kernel_correction_coefficient) - set_zero!(kernel_correction_coefficient) - - # Use all other systems for the density summation - @trixi_timeit timer() "compute correction value" foreach_system(semi) do neighbor_system - u_neighbor_system = wrap_u(u_ode, neighbor_system, semi) - v_neighbor_system = wrap_v(v_ode, neighbor_system, semi) - - neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - - neighborhood_search = get_neighborhood_search(system, neighbor_system, semi) - - # Loop over all pairs of particles and neighbors within the kernel cutoff - for_particle_neighbor(system, neighbor_system, system_coords, - neighbor_coords, neighborhood_search, - particles=eachparticle(system)) do particle, neighbor, - pos_diff, distance - rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) - m_b = hydrodynamic_mass(neighbor_system, neighbor) - volume = m_b / rho_b - - kernel_correction_coefficient[particle] += volume * - smoothing_kernel(system, distance) - end - end - - return kernel_correction_coefficient -end - -function dw_gamma(system::FluidSystem, particle) - return extract_svector(system.cache.dw_gamma, system, particle) -end - -function dw_gamma(system::BoundarySystem, particle) - return extract_svector(system.boundary_model.cache.dw_gamma, system, particle) -end - -function compute_correction_values!(system::FluidSystem, - correction::Union{KernelCorrection, - MixedKernelGradientCorrection}, u, - v_ode, u_ode, semi) - compute_correction_values!(system, correction, current_coordinates(u, system), v_ode, - u_ode, semi, - system.cache.kernel_correction_coefficient, - system.cache.dw_gamma) -end - -function compute_correction_values!(system::BoundarySystem, - correction::Union{KernelCorrection, - MixedKernelGradientCorrection}, u, - v_ode, u_ode, semi) - compute_correction_values!(system, correction, current_coordinates(u, system), v_ode, - u_ode, semi, - system.boundary_model.cache.kernel_correction_coefficient, - system.boundary_model.cache.dw_gamma) -end - -function compute_correction_values!(system, - ::Union{KernelCorrection, - MixedKernelGradientCorrection}, system_coords, - v_ode, - u_ode, semi, kernel_correction_coefficient, dw_gamma) - set_zero!(kernel_correction_coefficient) - set_zero!(dw_gamma) - - # Use all other systems for the density summation - @trixi_timeit timer() "compute correction value" foreach_system(semi) do neighbor_system - u_neighbor_system = wrap_u(u_ode, neighbor_system, semi) - v_neighbor_system = wrap_v(v_ode, neighbor_system, semi) - - neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - - neighborhood_search = get_neighborhood_search(system, neighbor_system, semi) - - # Loop over all pairs of particles and neighbors within the kernel cutoff - for_particle_neighbor(system, neighbor_system, system_coords, - neighbor_coords, - neighborhood_search, - particles=eachparticle(system)) do particle, neighbor, - pos_diff, distance - rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) - m_b = hydrodynamic_mass(neighbor_system, neighbor) - volume = m_b / rho_b - - kernel_correction_coefficient[particle] += volume * - smoothing_kernel(system, distance) - if distance > sqrt(eps()) - tmp = volume * smoothing_kernel_grad(system, pos_diff, distance) - for i in axes(dw_gamma, 1) - dw_gamma[i, particle] += tmp[i] - end - end - end - end - - for particle in eachparticle(system), i in axes(dw_gamma, 1) - dw_gamma[i, particle] /= kernel_correction_coefficient[particle] - end -end - -@doc raw""" - GradientCorrection() - -Compute the corrected gradient of particle interactions based on their relative positions. - -# Mathematical Details - -Given the standard SPH representation, the gradient of a field ``A`` at particle ``a`` is -given by - -```math -\nabla A_a = \sum_b m_b \frac{A_b - A_a}{\rho_b} \nabla_{r_a} W(\Vert r_a - r_b \Vert, h), -``` -where ``m_b`` is the mass of particle ``b`` and ``\rho_b`` is the density of particle ``b``. - -The gradient correction, as commonly proposed, involves multiplying this gradient with a correction matrix $L$: - -```math -\tilde{\nabla} A_a = \bm{L}_a \nabla A_a -``` - -The correction matrix $\bm{L}_a$ is computed based on the provided particle configuration, -aiming to make the corrected gradient more accurate, especially near domain boundaries. - -To satisfy -```math -\sum_b V_b r_{ba} \otimes \tilde{\nabla}W_b(r_a) = \left( \sum_b V_b r_{ba} \otimes \nabla W_b(r_a) \right) \bm{L}_a^T = \bm{I} -``` -the correction matrix $\bm{L}_a$ is evaluated explicitly as -```math -\bm{L}_a = \left( \sum_b V_b \nabla W_b(r_{a}) \otimes r_{ba} \right)^{-1}. -``` - -!!! note - - Stability issues arise, especially when particles separate into small clusters. - - Doubles the computational effort. -- Better stability with smoother smoothing Kernels with larger support, e.g. [`SchoenbergQuinticSplineKernel`](@ref) or [`WendlandC6Kernel`](@ref). -- Set `dt_max =< 1e-3` for stability. - -## References -- J. Bonet, T.-S.L. Lok. - "Variational and momentum preservation aspects of Smooth Particle Hydrodynamic formulations". - In: Computer Methods in Applied Mechanics and Engineering 180 (1999), pages 97--115. - [doi: 10.1016/S0045-7825(99)00051-1](https://doi.org/10.1016/S0045-7825(99)00051-1) -- Mihai Basa, Nathan Quinlan, Martin Lastiwka. - "Robustness and accuracy of SPH formulations for viscous flow". - In: International Journal for Numerical Methods in Fluids 60 (2009), pages 1127--1148. - [doi: 10.1002/fld.1927](https://doi.org/10.1002/fld.1927) -""" -struct GradientCorrection end - -@doc raw""" - BlendedGradientCorrection() - -Calculate a blended gradient to reduce the stability issues of the [`GradientCorrection`](@ref). - -This calculates the following, -```math -\tilde\nabla A_i = (1-\lambda) \nabla A_i + \lambda L_i \nabla A_i -``` -with ``0 \leq \lambda \leq 1`` being the blending factor. - -# Arguments -- `blending_factor`: Blending factor between corrected and regular SPH gradient. -""" -struct BlendedGradientCorrection{ELTYPE <: Real} - blending_factor::ELTYPE - - function BlendedGradientCorrection(blending_factor) - return new{eltype(blending_factor)}(blending_factor) - end -end - -# Called only by DensityDiffusion and TLSPH -function compute_gradient_correction_matrix!(corr_matrix, neighborhood_search, - system, coordinates, density_fun) - (; mass) = system - - set_zero!(corr_matrix) - - # Loop over all pairs of particles and neighbors within the kernel cutoff. - for_particle_neighbor(system, system, - coordinates, coordinates, - neighborhood_search; - particles=eachparticle(system)) do particle, neighbor, - pos_diff, distance - volume = mass[neighbor] / density_fun(neighbor) - - grad_kernel = smoothing_kernel_grad(system, pos_diff, distance) - - iszero(grad_kernel) && return - - result = volume * grad_kernel * pos_diff' - - @inbounds for j in 1:ndims(system), i in 1:ndims(system) - corr_matrix[i, j, particle] -= result[i, j] - end - end - - correction_matrix_inversion_step!(corr_matrix, system) - - return corr_matrix -end - -function compute_gradient_correction_matrix!(corr_matrix::AbstractArray, system, - coordinates, v_ode, u_ode, semi, - correction, smoothing_length, smoothing_kernel) - set_zero!(corr_matrix) - - # Loop over all pairs of particles and neighbors within the kernel cutoff - @trixi_timeit timer() "compute correction matrix" foreach_system(semi) do neighbor_system - u_neighbor_system = wrap_u(u_ode, neighbor_system, semi) - v_neighbor_system = wrap_v(v_ode, neighbor_system, semi) - - neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - neighborhood_search = get_neighborhood_search(system, neighbor_system, semi) - - for_particle_neighbor(system, neighbor_system, coordinates, neighbor_coords, - neighborhood_search; - particles=eachparticle(system)) do particle, - neighbor, - pos_diff, - distance - volume = hydrodynamic_mass(neighbor_system, neighbor) / - particle_density(v_neighbor_system, neighbor_system, neighbor) - - function compute_grad_kernel(correction, smoothing_kernel, pos_diff, distance, - smoothing_length, system, particle) - return smoothing_kernel_grad(system, pos_diff, distance) - end - - # Compute gradient of corrected kernel - function compute_grad_kernel(correction::MixedKernelGradientCorrection, - smoothing_kernel, pos_diff, distance, - smoothing_length, system, particle) - return corrected_kernel_grad(smoothing_kernel, pos_diff, distance, - smoothing_length, KernelCorrection(), system, - particle) - end - - grad_kernel = compute_grad_kernel(correction, smoothing_kernel, pos_diff, - distance, smoothing_length, system, particle) - - iszero(grad_kernel) && return - - L = volume * grad_kernel * pos_diff' - - # pos_diff is always x_a - x_b hence * -1 to switch the order to x_b - x_a - @inbounds for j in 1:ndims(system), i in 1:ndims(system) - corr_matrix[i, j, particle] -= L[i, j] - end - end - end - - correction_matrix_inversion_step!(corr_matrix, system) - - return corr_matrix -end - -function correction_matrix_inversion_step!(corr_matrix, system) - @threaded system for particle in eachparticle(system) - L = extract_smatrix(corr_matrix, system, particle) - - # The matrix `L` only becomes singular when the particle and all neighbors - # are collinear (in 2D) or lie all in the same plane (in 3D). - # This happens only when two (in 2D) or three (in 3D) particles are isolated, - # or in cases where there is only one layer of fluid particles on a wall. - # In these edge cases, we just disable the correction and set the corrected - # gradient to be the uncorrected one by setting `L` to the identity matrix. - # - # Proof: `L` is just a sum of tensor products of relative positions X_ab with - # themselves. According to - # https://en.wikipedia.org/wiki/Outer_product#Connection_with_the_matrix_product - # the sum of tensor products can be rewritten as A A^T, where the columns of A - # are the relative positions X_ab. The rank of A A^T is equal to the rank of A, - # so `L` is singular if and only if the position vectors X_ab don't span the - # full space, i.e., particle a and all neighbors lie on the same line (in 2D) - # or plane (in 3D). - if abs(det(L)) < 1e-9 - L_inv = I - else - L_inv = inv(L) - end - - # Write inverse back to `corr_matrix` - for j in 1:ndims(system), i in 1:ndims(system) - @inbounds corr_matrix[i, j, particle] = L_inv[i, j] - end - end - - return corr_matrix -end diff --git a/src/general/custom_quantities.jl b/src/general/custom_quantities.jl deleted file mode 100644 index ea357b065..000000000 --- a/src/general/custom_quantities.jl +++ /dev/null @@ -1,123 +0,0 @@ -""" - kinetic_energy - -Returns the total kinetic energy of all particles in a system. -""" -function kinetic_energy(v, u, t, system) - # If `each_moving_particle` is empty (no moving particles), return zero - return sum(each_moving_particle(system), init=0.0) do particle - velocity = current_velocity(v, system, particle) - return 0.5 * system.mass[particle] * dot(velocity, velocity) - end -end - -""" - total_mass - -Returns the total mass of all particles in a system. -""" -function total_mass(v, u, t, system) - return sum(eachparticle(system)) do particle - return system.mass[particle] - end -end - -function total_mass(v, u, t, system::BoundarySystem) - # It does not make sense to return a mass for boundary systems. - # The material density and therefore the physical mass of the boundary is not relevant - # when simulating a solid, stationary wall. The boundary always behaves as if it had - # infinite mass. There is no momentum transferred to the boundary on impact. - # - # When the dummy particles model is used, i.e., boundary particles behave like fluid - # particles when interacting with actual fluid particles, the boundary particles do have - # a "hydrodynamic mass", which corresponds to the fluid density, but this is only - # relevant for the fluid interaction, and it has no connection to the physical mass - # of the boundary. Returning the "hydrodynamic mass" here would thus be misleading. - return NaN -end - -""" - max_pressure - -Returns the maximum pressure over all particles in a system. -""" -function max_pressure(v, u, t, system::FluidSystem) - return maximum(particle -> particle_pressure(v, system, particle), - eachparticle(system)) -end - -function max_pressure(v, u, t, system) - return NaN -end - -""" - min_pressure - -Returns the minimum pressure over all particles in a system. -""" -function min_pressure(v, u, t, system::FluidSystem) - return minimum(particle -> particle_pressure(v, system, particle), - eachparticle(system)) -end - -function min_pressure(v, u, t, system) - return NaN -end - -""" - avg_pressure - -Returns the average pressure over all particles in a system. -""" -function avg_pressure(v, u, t, system::FluidSystem) - sum_ = sum(particle -> particle_pressure(v, system, particle), - eachparticle(system)) - return sum_ / nparticles(system) -end - -function avg_pressure(v, u, t, system) - return NaN -end - -""" - max_density - -Returns the maximum density over all particles in a system. -""" -function max_density(v, u, t, system::FluidSystem) - return maximum(particle -> particle_density(v, system, particle), - eachparticle(system)) -end - -function max_density(v, u, t, system) - return NaN -end - -""" - min_density - -Returns the minimum density over all particles in a system. -""" -function min_density(v, u, t, system::FluidSystem) - return minimum(particle -> particle_density(v, system, particle), - eachparticle(system)) -end - -function min_density(v, u, t, system) - return NaN -end - -""" - avg_density - -Returns the average_density over all particles in a system. -""" -function avg_density(v, u, t, system::FluidSystem) - sum_ = sum(particle -> particle_density(v, system, particle), - eachparticle(system)) - return sum_ / nparticles(system) -end - -function avg_density(v, u, t, system) - return NaN -end diff --git a/src/general/density_calculators.jl b/src/general/density_calculators.jl index 7244253b0..9a9713b50 100644 --- a/src/general/density_calculators.jl +++ b/src/general/density_calculators.jl @@ -17,9 +17,9 @@ Density calculator to integrate the density from the continuity equation ```math \frac{\mathrm{d}\rho_a}{\mathrm{d}t} = \sum_{b} m_b v_{ab} \cdot \nabla_{r_a} W(\Vert r_a - r_b \Vert, h), ``` -where ``\rho_a`` denotes the density of particle ``a`` and ``r_{ab} = r_a - r_b`` is the -difference of the coordinates, ``v_{ab} = v_a - v_b`` of the velocities of particles -``a`` and ``b``. +where ``\rho_a`` denotes the density of particle ``a``, ``r_a`` and ``r_b`` denote the coordinates +of particles ``a`` and ``b`` respectively, and ``v_{ab} = v_a - v_b`` is the difference of the +velocities of particles ``a`` and ``b``. """ struct ContinuityDensity end @@ -35,37 +35,17 @@ end return v[end, particle] end -# WARNING! -# These functions are intended to be used internally to set the density -# of newly activated particles in a callback. -# DO NOT use outside a callback. OrdinaryDiffEq does not allow changing `v` and `u` -# outside of callbacks. -@inline set_particle_density!(v, system, ::SummationDensity, particle, density) = v - -@inline function set_particle_density!(v, system, ::ContinuityDensity, particle, density) - v[end, particle] = density - - return v +# *Note* that these functions are intended to internally set the density for buffer particles +# and density correction. It cannot be used to set up an initial condition, +# as the particle density depends on the particle positions. +@inline function set_particle_density(particle, v, system, density) + set_particle_density(particle, v, system.density_calculator, system, density) end -function summation_density!(system, semi, u, u_ode, density; - particles=each_moving_particle(system)) - set_zero!(density) - - # Use all other systems for the density summation - @trixi_timeit timer() "compute density" foreach_system(semi) do neighbor_system - u_neighbor_system = wrap_u(u_ode, neighbor_system, semi) - - system_coords = current_coordinates(u, system) - neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - - nhs = get_neighborhood_search(system, neighbor_system, semi) +@inline function set_particle_density(particle, v, ::SummationDensity, system, density) + system.cache.density[particle] = density +end - # Loop over all pairs of particles and neighbors within the kernel cutoff. - for_particle_neighbor(system, neighbor_system, system_coords, neighbor_coords, nhs, - particles=particles) do particle, neighbor, pos_diff, distance - mass = hydrodynamic_mass(neighbor_system, neighbor) - density[particle] += mass * smoothing_kernel(system, distance) - end - end +@inline function set_particle_density(particle, v, ::ContinuityDensity, system, density) + v[end, particle] = density end diff --git a/src/general/general.jl b/src/general/general.jl index dfd709861..4463af480 100644 --- a/src/general/general.jl +++ b/src/general/general.jl @@ -1,11 +1,7 @@ -# Note that `system.jl` has already been included. -# `semidiscretization.jl` depends on the system types and has to be included later. -# `density_calculators.jl` needs to be included before `corrections.jl`. -include("density_calculators.jl") -include("corrections.jl") +# Note that `semidiscretization.jl` depends on the system types and has to be +# included later. +include("neighborhood_search.jl") include("smoothing_kernels.jl") +include("density_calculators.jl") include("initial_condition.jl") -include("buffer.jl") -include("interpolation.jl") -include("custom_quantities.jl") -include("neighborhood_search.jl") +include("system.jl") diff --git a/src/general/gpu.jl b/src/general/gpu.jl deleted file mode 100644 index 8aa481cff..000000000 --- a/src/general/gpu.jl +++ /dev/null @@ -1,42 +0,0 @@ -# Adapt.jl provides a function `adapt(to, x)`, which adapts a value `x` to `to`. -# In practice, this means that we can use `adapt(CuArray, system)` to adapt a system to -# the `CuArray` type. -# What this does is that it converts all `Array`s inside this system to `CuArray`s, -# therefore copying them to the GPU. -# In order to run a simulation on a GPU, we want to call `adapt(T, semi)` to adapt the -# `Semidiscretization` `semi` to the GPU array type `T` (e.g. `CuArray`). -# -# `Adapt.@adapt_structure` automatically generates the `adapt` function for our custom types. -Adapt.@adapt_structure Semidiscretization -Adapt.@adapt_structure WeaklyCompressibleSPHSystem -Adapt.@adapt_structure DensityDiffusionAntuono -Adapt.@adapt_structure BoundarySPHSystem -Adapt.@adapt_structure BoundaryModelDummyParticles -Adapt.@adapt_structure BoundaryModelMonaghanKajtar -Adapt.@adapt_structure TotalLagrangianSPHSystem - -# The initial conditions are only used for initialization, which happens before `adapt`ing -# the semidiscretization, so we don't need to store `InitialCondition`s on the GPU. -# To save precious GPU memory, we replace initial conditions by `nothing`. -function Adapt.adapt_structure(to, ic::InitialCondition) - return nothing -end - -# `adapt(CuArray, ::SVector)::SVector`, but `adapt(Array, ::SVector)::Vector`. -# We don't want to change the type of the `SVector` here. -function Adapt.adapt_structure(to::typeof(Array), svector::SVector) - return svector -end - -# `adapt(CuArray, ::UnitRange)::UnitRange`, but `adapt(Array, ::UnitRange)::Vector`. -# We don't want to change the type of the `UnitRange` here. -function Adapt.adapt_structure(to::typeof(Array), range::UnitRange) - return range -end - -KernelAbstractions.get_backend(::PtrArray) = KernelAbstractions.CPU() -KernelAbstractions.get_backend(system::System) = KernelAbstractions.get_backend(system.mass) - -function KernelAbstractions.get_backend(system::BoundarySPHSystem) - KernelAbstractions.get_backend(system.coordinates) -end diff --git a/src/general/initial_condition.jl b/src/general/initial_condition.jl index 8e94b1615..2e38cb485 100644 --- a/src/general/initial_condition.jl +++ b/src/general/initial_condition.jl @@ -1,187 +1,38 @@ -@doc raw""" - InitialCondition(; coordinates, density, velocity=zeros(size(coordinates, 1)), - mass=nothing, pressure=0.0, particle_spacing=-1.0) - -Struct to hold the initial configuration of the particles. - -The following setups return `InitialCondition`s for commonly used setups: -- [`RectangularShape`](@ref) -- [`SphereShape`](@ref) -- [`RectangularTank`](@ref) - -`InitialCondition`s support the set operations `union`, `setdiff` and `intersect` in order -to build more complex geometries. - -# Arguments -- `coordinates`: An array where the $i$-th column holds the coordinates of particle $i$. -- `density`: Either a vector holding the density of each particle, - or a function mapping each particle's coordinates to its density, - or a scalar for a constant density over all particles. - -# Keywords -- `velocity`: Either an array where the $i$-th column holds the velocity of particle $i$, - or a function mapping each particle's coordinates to its velocity, - or, for a constant fluid velocity, a vector holding this velocity. - Velocity is constant zero by default. -- `mass`: Either `nothing` (default) to automatically compute particle mass from particle - density and spacing, or a vector holding the mass of each particle, - or a function mapping each particle's coordinates to its mass, - or a scalar for a constant mass over all particles. -- `pressure`: Either a vector holding the pressure of each particle, - or a function mapping each particle's coordinates to its pressure, - or a scalar for a constant pressure over all particles. This is optional and - only needed when using the [`EntropicallyDampedSPHSystem`](@ref). -- `particle_spacing`: The spacing between the particles. This is a scalar, as the spacing - is assumed to be uniform. This is only needed when using - set operations on the `InitialCondition` or for automatic mass calculation. - -# Examples -```jldoctest; output = false -# Rectangle filled with particles -initial_condition = RectangularShape(0.1, (3, 4), (-1.0, 1.0), density=1.0) - -# Two spheres in one initial condition -initial_condition = union(SphereShape(0.15, 0.5, (-1.0, 1.0), 1.0), - SphereShape(0.15, 0.2, (0.0, 1.0), 1.0)) - -# Rectangle with a spherical hole -shape1 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0) -shape2 = SphereShape(0.1, 0.35, (0.0, 0.6), 1.0, sphere_type=RoundSphere()) -initial_condition = setdiff(shape1, shape2) - -# Intersect of a rectangle with a sphere. Note that this keeps the particles of the -# rectangle that are in the intersect, while `intersect(shape2, shape1)` would consist of -# the particles of the sphere that are in the intersect. -shape1 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0) -shape2 = SphereShape(0.1, 0.35, (0.0, 0.6), 1.0, sphere_type=RoundSphere()) -initial_condition = intersect(shape1, shape2) - -# Build `InitialCondition` manually -coordinates = [0.0 1.0 1.0 - 0.0 0.0 1.0] -velocity = zero(coordinates) -mass = ones(3) -density = 1000 * ones(3) -initial_condition = InitialCondition(; coordinates, velocity, mass, density) - -# With functions -initial_condition = InitialCondition(; coordinates, velocity=x -> 2x, mass=1.0, density=1000.0) - -# output -InitialCondition{Float64}(-1.0, [0.0 1.0 1.0; 0.0 0.0 1.0], [0.0 2.0 2.0; 0.0 0.0 2.0], [1.0, 1.0, 1.0], [1000.0, 1000.0, 1000.0], [0.0, 0.0, 0.0]) -``` -""" struct InitialCondition{ELTYPE} - particle_spacing :: ELTYPE - coordinates :: Array{ELTYPE, 2} - velocity :: Array{ELTYPE, 2} - mass :: Array{ELTYPE, 1} - density :: Array{ELTYPE, 1} - pressure :: Array{ELTYPE, 1} - - function InitialCondition(; coordinates, density, velocity=zeros(size(coordinates, 1)), - mass=nothing, pressure=0.0, particle_spacing=-1.0) - NDIMS = size(coordinates, 1) - - return InitialCondition{NDIMS}(coordinates, velocity, mass, density, - pressure, particle_spacing) - end - - # Function barrier to make `NDIMS` static and therefore SVectors type-stable - function InitialCondition{NDIMS}(coordinates, velocity, mass, density, - pressure, particle_spacing) where {NDIMS} - ELTYPE = eltype(coordinates) - n_particles = size(coordinates, 2) - - if n_particles == 0 - return new{ELTYPE}(particle_spacing, coordinates, zeros(ELTYPE, NDIMS, 0), - zeros(ELTYPE, 0), zeros(ELTYPE, 0), zeros(ELTYPE, 0)) - end + coordinates :: Array{ELTYPE, 2} + velocity :: Array{ELTYPE, 2} + mass :: Array{ELTYPE, 1} + density :: Array{ELTYPE, 1} - # SVector of coordinates to pass to functions - coordinates_svector = reinterpret(reshape, SVector{NDIMS, ELTYPE}, coordinates) - - if velocity isa AbstractMatrix - velocities = velocity - else - # Assuming `velocity` is a scalar or a function - velocity_fun = wrap_function(velocity, Val(NDIMS)) - if length(velocity_fun(coordinates_svector[1])) != NDIMS - throw(ArgumentError("`velocity` must be $NDIMS-dimensional " * - "for $NDIMS-dimensional `coordinates`")) - end - velocities_svector = velocity_fun.(coordinates_svector) - velocities = stack(velocities_svector) - end + function InitialCondition(coordinates, velocities, masses, densities) if size(coordinates) != size(velocities) throw(ArgumentError("`coordinates` and `velocities` must be of the same size")) end - if density isa AbstractVector - if length(density) != n_particles - throw(ArgumentError("Expected: length(density) == size(coordinates, 2)\n" * - "Got: size(coordinates, 2) = $(size(coordinates, 2)), " * - "length(density) = $(length(density))")) - end - densities = density - else - density_fun = wrap_function(density, Val(NDIMS)) - densities = density_fun.(coordinates_svector) + if !(size(coordinates, 2) == length(masses) == length(densities)) + throw(ArgumentError("the following must hold: " * + "`size(coordinates, 2) == length(masses) == length(densities)`")) end - if any(densities .< eps()) - throw(ArgumentError("density must be positive and larger than `eps()`")) - end + return new{eltype(coordinates)}(coordinates, velocities, masses, densities) + end - if pressure isa AbstractVector - if length(pressure) != n_particles - throw(ArgumentError("Expected: length(pressure) == size(coordinates, 2)\n" * - "Got: size(coordinates, 2) = $(size(coordinates, 2)), " * - "length(pressure) = $(length(pressure))")) - end - pressures = pressure - else - pressure_fun = wrap_function(pressure, Val(NDIMS)) - pressures = pressure_fun.(coordinates_svector) + function InitialCondition(initial_conditions...) + NDIMS = size(first(initial_conditions).coordinates, 1) + if any(ic -> size(ic.coordinates, 1) != NDIMS, initial_conditions) + throw(ArgumentError("all passed initial conditions must have the same dimensionality")) end - if mass isa AbstractVector - if length(mass) != n_particles - throw(ArgumentError("Expected: length(mass) == size(coordinates, 2)\n" * - "Got: size(coordinates, 2) = $(size(coordinates, 2)), " * - "length(mass) = $(length(mass))")) - end - masses = mass - elseif mass === nothing - if particle_spacing < 0 - throw(ArgumentError("`mass` must be specified when not using `particle_spacing`")) - end - particle_volume = particle_spacing^NDIMS - masses = particle_volume * densities - else - mass_fun = wrap_function(mass, Val(NDIMS)) - masses = mass_fun.(coordinates_svector) - end + coordinates = hcat((ic.coordinates for ic in initial_conditions)...) + velocity = hcat((ic.velocity for ic in initial_conditions)...) + mass = vcat((ic.mass for ic in initial_conditions)...) + density = vcat((ic.density for ic in initial_conditions)...) - return new{ELTYPE}(particle_spacing, coordinates, velocities, masses, - densities, pressures) + # TODO: Throw warning when particles are overlapping + return new{eltype(coordinates)}(coordinates, velocity, mass, density) end end -function wrap_function(function_::Function, ::Val) - # Already a function - return function_ -end - -function wrap_function(constant_scalar::Number, ::Val) - return coords -> constant_scalar -end - -# For vectors and tuples -function wrap_function(constant_vector, ::Val{NDIMS}) where {NDIMS} - return coords -> SVector{NDIMS}(constant_vector) -end - @inline function Base.ndims(initial_condition::InitialCondition) return size(initial_condition.coordinates, 1) end @@ -191,114 +42,3 @@ end end @inline nparticles(initial_condition::InitialCondition) = length(initial_condition.mass) - -function Base.union(initial_condition::InitialCondition, initial_conditions...) - particle_spacing = initial_condition.particle_spacing - ic = first(initial_conditions) - - if ndims(ic) != ndims(initial_condition) - throw(ArgumentError("all passed initial conditions must have the same dimensionality")) - end - - if particle_spacing < eps() - throw(ArgumentError("all passed initial conditions must store a particle spacing")) - end - - if !isapprox(ic.particle_spacing, particle_spacing) - throw(ArgumentError("all passed initial conditions must have the same particle spacing")) - end - - too_close = find_too_close_particles(ic.coordinates, initial_condition.coordinates, - 0.75particle_spacing) - valid_particles = setdiff(eachparticle(ic), too_close) - - coordinates = hcat(initial_condition.coordinates, ic.coordinates[:, valid_particles]) - velocity = hcat(initial_condition.velocity, ic.velocity[:, valid_particles]) - mass = vcat(initial_condition.mass, ic.mass[valid_particles]) - density = vcat(initial_condition.density, ic.density[valid_particles]) - pressure = vcat(initial_condition.pressure, ic.pressure[valid_particles]) - - result = InitialCondition{ndims(ic)}(coordinates, velocity, mass, density, pressure, - particle_spacing) - - return union(result, Base.tail(initial_conditions)...) -end - -Base.union(initial_condition::InitialCondition) = initial_condition - -function Base.setdiff(initial_condition::InitialCondition, initial_conditions...) - ic = first(initial_conditions) - - if ndims(ic) != ndims(initial_condition) - throw(ArgumentError("all passed initial conditions must have the same dimensionality")) - end - - particle_spacing = initial_condition.particle_spacing - if particle_spacing < eps() - throw(ArgumentError("the initial condition in the first argument must store a particle spacing")) - end - - too_close = find_too_close_particles(initial_condition.coordinates, ic.coordinates, - 0.75particle_spacing) - valid_particles = setdiff(eachparticle(initial_condition), too_close) - - coordinates = initial_condition.coordinates[:, valid_particles] - velocity = initial_condition.velocity[:, valid_particles] - mass = initial_condition.mass[valid_particles] - density = initial_condition.density[valid_particles] - pressure = initial_condition.pressure[valid_particles] - - result = InitialCondition{ndims(ic)}(coordinates, velocity, mass, density, pressure, - particle_spacing) - - return setdiff(result, Base.tail(initial_conditions)...) -end - -Base.setdiff(initial_condition::InitialCondition) = initial_condition - -function Base.intersect(initial_condition::InitialCondition, initial_conditions...) - ic = first(initial_conditions) - - if ndims(ic) != ndims(initial_condition) - throw(ArgumentError("all passed initial conditions must have the same dimensionality")) - end - - particle_spacing = initial_condition.particle_spacing - if particle_spacing < eps() - throw(ArgumentError("the initial condition in the first argument must store a particle spacing")) - end - - too_close = find_too_close_particles(initial_condition.coordinates, ic.coordinates, - 0.75particle_spacing) - - coordinates = initial_condition.coordinates[:, too_close] - velocity = initial_condition.velocity[:, too_close] - mass = initial_condition.mass[too_close] - density = initial_condition.density[too_close] - pressure = initial_condition.pressure[too_close] - - result = InitialCondition{ndims(ic)}(coordinates, velocity, mass, density, pressure, - particle_spacing) - - return intersect(result, Base.tail(initial_conditions)...) -end - -Base.intersect(initial_condition::InitialCondition) = initial_condition - -# Find particles in `coords1` that are closer than `max_distance` to any particle in `coords2` -function find_too_close_particles(coords1, coords2, max_distance) - NDIMS = size(coords1, 1) - result = Int[] - - nhs = GridNeighborhoodSearch{NDIMS}(max_distance, size(coords2, 2)) - PointNeighbors.initialize!(nhs, coords1, coords2) - - # We are modifying the vector `result`, so this cannot be parallel - for_particle_neighbor(coords1, coords2, nhs, parallel=false) do particle, _, _, _ - if !(particle in result) - append!(result, particle) - end - end - - return result -end diff --git a/src/general/interpolation.jl b/src/general/interpolation.jl deleted file mode 100644 index 80116a605..000000000 --- a/src/general/interpolation.jl +++ /dev/null @@ -1,589 +0,0 @@ -using LinearAlgebra - -@doc raw""" - interpolate_plane_2d(min_corner, max_corner, resolution, semi, ref_system, sol; - smoothing_length=ref_system.smoothing_length, cut_off_bnd=true, - clip_negative_pressure=false) - -Interpolates properties along a plane in a TrixiParticles simulation. -The region for interpolation is defined by its lower left and top right corners, -with a specified resolution determining the density of the interpolation points. - -The function generates a grid of points within the defined region, -spaced uniformly according to the given resolution. - -See also: [`interpolate_plane_2d_vtk`](@ref), [`interpolate_plane_3d`](@ref), - [`interpolate_line`](@ref), [`interpolate_point`](@ref). - -# Arguments -- `min_corner`: The lower left corner of the interpolation region. -- `max_corner`: The top right corner of the interpolation region. -- `resolution`: The distance between adjacent interpolation points in the grid. -- `semi`: The semidiscretization used for the simulation. -- `ref_system`: The reference system for the interpolation. -- `sol`: The solution state from which the properties are interpolated. - -# Keywords -- `smoothing_length=ref_system.smoothing_length`: The smoothing length used in the interpolation. -- `cut_off_bnd=true`: Boolean to indicate if quantities should be set to `NaN` when the point - is "closer" to the boundary than to the fluid in a kernel-weighted sense. - Or, in more detail, when the boundary has more influence than the fluid - on the density summation in this point, i.e., when the boundary particles - add more kernel-weighted mass than the fluid particles. -- `clip_negative_pressure=false`: One common approach in SPH models is to clip negative pressure - values, but this is unphysical. Instead we clip here during - interpolation thus only impacting the local interpolated value. - -# Returns -- A `NamedTuple` of arrays containing interpolated properties at each point within the plane. - -!!! note - - The interpolation accuracy is subject to the density of particles and the chosen smoothing length. - - With `cut_off_bnd`, a density-based estimation of the surface is used, which is not as - accurate as a real surface reconstruction. - -# Examples -```jldoctest; output = false, filter = r"density = .*", setup = :(trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), tspan=(0.0, 0.01), callbacks=nothing); ref_system = fluid_system) -# Interpolating across a plane from [0.0, 0.0] to [1.0, 1.0] with a resolution of 0.2 -results = interpolate_plane_2d([0.0, 0.0], [1.0, 1.0], 0.2, semi, ref_system, sol) - -# output -(density = ...) -``` -""" -function interpolate_plane_2d(min_corner, max_corner, resolution, semi, ref_system, - sol::ODESolution; - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - # Filter out particles without neighbors - filter_no_neighbors = true - v_ode, u_ode = sol.u[end].x - - results, _, _ = interpolate_plane_2d(min_corner, max_corner, resolution, - semi, ref_system, v_ode, u_ode, - filter_no_neighbors, smoothing_length, cut_off_bnd, - clip_negative_pressure) - - return results -end - -function interpolate_plane_2d(min_corner, max_corner, resolution, semi, ref_system, - v_ode, u_ode; - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - # Filter out particles without neighbors - filter_no_neighbors = true - - results, _, _ = interpolate_plane_2d(min_corner, max_corner, resolution, - semi, ref_system, v_ode, u_ode, - filter_no_neighbors, smoothing_length, cut_off_bnd, - clip_negative_pressure) - - return results -end - -@doc raw""" - interpolate_plane_2d_vtk(min_corner, max_corner, resolution, semi, ref_system, sol; - smoothing_length=ref_system.smoothing_length, cut_off_bnd=true, - clip_negative_pressure=false, output_directory="out", filename="plane") - -Interpolates properties along a plane in a TrixiParticles simulation and exports the result -as a VTI file. -The region for interpolation is defined by its lower left and top right corners, -with a specified resolution determining the density of the interpolation points. - -The function generates a grid of points within the defined region, -spaced uniformly according to the given resolution. - -See also: [`interpolate_plane_2d`](@ref), [`interpolate_plane_3d`](@ref), - [`interpolate_line`](@ref), [`interpolate_point`](@ref). - -# Arguments -- `min_corner`: The lower left corner of the interpolation region. -- `max_corner`: The top right corner of the interpolation region. -- `resolution`: The distance between adjacent interpolation points in the grid. -- `semi`: The semidiscretization used for the simulation. -- `ref_system`: The reference system for the interpolation. -- `sol`: The solution state from which the properties are interpolated. - -# Keywords -- `smoothing_length=ref_system.smoothing_length`: The smoothing length used in the interpolation. -- `output_directory="out"`: Directory to save the VTI file. -- `filename="plane"`: Name of the VTI file. -- `cut_off_bnd=true`: Boolean to indicate if quantities should be set to `NaN` when the point - is "closer" to the boundary than to the fluid in a kernel-weighted sense. - Or, in more detail, when the boundary has more influence than the fluid - on the density summation in this point, i.e., when the boundary particles - add more kernel-weighted mass than the fluid particles. -- `clip_negative_pressure=false`: One common approach in SPH models is to clip negative pressure - values, but this is unphysical. Instead we clip here during - interpolation thus only impacting the local interpolated value. - -!!! note - - The interpolation accuracy is subject to the density of particles and the chosen smoothing length. - - With `cut_off_bnd`, a density-based estimation of the surface is used, which is not as - accurate as a real surface reconstruction. - -# Examples -```julia -# Interpolating across a plane from [0.0, 0.0] to [1.0, 1.0] with a resolution of 0.2 -results = interpolate_plane_2d([0.0, 0.0], [1.0, 1.0], 0.2, semi, ref_system, sol) -``` -""" -function interpolate_plane_2d_vtk(min_corner, max_corner, resolution, semi, ref_system, - sol::ODESolution; clip_negative_pressure=false, - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, - output_directory="out", filename="plane") - v_ode, u_ode = sol.u[end].x - - interpolate_plane_2d_vtk(min_corner, max_corner, resolution, semi, ref_system, - v_ode, u_ode; clip_negative_pressure, - smoothing_length, cut_off_bnd, output_directory, filename) -end - -function interpolate_plane_2d_vtk(min_corner, max_corner, resolution, semi, ref_system, - v_ode, u_ode; - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false, - output_directory="out", filename="plane") - # Don't filter out particles without neighbors to keep 2D grid structure - filter_no_neighbors = false - results, x_range, y_range = interpolate_plane_2d(min_corner, max_corner, resolution, - semi, ref_system, v_ode, u_ode, - filter_no_neighbors, - smoothing_length, cut_off_bnd, - clip_negative_pressure) - - density = reshape(results.density, length(x_range), length(y_range)) - velocity = reshape(results.velocity, length(x_range), length(y_range)) - pressure = reshape(results.pressure, length(x_range), length(y_range)) - - vtk_grid(joinpath(output_directory, filename), x_range, y_range) do vtk - vtk["density"] = density - vtk["velocity"] = velocity - vtk["pressure"] = pressure - end -end - -function interpolate_plane_2d(min_corner, max_corner, resolution, semi, ref_system, - v_ode, u_ode, filter_no_neighbors, smoothing_length, - cut_off_bnd, clip_negative_pressure) - dims = length(min_corner) - if dims != 2 || length(max_corner) != 2 - throw(ArgumentError("function is intended for 2D coordinates only")) - end - - if any(min_corner .> max_corner) - throw(ArgumentError("`min_corner` should be smaller than `max_corner` in every dimension")) - end - - # Calculate the number of points in each dimension based on the resolution - no_points_x = ceil(Int, (max_corner[1] - min_corner[1]) / resolution) + 1 - no_points_y = ceil(Int, (max_corner[2] - min_corner[2]) / resolution) + 1 - - x_range = range(min_corner[1], max_corner[1], length=no_points_x) - y_range = range(min_corner[2], max_corner[2], length=no_points_y) - - # Generate points within the plane - points_coords = [SVector(x, y) for x in x_range, y in y_range] - - results = interpolate_point(points_coords, semi, ref_system, v_ode, u_ode, - smoothing_length=smoothing_length, - cut_off_bnd=cut_off_bnd, - clip_negative_pressure=clip_negative_pressure) - - if filter_no_neighbors - # Find indices where neighbor_count > 0 - indices = findall(x -> x > 0, results.neighbor_count) - - # Filter all arrays in the named tuple using these indices - results = map(x -> x[indices], results) - end - - return results, x_range, y_range -end - -@doc raw""" - interpolate_plane_3d(point1, point2, point3, resolution, semi, ref_system, sol; - smoothing_length=ref_system.smoothing_length, cut_off_bnd=true, - clip_negative_pressure=false) - -Interpolates properties along a plane in a 3D space in a TrixiParticles simulation. -The plane for interpolation is defined by three points in 3D space, -with a specified resolution determining the density of the interpolation points. - -The function generates a grid of points on a parallelogram within the plane defined by the -three points, spaced uniformly according to the given resolution. - -See also: [`interpolate_plane_2d`](@ref), [`interpolate_plane_2d_vtk`](@ref), - [`interpolate_line`](@ref), [`interpolate_point`](@ref). - -# Arguments -- `point1`: The first point defining the plane. -- `point2`: The second point defining the plane. -- `point3`: The third point defining the plane. The points must not be collinear. -- `resolution`: The distance between adjacent interpolation points in the grid. -- `semi`: The semidiscretization used for the simulation. -- `ref_system`: The reference system for the interpolation. -- `sol`: The solution state from which the properties are interpolated. - -# Keywords -- `smoothing_length=ref_system.smoothing_length`: The smoothing length used in the interpolation. -- `cut_off_bnd=true`: Boolean to indicate if quantities should be set to `NaN` when the point - is "closer" to the boundary than to the fluid in a kernel-weighted sense. - Or, in more detail, when the boundary has more influence than the fluid - on the density summation in this point, i.e., when the boundary particles - add more kernel-weighted mass than the fluid particles. -- `clip_negative_pressure=false`: One common approach in SPH models is to clip negative pressure - values, but this is unphysical. Instead we clip here during - interpolation thus only impacting the local interpolated value. - -# Returns -- A `NamedTuple` of arrays containing interpolated properties at each point within the plane. - -!!! note - - The interpolation accuracy is subject to the density of particles and the chosen smoothing length. - - With `cut_off_bnd`, a density-based estimation of the surface is used which is not as - accurate as a real surface reconstruction. - -# Examples -```jldoctest; output = false, filter = r"density = .*", setup = :(trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_3d.jl"), tspan=(0.0, 0.01)); ref_system = fluid_system) -# Interpolating across a plane defined by points [0.0, 0.0, 0.0], [1.0, 0.0, 0.0], and [0.0, 1.0, 0.0] -# with a resolution of 0.1 -results = interpolate_plane_3d([0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], 0.1, semi, ref_system, sol) - -# output -(density = ...) -``` -""" -function interpolate_plane_3d(point1, point2, point3, resolution, semi, ref_system, - sol::ODESolution; - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - v_ode, u_ode = sol.u[end].x - - interpolate_plane_3d(point1, point2, point3, resolution, semi, ref_system, - v_ode, u_ode; smoothing_length, cut_off_bnd, - clip_negative_pressure) -end - -function interpolate_plane_3d(point1, point2, point3, resolution, semi, ref_system, - v_ode, u_ode; smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - if ndims(ref_system) != 3 - throw(ArgumentError("`interpolate_plane_3d` requires a 3D simulation")) - end - - coords, resolution_ = sample_plane((point1, point2, point3), resolution) - - if !isapprox(resolution, resolution_, rtol=5e-2) - @info "The desired plane size is not a multiple of the resolution $resolution." * - "\nNew resolution is set to $resolution_." - end - - points_coords = reinterpret(reshape, SVector{3, Float64}, coords) - - # Interpolate using the generated points - results = interpolate_point(points_coords, semi, ref_system, v_ode, u_ode, - smoothing_length=smoothing_length, - cut_off_bnd=cut_off_bnd, - clip_negative_pressure=clip_negative_pressure) - - # Filter results - indices = findall(x -> x > 0, results.neighbor_count) - filtered_results = map(x -> x[indices], results) - - return filtered_results -end - -@doc raw""" - interpolate_line(start, end_, n_points, semi, ref_system, sol; endpoint=true, - smoothing_length=ref_system.smoothing_length, cut_off_bnd=true, - clip_negative_pressure=false) - -Interpolates properties along a line in a TrixiParticles simulation. -The line interpolation is accomplished by generating a series of -evenly spaced points between `start` and `end_`. -If `endpoint` is `false`, the line is interpolated between the start and end points, -but does not include these points. - -See also: [`interpolate_point`](@ref), [`interpolate_plane_2d`](@ref), - [`interpolate_plane_2d_vtk`](@ref), [`interpolate_plane_3d`](@ref). - -# Arguments -- `start`: The starting point of the line. -- `end_`: The ending point of the line. -- `n_points`: The number of points to interpolate along the line. -- `semi`: The semidiscretization used for the simulation. -- `ref_system`: The reference system for the interpolation. -- `sol`: The solution state from which the properties are interpolated. - -# Keywords -- `endpoint=true`: A boolean to include (`true`) or exclude (`false`) the end point in the interpolation. -- `smoothing_length=ref_system.smoothing_length`: The smoothing length used in the interpolation. -- `cut_off_bnd=true`: Boolean to indicate if quantities should be set to `NaN` when the point - is "closer" to the boundary than to the fluid in a kernel-weighted sense. - Or, in more detail, when the boundary has more influence than the fluid - on the density summation in this point, i.e., when the boundary particles - add more kernel-weighted mass than the fluid particles. -- `clip_negative_pressure=false`: One common approach in SPH models is to clip negative pressure - values, but this is unphysical. Instead we clip here during - interpolation thus only impacting the local interpolated value. - -# Returns -- A `NamedTuple` of arrays containing interpolated properties at each point along the line. - -!!! note - - This function is particularly useful for analyzing gradients or creating visualizations - along a specified line in the SPH simulation domain. - - The interpolation accuracy is subject to the density of particles and the chosen smoothing length. - - With `cut_off_bnd`, a density-based estimation of the surface is used which is not as - accurate as a real surface reconstruction. - -# Examples -```jldoctest; output = false, filter = r"density = .*", setup = :(trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), tspan=(0.0, 0.01), callbacks=nothing); ref_system = fluid_system) -# Interpolating along a line from [1.0, 0.0] to [1.0, 1.0] with 5 points -results = interpolate_line([1.0, 0.0], [1.0, 1.0], 5, semi, ref_system, sol) - -# output -(density = ...) -``` -""" -function interpolate_line(start, end_, n_points, semi, ref_system, sol::ODESolution; - endpoint=true, smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - v_ode, u_ode = sol.u[end].x - - interpolate_line(start, end_, n_points, semi, ref_system, v_ode, u_ode; - endpoint, smoothing_length, cut_off_bnd, clip_negative_pressure) -end -function interpolate_line(start, end_, n_points, semi, ref_system, v_ode, u_ode; - endpoint=true, smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - start_svector = SVector{ndims(ref_system)}(start) - end_svector = SVector{ndims(ref_system)}(end_) - points_coords = range(start_svector, end_svector, length=n_points) - - if !endpoint - points_coords = points_coords[2:(end - 1)] - end - - return interpolate_point(points_coords, semi, ref_system, v_ode, u_ode; - smoothing_length=smoothing_length, - cut_off_bnd=cut_off_bnd, clip_negative_pressure) -end - -@doc raw""" - interpolate_point(points_coords::Array{Array{Float64,1},1}, semi, ref_system, sol; - smoothing_length=ref_system.smoothing_length, cut_off_bnd=true, - clip_negative_pressure=false) - - interpolate_point(point_coords, semi, ref_system, sol; - smoothing_length=ref_system.smoothing_length, cut_off_bnd=true, - clip_negative_pressure=false) - -Performs interpolation of properties at specified points or an array of points in a TrixiParticles simulation. - -When given an array of points (`points_coords`), it iterates over each point and applies interpolation individually. -For a single point (`point_coords`), it performs the interpolation at that specific location. -The interpolation utilizes the same kernel function of the SPH simulation to weigh contributions from nearby particles. - -See also: [`interpolate_line`](@ref), [`interpolate_plane_2d`](@ref), - [`interpolate_plane_2d_vtk`](@ref), [`interpolate_plane_3d`](@ref), . - -# Arguments -- `points_coords`: An array of point coordinates, for which to interpolate properties. -- `point_coords`: The coordinates of a single point for interpolation. -- `semi`: The semidiscretization used in the SPH simulation. -- `ref_system`: The reference system defining the properties of the SPH particles. -- `sol`: The current solution state from which properties are interpolated. - -# Keywords -- `smoothing_length=ref_system.smoothing_length`: The smoothing length used in the interpolation. -- `cut_off_bnd=true`: Boolean to indicate if quantities should be set to `NaN` when the point - is "closer" to the boundary than to the fluid in a kernel-weighted sense. - Or, in more detail, when the boundary has more influence than the fluid - on the density summation in this point, i.e., when the boundary particles - add more kernel-weighted mass than the fluid particles. -- `clip_negative_pressure=false`: One common approach in SPH models is to clip negative pressure - values, but this is unphysical. Instead we clip here during - interpolation thus only impacting the local interpolated value. - -# Returns -- For multiple points: A `NamedTuple` of arrays containing interpolated properties at each point. -- For a single point: A `NamedTuple` of interpolated properties at the point. - -# Examples -```jldoctest; output = false, filter = r"density = .*", setup = :(trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), tspan=(0.0, 0.01), callbacks=nothing); ref_system = fluid_system) -# For a single point -result = interpolate_point([1.0, 0.5], semi, ref_system, sol) - -# For multiple points -points = [[1.0, 0.5], [1.0, 0.6], [1.0, 0.7]] -results = interpolate_point(points, semi, ref_system, sol) - -# output -(density = ...) -``` -!!! note - - This function is particularly useful for analyzing gradients or creating visualizations - along a specified line in the SPH simulation domain. - - The interpolation accuracy is subject to the density of particles and the chosen smoothing length. - - With `cut_off_bnd`, a density-based estimation of the surface is used which is not as - accurate as a real surface reconstruction. -""" -@inline function interpolate_point(point_coords, semi, ref_system, sol::ODESolution; - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - v_ode, u_ode = sol.u[end].x - - interpolate_point(point_coords, semi, ref_system, v_ode, u_ode; - smoothing_length, cut_off_bnd, clip_negative_pressure) -end - -@inline function interpolate_point(points_coords::AbstractArray{<:AbstractArray}, semi, - ref_system, v_ode, u_ode; - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - num_points = length(points_coords) - coords = similar(points_coords) - velocities = similar(points_coords) - densities = Vector{Float64}(undef, num_points) - pressures = Vector{Float64}(undef, num_points) - neighbor_counts = Vector{Int}(undef, num_points) - - neighborhood_searches = process_neighborhood_searches(semi, u_ode, ref_system, - smoothing_length) - - for (i, point) in enumerate(points_coords) - result = interpolate_point(SVector{ndims(ref_system)}(point), semi, ref_system, - v_ode, u_ode, neighborhood_searches; - smoothing_length, cut_off_bnd, clip_negative_pressure) - densities[i] = result.density - neighbor_counts[i] = result.neighbor_count - coords[i] = result.coord - velocities[i] = result.velocity - pressures[i] = result.pressure - end - - return (density=densities, neighbor_count=neighbor_counts, coord=coords, - velocity=velocities, pressure=pressures) -end - -function interpolate_point(point_coords, semi, ref_system, v_ode, u_ode; - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - neighborhood_searches = process_neighborhood_searches(semi, u_ode, ref_system, - smoothing_length) - - return interpolate_point(SVector{ndims(ref_system)}(point_coords), semi, ref_system, - v_ode, u_ode, neighborhood_searches; - smoothing_length, cut_off_bnd, clip_negative_pressure) -end - -function process_neighborhood_searches(semi, u_ode, ref_system, smoothing_length) - if isapprox(smoothing_length, ref_system.smoothing_length) - # Update existing NHS - update_nhs!(semi, u_ode) - neighborhood_searches = semi.neighborhood_searches[system_indices(ref_system, semi)] - else - ref_smoothing_kernel = ref_system.smoothing_kernel - search_radius = compact_support(ref_smoothing_kernel, smoothing_length) - neighborhood_searches = map(semi.systems) do system - u = wrap_u(u_ode, system, semi) - system_coords = current_coordinates(u, system) - old_nhs = get_neighborhood_search(ref_system, system, semi) - nhs = PointNeighbors.copy_neighborhood_search(old_nhs, search_radius, - system_coords, system_coords) - return nhs - end - end - - return neighborhood_searches -end - -@inline function interpolate_point(point_coords, semi, ref_system, v_ode, u_ode, - neighborhood_searches; - smoothing_length=ref_system.smoothing_length, - cut_off_bnd=true, clip_negative_pressure=false) - interpolated_density = 0.0 - interpolated_velocity = zero(SVector{ndims(ref_system)}) - interpolated_pressure = 0.0 - - shepard_coefficient = 0.0 - ref_id = system_indices(ref_system, semi) - neighbor_count = 0 - other_density = 0.0 - ref_smoothing_kernel = ref_system.smoothing_kernel - - if cut_off_bnd - systems = semi - else - # Don't loop over other systems - systems = (ref_system,) - end - - foreach_system(systems) do system - system_id = system_indices(system, semi) - nhs = neighborhood_searches[system_id] - (; search_radius, periodic_box) = nhs - - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) - - system_coords = current_coordinates(u, system) - - # This is basically `for_particle_neighbor` unrolled - for particle in PointNeighbors.eachneighbor(point_coords, nhs) - coords = extract_svector(system_coords, Val(ndims(system)), particle) - - pos_diff = point_coords - coords - distance2 = dot(pos_diff, pos_diff) - pos_diff, distance2 = PointNeighbors.compute_periodic_distance(pos_diff, - distance2, - search_radius, - periodic_box) - if distance2 > search_radius^2 - continue - end - - distance = sqrt(distance2) - mass = hydrodynamic_mass(system, particle) - kernel_value = kernel(ref_smoothing_kernel, distance, smoothing_length) - m_W = mass * kernel_value - - if system_id == ref_id - interpolated_density += m_W - - volume = mass / particle_density(v, system, particle) - particle_velocity = current_velocity(v, system, particle) - interpolated_velocity += particle_velocity * (volume * kernel_value) - - pressure = particle_pressure(v, system, particle) - if clip_negative_pressure - pressure = max(0.0, pressure) - end - - interpolated_pressure += pressure * (volume * kernel_value) - shepard_coefficient += volume * kernel_value - else - other_density += m_W - end - - neighbor_count += 1 - end - end - - # Point is not within the ref_system - if other_density > interpolated_density || shepard_coefficient < eps() - # Return NaN values that can be filtered out in ParaView - return (density=NaN, neighbor_count=0, coord=point_coords, - velocity=fill(NaN, SVector{ndims(ref_system)}), pressure=NaN) - end - - return (density=interpolated_density / shepard_coefficient, - neighbor_count=neighbor_count, - coord=point_coords, velocity=interpolated_velocity / shepard_coefficient, - pressure=interpolated_pressure / shepard_coefficient) -end diff --git a/src/general/neighborhood_search.jl b/src/general/neighborhood_search.jl index afcd2c9b3..7c595b01f 100644 --- a/src/general/neighborhood_search.jl +++ b/src/general/neighborhood_search.jl @@ -1,22 +1,299 @@ +struct TrivialNeighborhoodSearch{E} + eachparticle::E + + function TrivialNeighborhoodSearch(eachparticle) + new{typeof(eachparticle)}(eachparticle) + end +end + +@inline initialize!(search::TrivialNeighborhoodSearch, coords_fun) = search +@inline update!(search::TrivialNeighborhoodSearch, coords_fun) = search +@inline eachneighbor(coords, search::TrivialNeighborhoodSearch) = search.eachparticle + +@doc raw""" + SpatialHashingSearch{NDIMS}(search_radius, n_particles) + +Simple grid-based neighborhood search with uniform search radius ``d``, +inspired by (Ihmsen et al. 2011, Section 4.4). + +The domain is divided into cells of uniform size ``d`` in each dimension. +Only particles in neighboring cells are then considered as neighbors of a particle. +Instead of representing a finite domain by an array of cells (basic uniform grid), +a potentially infinite domain is represented by saving cells in a hash table, +indexed by the cell index tuple +```math +\left( \left\lfloor \frac{x}{d} \right\rfloor, \left\lfloor \frac{y}{d} \right\rfloor \right) \quad \text{or} \quad +\left( \left\lfloor \frac{x}{d} \right\rfloor, \left\lfloor \frac{y}{d} \right\rfloor, \left\lfloor \frac{z}{d} \right\rfloor \right), +``` +where ``x, y, z`` are the space coordinates. + +As opposed to (Ihmsen et al. 2011), we do not handle the hashing explicitly and use +Julia's `Dict` data structure instead. +We also do not sort the particles in any way, since that makes our implementation +a lot faster (although not parallelizable). + +## References: +- Markus Ihmsen, Nadir Akinci, Markus Becker, Matthias Teschner. + "A Parallel SPH Implementation on Multi-Core CPUs". + In: Computer Graphics Forum 30.1 (2011), pages 99–112. + [doi: 10.1111/J.1467-8659.2010.01832.X](https://doi.org/10.1111/J.1467-8659.2010.01832.X) +""" +struct SpatialHashingSearch{NDIMS, ELTYPE} + hashtable :: Dict{NTuple{NDIMS, Int}, Vector{Int}} + search_radius :: ELTYPE + empty_vector :: Vector{Int} # Just an empty vector (used in `eachneighbor`) + cell_buffer :: Array{NTuple{NDIMS, Int}, 2} # Multithreaded buffer for `update!` + cell_buffer_indices :: Vector{Int} # Store which entries of `cell_buffer` are initialized + + function SpatialHashingSearch{NDIMS}(search_radius, n_particles) where {NDIMS} + hashtable = Dict{NTuple{NDIMS, Int}, Vector{Int}}() + empty_vector = Vector{Int}() + cell_buffer = Array{NTuple{NDIMS, Int}, 2}(undef, n_particles, Threads.nthreads()) + cell_buffer_indices = zeros(Int, Threads.nthreads()) + + new{NDIMS, typeof(search_radius)}(hashtable, search_radius, empty_vector, + cell_buffer, cell_buffer_indices) + end +end + +@inline function nparticles(neighborhood_search::SpatialHashingSearch) + return size(neighborhood_search.cell_buffer, 1) +end + +function initialize!(neighborhood_search::SpatialHashingSearch, ::Nothing) + # No particle coordinates function -> don't initialize. + return neighborhood_search +end + +function initialize!(neighborhood_search::SpatialHashingSearch{NDIMS}, + x::AbstractArray) where {NDIMS} + initialize!(neighborhood_search, i -> extract_svector(x, Val(NDIMS), i)) +end + +function initialize!(neighborhood_search::SpatialHashingSearch, coords_fun) + @unpack hashtable, search_radius = neighborhood_search + + empty!(hashtable) + + # This is needed to prevent lagging on macOS ARM. + # See https://github.com/JuliaSIMD/Polyester.jl/issues/89 + ThreadingUtilities.sleep_all_tasks() + + for particle in 1:nparticles(neighborhood_search) + # Get cell index of the particle's cell + cell = cell_coords(coords_fun(particle), neighborhood_search) + + # Add particle to corresponding cell or create cell if it does not exist + if haskey(hashtable, cell) + append!(hashtable[cell], particle) + else + hashtable[cell] = [particle] + end + end + + return neighborhood_search +end + +function update!(neighborhood_search::SpatialHashingSearch, ::Nothing) + # No particle coordinates function -> don't update. + return neighborhood_search +end + +function update!(neighborhood_search::SpatialHashingSearch{NDIMS}, + x::AbstractArray) where {NDIMS} + update!(neighborhood_search, i -> extract_svector(x, Val(NDIMS), i)) +end + +# Modify the existing hash table by moving particles into their new cells +function update!(neighborhood_search::SpatialHashingSearch, coords_fun) + @unpack hashtable, search_radius, cell_buffer, cell_buffer_indices = neighborhood_search + + @inline function cell_coords_(particle) + cell_coords(coords_fun(particle), neighborhood_search) + end + + # Reset `cell_buffer` by moving all pointers to the beginning. + cell_buffer_indices .= 0 + + # Find all cells containing particles that now belong to another cell. + # `collect` the keyset to be able to loop over it with `@threaded`. + @threaded for cell in collect(keys(hashtable)) + mark_changed_cell!(neighborhood_search, cell, coords_fun) + end + + # This is needed to prevent lagging on macOS ARM. + # See https://github.com/JuliaSIMD/Polyester.jl/issues/89 + ThreadingUtilities.sleep_all_tasks() + + # Iterate over all marked cells and move the particles into their new cells. + for thread in 1:Threads.nthreads() + # Only the entries `1:cell_buffer_indices[thread]` are initialized for `thread`. + for i in 1:cell_buffer_indices[thread] + cell = cell_buffer[i, thread] + particles = hashtable[cell] + + # Find all particles whose coordinates do not match this cell + moved_particle_indices = (i for i in eachindex(particles) + if cell_coords_(particles[i]) != cell) + + # Add moved particles to new cell + for i in moved_particle_indices + particle = particles[i] + new_cell_coords = cell_coords_(particle) + + # Add particle to corresponding cell or create cell if it does not exist + if haskey(hashtable, new_cell_coords) + append!(hashtable[new_cell_coords], particle) + else + hashtable[new_cell_coords] = [particle] + end + end + + # Remove moved particles from this cell or delete the cell if it is now empty + if count(_ -> true, moved_particle_indices) == length(particles) + delete!(hashtable, cell) + else + deleteat!(particles, moved_particle_indices) + end + end + end + + return neighborhood_search +end + +# Use this function barrier and unpack inside to avoid passing closures to Polyester.jl +# with @batch (@threaded). +# Otherwise, @threaded does not work here with Julia ARM on macOS. +# See https://github.com/JuliaSIMD/Polyester.jl/issues/88. +@inline function mark_changed_cell!(neighborhood_search, cell, coords_fun) + @unpack hashtable, cell_buffer, cell_buffer_indices = neighborhood_search + + for particle in hashtable[cell] + if cell_coords(coords_fun(particle), neighborhood_search) != cell + # Mark this cell and continue with the next one. + # + # `cell_buffer` is preallocated, + # but only the entries 1:i are used for this thread. + i = cell_buffer_indices[Threads.threadid()] += 1 + cell_buffer[i, Threads.threadid()] = cell + break + end + end +end + +@inline function eachneighbor(coords, neighborhood_search::SpatialHashingSearch{2}) + cell = cell_coords(coords, neighborhood_search) + x, y = cell + # Generator of all neighboring cells to consider + neighboring_cells = ((x + i, y + j) for i in -1:1, j in -1:1) + + # Merge all lists of particles in the neighboring cells into one iterator + Iterators.flatten(particles_in_cell(cell, neighborhood_search) + for cell in neighboring_cells) +end + +@inline function eachneighbor(coords, neighborhood_search::SpatialHashingSearch{3}) + cell = cell_coords(coords, neighborhood_search) + x, y, z = cell + # Generator of all neighboring cells to consider + neighboring_cells = ((x + i, y + j, z + k) for i in -1:1, j in -1:1, k in -1:1) + + # Merge all lists of particles in the neighboring cells into one iterator + Iterators.flatten(particles_in_cell(cell, neighborhood_search) + for cell in neighboring_cells) +end + # Loop over all pairs of particles and neighbors within the kernel cutoff. # `f(particle, neighbor, pos_diff, distance)` is called for every particle-neighbor pair. # By default, loop over `each_moving_particle(system)`. -function PointNeighbors.for_particle_neighbor(f, system, neighbor_system, - system_coords, neighbor_coords, - neighborhood_search; - particles=each_moving_particle(system), - parallel=true) - for_particle_neighbor(f, system_coords, neighbor_coords, neighborhood_search, - particles=particles, parallel=parallel) -end - -function PointNeighbors.for_particle_neighbor(f, system::GPUSystem, neighbor_system, - system_coords, neighbor_coords, - neighborhood_search; - particles=each_moving_particle(system), - parallel=true) - @threaded system for particle in particles - PointNeighbors.foreach_neighbor(f, system_coords, neighbor_coords, - neighborhood_search, particle) +@inline function for_particle_neighbor(f, system, neighbor_system, + system_coords, neighbor_coords, neighborhood_search; + particles=each_moving_particle(system)) + @threaded for particle in particles + for_particle_neighbor_inner(f, system, neighbor_system, + system_coords, neighbor_coords, neighborhood_search, + particle) end + + return nothing +end + +# Use this function barrier and unpack inside to avoid passing closures to Polyester.jl +# with @batch (@threaded). +# Otherwise, @threaded does not work here with Julia ARM on macOS. +# See https://github.com/JuliaSIMD/Polyester.jl/issues/88. +@inline function for_particle_neighbor_inner(f, system, neighbor_system, + system_coords, neighbor_system_coords, + neighborhood_search, particle) + particle_coords = extract_svector(system_coords, system, particle) + for neighbor in eachneighbor(particle_coords, neighborhood_search) + neighbor_coords = extract_svector(neighbor_system_coords, neighbor_system, + neighbor) + + pos_diff = particle_coords - neighbor_coords + distance2 = dot(pos_diff, pos_diff) + + if distance2 <= compact_support(system, neighbor_system)^2 + distance = sqrt(distance2) + + # Inline to avoid loss of performance + # compared to not using `for_particle_neighbor`. + @inline f(particle, neighbor, pos_diff, distance) + end + end +end + +@inline function particles_in_cell(cell_index, neighborhood_search) + @unpack hashtable, empty_vector = neighborhood_search + + # Return an empty vector when `cell_index` is not a key of `hastable` and + # reuse the empty vector to avoid allocations + return get(hashtable, cell_index, empty_vector) +end + +@inline function cell_coords(coords, neighborhood_search) + @unpack search_radius = neighborhood_search + + return Tuple(floor_to_int.(coords / search_radius)) +end + +# When particles end up with coordinates so big that the cell coordinates +# exceed the range of Int, then `floor(Int, i)` will fail with an InexactError. +# In this case, we can just use typemax(Int), since we can assume that particles +# that far away will not interact with anything, anyway. +# This usually indicates an instability, but we don't want the simulation to crash, +# since adaptive time integration methods may detect the instability and reject the +# time step. +# If we threw an error here, we would prevent the time integration method from +# retrying with a smaller time step, and we would thus crash perfectly fine simulations. +@inline function floor_to_int(i) + if isnan(i) || i > typemax(Int) + return typemax(Int) + elseif i < typemin(Int) + return typemin(Int) + end + + return floor(Int, i) +end + +# Sorting only really makes sense in longer simulations where particles +# end up very unordered +function z_index_sort!(coordinates, system) + @unpack mass, pressure, neighborhood_search = system + + perm = sortperm(eachparticle(system), + by=(i -> cell_z_index(extract_svector(coordinates, system, i), + neighborhood_search))) + + permute!(mass, perm) + permute!(pressure, perm) + Base.permutecols!!(u, perm) + + return nothing +end + +@inline function cell_z_index(coords, neighborhood_search) + cell = cell_coords(coords, neighborhood_search) .+ 1 + + return cartesian2morton(SVector(cell)) end diff --git a/src/general/semidiscretization.jl b/src/general/semidiscretization.jl index 7f6c791db..9473ba198 100644 --- a/src/general/semidiscretization.jl +++ b/src/general/semidiscretization.jl @@ -1,98 +1,47 @@ """ - Semidiscretization(systems...; neighborhood_search=GridNeighborhoodSearch, - periodic_box_min_corner=nothing, periodic_box_max_corner=nothing, - threaded_nhs_update=true) + Semidiscretization(systems...; neighborhood_search=nothing, damping_coefficient=nothing) The semidiscretization couples the passed systems to one simulation. The type of neighborhood search to be used in the simulation can be specified with the keyword argument `neighborhood_search`. A value of `nothing` means no neighborhood search. -# Arguments -- `systems`: Systems to be coupled in this semidiscretization - -# Keywords -- `neighborhood_search`: The type of neighborhood search to be used in the simulation. - By default, the `GridNeighborhoodSearch` is used. - Use `TrivialNeighborhoodSearch` or `nothing` to loop - over all particles (no neighborhood search). -- `periodic_box_min_corner`: In order to use a (rectangular) periodic domain, pass the - coordinates of the domain corner in negative coordinate - directions. -- `periodic_box_max_corner`: In order to use a (rectangular) periodic domain, pass the - coordinates of the domain corner in positive coordinate - directions. -- `threaded_nhs_update=true`: Can be used to deactivate thread parallelization in the neighborhood search update. - This can be one of the largest sources of variations between simulations - with different thread numbers due to particle ordering changes. - # Examples -```jldoctest; output = false, setup = :(trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol=nothing); ref_system = fluid_system) -semi = Semidiscretization(fluid_system, boundary_system) - -semi = Semidiscretization(fluid_system, boundary_system, - neighborhood_search=TrivialNeighborhoodSearch) - -# output -┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ -│ Semidiscretization │ -│ ══════════════════ │ -│ #spatial dimensions: ………………………… 2 │ -│ #systems: ……………………………………………………… 2 │ -│ neighborhood search: ………………………… TrivialNeighborhoodSearch │ -│ total #particles: ………………………………… 636 │ -└──────────────────────────────────────────────────────────────────────────────────────────────────┘ +```julia +semi = Semidiscretization(fluid_system, boundary_system; neighborhood_search=SpatialHashingSearch, damping_coefficient=nothing) ``` """ -struct Semidiscretization{S, RU, RV, NS} +struct Semidiscretization{S, RU, RV, NS, DC} systems :: S ranges_u :: RU ranges_v :: RV neighborhood_searches :: NS - - # Dispatch at `systems` to distinguish this constructor from the one below when - # 4 systems are passed. - # This is an internal constructor only used in `test/count_allocations.jl`. - function Semidiscretization(systems::Tuple, ranges_u, ranges_v, neighborhood_searches) - new{typeof(systems), typeof(ranges_u), - typeof(ranges_v), typeof(neighborhood_searches)}(systems, ranges_u, ranges_v, - neighborhood_searches) + damping_coefficient :: DC + + function Semidiscretization(systems...; neighborhood_search=nothing, + damping_coefficient=nothing) + sizes_u = [u_nvariables(system) * n_moving_particles(system) + for system in systems] + ranges_u = Tuple((sum(sizes_u[1:(i - 1)]) + 1):sum(sizes_u[1:i]) + for i in eachindex(sizes_u)) + sizes_v = [v_nvariables(system) * n_moving_particles(system) + for system in systems] + ranges_v = Tuple((sum(sizes_v[1:(i - 1)]) + 1):sum(sizes_v[1:i]) + for i in eachindex(sizes_v)) + + # Create (and initialize) a tuple of n neighborhood searches for each of the n systems + # We will need one neighborhood search for each pair of systems. + searches = Tuple(Tuple(create_neighborhood_search(system, neighbor, + Val(neighborhood_search)) + for neighbor in systems) + for system in systems) + + new{typeof(systems), typeof(ranges_u), typeof(ranges_v), + typeof(searches), typeof(damping_coefficient)}(systems, ranges_u, ranges_v, + searches, damping_coefficient) end end -GPUSemidiscretization = Semidiscretization{<:NTuple{<:Any, GPUSystem}} - -function Semidiscretization(systems...; neighborhood_search=GridNeighborhoodSearch, - periodic_box_min_corner=nothing, - periodic_box_max_corner=nothing, threaded_nhs_update=true) - systems = filter(system -> !isnothing(system), systems) - - # Check e.g. that the boundary systems are using a state equation if EDAC is not used. - # Other checks might be added here later. - check_configuration(systems) - - sizes_u = [u_nvariables(system) * n_moving_particles(system) - for system in systems] - ranges_u = Tuple((sum(sizes_u[1:(i - 1)]) + 1):sum(sizes_u[1:i]) - for i in eachindex(sizes_u)) - sizes_v = [v_nvariables(system) * n_moving_particles(system) - for system in systems] - ranges_v = Tuple((sum(sizes_v[1:(i - 1)]) + 1):sum(sizes_v[1:i]) - for i in eachindex(sizes_v)) - - # Create (and initialize) a tuple of n neighborhood searches for each of the n systems - # We will need one neighborhood search for each pair of systems. - searches = Tuple(Tuple(create_neighborhood_search(system, neighbor, - Val(neighborhood_search), - periodic_box_min_corner, - periodic_box_max_corner, - threaded_nhs_update) - for neighbor in systems) - for system in systems) - - return Semidiscretization(systems, ranges_u, ranges_v, searches) -end - # Inline show function e.g. Semidiscretization(neighborhood_search=...) function Base.show(io::IO, semi::Semidiscretization) @nospecialize semi # reduce precompilation time @@ -118,65 +67,28 @@ function Base.show(io::IO, ::MIME"text/plain", semi::Semidiscretization) summary_line(io, "#systems", length(semi.systems)) summary_line(io, "neighborhood search", semi.neighborhood_searches |> eltype |> eltype |> nameof) + summary_line(io, "damping coefficient", semi.damping_coefficient) summary_line(io, "total #particles", sum(nparticles.(semi.systems))) summary_footer(io) end end -function create_neighborhood_search(system, neighbor, - ::Union{Val{nothing}, Val{TrivialNeighborhoodSearch}}, - periodic_box_min_corner, periodic_box_max_corner, - threaded_nhs_update) - radius = compact_support(system, neighbor) - TrivialNeighborhoodSearch{ndims(system)}(radius, eachparticle(neighbor), - periodic_box_min_corner=periodic_box_min_corner, - periodic_box_max_corner=periodic_box_max_corner) +function create_neighborhood_search(_, neighbor, ::Val{nothing}) + TrivialNeighborhoodSearch(eachparticle(neighbor)) end -function create_neighborhood_search(system, neighbor, ::Val{GridNeighborhoodSearch}, - periodic_box_min_corner, periodic_box_max_corner, - threaded_nhs_update) +function create_neighborhood_search(system, neighbor, ::Val{SpatialHashingSearch}) radius = compact_support(system, neighbor) - search = GridNeighborhoodSearch{ndims(system)}(radius, nparticles(neighbor), - periodic_box_min_corner=periodic_box_min_corner, - periodic_box_max_corner=periodic_box_max_corner, - threaded_nhs_update=threaded_nhs_update) + search = SpatialHashingSearch{ndims(system)}(radius, nparticles(neighbor)) + # Initialize neighborhood search - PointNeighbors.initialize!(search, initial_coordinates(system), - initial_coordinates(neighbor)) + initialize!(search, nhs_init_function(system, neighbor)) return search end @inline function compact_support(system, neighbor) - (; smoothing_kernel, smoothing_length) = system - return compact_support(smoothing_kernel, smoothing_length) -end - -@inline function compact_support(system::OpenBoundarySPHSystem, neighbor) - # Use the compact support of the fluid - return compact_support(neighbor, system) -end - -@inline function compact_support(system::OpenBoundarySPHSystem, - neighbor::OpenBoundarySPHSystem) - # This NHS is never used - return 0.0 -end - -@inline function compact_support(system::BoundaryDEMSystem, neighbor::BoundaryDEMSystem) - # This NHS is never used - return 0.0 -end - -@inline function compact_support(system::BoundaryDEMSystem, neighbor::DEMSystem) - # Use the compact support of the DEMSystem - return compact_support(neighbor, system) -end - -@inline function compact_support(system::TotalLagrangianSPHSystem, - neighbor::TotalLagrangianSPHSystem) - (; smoothing_kernel, smoothing_length) = system + @unpack smoothing_kernel, smoothing_length = system return compact_support(smoothing_kernel, smoothing_length) end @@ -185,151 +97,81 @@ end return compact_support(system, system.boundary_model, neighbor) end -@inline function compact_support(system, model::BoundaryModelMonaghanKajtar, neighbor) - # Use the compact support of the fluid for solid-fluid interaction - return compact_support(neighbor, system) +@inline function compact_support(system::TotalLagrangianSPHSystem, + neighbor::TotalLagrangianSPHSystem) + @unpack smoothing_kernel, smoothing_length = system + return compact_support(smoothing_kernel, smoothing_length) end -@inline function compact_support(system, model::BoundaryModelMonaghanKajtar, - neighbor::BoundarySPHSystem) - # This NHS is never used +@inline function compact_support(system, model, neighbor) + # This NHS is never used. return 0.0 end @inline function compact_support(system, model::BoundaryModelDummyParticles, neighbor) - # TODO: Monaghan-Kajtar BC are using the fluid's compact support for solid-fluid - # interaction. Dummy particle BC use the model's compact support, which is also used - # for density summations. - (; smoothing_kernel, smoothing_length) = model + @unpack smoothing_kernel, smoothing_length = model return compact_support(smoothing_kernel, smoothing_length) end -@inline function get_neighborhood_search(system, semi) - (; neighborhood_searches) = semi - - system_index = system_indices(system, semi) - - return neighborhood_searches[system_index][system_index] +function nhs_init_function(system, neighbor) + return i -> initial_coords(neighbor, i) end -@inline function get_neighborhood_search(system, neighbor_system, semi) - (; neighborhood_searches) = semi - - system_index = system_indices(system, semi) - neighbor_index = system_indices(neighbor_system, semi) - - return neighborhood_searches[system_index][neighbor_index] +function nhs_init_function(system::TotalLagrangianSPHSystem, + neighbor::TotalLagrangianSPHSystem) + return i -> initial_coords(neighbor, i) end -@inline function system_indices(system, semi) - # Note that this takes only about 5 ns, while mapping systems to indices with a `Dict` - # is ~30x slower because `hash(::System)` is very slow. - index = findfirst(==(system), semi.systems) - - if isnothing(index) - throw(ArgumentError("system is not in the semidiscretization")) - end +function nhs_init_function(system::Union{TotalLagrangianSPHSystem, BoundarySPHSystem}, + neighbor) + return nhs_init_function(system, system.boundary_model, neighbor) +end - return index +function nhs_init_function(system, model::BoundaryModelDummyParticles, neighbor) + return i -> initial_coords(neighbor, i) end -# This is just for readability to loop over all systems without allocations -@inline foreach_system(f, semi::Union{NamedTuple, Semidiscretization}) = foreach_noalloc(f, - semi.systems) -@inline foreach_system(f, systems) = foreach_noalloc(f, systems) +function nhs_init_function(system, model, neighbor) + # This NHS is never used. Don't initialize NHS. + return nothing +end """ - semidiscretize(semi, tspan; reset_threads=true) + semidiscretize(semi, tspan) Create an `ODEProblem` from the semidiscretization with the specified `tspan`. - -# Arguments -- `semi`: A [`Semidiscretization`](@ref) holding the systems involved in the simulation. -- `tspan`: The time span over which the simulation will be run. - -# Keywords -- `reset_threads`: A boolean flag to reset Polyester.jl threads before the simulation (default: `true`). - After an error within a threaded loop, threading might be disabled. Resetting the threads before the simulation - ensures that threading is enabled again for the simulation. - See also [trixi-framework/Trixi.jl#1583](https://github.com/trixi-framework/Trixi.jl/issues/1583). - -# Returns -A `DynamicalODEProblem` (see [the OrdinaryDiffEq.jl docs](https://docs.sciml.ai/DiffEqDocs/stable/types/dynamical_types/)) -to be integrated with [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl). -Note that this is not a true `DynamicalODEProblem` where the acceleration does not depend on the velocity. -Therefore, not all integrators designed for `DynamicalODEProblems` will work properly. -However, all integrators designed for `ODEProblems` can be used. - -# Examples -```jldoctest; output = false, filter = r"u0: .*", setup = :(trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), sol=nothing); ref_system = fluid_system) -semi = Semidiscretization(fluid_system, boundary_system) -tspan = (0.0, 1.0) -ode_problem = semidiscretize(semi, tspan) - -# output -ODEProblem with uType RecursiveArrayTools.ArrayPartition{Float64, Tuple{Vector{Float64}, Vector{Float64}}} and tType Float64. In-place: true -timespan: (0.0, 1.0) -u0: ([...], [...]) *this line is ignored by filter* -``` """ -function semidiscretize(semi, tspan; reset_threads=true, data_type=nothing) - (; systems) = semi +function semidiscretize(semi, tspan) + @unpack systems, neighborhood_searches = semi - @assert all(system -> eltype(system) === eltype(systems[1]), systems) + @assert all(system -> eltype(system) === eltype(systems[1]), + systems) ELTYPE = eltype(systems[1]) - # Optionally reset Polyester.jl threads. See - # https://github.com/trixi-framework/Trixi.jl/issues/1583 - # https://github.com/JuliaSIMD/Polyester.jl/issues/30 - if reset_threads - Polyester.reset_threads!() - end - # Initialize all particle systems - @trixi_timeit timer() "initialize particle systems" begin - foreach_system(semi) do system - # Get the neighborhood search for this system - neighborhood_search = get_neighborhood_search(system, semi) + @trixi_timeit timer() "initialize particle systems" begin for (system_index, system) in pairs(systems) + # Get the neighborhood search for this system + neighborhood_search = neighborhood_searches[system_index][system_index] - # Initialize this system - initialize!(system, neighborhood_search) + # Initialize this system + initialize!(system, neighborhood_search) + end end - # Only for systems requiring a mandatory callback - reset_callback_flag!(system) - end - end + sizes_u = (u_nvariables(system) * n_moving_particles(system) + for system in systems) + sizes_v = (v_nvariables(system) * n_moving_particles(system) + for system in systems) + u0_ode = Vector{ELTYPE}(undef, sum(sizes_u)) + v0_ode = Vector{ELTYPE}(undef, sum(sizes_v)) - sizes_u = (u_nvariables(system) * n_moving_particles(system) for system in systems) - sizes_v = (v_nvariables(system) * n_moving_particles(system) for system in systems) - - if isnothing(data_type) - # Use CPU vectors and the optimized CPU code - u0_ode = Vector{ELTYPE}(undef, sum(sizes_u)) - v0_ode = Vector{ELTYPE}(undef, sum(sizes_v)) - else - # Use the specified data type, e.g., `CuArray` or `ROCArray` - u0_ode = data_type{ELTYPE}(undef, sum(sizes_u)) - v0_ode = data_type{ELTYPE}(undef, sum(sizes_v)) - end - - # Set initial condition - foreach_system(semi) do system - u0_system = wrap_u(u0_ode, system, semi) - v0_system = wrap_v(v0_ode, system, semi) + for (system_index, system) in pairs(systems) + u0_system = wrap_u(u0_ode, system_index, system, semi) + v0_system = wrap_v(v0_ode, system_index, system, semi) write_u0!(u0_system, system) write_v0!(v0_system, system) end - if !isnothing(data_type) - # Convert all arrays to the correct array type. When e.g. `data_type=CuArray`, - # this will convert all `Array`s to `CuArray`s, moving data to the GPU. - # See the comments in general/gpu.jl for more details. - semi_adapted = Adapt.adapt(data_type, semi) - - return DynamicalODEProblem(kick!, drift!, v0_ode, u0_ode, tspan, semi_adapted) - end - return DynamicalODEProblem(kick!, drift!, v0_ode, u0_ode, tspan, semi) end @@ -345,22 +187,14 @@ in the solution `sol`. - `semi`: The semidiscretization - `sol`: The `ODESolution` returned by `solve` of `OrdinaryDiffEq` """ -function restart_with!(semi, sol; reset_threads=true) - # Optionally reset Polyester.jl threads. See - # https://github.com/trixi-framework/Trixi.jl/issues/1583 - # https://github.com/JuliaSIMD/Polyester.jl/issues/30 - if reset_threads - Polyester.reset_threads!() - end +function restart_with!(semi, sol) + @unpack systems = semi - foreach_system(semi) do system - v = wrap_v(sol.u[end].x[1], system, semi) - u = wrap_u(sol.u[end].x[2], system, semi) + foreach_enumerate(systems) do (system_index, system) + v = wrap_v(sol[end].x[1], system_index, system, semi) + u = wrap_u(sol[end].x[2], system_index, system, semi) restart_with!(system, v, u) - - # Only for systems requiring a mandatory callback - reset_callback_flag!(system) end return semi @@ -368,65 +202,54 @@ end # We have to pass `system` here for type stability, # since the type of `system` determines the return type. -@inline function wrap_v(v_ode, system, semi) - (; ranges_v) = semi - - range = ranges_v[system_indices(system, semi)] - - @boundscheck @assert length(range) == v_nvariables(system) * n_moving_particles(system) - - return wrap_array(v_ode, range, - (StaticInt(v_nvariables(system)), n_moving_particles(system))) -end - -@inline function wrap_u(u_ode, system, semi) - (; ranges_u) = semi - - range = ranges_u[system_indices(system, semi)] +@inline function wrap_u(u_ode, i, system, semi) + @unpack systems, ranges_u = semi - @boundscheck @assert length(range) == u_nvariables(system) * n_moving_particles(system) + range = ranges_u[i] - return wrap_array(u_ode, range, - (StaticInt(u_nvariables(system)), n_moving_particles(system))) -end + @boundscheck begin + @assert length(range) == + u_nvariables(system) * n_moving_particles(system) + end -@inline function wrap_array(array::Array, range, size) # This is a non-allocating version of: - # return unsafe_wrap(Array{eltype(array), 2}, pointer(view(array, range)), size) - return PtrArray(pointer(view(array, range)), size) + # return unsafe_wrap(Array{eltype(u_ode), 2}, pointer(view(u_ode, range)), + # (u_nvariables(system), n_moving_particles(system))) + return PtrArray(pointer(view(u_ode, range)), + (StaticInt(u_nvariables(system)), n_moving_particles(system))) end -@inline function wrap_array(array, range, size) - # For non-`Array`s (typically GPU arrays), just reshape. Calling the `PtrArray` code - # above for a `CuArray` yields another `CuArray` (instead of a `PtrArray`) - # and is 8 times slower with double the allocations. - # - # Note that `size` might contain `StaticInt`s, so convert to `Int` first. - return reshape(view(array, range), Int.(size)) -end +@inline function wrap_v(v_ode, i, system, semi) + @unpack systems, ranges_v = semi + + range = ranges_v[i] -function calculate_dt(v_ode, u_ode, cfl_number, semi::Semidiscretization) - (; systems) = semi + @boundscheck begin + @assert length(range) == + v_nvariables(system) * n_moving_particles(system) + end - return minimum(system -> calculate_dt(v_ode, u_ode, cfl_number, system), systems) + return PtrArray(pointer(view(v_ode, range)), + (StaticInt(v_nvariables(system)), n_moving_particles(system))) end function drift!(du_ode, v_ode, u_ode, semi, t) + @unpack systems = semi + @trixi_timeit timer() "drift!" begin @trixi_timeit timer() "reset ∂u/∂t" set_zero!(du_ode) @trixi_timeit timer() "velocity" begin - # Set velocity and add acceleration for each system - foreach_system(semi) do system - du = wrap_u(du_ode, system, semi) - v = wrap_v(v_ode, system, semi) - - @threaded system for particle in each_moving_particle(system) - # This can be dispatched per system - add_velocity!(du, v, particle, system) - end + # Set velocity and add acceleration for each system + foreach_enumerate(systems) do (system_index, system) + du = wrap_u(du_ode, system_index, system, semi) + v = wrap_v(v_ode, system_index, system, semi) + + @threaded for particle in each_moving_particle(system) + # This can be dispatched per system + add_velocity!(du, v, particle, system) end - end + end end end return du_ode @@ -443,100 +266,99 @@ end @inline add_velocity!(du, v, particle, system::BoundarySPHSystem) = du function kick!(dv_ode, v_ode, u_ode, semi, t) + @unpack systems, neighborhood_searches = semi + @trixi_timeit timer() "kick!" begin @trixi_timeit timer() "reset ∂v/∂t" set_zero!(dv_ode) @trixi_timeit timer() "update systems and nhs" update_systems_and_nhs(v_ode, u_ode, semi, t) + @trixi_timeit timer() "gravity and damping" gravity_and_damping!(dv_ode, v_ode, + semi) + @trixi_timeit timer() "system interaction" system_interaction!(dv_ode, v_ode, u_ode, semi) - - @trixi_timeit timer() "source terms" add_source_terms!(dv_ode, v_ode, u_ode, semi) end return dv_ode end -# Update the systems and neighborhood searches (NHS) for a simulation before calling `interact!` to compute forces -function update_systems_and_nhs(v_ode, u_ode, semi, t; update_from_callback=false) +@inline function set_zero!(du) + du .= zero(eltype(du)) + + return du +end + +function update_systems_and_nhs(v_ode, u_ode, semi, t) + @unpack systems = semi + # First update step before updating the NHS # (for example for writing the current coordinates in the solid system) - foreach_system(semi) do system - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) + foreach_enumerate(systems) do (system_index, system) + v = wrap_v(v_ode, system_index, system, semi) + u = wrap_u(u_ode, system_index, system, semi) - update_positions!(system, v, u, v_ode, u_ode, semi, t) + update1!(system, system_index, v, u, v_ode, u_ode, semi, t) end # Update NHS - @trixi_timeit timer() "update nhs" update_nhs!(semi, u_ode) + @trixi_timeit timer() "update nhs" update_nhs(u_ode, semi) # Second update step. # This is used to calculate density and pressure of the fluid systems # before updating the boundary systems, # since the fluid pressure is needed by the Adami interpolation. - foreach_system(semi) do system - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) + foreach_enumerate(systems) do (system_index, system) + v = wrap_v(v_ode, system_index, system, semi) + u = wrap_u(u_ode, system_index, system, semi) - update_quantities!(system, v, u, v_ode, u_ode, semi, t) - end - - # Perform correction and pressure calculation - foreach_system(semi) do system - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) - - update_pressure!(system, v, u, v_ode, u_ode, semi, t) + update2!(system, system_index, v, u, v_ode, u_ode, semi, t) end # Final update step for all remaining systems - foreach_system(semi) do system - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) + foreach_enumerate(systems) do (system_index, system) + v = wrap_v(v_ode, system_index, system, semi) + u = wrap_u(u_ode, system_index, system, semi) - update_final!(system, v, u, v_ode, u_ode, semi, t; update_from_callback) + update3!(system, system_index, v, u, v_ode, u_ode, semi, t) end end -function update_nhs!(semi, u_ode) - # Update NHS for each pair of systems - foreach_system(semi) do system - u_system = wrap_u(u_ode, system, semi) +function update_nhs(u_ode, semi) + @unpack systems, neighborhood_searches = semi - foreach_system(semi) do neighbor - u_neighbor = wrap_u(u_ode, neighbor, semi) - neighborhood_search = get_neighborhood_search(system, neighbor, semi) + # Update NHS for each pair of systems + foreach_enumerate(systems) do (system_index, system) + foreach_enumerate(systems) do (neighbor_index, neighbor) + u_neighbor = wrap_u(u_ode, neighbor_index, neighbor, semi) + neighborhood_search = neighborhood_searches[system_index][neighbor_index] - update_nhs!(neighborhood_search, system, neighbor, u_system, u_neighbor) + update!(neighborhood_search, nhs_coords(system, neighbor, u_neighbor)) end end end -function add_source_terms!(dv_ode, v_ode, u_ode, semi) - foreach_system(semi) do system - dv = wrap_v(dv_ode, system, semi) - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) +function gravity_and_damping!(dv_ode, v_ode, semi) + @unpack systems, damping_coefficient = semi - @threaded system for particle in each_moving_particle(system) - # Dispatch by system type to exclude boundary systems + # Set velocity and add acceleration for each system + foreach_enumerate(systems) do (system_index, system) + dv = wrap_v(dv_ode, system_index, system, semi) + v = wrap_v(v_ode, system_index, system, semi) + + @threaded for particle in each_moving_particle(system) + # This can be dispatched per system add_acceleration!(dv, particle, system) - add_source_terms_inner!(dv, v, u, particle, system, source_terms(system)) + add_damping_force!(dv, damping_coefficient, v, particle, system) end end return dv_ode end -@inline source_terms(system) = nothing -@inline source_terms(system::Union{FluidSystem, SolidSystem}) = system.source_terms - -@inline add_acceleration!(dv, particle, system) = dv - -@inline function add_acceleration!(dv, particle, system::Union{FluidSystem, SolidSystem}) - (; acceleration) = system +@inline function add_acceleration!(dv, particle, system) + @unpack acceleration = system for i in 1:ndims(system) dv[i, particle] += acceleration[i] @@ -545,284 +367,142 @@ end return dv end -@inline function add_source_terms_inner!(dv, v, u, particle, system, source_terms_) - coords = current_coords(u, system, particle) - velocity = current_velocity(v, system, particle) - density = particle_density(v, system, particle) - pressure = particle_pressure(v, system, particle) - - source = source_terms_(coords, velocity, density, pressure) +@inline add_acceleration!(dv, particle, system::BoundarySPHSystem) = dv - # Loop over `eachindex(source)`, so that users could also pass source terms for - # the density when using `ContinuityDensity`. - for i in eachindex(source) - dv[i, particle] += source[i] +@inline function add_damping_force!(dv, damping_coefficient::Float64, v, particle, system) + for i in 1:ndims(system) + dv[i, particle] -= damping_coefficient * v[i, particle] end return dv end -@inline add_source_terms_inner!(dv, v, u, particle, system, source_terms_::Nothing) = dv +@inline add_damping_force!(dv, ::Nothing, v, particle, system) = dv -@doc raw""" - SourceTermDamping(; damping_coefficient) +function system_interaction!(dv_ode, v_ode, u_ode, semi) + @unpack systems, neighborhood_searches = semi -A source term to be used when a damping step is required before running a full simulation. -The term ``-c \cdot v_a`` is added to the acceleration ``\frac{\mathrm{d}v_a}{\mathrm{d}t}`` -of particle ``a``, where ``c`` is the damping coefficient and ``v_a`` is the velocity of -particle ``a``. + # Call `interact!` for each pair of systems + foreach_enumerate(systems) do (system_index, system) + dv = wrap_v(dv_ode, system_index, system, semi) + v_system = wrap_v(v_ode, system_index, system, semi) + u_system = wrap_u(u_ode, system_index, system, semi) + + foreach_enumerate(systems) do (neighbor_index, neighbor) + v_neighbor = wrap_v(v_ode, neighbor_index, neighbor, semi) + u_neighbor = wrap_u(u_ode, neighbor_index, neighbor, semi) + neighborhood_search = neighborhood_searches[system_index][neighbor_index] + + interact!(dv, v_system, u_system, v_neighbor, u_neighbor, + neighborhood_search, system, neighbor) + end + end -# Keywords -- `damping_coefficient`: The coefficient ``d`` above. A higher coefficient means more - damping. A coefficient of `1e-4` is a good starting point for - damping a fluid at rest. + return dv_ode +end -# Examples -```jldoctest; output = false -source_terms = SourceTermDamping(; damping_coefficient=1e-4) +##### Updates -# output -SourceTermDamping{Float64}(0.0001) -``` -""" -struct SourceTermDamping{ELTYPE} - damping_coefficient::ELTYPE +# System update orders, see comments in update_systems_and_nhs! +function update1!(system, system_index, v, u, v_ode, u_ode, semi, t) + return system +end - function SourceTermDamping(; damping_coefficient) - return new{typeof(damping_coefficient)}(damping_coefficient) - end +function update1!(system::TotalLagrangianSPHSystem, system_index, v, u, v_ode, u_ode, + semi, t) + # Only update solid systems + update!(system, system_index, v, u, v_ode, u_ode, semi, t) end -@inline function (source_term::SourceTermDamping)(coords, velocity, density, pressure) - (; damping_coefficient) = source_term +function update2!(system, system_index, v, u, v_ode, u_ode, semi, t) + return system +end - return -damping_coefficient * velocity +function update2!(system::WeaklyCompressibleSPHSystem, system_index, v, u, v_ode, u_ode, + semi, t) + # Only update fluid systems + update!(system, system_index, v, u, v_ode, u_ode, semi, t) end -function system_interaction!(dv_ode, v_ode, u_ode, semi) - # Call `interact!` for each pair of systems - foreach_system(semi) do system - foreach_system(semi) do neighbor - # Construct string for the interactions timer. - # Avoid allocations from string construction when no timers are used. - if timeit_debug_enabled() - system_index = system_indices(system, semi) - neighbor_index = system_indices(neighbor, semi) - timer_str = "$(timer_name(system))$system_index-$(timer_name(neighbor))$neighbor_index" - else - timer_str = "" - end +function update3!(system, system_index, v, u, v_ode, u_ode, semi, t) + # Update all other systems + update!(system, system_index, v, u, v_ode, u_ode, semi, t) +end - interact!(dv_ode, v_ode, u_ode, system, neighbor, semi, timer_str=timer_str) - end - end +function update3!(system::TotalLagrangianSPHSystem, system_index, v, u, v_ode, u_ode, + semi, t) + @unpack boundary_model = system - return dv_ode + # Only update boundary model + update!(boundary_model, system, system_index, v, u, v_ode, u_ode, semi) end -# Function barrier to make benchmarking interactions easier. -# One can benchmark, e.g. the fluid-fluid interaction, with: -# dv_ode, du_ode = copy(sol.u[end]).x; v_ode, u_ode = copy(sol.u[end]).x; -# @btime TrixiParticles.interact!($dv_ode, $v_ode, $u_ode, $fluid_system, $fluid_system, $semi); -@inline function interact!(dv_ode, v_ode, u_ode, system, neighbor, semi; timer_str="") - dv = wrap_v(dv_ode, system, semi) - v_system = wrap_v(v_ode, system, semi) - u_system = wrap_u(u_ode, system, semi) +function update3!(system::WeaklyCompressibleSPHSystem, system_index, v, u, v_ode, u_ode, + semi, t) + return system +end - v_neighbor = wrap_v(v_ode, neighbor, semi) - u_neighbor = wrap_u(u_ode, neighbor, semi) - nhs = get_neighborhood_search(system, neighbor, semi) +# NHS updates +function nhs_coords(system::WeaklyCompressibleSPHSystem, + neighbor::WeaklyCompressibleSPHSystem, u) + return current_coordinates(u, neighbor) +end - @trixi_timeit timer() timer_str begin - interact!(dv, v_system, u_system, v_neighbor, u_neighbor, nhs, system, neighbor) - end +function nhs_coords(system::WeaklyCompressibleSPHSystem, + neighbor::TotalLagrangianSPHSystem, u) + return current_coordinates(u, neighbor) end -# NHS updates -# To prevent hard-to-find bugs, there is not default version -function update_nhs!(neighborhood_search, - system::FluidSystem, - neighbor::Union{FluidSystem, TotalLagrangianSPHSystem}, - u_system, u_neighbor) - # The current coordinates of fluids and solids change over time - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(true, true)) -end - -function update_nhs!(neighborhood_search, - system::FluidSystem, neighbor::BoundarySPHSystem, - u_system, u_neighbor) - # Boundary coordinates only change over time when `neighbor.ismoving[]` - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(true, neighbor.ismoving[])) -end - -function update_nhs!(neighborhood_search, - system::FluidSystem, neighbor::OpenBoundarySPHSystem, - u_system, u_neighbor) - # The current coordinates of fluids and open boundaries change over time. - - # TODO: Update only `active_coordinates` of open boundaries. - # Problem: Removing inactive particles from neighboring lists is necessary. - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(true, true)) -end - -function update_nhs!(neighborhood_search, - system::OpenBoundarySPHSystem, neighbor::FluidSystem, - u_system, u_neighbor) - # The current coordinates of both open boundaries and fluids change over time. - - # TODO: Update only `active_coordinates` of open boundaries. - # Problem: Removing inactive particles from neighboring lists is necessary. - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(true, true)) -end - -function update_nhs!(neighborhood_search, - system::TotalLagrangianSPHSystem, neighbor::FluidSystem, - u_system, u_neighbor) - # The current coordinates of fluids and solids change over time - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(true, true)) -end - -function update_nhs!(neighborhood_search, - system::TotalLagrangianSPHSystem, neighbor::TotalLagrangianSPHSystem, - u_system, u_neighbor) - # Don't update. Neighborhood search works on the initial coordinates, which don't change. - return neighborhood_search -end - -function update_nhs!(neighborhood_search, - system::TotalLagrangianSPHSystem, neighbor::BoundarySPHSystem, - u_system, u_neighbor) - # The current coordinates of solids change over time. - # Boundary coordinates only change over time when `neighbor.ismoving[]`. - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(true, neighbor.ismoving[])) -end - -function update_nhs!(neighborhood_search, - system::BoundarySPHSystem, - neighbor::Union{FluidSystem, TotalLagrangianSPHSystem, - BoundarySPHSystem}, - u_system, u_neighbor) - # Don't update. This NHS is never used. - return neighborhood_search -end - -function update_nhs!(neighborhood_search, - system::BoundarySPHSystem{<:BoundaryModelDummyParticles}, - neighbor::Union{FluidSystem, TotalLagrangianSPHSystem}, - u_system, u_neighbor) - # Depending on the density calculator of the boundary model, this NHS is used for - # - kernel summation (`SummationDensity`) - # - continuity equation (`ContinuityDensity`) - # - pressure extrapolation (`AdamiPressureExtrapolation`) - # - # Boundary coordinates only change over time when `neighbor.ismoving[]`. - # The current coordinates of fluids and solids change over time. - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(system.ismoving[], true)) -end - -function update_nhs!(neighborhood_search, - system::BoundarySPHSystem{<:BoundaryModelDummyParticles}, - neighbor::BoundarySPHSystem, - u_system, u_neighbor) - # `system` coordinates only change over time when `system.ismoving[]`. - # `neighbor` coordinates only change over time when `neighbor.ismoving[]`. - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(system.ismoving[], neighbor.ismoving[])) -end - -function update_nhs!(neighborhood_search, - system::DEMSystem, neighbor::DEMSystem, - u_system, u_neighbor) - # Both coordinates change over time - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(true, true)) -end - -function update_nhs!(neighborhood_search, - system::DEMSystem, neighbor::BoundaryDEMSystem, - u_system, u_neighbor) - # DEM coordinates change over time, the boundary coordinates don't - PointNeighbors.update!(neighborhood_search, - current_coordinates(u_system, system), - current_coordinates(u_neighbor, neighbor), - particles_moving=(true, false)) -end - -function update_nhs!(neighborhood_search, - system::BoundaryDEMSystem, - neighbor::Union{DEMSystem, BoundaryDEMSystem}, - u_system, u_neighbor) - # Don't update. This NHS is never used. - return neighborhood_search -end - -function update_nhs!(neighborhood_search, - system::Union{BoundarySPHSystem, OpenBoundarySPHSystem}, - neighbor::Union{BoundarySPHSystem, OpenBoundarySPHSystem}, - u_system, u_neighbor) - # Don't update. This NHS is never used. - return neighborhood_search -end - -function check_configuration(systems) - foreach_system(systems) do system - check_configuration(system, systems) +function nhs_coords(system::WeaklyCompressibleSPHSystem, + neighbor::BoundarySPHSystem, u) + if neighbor.ismoving[1] + return current_coordinates(u, neighbor) end + + # Don't update + return nothing end -check_configuration(system, systems) = nothing +function nhs_coords(system::TotalLagrangianSPHSystem, + neighbor::WeaklyCompressibleSPHSystem, u) + return current_coordinates(u, neighbor) +end -function check_configuration(boundary_system::BoundarySPHSystem, systems) - (; boundary_model) = boundary_system +function nhs_coords(system::TotalLagrangianSPHSystem, + neighbor::TotalLagrangianSPHSystem, u) + # Don't update + return nothing +end - foreach_system(systems) do neighbor - if neighbor isa WeaklyCompressibleSPHSystem && - boundary_model isa BoundaryModelDummyParticles && - isnothing(boundary_model.state_equation) - throw(ArgumentError("`WeaklyCompressibleSPHSystem` cannot be used without " * - "setting a `state_equation` for all boundary models")) - end +function nhs_coords(system::TotalLagrangianSPHSystem, + neighbor::BoundarySPHSystem, u) + if neighbor.ismoving[1] + return current_coordinates(u, neighbor) end + + # Don't update + return nothing end -function check_configuration(system::TotalLagrangianSPHSystem, systems) - (; boundary_model) = system +function nhs_coords(system::BoundarySPHSystem, + neighbor::WeaklyCompressibleSPHSystem, u) + # Don't update + return nothing +end - foreach_system(systems) do neighbor - if neighbor isa FluidSystem && boundary_model === nothing - throw(ArgumentError("a boundary model for `TotalLagrangianSPHSystem` must be " * - "specified when simulating a fluid-structure interaction.")) - end - end +function nhs_coords(system::BoundarySPHSystem{<:BoundaryModelDummyParticles}, + neighbor::WeaklyCompressibleSPHSystem, u) + return current_coordinates(u, neighbor) +end - if boundary_model isa BoundaryModelDummyParticles && - boundary_model.density_calculator isa ContinuityDensity - throw(ArgumentError("`BoundaryModelDummyParticles` with density calculator " * - "`ContinuityDensity` is not yet supported for a `TotalLagrangianSPHSystem`")) - end +function nhs_coords(system::BoundarySPHSystem, + neighbor::TotalLagrangianSPHSystem, u) + # Don't update + return nothing +end + +function nhs_coords(system::BoundarySPHSystem, + neighbor::BoundarySPHSystem, u) + # Don't update + return nothing end diff --git a/src/general/smoothing_kernels.jl b/src/general/smoothing_kernels.jl index fe9665aca..b0c335375 100644 --- a/src/general/smoothing_kernels.jl +++ b/src/general/smoothing_kernels.jl @@ -1,111 +1,16 @@ abstract type SmoothingKernel{NDIMS} end - @inline Base.ndims(::SmoothingKernel{NDIMS}) where {NDIMS} = NDIMS @inline function kernel_grad(kernel, pos_diff, distance, h) - distance < sqrt(eps()) && return zero(pos_diff) - - return kernel_deriv(kernel, distance, h) / distance * pos_diff -end - -@inline function corrected_kernel_grad(kernel, pos_diff, distance, h, correction, system, - particle) - return kernel_grad(kernel, pos_diff, distance, h) -end - -@inline function corrected_kernel_grad(kernel_, pos_diff, distance, h, ::KernelCorrection, - system, particle) - return (kernel_grad(kernel_, pos_diff, distance, h) .- - kernel(kernel_, distance, h) * dw_gamma(system, particle)) / - kernel_correction_coefficient(system, particle) -end - -@inline function corrected_kernel_grad(kernel, pos_diff, distance, h, - corr::BlendedGradientCorrection, system, - particle) - (; blending_factor) = corr - - grad = kernel_grad(kernel, pos_diff, distance, h) - return (1 - blending_factor) * grad + - blending_factor * correction_matrix(system, particle) * grad -end - -@inline function corrected_kernel_grad(kernel, pos_diff, distance, h, - ::GradientCorrection, system, particle) - grad = kernel_grad(kernel, pos_diff, distance, h) - return correction_matrix(system, particle) * grad -end - -@inline function corrected_kernel_grad(kernel, pos_diff, distance, h, - ::MixedKernelGradientCorrection, system, - particle) - grad = corrected_kernel_grad(kernel, pos_diff, distance, h, KernelCorrection(), - system, particle) - return correction_matrix(system, particle) * grad + return kernel_deriv(kernel, distance, h) * pos_diff / distance end -@doc raw""" - GaussianKernel{NDIMS}() - -Gaussian kernel given by -```math -W(r, h) = \frac{\sigma_d}{h^d} e^{-r^2/h^2} -``` - -where ``d`` is the number of dimensions and - -- `` \sigma_2 = \frac{1}{\pi} `` for 2D, -- `` \sigma_3 = \frac{1}{\pi^{3/2}} `` for 3D. - -This kernel function has an infinite support, but in practice, -it's often truncated at a certain multiple of ``h``, such as ``3h``. - -In this implementation, the kernel is truncated at ``3h``, -so this kernel function has a compact support of ``[0, 3h]``. - -The smoothing length is typically in the range ``[1.0\delta, 1.5\delta]``, -where ``\delta`` is the typical particle spacing. - -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). - -Note: -This truncation makes this Kernel not conservative, -which is beneficial in regards to stability but makes it less accurate. -""" -struct GaussianKernel{NDIMS} <: SmoothingKernel{NDIMS} end - -@inline @fastmath function kernel(kernel::GaussianKernel, r::Real, h) - q = r / h - - # Zero out result if q >= 3 - result = ifelse(q < 3, normalization_factor(kernel, h) * exp(-q^2), zero(q)) - - return result -end - -@inline @fastmath function kernel_deriv(kernel::GaussianKernel, r::Real, h) - inner_deriv = 1 / h - q = r * inner_deriv - - # Zero out result if q >= 3 - result = ifelse(q < 3, - -2 * q * normalization_factor(kernel, h) * exp(-q^2) * inner_deriv, - zero(q)) - - return result -end - -@inline compact_support(::GaussianKernel, h) = 3 * h - -@inline normalization_factor(::GaussianKernel{2}, h) = 1 / (pi * h^2) -@inline normalization_factor(::GaussianKernel{3}, h) = 1 / (pi^(3 / 2) * h^3) - @doc raw""" SchoenbergCubicSplineKernel{NDIMS}() Cubic spline kernel by Schoenberg (Schoenberg, 1946), given by ```math - W(r, h) = \frac{1}{h^d} w(r/h) +W(r, h) = \frac{1}{h^d} w(r/h) ``` with ```math @@ -115,23 +20,31 @@ w(q) = \sigma \begin{cases} 0 & \text{if } q \geq 2, \\ \end{cases} ``` -where ``d`` is the number of dimensions and ``\sigma`` is a normalization constant given by -$\sigma =[\frac{2}{3}, \frac{10}{7 \pi}, \frac{1}{\pi}]$ in $[1, 2, 3]$ dimensions. +where ``d`` is the number of dimensions and ``\sigma = 17/(7\pi)`` +in two dimensions or ``\sigma = 1/\pi`` in three dimensions is a normalization factor. This kernel function has a compact support of ``[0, 2h]``. -For an overview of Schoenberg cubic, quartic and quintic spline kernels including -normalization factors, see (Price, 2012). -For an analytic formula for higher order Schoenberg kernels, see (Monaghan, 1985). -The largest disadvantage of Schoenberg Spline Kernel is the rather non-smooth first derivative, -which can lead to increased noise compared to other kernel variants. - -The smoothing length is typically in the range ``[1.1\delta, 1.3\delta]``, -where ``\delta`` is the typical particle spacing. - -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). - -## References +For an overview of Schoenberg cubic, quartic and quintic spline kernels +including normalization factors, see (Price, 2012). +For an analytic formula for higher order kernels, see (Monaghan, 1985). + +!!! note "Usage" + The kernel can be called as `TrixiParticles.kernel(::SchoenbergCubicSplineKernel, r, h)`. + The length of the compact support can be obtained as + `TrixiParticles.compact_support(::SchoenbergCubicSplineKernel, h)`. + + Note that ``r`` has to be a scalar, so in the context of SPH, the kernel + should be used as ``W(\Vert r_a - r_b \Vert, h)``. + The gradient required in SPH, + ```math + \frac{\partial}{\partial r_a} W(\Vert r_a - r_b \Vert, h) + ``` + can be called as + `TrixiParticles.kernel_grad(kernel, pos_diff, distance, h)`, + where `pos_diff` is $r_a - r_b$ and `distance` is $\Vert r_a - r_b \Vert$. + +## References: - Daniel J. Price. "Smoothed particle hydrodynamics and magnetohydrodynamics". In: Journal of Computational Physics 231.3 (2012), pages 759-794. [doi: 10.1016/j.jcp.2010.12.011](https://doi.org/10.1016/j.jcp.2010.12.011) @@ -145,37 +58,41 @@ For general information and usage see [Smoothing Kernels](@ref smoothing_kernel) """ struct SchoenbergCubicSplineKernel{NDIMS} <: SmoothingKernel{NDIMS} end -@muladd @inline function kernel(kernel::SchoenbergCubicSplineKernel, r::Real, h) +function kernel(kernel::SchoenbergCubicSplineKernel, r::Real, h) q = r / h - # We do not use `+=` or `-=` since these are not recognized by MuladdMacro.jl + if q >= 2 + return 0.0 + end + result = 1 / 4 * (2 - q)^3 - result = result - (q < 1) * (1 - q)^3 - # Zero out result if q >= 2 - result = ifelse(q < 2, normalization_factor(kernel, h) * result, zero(result)) + if q < 1 + result -= (1 - q)^3 + end - return result + return normalization_factor(kernel, h) * result end -@muladd @inline function kernel_deriv(kernel::SchoenbergCubicSplineKernel, r::Real, h) +function kernel_deriv(kernel::SchoenbergCubicSplineKernel, r::Real, h) inner_deriv = 1 / h q = r * inner_deriv - # We do not use `+=` or `-=` since these are not recognized by MuladdMacro.jl + if q >= 2 + return 0.0 + end + result = -3 / 4 * (2 - q)^2 - result = result + 3 * (q < 1) * (1 - q)^2 - # Zero out result if q >= 2 - result = ifelse(q < 2, normalization_factor(kernel, h) * result * inner_deriv, - zero(result)) + if q < 1 + result += 3 * (1 - q)^2 + end - return result + return normalization_factor(kernel, h) * result * inner_deriv end @inline compact_support(::SchoenbergCubicSplineKernel, h) = 2 * h -@inline normalization_factor(::SchoenbergCubicSplineKernel{1}, h) = 2 / 3h @inline normalization_factor(::SchoenbergCubicSplineKernel{2}, h) = 10 / (7 * pi * h^2) @inline normalization_factor(::SchoenbergCubicSplineKernel{3}, h) = 1 / (pi * h^3) @@ -184,7 +101,7 @@ end Quartic spline kernel by Schoenberg (Schoenberg, 1946), given by ```math - W(r, h) = \frac{1}{h^d} w(r/h) +W(r, h) = \frac{1}{h^d} w(r/h) ``` with ```math @@ -197,24 +114,31 @@ w(q) = \sigma \begin{cases} 0 & \text{if } q \geq \frac{5}{2}, \end{cases} ``` -where ``d`` is the number of dimensions and ``\sigma`` is a normalization constant given by -$\sigma =[\frac{1}{24}, \frac{96}{1199 \pi}, \frac{1}{20\pi}]$ in $[1, 2, 3]$ dimensions. +where ``d`` is the number of dimensions and ``\sigma = 96/(1199\pi)`` +in two dimensions or ``\sigma = 1/(20\pi)`` in three dimensions is a normalization factor. This kernel function has a compact support of ``[0, 2.5h]``. -For an overview of Schoenberg cubic, quartic and quintic spline kernels including -normalization factors, see (Price, 2012). -For an analytic formula for higher order Schoenberg kernels, see (Monaghan, 1985). - -The largest disadvantage of Schoenberg Spline Kernel are the rather non-smooth first derivative, -which can lead to increased noise compared to other kernel variants. - -The smoothing length is typically in the range ``[1.1\delta, 1.5\delta]``, -where ``\delta`` is the typical particle spacing. - -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). - -## References +For an overview of Schoenberg cubic, quartic and quintic spline kernels +including normalization factors, see (Price, 2012). +For an analytic formula for higher order kernels, see (Monaghan, 1985). + +!!! note "Usage" + The kernel can be called as `TrixiParticles.kernel(::SchoenbergQuarticSplineKernel, r, h)`. + The length of the compact support can be obtained as + `TrixiParticles.compact_support(::SchoenbergQuarticSplineKernel, h)`. + + Note that ``r`` has to be a scalar, so in the context of SPH, the kernel + should be used as ``W(\Vert r_a - r_b \Vert, h)``. + The gradient required in SPH, + ```math + \frac{\partial}{\partial r_a} W(\Vert r_a - r_b \Vert, h) + ``` + can be called as + `TrixiParticles.kernel_grad(kernel, pos_diff, distance, h)`, + where `pos_diff` is $r_a - r_b$ and `distance` is $\Vert r_a - r_b \Vert$. + +## References: - Daniel J. Price. "Smoothed particle hydrodynamics and magnetohydrodynamics". In: Journal of Computational Physics 231.3 (2012), pages 759-794. [doi: 10.1016/j.jcp.2010.12.011](https://doi.org/10.1016/j.jcp.2010.12.011) @@ -228,53 +152,49 @@ For general information and usage see [Smoothing Kernels](@ref smoothing_kernel) """ struct SchoenbergQuarticSplineKernel{NDIMS} <: SmoothingKernel{NDIMS} end -# Note that `floating_point_number^integer_literal` is lowered to `Base.literal_pow`. -# Currently, specializations reducing this to simple multiplications exist only up -# to a power of three, see -# https://github.com/JuliaLang/julia/blob/34934736fa4dcb30697ac1b23d11d5ad394d6a4d/base/intfuncs.jl#L327-L339 -# By using the `@fastpow` macro, we are consciously trading off some precision in the result -# for enhanced computational speed. This is especially useful in scenarios where performance -# is a higher priority than exact precision. -@fastpow @muladd @inline function kernel(kernel::SchoenbergQuarticSplineKernel, r::Real, h) +function kernel(kernel::SchoenbergQuarticSplineKernel, r::Real, h) q = r / h - q5_2 = (5 / 2 - q) - q3_2 = (3 / 2 - q) - q1_2 = (1 / 2 - q) - # We do not use `+=` or `-=` since these are not recognized by MuladdMacro.jl - result = q5_2^4 - result = result - 5 * (q < 3 / 2) * q3_2^4 - result = result + 10 * (q < 1 / 2) * q1_2^4 + if q >= 5 / 2 + return 0.0 + end + + result = (5 / 2 - q)^4 + + if q < 3 / 2 + result -= 5 * (3 / 2 - q)^4 - # Zero out result if q >= 5/2 - result = ifelse(q < 5 / 2, normalization_factor(kernel, h) * result, zero(result)) + if q < 1 / 2 + result += 10 * (1 / 2 - q)^4 + end + end - return result + return normalization_factor(kernel, h) * result end -@fastpow @muladd @inline function kernel_deriv(kernel::SchoenbergQuarticSplineKernel, - r::Real, h) +function kernel_deriv(kernel::SchoenbergQuarticSplineKernel, r::Real, h) inner_deriv = 1 / h q = r * inner_deriv - q5_2 = 5 / 2 - q - q3_2 = 3 / 2 - q - q1_2 = 1 / 2 - q - # We do not use `+=` or `-=` since these are not recognized by MuladdMacro.jl - result = -4 * q5_2^3 - result = result + 20 * (q < 3 / 2) * q3_2^3 - result = result - 40 * (q < 1 / 2) * q1_2^3 + if q >= 5 / 2 + return 0.0 + end - # Zero out result if q >= 5/2 - result = ifelse(q < 5 / 2, normalization_factor(kernel, h) * result * inner_deriv, - zero(result)) + result = -4 * (5 / 2 - q)^3 - return result + if q < 3 / 2 + result += 20 * (3 / 2 - q)^3 + + if q < 1 / 2 + result -= 40 * (1 / 2 - q)^3 + end + end + + return normalization_factor(kernel, h) * result * inner_deriv end @inline compact_support(::SchoenbergQuarticSplineKernel, h) = 2.5 * h -@inline normalization_factor(::SchoenbergQuarticSplineKernel{1}, h) = 1 / 24h @inline normalization_factor(::SchoenbergQuarticSplineKernel{2}, h) = 96 / (1199 * pi * h^2) @inline normalization_factor(::SchoenbergQuarticSplineKernel{3}, h) = 1 / (20 * pi * h^3) @@ -283,7 +203,7 @@ end Quintic spline kernel by Schoenberg (Schoenberg, 1946), given by ```math - W(r, h) = \frac{1}{h^d} w(r/h) +W(r, h) = \frac{1}{h^d} w(r/h) ``` with ```math @@ -294,24 +214,31 @@ w(q) = \sigma \begin{cases} 0 & \text{if } q \geq 3, \end{cases} ``` -where ``d`` is the number of dimensions and ``\sigma`` is a normalization constant given by -$\sigma =[\frac{1}{120}, \frac{7}{478 \pi}, \frac{1}{120\pi}]$ in $[1, 2, 3]$ dimensions. +where ``d`` is the number of dimensions and ``\sigma = 7/(478\pi)`` +in two dimensions or ``\sigma = 1/(120\pi)`` in three dimensions is a normalization factor. This kernel function has a compact support of ``[0, 3h]``. -For an overview of Schoenberg cubic, quartic and quintic spline kernels including -normalization factors, see (Price, 2012). -For an analytic formula for higher order Schoenberg kernels, see (Monaghan, 1985). - -The largest disadvantage of Schoenberg Spline Kernel are the rather non-smooth first derivative, -which can lead to increased noise compared to other kernel variants. - -The smoothing length is typically in the range ``[1.1\delta, 1.5\delta]``, -where ``\delta`` is the typical particle spacing. - -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). - -## References +For an overview of Schoenberg cubic, quartic and quintic spline kernels +including normalization factors, see (Price, 2012). +For an analytic formula for higher order kernels, see (Monaghan, 1985). + +!!! note "Usage" + The kernel can be called as `TrixiParticles.kernel(::SchoenbergQuinticSplineKernel, r, h)`. + The length of the compact support can be obtained as + `TrixiParticles.compact_support(::SchoenbergQuinticSplineKernel, h)`. + + Note that ``r`` has to be a scalar, so in the context of SPH, the kernel + should be used as ``W(\Vert r_a - r_b \Vert, h)``. + The gradient required in SPH, + ```math + \frac{\partial}{\partial r_a} W(\Vert r_a - r_b \Vert, h) + ``` + can be called as + `TrixiParticles.kernel_grad(kernel, pos_diff, distance, h)`, + where `pos_diff` is $r_a - r_b$ and `distance` is $\Vert r_a - r_b \Vert$. + +## References: - Daniel J. Price. "Smoothed particle hydrodynamics and magnetohydrodynamics". In: Journal of Computational Physics 231.3 (2012), pages 759-794. [doi: 10.1016/j.jcp.2010.12.011](https://doi.org/10.1016/j.jcp.2010.12.011) @@ -325,406 +252,48 @@ For general information and usage see [Smoothing Kernels](@ref smoothing_kernel) """ struct SchoenbergQuinticSplineKernel{NDIMS} <: SmoothingKernel{NDIMS} end -@fastpow @muladd @inline function kernel(kernel::SchoenbergQuinticSplineKernel, r::Real, h) +function kernel(kernel::SchoenbergQuinticSplineKernel, r::Real, h) q = r / h - q3 = (3 - q) - q2 = (2 - q) - q1 = (1 - q) - # We do not use `+=` or `-=` since these are not recognized by MuladdMacro.jl - result = q3^5 - result = result - 6 * (q < 2) * q2^5 - result = result + 15 * (q < 1) * q1^5 + if q >= 3 + return 0.0 + end - # Zero out result if q >= 3 - result = ifelse(q < 3, normalization_factor(kernel, h) * result, zero(result)) + result = (3 - q)^5 - return result -end - -@fastpow @muladd @inline function kernel_deriv(kernel::SchoenbergQuinticSplineKernel, - r::Real, h) - inner_deriv = 1 / h - q = r * inner_deriv - q3 = (3 - q) - q2 = (2 - q) - q1 = (1 - q) + if q < 2 + result -= 6 * (2 - q)^5 - # We do not use `+=` or `-=` since these are not recognized by MuladdMacro.jl - result = -5 * q3^4 - result = result + 30 * (q < 2) * q2^4 - result = result - 75 * (q < 1) * q1^4 + if q < 1 + result += 15 * (1 - q)^5 + end + end - # Zero out result if q >= 3 - result = ifelse(q < 3, normalization_factor(kernel, h) * result * inner_deriv, - zero(result)) - - return result + return normalization_factor(kernel, h) * result end -@inline compact_support(::SchoenbergQuinticSplineKernel, h) = 3 * h - -@inline normalization_factor(::SchoenbergQuinticSplineKernel{1}, h) = 1 / 120h -@inline normalization_factor(::SchoenbergQuinticSplineKernel{2}, h) = 7 / (478 * pi * h^2) -@inline normalization_factor(::SchoenbergQuinticSplineKernel{3}, h) = 1 / (120 * pi * h^3) - -abstract type WendlandKernel{NDIMS} <: SmoothingKernel{NDIMS} end - -# Compact support for all Wendland kernels -@inline compact_support(::WendlandKernel, h) = h - -@doc raw""" - WendlandC2Kernel{NDIMS}() - -Wendland C2 kernel (Wendland, 1995), a piecewise polynomial function designed to have compact support and to -be twice continuously differentiable everywhere. Given by - -```math - W(r, h) = \frac{1}{h^d} w(r/h) -``` - -with - -```math -w(q) = \sigma \begin{cases} - (1 - q)^4 (4q + 1) & \text{if } 0 \leq q < 1, \\ - 0 & \text{if } q \geq 1, -\end{cases} -``` - -where `` d `` is the number of dimensions and `` \sigma `` is a normalization factor dependent on the dimension. -The normalization factor `` \sigma `` is `` 40/7\pi `` in two dimensions or `` 21/2\pi `` in three dimensions. - -This kernel function has a compact support of `` [0, h] ``. - -For a detailed discussion on Wendland functions and their applications in SPH, see (Dehnen & Aly, 2012). -The smoothness of these functions is also the largest disadvantage as they lose details at sharp corners. - -The smoothing length is typically in the range ``[2.5\delta, 4.0\delta]``, -where ``\delta`` is the typical particle spacing. - -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). - -## References -- Walter Dehnen & Hassan Aly. - "Improving convergence in smoothed particle hydrodynamics simulations without pairing instability". - In: Monthly Notices of the Royal Astronomical Society 425.2 (2012), pages 1068-1082. - [doi: 10.1111/j.1365-2966.2012.21439.x](https://doi.org/10.1111/j.1365-2966.2012.21439.x) - -- Holger Wendland. - "Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree." - In: Advances in computational Mathematics 4 (1995), pages 389-396. - [doi: 10.1007/BF02123482](https://doi.org/10.1007/BF02123482) -""" -struct WendlandC2Kernel{NDIMS} <: WendlandKernel{NDIMS} end - -@fastpow @inline function kernel(kernel::WendlandC2Kernel, r::Real, h) - q = r / h - - result = (1 - q)^4 * (4q + 1) - - # Zero out result if q >= 1 - result = ifelse(q < 1, normalization_factor(kernel, h) * result, zero(q)) - - return result -end - -@fastpow @muladd @inline function kernel_deriv(kernel::WendlandC2Kernel, r::Real, h) +function kernel_deriv(kernel::SchoenbergQuinticSplineKernel, r::Real, h) inner_deriv = 1 / h q = r * inner_deriv - q1_3 = (1 - q)^3 - q1_4 = (1 - q)^4 - - result = -4 * q1_3 * (4q + 1) - result = result + q1_4 * 4 - - # Zero out result if q >= 1 - result = ifelse(q < 1, - normalization_factor(kernel, h) * result * inner_deriv, zero(q)) - - return result -end - -@inline normalization_factor(::WendlandC2Kernel{2}, h) = 7 / (pi * h^2) -@inline normalization_factor(::WendlandC2Kernel{3}, h) = 21 / (2pi * h^3) - -@doc raw""" - WendlandC4Kernel{NDIMS}() - -Wendland C4 kernel, a piecewise polynomial function designed to have compact support and to -be four times continuously differentiable everywhere. Given by - -```math - W(r, h) = \frac{1}{h^d} w(r/h) -``` - -with - -```math -w(q) = \sigma \begin{cases} - (1 - q)^6 (35q^2 / 3 + 6q + 1) & \text{if } 0 \leq q < 1, \\ - 0 & \text{if } q \geq 1, -\end{cases} -``` - -where `` d `` is the number of dimensions and `` \sigma `` is a normalization factor dependent -on the dimension. The normalization factor `` \sigma `` is `` 9 / \pi `` in two dimensions or `` 495 / 32\pi `` in three dimensions. - -This kernel function has a compact support of `` [0, h] ``. + if q >= 3 + return 0.0 + end -For a detailed discussion on Wendland functions and their applications in SPH, see (Dehnen & Aly, 2012). -The smoothness of these functions is also the largest disadvantage as they loose details at sharp corners. + result = -5 * (3 - q)^4 -The smoothing length is typically in the range ``[3.0\delta, 4.5\delta]``, -where ``\delta`` is the typical particle spacing. + if q < 2 + result += 30 * (2 - q)^4 -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). + if q < 1 + result -= 75 * (1 - q)^4 + end + end -## References -- Walter Dehnen & Hassan Aly. - "Improving convergence in smoothed particle hydrodynamics simulations without pairing instability". - In: Monthly Notices of the Royal Astronomical Society 425.2 (2012), pages 1068-1082. - [doi: 10.1111/j.1365-2966.2012.21439.x](https://doi.org/10.1111/j.1365-2966.2012.21439.x) - -- Holger Wendland. - "Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree." - In: Advances in computational Mathematics 4 (1995): 389-396. - [doi: 10.1007/BF02123482](https://doi.org/10.1007/BF02123482) -""" -struct WendlandC4Kernel{NDIMS} <: WendlandKernel{NDIMS} end - -@fastpow @inline function kernel(kernel::WendlandC4Kernel, r::Real, h) - q = r / h - - result = (1 - q)^6 * (35q^2 / 3 + 6q + 1) - - # Zero out result if q >= 1 - result = ifelse(q < 1, normalization_factor(kernel, h) * result, zero(q)) - - return result + return normalization_factor(kernel, h) * result * inner_deriv end -@fastpow @muladd @inline function kernel_deriv(kernel::WendlandC4Kernel, r::Real, h) - q = r / h - term1 = (1 - q)^6 * (6 + 70 / 3 * q) - term2 = 6 * (1 - q)^5 * (1 + 6q + 35 / 3 * q^2) - derivative = term1 - term2 - - # Zero out result if q >= 1 - result = ifelse(q < 1, normalization_factor(kernel, h) * derivative / h, - zero(derivative)) - - return result -end - -@inline normalization_factor(::WendlandC4Kernel{2}, h) = 9 / (pi * h^2) -@inline normalization_factor(::WendlandC4Kernel{3}, h) = 495 / (32pi * h^3) - -@doc raw""" - WendlandC6Kernel{NDIMS}() - -Wendland C6 kernel, a piecewise polynomial function designed to have compact support and to be six times continuously differentiable everywhere. Given by: - -```math -W(r, h) = \frac{1}{h^d} w(r/h) -``` - -with: - -```math -w(q) = \sigma \begin{cases} - (1 - q)^8 (32q^3 + 25q^2 + 8q + 1) & \text{if } 0 \leq q < 1, \\ - 0 & \text{if } q \geq 1, -\end{cases} -``` - -where `` d `` is the number of dimensions and `` \sigma `` is a normalization factor dependent -on the dimension. The normalization factor `` \sigma `` is `` 78 / 7 \pi`` in two dimensions or `` 1365 / 64\pi`` in three dimensions. - -This kernel function has a compact support of `` [0, h] ``. - -For a detailed discussion on Wendland functions and their applications in SPH, see (Dehnen & Aly, 2012). -The smoothness of these functions is also the largest disadvantage as they loose details at sharp corners. - -The smoothing length is typically in the range ``[3.5\delta, 5.0\delta]``, -where ``\delta`` is the typical particle spacing. - -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). - -## References -- Walter Dehnen & Hassan Aly. - "Improving convergence in smoothed particle hydrodynamics simulations without pairing instability". - In: Monthly Notices of the Royal Astronomical Society 425.2 (2012), pages 1068-1082. - [doi: 10.1111/j.1365-2966.2012.21439.x](https://doi.org/10.1111/j.1365-2966.2012.21439.x) - -- Holger Wendland. - "Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree." - In: Advances in computational Mathematics 4 (1995): 389-396. - [doi: 10.1007/BF02123482](https://doi.org/10.1007/BF02123482) -""" -struct WendlandC6Kernel{NDIMS} <: WendlandKernel{NDIMS} end - -@fastpow @inline function kernel(kernel::WendlandC6Kernel, r::Real, h) - q = r / h - - result = (1 - q)^8 * (32q^3 + 25q^2 + 8q + 1) - - # Zero out result if q >= 1 - result = ifelse(q < 1, normalization_factor(kernel, h) * result, zero(q)) - - return result -end - -@fastpow @muladd @inline function kernel_deriv(kernel::WendlandC6Kernel, r::Real, h) - q = r / h - term1 = -8 * (1 - q)^7 * (32q^3 + 25q^2 + 8q + 1) - term2 = (1 - q)^8 * (96q^2 + 50q + 8) - derivative = term1 + term2 - - # Zero out result if q >= 1 - result = ifelse(q < 1, normalization_factor(kernel, h) * derivative / h, - zero(derivative)) - - return result -end - -@inline normalization_factor(::WendlandC6Kernel{2}, h) = 78 / (7pi * h^2) -@inline normalization_factor(::WendlandC6Kernel{3}, h) = 1365 / (64pi * h^3) - -@doc raw""" - Poly6Kernel{NDIMS}() - -Poly6 kernel, a commonly used kernel in SPH literature, especially in computer graphics contexts. It is defined as - -```math -W(r, h) = \frac{1}{h^d} w(r/h) -``` - - -with - -```math -w(q) = \sigma \begin{cases} - (1 - q^2)^3 & \text{if } 0 \leq q < 1, \\ - 0 & \text{if } q \geq 1, -\end{cases} -``` - -where `` d `` is the number of dimensions and `` \sigma `` is a normalization factor that depends -on the dimension. The normalization factor `` \sigma `` is `` 4 / \pi`` in two dimensions or `` 315 / 64\pi`` in three dimensions. - -This kernel function has a compact support of `` [0, h] ``. - -Poly6 is well-known for its computational simplicity, though it's worth noting that there are -other kernels that might offer better accuracy for hydrodynamic simulations. Furthermore, -its derivatives are not that smooth, which can lead to stability problems. -It is also susceptible to clumping. - -The smoothing length is typically in the range ``[1.5\delta, 2.5\delta]``, -where ``\delta`` is the typical particle spacing. - -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). - -## References -- Matthias Müller, David Charypar, and Markus Gross. "Particle-based fluid simulation for interactive applications". - In: Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation. Eurographics Association. 2003, pages 154-159. - [doi: 10.5555/846276.846298](https://doi.org/10.5555/846276.846298) -""" -struct Poly6Kernel{NDIMS} <: SmoothingKernel{NDIMS} end - -@inline function kernel(kernel::Poly6Kernel, r::Real, h) - q = r / h - - result = (1 - q^2)^3 - - # Zero out result if q >= 1 - result = ifelse(q < 1, normalization_factor(kernel, h) * result, zero(q)) - - return result -end - -@inline function kernel_deriv(kernel::Poly6Kernel, r::Real, h) - inner_deriv = 1 / h - q = r * inner_deriv - - result = -6 * q * (1 - q^2)^2 - - # Zero out result if q >= 1 - result = ifelse(q < 1, - result * normalization_factor(kernel, h) * inner_deriv, zero(q)) - return result -end - -@inline compact_support(::Poly6Kernel, h) = h - -@inline normalization_factor(::Poly6Kernel{2}, h) = 4 / (pi * h^2) -@inline normalization_factor(::Poly6Kernel{3}, h) = 315 / (64pi * h^3) - -@doc raw""" - SpikyKernel{NDIMS}() - -The Spiky kernel is another frequently used kernel in SPH, especially due to its desirable -properties in preserving features near boundaries in fluid simulations. It is defined as: - -```math - W(r, h) = \frac{1}{h^d} w(r/h) -``` - -with: - -```math -w(q) = \sigma \begin{cases} - (1 - q)^3 & \text{if } 0 \leq q < 1, \\ - 0 & \text{if } q \geq 1, -\end{cases} -``` - -where `` d `` is the number of dimensions and the normalization factor `` \sigma `` is `` 10 / \pi`` -in two dimensions or `` 15 / \pi`` in three dimensions. - -This kernel function has a compact support of `` [0, h] ``. - -The Spiky kernel is particularly known for its sharp gradients, which can help to preserve -sharp features in fluid simulations, especially near solid boundaries. -These sharp gradients at the boundary are also the largest disadvantage as they can lead to instability. - -The smoothing length is typically in the range ``[1.5\delta, 3.0\delta]``, -where ``\delta`` is the typical particle spacing. - -For general information and usage see [Smoothing Kernels](@ref smoothing_kernel). - -## References -- Matthias Müller, David Charypar, and Markus Gross. "Particle-based fluid simulation for interactive applications". - In: Proceedings of the 2003 ACM SIGGRAPH/Eurographics symposium on Computer animation. Eurographics Association. 2003, pages 154-159. - [doi: 10.5555/846276.846298](https://doi.org/10.5555/846276.846298) -""" -struct SpikyKernel{NDIMS} <: SmoothingKernel{NDIMS} end - -@inline function kernel(kernel::SpikyKernel, r::Real, h) - q = r / h - - result = (1 - q)^3 - - # Zero out result if q >= 1 - result = ifelse(q < 1, normalization_factor(kernel, h) * result, zero(q)) - - return result -end - -@inline function kernel_deriv(kernel::SpikyKernel, r::Real, h) - inner_deriv = 1 / h - q = r * inner_deriv - - result = -3 * (1 - q)^2 - - # Zero out result if q >= 1 - result = ifelse(q < 1, result * normalization_factor(kernel, h) * inner_deriv, zero(q)) - - return result -end - -@inline compact_support(::SpikyKernel, h) = h +@inline compact_support(::SchoenbergQuinticSplineKernel, h) = 3 * h -@inline normalization_factor(::SpikyKernel{2}, h) = 10 / (pi * h^2) -@inline normalization_factor(::SpikyKernel{3}, h) = 15 / (pi * h^3) +@inline normalization_factor(::SchoenbergQuinticSplineKernel{2}, h) = 7 / (478 * pi * h^2) +@inline normalization_factor(::SchoenbergQuinticSplineKernel{3}, h) = 1 / (120 * pi * h^3) diff --git a/src/general/system.jl b/src/general/system.jl index 674555aea..6d9b6e2d2 100644 --- a/src/general/system.jl +++ b/src/general/system.jl @@ -1,29 +1,7 @@ -# Abstract supertype for all system types. We additionally store the type of the system's -# initial condition, which is `Nothing` when using KernelAbstractions.jl. -abstract type System{NDIMS, IC} end - -# When using KernelAbstractions.jl, the initial condition has been replaced by `nothing` -GPUSystem = System{NDIMS, Nothing} where {NDIMS} - -abstract type FluidSystem{NDIMS, IC} <: System{NDIMS, IC} end -timer_name(::FluidSystem) = "fluid" -vtkname(system::FluidSystem) = "fluid" - -abstract type SolidSystem{NDIMS, IC} <: System{NDIMS, IC} end -timer_name(::SolidSystem) = "solid" -vtkname(system::SolidSystem) = "solid" - -abstract type BoundarySystem{NDIMS, IC} <: System{NDIMS, IC} end -timer_name(::BoundarySystem) = "boundary" -vtkname(system::BoundarySystem) = "boundary" - -@inline function set_zero!(du) - du .= zero(eltype(du)) - - return du -end +abstract type System{NDIMS} end initialize!(system, neighborhood_search) = system +update!(system, system_index, v, u, v_ode, u_ode, semi, t) = system @inline Base.ndims(::System{NDIMS}) where {NDIMS} = NDIMS @inline Base.eltype(system::System) = eltype(system.initial_condition) @@ -42,16 +20,7 @@ initialize!(system, neighborhood_search) = system @inline n_moving_particles(system) = nparticles(system) @inline eachparticle(system) = Base.OneTo(nparticles(system)) - -# Wrapper for systems with `SystemBuffer` -@inline each_moving_particle(system) = each_moving_particle(system, system.buffer) -@inline each_moving_particle(system, ::Nothing) = Base.OneTo(n_moving_particles(system)) - -@inline active_coordinates(u, system) = active_coordinates(u, system, system.buffer) -@inline active_coordinates(u, system, ::Nothing) = current_coordinates(u, system) - -@inline active_particles(system) = active_particles(system, system.buffer) -@inline active_particles(system, ::Nothing) = eachparticle(system) +@inline each_moving_particle(system) = Base.OneTo(n_moving_particles(system)) # This should not be dispatched by system type. We always expect to get a column of `A`. @inline function extract_svector(A, system, i) @@ -93,57 +62,17 @@ end @inline current_velocity(v, system, particle) = extract_svector(v, system, particle) -@inline function current_acceleration(system, particle) - # TODO: Return `dv` of solid particles - return zero(SVector{ndims(system), eltype(system)}) -end - -@inline set_particle_density!(v, system, particle, density) = v - -@inline set_particle_pressure!(v, system, particle, pressure) = v - @inline function smoothing_kernel(system, distance) - (; smoothing_kernel, smoothing_length) = system + @unpack smoothing_kernel, smoothing_length = system return kernel(smoothing_kernel, distance, smoothing_length) end @inline function smoothing_kernel_deriv(system, distance) - (; smoothing_kernel, smoothing_length) = system + @unpack smoothing_kernel, smoothing_length = system return kernel_deriv(smoothing_kernel, distance, smoothing_length) end @inline function smoothing_kernel_grad(system, pos_diff, distance) - return kernel_grad(system.smoothing_kernel, pos_diff, distance, system.smoothing_length) -end - -@inline function smoothing_kernel_grad(system::BoundarySystem, pos_diff, distance) - (; smoothing_kernel, smoothing_length) = system.boundary_model - + @unpack smoothing_kernel, smoothing_length = system return kernel_grad(smoothing_kernel, pos_diff, distance, smoothing_length) end - -@inline function smoothing_kernel_grad(system, pos_diff, distance, particle) - return corrected_kernel_grad(system.smoothing_kernel, pos_diff, distance, - system.smoothing_length, system.correction, system, - particle) -end - -# System update orders. This can be dispatched if needed. -function update_positions!(system, v, u, v_ode, u_ode, semi, t) - return system -end - -function update_quantities!(system, v, u, v_ode, u_ode, semi, t) - return system -end - -function update_pressure!(system, v, u, v_ode, u_ode, semi, t) - return system -end - -function update_final!(system, v, u, v_ode, u_ode, semi, t; update_from_callback=false) - return system -end - -# Only for systems requiring a mandatory callback -reset_callback_flag!(system) = system diff --git a/src/schemes/boundary/boundary.jl b/src/schemes/boundary/boundary.jl index 25d9dfb93..919d9eafd 100644 --- a/src/schemes/boundary/boundary.jl +++ b/src/schemes/boundary/boundary.jl @@ -1,4 +1,3 @@ include("dummy_particles/dummy_particles.jl") +include("monaghan_kajtar/monaghan_kajtar.jl") include("system.jl") -# Monaghan-Kajtar repulsive boundary particles require the `BoundarySPHSystem` -# and the `TotalLagrangianSPHSystem` and are therefore included later. diff --git a/src/schemes/boundary/dummy_particles/dummy_particles.jl b/src/schemes/boundary/dummy_particles/dummy_particles.jl index 3e3abcbd9..75846e80e 100644 --- a/src/schemes/boundary/dummy_particles/dummy_particles.jl +++ b/src/schemes/boundary/dummy_particles/dummy_particles.jl @@ -1,425 +1,264 @@ @doc raw""" - BoundaryModelDummyParticles(initial_density, hydrodynamic_mass, - density_calculator, smoothing_kernel, - smoothing_length; viscosity=nothing, - state_equation=nothing, correction=nothing) - -`boundary_model` for `BoundarySPHSystem`. - -# Arguments -- `initial_density`: Vector holding the initial density of each boundary particle. -- `hydrodynamic_mass`: Vector holding the "hydrodynamic mass" of each boundary particle. - See description above for more information. -- `density_calculator`: Strategy to compute the hydrodynamic density of the boundary particles. - See description below for more information. -- `smoothing_kernel`: Smoothing kernel should be the same as for the adjacent fluid system. -- `smoothing_length`: Smoothing length should be the same as for the adjacent fluid system. - -# Keywords -- `state_equation`: This should be the same as for the adjacent fluid system - (see e.g. [`StateEquationCole`](@ref)). -- `correction`: Correction method of the adjacent fluid system (see [Corrections](@ref corrections)). -- `viscosity`: Slip (default) or no-slip condition. See description below for further - information. - -# Examples -```jldoctest; output = false, setup = :(densities = [1.0, 2.0, 3.0]; masses = [0.1, 0.2, 0.3]; smoothing_kernel = SchoenbergCubicSplineKernel{2}(); smoothing_length = 0.1) -# Free-slip condition -boundary_model = BoundaryModelDummyParticles(densities, masses, AdamiPressureExtrapolation(), - smoothing_kernel, smoothing_length) - -# No-slip condition -boundary_model = BoundaryModelDummyParticles(densities, masses, AdamiPressureExtrapolation(), - smoothing_kernel, smoothing_length, - viscosity=ViscosityAdami(nu=1e-6)) - -# output -BoundaryModelDummyParticles(AdamiPressureExtrapolation, ViscosityAdami) + BoundaryModelDummyParticles(initial_density, hydrodynamic_mass, state_equation, + density_calculator, smoothing_kernel, smoothing_length) + +Boundaries modeled as dummy particles, which are treated like fluid particles, +but their positions and velocities are not evolved in time. Since the force towards the fluid +should not change with the material density when used with a `TotalLagrangianSPHSystem`, the +dummy particles need to have a mass corresponding to the fluid's rest density, which we call +"hydrodynamic mass", as opposed to mass corresponding to the material density of a +`TotalLagrangianSPHSystem`. + +Here, `initial_density` and `hydrodynamic_mass` are vectors that contains the initial density +and the hydrodynamic mass respectively for each boundary particle. +Note that when used with [`SummationDensity`](@ref) (see below), this is only used to determine +the element type and the number of boundary particles. + +To establish a relationship between density and pressure, a `state_equation` has to be passed, +which should be the same as for the adjacent fluid systems. +To sum over neighboring particles, a `smoothing_kernel` and `smoothing_length` needs to be passed. +This should be the same as for the adjacent fluid system with the largest smoothing length. + +In the literature, this kind of boundary particles is referred to as +"dummy particles" (Adami et al., 2012 and Valizadeh & Monaghan, 2015), +"frozen fluid particles" (Akinci et al., 2012) or "dynamic boundaries (Crespo et al., 2007). +The key detail of this boundary condition and the only difference between the boundary models +in these references is the way the density and pressure of boundary particles is computed. + +Since boundary particles are treated like fluid particles, the force +on fluid particle ``a`` due to boundary particle ``b`` is given by +```math +f_{ab} = m_a m_b \left( \frac{p_a}{\rho_a^2} + \frac{p_b}{\rho_b^2} \right) \nabla_{r_a} W(\Vert r_a - r_b \Vert, h). ``` +The quantities to be defined here are the density ``\rho_b`` and pressure ``p_b`` +of the boundary particle ``b``. + +We provide three options to compute the boundary density and pressure, determined by the `density_calculator`: +1. With [`SummationDensity`](@ref), the density is calculated by summation over the neighboring particles, + and the pressure is computed from the density with the state equation. +2. With [`ContinuityDensity`](@ref), the density is integrated from the continuity equation, + and the pressure is computed from the density with the state equation. + Note that this causes a gap between fluid and boundary where the boundary is initialized + without any contact to the fluid. This is due to overestimation of the boundary density + as soon as the fluid comes in contact with boundary particles that initially did not have + contact to the fluid. + Therefore, in dam break simulations, there is a visible "step", even though the boundary is supposed to be flat. + See also [dual.sphysics.org/faq/#Q_13](https://dual.sphysics.org/faq/#Q_13). +3. With [`AdamiPressureExtrapolation`](@ref), the pressure is extrapolated from the pressure of the + fluid according to (Adami et al., 2012), and the density is obtained by applying the inverse of the state equation. + +## References: +- S. Adami, X. Y. Hu, N. A. Adams. + "A generalized wall boundary condition for smoothed particle hydrodynamics". + In: Journal of Computational Physics 231, 21 (2012), pages 7057–7075. + [doi: 10.1016/J.JCP.2012.05.005](https://doi.org/10.1016/J.JCP.2012.05.005) +- Alireza Valizadeh, Joseph J. Monaghan. + "A study of solid wall models for weakly compressible SPH". + In: Journal of Computational Physics 300 (2015), pages 5–19. + [doi: 10.1016/J.JCP.2015.07.033](https://doi.org/10.1016/J.JCP.2015.07.033) +- Nadir Akinci, Markus Ihmsen, Gizem Akinci, Barbara Solenthaler, Matthias Teschner. + "Versatile rigid-fluid coupling for incompressible SPH". + ACM Transactions on Graphics 31, 4 (2012), pages 1–8. + [doi: 10.1145/2185520.2185558](https://doi.org/10.1145/2185520.2185558) +- A. J. C. Crespo, M. Gómez-Gesteira, R. A. Dalrymple. + "Boundary conditions generated by dynamic particles in SPH methods" + In: Computers, Materials and Continua 5 (2007), pages 173-184. + [doi: 10.3970/cmc.2007.005.173](https://doi.org/10.3970/cmc.2007.005.173) """ -struct BoundaryModelDummyParticles{DC, ELTYPE <: Real, VECTOR, SE, K, V, COR, C} - pressure :: VECTOR # Vector{ELTYPE} - hydrodynamic_mass :: VECTOR # Vector{ELTYPE} +struct BoundaryModelDummyParticles{ELTYPE <: Real, SE, DC, K, C} + pressure :: Vector{ELTYPE} + hydrodynamic_mass :: Vector{ELTYPE} state_equation :: SE density_calculator :: DC smoothing_kernel :: K smoothing_length :: ELTYPE - viscosity :: V - correction :: COR cache :: C -end - -# The default constructor needs to be accessible for Adapt.jl to work with this struct. -# See the comments in general/gpu.jl for more details. -function BoundaryModelDummyParticles(initial_density, hydrodynamic_mass, - density_calculator, smoothing_kernel, - smoothing_length; viscosity=nothing, - state_equation=nothing, correction=nothing) - pressure = initial_boundary_pressure(initial_density, density_calculator, - state_equation) - NDIMS = ndims(smoothing_kernel) - - n_particles = length(initial_density) - - cache = (; create_cache_model(viscosity, n_particles, NDIMS)..., - create_cache_model(initial_density, density_calculator)...) - cache = (; create_cache_model(correction, initial_density, NDIMS, - n_particles)..., cache...) - - return BoundaryModelDummyParticles(pressure, hydrodynamic_mass, - state_equation, density_calculator, - smoothing_kernel, smoothing_length, - viscosity, correction, cache) -end -@doc raw""" - AdamiPressureExtrapolation() + function BoundaryModelDummyParticles(initial_density, hydrodynamic_mass, state_equation, + density_calculator, smoothing_kernel, + smoothing_length) + pressure = similar(initial_density) -`density_calculator` for `BoundaryModelDummyParticles`. -""" -struct AdamiPressureExtrapolation end - -@doc raw""" - PressureMirroring() + cache = create_cache(initial_density, density_calculator) -`density_calculator` for `BoundaryModelDummyParticles`. - -!!! note - This boundary model requires high viscosity for stability with WCSPH. - It also produces significantly worse results than [`AdamiPressureExtrapolation`](@ref) - and is not more efficient because smaller time steps are required due to more noise - in the pressure. - We added this model only for research purposes and for comparison with - [SPlisHSPlasH](https://github.com/InteractiveComputerGraphics/SPlisHSPlasH). -""" -struct PressureMirroring end - -@doc raw""" - PressureZeroing() + new{eltype(initial_density), typeof(state_equation), + typeof(density_calculator), typeof(smoothing_kernel), + typeof(cache)}(pressure, hydrodynamic_mass, state_equation, density_calculator, + smoothing_kernel, smoothing_length, cache) + end +end -`density_calculator` for `BoundaryModelDummyParticles`. +function Base.show(io::IO, model::BoundaryModelDummyParticles) + @nospecialize model # reduce precompilation time -!!! note - This boundary model produces significantly worse results than all other models and - is only included for research purposes. -""" -struct PressureZeroing end + print(io, "BoundaryModelDummyParticles(") + print(io, model.density_calculator |> typeof |> nameof) + print(io, ")") +end -create_cache_model(correction, density, NDIMS, nparticles) = (;) +@inline function boundary_particle_impact(particle, boundary_particle, + boundary_model::BoundaryModelDummyParticles, + v_particle_system, v_boundary_system, + particle_system, boundary_system, + pos_diff, distance, m_b) + rho_a = particle_density(v_particle_system, particle_system, particle) + rho_b = particle_density(v_boundary_system, boundary_system, boundary_particle) -function create_cache_model(::ShepardKernelCorrection, density, NDIMS, n_particles) - return (; kernel_correction_coefficient=similar(density)) -end + grad_kernel = smoothing_kernel_grad(particle_system, pos_diff, distance) -function create_cache_model(::KernelCorrection, density, NDIMS, n_particles) - dw_gamma = Array{Float64}(undef, NDIMS, n_particles) - return (; kernel_correction_coefficient=similar(density), dw_gamma) + return -m_b * + (particle_system.pressure[particle] / rho_a^2 + + boundary_model.pressure[boundary_particle] / rho_b^2) * + grad_kernel end -function create_cache_model(::Union{GradientCorrection, BlendedGradientCorrection}, density, - NDIMS, n_particles) - correction_matrix = Array{Float64, 3}(undef, NDIMS, NDIMS, n_particles) - return (; correction_matrix) -end +@doc raw""" + AdamiPressureExtrapolation() -function create_cache_model(::MixedKernelGradientCorrection, density, NDIMS, n_particles) - dw_gamma = Array{Float64}(undef, NDIMS, n_particles) - correction_matrix = Array{Float64, 3}(undef, NDIMS, NDIMS, n_particles) - return (; kernel_correction_coefficient=similar(density), dw_gamma, correction_matrix) -end +The pressure of the boundary particles is obtained by extrapolating the pressure of the fluid +according to (Adami et al., 2012). +The pressure of a boundary particle ``b`` is given by +```math +p_b = \frac{\sum_f (p_f + \rho_f (\bm{g} - \bm{a}_b) \cdot \bm{r}_{bf}) W(\Vert r_{bf} \Vert, h)}{\sum_f W(\Vert r_{bf} \Vert, h)}, +``` +where the sum is over all fluid particles, ``\rho_f`` and ``p_f`` denote the density and pressure of fluid particle ``f``, respectively, +``r_{bf} = r_b - r_f`` denotes the difference of the coordinates of particles ``b`` and ``f``, +``\bm{g}`` denotes the gravitational acceleration acting on the fluid, and ``\bm{a}_b`` denotes the acceleration of the boundary particle ``b``. + +## References: +- S. Adami, X. Y. Hu, N. A. Adams. + "A generalized wall boundary condition for smoothed particle hydrodynamics". + In: Journal of Computational Physics 231, 21 (2012), pages 7057–7075. + [doi: 10.1016/J.JCP.2012.05.005](https://doi.org/10.1016/J.JCP.2012.05.005) +""" +struct AdamiPressureExtrapolation end -function create_cache_model(initial_density, - ::Union{SummationDensity, PressureMirroring, PressureZeroing}) - density = copy(initial_density) +function create_cache(initial_density, ::SummationDensity) + density = similar(initial_density) return (; density) end -function create_cache_model(initial_density, ::ContinuityDensity) +function create_cache(initial_density, ::ContinuityDensity) return (; initial_density) end -function create_cache_model(initial_density, ::AdamiPressureExtrapolation) - density = copy(initial_density) +function create_cache(initial_density, ::AdamiPressureExtrapolation) + density = similar(initial_density) volume = similar(initial_density) return (; density, volume) end -function create_cache_model(viscosity::Nothing, n_particles, n_dims) - return (;) -end - -function create_cache_model(viscosity, n_particles, n_dims) - ELTYPE = eltype(viscosity.epsilon) - - wall_velocity = zeros(ELTYPE, n_dims, n_particles) - - return (; wall_velocity) -end - -@inline reset_cache!(cache, viscosity) = set_zero!(cache.volume) - -function reset_cache!(cache, viscosity::ViscosityAdami) - (; volume, wall_velocity) = cache - - set_zero!(volume) - set_zero!(wall_velocity) - - return cache -end - -function Base.show(io::IO, model::BoundaryModelDummyParticles) - @nospecialize model # reduce precompilation time - - print(io, "BoundaryModelDummyParticles(") - print(io, model.density_calculator |> typeof |> nameof) - print(io, ", ") - print(io, model.viscosity |> typeof |> nameof) - print(io, ")") -end - -# For most density calculators, the pressure is updated in every step -initial_boundary_pressure(initial_density, density_calculator, _) = similar(initial_density) -# Pressure mirroring does not use the pressure, so we set it to zero for the visualization -initial_boundary_pressure(initial_density, ::PressureMirroring, _) = zero(initial_density) - -# For pressure zeroing, set the pressure to the reference pressure (zero with free surfaces) -function initial_boundary_pressure(initial_density, ::PressureZeroing, state_equation) - return state_equation.(initial_density) -end - -# With EDAC, just use zero pressure -function initial_boundary_pressure(initial_density, ::PressureZeroing, ::Nothing) - return zero(initial_density) -end - @inline function particle_density(v, model::BoundaryModelDummyParticles, system, particle) - return particle_density(v, model.density_calculator, model, particle) + return particle_density(v, model.density_calculator, system, particle) end # Note that the other density calculators are dispatched in `density_calculators.jl` -@inline function particle_density(v, - ::Union{AdamiPressureExtrapolation, PressureMirroring, - PressureZeroing}, - boundary_model, particle) - (; cache) = boundary_model +@inline function particle_density(v, ::AdamiPressureExtrapolation, system, particle) + @unpack cache = system.boundary_model return cache.density[particle] end -@inline function particle_pressure(v, model::BoundaryModelDummyParticles, system, particle) - return model.pressure[particle] -end - -@inline function update_density!(boundary_model::BoundaryModelDummyParticles, - system, v, u, v_ode, u_ode, semi) - (; density_calculator) = boundary_model +@inline function update!(boundary_model::BoundaryModelDummyParticles, + system, system_index, v, u, v_ode, u_ode, semi) + @unpack pressure, density_calculator = boundary_model + @unpack systems, neighborhood_searches = semi - compute_density!(boundary_model, density_calculator, system, v, u, v_ode, u_ode, semi) + pressure .= zero(eltype(pressure)) - return boundary_model -end + compute_quantities!(boundary_model, density_calculator, + system, system_index, v, u, v_ode, u_ode, semi) -function compute_density!(boundary_model, - ::Union{ContinuityDensity, AdamiPressureExtrapolation, - PressureMirroring, PressureZeroing}, - system, v, u, v_ode, u_ode, semi) - # No density update for `ContinuityDensity`, `PressureMirroring` and `PressureZeroing`. - # For `AdamiPressureExtrapolation`, the density is updated in `compute_pressure!`. return boundary_model end -@inline function update_pressure!(boundary_model::BoundaryModelDummyParticles, - system, v, u, v_ode, u_ode, semi) - (; correction, density_calculator) = boundary_model - - compute_correction_values!(system, correction, u, v_ode, u_ode, semi) +function compute_quantities!(boundary_model, ::SummationDensity, + system, system_index, v, u, v_ode, u_ode, semi) + @unpack systems, neighborhood_searches = semi + @unpack state_equation, pressure, cache = boundary_model + @unpack density = cache # Density is in the cache for SummationDensity - compute_gradient_correction_matrix!(correction, boundary_model, system, u, v_ode, u_ode, - semi) + density .= zero(eltype(density)) - # `kernel_correct_density!` only performed for `SummationDensity` - kernel_correct_density!(boundary_model, v, u, v_ode, u_ode, semi, correction, - density_calculator) + # Use all other systems for the density summation + @trixi_timeit timer() "compute density" foreach_enumerate(systems) do (neighbor_system_index, + neighbor_system) + u_neighbor_system = wrap_u(u_ode, neighbor_system_index, + neighbor_system, semi) - compute_pressure!(boundary_model, density_calculator, system, v, u, v_ode, u_ode, semi) - - return boundary_model -end - -function kernel_correct_density!(boundary_model, v, u, v_ode, u_ode, semi, - correction, density_calculator) - return boundary_model -end - -function kernel_correct_density!(boundary_model, v, u, v_ode, u_ode, semi, - corr::ShepardKernelCorrection, ::SummationDensity) - boundary_model.cache.density ./= boundary_model.cache.kernel_correction_coefficient -end - -function compute_gradient_correction_matrix!(correction, boundary_model, system, u, - v_ode, u_ode, semi) - return system -end - -function compute_gradient_correction_matrix!(corr::Union{GradientCorrection, - BlendedGradientCorrection, - MixedKernelGradientCorrection}, - boundary_model, - system, u, v_ode, u_ode, semi) - (; cache, correction, smoothing_kernel, smoothing_length) = boundary_model - (; correction_matrix) = cache + system_coords = current_coordinates(u, system) + neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - system_coords = current_coordinates(u, system) + neighborhood_search = neighborhood_searches[system_index][neighbor_system_index] - compute_gradient_correction_matrix!(correction_matrix, system, system_coords, - v_ode, u_ode, semi, correction, smoothing_length, - smoothing_kernel) -end - -function compute_density!(boundary_model, ::SummationDensity, system, v, u, v_ode, u_ode, - semi) - (; cache) = boundary_model - (; density) = cache # Density is in the cache for SummationDensity + # Loop over all pairs of particles and neighbors within the kernel cutoff. + for_particle_neighbor(system, neighbor_system, + system_coords, neighbor_coords, + neighborhood_search; + particles=eachparticle(system)) do particle, neighbor, + pos_diff, distance + mass = hydrodynamic_mass(neighbor_system, neighbor) + density[particle] += mass * smoothing_kernel(boundary_model, distance) + end + end - summation_density!(system, semi, u, u_ode, density, particles=eachparticle(system)) + for particle in eachparticle(system) + pressure[particle] = state_equation(particle_density(v, boundary_model, particle)) + end end -function compute_pressure!(boundary_model, ::Union{SummationDensity, ContinuityDensity}, - system, v, u, v_ode, u_ode, semi) +function compute_quantities!(boundary_model, ::ContinuityDensity, + system, system_index, v, u, v_ode, u_ode, semi) + @unpack systems, neighborhood_searches = semi + @unpack pressure, state_equation = boundary_model - # Limit pressure to be non-negative to avoid attractive forces between fluid and - # boundary particles at free surfaces (sticking artifacts). - @threaded system for particle in eachparticle(system) - apply_state_equation!(boundary_model, particle_density(v, boundary_model, - particle), particle) + for particle in eachparticle(system) + pressure[particle] = state_equation(particle_density(v, boundary_model, particle)) end - - return boundary_model -end - -# Use this function to avoid passing closures to Polyester.jl with `@batch` (`@threaded`). -# Otherwise, `@threaded` does not work here with Julia ARM on macOS. -# See https://github.com/JuliaSIMD/Polyester.jl/issues/88. -@inline function apply_state_equation!(boundary_model, density, particle) - boundary_model.pressure[particle] = max(boundary_model.state_equation(density), 0.0) end -function compute_pressure!(boundary_model, ::AdamiPressureExtrapolation, - system, v, u, v_ode, u_ode, semi) - (; pressure, state_equation, cache, viscosity) = boundary_model - (; volume, density) = cache +function compute_quantities!(boundary_model, ::AdamiPressureExtrapolation, + system, system_index, v, u, v_ode, u_ode, semi) + @unpack systems, neighborhood_searches = semi + @unpack pressure, state_equation, cache = boundary_model + @unpack density, volume = cache - set_zero!(pressure) - - # Set `volume` to zero. For `ViscosityAdami` the `wall_velocity` is also set to zero. - reset_cache!(cache, viscosity) - - system_coords = current_coordinates(u, system) + density .= zero(eltype(density)) + volume .= zero(eltype(volume)) # Use all other systems for the pressure extrapolation - @trixi_timeit timer() "compute boundary pressure" foreach_system(semi) do neighbor_system - v_neighbor_system = wrap_v(v_ode, neighbor_system, semi) - u_neighbor_system = wrap_u(u_ode, neighbor_system, semi) + @trixi_timeit timer() "compute boundary pressure" foreach_enumerate(systems) do (neighbor_system_index, + neighbor_system) + v_neighbor_system = wrap_v(v_ode, neighbor_system_index, + neighbor_system, semi) + u_neighbor_system = wrap_u(u_ode, neighbor_system_index, + neighbor_system, semi) - neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) + neighborhood_search = neighborhood_searches[system_index][neighbor_system_index] - # This is an optimization for simulations with large and complex boundaries. - # Especially, in 3D simulations with large and/or complex structures outside - # of areas with permanent flow. - # Note: The version iterating neighbors first is not thread parallelizable. - # The factor is based on the achievable speed-up of the thread parallelizable version. - if nparticles(system) > - ceil(Int, 0.5 * Threads.nthreads()) * nparticles(neighbor_system) - nhs = get_neighborhood_search(neighbor_system, system, semi) - - # Loop over fluid particles and then the neighboring boundary particles to extrapolate fluid pressure to the boundaries - adami_pressure_extrapolation_neighbor!(boundary_model, system, neighbor_system, - system_coords, neighbor_coords, - v_neighbor_system, nhs) - else - nhs = get_neighborhood_search(system, neighbor_system, semi) - - # Loop over boundary particles and then the neighboring fluid particles to extrapolate fluid pressure to the boundaries - adami_pressure_extrapolation!(boundary_model, system, neighbor_system, - system_coords, neighbor_coords, - v_neighbor_system, nhs) - end - - @threaded system for particle in eachparticle(system) - # Limit pressure to be non-negative to avoid attractive forces between fluid and - # boundary particles at free surfaces (sticking artifacts). - pressure[particle] = max(pressure[particle], 0.0) - end - end - - @trixi_timeit timer() "inverse state equation" @threaded system for particle in eachparticle(system) - compute_adami_density!(boundary_model, system, system_coords, particle) - end -end + system_coords = current_coordinates(u, system) + neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) -# Use this function to avoid passing closures to Polyester.jl with `@batch` (`@threaded`). -# Otherwise, `@threaded` does not work here with Julia ARM on macOS. -# See https://github.com/JuliaSIMD/Polyester.jl/issues/88. -function compute_adami_density!(boundary_model, system, system_coords, particle) - (; pressure, state_equation, cache, viscosity) = boundary_model - (; volume, density) = cache - - # The summation is only over fluid particles, thus the volume stays zero when a boundary - # particle isn't surrounded by fluid particles. - # Check the volume to avoid NaNs in pressure and velocity. - if volume[particle] > eps() - pressure[particle] /= volume[particle] - - # To impose no-slip condition - compute_wall_velocity!(viscosity, system, system_coords, particle) + adami_pressure_extrapolation!(boundary_model, system, neighbor_system, + system_coords, neighbor_coords, + v_neighbor_system, neighborhood_search) end - # Apply inverse state equation to compute density (not used with EDAC) - inverse_state_equation!(density, state_equation, pressure, particle) -end - -function compute_pressure!(boundary_model, ::Union{PressureMirroring, PressureZeroing}, - system, v, u, v_ode, u_ode, semi) - # No pressure update needed with `PressureMirroring` and `PressureZeroing`. - return boundary_model -end - -@inline function adami_pressure_extrapolation_neighbor!(boundary_model, system, - neighbor_system::FluidSystem, - system_coords, neighbor_coords, - v_neighbor_system, - neighborhood_search) - (; pressure, cache, viscosity) = boundary_model + pressure ./= volume - for_particle_neighbor(neighbor_system, system, - neighbor_coords, system_coords, - neighborhood_search; - particles=eachparticle(neighbor_system), - parallel=false) do neighbor, particle, - pos_diff, distance - # Since neighbor and particle are switched - pos_diff = -pos_diff - adami_pressure_inner!(boundary_model, system, neighbor_system::FluidSystem, - v_neighbor_system, particle, neighbor, pos_diff, - distance, viscosity, cache, pressure) + for particle in eachparticle(system) + density[particle] = inverse_state_equation(state_equation, pressure[particle]) end end -@inline function adami_pressure_extrapolation_neighbor!(boundary_model, system, - neighbor_system, - system_coords, neighbor_coords, - v_neighbor_system, - neighborhood_search) - return boundary_model -end - @inline function adami_pressure_extrapolation!(boundary_model, system, - neighbor_system::FluidSystem, + neighbor_system::WeaklyCompressibleSPHSystem, system_coords, neighbor_coords, v_neighbor_system, neighborhood_search) - (; pressure, cache, viscosity) = boundary_model + @unpack pressure, cache = boundary_model + @unpack volume = cache # Loop over all pairs of particles and neighbors within the kernel cutoff. for_particle_neighbor(system, neighbor_system, @@ -427,97 +266,26 @@ end neighborhood_search; particles=eachparticle(system)) do particle, neighbor, pos_diff, distance - adami_pressure_inner!(boundary_model, system, neighbor_system, - v_neighbor_system, particle, neighbor, pos_diff, - distance, viscosity, cache, pressure) + density_neighbor = particle_density(v_neighbor_system, neighbor_system, + neighbor) + + # TODO moving boundaries + pressure[particle] += (neighbor_system.pressure[neighbor] + + dot(neighbor_system.acceleration, + density_neighbor * pos_diff)) * + smoothing_kernel(boundary_model, distance) + volume[particle] += smoothing_kernel(boundary_model, distance) + end + + # Limit pressure to be non-negative to avoid negative pressures at free surfaces + for particle in eachparticle(system) + pressure[particle] = max(pressure[particle], 0.0) end end -@inline function adami_pressure_extrapolation!(boundary_model, system, neighbor_system, +@inline function adami_pressure_extrapolation!(boundary_model, system, + neighbor_system, system_coords, neighbor_coords, v_neighbor_system, neighborhood_search) return boundary_model end - -@inline function adami_pressure_inner!(boundary_model, system, - neighbor_system::FluidSystem, - v_neighbor_system, particle, neighbor, pos_diff, - distance, viscosity, cache, pressure) - density_neighbor = particle_density(v_neighbor_system, neighbor_system, neighbor) - - resulting_acc = neighbor_system.acceleration - - current_acceleration(system, particle) - - kernel_weight = smoothing_kernel(boundary_model, distance) - - pressure[particle] += (particle_pressure(v_neighbor_system, neighbor_system, - neighbor) + - dot(resulting_acc, density_neighbor * pos_diff)) * - kernel_weight - - cache.volume[particle] += kernel_weight - - compute_smoothed_velocity!(cache, viscosity, neighbor_system, v_neighbor_system, - kernel_weight, particle, neighbor) -end - -function compute_smoothed_velocity!(cache, viscosity, neighbor_system, v_neighbor_system, - kernel_weight, particle, neighbor) - return cache -end - -function compute_smoothed_velocity!(cache, viscosity::ViscosityAdami, - neighbor_system, v_neighbor_system, kernel_weight, - particle, neighbor) - v_b = current_velocity(v_neighbor_system, neighbor_system, neighbor) - - for dim in 1:ndims(neighbor_system) - cache.wall_velocity[dim, particle] += kernel_weight * v_b[dim] - end - - return cache -end - -@inline function compute_wall_velocity!(viscosity::Nothing, system, system_coords, particle) - return viscosity -end - -@inline function compute_wall_velocity!(viscosity, system, system_coords, particle) - (; boundary_model) = system - (; cache) = boundary_model - (; volume, wall_velocity) = cache - - # Prescribed velocity of the boundary particle. - # This velocity is zero when not using moving boundaries. - v_boundary = current_velocity(system_coords, system, particle) - - for dim in 1:ndims(system) - # The second term is the precalculated smoothed velocity field of the fluid. - wall_velocity[dim, particle] = 2 * v_boundary[dim] - - wall_velocity[dim, particle] / volume[particle] - end - return viscosity -end - -@inline function inverse_state_equation!(density, state_equation, pressure, particle) - density[particle] = inverse_state_equation(state_equation, pressure[particle]) - return density -end - -@inline function inverse_state_equation!(density, state_equation::Nothing, pressure, - particle) - # The density is constant when using EDAC - return density -end - -@inline function smoothing_kernel_grad(system::BoundarySystem, pos_diff, - distance, particle) - (; smoothing_kernel, smoothing_length, correction) = system.boundary_model - - return corrected_kernel_grad(smoothing_kernel, pos_diff, distance, - smoothing_length, correction, system, particle) -end - -@inline function correction_matrix(system::BoundarySystem, particle) - extract_smatrix(system.boundary_model.cache.correction_matrix, system, particle) -end diff --git a/src/schemes/boundary/monaghan_kajtar/monaghan_kajtar.jl b/src/schemes/boundary/monaghan_kajtar/monaghan_kajtar.jl index 6af5c4aab..f8edc0f1b 100644 --- a/src/schemes/boundary/monaghan_kajtar/monaghan_kajtar.jl +++ b/src/schemes/boundary/monaghan_kajtar/monaghan_kajtar.jl @@ -1,73 +1,96 @@ @doc raw""" - BoundaryModelMonaghanKajtar(K, beta, boundary_particle_spacing, mass; - viscosity=nothing) - -`boundary_model` for `BoundarySPHSystem`. - -# Arguments -- `K`: Scaling factor for repulsive force. -- `beta`: Ratio of fluid particle spacing to boundary particle spacing. -- `boundary_particle_spacing`: Boundary particle spacing. -- `mass`: Vector holding the mass of each boundary particle. - -# Keywords -- `viscosity`: Free-slip (default) or no-slip condition. See description above for further - information. + BoundaryModelMonaghanKajtar(K, beta, boundary_particle_spacing) + +Boundaries modeled as boundary particles which exert forces on the fluid particles (Monaghan, Kajtar, 2009). +The force on fluid particle ``a`` due to boundary particle ``b`` is given by +```math +f_{ab} = m_a \left(\tilde{f}_{ab} - m_b \Pi_{ab} \nabla_{r_a} W(\Vert r_a - r_b \Vert, h)\right) +``` +with +```math +\tilde{f}_{ab} = \frac{K}{\beta^{n-1}} \frac{r_{ab}}{\Vert r_{ab} \Vert (\Vert r_{ab} \Vert - d)} \Phi(\Vert r_{ab} \Vert, h) +\frac{2 m_b}{m_a + m_b}, +``` +where ``m_a`` and ``m_b`` are the masses of fluid particle ``a`` and boundary particle ``b`` +respectively, ``r_{ab} = r_a - r_b`` is the difference of the coordinates of particles +``a`` and ``b``, ``d`` denotes the boundary particle spacing and ``n`` denotes the number of +dimensions (see (Monaghan, Kajtar, 2009, Equation (3.1)) and (Valizadeh, Monaghan, 2015)). +Note that the repulsive acceleration $\tilde{f}_{ab}$ does not depend on the masses of +the boundary particles. +Here, ``\Phi`` denotes the 1D Wendland C4 kernel, normalized to ``1.77`` for ``q=0`` +(Monaghan, Kajtar, 2009, Section 4), with ``\Phi(r, h) = w(r/h)`` and +```math +w(q) = +\begin{cases} + (1.77/32) (1 + (5/2)q + 2q^2)(2 - q)^5 & \text{if } 0 \leq q < 2 \\ + 0 & \text{if } q \geq 2. +\end{cases} +``` + +The boundary particles are assumed to have uniform spacing by the factor ``\beta`` smaller +than the expected fluid particle spacing. +For example, if the fluid particles have an expected spacing of ``0.3`` and the boundary particles +have a uniform spacing of ``0.1``, then this parameter should be set to ``\beta = 3``. +According to (Monaghan, Kajtar, 2009), a value of ``\beta = 3`` for the Wendland C4 that +we use here is reasonable for most computing purposes. + +The parameter ``K`` is used to scale the force exerted by the boundary particles. +In (Monaghan, Kajtar, 2009), a value of ``gD`` is used for static tank simulations, +where ``g`` is the gravitational acceleration and ``D`` is the depth of the fluid. + +The viscosity ``\Pi_{ab}`` is calculated according to the viscosity used in the +simulation, where the density of the boundary particle if needed is assumed to be +identical to the density of the fluid particle. + +## References: +- Joseph J. Monaghan, Jules B. Kajtar. "SPH particle boundary forces for arbitrary boundaries". + In: Computer Physics Communications 180.10 (2009), pages 1811–1820. + [doi: 10.1016/j.cpc.2009.05.008](https://doi.org/10.1016/j.cpc.2009.05.008) +- Alireza Valizadeh, Joseph J. Monaghan. "A study of solid wall models for weakly compressible SPH." + In: Journal of Computational Physics 300 (2015), pages 5–19. + [doi: 10.1016/J.JCP.2015.07.033](https://doi.org/10.1016/J.JCP.2015.07.033) """ -struct BoundaryModelMonaghanKajtar{ELTYPE <: Real, VECTOR, V} +struct BoundaryModelMonaghanKajtar{ELTYPE <: Real} K :: ELTYPE beta :: ELTYPE boundary_particle_spacing :: ELTYPE - hydrodynamic_mass :: VECTOR # Vector{ELTYPE} - viscosity :: V -end + hydrodynamic_mass :: Vector{ELTYPE} -# The default constructor needs to be accessible for Adapt.jl to work with this struct. -# See the comments in general/gpu.jl for more details. -function BoundaryModelMonaghanKajtar(K, beta, boundary_particle_spacing, mass; - viscosity=nothing) - return BoundaryModelMonaghanKajtar(K, convert(typeof(K), beta), - boundary_particle_spacing, - mass, viscosity) + function BoundaryModelMonaghanKajtar(K, beta, boundary_particle_spacing, mass) + return new{typeof(K)}(K, beta, boundary_particle_spacing, mass) + end end function Base.show(io::IO, model::BoundaryModelMonaghanKajtar) @nospecialize model # reduce precompilation time - print(io, "BoundaryModelMonaghanKajtar(") - print(io, model.K) - print(io, ", ") - print(io, model.beta) - print(io, ", ") - print(io, model.viscosity |> typeof |> nameof) - print(io, ")") + print(io, "BoundaryModelMonaghanKajtar") +end + +@inline function particle_density(v, model::BoundaryModelMonaghanKajtar, system, + particle) + @unpack hydrodynamic_mass, boundary_particle_spacing = model + + # This model does not use any particle density. However, a mean density is used for + # `ArtificialViscosityMonaghan` in the fluid interaction. + return hydrodynamic_mass[particle] / boundary_particle_spacing^ndims(system) end -@inline function pressure_acceleration(particle_system, - neighbor_system::Union{BoundarySPHSystem{<:BoundaryModelMonaghanKajtar}, - TotalLagrangianSPHSystem{<:BoundaryModelMonaghanKajtar}}, - neighbor, m_a, m_b, p_a, p_b, rho_a, rho_b, - pos_diff, distance, grad_kernel, correction) - (; K, beta, boundary_particle_spacing) = neighbor_system.boundary_model - - # This is `distance - boundary_particle_spacing` in the paper. This factor makes - # the force grow infinitely close to the boundary, with a singularity where - # `distance` = `boundary_particle_spacing`. However, when the time step is large - # enough for a particle to end up behind the singularity in a time integration stage, - # the force will switch sign and become smaller again. - # - # In order to avoid this, we clip the force at a "large" value, large enough to prevent - # penetration when a reasonable `K` is used, but small enough to not cause instabilites - # or super small time steps. - distance_from_singularity = max(0.01 * boundary_particle_spacing, - distance - boundary_particle_spacing) - - return K / beta^(ndims(particle_system) - 1) * pos_diff / - (distance * distance_from_singularity) * - boundary_kernel(distance, particle_system.smoothing_length) +@inline function boundary_particle_impact(particle, boundary_particle, + boundary_model::BoundaryModelMonaghanKajtar, + v_particle_system, v_boundary_system, + particle_system, boundary_system, + pos_diff, distance, m_b) + @unpack smoothing_length = particle_system + @unpack K, beta, boundary_particle_spacing = boundary_model + + NDIMS = ndims(particle_system) + return K / beta^(NDIMS - 1) * pos_diff / + (distance * (distance - boundary_particle_spacing)) * + boundary_kernel(distance, smoothing_length) end -@fastpow @inline function boundary_kernel(r, h) +@inline function boundary_kernel(r, h) q = r / h # TODO The neighborhood search fluid->boundary should use this search distance @@ -79,25 +102,8 @@ end return 1.77 / 32 * (1 + 5 / 2 * q + 2 * q^2) * (2 - q)^5 end -@inline function particle_density(v, model::BoundaryModelMonaghanKajtar, system, particle) - (; hydrodynamic_mass, boundary_particle_spacing) = model - - # This model does not use any particle density. However, a mean density is used for - # `ArtificialViscosityMonaghan` in the fluid interaction. - return hydrodynamic_mass[particle] / boundary_particle_spacing^ndims(system) -end - -# This model does not not use any particle pressure -particle_pressure(v, model::BoundaryModelMonaghanKajtar, system, particle) = zero(eltype(v)) - -@inline function update_pressure!(boundary_model::BoundaryModelMonaghanKajtar, system, - v, u, v_ode, u_ode, semi) - # Nothing to do in the update step - return boundary_model -end - -@inline function update_density!(boundary_model::BoundaryModelMonaghanKajtar, system, - v, u, v_ode, u_ode, semi) +@inline function update!(boundary_model::BoundaryModelMonaghanKajtar, + system, system_index, v, u, v_ode, u_ode, semi) # Nothing to do in the update step return boundary_model end diff --git a/src/schemes/boundary/open_boundary/boundary_zones.jl b/src/schemes/boundary/open_boundary/boundary_zones.jl deleted file mode 100644 index 586d565b1..000000000 --- a/src/schemes/boundary/open_boundary/boundary_zones.jl +++ /dev/null @@ -1,340 +0,0 @@ -@doc raw""" - InFlow(; plane, flow_direction, density, particle_spacing, - initial_condition=nothing, extrude_geometry=nothing, - open_boundary_layers::Integer) - -Inflow boundary zone for [`OpenBoundarySPHSystem`](@ref). - -The specified plane (line in 2D or rectangle in 3D) will be extruded in upstream -direction (the direction opposite to `flow_direction`) to create a box for the boundary zone. -There are three ways to specify the actual shape of the inflow: -1. Don't pass `initial_condition` or `extrude_geometry`. The boundary zone box will then - be filled with inflow particles (default). -2. Specify `extrude_geometry` by passing a 1D shape in 2D or a 2D shape in 3D, - which is then extruded in upstream direction to create the inflow particles. - - In 2D, the shape must be either an initial condition with 2D coordinates, which lies - on the line specified by `plane`, or an initial condition with 1D coordinates, which lies - on the line specified by `plane` when a y-coordinate of `0` is added. - - In 3D, the shape must be either an initial condition with 3D coordinates, which lies - in the rectangle specified by `plane`, or an initial condition with 2D coordinates, - which lies in the rectangle specified by `plane` when a z-coordinate of `0` is added. -3. Specify `initial_condition` by passing a 2D initial condition in 2D or a 3D initial condition in 3D, - which will be used for the inflow particles. - -!!! note "Note" - Particles outside the boundary zone box will be removed. - -# Keywords -- `plane`: Tuple of points defining a part of the surface of the domain. - The points must either span a line in 2D or a rectangle in 3D. - This line or rectangle is then extruded in upstream direction to obtain - the boundary zone. - In 2D, pass two points ``(A, B)``, so that the interval ``[A, B]`` is - the inflow surface. - In 3D, pass three points ``(A, B, C)``, so that the rectangular inflow surface - is spanned by the vectors ``\widehat{AB}`` and ``\widehat{AC}``. - These two vectors must be orthogonal. -- `flow_direction`: Vector defining the flow direction. -- `open_boundary_layers`: Number of particle layers in upstream direction. -- `particle_spacing`: The spacing between the particles (see [`InitialCondition`](@ref)). -- `density`: Particle density (see [`InitialCondition`](@ref)). -- `initial_condition=nothing`: `InitialCondition` for the inflow particles. - Particles outside the boundary zone will be removed. - Do not use together with `extrude_geometry`. -- `extrude_geometry=nothing`: 1D shape in 2D or 2D shape in 3D, which lies on the plane - and is extruded upstream to obtain the inflow particles. - See point 2 above for more details. - -# Examples -```julia -# 2D -plane_points = ([0.0, 0.0], [0.0, 1.0]) -flow_direction=[1.0, 0.0] - -inflow = InFlow(; plane=plane_points, particle_spacing=0.1, flow_direction, density=1.0, - open_boundary_layers=4) - -# 3D -plane_points = ([0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]) -flow_direction=[0.0, 0.0, 1.0] - -inflow = InFlow(; plane=plane_points, particle_spacing=0.1, flow_direction, density=1.0, - open_boundary_layers=4) - -# 3D particles sampled as cylinder -circle = SphereShape(0.1, 0.5, (0.5, 0.5), 1.0, sphere_type=RoundSphere()) - -inflow = InFlow(; plane=plane_points, particle_spacing=0.1, flow_direction, density=1.0, - extrude_geometry=circle, open_boundary_layers=4) -``` - -!!! warning "Experimental Implementation" - This is an experimental feature and may change in any future releases. -""" -struct InFlow{NDIMS, IC, S, ZO, ZW, FD} - initial_condition :: IC - spanning_set :: S - zone_origin :: ZO - zone_width :: ZW - flow_direction :: FD - - function InFlow(; plane, flow_direction, density, particle_spacing, - initial_condition=nothing, extrude_geometry=nothing, - open_boundary_layers::Integer) - if open_boundary_layers <= 0 - throw(ArgumentError("`open_boundary_layers` must be positive and greater than zero")) - end - - # Unit vector pointing in downstream direction - flow_direction_ = normalize(SVector(flow_direction...)) - - # Sample particles in boundary zone - if isnothing(initial_condition) && isnothing(extrude_geometry) - initial_condition = TrixiParticles.extrude_geometry(plane; particle_spacing, - density, - direction=-flow_direction_, - n_extrude=open_boundary_layers) - elseif !isnothing(extrude_geometry) - initial_condition = TrixiParticles.extrude_geometry(extrude_geometry; - particle_spacing, - density, - direction=-flow_direction_, - n_extrude=open_boundary_layers) - end - - NDIMS = ndims(initial_condition) - ELTYPE = eltype(initial_condition) - - zone_width = open_boundary_layers * initial_condition.particle_spacing - - # Vectors spanning the boundary zone/box - spanning_set, zone_origin = calculate_spanning_vectors(plane, zone_width) - - # First vector of `spanning_vectors` is normal to the inflow plane. - # The normal vector must point in upstream direction for an inflow boundary. - dot_ = dot(normalize(spanning_set[:, 1]), flow_direction_) - - if !isapprox(abs(dot_), 1.0, atol=1e-7) - throw(ArgumentError("`flow_direction` is not normal to inflow plane")) - else - # Flip the normal vector to point in the opposite direction of `flow_direction` - spanning_set[:, 1] .*= -sign(dot_) - end - - spanning_set_ = reinterpret(reshape, SVector{NDIMS, ELTYPE}, spanning_set) - - # Remove particles outside the boundary zone. - # This check is only necessary when `initial_condition` or `extrude_geometry` are passed. - ic = remove_outside_particles(initial_condition, spanning_set_, zone_origin) - - return new{NDIMS, typeof(ic), typeof(spanning_set_), typeof(zone_origin), - typeof(zone_width), - typeof(flow_direction_)}(ic, spanning_set_, zone_origin, zone_width, - flow_direction_) - end -end - -@doc raw""" - OutFlow(; plane, flow_direction, density, particle_spacing, - initial_condition=nothing, extrude_geometry=nothing, - open_boundary_layers::Integer) - -Outflow boundary zone for [`OpenBoundarySPHSystem`](@ref). - -The specified plane (line in 2D or rectangle in 3D) will be extruded in downstream -direction (the direction in `flow_direction`) to create a box for the boundary zone. -There are three ways to specify the actual shape of the outflow: -1. Don't pass `initial_condition` or `extrude_geometry`. The boundary zone box will then - be filled with outflow particles (default). -2. Specify `extrude_geometry` by passing a 1D shape in 2D or a 2D shape in 3D, - which is then extruded in downstream direction to create the outflow particles. - - In 2D, the shape must be either an initial condition with 2D coordinates, which lies - on the line specified by `plane`, or an initial condition with 1D coordinates, which lies - on the line specified by `plane` when a y-coordinate of `0` is added. - - In 3D, the shape must be either an initial condition with 3D coordinates, which lies - in the rectangle specified by `plane`, or an initial condition with 2D coordinates, - which lies in the rectangle specified by `plane` when a z-coordinate of `0` is added. -3. Specify `initial_condition` by passing a 2D initial condition in 2D or a 3D initial condition in 3D, - which will be used for the outflow particles. - -!!! note "Note" - Particles outside the boundary zone box will be removed. - -# Keywords -- `plane`: Tuple of points defining a part of the surface of the domain. - The points must either span a line in 2D or a rectangle in 3D. - This line or rectangle is then extruded in downstream direction to obtain - the boundary zone. - In 2D, pass two points ``(A, B)``, so that the interval ``[A, B]`` is - the outflow surface. - In 3D, pass three points ``(A, B, C)``, so that the rectangular outflow surface - is spanned by the vectors ``\widehat{AB}`` and ``\widehat{AC}``. - These two vectors must be orthogonal. -- `flow_direction`: Vector defining the flow direction. -- `open_boundary_layers`: Number of particle layers in downstream direction. -- `particle_spacing`: The spacing between the particles (see [`InitialCondition`](@ref)). -- `density`: Particle density (see [`InitialCondition`](@ref)). -- `initial_condition=nothing`: `InitialCondition` for the outflow particles. - Particles outside the boundary zone will be removed. - Do not use together with `extrude_geometry`. -- `extrude_geometry=nothing`: 1D shape in 2D or 2D shape in 3D, which lies on the plane - and is extruded downstream to obtain the outflow particles. - See point 2 above for more details. - -# Examples -```julia -# 2D -plane_points = ([0.0, 0.0], [0.0, 1.0]) -flow_direction = [1.0, 0.0] - -outflow = OutFlow(; plane=plane_points, particle_spacing=0.1, flow_direction, density=1.0, - open_boundary_layers=4) - -# 3D -plane_points = ([0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]) -flow_direction = [0.0, 0.0, 1.0] - -outflow = OutFlow(; plane=plane_points, particle_spacing=0.1, flow_direction, density=1.0, - open_boundary_layers=4) - -# 3D particles sampled as cylinder -circle = SphereShape(0.1, 0.5, (0.5, 0.5), 1.0, sphere_type=RoundSphere()) - -outflow = OutFlow(; plane=plane_points, particle_spacing=0.1, flow_direction, density=1.0, - extrude_geometry=circle, open_boundary_layers=4) -``` - -!!! warning "Experimental Implementation" - This is an experimental feature and may change in any future releases. -""" -struct OutFlow{NDIMS, IC, S, ZO, ZW, FD} - initial_condition :: IC - spanning_set :: S - zone_origin :: ZO - zone_width :: ZW - flow_direction :: FD - - function OutFlow(; plane, flow_direction, density, particle_spacing, - initial_condition=nothing, extrude_geometry=nothing, - open_boundary_layers::Integer) - if open_boundary_layers <= 0 - throw(ArgumentError("`open_boundary_layers` must be positive and greater than zero")) - end - - # Unit vector pointing in downstream direction - flow_direction_ = normalize(SVector(flow_direction...)) - - # Sample particles in boundary zone - if isnothing(initial_condition) && isnothing(extrude_geometry) - initial_condition = TrixiParticles.extrude_geometry(plane; particle_spacing, - density, - direction=flow_direction_, - n_extrude=open_boundary_layers) - elseif !isnothing(extrude_geometry) - initial_condition = TrixiParticles.extrude_geometry(extrude_geometry; - particle_spacing, density, - direction=-flow_direction_, - n_extrude=open_boundary_layers) - end - - NDIMS = ndims(initial_condition) - ELTYPE = eltype(initial_condition) - - zone_width = open_boundary_layers * initial_condition.particle_spacing - - # Vectors spanning the boundary zone/box - spanning_set, zone_origin = calculate_spanning_vectors(plane, zone_width) - - # First vector of `spanning_vectors` is normal to the outflow plane. - # The normal vector must point in downstream direction for an outflow boundary. - dot_ = dot(normalize(spanning_set[:, 1]), flow_direction_) - - if !isapprox(abs(dot_), 1.0, atol=1e-7) - throw(ArgumentError("`flow_direction` is not normal to outflow plane")) - else - # Flip the normal vector to point in `flow_direction` - spanning_set[:, 1] .*= sign(dot_) - end - - spanning_set_ = reinterpret(reshape, SVector{NDIMS, ELTYPE}, spanning_set) - - # Remove particles outside the boundary zone. - # This check is only necessary when `initial_condition` or `extrude_geometry` are passed. - ic = remove_outside_particles(initial_condition, spanning_set_, zone_origin) - - return new{NDIMS, typeof(ic), typeof(spanning_set_), typeof(zone_origin), - typeof(zone_width), - typeof(flow_direction_)}(ic, spanning_set_, zone_origin, zone_width, - flow_direction_) - end -end - -@inline Base.ndims(::Union{InFlow{NDIMS}, OutFlow{NDIMS}}) where {NDIMS} = NDIMS - -function calculate_spanning_vectors(plane, zone_width) - return spanning_vectors(Tuple(plane), zone_width), SVector(plane[1]...) -end - -function spanning_vectors(plane_points::NTuple{2}, zone_width) - plane_size = plane_points[2] - plane_points[1] - - # Calculate normal vector of plane - b = normalize([-plane_size[2], plane_size[1]]) * zone_width - - return hcat(b, plane_size) -end - -function spanning_vectors(plane_points::NTuple{3}, zone_width) - # Vectors spanning the plane - edge1 = plane_points[2] - plane_points[1] - edge2 = plane_points[3] - plane_points[1] - - if !isapprox(dot(edge1, edge2), 0.0, atol=1e-7) - throw(ArgumentError("the vectors `AB` and `AC` for the provided points `A`, `B`, `C` must be orthogonal")) - end - - # Calculate normal vector of plane - c = Vector(normalize(cross(edge2, edge1)) * zone_width) - - return hcat(c, edge1, edge2) -end - -@inline function is_in_boundary_zone(boundary_zone::Union{InFlow, OutFlow}, particle_coords) - (; zone_origin, spanning_set) = boundary_zone - particle_position = particle_coords - zone_origin - - return is_in_boundary_zone(spanning_set, particle_position) -end - -@inline function is_in_boundary_zone(spanning_set::AbstractArray, - particle_position::SVector{NDIMS}) where {NDIMS} - for dim in 1:NDIMS - span_dim = spanning_set[dim] - # Checks whether the projection of the particle position - # falls within the range of the zone - if !(0 <= dot(particle_position, span_dim) <= dot(span_dim, span_dim)) - - # Particle is not in boundary zone - return false - end - end - - # Particle is in boundary zone - return true -end - -function remove_outside_particles(initial_condition, spanning_set, zone_origin) - (; coordinates, density, particle_spacing) = initial_condition - - in_zone = trues(nparticles(initial_condition)) - - for particle in eachparticle(initial_condition) - current_position = current_coords(coordinates, initial_condition, particle) - particle_position = current_position - zone_origin - - in_zone[particle] = is_in_boundary_zone(spanning_set, particle_position) - end - - return InitialCondition(; coordinates=coordinates[:, in_zone], density=first(density), - particle_spacing) -end diff --git a/src/schemes/boundary/open_boundary/system.jl b/src/schemes/boundary/open_boundary/system.jl deleted file mode 100644 index 8c580cf44..000000000 --- a/src/schemes/boundary/open_boundary/system.jl +++ /dev/null @@ -1,483 +0,0 @@ -@doc raw""" - OpenBoundarySPHSystem(boundary_zone::Union{InFlow, OutFlow}; sound_speed, - fluid_system::FluidSystem, buffer_size::Integer, - reference_velocity=zeros(ndims(boundary_zone)), - reference_pressure=0.0, - reference_density=first(boundary_zone.initial_condition.density)) - -Open boundary system for in- and outflow particles. -These open boundaries use the characteristic variables to propagate the appropriate values -to the outlet or inlet and have been proposed by Lastiwka et al. (2009). For more information -about the method see [description below](@ref method_of_characteristics). - -# Arguments -- `boundary_zone`: Use [`InFlow`](@ref) for an inflow and [`OutFlow`](@ref) for an outflow boundary. - -# Keywords -- `sound_speed`: Speed of sound. -- `fluid_system`: The corresponding fluid system -- `buffer_size`: Number of buffer particles. -- `reference_velocity`: Reference velocity is either a function mapping each particle's coordinates - and time to its velocity, an array where the ``i``-th column holds - the velocity of particle ``i`` or, for a constant fluid velocity, - a vector holding this velocity. Velocity is constant zero by default. -- `reference_pressure`: Reference pressure is either a function mapping each particle's coordinates - and time to its pressure, a vector holding the pressure of each particle, - or a scalar for a constant pressure over all particles. - Pressure is constant zero by default. -- `reference_density`: Reference density is either a function mapping each particle's coordinates - and time to its density, a vector holding the density of each particle, - or a scalar for a constant density over all particles. - Density is the density of the first particle in the initial condition by default. - -!!! warning "Experimental Implementation" - This is an experimental feature and may change in any future releases. -""" -struct OpenBoundarySPHSystem{BZ, NDIMS, ELTYPE <: Real, IC, FS, ARRAY1D, ARRAY2D, RV, RP, - RD, B} <: System{NDIMS, IC} - initial_condition :: IC - fluid_system :: FS - mass :: ARRAY1D # Array{ELTYPE, 1}: [particle] - density :: ARRAY1D # Array{ELTYPE, 1}: [particle] - volume :: ARRAY1D # Array{ELTYPE, 1}: [particle] - pressure :: ARRAY1D # Array{ELTYPE, 1}: [particle] - characteristics :: ARRAY2D # Array{ELTYPE, 2}: [characteristic, particle] - previous_characteristics :: ARRAY2D # Array{ELTYPE, 2}: [characteristic, particle] - sound_speed :: ELTYPE - boundary_zone :: BZ - flow_direction :: SVector{NDIMS, ELTYPE} - reference_velocity :: RV - reference_pressure :: RP - reference_density :: RD - buffer :: B - update_callback_used :: Ref{Bool} - - function OpenBoundarySPHSystem(boundary_zone::Union{InFlow, OutFlow}; sound_speed, - fluid_system::FluidSystem, buffer_size::Integer, - reference_velocity=zeros(ndims(boundary_zone)), - reference_pressure=0.0, - reference_density=first(boundary_zone.initial_condition.density)) - (; initial_condition) = boundary_zone - - buffer = SystemBuffer(nparticles(initial_condition), buffer_size) - - initial_condition = allocate_buffer(initial_condition, buffer) - - NDIMS = ndims(initial_condition) - ELTYPE = eltype(initial_condition) - - if !(reference_velocity isa Function || - (reference_velocity isa Vector && length(reference_velocity) == NDIMS)) - throw(ArgumentError("`reference_velocity` must be either a function mapping " * - "each particle's coordinates and time to its velocity, " * - "an array where the ``i``-th column holds the velocity of particle ``i`` " * - "or, for a constant fluid velocity, a vector of length $NDIMS for a $(NDIMS)D problem holding this velocity")) - else - reference_velocity_ = wrap_reference_function(reference_velocity, Val(NDIMS)) - end - - if !(reference_pressure isa Function || reference_pressure isa Real) - throw(ArgumentError("`reference_pressure` must be either a function mapping " * - "each particle's coordinates and time to its pressure, " * - "a vector holding the pressure of each particle, or a scalar")) - else - reference_pressure_ = wrap_reference_function(reference_pressure, Val(NDIMS)) - end - - if !(reference_density isa Function || reference_density isa Real) - throw(ArgumentError("`reference_density` must be either a function mapping " * - "each particle's coordinates and time to its density, " * - "a vector holding the density of each particle, or a scalar")) - else - reference_density_ = wrap_reference_function(reference_density, Val(NDIMS)) - end - - mass = copy(initial_condition.mass) - pressure = [reference_pressure_(initial_condition.coordinates[:, i], 0.0) - for i in eachparticle(initial_condition)] - density = copy(initial_condition.density) - volume = similar(initial_condition.density) - - characteristics = zeros(ELTYPE, 3, length(mass)) - previous_characteristics = zeros(ELTYPE, 3, length(mass)) - - flow_direction_ = boundary_zone.flow_direction - - return new{typeof(boundary_zone), NDIMS, ELTYPE, typeof(initial_condition), - typeof(fluid_system), typeof(mass), typeof(characteristics), - typeof(reference_velocity_), typeof(reference_pressure_), - typeof(reference_density_), - typeof(buffer)}(initial_condition, fluid_system, mass, density, volume, - pressure, characteristics, previous_characteristics, - sound_speed, boundary_zone, flow_direction_, - reference_velocity_, reference_pressure_, - reference_density_, buffer, false) - end -end - -timer_name(::OpenBoundarySPHSystem) = "open_boundary" -vtkname(system::OpenBoundarySPHSystem) = "open_boundary" - -function Base.show(io::IO, system::OpenBoundarySPHSystem) - @nospecialize system # reduce precompilation time - - print(io, "OpenBoundarySPHSystem{", ndims(system), "}(") - print(io, type2string(system.boundary_zone)) - print(io, ") with ", nparticles(system), " particles") -end - -function Base.show(io::IO, ::MIME"text/plain", system::OpenBoundarySPHSystem) - @nospecialize system # reduce precompilation time - - if get(io, :compact, false) - show(io, system) - else - summary_header(io, "OpenBoundarySPHSystem{$(ndims(system))}") - summary_line(io, "#particles", nparticles(system)) - summary_line(io, "#buffer_particles", system.buffer.buffer_size) - summary_line(io, "fluid system", type2string(system.fluid_system)) - summary_line(io, "boundary", type2string(system.boundary_zone)) - summary_line(io, "flow direction", system.flow_direction) - summary_line(io, "prescribed velocity", string(nameof(system.reference_velocity))) - summary_line(io, "prescribed pressure", string(nameof(system.reference_pressure))) - summary_line(io, "prescribed density", string(nameof(system.reference_density))) - summary_line(io, "width", round(system.boundary_zone.zone_width, digits=3)) - summary_footer(io) - end -end - -function reset_callback_flag!(system::OpenBoundarySPHSystem) - system.update_callback_used[] = false - - return system -end - -update_callback_used!(system::OpenBoundarySPHSystem) = system.update_callback_used[] = true - -@inline source_terms(system::OpenBoundarySPHSystem) = nothing - -@inline hydrodynamic_mass(system::OpenBoundarySPHSystem, particle) = system.mass[particle] - -@inline function particle_density(v, system::OpenBoundarySPHSystem, particle) - return system.density[particle] -end - -@inline function particle_pressure(v, system::OpenBoundarySPHSystem, particle) - return system.pressure[particle] -end - -@inline function update_quantities!(system::OpenBoundarySPHSystem, v, u, t) - (; density, pressure, characteristics, flow_direction, sound_speed, - reference_velocity, reference_pressure, reference_density) = system - - # Update quantities based on the characteristic variables - @threaded system for particle in each_moving_particle(system) - particle_position = current_coords(u, system, particle) - - J1 = characteristics[1, particle] - J2 = characteristics[2, particle] - J3 = characteristics[3, particle] - - rho_ref = reference_density(particle_position, t) - density[particle] = rho_ref + ((-J1 + 0.5 * (J2 + J3)) / sound_speed^2) - - p_ref = reference_pressure(particle_position, t) - pressure[particle] = p_ref + 0.5 * (J2 + J3) - - v_ref = reference_velocity(particle_position, t) - rho = density[particle] - v_ = v_ref + ((J2 - J3) / (2 * sound_speed * rho)) * flow_direction - - for dim in 1:ndims(system) - v[dim, particle] = v_[dim] - end - end - - return system -end - -function update_final!(system::OpenBoundarySPHSystem, v, u, v_ode, u_ode, semi, t; - update_from_callback=false) - if !update_from_callback && !(system.update_callback_used[]) - throw(ArgumentError("`UpdateCallback` is required when using `OpenBoundarySPHSystem`")) - end - - @trixi_timeit timer() "evaluate characteristics" evaluate_characteristics!(system, v, u, - v_ode, u_ode, - semi, t) -end - -# ==== Characteristics -# J1: Associated with convection and entropy and propagates at flow velocity. -# J2: Propagates downstream to the local flow -# J3: Propagates upstream to the local flow -function evaluate_characteristics!(system, v, u, v_ode, u_ode, semi, t) - (; volume, characteristics, previous_characteristics, boundary_zone) = system - - for particle in eachparticle(system) - previous_characteristics[1, particle] = characteristics[1, particle] - previous_characteristics[2, particle] = characteristics[2, particle] - previous_characteristics[3, particle] = characteristics[3, particle] - end - - set_zero!(characteristics) - set_zero!(volume) - - # Evaluate the characteristic variables with the fluid system - evaluate_characteristics!(system, system.fluid_system, v, u, v_ode, u_ode, semi, t) - - # Only some of the in-/outlet particles are in the influence of the fluid particles. - # Thus, we compute the characteristics for the particles that are outside the influence - # of fluid particles by using the average of the values of the previous time step. - # See eq. 27 in Negi (2020) https://doi.org/10.1016/j.cma.2020.113119 - @threaded system for particle in each_moving_particle(system) - - # Particle is outside of the influence of fluid particles - if isapprox(volume[particle], 0.0) - - # Using the average of the values at the previous time step for particles which - # are outside of the influence of fluid particles. - avg_J1 = 0.0 - avg_J2 = 0.0 - avg_J3 = 0.0 - counter = 0 - - for neighbor in each_moving_particle(system) - # Make sure that only neighbors in the influence of - # the fluid particles are used. - if volume[neighbor] > sqrt(eps()) - avg_J1 += previous_characteristics[1, neighbor] - avg_J2 += previous_characteristics[2, neighbor] - avg_J3 += previous_characteristics[3, neighbor] - counter += 1 - end - end - - characteristics[1, particle] = avg_J1 / counter - characteristics[2, particle] = avg_J2 / counter - characteristics[3, particle] = avg_J3 / counter - else - characteristics[1, particle] /= volume[particle] - characteristics[2, particle] /= volume[particle] - characteristics[3, particle] /= volume[particle] - end - prescribe_conditions!(characteristics, particle, boundary_zone) - end - - return system -end - -function evaluate_characteristics!(system, neighbor_system::FluidSystem, - v, u, v_ode, u_ode, semi, t) - (; volume, sound_speed, characteristics, flow_direction, - reference_velocity, reference_pressure, reference_density) = system - - v_neighbor_system = wrap_v(v_ode, neighbor_system, semi) - u_neighbor_system = wrap_u(u_ode, neighbor_system, semi) - - nhs = get_neighborhood_search(system, neighbor_system, semi) - - system_coords = current_coordinates(u, system) - neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - - # Loop over all fluid neighbors within the kernel cutoff - for_particle_neighbor(system, neighbor_system, system_coords, neighbor_coords, - nhs) do particle, neighbor, pos_diff, distance - neighbor_position = current_coords(u_neighbor_system, neighbor_system, neighbor) - - # Determine current and prescribed quantities - rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) - rho_ref = reference_density(neighbor_position, t) - - p_b = particle_pressure(v_neighbor_system, neighbor_system, neighbor) - p_ref = reference_pressure(neighbor_position, t) - - v_b = current_velocity(v_neighbor_system, neighbor_system, neighbor) - v_neighbor_ref = reference_velocity(neighbor_position, t) - - # Determine characteristic variables - density_term = -sound_speed^2 * (rho_b - rho_ref) - pressure_term = p_b - p_ref - velocity_term = rho_b * sound_speed * (dot(v_b - v_neighbor_ref, flow_direction)) - - kernel_ = smoothing_kernel(neighbor_system, distance) - - characteristics[1, particle] += (density_term + pressure_term) * kernel_ - characteristics[2, particle] += (velocity_term + pressure_term) * kernel_ - characteristics[3, particle] += (-velocity_term + pressure_term) * kernel_ - - volume[particle] += kernel_ - end - - return system -end - -@inline function prescribe_conditions!(characteristics, particle, ::OutFlow) - # J3 is prescribed (i.e. determined from the exterior of the domain). - # J1 and J2 is transimtted from the domain interior. - characteristics[3, particle] = zero(eltype(characteristics)) - - return characteristics -end - -@inline function prescribe_conditions!(characteristics, particle, ::InFlow) - # Allow only J3 to propagate upstream to the boundary - characteristics[1, particle] = zero(eltype(characteristics)) - characteristics[2, particle] = zero(eltype(characteristics)) - - return characteristics -end - -# This function is called by the `UpdateCallback`, as the integrator array might be modified -function update_open_boundary_eachstep!(system::OpenBoundarySPHSystem, v_ode, u_ode, - semi, t) - u = wrap_u(u_ode, system, semi) - v = wrap_v(v_ode, system, semi) - - # Update density, pressure and velocity based on the characteristic variables. - # See eq. 13-15 in Lastiwka (2009) https://doi.org/10.1002/fld.1971 - @trixi_timeit timer() "update quantities" update_quantities!(system, v, u, t) - - @trixi_timeit timer() "check domain" check_domain!(system, v, u, v_ode, u_ode, semi) - - # Update buffers - update_system_buffer!(system.buffer) - update_system_buffer!(system.fluid_system.buffer) -end - -update_open_boundary_eachstep!(system, v_ode, u_ode, semi, t) = system - -function check_domain!(system, v, u, v_ode, u_ode, semi) - (; boundary_zone, fluid_system) = system - - u_fluid = wrap_u(u_ode, fluid_system, semi) - v_fluid = wrap_v(v_ode, fluid_system, semi) - - neighborhood_search = get_neighborhood_search(system, fluid_system, semi) - - for particle in each_moving_particle(system) - particle_coords = current_coords(u, system, particle) - - # Check if boundary particle is outside the boundary zone - if !is_in_boundary_zone(boundary_zone, particle_coords) - convert_particle!(system, fluid_system, boundary_zone, particle, - v, u, v_fluid, u_fluid) - end - - # Check the neighboring fluid particles whether they're entering the boundary zone - for neighbor in PointNeighbors.eachneighbor(particle_coords, neighborhood_search) - fluid_coords = current_coords(u_fluid, fluid_system, neighbor) - - # Check if neighboring fluid particle is in boundary zone - if is_in_boundary_zone(boundary_zone, fluid_coords) - convert_particle!(fluid_system, system, boundary_zone, neighbor, - v, u, v_fluid, u_fluid) - end - end - end - - return system -end - -# Outflow particle is outside the boundary zone -@inline function convert_particle!(system::OpenBoundarySPHSystem, fluid_system, - boundary_zone::OutFlow, particle, v, u, - v_fluid, u_fluid) - deactivate_particle!(system, particle, u) - - return system -end - -# Inflow particle is outside the boundary zone -@inline function convert_particle!(system::OpenBoundarySPHSystem, fluid_system, - boundary_zone::InFlow, particle, v, u, - v_fluid, u_fluid) - (; spanning_set) = boundary_zone - - # Activate a new particle in simulation domain - transfer_particle!(fluid_system, system, particle, v_fluid, u_fluid, v, u) - - # Reset position of boundary particle - for dim in 1:ndims(system) - u[dim, particle] += spanning_set[1][dim] - end - - return system -end - -# Fluid particle is in boundary zone -@inline function convert_particle!(fluid_system::FluidSystem, system, - boundary_zone, particle, v, u, v_fluid, u_fluid) - # Activate particle in boundary zone - transfer_particle!(system, fluid_system, particle, v, u, v_fluid, u_fluid) - - # Deactivate particle in interior domain - deactivate_particle!(fluid_system, particle, u_fluid) - - return fluid_system -end - -@inline function transfer_particle!(system_new, system_old, particle_old, - v_new, u_new, v_old, u_old) - particle_new = activate_next_particle(system_new) - - # Transfer densities - density = particle_density(v_old, system_old, particle_old) - set_particle_density!(v_new, system_new, particle_new, density) - - # Transfer pressure - pressure = particle_pressure(v_old, system_old, particle_old) - set_particle_pressure!(v_new, system_new, particle_new, pressure) - - # Exchange position and velocity - for dim in 1:ndims(system_new) - u_new[dim, particle_new] = u_old[dim, particle_old] - v_new[dim, particle_new] = v_old[dim, particle_old] - end - - # TODO: Only when using TVF: set tvf - - return system_new -end - -function write_v0!(v0, system::OpenBoundarySPHSystem) - (; initial_condition) = system - - for particle in eachparticle(system) - # Write particle velocities - for dim in 1:ndims(system) - v0[dim, particle] = initial_condition.velocity[dim, particle] - end - end - - return v0 -end - -function write_u0!(u0, system::OpenBoundarySPHSystem) - (; initial_condition) = system - - for particle in eachparticle(system) - # Write particle velocities - for dim in 1:ndims(system) - u0[dim, particle] = initial_condition.coordinates[dim, particle] - end - end - - return u0 -end - -function wrap_reference_function(function_::Function, ::Val) - # Already a function - return function_ -end - -# Name the function so that the summary box does know which kind of function this is -function wrap_reference_function(constant_scalar_::Number, ::Val) - return constant_scalar(coords, t) = constant_scalar_ -end - -# For vectors and tuples -# Name the function so that the summary box does know which kind of function this is -function wrap_reference_function(constant_vector_, ::Val{NDIMS}) where {NDIMS} - return constant_vector(coords, t) = SVector{NDIMS}(constant_vector_) -end diff --git a/src/schemes/boundary/rhs.jl b/src/schemes/boundary/rhs.jl index d9cfb1779..20bef6375 100644 --- a/src/schemes/boundary/rhs.jl +++ b/src/schemes/boundary/rhs.jl @@ -1,19 +1,35 @@ -# Interaction of boundary with other systems +# Interaction of boundary with other systems function interact!(dv, v_particle_system, u_particle_system, v_neighbor_system, u_neighbor_system, neighborhood_search, - particle_system::Union{BoundarySystem, OpenBoundarySPHSystem}, + particle_system::BoundarySPHSystem, neighbor_system) # TODO Solids and moving boundaries should be considered in the continuity equation return dv end -# For dummy particles with `ContinuityDensity`, solve the continuity equation +# Boundary-fluid interaction with dummy particles model function interact!(dv, v_particle_system, u_particle_system, v_neighbor_system, u_neighbor_system, neighborhood_search, - particle_system::BoundarySPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}}, - neighbor_system::FluidSystem) - (; boundary_model) = particle_system - fluid_density_calculator = neighbor_system.density_calculator + particle_system::BoundarySPHSystem{<:BoundaryModelDummyParticles}, + neighbor_system::WeaklyCompressibleSPHSystem) + @unpack density_calculator = particle_system.boundary_model + + interact!(dv, v_particle_system, u_particle_system, + v_neighbor_system, u_neighbor_system, neighborhood_search, + particle_system, neighbor_system, density_calculator) +end + +function interact!(dv, v_particle_system, u_particle_system, + v_neighbor_system, u_neighbor_system, neighborhood_search, + particle_system::BoundarySPHSystem, neighbor_system, density_calculator) + return dv +end + +# With `ContinuityDensity` solve the continuity equation +function interact!(dv, v_particle_system, u_particle_system, + v_neighbor_system, u_neighbor_system, neighborhood_search, + particle_system::BoundarySPHSystem, neighbor_system, ::ContinuityDensity) + @unpack boundary_model = particle_system system_coords = current_coordinates(u_particle_system, particle_system) neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) @@ -22,33 +38,16 @@ function interact!(dv, v_particle_system, u_particle_system, for_particle_neighbor(particle_system, neighbor_system, system_coords, neighbor_coords, neighborhood_search) do particle, neighbor, pos_diff, distance - m_b = hydrodynamic_mass(neighbor_system, neighbor) - - rho_a = particle_density(v_particle_system, particle_system, particle) - rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) - - v_diff = current_velocity(v_particle_system, particle_system, particle) - - current_velocity(v_neighbor_system, neighbor_system, neighbor) - - grad_kernel = smoothing_kernel_grad(boundary_model, pos_diff, distance) - - continuity_equation!(dv, fluid_density_calculator, m_b, rho_a, rho_b, v_diff, - grad_kernel, particle) + # Continuity equation + vdiff = current_velocity(v_particle_system, particle_system, particle) - + current_velocity(v_neighbor_system, neighbor_system, neighbor) + + # For boundary particles, the velocity is not integrated. + # Therefore, the density is stored in the first dimension of `dv`. + dv[1, particle] += sum(neighbor_system.mass[neighbor] * vdiff .* + smoothing_kernel_grad(boundary_model, pos_diff, + distance)) end return dv end - -# This is the derivative of the density summation, which is compatible with the -# `SummationDensity` pressure acceleration. -# Energy preservation tests will fail with the other formulation. -function continuity_equation!(dv, fluid_density_calculator::SummationDensity, - m_b, rho_a, rho_b, v_diff, grad_kernel, particle) - dv[end, particle] += m_b * dot(v_diff, grad_kernel) -end - -# This is identical to the continuity equation of the fluid -function continuity_equation!(dv, fluid_density_calculator::ContinuityDensity, - m_b, rho_a, rho_b, v_diff, grad_kernel, particle) - dv[end, particle] += rho_a / rho_b * m_b * dot(v_diff, grad_kernel) -end diff --git a/src/schemes/boundary/system.jl b/src/schemes/boundary/system.jl index f36d515ac..94ea042fe 100644 --- a/src/schemes/boundary/system.jl +++ b/src/schemes/boundary/system.jl @@ -1,173 +1,59 @@ """ - BoundarySPHSystem(initial_condition, boundary_model; movement=nothing, adhesion_coefficient=0.0) + BoundarySPHSystem(coordinates, model; + movement_function=nothing) System for boundaries modeled by boundary particles. +The system is initialized with the coordinates of the particles and their masses. The interaction between fluid and boundary particles is specified by the boundary model. -# Arguments -- `initial_condition`: Initial condition (see [`InitialCondition`](@ref)) -- `boundary_model`: Boundary model (see [Boundary Models](@ref boundary_models)) +The `movement_function` is to define in which way the boundary particles move over time. Its +boolean return value is mandatory to determine in each timestep if the particles are moving or not. +This determines if the neighborhood search will be updated. +In the example below the `movement_function` only returns `true` (system is moving) +if the simulation time is lower than `0.1`. -# Keyword Arguments -- `movement`: For moving boundaries, a [`BoundaryMovement`](@ref) can be passed. -- `adhesion_coefficient`: Coefficient specifying the adhesion of a fluid to the surface. - Note: currently it is assumed that all fluids have the same adhesion coefficient. -""" -struct BoundarySPHSystem{BM, NDIMS, ELTYPE <: Real, IC, CO, M, IM, - CA} <: BoundarySystem{NDIMS, IC} - initial_condition :: IC - coordinates :: CO # Array{ELTYPE, 2} - boundary_model :: BM - movement :: M - ismoving :: IM # Ref{Bool} (to make a mutable field compatible with GPUs) - adhesion_coefficient :: ELTYPE - cache :: CA - buffer :: Nothing - - # This constructor is necessary for Adapt.jl to work with this struct. - # See the comments in general/gpu.jl for more details. - function BoundarySPHSystem(initial_condition, coordinates, boundary_model, movement, - ismoving, adhesion_coefficient, cache, buffer) - ELTYPE = eltype(coordinates) - - new{typeof(boundary_model), size(coordinates, 1), ELTYPE, typeof(initial_condition), - typeof(coordinates), typeof(movement), typeof(ismoving), - typeof(cache)}(initial_condition, coordinates, boundary_model, movement, - ismoving, adhesion_coefficient, cache, buffer) - end -end - -function BoundarySPHSystem(initial_condition, model; movement=nothing, - adhesion_coefficient=0.0) - coordinates = copy(initial_condition.coordinates) - - ismoving = Ref(!isnothing(movement)) - - cache = create_cache_boundary(movement, initial_condition) - - if movement !== nothing && isempty(movement.moving_particles) - # Default is an empty vector, since the number of particles is not known when - # instantiating `BoundaryMovement`. - resize!(movement.moving_particles, nparticles(initial_condition)) - movement.moving_particles .= collect(1:nparticles(initial_condition)) - end - - # Because of dispatches boundary model needs to be first! - return BoundarySPHSystem(initial_condition, coordinates, model, movement, - ismoving, adhesion_coefficient, cache, nothing) -end -""" - BoundaryDEMSystem(initial_condition, normal_stiffness) - -System for boundaries modeled by boundary particles. -The interaction between fluid and boundary particles is specified by the boundary model. - -!!! warning "Experimental Implementation" - This is an experimental feature and may change in a future releases. +# Examples +```julia +function movement_function(coordinates, t) -""" -struct BoundaryDEMSystem{NDIMS, ELTYPE <: Real, IC, - ARRAY1D, ARRAY2D} <: BoundarySystem{NDIMS, IC} - initial_condition :: IC - coordinates :: ARRAY2D # [dimension, particle] - radius :: ARRAY1D # [particle] - normal_stiffness :: ELTYPE - buffer :: Nothing - - function BoundaryDEMSystem(initial_condition, normal_stiffness) - coordinates = initial_condition.coordinates - radius = 0.5 * initial_condition.particle_spacing * - ones(length(initial_condition.mass)) - NDIMS = size(coordinates, 1) + if t < 0.1 + f(t) = 0.5*t^2 + t + pos_1 = coordinates[2,1] + pos_2 = f(t) + diff_pos = pos_2 - pos_1 + coordinates[2,:] .+= diff_pos - return new{NDIMS, eltype(coordinates), typeof(initial_condition), typeof(radius), - typeof(coordinates)}(initial_condition, coordinates, radius, - normal_stiffness, nothing) + return true end -end - -function Base.show(io::IO, system::BoundaryDEMSystem) - @nospecialize system # reduce precompilation time - - print(io, "BoundaryDEMSystem{", ndims(system), "}(") - print(io, system.boundary_model) - print(io, ") with ", nparticles(system), " particles") -end - -function Base.show(io::IO, ::MIME"text/plain", system::BoundaryDEMSystem) - @nospecialize system # reduce precompilation time - if get(io, :compact, false) - show(io, system) - else - summary_header(io, "BoundaryDEMSystem{$(ndims(system))}") - summary_line(io, "#particles", nparticles(system)) - summary_footer(io) - end + return false end - -""" - BoundaryMovement(movement_function, is_moving; moving_particles=nothing) - -# Arguments -- `movement_function`: Time-dependent function returning an `SVector` of ``d`` dimensions - for a ``d``-dimensional problem. -- `is_moving`: Function to determine in each timestep if the particles are moving or not. Its - boolean return value is mandatory to determine if the neighborhood search will be updated. - -# Keyword Arguments -- `moving_particles`: Indices of moving particles. Default is each particle in [`BoundarySPHSystem`](@ref). - -In the example below, `movement` describes particles moving in a circle as long as -the time is lower than `1.5`. - -# Examples -```jldoctest; output = false -movement_function(t) = SVector(cos(2pi*t), sin(2pi*t)) -is_moving(t) = t < 1.5 - -movement = BoundaryMovement(movement_function, is_moving) - -# output -BoundaryMovement{typeof(movement_function), typeof(is_moving)}(movement_function, is_moving, Int64[]) ``` """ -struct BoundaryMovement{MF, IM} +struct BoundarySPHSystem{BM, NDIMS, ELTYPE <: Real, MF} <: System{NDIMS} + coordinates :: Array{ELTYPE, 2} + boundary_model :: BM movement_function :: MF - is_moving :: IM - moving_particles :: Vector{Int} - - function BoundaryMovement(movement_function, is_moving; moving_particles=nothing) - if !(movement_function(0.0) isa SVector) - @warn "Return value of `movement_function` is not of type `SVector`. " * - "Returning regular `Vector`s causes allocations and significant performance overhead." - end + ismoving :: Vector{Bool} - # Default value is an empty vector, which will be resized in the `BoundarySPHSystem` - # constructor to move all particles. - moving_particles = isnothing(moving_particles) ? [] : vec(moving_particles) + function BoundarySPHSystem(coordinates, model; movement_function=nothing) + NDIMS = size(coordinates, 1) + ismoving = zeros(Bool, 1) - return new{typeof(movement_function), - typeof(is_moving)}(movement_function, is_moving, moving_particles) + return new{typeof(model), NDIMS, + eltype(coordinates), + typeof(movement_function)}(coordinates, model, + movement_function, ismoving) end end -create_cache_boundary(::Nothing, initial_condition) = (;) - -function create_cache_boundary(::BoundaryMovement, initial_condition) - velocity = zero(initial_condition.velocity) - acceleration = zero(initial_condition.velocity) - return (; velocity, acceleration) -end - function Base.show(io::IO, system::BoundarySPHSystem) @nospecialize system # reduce precompilation time print(io, "BoundarySPHSystem{", ndims(system), "}(") print(io, system.boundary_model) - print(io, ", ", system.movement) - print(io, ", ", system.adhesion_coefficient) + print(io, ", ", system.movement_function) print(io, ") with ", nparticles(system), " particles") end @@ -180,185 +66,116 @@ function Base.show(io::IO, ::MIME"text/plain", system::BoundarySPHSystem) summary_header(io, "BoundarySPHSystem{$(ndims(system))}") summary_line(io, "#particles", nparticles(system)) summary_line(io, "boundary model", system.boundary_model) - summary_line(io, "movement function", - isnothing(system.movement) ? "nothing" : - string(system.movement.movement_function)) - summary_line(io, "adhesion coefficient", system.adhesion_coefficient) + summary_line(io, "movement function", system.movement_function) summary_footer(io) end end -timer_name(::Union{BoundarySPHSystem, BoundaryDEMSystem}) = "boundary" - -@inline function Base.eltype(system::Union{BoundarySPHSystem, BoundaryDEMSystem}) - eltype(system.coordinates) -end +@inline Base.eltype(system::BoundarySPHSystem) = eltype(system.coordinates) # This does not account for moving boundaries, but it's only used to initialize the # neighborhood search, anyway. -@inline function initial_coordinates(system::Union{BoundarySPHSystem, BoundaryDEMSystem}) - system.coordinates -end - -function (movement::BoundaryMovement)(system, t) - (; coordinates, cache) = system - (; movement_function, is_moving, moving_particles) = movement - (; acceleration, velocity) = cache - - system.ismoving[] = is_moving(t) - - is_moving(t) || return system - - @threaded system for particle in moving_particles - pos_new = initial_coords(system, particle) + movement_function(t) - vel = ForwardDiff.derivative(movement_function, t) - acc = ForwardDiff.derivative(t_ -> ForwardDiff.derivative(movement_function, t_), t) +@inline initial_coordinates(system::BoundarySPHSystem) = system.coordinates - @inbounds for i in 1:ndims(system) - coordinates[i, particle] = pos_new[i] - velocity[i, particle] = vel[i] - acceleration[i, particle] = acc[i] - end - end +# Note that we don't dispatch by `BoundarySPHSystem{BoundaryModel}` here because +# this is also used by the `TotalLagrangianSPHSystem`. +@inline function boundary_particle_impact(particle, boundary_particle, + v_particle_system, v_boundary_system, + particle_system, boundary_system, + pos_diff, distance, m_b) + @unpack boundary_model = boundary_system - return system + boundary_particle_impact(particle, boundary_particle, + boundary_model, + v_particle_system, v_boundary_system, + particle_system, boundary_system, + pos_diff, distance, m_b) end -function (movement::Nothing)(system, t) - system.ismoving[] = false +@inline function nparticles(system::BoundarySPHSystem) + length(system.boundary_model.hydrodynamic_mass) +end - return system +# No particle positions are advanced for boundary systems, +# except when using BoundaryModelDummyParticles with ContinuityDensity. +@inline function n_moving_particles(system::BoundarySPHSystem) + return 0 end -@inline function nparticles(system::Union{BoundaryDEMSystem, BoundarySPHSystem}) - size(system.coordinates, 2) +@inline function n_moving_particles(system::BoundarySPHSystem{ + <:BoundaryModelDummyParticles + }) + return n_moving_particles(system, system.boundary_model.density_calculator) end -# No particle positions are advanced for boundary systems, -# except when using `BoundaryModelDummyParticles` with `ContinuityDensity`. -@inline function n_moving_particles(system::Union{BoundarySPHSystem, BoundaryDEMSystem}) +@inline function n_moving_particles(system::BoundarySPHSystem, density_calculator) return 0 end -@inline function n_moving_particles(system::BoundarySPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}}) - return nparticles(system) +@inline function n_moving_particles(system::BoundarySPHSystem, ::ContinuityDensity) + nparticles(system) end -@inline u_nvariables(system::Union{BoundarySPHSystem, BoundaryDEMSystem}) = 0 +@inline u_nvariables(system::BoundarySPHSystem) = 0 # For BoundaryModelDummyParticles with ContinuityDensity, this needs to be 1. # For all other models and density calculators, it's irrelevant. @inline v_nvariables(system::BoundarySPHSystem) = 1 -@inline v_nvariables(system::BoundaryDEMSystem) = 0 -@inline function current_coordinates(u, system::Union{BoundarySPHSystem, BoundaryDEMSystem}) +@inline function current_coordinates(u, system::BoundarySPHSystem) return system.coordinates end @inline function current_velocity(v, system::BoundarySPHSystem, particle) - return current_velocity(v, system, system.movement, particle) -end - -@inline function current_velocity(v, system, movement, particle) - (; cache, ismoving) = system - - if ismoving[] - return extract_svector(cache.velocity, system, particle) - end - - return zero(SVector{ndims(system), eltype(system)}) -end - -@inline function current_velocity(v, system, movement::Nothing, particle) - return zero(SVector{ndims(system), eltype(system)}) -end - -@inline function current_acceleration(system::BoundarySPHSystem, particle) - return current_acceleration(system, system.movement, particle) -end - -@inline function current_acceleration(system, movement, particle) - (; cache, ismoving) = system - - if ismoving[] - return extract_svector(cache.acceleration, system, particle) - end - - return zero(SVector{ndims(system), eltype(system)}) -end - -@inline function current_acceleration(system, movement::Nothing, particle) - return zero(SVector{ndims(system), eltype(system)}) -end - -@inline function viscous_velocity(v, system::BoundarySPHSystem, particle) - return viscous_velocity(v, system.boundary_model.viscosity, system, particle) -end - -@inline function viscous_velocity(v, viscosity, system, particle) - return extract_svector(system.boundary_model.cache.wall_velocity, system, particle) -end - -@inline function viscous_velocity(v, viscosity::Nothing, system, particle) - return current_velocity(v, system, particle) + # TODO moving boundaries + return SVector(ntuple(_ -> 0.0, Val(ndims(system)))) end @inline function particle_density(v, system::BoundarySPHSystem, particle) return particle_density(v, system.boundary_model, system, particle) end -@inline function particle_pressure(v, system::BoundarySPHSystem, particle) - return particle_pressure(v, system.boundary_model, system, particle) -end - @inline function hydrodynamic_mass(system::BoundarySPHSystem, particle) return system.boundary_model.hydrodynamic_mass[particle] end -@inline function smoothing_kernel(system::BoundarySPHSystem, distance) - (; smoothing_kernel, smoothing_length) = system.boundary_model - return kernel(smoothing_kernel, distance, smoothing_length) -end - -function update_positions!(system::BoundarySPHSystem, v, u, v_ode, u_ode, semi, t) - (; movement) = system - - movement(system, t) -end +function update!(system::BoundarySPHSystem, system_index, v, u, v_ode, u_ode, semi, t) + @unpack coordinates, movement_function, boundary_model = system -function update_quantities!(system::BoundarySPHSystem, v, u, v_ode, u_ode, semi, t) - (; boundary_model) = system + system.ismoving[1] = move_boundary_particles!(movement_function, coordinates, t) - update_density!(boundary_model, system, v, u, v_ode, u_ode, semi) + update!(boundary_model, system, system_index, v, u, v_ode, u_ode, semi) return system end -# This update depends on the computed quantities of the fluid system and therefore -# has to be in `update_final!` after `update_quantities!`. -function update_final!(system::BoundarySPHSystem, v, u, v_ode, u_ode, semi, t; - update_from_callback=false) - (; boundary_model) = system +function move_boundary_particles!(movement_function, coordinates, t) + movement_function(coordinates, t) +end - update_pressure!(boundary_model, system, v, u, v_ode, u_ode, semi) +move_boundary_particles!(movement_function::Nothing, coordinates, t) = false - return system +function write_u0!(u0, system::BoundarySPHSystem) + return u0 end -function write_u0!(u0, system::Union{BoundarySPHSystem, BoundaryDEMSystem}) - return u0 +function write_v0!(v0, system::BoundarySPHSystem{<:BoundaryModelMonaghanKajtar}) + return v0 end -function write_v0!(v0, - system::Union{BoundarySPHSystem, - BoundaryDEMSystem}) +function write_v0!(v0, system::BoundarySPHSystem{<:BoundaryModelDummyParticles}) + @unpack density_calculator = system.boundary_model + + write_v0!(v0, density_calculator, system) +end + +function write_v0!(v0, density_calculator, system::BoundarySPHSystem) return v0 end -function write_v0!(v0, - system::BoundarySPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}}) - (; cache) = system.boundary_model - (; initial_density) = cache +function write_v0!(v0, ::ContinuityDensity, system::BoundarySPHSystem) + @unpack cache = system.boundary_model + @unpack initial_density = cache for particle in eachparticle(system) # Set particle densities @@ -369,12 +186,23 @@ function write_v0!(v0, end function restart_with!(system::BoundarySPHSystem, v, u) + restart_with!(system, system.boundary_model, v, u) +end + +function restart_with!(system, ::BoundaryModelMonaghanKajtar, v, u) return system end -function restart_with!(system::BoundarySPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}}, - v, u) - (; initial_density) = model.cache +function restart_with!(system, model::BoundaryModelDummyParticles, v, u) + restart_with!(system, model, model.density_calculator, v, u) +end + +function restart_with!(system, model, density_calculator, v, u) + return system +end + +function restart_with!(system, model, ::ContinuityDensity, v, u) + @unpack initial_density = model.cache for particle in eachparticle(system) initial_density[particle] = v[1, particle] @@ -382,11 +210,3 @@ function restart_with!(system::BoundarySPHSystem{<:BoundaryModelDummyParticles{C return system end - -function viscosity_model(system::BoundarySPHSystem) - return system.boundary_model.viscosity -end - -function calculate_dt(v_ode, u_ode, cfl_number, system::BoundarySystem) - return Inf -end diff --git a/src/schemes/fluid/entropically_damped_sph/entropically_damped_sph.jl b/src/schemes/fluid/entropically_damped_sph/entropically_damped_sph.jl deleted file mode 100644 index c67930ab8..000000000 --- a/src/schemes/fluid/entropically_damped_sph/entropically_damped_sph.jl +++ /dev/null @@ -1 +0,0 @@ -include("system.jl") diff --git a/src/schemes/fluid/entropically_damped_sph/rhs.jl b/src/schemes/fluid/entropically_damped_sph/rhs.jl deleted file mode 100644 index 16ca94ec0..000000000 --- a/src/schemes/fluid/entropically_damped_sph/rhs.jl +++ /dev/null @@ -1,112 +0,0 @@ -# Fluid-fluid and fluid-boundary interaction -function interact!(dv, v_particle_system, u_particle_system, - v_neighbor_system, u_neighbor_system, neighborhood_search, - particle_system::EntropicallyDampedSPHSystem, - neighbor_system) - (; sound_speed, density_calculator, correction) = particle_system - - system_coords = current_coordinates(u_particle_system, particle_system) - neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - - # Loop over all pairs of particles and neighbors within the kernel cutoff. - for_particle_neighbor(particle_system, neighbor_system, - system_coords, neighbor_coords, - neighborhood_search) do particle, neighbor, pos_diff, distance - # Only consider particles with a distance > 0. - distance < sqrt(eps()) && return - - rho_a = particle_density(v_particle_system, particle_system, particle) - rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) - rho_mean = 0.5 * (rho_a + rho_b) - - p_a = particle_pressure(v_particle_system, particle_system, particle) - p_b = particle_pressure(v_neighbor_system, neighbor_system, neighbor) - - m_a = hydrodynamic_mass(particle_system, particle) - m_b = hydrodynamic_mass(neighbor_system, neighbor) - - grad_kernel = smoothing_kernel_grad(particle_system, pos_diff, distance) - - dv_pressure = pressure_acceleration(particle_system, neighbor_system, neighbor, - m_a, m_b, p_a, p_b, rho_a, rho_b, pos_diff, - distance, grad_kernel, correction) - - dv_viscosity_ = dv_viscosity(particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) - - for i in 1:ndims(particle_system) - dv[i, particle] += dv_pressure[i] + dv_viscosity_[i] - end - - v_diff = current_velocity(v_particle_system, particle_system, particle) - - current_velocity(v_neighbor_system, neighbor_system, neighbor) - - pressure_evolution!(dv, particle_system, v_diff, grad_kernel, - particle, pos_diff, distance, sound_speed, m_a, m_b, - p_a, p_b, rho_a, rho_b) - - continuity_equation!(dv, density_calculator, v_diff, particle, m_b, rho_a, rho_b, - particle_system, grad_kernel) - end - - return dv -end - -@inline function pressure_evolution!(dv, particle_system, v_diff, grad_kernel, particle, - pos_diff, distance, sound_speed, m_a, m_b, - p_a, p_b, rho_a, rho_b) - (; smoothing_length) = particle_system - - volume_a = m_a / rho_a - volume_b = m_b / rho_b - volume_term = (volume_a^2 + volume_b^2) / m_a - - # EDAC pressure evolution - pressure_diff = p_a - p_b - - # This is basically the continuity equation times `sound_speed^2` - artificial_eos = m_b * rho_a / rho_b * sound_speed^2 * dot(v_diff, grad_kernel) - - eta_a = rho_a * particle_system.nu_edac - eta_b = rho_b * particle_system.nu_edac - eta_tilde = 2 * eta_a * eta_b / (eta_a + eta_b) - - # TODO For variable smoothing length use average smoothing length - tmp = eta_tilde / (distance^2 + 0.01 * smoothing_length^2) - - # This formulation was introduced by Hu and Adams (2006). https://doi.org/10.1016/j.jcp.2005.09.001 - # They argued that the formulation is more flexible because of the possibility to formulate - # different inter-particle averages or to assume different inter-particle distributions. - # Ramachandran (2019) and Adami (2012) use this formulation also for the pressure acceleration. - # - # TODO: Is there a better formulation to discretize the Laplace operator? - # Because when using this formulation for the pressure acceleration, it is not - # energy conserving. - # See issue: https://github.com/trixi-framework/TrixiParticles.jl/issues/394 - # - # This is similar to density diffusion in WCSPH - damping_term = volume_term * tmp * pressure_diff * dot(grad_kernel, pos_diff) - - dv[end, particle] += artificial_eos + damping_term - - return dv -end - -# We need a separate method for EDAC since the density is stored in `v[end-1,:]`. -@inline function continuity_equation!(dv, density_calculator::ContinuityDensity, - vdiff, particle, m_b, rho_a, rho_b, - particle_system::EntropicallyDampedSPHSystem, - grad_kernel) - dv[end - 1, particle] += rho_a / rho_b * m_b * dot(vdiff, grad_kernel) - - return dv -end - -@inline function continuity_equation!(dv, density_calculator, - vdiff, particle, m_b, rho_a, rho_b, - particle_system::EntropicallyDampedSPHSystem, - grad_kernel) - return dv -end diff --git a/src/schemes/fluid/entropically_damped_sph/system.jl b/src/schemes/fluid/entropically_damped_sph/system.jl deleted file mode 100644 index 4093e8ccb..000000000 --- a/src/schemes/fluid/entropically_damped_sph/system.jl +++ /dev/null @@ -1,205 +0,0 @@ -@doc raw""" - EntropicallyDampedSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, sound_speed; - pressure_acceleration=inter_particle_averaged_pressure, - density_calculator=SummationDensity(), - alpha=0.5, viscosity=nothing, - acceleration=ntuple(_ -> 0.0, NDIMS), buffer_size=nothing, - source_terms=nothing) - -System for particles of a fluid. -As opposed to the [weakly compressible SPH scheme](@ref wcsph), which uses an equation of state, -this scheme uses a pressure evolution equation to calculate the pressure. -See [Entropically Damped Artificial Compressibility for SPH](@ref edac) for more details on the method. - -# Arguments -- `initial_condition`: Initial condition representing the system's particles. -- `sound_speed`: Speed of sound. -- `smoothing_kernel`: Smoothing kernel to be used for this system. - See [Smoothing Kernels](@ref smoothing_kernel). -- `smoothing_length`: Smoothing length to be used for this system. - See [Smoothing Kernels](@ref smoothing_kernel). - -# Keyword Arguments -- `viscosity`: Viscosity model for this system (default: no viscosity). - Recommended: [`ViscosityAdami`](@ref). -- `acceleration`: Acceleration vector for the system. (default: zero vector) -- `pressure_acceleration`: Pressure acceleration formulation (default: inter-particle averaged pressure). - When set to `nothing`, the pressure acceleration formulation for the - corresponding [density calculator](@ref density_calculator) is chosen. -- `density_calculator`: [Density calculator](@ref density_calculator) (default: [`SummationDensity`](@ref)) -- `buffer_size`: Number of buffer particles. - This is needed when simulating with [`OpenBoundarySPHSystem`](@ref). -- `source_terms`: Additional source terms for this system. Has to be either `nothing` - (by default), or a function of `(coords, velocity, density, pressure)` - (which are the quantities of a single particle), returning a `Tuple` - or `SVector` that is to be added to the acceleration of that particle. - See, for example, [`SourceTermDamping`](@ref). - Note that these source terms will not be used in the calculation of the - boundary pressure when using a boundary with - [`BoundaryModelDummyParticles`](@ref) and [`AdamiPressureExtrapolation`](@ref). - The keyword argument `acceleration` should be used instead for - gravity-like source terms. -""" -struct EntropicallyDampedSPHSystem{NDIMS, ELTYPE <: Real, IC, M, DC, K, V, - PF, ST, B, C} <: FluidSystem{NDIMS, IC} - initial_condition :: IC - mass :: M # Vector{ELTYPE}: [particle] - density_calculator :: DC - smoothing_kernel :: K - smoothing_length :: ELTYPE - sound_speed :: ELTYPE - viscosity :: V - nu_edac :: ELTYPE - acceleration :: SVector{NDIMS, ELTYPE} - correction :: Nothing - pressure_acceleration_formulation :: PF - source_terms :: ST - buffer :: B - cache :: C - - function EntropicallyDampedSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, sound_speed; - pressure_acceleration=inter_particle_averaged_pressure, - density_calculator=SummationDensity(), - alpha=0.5, viscosity=nothing, - acceleration=ntuple(_ -> 0.0, - ndims(smoothing_kernel)), - source_terms=nothing, buffer_size=nothing) - buffer = isnothing(buffer_size) ? nothing : - SystemBuffer(nparticles(initial_condition), buffer_size) - - initial_condition = allocate_buffer(initial_condition, buffer) - - NDIMS = ndims(initial_condition) - ELTYPE = eltype(initial_condition) - - mass = copy(initial_condition.mass) - - if ndims(smoothing_kernel) != NDIMS - throw(ArgumentError("smoothing kernel dimensionality must be $NDIMS for a $(NDIMS)D problem")) - end - - acceleration_ = SVector(acceleration...) - if length(acceleration_) != NDIMS - throw(ArgumentError("`acceleration` must be of length $NDIMS for a $(NDIMS)D problem")) - end - - pressure_acceleration = choose_pressure_acceleration_formulation(pressure_acceleration, - density_calculator, - NDIMS, ELTYPE, - nothing) - - nu_edac = (alpha * smoothing_length * sound_speed) / 8 - - cache = create_cache_density(initial_condition, density_calculator) - - new{NDIMS, ELTYPE, typeof(initial_condition), typeof(mass), - typeof(density_calculator), typeof(smoothing_kernel), - typeof(viscosity), typeof(pressure_acceleration), typeof(source_terms), - typeof(buffer), - typeof(cache)}(initial_condition, mass, density_calculator, smoothing_kernel, - smoothing_length, sound_speed, viscosity, nu_edac, - acceleration_, nothing, pressure_acceleration, source_terms, - buffer, cache) - end -end - -function Base.show(io::IO, system::EntropicallyDampedSPHSystem) - @nospecialize system # reduce precompilation time - - print(io, "EntropicallyDampedSPHSystem{", ndims(system), "}(") - print(io, system.density_calculator) - print(io, ", ", system.viscosity) - print(io, ", ", system.smoothing_kernel) - print(io, ", ", system.acceleration) - print(io, ") with ", nparticles(system), " particles") -end - -function Base.show(io::IO, ::MIME"text/plain", system::EntropicallyDampedSPHSystem) - @nospecialize system # reduce precompilation time - - if get(io, :compact, false) - show(io, system) - else - summary_header(io, "EntropicallyDampedSPHSystem{$(ndims(system))}") - if system.buffer isa SystemBuffer - summary_line(io, "#particles", nparticles(system)) - summary_line(io, "#buffer_particles", system.buffer.buffer_size) - else - summary_line(io, "#particles", nparticles(system)) - end - summary_line(io, "density calculator", - system.density_calculator |> typeof |> nameof) - summary_line(io, "viscosity", system.viscosity |> typeof |> nameof) - summary_line(io, "ν₍EDAC₎", "≈ $(round(system.nu_edac; digits=3))") - summary_line(io, "smoothing kernel", system.smoothing_kernel |> typeof |> nameof) - summary_line(io, "acceleration", system.acceleration) - summary_footer(io) - end -end - -@inline function v_nvariables(system::EntropicallyDampedSPHSystem) - return v_nvariables(system, system.density_calculator) -end - -@inline function v_nvariables(system::EntropicallyDampedSPHSystem, density_calculator) - return ndims(system) + 1 -end - -@inline function v_nvariables(system::EntropicallyDampedSPHSystem, ::ContinuityDensity) - return ndims(system) + 2 -end - -@inline function particle_density(v, ::ContinuityDensity, - system::EntropicallyDampedSPHSystem, particle) - return v[end - 1, particle] -end - -@inline function particle_pressure(v, system::EntropicallyDampedSPHSystem, particle) - return v[end, particle] -end - -# WARNING! -# These functions are intended to be used internally to set the pressure -# of newly activated particles in a callback. -# DO NOT use outside a callback. OrdinaryDiffEq does not allow changing `v` and `u` -# outside of callbacks. -@inline function set_particle_pressure!(v, system::EntropicallyDampedSPHSystem, particle, - pressure) - v[end, particle] = pressure - - return v -end - -@inline system_sound_speed(system::EntropicallyDampedSPHSystem) = system.sound_speed - -function update_quantities!(system::EntropicallyDampedSPHSystem, v, u, - v_ode, u_ode, semi, t) - compute_density!(system, u, u_ode, semi, system.density_calculator) -end - -function write_v0!(v0, system::EntropicallyDampedSPHSystem, density_calculator) - for particle in eachparticle(system) - v0[end, particle] = system.initial_condition.pressure[particle] - end - - return v0 -end - -function write_v0!(v0, system::EntropicallyDampedSPHSystem, ::ContinuityDensity) - for particle in eachparticle(system) - v0[end - 1, particle] = system.initial_condition.density[particle] - v0[end, particle] = system.initial_condition.pressure[particle] - end - - return v0 -end - -function restart_with!(system::EntropicallyDampedSPHSystem, v, u) - for particle in each_moving_particle(system) - system.initial_condition.coordinates[:, particle] .= u[:, particle] - system.initial_condition.velocity[:, particle] .= v[1:ndims(system), particle] - system.initial_condition.pressure[particle] = v[end, particle] - end -end diff --git a/src/schemes/fluid/fluid.jl b/src/schemes/fluid/fluid.jl deleted file mode 100644 index 68391b285..000000000 --- a/src/schemes/fluid/fluid.jl +++ /dev/null @@ -1,79 +0,0 @@ -@inline function set_particle_density!(v, system::FluidSystem, particle, density) - set_particle_density!(v, system, system.density_calculator, particle, density) -end - -function create_cache_density(initial_condition, ::SummationDensity) - density = similar(initial_condition.density) - - return (; density) -end - -function create_cache_density(ic, ::ContinuityDensity) - # Density in this case is added to the end of `v` and allocated by modifying `v_nvariables`. - return (;) -end - -@inline hydrodynamic_mass(system::FluidSystem, particle) = system.mass[particle] - -function write_u0!(u0, system::FluidSystem) - (; initial_condition) = system - - # This is as fast as a loop with `@inbounds`, but it's GPU-compatible - indices = CartesianIndices(initial_condition.coordinates) - copyto!(u0, indices, initial_condition.coordinates, indices) - - return u0 -end - -function write_v0!(v0, system::FluidSystem) - # This is as fast as a loop with `@inbounds`, but it's GPU-compatible - indices = CartesianIndices(system.initial_condition.velocity) - copyto!(v0, indices, system.initial_condition.velocity, indices) - - write_v0!(v0, system, system.density_calculator) - - return v0 -end - -write_v0!(v0, system, density_calculator) = v0 - -@inline viscosity_model(system::FluidSystem) = system.viscosity - -function compute_density!(system, u, u_ode, semi, ::ContinuityDensity) - # No density update with `ContinuityDensity` - return system -end - -function compute_density!(system, u, u_ode, semi, ::SummationDensity) - (; cache) = system - (; density) = cache # Density is in the cache for SummationDensity - - summation_density!(system, semi, u, u_ode, density) -end - -function calculate_dt(v_ode, u_ode, cfl_number, system::FluidSystem) - (; smoothing_length, viscosity, acceleration) = system - - dt_viscosity = 0.125 * smoothing_length^2 / kinematic_viscosity(system, viscosity) - - # TODO Adami et al. (2012) just use the gravity here, but Antuono et al. (2012) - # are using a per-particle acceleration. Is that supposed to be the previous RHS? - dt_acceleration = 0.25 * sqrt(smoothing_length / norm(acceleration)) - - # TODO Everyone seems to be doing this differently. - # Sun et al. (2017) only use h / c (because c depends on v_max as c >= 10 v_max). - # Adami et al. (2012) use h / (c + v_max) with a fixed CFL of 0.25. - # Antuono et al. (2012) use h / (c + v_max + h * pi_max), where pi is the viscosity coefficient. - # Antuono et al. (2015) use h / (c + h * pi_max). - # - # See docstring of the callback for the references. - dt_sound_speed = cfl_number * smoothing_length / system_sound_speed(system) - - return min(dt_viscosity, dt_acceleration, dt_sound_speed) -end - -include("pressure_acceleration.jl") -include("viscosity.jl") -include("surface_tension.jl") -include("weakly_compressible_sph/weakly_compressible_sph.jl") -include("entropically_damped_sph/entropically_damped_sph.jl") diff --git a/src/schemes/fluid/pressure_acceleration.jl b/src/schemes/fluid/pressure_acceleration.jl deleted file mode 100644 index 5b0b82e11..000000000 --- a/src/schemes/fluid/pressure_acceleration.jl +++ /dev/null @@ -1,135 +0,0 @@ -# As shown in "Variational and momentum preservation aspects of Smooth Particle Hydrodynamic -# formulations" by Bonet and Lok (1999), for a consistent formulation this form has to be -# used with `SummationDensity`. -# This can also be seen in the tests for total energy conservation, which fail with the -# other `pressure_acceleration` form. -# We assume symmetry of the kernel gradient in this formulation. See below for the -# asymmetric version. -@inline function pressure_acceleration_summation_density(m_a, m_b, rho_a, rho_b, p_a, p_b, - W_a) - return -m_b * (p_a / rho_a^2 + p_b / rho_b^2) * W_a -end - -# Same as above, but not assuming symmetry of the kernel gradient. To be used with -# corrections that do not produce a symmetric kernel gradient. -@inline function pressure_acceleration_summation_density(m_a, m_b, rho_a, rho_b, p_a, p_b, - W_a, W_b) - return -m_b * (p_a / rho_a^2 * W_a - p_b / rho_b^2 * W_b) -end - -# As shown in "Variational and momentum preservation aspects of Smooth Particle Hydrodynamic -# formulations" by Bonet and Lok (1999), for a consistent formulation this form has to be -# used with `ContinuityDensity` with the formulation `\rho_a * \sum m_b / \rho_b ...`. -# This can also be seen in the tests for total energy conservation, which fail with the -# other `pressure_acceleration` form. -# We assume symmetry of the kernel gradient in this formulation. See below for the -# asymmetric version. -@inline function pressure_acceleration_continuity_density(m_a, m_b, rho_a, rho_b, p_a, p_b, - W_a) - return -m_b * (p_a + p_b) / (rho_a * rho_b) * W_a -end - -# Same as above, but not assuming symmetry of the kernel gradient. To be used with -# corrections that do not produce a symmetric kernel gradient. -@inline function pressure_acceleration_continuity_density(m_a, m_b, rho_a, rho_b, p_a, p_b, - W_a, W_b) - return -m_b / (rho_a * rho_b) * (p_a * W_a - p_b * W_b) -end - -# This formulation was introduced by Hu and Adams (2006). https://doi.org/10.1016/j.jcp.2005.09.001 -# They argued that the formulation is more flexible because of the possibility to formulate -# different inter-particle averages or to assume different inter-particle distributions. -# Ramachandran (2019) and Adami (2012) use this formulation for the pressure acceleration. -# -# However, the tests show that the formulation is only linear and angular momentum conserving -# but not energy conserving. -# -# Note that the authors also used this formulation for an ISPH method in (https://doi.org/10.1016/j.jcp.2007.07.013) -# -# TODO: Further investigations on energy conservation. -@inline function inter_particle_averaged_pressure(m_a, m_b, rho_a, rho_b, p_a, p_b, W_a) - volume_a = m_a / rho_a - volume_b = m_b / rho_b - volume_term = (volume_a^2 + volume_b^2) / m_a - - # Inter-particle averaged pressure - pressure_tilde = (rho_b * p_a + rho_a * p_b) / (rho_a + rho_b) - - return -volume_term * pressure_tilde * W_a -end - -function choose_pressure_acceleration_formulation(pressure_acceleration, - density_calculator, NDIMS, ELTYPE, - correction) - if correction isa KernelCorrection || - correction isa GradientCorrection || - correction isa BlendedGradientCorrection || - correction isa MixedKernelGradientCorrection - if isempty(methods(pressure_acceleration, - (ELTYPE, ELTYPE, ELTYPE, ELTYPE, ELTYPE, ELTYPE, - SVector{NDIMS, ELTYPE}, SVector{NDIMS, ELTYPE}))) - throw(ArgumentError("when a correction with an asymmetric kernel gradient is " * - "used, the passed pressure acceleration formulation must " * - "provide a version with the arguments " * - "`m_a, m_b, rho_a, rho_b, p_a, p_b, W_a, W_b`")) - end - else - if isempty(methods(pressure_acceleration, - (ELTYPE, ELTYPE, ELTYPE, ELTYPE, ELTYPE, ELTYPE, - SVector{NDIMS, ELTYPE}))) - throw(ArgumentError("when not using a correction with an asymmetric kernel " * - "gradient, the passed pressure acceleration formulation must " * - "provide a version with the arguments " * - "`m_a, m_b, rho_a, rho_b, p_a, p_b, W_a`, " * - "using the symmetry of the kernel gradient")) - end - end - - return pressure_acceleration -end - -function choose_pressure_acceleration_formulation(pressure_acceleration::Nothing, - density_calculator::SummationDensity, - NDIMS, ELTYPE, - correction) - - # Choose the pressure acceleration formulation corresponding to the density calculator. - return pressure_acceleration_summation_density -end - -function choose_pressure_acceleration_formulation(pressure_acceleration::Nothing, - density_calculator::ContinuityDensity, - NDIMS, ELTYPE, - correction) - - # Choose the pressure acceleration formulation corresponding to the density calculator. - return pressure_acceleration_continuity_density -end - -# Formulation using symmetric gradient formulation for corrections not depending on local neighborhood. -@inline function pressure_acceleration(particle_system, neighbor_system, neighbor, - m_a, m_b, p_a, p_b, rho_a, rho_b, pos_diff, - distance, W_a, correction) - (; pressure_acceleration_formulation) = particle_system - - # Without correction or with `AkinciFreeSurfaceCorrection`, the kernel gradient is - # symmetric, so call the symmetric version of the pressure acceleration formulation. - return pressure_acceleration_formulation(m_a, m_b, rho_a, rho_b, p_a, p_b, W_a) -end - -# Formulation using asymmetric gradient formulation for corrections depending on local neighborhood. -@inline function pressure_acceleration(particle_system, neighbor_system, neighbor, - m_a, m_b, p_a, p_b, rho_a, rho_b, pos_diff, - distance, W_a, - correction::Union{KernelCorrection, - GradientCorrection, - BlendedGradientCorrection, - MixedKernelGradientCorrection}) - (; pressure_acceleration_formulation) = particle_system - - W_b = smoothing_kernel_grad(neighbor_system, -pos_diff, distance, neighbor) - - # With correction, the kernel gradient is not necessarily symmetric, so call the - # asymmetric version of the pressure acceleration formulation. - return pressure_acceleration_formulation(m_a, m_b, rho_a, rho_b, p_a, p_b, W_a, W_b) -end diff --git a/src/schemes/fluid/surface_tension.jl b/src/schemes/fluid/surface_tension.jl deleted file mode 100644 index 69e468cd7..000000000 --- a/src/schemes/fluid/surface_tension.jl +++ /dev/null @@ -1,206 +0,0 @@ -abstract type AkinciTypeSurfaceTension end - -@doc raw""" - CohesionForceAkinci(surface_tension_coefficient=1.0) - -This model only implements the cohesion force of the Akinci surface tension model. - -# Keywords -- `surface_tension_coefficient=1.0`: Modifies the intensity of the surface tension-induced force, - enabling the tuning of the fluid's surface tension properties within the simulation. - -# References -- Nadir Akinci, Gizem Akinci, Matthias Teschner. - "Versatile Surface Tension and Adhesion for SPH Fluids". - In: ACM Transactions on Graphics 32.6 (2013). - [doi: 10.1145/2508363.2508395](https://doi.org/10.1145/2508363.2508395) -""" -struct CohesionForceAkinci{ELTYPE} <: AkinciTypeSurfaceTension - surface_tension_coefficient::ELTYPE - - function CohesionForceAkinci(; surface_tension_coefficient=1.0) - new{typeof(surface_tension_coefficient)}(surface_tension_coefficient) - end -end - -@doc raw""" - SurfaceTensionAkinci(surface_tension_coefficient=1.0) - -Implements a model for surface tension and adhesion effects drawing upon the -principles outlined by Akinci et al. This model is instrumental in capturing the nuanced -behaviors of fluid surfaces, such as droplet formation and the dynamics of merging or -separation, by utilizing intra-particle forces. - -# Keywords -- `surface_tension_coefficient=1.0`: A parameter to adjust the magnitude of - surface tension forces, facilitating the fine-tuning of how surface tension phenomena - are represented in the simulation. - -# References -- Nadir Akinci, Gizem Akinci, Matthias Teschner. - "Versatile Surface Tension and Adhesion for SPH Fluids". - In: ACM Transactions on Graphics 32.6 (2013). - [doi: 10.1145/2508363.2508395](https://doi.org/10.1145/2508363.2508395) -""" -struct SurfaceTensionAkinci{ELTYPE} <: AkinciTypeSurfaceTension - surface_tension_coefficient::ELTYPE - - function SurfaceTensionAkinci(; surface_tension_coefficient=1.0) - new{typeof(surface_tension_coefficient)}(surface_tension_coefficient) - end -end - -# Note that `floating_point_number^integer_literal` is lowered to `Base.literal_pow`. -# Currently, specializations reducing this to simple multiplications exist only up -# to a power of three, see -# https://github.com/JuliaLang/julia/blob/34934736fa4dcb30697ac1b23d11d5ad394d6a4d/base/intfuncs.jl#L327-L339 -# By using the `@fastpow` macro, we are consciously trading off some precision in the result -# for enhanced computational speed. This is especially useful in scenarios where performance -# is a higher priority than exact precision. -@fastpow @inline function cohesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, distance) - (; surface_tension_coefficient) = surface_tension - - # Eq. 2 - # We only reach this function when `sqrt(eps()) < distance <= support_radius` - if distance > 0.5 * support_radius - # Attractive force - C = (support_radius - distance)^3 * distance^3 - else - # `distance < 0.5 * support_radius` - # Repulsive force - C = 2 * (support_radius - distance)^3 * distance^3 - support_radius^6 / 64.0 - end - C *= 32.0 / (pi * support_radius^9) - - # Eq. 1 in acceleration form - cohesion_force = -surface_tension_coefficient * m_b * C * pos_diff / distance - - return cohesion_force -end - -@inline function adhesion_force_akinci(surface_tension, support_radius, m_b, pos_diff, - distance, adhesion_coefficient) - - # The neighborhood search has an `<=` check, but for `distance == support_radius` - # the term inside the parentheses might be very slightly negative, causing an error with `^0.25`. - # TODO Change this in the neighborhood search? - # See https://github.com/trixi-framework/PointNeighbors.jl/issues/19 - distance >= support_radius && return zero(pos_diff) - - distance <= 0.5 * support_radius && return zero(pos_diff) - - # Eq. 7 - A = 0.007 / support_radius^3.25 * - (-4 * distance^2 / support_radius + 6 * distance - 2 * support_radius)^0.25 - - # Eq. 6 in acceleration form with `m_b` being the boundary mass calculated as - # `m_b = rho_0 * volume` (Akinci boundary condition treatment) - adhesion_force = -adhesion_coefficient * m_b * A * pos_diff / distance - - return adhesion_force -end - -# Section 2.2 in Akinci et al. 2013 "Versatile Surface Tension and Adhesion for SPH Fluids" -# Note: most of the time this only leads to an approximation of the surface normal - -function calc_normal_akinci!(system, neighbor_system::FluidSystem, - surface_tension::SurfaceTensionAkinci, u_system, - v_neighbor_system, u_neighbor_system, - neighborhood_search) - (; smoothing_length, cache) = system - - system_coords = current_coordinates(u_system, system) - neighbor_system_coords = current_coordinates(u_neighbor_system, neighbor_system) - - for_particle_neighbor(system, neighbor_system, - system_coords, neighbor_system_coords, - neighborhood_search) do particle, neighbor, pos_diff, distance - m_b = hydrodynamic_mass(neighbor_system, neighbor) - density_neighbor = particle_density(v_neighbor_system, - neighbor_system, neighbor) - grad_kernel = smoothing_kernel_grad(system, pos_diff, distance, - particle) - for i in 1:ndims(system) - cache.surface_normal[i, particle] += m_b / density_neighbor * - grad_kernel[i] * smoothing_length - end - end - - return system -end - -function calc_normal_akinci!(system, neighbor_system, surface_tension, u_system, - v_neighbor_system, u_neighbor_system, - neighborhood_search) - # Normal not needed - return system -end - -@inline function surface_tension_force(surface_tension_a::CohesionForceAkinci, - surface_tension_b::CohesionForceAkinci, - particle_system::FluidSystem, - neighbor_system::FluidSystem, particle, neighbor, - pos_diff, distance) - (; smoothing_length) = particle_system - # No cohesion with oneself - distance < sqrt(eps()) && return zero(pos_diff) - - m_b = hydrodynamic_mass(neighbor_system, neighbor) - support_radius = compact_support(smoothing_kernel, smoothing_length) - - return cohesion_force_akinci(surface_tension_a, support_radius, m_b, pos_diff, distance) -end - -@inline function surface_tension_force(surface_tension_a::SurfaceTensionAkinci, - surface_tension_b::SurfaceTensionAkinci, - particle_system::FluidSystem, - neighbor_system::FluidSystem, particle, neighbor, - pos_diff, distance) - (; smoothing_length, smoothing_kernel) = particle_system - (; surface_tension_coefficient) = surface_tension_a - - # No surface tension with oneself - distance < sqrt(eps()) && return zero(pos_diff) - - m_b = hydrodynamic_mass(neighbor_system, neighbor) - n_a = surface_normal(surface_tension_a, particle_system, particle) - n_b = surface_normal(surface_tension_b, neighbor_system, neighbor) - support_radius = compact_support(smoothing_kernel, smoothing_length) - - return cohesion_force_akinci(surface_tension_a, support_radius, m_b, - pos_diff, distance) .- - (surface_tension_coefficient * (n_a - n_b)) -end - -# Skip -@inline function surface_tension_force(surface_tension_a, surface_tension_b, - particle_system, neighbor_system, particle, neighbor, - pos_diff, distance) - return zero(pos_diff) -end - -@inline function adhesion_force(surface_tension::AkinciTypeSurfaceTension, - particle_system::FluidSystem, - neighbor_system::BoundarySystem, particle, neighbor, - pos_diff, distance) - (; smoothing_length, smoothing_kernel) = particle_system - (; adhesion_coefficient, boundary_model) = neighbor_system - - # No adhesion with oneself - distance < sqrt(eps()) && return zero(pos_diff) - - # No reason to calculate the adhesion force if adhesion coefficient is near zero - abs(adhesion_coefficient) < eps() && return zero(pos_diff) - - m_b = hydrodynamic_mass(neighbor_system, neighbor) - - support_radius = compact_support(smoothing_kernel, smoothing_length) - return adhesion_force_akinci(surface_tension, support_radius, m_b, pos_diff, distance, - adhesion_coefficient) -end - -@inline function adhesion_force(surface_tension, particle_system, neighbor_system, particle, - neighbor, pos_diff, distance) - return zero(pos_diff) -end diff --git a/src/schemes/fluid/viscosity.jl b/src/schemes/fluid/viscosity.jl deleted file mode 100644 index a678b40d4..000000000 --- a/src/schemes/fluid/viscosity.jl +++ /dev/null @@ -1,238 +0,0 @@ - -function dv_viscosity(particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) - viscosity = viscosity_model(neighbor_system) - - return dv_viscosity(viscosity, particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) -end - -function dv_viscosity(particle_system, neighbor_system::OpenBoundarySPHSystem, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) - # No viscosity in the open boundary system. Use viscosity of the fluid system. - viscosity = viscosity_model(particle_system) - - return dv_viscosity(viscosity, particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) -end - -function dv_viscosity(viscosity, particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) - return viscosity(particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) -end - -function dv_viscosity(viscosity::Nothing, particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) - return zero(pos_diff) -end - -@doc raw""" - ArtificialViscosityMonaghan(; alpha, beta, epsilon=0.01) - -# Keywords -- `alpha`: A value of `0.02` is usually used for most simulations. For a relation with the - kinematic viscosity, see description below. -- `beta`: A value of `0.0` works well for simulations with shocks of moderate strength. - In simulations where the Mach number can be very high, eg. astrophysical calculation, - good results can be obtained by choosing a value of `beta=2` and `alpha=1`. -- `epsilon=0.01`: Parameter to prevent singularities. - - -Artificial viscosity by Monaghan (Monaghan 1992, Monaghan 1989), given by -```math -\Pi_{ab} = -\begin{cases} - -(\alpha c \mu_{ab} + \beta \mu_{ab}^2) / \bar{\rho}_{ab} & \text{if } v_{ab} \cdot r_{ab} < 0, \\ - 0 & \text{otherwise} -\end{cases} -``` -with -```math -\mu_{ab} = \frac{h v_{ab} \cdot r_{ab}}{\Vert r_{ab} \Vert^2 + \epsilon h^2}, -``` -where ``\alpha, \beta, \epsilon`` are parameters, ``c`` is the speed of sound, ``h`` is the smoothing length, -``r_{ab} = r_a - r_b`` is the difference of the coordinates of particles ``a`` and ``b``, -``v_{ab} = v_a - v_b`` is the difference of their velocities, -and ``\bar{\rho}_{ab}`` is the arithmetic mean of their densities. - -Note that ``\alpha`` needs to adjusted for different resolutions to maintain a specific Reynolds Number. -To do so, Monaghan (Monaghan 2005) defined an equivalent effective physical kinematic viscosity ``\nu`` by -```math - \nu = \frac{\alpha h c }{2d + 4}, -``` -where ``d`` is the dimension. - -## References -- Joseph J. Monaghan. "Smoothed Particle Hydrodynamics". - In: Annual Review of Astronomy and Astrophysics 30.1 (1992), pages 543-574. - [doi: 10.1146/ANNUREV.AA.30.090192.002551](https://doi.org/10.1146/ANNUREV.AA.30.090192.002551) -- Joseph J. Monaghan. "Smoothed Particle Hydrodynamics". - In: Reports on Progress in Physics (2005), pages 1703-1759. - [doi: 10.1088/0034-4885/68/8/r01](http://dx.doi.org/10.1088/0034-4885/68/8/R01) -- Joseph J. Monaghan. "On the Problem of Penetration in Particle Methods". - In: Journal of Computational Physics 82.1, pages 1–15. - [doi: 10.1016/0021-9991(89)90032-6](https://doi.org/10.1016/0021-9991(89)90032-6) -""" -struct ArtificialViscosityMonaghan{ELTYPE} - alpha :: ELTYPE - beta :: ELTYPE - epsilon :: ELTYPE - - function ArtificialViscosityMonaghan(; alpha, beta, epsilon=0.01) - new{typeof(alpha)}(alpha, beta, epsilon) - end -end - -@inline function (viscosity::ArtificialViscosityMonaghan)(particle_system, neighbor_system, - v_particle_system, - v_neighbor_system, - particle, neighbor, pos_diff, - distance, sound_speed, m_a, m_b, - rho_mean) - (; smoothing_length) = particle_system - - v_a = viscous_velocity(v_particle_system, particle_system, particle) - v_b = viscous_velocity(v_neighbor_system, neighbor_system, neighbor) - v_diff = v_a - v_b - - pi_ab = viscosity(sound_speed, v_diff, pos_diff, distance, rho_mean, smoothing_length) - - if pi_ab < eps() - return zero(pos_diff) - end - - return -m_b * pi_ab * smoothing_kernel_grad(particle_system, pos_diff, distance) -end - -@inline function (viscosity::ArtificialViscosityMonaghan)(c, v_diff, pos_diff, distance, - rho_mean, h) - (; alpha, beta, epsilon) = viscosity - - # v_ab ⋅ r_ab - vr = dot(v_diff, pos_diff) - - # Monaghan 2005 p. 1741 (doi: 10.1088/0034-4885/68/8/r01): - # "In the case of shock tube problems, it is usual to turn the viscosity on for - # approaching particles and turn it off for receding particles. In this way, the - # viscosity is used for shocks and not rarefactions." - if vr < 0 - mu = h * vr / (distance^2 + epsilon * h^2) - return -(alpha * c * mu + beta * mu^2) / rho_mean - end - - return 0.0 -end - -# See, e.g., -# M. Antuono, A. Colagrossi, S. Marrone. -# "Numerical Diffusive Terms in Weakly-Compressible SPH Schemes." -# In: Computer Physics Communications 183, no. 12 (2012), pages 2570-80. -# https://doi.org/10.1016/j.cpc.2012.07.006 -function kinematic_viscosity(system, viscosity::ArtificialViscosityMonaghan) - (; smoothing_length) = system - (; alpha) = viscosity - sound_speed = system_sound_speed(system) - - return alpha * smoothing_length * sound_speed / (2 * ndims(system) + 4) -end - -@doc raw""" - ViscosityAdami(; nu, epsilon=0.01) - -Viscosity by Adami (Adami et al. 2012). -The viscous interaction is calculated with the shear force for incompressible flows given by -```math -f_{ab} = \sum_w \bar{\eta}_{ab} \left( V_a^2 + V_b^2 \right) \frac{v_{ab}}{||r_{ab}||^2+\epsilon h_{ab}^2} \nabla W_{ab} \cdot r_{ab}, -``` -where ``r_{ab} = r_a - r_b`` is the difference of the coordinates of particles ``a`` and ``b``, -``v_{ab} = v_a - v_b`` is the difference of their velocities, ``h`` is the smoothing length and ``V`` is the particle volume. -The parameter ``\epsilon`` prevents singularities (see Ramachandran et al. 2019). -The inter-particle-averaged shear stress is -```math - \bar{\eta}_{ab} =\frac{2 \eta_a \eta_b}{\eta_a + \eta_b}, -``` -where ``\eta_a = \rho_a \nu_a`` with ``\nu`` as the kinematic viscosity. - -# Keywords -- `nu`: Kinematic viscosity -- `epsilon=0.01`: Parameter to prevent singularities - -## References -- S. Adami et al. "A generalized wall boundary condition for smoothed particle hydrodynamics". - In: Journal of Computational Physics 231 (2012), pages 7057-7075. - [doi: 10.1016/j.jcp.2012.05.005](http://dx.doi.org/10.1016/j.jcp.2012.05.005) -- P. Ramachandran et al. "Entropically damped artificial compressibility for SPH". - In: Journal of Computers and Fluids 179 (2019), pages 579-594. - [doi: 10.1016/j.compfluid.2018.11.023](https://doi.org/10.1016/j.compfluid.2018.11.023) -""" -struct ViscosityAdami{ELTYPE} - nu::ELTYPE - epsilon::ELTYPE - - function ViscosityAdami(; nu, epsilon=0.01) - new{typeof(nu)}(nu, epsilon) - end -end - -@inline function (viscosity::ViscosityAdami)(particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, - distance, sound_speed, m_a, m_b, rho_mean) - (; epsilon, nu) = viscosity - (; smoothing_length) = particle_system - - v_a = viscous_velocity(v_particle_system, particle_system, particle) - v_b = viscous_velocity(v_neighbor_system, neighbor_system, neighbor) - v_diff = v_a - v_b - - rho_a = particle_density(v_particle_system, particle_system, particle) - rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) - - # TODO This is not correct for two different fluids. It should be `nu_a` and `nu_b`. - eta_a = nu * rho_a - eta_b = nu * rho_b - - eta_tilde = 2 * (eta_a * eta_b) / (eta_a + eta_b) - - # TODO For variable smoothing_length use average smoothing length - tmp = eta_tilde / (distance^2 + epsilon * smoothing_length^2) - - volume_a = m_a / rho_a - volume_b = m_b / rho_b - - grad_kernel = smoothing_kernel_grad(particle_system, pos_diff, distance) - - # This formulation was introduced by Hu and Adams (2006). https://doi.org/10.1016/j.jcp.2005.09.001 - # They argued that the formulation is more flexible because of the possibility to formulate - # different inter-particle averages or to assume different inter-particle distributions. - # Ramachandran (2019) and Adami (2012) use this formulation also for the pressure acceleration. - # - # TODO: Is there a better formulation to discretize the Laplace operator? - # Because when using this formulation for the pressure acceleration, it is not - # energy conserving. - # See issue: https://github.com/trixi-framework/TrixiParticles.jl/issues/394 - visc = (volume_a^2 + volume_b^2) * dot(grad_kernel, pos_diff) * tmp / m_a - - return visc .* v_diff -end - -function kinematic_viscosity(system, viscosity::ViscosityAdami) - return viscosity.nu -end - -@inline viscous_velocity(v, system, particle) = current_velocity(v, system, particle) diff --git a/src/schemes/fluid/weakly_compressible_sph/density_diffusion.jl b/src/schemes/fluid/weakly_compressible_sph/density_diffusion.jl deleted file mode 100644 index 716245be8..000000000 --- a/src/schemes/fluid/weakly_compressible_sph/density_diffusion.jl +++ /dev/null @@ -1,258 +0,0 @@ -@doc raw""" - DensityDiffusion - -An abstract supertype of all density diffusion formulations. - -Currently, the following formulations are available: - -| Formulation | Suitable for Steady-State Simulations | Low Computational Cost | -| :------------------------------------------ | :------------------------------------ | :--------------------- | -| [`DensityDiffusionMolteniColagrossi`](@ref) | ❌ | ✅ | -| [`DensityDiffusionFerrari`](@ref) | ❌ | ✅ | -| [`DensityDiffusionAntuono`](@ref) | ✅ | ❌ | - -See [Density Diffusion](@ref) for a comparison and more details. -""" -abstract type DensityDiffusion end - -# Most density diffusion formulations don't need updating -function update!(density_diffusion, neighborhood_search, v, u, system, semi) - return density_diffusion -end - -@doc raw""" - DensityDiffusionMolteniColagrossi(; delta) - -The commonly used density diffusion term by Molteni & Colagrossi (2009). - -The term ``\psi_{ab}`` in the continuity equation in [`DensityDiffusion`](@ref) is defined -by -```math -\psi_{ab} = 2(\rho_a - \rho_b) \frac{r_{ab}}{\Vert r_{ab} \Vert^2}, -``` -where ``\rho_a`` and ``\rho_b`` denote the densities of particles ``a`` and ``b`` respectively -and ``r_{ab} = r_a - r_b`` is the difference of the coordinates of particles ``a`` and ``b``. - -See [`DensityDiffusion`](@ref) for an overview and comparison of implemented density -diffusion terms. - -## References -- Diego Molteni, Andrea Colagrossi. - "A Simple Procedure to Improve the Pressure Evaluation in Hydrodynamic Context Using the SPH." - In: Computer Physics Communications 180.6 (2009), pages 861--872. - [doi: 10.1016/j.cpc.2008.12.004](https://doi.org/10.1016/j.cpc.2008.12.004) -""" -struct DensityDiffusionMolteniColagrossi{ELTYPE} <: DensityDiffusion - delta::ELTYPE - - function DensityDiffusionMolteniColagrossi(; delta) - new{typeof(delta)}(delta) - end -end - -@inline function density_diffusion_psi(::DensityDiffusionMolteniColagrossi, rho_a, rho_b, - pos_diff, distance, system, particle, neighbor) - return 2 * (rho_a - rho_b) * pos_diff / distance^2 -end - -@doc raw""" - DensityDiffusionFerrari() - -A density diffusion term by Ferrari et al. (2009). - -The term ``\psi_{ab}`` in the continuity equation in [`DensityDiffusion`](@ref) is defined -by -```math -\psi_{ab} = \frac{\rho_a - \rho_b}{2h} \frac{r_{ab}}{\Vert r_{ab} \Vert}, -``` -where ``\rho_a`` and ``\rho_b`` denote the densities of particles ``a`` and ``b`` respectively, -``r_{ab} = r_a - r_b`` is the difference of the coordinates of particles ``a`` and ``b`` and -``h`` is the smoothing length. - -See [`DensityDiffusion`](@ref) for an overview and comparison of implemented density -diffusion terms. - -## References -- Angela Ferrari, Michael Dumbser, Eleuterio F. Toro, Aronne Armanini. - "A New 3D Parallel SPH Scheme for Free Surface Flows." - In: Computers & Fluids 38.6 (2009), pages 1203--1217. - [doi: 10.1016/j.compfluid.2008.11.012](https://doi.org/10.1016/j.compfluid.2008.11.012). -""" -struct DensityDiffusionFerrari <: DensityDiffusion - delta::Int - - # δ is always 1 in this formulation - DensityDiffusionFerrari() = new(1) -end - -@inline function density_diffusion_psi(::DensityDiffusionFerrari, rho_a, rho_b, - pos_diff, distance, system, particle, neighbor) - (; smoothing_length) = system - - return ((rho_a - rho_b) / 2smoothing_length) * pos_diff / distance -end - -@doc raw""" - DensityDiffusionAntuono(initial_condition; delta) - -The commonly used density diffusion terms by Antuono et al. (2010), also referred to as -δ-SPH. The density diffusion term by Molteni & Colagrossi (2009) is extended by a second -term, which is nicely written down by Antuono et al. (2012). - -The term ``\psi_{ab}`` in the continuity equation in [`DensityDiffusion`](@ref) is defined -by -```math -\psi_{ab} = 2\left(\rho_a - \rho_b - \frac{1}{2}\big(\nabla\rho^L_a + \nabla\rho^L_b\big) \cdot r_{ab}\right) - \frac{r_{ab}}{\Vert r_{ab} \Vert^2}, -``` -where ``\rho_a`` and ``\rho_b`` denote the densities of particles ``a`` and ``b`` respectively -and ``r_{ab} = r_a - r_b`` is the difference of the coordinates of particles ``a`` and ``b``. -The symbol ``\nabla\rho^L_a`` denotes the renormalized density gradient defined as -```math -\nabla\rho^L_a = -\sum_b (\rho_a - \rho_b) V_b L_a \nabla_{r_a} W(\Vert r_{ab} \Vert, h) -``` -with -```math -L_a := \left( -\sum_{b} V_b r_{ab} \otimes \nabla_{r_a} W(\Vert r_{ab} \Vert, h) \right)^{-1} \in \R^{d \times d}, -``` -where ``d`` is the number of dimensions. - -See [`DensityDiffusion`](@ref) for an overview and comparison of implemented density -diffusion terms. - -## References -- M. Antuono, A. Colagrossi, S. Marrone, D. Molteni. - "Free-Surface Flows Solved by Means of SPH Schemes with Numerical Diffusive Terms." - In: Computer Physics Communications 181.3 (2010), pages 532--549. - [doi: 10.1016/j.cpc.2009.11.002](https://doi.org/10.1016/j.cpc.2009.11.002) -- M. Antuono, A. Colagrossi, S. Marrone. - "Numerical Diffusive Terms in Weakly-Compressible SPH Schemes." - In: Computer Physics Communications 183.12 (2012), pages 2570--2580. - [doi: 10.1016/j.cpc.2012.07.006](https://doi.org/10.1016/j.cpc.2012.07.006) -- Diego Molteni, Andrea Colagrossi. - "A Simple Procedure to Improve the Pressure Evaluation in Hydrodynamic Context Using the SPH." - In: Computer Physics Communications 180.6 (2009), pages 861--872. - [doi: 10.1016/j.cpc.2008.12.004](https://doi.org/10.1016/j.cpc.2008.12.004) -""" -struct DensityDiffusionAntuono{NDIMS, ELTYPE, ARRAY2D, ARRAY3D} <: DensityDiffusion - delta :: ELTYPE - correction_matrix :: ARRAY3D # Array{ELTYPE, 3}: [i, j, particle] - normalized_density_gradient :: ARRAY2D # Array{ELTYPE, 2}: [i, particle] - - function DensityDiffusionAntuono(delta, correction_matrix, normalized_density_gradient) - new{size(correction_matrix, 1), typeof(delta), - typeof(normalized_density_gradient), - typeof(correction_matrix)}(delta, correction_matrix, - normalized_density_gradient) - end -end - -function DensityDiffusionAntuono(initial_condition; delta) - NDIMS = ndims(initial_condition) - ELTYPE = eltype(initial_condition) - correction_matrix = Array{ELTYPE, 3}(undef, NDIMS, NDIMS, - nparticles(initial_condition)) - - normalized_density_gradient = Array{ELTYPE, 2}(undef, NDIMS, - nparticles(initial_condition)) - - return DensityDiffusionAntuono(delta, correction_matrix, normalized_density_gradient) -end - -@inline Base.ndims(::DensityDiffusionAntuono{NDIMS}) where {NDIMS} = NDIMS - -function Base.show(io::IO, density_diffusion::DensityDiffusionAntuono) - @nospecialize density_diffusion # reduce precompilation time - - print(io, "DensityDiffusionAntuono(") - print(io, density_diffusion.delta) - print(io, ")") -end - -@inline function density_diffusion_psi(density_diffusion::DensityDiffusionAntuono, - rho_a, rho_b, - pos_diff, distance, system, particle, neighbor) - (; normalized_density_gradient) = density_diffusion - - normalized_gradient_a = extract_svector(normalized_density_gradient, system, particle) - normalized_gradient_b = extract_svector(normalized_density_gradient, system, neighbor) - - # Fist term by Molteni & Colagrossi - result = 2 * (rho_a - rho_b) - - # Second correction term - result -= dot(normalized_gradient_a + normalized_gradient_b, pos_diff) - - return result * pos_diff / distance^2 -end - -function update!(density_diffusion::DensityDiffusionAntuono, neighborhood_search, - v, u, system, semi) - (; normalized_density_gradient) = density_diffusion - - # Compute correction matrix - density_fun = @inline(particle->particle_density(v, system, particle)) - system_coords = current_coordinates(u, system) - - compute_gradient_correction_matrix!(density_diffusion.correction_matrix, - neighborhood_search, system, - system_coords, density_fun) - - # Compute normalized density gradient - set_zero!(normalized_density_gradient) - - for_particle_neighbor(system, system, system_coords, system_coords, - neighborhood_search) do particle, neighbor, pos_diff, distance - # Only consider particles with a distance > 0 - distance < sqrt(eps()) && return - - rho_a = particle_density(v, system, particle) - rho_b = particle_density(v, system, neighbor) - - grad_kernel = smoothing_kernel_grad(system, pos_diff, distance, particle) - L = correction_matrix(density_diffusion, particle) - - m_b = hydrodynamic_mass(system, neighbor) - volume_b = m_b / rho_b - - normalized_gradient = -(rho_a - rho_b) * L * grad_kernel * volume_b - - for i in eachindex(normalized_gradient) - normalized_density_gradient[i, particle] += normalized_gradient[i] - end - end - - return density_diffusion -end - -@inline function density_diffusion!(dv, density_diffusion::DensityDiffusion, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - m_b, rho_a, rho_b, - particle_system::FluidSystem, - neighbor_system::FluidSystem, - grad_kernel) - # Density diffusion terms are all zero for distance zero - distance < sqrt(eps()) && return - - (; delta) = density_diffusion - (; smoothing_length, state_equation) = particle_system - (; sound_speed) = state_equation - - volume_b = m_b / rho_b - - psi = density_diffusion_psi(density_diffusion, rho_a, rho_b, pos_diff, distance, - particle_system, particle, neighbor) - density_diffusion_term = dot(psi, grad_kernel) * volume_b - - dv[end, particle] += delta * smoothing_length * sound_speed * density_diffusion_term -end - -# Density diffusion `nothing` or interaction other than fluid-fluid -@inline function density_diffusion!(dv, density_diffusion, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - m_b, rho_a, rho_b, - particle_system, neighbor_system, grad_kernel) - return dv -end diff --git a/src/schemes/fluid/weakly_compressible_sph/rhs.jl b/src/schemes/fluid/weakly_compressible_sph/rhs.jl index 5f1c41912..40a72cbee 100644 --- a/src/schemes/fluid/weakly_compressible_sph/rhs.jl +++ b/src/schemes/fluid/weakly_compressible_sph/rhs.jl @@ -1,135 +1,128 @@ -# Computes the forces that particles in `particle_system` experience from particles -# in `neighbor_system` and updates `dv` accordingly. -# It takes into account pressure forces, viscosity, and for `ContinuityDensity` updates the density -# using the continuity equation. +# Fluid-fluid interaction function interact!(dv, v_particle_system, u_particle_system, v_neighbor_system, u_neighbor_system, neighborhood_search, particle_system::WeaklyCompressibleSPHSystem, - neighbor_system) - (; density_calculator, state_equation, correction, surface_tension) = particle_system - (; sound_speed) = state_equation - - surface_tension_a = surface_tension_model(particle_system) - surface_tension_b = surface_tension_model(neighbor_system) + neighbor_system::WeaklyCompressibleSPHSystem) + @unpack density_calculator, state_equation, viscosity, + smoothing_length = particle_system system_coords = current_coordinates(u_particle_system, particle_system) - neighbor_system_coords = current_coordinates(u_neighbor_system, neighbor_system) - - # In order to visualize quantities like pressure forces or viscosity forces, uncomment - # the following code and the two other lines below that are marked as "debug example". - # debug_array = zeros(ndims(particle_system), nparticles(particle_system)) + neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) # Loop over all pairs of particles and neighbors within the kernel cutoff. for_particle_neighbor(particle_system, neighbor_system, - system_coords, neighbor_system_coords, + system_coords, neighbor_coords, neighborhood_search) do particle, neighbor, pos_diff, distance + # Only consider particles with a distance > 0. + distance < sqrt(eps()) && return + + # Viscosity + v_diff = current_velocity(v_particle_system, particle_system, particle) - + current_velocity(v_neighbor_system, neighbor_system, neighbor) + rho_a = particle_density(v_particle_system, particle_system, particle) rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) - rho_mean = 0.5 * (rho_a + rho_b) - - # Determine correction values - viscosity_correction, pressure_correction, surface_tension_correction = free_surface_correction(correction, - particle_system, - rho_mean) + rho_mean = (rho_a + rho_b) / 2 - grad_kernel = smoothing_kernel_grad(particle_system, pos_diff, distance, particle) + pi_ab = viscosity(state_equation.sound_speed, v_diff, pos_diff, + distance, rho_mean, smoothing_length) - m_a = hydrodynamic_mass(particle_system, particle) - m_b = hydrodynamic_mass(neighbor_system, neighbor) + # Pressure forces + grad_kernel = smoothing_kernel_grad(particle_system, pos_diff, distance) + m_b = neighbor_system.mass[neighbor] + dv_pressure = -m_b * + (particle_system.pressure[particle] / rho_a^2 + + neighbor_system.pressure[neighbor] / rho_b^2) * grad_kernel + dv_viscosity = -m_b * pi_ab * grad_kernel - # The following call is equivalent to - # `p_a = particle_pressure(v_particle_system, particle_system, particle)` - # `p_b = particle_pressure(v_neighbor_system, neighbor_system, neighbor)` - # Only when the neighbor system is a `BoundarySPHSystem` or a `TotalLagrangianSPHSystem` - # with the boundary model `PressureMirroring`, this will return `p_b = p_a`, which is - # the pressure of the fluid particle. - p_a, p_b = particle_neighbor_pressure(v_particle_system, v_neighbor_system, - particle_system, neighbor_system, - particle, neighbor) - - dv_pressure = pressure_correction * - pressure_acceleration(particle_system, neighbor_system, neighbor, - m_a, m_b, p_a, p_b, rho_a, rho_b, pos_diff, - distance, grad_kernel, correction) - - dv_viscosity_ = viscosity_correction * - dv_viscosity(particle_system, neighbor_system, - v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, - sound_speed, m_a, m_b, rho_mean) - - dv_surface_tension = surface_tension_correction * - surface_tension_force(surface_tension_a, surface_tension_b, - particle_system, neighbor_system, - particle, neighbor, pos_diff, distance) - - dv_adhesion = adhesion_force(surface_tension, particle_system, neighbor_system, - particle, neighbor, pos_diff, distance) - - @inbounds for i in 1:ndims(particle_system) - dv[i, particle] += dv_pressure[i] + dv_viscosity_[i] + dv_surface_tension[i] + - dv_adhesion[i] - # Debug example - # debug_array[i, particle] += dv_pressure[i] + for i in 1:ndims(particle_system) + dv[i, particle] += dv_pressure[i] + dv_viscosity[i] end - # TODO If variable smoothing_length is used, this should use the neighbor smoothing length - continuity_equation!(dv, density_calculator, v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, m_b, rho_a, rho_b, - particle_system, neighbor_system, grad_kernel) + continuity_equation!(dv, density_calculator, + v_particle_system, v_neighbor_system, + particle, neighbor, pos_diff, distance, + particle_system, neighbor_system) end - # Debug example - # periodic_box = neighborhood_search.periodic_box - # Note: this saves a file in every stage of the integrator - # if !@isdefined iter; iter = 0; end - # TODO: This call should use public API. This requires some additional changes to simplify the calls. - # trixi2vtk(v_particle_system, u_particle_system, -1.0, particle_system, periodic_box, debug=debug_array, prefix="debug", iter=iter += 1) return dv end -# With 'SummationDensity', density is calculated in wcsph/system.jl:compute_density! -@inline function continuity_equation!(dv, density_calculator::SummationDensity, +@inline function continuity_equation!(dv, density_calculator::ContinuityDensity, v_particle_system, v_neighbor_system, particle, neighbor, pos_diff, distance, - m_b, rho_a, rho_b, - particle_system, neighbor_system, grad_kernel) + particle_system::WeaklyCompressibleSPHSystem, + neighbor_system) + mass = hydrodynamic_mass(neighbor_system, neighbor) + vdiff = current_velocity(v_particle_system, particle_system, particle) - + current_velocity(v_neighbor_system, neighbor_system, neighbor) + NDIMS = ndims(particle_system) + dv[NDIMS + 1, particle] += sum(mass * vdiff .* + smoothing_kernel_grad(particle_system, pos_diff, + distance)) + return dv end -# This formulation was chosen to be consistent with the used pressure_acceleration formulations. -@inline function continuity_equation!(dv, density_calculator::ContinuityDensity, +@inline function continuity_equation!(dv, density_calculator::SummationDensity, v_particle_system, v_neighbor_system, particle, neighbor, pos_diff, distance, - m_b, rho_a, rho_b, - particle_system::WeaklyCompressibleSPHSystem, - neighbor_system, grad_kernel) - (; density_diffusion) = particle_system + particle_system, neighbor_system) + return dv +end - vdiff = current_velocity(v_particle_system, particle_system, particle) - - current_velocity(v_neighbor_system, neighbor_system, neighbor) +# Fluid-boundary and fluid-solid interaction +function interact!(dv, v_particle_system, u_particle_system, + v_neighbor_system, u_neighbor_system, neighborhood_search, + particle_system::WeaklyCompressibleSPHSystem, + neighbor_system::Union{BoundarySPHSystem, TotalLagrangianSPHSystem}) + @unpack density_calculator, state_equation, viscosity, + smoothing_length = particle_system + @unpack sound_speed = state_equation - dv[end, particle] += rho_a / rho_b * m_b * dot(vdiff, grad_kernel) + system_coords = current_coordinates(u_particle_system, particle_system) + neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - density_diffusion!(dv, density_diffusion, v_particle_system, v_neighbor_system, - particle, neighbor, pos_diff, distance, m_b, rho_a, rho_b, - particle_system, neighbor_system, grad_kernel) -end + # Loop over all pairs of particles and neighbors within the kernel cutoff. + for_particle_neighbor(particle_system, neighbor_system, + system_coords, neighbor_coords, + neighborhood_search) do particle, neighbor, pos_diff, distance + # Only consider particles with a distance > 0. + distance < sqrt(eps()) && return -@inline function particle_neighbor_pressure(v_particle_system, v_neighbor_system, - particle_system, neighbor_system, - particle, neighbor) - p_a = particle_pressure(v_particle_system, particle_system, particle) - p_b = particle_pressure(v_neighbor_system, neighbor_system, neighbor) + # In fluid-solid interaction, use the "hydrodynamic mass" of the solid particles + # corresponding to the rest density of the fluid and not the material density. + m_b = hydrodynamic_mass(neighbor_system, neighbor) - return p_a, p_b -end + # Viscosity + v_a = current_velocity(v_particle_system, particle_system, particle) + v_b = current_velocity(v_neighbor_system, neighbor_system, neighbor) + v_diff = v_a - v_b -@inline function particle_neighbor_pressure(v_particle_system, v_neighbor_system, - particle_system, - neighbor_system::BoundarySPHSystem{<:BoundaryModelDummyParticles{PressureMirroring}}, - particle, neighbor) - p_a = particle_pressure(v_particle_system, particle_system, particle) + rho_a = particle_density(v_particle_system, particle_system, particle) + rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) + rho_mean = (rho_a + rho_b) / 2 + + pi_ab = viscosity(sound_speed, v_diff, pos_diff, distance, rho_mean, + smoothing_length) + dv_viscosity = -m_b * pi_ab * + smoothing_kernel_grad(particle_system, pos_diff, distance) - return p_a, p_a + # Boundary forces + dv_boundary = boundary_particle_impact(particle, neighbor, + v_particle_system, v_neighbor_system, + particle_system, neighbor_system, + pos_diff, distance, m_b) + + for i in 1:ndims(particle_system) + dv[i, particle] += dv_boundary[i] + dv_viscosity[i] + end + + continuity_equation!(dv, density_calculator, + v_particle_system, v_neighbor_system, + particle, neighbor, pos_diff, distance, + particle_system, neighbor_system) + end + + return dv end diff --git a/src/schemes/fluid/weakly_compressible_sph/state_equations.jl b/src/schemes/fluid/weakly_compressible_sph/state_equations.jl index ea0f7d2ef..4f8e8e8dd 100644 --- a/src/schemes/fluid/weakly_compressible_sph/state_equations.jl +++ b/src/schemes/fluid/weakly_compressible_sph/state_equations.jl @@ -1,51 +1,86 @@ @doc raw""" - StateEquationCole(; sound_speed, reference_density, exponent, - background_pressure=0.0, clip_negative_pressure=false) + StateEquationIdealGas(sound_speed, reference_density, reference_pressure; + background_pressure=0.0) -Equation of state to describe the relationship between pressure and density -of water up to high pressures. - -# Keywords -- `sound_speed`: Artificial speed of sound. -- `reference_density`: Reference density of the fluid. -- `exponent`: A value of `7` is usually used for most simulations. -- `background_pressure=0.0`: Background pressure. +Equation of state to describe a linear relationship between pressure and density as +```math +p = c^2 (\rho - \rho_0) + p_0 - p_{\text{background}}, +``` +where ``c`` denotes the speed of sound, ``\rho`` the density, ``p`` the pressure, +``\rho_0`` an arbitrary reference density, ``p_0`` the pressure +at the reference density, and ``p_{\text{background}}`` the atmospheric or +background pressure (to be used with free surfaces). """ -struct StateEquationCole{ELTYPE, CLIP} # Boolean to clip negative pressure +struct StateEquationIdealGas{ELTYPE} sound_speed :: ELTYPE - exponent :: ELTYPE reference_density :: ELTYPE + reference_pressure :: ELTYPE background_pressure :: ELTYPE - function StateEquationCole(; sound_speed, reference_density, exponent, - background_pressure=0.0, clip_negative_pressure=false) - new{typeof(sound_speed), - clip_negative_pressure}(sound_speed, exponent, reference_density, - background_pressure) + function StateEquationIdealGas(sound_speed, reference_density, reference_pressure; + background_pressure=0.0) + new{typeof(sound_speed)}(sound_speed, reference_density, reference_pressure, + background_pressure) end end -clip_negative_pressure(::StateEquationCole{<:Any, CLIP}) where {CLIP} = CLIP +function (state_equation::StateEquationIdealGas)(density) + @unpack sound_speed, reference_density, reference_pressure, background_pressure = state_equation -function (state_equation::StateEquationCole)(density) - (; sound_speed, exponent, reference_density, background_pressure) = state_equation + # Limit pressure to be non-negative to avoid negative pressures at free surfaces + return max(sound_speed^2 * (density - reference_density) + reference_pressure - + background_pressure, 0.0) +end + +@doc raw""" + StateEquationCole(sound_speed, gamma, reference_density, reference_pressure; + background_pressure=0.0) + +Equation of state to describe the relationship between pressure and density +of water up to high pressures by Cole (Cole 1948, pp. 39 and 43). +The pressure ``p`` is calculated as +```math +p = \frac{\rho_0 c^2}{\gamma} \left(\left(\frac{\rho}{\rho_0}\right)^\gamma - 1\right) + p_0 - p_{\text{background}}, +``` +where ``c`` denotes the speed of sound, ``\rho`` the density, +``\rho_0`` an arbitrary reference density, ``p_0`` the pressure +at the reference density, and ``p_{\text{background}}`` the atmospheric or +background pressure (to be used with free surfaces). - B = reference_density * sound_speed^2 / exponent - pressure = B * ((density / reference_density)^exponent - 1) + background_pressure +For water, an average value of ``\gamma = 7.15`` is usually used (Cole 1948, p. 39). - # This is determined statically and has therefore no overhead - if clip_negative_pressure(state_equation) - return max(0.0, pressure) +## References: +- Robert H. Cole. "Underwater Explosions". Princeton University Press, 1948. +""" +struct StateEquationCole{ELTYPE} + sound_speed :: ELTYPE + gamma :: ELTYPE + reference_density :: ELTYPE + reference_pressure :: ELTYPE + background_pressure :: ELTYPE + + function StateEquationCole(sound_speed, gamma, reference_density, reference_pressure; + background_pressure=0.0) + new{typeof(sound_speed)}(sound_speed, gamma, reference_density, reference_pressure, + background_pressure) end +end + +function (state_equation::StateEquationCole)(density) + @unpack sound_speed, gamma, reference_density, reference_pressure, background_pressure = state_equation - return pressure + # Limit pressure to be non-negative to avoid negative pressures at free surfaces + return max(reference_density * sound_speed^2 / gamma * + ((density / reference_density)^gamma - 1) + + reference_pressure - background_pressure, 0.0) end function inverse_state_equation(state_equation::StateEquationCole, pressure) - (; sound_speed, exponent, reference_density, background_pressure) = state_equation + @unpack sound_speed, gamma, reference_density, reference_pressure, background_pressure = state_equation - B = reference_density * sound_speed^2 / exponent - tmp = (pressure - background_pressure) / B + 1 + tmp = gamma * (pressure + background_pressure - reference_pressure) / + (reference_density * sound_speed^2) + 1 + density = reference_density * tmp^(1 / gamma) - return reference_density * tmp^(1 / exponent) + return density end diff --git a/src/schemes/fluid/weakly_compressible_sph/system.jl b/src/schemes/fluid/weakly_compressible_sph/system.jl index 44e71695b..edd56ca24 100644 --- a/src/schemes/fluid/weakly_compressible_sph/system.jl +++ b/src/schemes/fluid/weakly_compressible_sph/system.jl @@ -2,156 +2,71 @@ WeaklyCompressibleSPHSystem(initial_condition, density_calculator, state_equation, smoothing_kernel, smoothing_length; - viscosity=nothing, density_diffusion=nothing, - acceleration=ntuple(_ -> 0.0, NDIMS), - buffer_size=nothing, - correction=nothing, source_terms=nothing) - -System for particles of a fluid. -The weakly compressible SPH (WCSPH) scheme is used, wherein a stiff equation of state -generates large pressure changes for small density variations. -See [Weakly Compressible SPH](@ref wcsph) for more details on the method. - -# Arguments -- `initial_condition`: [`InitialCondition`](@ref) representing the system's particles. -- `density_calculator`: Density calculator for the system. - See [`ContinuityDensity`](@ref) and [`SummationDensity`](@ref). -- `state_equation`: Equation of state for the system. See [`StateEquationCole`](@ref). -- `smoothing_kernel`: Smoothing kernel to be used for this system. - See [Smoothing Kernels](@ref smoothing_kernel). -- `smoothing_length`: Smoothing length to be used for this system. - See [Smoothing Kernels](@ref smoothing_kernel). - -# Keyword Arguments -- `viscosity`: Viscosity model for this system (default: no viscosity). - See [`ArtificialViscosityMonaghan`](@ref) or [`ViscosityAdami`](@ref). -- `density_diffusion`: Density diffusion terms for this system. See [`DensityDiffusion`](@ref). -- `acceleration`: Acceleration vector for the system. (default: zero vector) -- `buffer_size`: Number of buffer particles. - This is needed when simulating with [`OpenBoundarySPHSystem`](@ref). -- `correction`: Correction method used for this system. (default: no correction, see [Corrections](@ref corrections)) -- `source_terms`: Additional source terms for this system. Has to be either `nothing` - (by default), or a function of `(coords, velocity, density, pressure)` - (which are the quantities of a single particle), returning a `Tuple` - or `SVector` that is to be added to the acceleration of that particle. - See, for example, [`SourceTermDamping`](@ref). - Note that these source terms will not be used in the calculation of the - boundary pressure when using a boundary with - [`BoundaryModelDummyParticles`](@ref) and [`AdamiPressureExtrapolation`](@ref). - The keyword argument `acceleration` should be used instead for - gravity-like source terms. -- `surface_tension`: Surface tension model used for this SPH system. (default: no surface tension) - - + viscosity=NoViscosity(), + acceleration=ntuple(_ -> 0.0, NDIMS)) + +Weakly compressible SPH introduced by (Monaghan, 1994). This formulation relies on a stiff +equation of state (see [`StateEquationCole`](@ref)) that generates large pressure changes +for small density variations. For the choice of the appropriate `density_calculator` +see [`ContinuityDensity`](@ref) and [`SummationDensity`](@ref). + +## References: +- Joseph J. Monaghan. "Simulating Free Surface Flows in SPH". + In: Journal of Computational Physics 110 (1994), pages 399-406. + [doi: 10.1006/jcph.1994.1034](https://doi.org/10.1006/jcph.1994.1034) """ -struct WeaklyCompressibleSPHSystem{NDIMS, ELTYPE <: Real, IC, MA, P, DC, SE, K, - V, DD, COR, PF, ST, B, SRFT, C} <: FluidSystem{NDIMS, IC} - initial_condition :: IC - mass :: MA # Array{ELTYPE, 1} - pressure :: P # Array{ELTYPE, 1} - density_calculator :: DC - state_equation :: SE - smoothing_kernel :: K - smoothing_length :: ELTYPE - acceleration :: SVector{NDIMS, ELTYPE} - viscosity :: V - density_diffusion :: DD - correction :: COR - pressure_acceleration_formulation :: PF - source_terms :: ST - surface_tension :: SRFT - buffer :: B - cache :: C -end +struct WeaklyCompressibleSPHSystem{NDIMS, ELTYPE <: Real, DC, SE, K, V, C} <: System{NDIMS} + initial_condition :: InitialCondition{ELTYPE} + mass :: Array{ELTYPE, 1} # [particle] + pressure :: Array{ELTYPE, 1} # [particle] + density_calculator :: DC + state_equation :: SE + smoothing_kernel :: K + smoothing_length :: ELTYPE + viscosity :: V + acceleration :: SVector{NDIMS, ELTYPE} + cache :: C + + function WeaklyCompressibleSPHSystem(initial_condition, + density_calculator, state_equation, + smoothing_kernel, smoothing_length; + viscosity=NoViscosity(), + acceleration=ntuple(_ -> 0.0, + ndims(smoothing_kernel))) + NDIMS = ndims(initial_condition) + ELTYPE = eltype(initial_condition) + n_particles = nparticles(initial_condition) + + mass = copy(initial_condition.mass) + pressure = Vector{ELTYPE}(undef, n_particles) + + if ndims(smoothing_kernel) != NDIMS + throw(ArgumentError("smoothing kernel dimensionality must be $NDIMS for a $(NDIMS)D problem")) + end -# The default constructor needs to be accessible for Adapt.jl to work with this struct. -# See the comments in general/gpu.jl for more details. -function WeaklyCompressibleSPHSystem(initial_condition, - density_calculator, state_equation, - smoothing_kernel, smoothing_length; - pressure_acceleration=nothing, - buffer_size=nothing, - viscosity=nothing, density_diffusion=nothing, - acceleration=ntuple(_ -> 0.0, - ndims(smoothing_kernel)), - correction=nothing, source_terms=nothing, - surface_tension=nothing) - buffer = isnothing(buffer_size) ? nothing : - SystemBuffer(nparticles(initial_condition), buffer_size) - - initial_condition = allocate_buffer(initial_condition, buffer) - - NDIMS = ndims(initial_condition) - ELTYPE = eltype(initial_condition) - n_particles = nparticles(initial_condition) - - mass = copy(initial_condition.mass) - pressure = similar(initial_condition.pressure) - - if ndims(smoothing_kernel) != NDIMS - throw(ArgumentError("smoothing kernel dimensionality must be $NDIMS for a $(NDIMS)D problem")) - end + # Make acceleration an SVector + acceleration_ = SVector(acceleration...) + if length(acceleration_) != NDIMS + throw(ArgumentError("`acceleration` must be of length $NDIMS for a $(NDIMS)D problem")) + end - # Make acceleration an SVector - acceleration_ = SVector(acceleration...) - if length(acceleration_) != NDIMS - throw(ArgumentError("`acceleration` must be of length $NDIMS for a $(NDIMS)D problem")) - end + cache = create_cache(n_particles, ELTYPE, density_calculator) - if correction isa ShepardKernelCorrection && - density_calculator isa ContinuityDensity - throw(ArgumentError("`ShepardKernelCorrection` cannot be used with `ContinuityDensity`")) + return new{NDIMS, ELTYPE, typeof(density_calculator), typeof(state_equation), + typeof(smoothing_kernel), typeof(viscosity), typeof(cache) + }(initial_condition, mass, pressure, density_calculator, state_equation, + smoothing_kernel, smoothing_length, viscosity, acceleration_, cache) end - - pressure_acceleration = choose_pressure_acceleration_formulation(pressure_acceleration, - density_calculator, - NDIMS, ELTYPE, - correction) - - cache = create_cache_density(initial_condition, density_calculator) - cache = (; - create_cache_wcsph(correction, initial_condition.density, NDIMS, - n_particles)..., cache...) - cache = (; - create_cache_wcsph(surface_tension, ELTYPE, NDIMS, n_particles)..., - cache...) - - return WeaklyCompressibleSPHSystem(initial_condition, mass, pressure, - density_calculator, state_equation, - smoothing_kernel, smoothing_length, - acceleration_, viscosity, - density_diffusion, correction, - pressure_acceleration, - source_terms, surface_tension, buffer, cache) end -create_cache_wcsph(correction, density, NDIMS, nparticles) = (;) +function create_cache(n_particles, ELTYPE, ::SummationDensity) + density = Vector{ELTYPE}(undef, n_particles) -function create_cache_wcsph(::ShepardKernelCorrection, density, NDIMS, n_particles) - return (; kernel_correction_coefficient=similar(density)) + return (; density) end -function create_cache_wcsph(::KernelCorrection, density, NDIMS, n_particles) - dw_gamma = Array{Float64}(undef, NDIMS, n_particles) - return (; kernel_correction_coefficient=similar(density), dw_gamma) -end - -function create_cache_wcsph(::Union{GradientCorrection, BlendedGradientCorrection}, density, - NDIMS, n_particles) - correction_matrix = Array{Float64, 3}(undef, NDIMS, NDIMS, n_particles) - return (; correction_matrix) -end - -function create_cache_wcsph(::MixedKernelGradientCorrection, density, NDIMS, n_particles) - dw_gamma = Array{Float64}(undef, NDIMS, n_particles) - correction_matrix = Array{Float64, 3}(undef, NDIMS, NDIMS, n_particles) - - return (; kernel_correction_coefficient=similar(density), dw_gamma, correction_matrix) -end - -function create_cache_wcsph(::SurfaceTensionAkinci, ELTYPE, NDIMS, nparticles) - surface_normal = Array{ELTYPE, 2}(undef, NDIMS, nparticles) - return (; surface_normal) +function create_cache(n_particles, ELTYPE, ::ContinuityDensity) + return (;) end function Base.show(io::IO, system::WeaklyCompressibleSPHSystem) @@ -159,14 +74,10 @@ function Base.show(io::IO, system::WeaklyCompressibleSPHSystem) print(io, "WeaklyCompressibleSPHSystem{", ndims(system), "}(") print(io, system.density_calculator) - print(io, ", ", system.correction) print(io, ", ", system.state_equation) print(io, ", ", system.smoothing_kernel) print(io, ", ", system.viscosity) - print(io, ", ", system.density_diffusion) - print(io, ", ", system.surface_tension) print(io, ", ", system.acceleration) - print(io, ", ", system.source_terms) print(io, ") with ", nparticles(system), " particles") end @@ -177,23 +88,13 @@ function Base.show(io::IO, ::MIME"text/plain", system::WeaklyCompressibleSPHSyst show(io, system) else summary_header(io, "WeaklyCompressibleSPHSystem{$(ndims(system))}") - if system.buffer isa SystemBuffer - summary_line(io, "#particles", nparticles(system)) - summary_line(io, "#buffer_particles", system.buffer.buffer_size) - else - summary_line(io, "#particles", nparticles(system)) - end + summary_line(io, "#particles", nparticles(system)) summary_line(io, "density calculator", system.density_calculator |> typeof |> nameof) - summary_line(io, "correction method", - system.correction |> typeof |> nameof) summary_line(io, "state equation", system.state_equation |> typeof |> nameof) summary_line(io, "smoothing kernel", system.smoothing_kernel |> typeof |> nameof) summary_line(io, "viscosity", system.viscosity) - summary_line(io, "density diffusion", system.density_diffusion) - summary_line(io, "surface tension", system.surface_tension) summary_line(io, "acceleration", system.acceleration) - summary_line(io, "source terms", system.source_terms |> typeof |> nameof) summary_footer(io) end end @@ -210,123 +111,104 @@ end return ndims(system) + 1 end -@inline function particle_pressure(v, system::WeaklyCompressibleSPHSystem, particle) - return system.pressure[particle] +@inline function hydrodynamic_mass(system::WeaklyCompressibleSPHSystem, particle) + return system.mass[particle] end -@inline system_sound_speed(system::WeaklyCompressibleSPHSystem) = system.state_equation.sound_speed - -function update_quantities!(system::WeaklyCompressibleSPHSystem, v, u, - v_ode, u_ode, semi, t) - (; density_calculator, density_diffusion, correction) = system +# Nothing to initialize for this system +initialize!(system::WeaklyCompressibleSPHSystem, neighborhood_search) = system - compute_density!(system, u, u_ode, semi, density_calculator) +function update!(system::WeaklyCompressibleSPHSystem, system_index, v, u, v_ode, u_ode, + semi, t) + @unpack density_calculator = system - nhs = get_neighborhood_search(system, semi) - @trixi_timeit timer() "update density diffusion" update!(density_diffusion, nhs, v, u, - system, semi) + compute_quantities(v, u, density_calculator, system, system_index, u_ode, semi) return system end -function update_pressure!(system::WeaklyCompressibleSPHSystem, v, u, v_ode, u_ode, semi, t) - (; density_calculator, correction, surface_tension) = system +function compute_quantities(v, u, ::ContinuityDensity, system, system_index, u_ode, semi) + compute_pressure!(system, v) +end - compute_correction_values!(system, correction, u, v_ode, u_ode, semi) +function compute_quantities(v, u, ::SummationDensity, system, system_index, u_ode, semi) + @unpack systems, neighborhood_searches = semi + @unpack cache = system + @unpack density = cache # Density is in the cache for SummationDensity - compute_gradient_correction_matrix!(correction, system, u, v_ode, u_ode, semi) + density .= zero(eltype(density)) - # `kernel_correct_density!` only performed for `SummationDensity` - kernel_correct_density!(system, v, u, v_ode, u_ode, semi, correction, - density_calculator) - compute_pressure!(system, v) - compute_surface_normal!(system, surface_tension, v, u, v_ode, u_ode, semi, t) + # Use all other systems for the density summation + @trixi_timeit timer() "compute density" foreach_enumerate(systems) do (neighbor_system_index, + neighbor_system) + u_neighbor_system = wrap_u(u_ode, neighbor_system_index, + neighbor_system, semi) - return system -end + system_coords = current_coordinates(u, system) + neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) -function kernel_correct_density!(system::WeaklyCompressibleSPHSystem, v, u, v_ode, u_ode, - semi, correction, density_calculator) - return system -end + neighborhood_search = neighborhood_searches[system_index][neighbor_system_index] -function kernel_correct_density!(system::WeaklyCompressibleSPHSystem, v, u, v_ode, u_ode, - semi, corr::ShepardKernelCorrection, ::SummationDensity) - system.cache.density ./= system.cache.kernel_correction_coefficient -end + # Loop over all pairs of particles and neighbors within the kernel cutoff. + for_particle_neighbor(system, neighbor_system, + system_coords, neighbor_coords, + neighborhood_search) do particle, neighbor, pos_diff, distance + mass = hydrodynamic_mass(neighbor_system, neighbor) + density[particle] += mass * smoothing_kernel(system, distance) + end + end -function compute_gradient_correction_matrix!(correction, - system::WeaklyCompressibleSPHSystem, u, - v_ode, u_ode, semi) - return system + compute_pressure!(system, v) end -function compute_gradient_correction_matrix!(corr::Union{GradientCorrection, - BlendedGradientCorrection, - MixedKernelGradientCorrection}, - system::WeaklyCompressibleSPHSystem, u, - v_ode, u_ode, semi) - (; cache, correction, smoothing_kernel, smoothing_length) = system - (; correction_matrix) = cache - - system_coords = current_coordinates(u, system) +function compute_pressure!(system, v) + @unpack state_equation, pressure = system - compute_gradient_correction_matrix!(correction_matrix, system, system_coords, - v_ode, u_ode, semi, correction, smoothing_length, - smoothing_kernel) + # Note that @threaded makes this slower + for particle in eachparticle(system) + pressure[particle] = state_equation(particle_density(v, system, particle)) + end end -function reinit_density!(vu_ode, semi) - v_ode, u_ode = vu_ode.x - - foreach_system(semi) do system - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) +function write_u0!(u0, system::WeaklyCompressibleSPHSystem) + @unpack initial_condition = system - reinit_density!(system, v, u, v_ode, u_ode, semi) + for particle in eachparticle(system) + # Write particle coordinates + for dim in 1:ndims(system) + u0[dim, particle] = initial_condition.coordinates[dim, particle] + end end - return vu_ode + return u0 end -function reinit_density!(system::WeaklyCompressibleSPHSystem, v, u, - v_ode, u_ode, semi) - # Compute density with `SummationDensity` and store the result in `v`, - # overwriting the previous integrated density. - summation_density!(system, semi, u, u_ode, v[end, :]) - - # Apply `ShepardKernelCorrection` - kernel_correction_coefficient = zeros(size(v[end, :])) - compute_shepard_coeff!(system, current_coordinates(u, system), v_ode, u_ode, semi, - kernel_correction_coefficient) - v[end, :] ./= kernel_correction_coefficient +function write_v0!(v0, system::WeaklyCompressibleSPHSystem) + @unpack initial_condition, density_calculator = system - compute_pressure!(system, v) + for particle in eachparticle(system) + # Write particle velocities + for dim in 1:ndims(system) + v0[dim, particle] = initial_condition.velocity[dim, particle] + end + end - return system -end + write_v0!(v0, density_calculator, system) -function reinit_density!(system, v, u, v_ode, u_ode, semi) - return system + return v0 end -function compute_pressure!(system, v) - @threaded system for particle in eachparticle(system) - apply_state_equation!(system, particle_density(v, system, particle), particle) - end +function write_v0!(v0, ::SummationDensity, system::WeaklyCompressibleSPHSystem) + return v0 end -# Use this function to avoid passing closures to Polyester.jl with `@batch` (`@threaded`). -# Otherwise, `@threaded` does not work here with Julia ARM on macOS. -# See https://github.com/JuliaSIMD/Polyester.jl/issues/88. -@inline function apply_state_equation!(system::WeaklyCompressibleSPHSystem, density, - particle) - system.pressure[particle] = system.state_equation(density) -end +function write_v0!(v0, ::ContinuityDensity, system::WeaklyCompressibleSPHSystem) + @unpack initial_condition = system -function write_v0!(v0, system::WeaklyCompressibleSPHSystem, ::ContinuityDensity) - # Note that `.=` is very slightly faster, but not GPU-compatible - v0[end, :] = system.initial_condition.density + for particle in eachparticle(system) + # Set particle densities + v0[ndims(system) + 1, particle] = initial_condition.density[particle] + end return v0 end @@ -351,43 +233,3 @@ function restart_with!(system, ::ContinuityDensity, v, u) return system end - -@inline function correction_matrix(system::WeaklyCompressibleSPHSystem, particle) - extract_smatrix(system.cache.correction_matrix, system, particle) -end - -function compute_surface_normal!(system, surface_tension, v, u, v_ode, u_ode, semi, t) - return system -end - -function compute_surface_normal!(system, surface_tension::SurfaceTensionAkinci, v, u, v_ode, - u_ode, semi, t) - (; cache) = system - - # Reset surface normal - set_zero!(cache.surface_normal) - - @trixi_timeit timer() "compute surface normal" foreach_system(semi) do neighbor_system - u_neighbor_system = wrap_u(u_ode, neighbor_system, semi) - v_neighbor_system = wrap_v(v_ode, neighbor_system, semi) - nhs = get_neighborhood_search(system, semi) - - calc_normal_akinci!(system, neighbor_system, surface_tension, u, v_neighbor_system, - u_neighbor_system, nhs) - end - return system -end - -@inline function surface_normal(::SurfaceTensionAkinci, particle_system::FluidSystem, - particle) - (; cache) = particle_system - return extract_svector(cache.surface_normal, particle_system, particle) -end - -@inline function surface_tension_model(system::WeaklyCompressibleSPHSystem) - return system.surface_tension -end - -@inline function surface_tension_model(system) - return nothing -end diff --git a/src/schemes/fluid/weakly_compressible_sph/viscosity.jl b/src/schemes/fluid/weakly_compressible_sph/viscosity.jl new file mode 100644 index 000000000..4d1c678f3 --- /dev/null +++ b/src/schemes/fluid/weakly_compressible_sph/viscosity.jl @@ -0,0 +1,62 @@ +struct NoViscosity end + +function (::NoViscosity)(c, v_diff, pos_diff, distance, rho_mean, h) + return 0.0 +end + +@doc raw""" + ArtificialViscosityMonaghan(alpha, beta, epsilon=0.01) + +Artificial viscosity by Monaghan (Monaghan 1992, Monaghan 1989), given by +```math +\Pi_{ab} = +\begin{cases} + -(\alpha c \mu_{ab} + \beta \mu_{ab}^2) / \bar{\rho}_{ab} & \text{if } v_{ab} \cdot r_{ab} < 0, \\ + 0 & \text{otherwise} +\end{cases} +``` +with +```math +\mu_{ab} = \frac{h v_{ab} \cdot r_{ab}}{\Vert r_{ab} \Vert^2 + \epsilon h^2}, +``` +where ``\alpha, \beta, \epsilon`` are parameters, ``c`` is the speed of sound, ``h`` is the smoothing length, +``r_{ab} = r_a - r_b`` is the difference of the coordinates of particles ``a`` and ``b``, +``v_{ab} = v_a - v_b`` is the difference of their velocities, +and ``\bar{\rho}_{ab}`` is the arithmetic mean of their densities. + +The choice of the parameters ``\alpha`` and ``\beta`` is not critical, but their values should usually be near +``\alpha = 1, \beta = 2`` (Monaghan 1992, p. 551). +The parameter ``\epsilon`` prevents singularities and is usually chosen as ``\epsilon = 0.01``. + +## References: +- Joseph J. Monaghan. "Smoothed Particle Hydrodynamics". + In: Annual Review of Astronomy and Astrophysics 30.1 (1992), pages 543-574. + [doi: 10.1146/ANNUREV.AA.30.090192.002551](https://doi.org/10.1146/ANNUREV.AA.30.090192.002551) +- Joseph J. Monaghan. "On the Problem of Penetration in Particle Methods". + In: Journal of Computational Physics 82.1, pages 1–15. + [doi: 10.1016/0021-9991(89)90032-6](https://doi.org/10.1016/0021-9991(89)90032-6) +""" +struct ArtificialViscosityMonaghan{ELTYPE} + alpha :: ELTYPE + beta :: ELTYPE + epsilon :: ELTYPE + + function ArtificialViscosityMonaghan(alpha, beta, epsilon=0.01) + new{typeof(alpha)}(alpha, beta, epsilon) + end +end + +function (viscosity::ArtificialViscosityMonaghan)(c, v_diff, pos_diff, distance, + rho_mean, h) + @unpack alpha, beta, epsilon = viscosity + + # v_ab ⋅ r_ab + vr = sum(v_diff .* pos_diff) + + if vr < 0 + mu = h * vr / (distance^2 + epsilon * h^2) + return -(alpha * c * mu + beta * mu^2) / rho_mean + end + + return 0.0 +end diff --git a/src/schemes/fluid/weakly_compressible_sph/weakly_compressible_sph.jl b/src/schemes/fluid/weakly_compressible_sph/weakly_compressible_sph.jl index 1a17c53e0..b4e862e95 100644 --- a/src/schemes/fluid/weakly_compressible_sph/weakly_compressible_sph.jl +++ b/src/schemes/fluid/weakly_compressible_sph/weakly_compressible_sph.jl @@ -1,3 +1,3 @@ include("state_equations.jl") -include("density_diffusion.jl") +include("viscosity.jl") include("system.jl") diff --git a/src/schemes/schemes.jl b/src/schemes/schemes.jl index fadcb240e..f199cbfd6 100644 --- a/src/schemes/schemes.jl +++ b/src/schemes/schemes.jl @@ -1,19 +1,10 @@ # Include all schemes without rhs first. The rhs depends on the systems to define # interactions between the different system types. -# Viscosity requires the open boundary system. -include("boundary/open_boundary/boundary_zones.jl") -include("boundary/open_boundary/system.jl") -include("fluid/fluid.jl") +include("fluid/weakly_compressible_sph/weakly_compressible_sph.jl") include("boundary/boundary.jl") include("solid/total_lagrangian_sph/total_lagrangian_sph.jl") -include("solid/discrete_element_method/discrete_element_method.jl") -# Monaghan-Kajtar repulsive boundary particles require the `BoundarySPHSystem` -# and the `TotalLagrangianSPHSystem`. -include("boundary/monaghan_kajtar/monaghan_kajtar.jl") # Include rhs for all schemes include("fluid/weakly_compressible_sph/rhs.jl") -include("fluid/entropically_damped_sph/rhs.jl") include("boundary/rhs.jl") include("solid/total_lagrangian_sph/rhs.jl") -include("solid/discrete_element_method/rhs.jl") diff --git a/src/schemes/solid/discrete_element_method/discrete_element_method.jl b/src/schemes/solid/discrete_element_method/discrete_element_method.jl deleted file mode 100644 index c67930ab8..000000000 --- a/src/schemes/solid/discrete_element_method/discrete_element_method.jl +++ /dev/null @@ -1 +0,0 @@ -include("system.jl") diff --git a/src/schemes/solid/discrete_element_method/rhs.jl b/src/schemes/solid/discrete_element_method/rhs.jl deleted file mode 100644 index 0362c3a04..000000000 --- a/src/schemes/solid/discrete_element_method/rhs.jl +++ /dev/null @@ -1,110 +0,0 @@ -# Calculate the interaction forces between particles in a Discrete Element Method (DEM) system. -# -# This function loops over all pairs of particles and their neighbors within a set distance. -# When particles overlap (i.e., they come into contact), a normal force is applied to resolve the overlap. -# This force is computed based on Hertzian contact mechanics typical for DEM simulations. -# The force is proportional to the amount of overlap and is directed along the normal between the particle centers. -# The magnitude of the force is determined by the stiffness constant `normal_stiffness` and the overlap distance. -function interact!(dv, v_particle_system, u_particle_system, v_neighbor_system, - u_neighbor_system, neighborhood_search, particle_system::DEMSystem, - neighbor_system::Union{BoundaryDEMSystem, DEMSystem}) - (; damping_coefficient) = particle_system - - E_a = particle_system.elastic_modulus - nu_a = particle_system.poissons_ratio - - system_coords = current_coordinates(u_particle_system, particle_system) - neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) - - for_particle_neighbor(particle_system, neighbor_system, system_coords, neighbor_coords, - neighborhood_search) do particle, neighbor, pos_diff, distance - m_a = particle_system.mass[particle] - - r_a = particle_system.radius[particle] - r_b = neighbor_system.radius[neighbor] - - # Only consider particles with a distance > 0 - distance < sqrt(eps()) && return - - # Calculate the overlap (penetration depth) between the two particles - overlap = r_a + r_b - distance - - # If there's no overlap, no force needs to be applied - overlap <= 0 && return - - # Normal direction from neighbor to particle - normal = pos_diff / distance - - interaction_force = collision_force(particle_system, neighbor_system, overlap, - normal, v_particle_system, - v_neighbor_system, E_a, - nu_a, r_a, r_b, m_a, - damping_coefficient, particle, neighbor) - - # Update the acceleration of the particle based on the force and its mass - for i in 1:ndims(particle_system) - dv[i, particle] += interaction_force[i] / m_a - end - - # TODO: use update callback - position_correction!(neighbor_system, u_particle_system, overlap, normal, particle) - end - - return dv -end - -@inline function collision_force(particle_system, neighbor_system::BoundaryDEMSystem, - overlap, normal, v_particle_system, - v_neighbor_system, E_a, nu_a, - r_a, r_b, m_a, damping_coefficient, - particle, neighbor) - return neighbor_system.normal_stiffness * overlap * normal -end - -@inline function collision_force(particle_system, neighbor_system::DEMSystem, overlap, - normal, v_particle_system, v_neighbor_system, - E_a, nu_a, r_a, r_b, - m_a, damping_coefficient, particle, neighbor) - m_b = neighbor_system.mass[neighbor] - E_b = neighbor_system.elastic_modulus - nu_b = neighbor_system.poissons_ratio - - v_a = current_velocity(v_particle_system, particle_system, particle) - v_b = current_velocity(v_neighbor_system, neighbor_system, neighbor) - - v_ab = v_a - v_b - rel_vel_normal = dot(v_ab, normal) - - # Compute effective modulus for both systems - E_star = 1 / ((1 - nu_a^2) / E_a + (1 - nu_b^2) / E_b) - - # Compute effective radius for the interaction - r_star = (r_a * r_b) / (r_a + r_b) - - # Compute stiffness constant for the interaction - normal_stiffness = (4 / 3) * E_star * sqrt(r_star * overlap) - - # Calculate effective mass for the interaction - m_star = (m_a * m_b) / (m_a + m_b) - - # Calculate critical damping coefficient - gamma_c = 2 * sqrt(m_star * normal_stiffness) - - # Compute the force magnitude using Hertzian contact mechanics with damping - force_magnitude = normal_stiffness * overlap + - damping_coefficient * gamma_c * rel_vel_normal - - return force_magnitude * normal -end - -@inline function position_correction!(neighbor_system, u_particle_system, overlap, normal, - particle) -end - -@inline function position_correction!(neighbor_system::BoundaryDEMSystem, u_particle_system, - overlap, normal, particle) - for i in 1:ndims(neighbor_system) - # Position correction to prevent penetration - u_particle_system[i, particle] -= 0.5 * overlap * normal[i] - end -end diff --git a/src/schemes/solid/discrete_element_method/system.jl b/src/schemes/solid/discrete_element_method/system.jl deleted file mode 100644 index eb30dfb34..000000000 --- a/src/schemes/solid/discrete_element_method/system.jl +++ /dev/null @@ -1,118 +0,0 @@ -""" - DEMSystem(initial_condition, normal_stiffness, elastic_modulus, poissons_ratio; - damping_coefficient=0.0001, acceleration=ntuple(_ -> 0.0, NDIMS), source_terms=nothing) - -Constructs a Discrete Element Method (DEM) system for numerically simulating the dynamics of -granular and particulate matter. DEM is employed to simulate and analyze the motion, -interactions, and collective behavior of assemblies of discrete, solid particles, typically -under mechanical loading. The model accounts for individual particle characteristics -and implements interaction laws that govern contact forces (normal and tangential), based on -specified material properties and contact mechanics. - -# Arguments - - `initial_condition`: Initial condition of the system, encapsulating the initial positions, - velocities, masses, and radii of particles. - - `normal_stiffness`: Normal stiffness coefficient for particle-particle and particle-wall contacts. - - `elastic_modulus`: Elastic modulus for this particle system. - - `poissons_ratio`: Poisson ratio for this particle system. - -# Keywords - - `acceleration`: Global acceleration vector applied to the system, such as gravity. Specified as - an `SVector` of length `NDIMS`, with a default of zero in each dimension. - - `source_terms`: Optional; additional forces or modifications to particle dynamics not - captured by standard DEM interactions, such as electromagnetic forces or user-defined perturbations. - - `damping_coefficient=0.0001`: Set a damping coefficient for the collision interactions. - - !!! warning "Experimental Implementation" - This is an experimental feature and may change in a future releases. -""" -struct DEMSystem{NDIMS, ELTYPE <: Real, IC, ARRAY1D, ST} <: SolidSystem{NDIMS, IC} - initial_condition :: IC - mass :: ARRAY1D # [particle] - radius :: ARRAY1D # [particle] - elastic_modulus :: ELTYPE - poissons_ratio :: ELTYPE - normal_stiffness :: ELTYPE - damping_coefficient :: ELTYPE - acceleration :: SVector{NDIMS, ELTYPE} - source_terms :: ST - buffer :: Nothing - - function DEMSystem(initial_condition, normal_stiffness, elastic_modulus, poissons_ratio; - damping_coefficient=0.0001, - acceleration=ntuple(_ -> 0.0, - ndims(initial_condition)), source_terms=nothing) - NDIMS = ndims(initial_condition) - ELTYPE = eltype(initial_condition) - - mass = copy(initial_condition.mass) - radius = 0.5 * initial_condition.particle_spacing * ones(length(mass)) - - # Make acceleration an SVector - acceleration_ = SVector(acceleration...) - if length(acceleration_) != NDIMS - throw(ArgumentError("`acceleration` must be of length $NDIMS for a $(NDIMS)D problem")) - end - - return new{NDIMS, ELTYPE, typeof(initial_condition), typeof(mass), - typeof(source_terms)}(initial_condition, mass, radius, elastic_modulus, - poissons_ratio, normal_stiffness, - damping_coefficient, acceleration_, source_terms, - nothing) - end -end - -function Base.show(io::IO, system::DEMSystem) - @nospecialize system # reduce precompilation time - - print(io, "DEMSystem{", ndims(system), "}(") - print(io, system.initial_condition) - print(io, ", ", system.elastic_modulus) - print(io, ", ", system.poissons_ratio) - print(io, ", ", system.normal_stiffness) - print(io, ", ", system.damping_coefficient) - print(io, ") with ", TrixiParticles.nparticles(system), " particles") -end - -function Base.show(io::IO, ::MIME"text/plain", system::DEMSystem) - @nospecialize system # reduce precompilation time - - if get(io, :compact, false) - show(io, system) - else - TrixiParticles.summary_header(io, "DEMSystem{$(ndims(system))}") - TrixiParticles.summary_line(io, "#particles", TrixiParticles.nparticles(system)) - TrixiParticles.summary_line(io, "elastic_modulus", system.elastic_modulus) - TrixiParticles.summary_line(io, "poissons_ratio", system.poissons_ratio) - TrixiParticles.summary_line(io, "normal_stiffness", system.normal_stiffness) - TrixiParticles.summary_line(io, "damping_coefficient", system.damping_coefficient) - TrixiParticles.summary_footer(io) - end -end - -timer_name(::DEMSystem) = "solid" - -function TrixiParticles.write_u0!(u0, system::DEMSystem) - u0 .= system.initial_condition.coordinates - return u0 -end - -function TrixiParticles.write_v0!(v0, system::DEMSystem) - v0 .= system.initial_condition.velocity - return v0 -end - -# Nothing to initialize for this system -initialize!(system::DEMSystem, neighborhood_search) = system - -function compact_support(system::DEMSystem, neighbor::DEMSystem) - # we for now assume that the compact support is 3 * radius - # todo: needs to be changed for more complex simulations - return 3 * max(maximum(system.radius), maximum(neighbor.radius)) -end - -function compact_support(system::DEMSystem, neighbor) - # we for now assume that the compact support is 3 * radius - # todo: needs to be changed for more complex simulations - return 3 * maximum(system.radius) -end diff --git a/src/schemes/solid/total_lagrangian_sph/penalty_force.jl b/src/schemes/solid/total_lagrangian_sph/penalty_force.jl index 04f3d9890..9740d36d6 100644 --- a/src/schemes/solid/total_lagrangian_sph/penalty_force.jl +++ b/src/schemes/solid/total_lagrangian_sph/penalty_force.jl @@ -3,9 +3,46 @@ Penalty force to ensure regular particle positions under large deformations. -# Keywords -- `alpha`: Coefficient to control the amplitude of hourglass correction. +In FEM, underintegrated elements can deform without an associated increase of energy. +This is caused by the stiffness matrix having zero eigenvalues (so-called hourglass modes). +The name "hourglass modes" comes from the fact that elements can deform into an hourglass shape. +Similar effects can occur in SPH as well. +Particles can change positions without changing the SPH approximation of the deformation gradient $\bm{J}$, +thus, without causing an increase of energy. +To ensure regular particle positions, we can apply similar correction forces as are used in FEM. + +(Ganzenmüller, 2015) introduced a so-called hourglass correction force or penalty force $f^{PF}$, +which is given by +```math +\bm{f}_a^{PF} = \frac{1}{2} \alpha \sum_b \frac{m_{0a} m_{0b} W_{0ab}}{\rho_{0a}\rho_{0b} |\bm{X}_{ab}|^2} + \left( E \delta_{ab}^a + E \delta_{ba}^b \right) \frac{\bm{x}_{ab}}{|\bm{x}_{ab}|} +``` +The subscripts $a$ and $b$ denote quantities of particle $a$ and $b$, respectively. +The zero subscript on quantities denotes that the quantity is to be measured in the initial configuration. +The difference in the initial coordinates is denoted by $\bm{X}_{ab} = \bm{X}_a - \bm{X}_b$, +the difference in the current coordinates is denoted by $\bm{x}_{ab} = \bm{x}_a - \bm{x}_b$. +Note that (Ganzenmüller, 2015) has a flipped sign here because they define $\bm{x}_{ab}$ the other way around. + +This correction force is based on the potential energy density of a Hookean material. +Thus, $E$ is the Young's modulus and $\alpha$ is a dimensionless coefficient that controls +the amplitude of hourglass correction. +The separation vector $\delta_{ab}^a$ indicates the change of distance which the particle separation should attain +in order to minimize the error and is given by +```math + \delta_{ab}^a = \frac{\bm{\epsilon}_{ab}^a \cdot \bm{x_{ab}}}{|\bm{x}_{ab}|}, +``` +where the error vector is defined as +```math + \bm{\epsilon}_{ab}^a = \bm{J}_a \bm{X}_{ab} - \bm{x}_{ab}. +``` + + +## References: +- Georg C. Ganzenmüller. + "An hourglass control algorithm for Lagrangian Smooth Particle Hydrodynamics". + In: Computer Methods in Applied Mechanics and Engineering 286 (2015). + [doi: 10.1016/j.cma.2014.12.005](https://doi.org/10.1016/j.cma.2014.12.005) """ struct PenaltyForceGanzenmueller{ELTYPE} alpha::ELTYPE @@ -15,18 +52,18 @@ struct PenaltyForceGanzenmueller{ELTYPE} end @inline function calc_penalty_force!(dv, particle, neighbor, initial_pos_diff, - initial_distance, system, m_a, m_b, rho_a, rho_b, + initial_distance, system, penalty_force::PenaltyForceGanzenmueller) - (; young_modulus) = system + @unpack mass, material_density, current_coordinates, young_modulus = system current_pos_diff = current_coords(system, particle) - current_coords(system, neighbor) current_distance = norm(current_pos_diff) - volume_particle = m_a / rho_a - volume_neighbor = m_b / rho_b + volume_particle = mass[particle] / material_density[particle] + volume_neighbor = mass[neighbor] / material_density[neighbor] - kernel_weight = smoothing_kernel(system, initial_distance) + kernel_ = smoothing_kernel(system, initial_distance) J_a = deformation_gradient(system, particle) J_b = deformation_gradient(system, neighbor) @@ -36,12 +73,12 @@ end delta_sum = dot(eps_sum, current_pos_diff) / current_distance f = 0.5 * penalty_force.alpha * volume_particle * volume_neighbor * - kernel_weight / initial_distance^2 * young_modulus * delta_sum * + kernel_ / initial_distance^2 * young_modulus * delta_sum * current_pos_diff / current_distance - @inbounds for i in 1:ndims(system) + for i in 1:ndims(system) # Divide force by mass to obtain acceleration - dv[i, particle] += f[i] / m_a + dv[i, particle] += f[i] / mass[particle] end return dv diff --git a/src/schemes/solid/total_lagrangian_sph/rhs.jl b/src/schemes/solid/total_lagrangian_sph/rhs.jl index 36c8fd286..cc1a1c9c4 100644 --- a/src/schemes/solid/total_lagrangian_sph/rhs.jl +++ b/src/schemes/solid/total_lagrangian_sph/rhs.jl @@ -9,7 +9,7 @@ end # Function barrier without dispatch for unit testing @inline function interact_solid_solid!(dv, neighborhood_search, particle_system, neighbor_system) - (; penalty_force) = particle_system + @unpack penalty_force = particle_system # Different solids do not interact with each other (yet) if particle_system !== neighbor_system @@ -35,7 +35,6 @@ end grad_kernel = smoothing_kernel_grad(particle_system, initial_pos_diff, initial_distance) - m_a = particle_system.mass[particle] m_b = neighbor_system.mass[neighbor] dv_particle = m_b * @@ -43,13 +42,12 @@ end pk1_corrected(neighbor_system, neighbor) / rho_b^2) * grad_kernel - @inbounds for i in 1:ndims(particle_system) + for i in 1:ndims(particle_system) dv[i, particle] += dv_particle[i] end calc_penalty_force!(dv, particle, neighbor, initial_pos_diff, - initial_distance, particle_system, m_a, m_b, rho_a, rho_b, - penalty_force) + initial_distance, particle_system, penalty_force) # TODO continuity equation? end @@ -61,8 +59,8 @@ end function interact!(dv, v_particle_system, u_particle_system, v_neighbor_system, u_neighbor_system, neighborhood_search, particle_system::TotalLagrangianSPHSystem, - neighbor_system::FluidSystem) - sound_speed = system_sound_speed(neighbor_system) + neighbor_system::WeaklyCompressibleSPHSystem) + @unpack state_equation, viscosity, smoothing_length = neighbor_system system_coords = current_coordinates(u_particle_system, particle_system) neighbor_coords = current_coordinates(u_neighbor_system, neighbor_system) @@ -75,56 +73,53 @@ function interact!(dv, v_particle_system, u_particle_system, distance < sqrt(eps()) && return # Apply the same force to the solid particle - # that the fluid particle experiences due to the solid particle. + # that the fluid particle experiences due to the soild particle. # Note that the same arguments are passed here as in fluid-solid interact!, # except that pos_diff has a flipped sign. # # In fluid-solid interaction, use the "hydrodynamic mass" of the solid particles # corresponding to the rest density of the fluid and not the material density. m_a = hydrodynamic_mass(particle_system, particle) - m_b = hydrodynamic_mass(neighbor_system, neighbor) + + # Viscosity + v_a = current_velocity(v_particle_system, particle_system, particle) + v_b = current_velocity(v_neighbor_system, neighbor_system, neighbor) + + # Flip sign to get the same force as for the fluid-solid direction. + v_diff = -(v_a - v_b) rho_a = particle_density(v_particle_system, particle_system, particle) rho_b = particle_density(v_neighbor_system, neighbor_system, neighbor) rho_mean = (rho_a + rho_b) / 2 - # Use kernel from the fluid system in order to get the same force here in - # solid-fluid interaction as for fluid-solid interaction. - grad_kernel = smoothing_kernel_grad(neighbor_system, pos_diff, distance) - - # In fluid-solid interaction, use the "hydrodynamic pressure" of the solid particles - # corresponding to the chosen boundary model. - p_a = particle_pressure(v_particle_system, particle_system, particle) - p_b = particle_pressure(v_neighbor_system, neighbor_system, neighbor) - - # Particle and neighbor (and corresponding systems and all corresponding quantities) - # are switched in the following two calls. - # This way, we obtain the exact same force as for the fluid-solid interaction, - # but with a flipped sign (because `pos_diff` is flipped compared to fluid-solid). - dv_boundary = pressure_acceleration(neighbor_system, particle_system, particle, - m_b, m_a, p_b, p_a, rho_b, rho_a, pos_diff, - distance, grad_kernel, - neighbor_system.correction) + pi_ab = viscosity(state_equation.sound_speed, v_diff, pos_diff, distance, + rho_mean, smoothing_length) - dv_viscosity_ = dv_viscosity(neighbor_system, particle_system, - v_neighbor_system, v_particle_system, - neighbor, particle, pos_diff, distance, - sound_speed, m_b, m_a, rho_mean) + # use `m_a` to get the same viscosity as for the fluid-solid direction. + dv_viscosity = -m_a * pi_ab * + smoothing_kernel_grad(neighbor_system, pos_diff, distance) - dv_particle = dv_boundary + dv_viscosity_ + # Boundary forces + dv_boundary = boundary_particle_impact(neighbor, particle, + v_neighbor_system, + v_particle_system, + neighbor_system, + particle_system, + pos_diff, distance, m_a) + dv_particle = dv_boundary + dv_viscosity for i in 1:ndims(particle_system) # Multiply `dv` (acceleration on fluid particle b) by the mass of - # particle b to obtain the same force as for the fluid-solid interaction. + # particle b to obtain the force. # Divide by the material mass of particle a to obtain the acceleration # of solid particle a. - dv[i, particle] += dv_particle[i] * m_b / particle_system.mass[particle] + dv[i, particle] += dv_particle[i] * neighbor_system.mass[neighbor] / + particle_system.mass[particle] end continuity_equation!(dv, v_particle_system, v_neighbor_system, particle, neighbor, pos_diff, distance, - m_b, rho_a, rho_b, - particle_system, neighbor_system, grad_kernel) + particle_system, neighbor_system) end return dv @@ -132,27 +127,47 @@ end @inline function continuity_equation!(dv, v_particle_system, v_neighbor_system, particle, neighbor, pos_diff, distance, - m_b, rho_a, rho_b, particle_system::TotalLagrangianSPHSystem, - neighbor_system::FluidSystem, - grad_kernel) + neighbor_system::WeaklyCompressibleSPHSystem) return dv end @inline function continuity_equation!(dv, v_particle_system, v_neighbor_system, particle, neighbor, pos_diff, distance, - m_b, rho_a, rho_b, - particle_system::TotalLagrangianSPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}}, - neighbor_system::FluidSystem, - grad_kernel) - fluid_density_calculator = neighbor_system.density_calculator - - v_diff = current_velocity(v_particle_system, particle_system, particle) - - current_velocity(v_neighbor_system, neighbor_system, neighbor) - - # Call the dummy BC version of the continuity equation - continuity_equation!(dv, fluid_density_calculator, m_b, rho_a, rho_b, v_diff, - grad_kernel, particle) + particle_system::TotalLagrangianSPHSystem{ + <:BoundaryModelDummyParticles + }, + neighbor_system::WeaklyCompressibleSPHSystem) + @unpack density_calculator = particle_system.boundary_model + + continuity_equation!(dv, density_calculator, + v_particle_system, v_neighbor_system, + particle, neighbor, pos_diff, distance, + particle_system, neighbor_system) +end + +@inline function continuity_equation!(dv, density_calculator, + u_particle_system, u_neighbor_system, + particle, neighbor, pos_diff, distance, + particle_system::TotalLagrangianSPHSystem, + neighbor_system::WeaklyCompressibleSPHSystem) + return dv +end + +@inline function continuity_equation!(dv, ::ContinuityDensity, + v_particle_system, v_neighbor_system, + particle, neighbor, pos_diff, distance, + particle_system::TotalLagrangianSPHSystem, + neighbor_system::WeaklyCompressibleSPHSystem) + vdiff = current_velocity(v_particle_system, particle_system, particle) - + current_velocity(v_neighbor_system, neighbor_system, neighbor) + + NDIMS = ndims(particle_system) + dv[NDIMS + 1, particle] += sum(neighbor_system.mass[neighbor] * vdiff .* + smoothing_kernel_grad(neighbor_system, pos_diff, + distance)) + + return dv end # Solid-boundary interaction diff --git a/src/schemes/solid/total_lagrangian_sph/system.jl b/src/schemes/solid/total_lagrangian_sph/system.jl index 125bb5507..8d4df6448 100644 --- a/src/schemes/solid/total_lagrangian_sph/system.jl +++ b/src/schemes/solid/total_lagrangian_sph/system.jl @@ -1,63 +1,89 @@ @doc raw""" TotalLagrangianSPHSystem(initial_condition, smoothing_kernel, smoothing_length, - young_modulus, poisson_ratio; - n_fixed_particles=0, boundary_model=nothing, + young_modulus, poisson_ratio, boundary_model; + n_fixed_particles=0, acceleration=ntuple(_ -> 0.0, NDIMS), - penalty_force=nothing, source_terms=nothing) + penalty_force=nothing) -System for particles of an elastic structure. +System for particles of an elastic solid. -A Total Lagrangian framework is used wherein the governing equations are formulated such that +A Total Lagrangian framework is used wherein the governing equations are forumlated such that all relevant quantities and operators are measured with respect to the initial configuration (O’Connor & Rogers 2021, Belytschko et al. 2000). -See [Total Lagrangian SPH](@ref tlsph) for more details on the method. - -# Arguments -- `initial_condition`: Initial condition representing the system's particles. -- `young_modulus`: Young's modulus. -- `poisson_ratio`: Poisson ratio. -- `smoothing_kernel`: Smoothing kernel to be used for this system. - See [Smoothing Kernels](@ref smoothing_kernel). -- `smoothing_length`: Smoothing length to be used for this system. - See [Smoothing Kernels](@ref smoothing_kernel). - -# Keyword Arguments -- `n_fixed_particles`: Number of fixed particles which are used to clamp the structure - particles. Note that the fixed particles must be the **last** - particles in the `InitialCondition`. See the info box below. -- `boundary_model`: Boundary model to compute the hydrodynamic density and pressure for - fluid-structure interaction (see [Boundary Models](@ref boundary_models)). -- `penalty_force`: Penalty force to ensure regular particle position under large deformations - (see [`PenaltyForceGanzenmueller`](@ref)). -- `acceleration`: Acceleration vector for the system. (default: zero vector) -- `source_terms`: Additional source terms for this system. Has to be either `nothing` - (by default), or a function of `(coords, velocity, density, pressure)` - (which are the quantities of a single particle), returning a `Tuple` - or `SVector` that is to be added to the acceleration of that particle. - See, for example, [`SourceTermDamping`](@ref). - -!!! note - The fixed particles must be the **last** particles in the `InitialCondition`. - To do so, e.g. use the `union` function: - ```jldoctest; output = false, filter = r"InitialCondition{Float64}.*", setup = :(fixed_particles = RectangularShape(0.1, (1, 4), (0.0, 0.0), density=1.0); beam = RectangularShape(0.1, (3, 4), (0.1, 0.0), density=1.0)) - solid = union(beam, fixed_particles) - - # output - InitialCondition{Float64}(...) *the rest of this line is ignored by filter* - ``` - where `beam` and `fixed_particles` are of type `InitialCondition`. +The governing equations with respect to the initial configuration are given by: +```math +\frac{\mathrm{D}\bm{v}}{\mathrm{D}t} = \frac{1}{\rho_0} \nabla_0 \cdot \bm{P} + \bm{g}, +``` +where the zero subscript denotes a derivative with respect to the initial configuration +and $\bm{P}$ is the first Piola-Kirchhoff (PK1) stress tensor. + +The discretized version of this equation is given by (O’Connor & Rogers 2021): +```math +\frac{\mathrm{d}\bm{v}_a}{\mathrm{d}t} = \sum_b m_{0b} + \left( \frac{\bm{P}_a \bm{L}_{0a}}{\rho_{0a}^2} + \frac{\bm{P}_b \bm{L}_{0b}}{\rho_{0b}^2} \right) + \nabla_{0a} W(\bm{X}_{ab}) + \frac{\bm{f}_a^{PF}}{m_{0a}} + \bm{g}, +``` +with +```math +\bm{L}_{0a} := \left( \sum_{b} \frac{m_{0b}}{\rho_{0b}} \nabla_{0a} W(\bm{X}_{ab}) \bm{X}_{ab}^T \right)^{-1} \in \R^{d \times d}. +``` +The subscripts $a$ and $b$ denote quantities of particle $a$ and $b$, respectively. +The zero subscript on quantities denotes that the quantity is to be measured in the initial configuration. +The difference in the initial coordinates is denoted by $\bm{X}_{ab} = \bm{X}_a - \bm{X}_b$, +the difference in the current coordinates is denoted by $\bm{x}_{ab} = \bm{x}_a - \bm{x}_b$. + +For the computation of the PK1 stress tensor, the deformation gradient $\bm{J}$ is computed per particle as +```math +\bm{J}_a = \sum_b \frac{m_{0b}}{\rho_{0b}} \bm{x}_{ba} (\bm{L}_{0a}\nabla_{0a} W(\bm{X}_{ab}))^T \\ + \qquad = -\left(\sum_b \frac{m_{0b}}{\rho_{0b}} \bm{x}_{ab} (\nabla_{0a} W(\bm{X}_{ab}))^T \right) \bm{L}_{0a}^T +``` +with $1 \leq i,j \leq d$. +From the deformation gradient, the Green-Lagrange strain +```math +\bm{E} = \frac{1}{2}(\bm{J}^T\bm{J} - \bm{I}) +``` +and the second Piola-Kirchhoff stress tensor +```math +\bm{S} = \lambda \operatorname{tr}(\bm{E}) \bm{I} + 2\mu \bm{E} +``` +are computed to obtain the PK1 stress tensor as +```math +\bm{P} = \bm{J}\bm{S}. +``` + +Here, +```math +\mu = \frac{E}{2(1 + \nu)} +``` +and +```math +\lambda = \frac{E\nu}{(1 + \nu)(1 - 2\nu)} +``` +are the Lamé coefficients, where $E$ is the Young's modulus and $\nu$ is the Poisson ratio. + +The term $\bm{f}_a^{PF}$ is an optional penalty force. See e.g. [`PenaltyForceGanzenmueller`](@ref). + +## References: +- Joseph O’Connor, Benedict D. Rogers. + "A fluid–structure interaction model for free-surface flows and flexible structures using + smoothed particle hydrodynamics on a GPU". + In: Journal of Fluids and Structures 104 (2021). + [doi: 10.1016/J.JFLUIDSTRUCTS.2021.103312](https://doi.org/10.1016/J.JFLUIDSTRUCTS.2021.103312) +- Ted Belytschko, Yong Guo, Wing Kam Liu, Shao Ping Xiao. + "A unified stability analysis of meshless particle methods". + In: International Journal for Numerical Methods in Engineering 48 (2000), pages 1359–1400. + [doi: 10.1002/1097-0207](https://doi.org/10.1002/1097-0207) """ -struct TotalLagrangianSPHSystem{BM, NDIMS, ELTYPE <: Real, IC, ARRAY1D, ARRAY2D, ARRAY3D, - K, PF, ST} <: SolidSystem{NDIMS, IC} - initial_condition :: IC - initial_coordinates :: ARRAY2D # Array{ELTYPE, 2}: [dimension, particle] - current_coordinates :: ARRAY2D # Array{ELTYPE, 2}: [dimension, particle] - mass :: ARRAY1D # Array{ELTYPE, 1}: [particle] - correction_matrix :: ARRAY3D # Array{ELTYPE, 3}: [i, j, particle] - pk1_corrected :: ARRAY3D # Array{ELTYPE, 3}: [i, j, particle] - deformation_grad :: ARRAY3D # Array{ELTYPE, 3}: [i, j, particle] - material_density :: ARRAY1D # Array{ELTYPE, 1}: [particle] +struct TotalLagrangianSPHSystem{BM, NDIMS, ELTYPE <: Real, K, PF} <: System{NDIMS} + initial_condition :: InitialCondition{ELTYPE} + initial_coordinates :: Array{ELTYPE, 2} # [dimension, particle] + current_coordinates :: Array{ELTYPE, 2} # [dimension, particle] + mass :: Array{ELTYPE, 1} # [particle] + correction_matrix :: Array{ELTYPE, 3} # [i, j, particle] + pk1_corrected :: Array{ELTYPE, 3} # [i, j, particle] + deformation_grad :: Array{ELTYPE, 3} # [i, j, particle] + material_density :: Array{ELTYPE, 1} # [particle] n_moving_particles :: Int64 young_modulus :: ELTYPE poisson_ratio :: ELTYPE @@ -68,52 +94,54 @@ struct TotalLagrangianSPHSystem{BM, NDIMS, ELTYPE <: Real, IC, ARRAY1D, ARRAY2D, acceleration :: SVector{NDIMS, ELTYPE} boundary_model :: BM penalty_force :: PF - source_terms :: ST - buffer :: Nothing -end - -function TotalLagrangianSPHSystem(initial_condition, - smoothing_kernel, smoothing_length, - young_modulus, poisson_ratio; - n_fixed_particles=0, boundary_model=nothing, - acceleration=ntuple(_ -> 0.0, - ndims(smoothing_kernel)), - penalty_force=nothing, source_terms=nothing) - NDIMS = ndims(initial_condition) - ELTYPE = eltype(initial_condition) - n_particles = nparticles(initial_condition) - - if ndims(smoothing_kernel) != NDIMS - throw(ArgumentError("smoothing kernel dimensionality must be $NDIMS for a $(NDIMS)D problem")) - end - - # Make acceleration an SVector - acceleration_ = SVector(acceleration...) - if length(acceleration_) != NDIMS - throw(ArgumentError("`acceleration` must be of length $NDIMS for a $(NDIMS)D problem")) - end - initial_coordinates = copy(initial_condition.coordinates) - current_coordinates = copy(initial_condition.coordinates) - mass = copy(initial_condition.mass) - material_density = copy(initial_condition.density) - correction_matrix = Array{ELTYPE, 3}(undef, NDIMS, NDIMS, n_particles) - pk1_corrected = Array{ELTYPE, 3}(undef, NDIMS, NDIMS, n_particles) - deformation_grad = Array{ELTYPE, 3}(undef, NDIMS, NDIMS, n_particles) - - n_moving_particles = n_particles - n_fixed_particles + function TotalLagrangianSPHSystem(initial_condition, + smoothing_kernel, smoothing_length, + young_modulus, poisson_ratio, boundary_model; + n_fixed_particles=0, + acceleration=ntuple(_ -> 0.0, + ndims(smoothing_kernel)), + penalty_force=nothing) + NDIMS = ndims(initial_condition) + ELTYPE = eltype(initial_condition) + n_particles = nparticles(initial_condition) + + if ndims(smoothing_kernel) != NDIMS + throw(ArgumentError("smoothing kernel dimensionality must be $NDIMS for a $(NDIMS)D problem")) + end - lame_lambda = young_modulus * poisson_ratio / - ((1 + poisson_ratio) * (1 - 2 * poisson_ratio)) - lame_mu = 0.5 * young_modulus / (1 + poisson_ratio) + # Make acceleration an SVector + acceleration_ = SVector(acceleration...) + if length(acceleration_) != NDIMS + throw(ArgumentError("`acceleration` must be of length $NDIMS for a $(NDIMS)D problem")) + end - return TotalLagrangianSPHSystem(initial_condition, initial_coordinates, - current_coordinates, mass, correction_matrix, - pk1_corrected, deformation_grad, material_density, - n_moving_particles, young_modulus, poisson_ratio, - lame_lambda, lame_mu, smoothing_kernel, - smoothing_length, acceleration_, boundary_model, - penalty_force, source_terms, nothing) + initial_coordinates = copy(initial_condition.coordinates) + current_coordinates = copy(initial_condition.coordinates) + mass = copy(initial_condition.mass) + material_density = copy(initial_condition.density) + correction_matrix = Array{ELTYPE, 3}(undef, NDIMS, NDIMS, n_particles) + pk1_corrected = Array{ELTYPE, 3}(undef, NDIMS, NDIMS, n_particles) + deformation_grad = Array{ELTYPE, 3}(undef, NDIMS, NDIMS, n_particles) + + n_moving_particles = n_particles - n_fixed_particles + + lame_lambda = young_modulus * poisson_ratio / + ((1 + poisson_ratio) * (1 - 2 * poisson_ratio)) + lame_mu = 0.5 * young_modulus / (1 + poisson_ratio) + + return new{typeof(boundary_model), + NDIMS, ELTYPE, + typeof(smoothing_kernel), + typeof(penalty_force)}(initial_condition, initial_coordinates, + current_coordinates, mass, + correction_matrix, pk1_corrected, + deformation_grad, material_density, + n_moving_particles, young_modulus, poisson_ratio, + lame_lambda, lame_mu, + smoothing_kernel, smoothing_length, + acceleration_, boundary_model, penalty_force) + end end function Base.show(io::IO, system::TotalLagrangianSPHSystem) @@ -150,11 +178,23 @@ function Base.show(io::IO, ::MIME"text/plain", system::TotalLagrangianSPHSystem) end end -@inline function v_nvariables(system::TotalLagrangianSPHSystem) +@inline function v_nvariables(system::TotalLagrangianSPHSystem{ + <:BoundaryModelMonaghanKajtar + }) return ndims(system) end -@inline function v_nvariables(system::TotalLagrangianSPHSystem{<:BoundaryModelDummyParticles{ContinuityDensity}}) +@inline function v_nvariables(system::TotalLagrangianSPHSystem{ + <:BoundaryModelDummyParticles + }) + return v_nvariables(system, system.boundary_model.density_calculator) +end + +@inline function v_nvariables(system::TotalLagrangianSPHSystem, density_calculator) + return ndims(system) +end + +@inline function v_nvariables(system::TotalLagrangianSPHSystem, ::ContinuityDensity) return ndims(system) + 1 end @@ -177,26 +217,16 @@ end @inline function current_velocity(v, system::TotalLagrangianSPHSystem, particle) if particle > n_moving_particles(system) - return zero(SVector{ndims(system), eltype(system)}) + return SVector(ntuple(_ -> 0.0, Val(ndims(system)))) end return extract_svector(v, system, particle) end -@inline function viscous_velocity(v, system::TotalLagrangianSPHSystem, particle) - return extract_svector(system.boundary_model.cache.wall_velocity, system, particle) -end - @inline function particle_density(v, system::TotalLagrangianSPHSystem, particle) return particle_density(v, system.boundary_model, system, particle) end -# In fluid-solid interaction, use the "hydrodynamic pressure" of the solid particles -# corresponding to the chosen boundary model. -@inline function particle_pressure(v, system::TotalLagrangianSPHSystem, particle) - return particle_pressure(v, system.boundary_model, system, particle) -end - @inline function hydrodynamic_mass(system::TotalLagrangianSPHSystem, particle) return system.boundary_model.hydrodynamic_mass[particle] end @@ -204,7 +234,6 @@ end @inline function correction_matrix(system, particle) extract_smatrix(system.correction_matrix, system, particle) end - @inline function deformation_gradient(system, particle) extract_smatrix(system.deformation_grad, system, particle) end @@ -213,51 +242,86 @@ end end function initialize!(system::TotalLagrangianSPHSystem, neighborhood_search) - (; correction_matrix) = system + @unpack correction_matrix = system + + # Calculate kernel correction matrix + calc_correction_matrix!(correction_matrix, neighborhood_search, system) +end +function calc_correction_matrix!(corr_matrix, neighborhood_search, system) + @unpack mass, material_density = system + + set_zero!(corr_matrix) + + # Calculate kernel correction matrix initial_coords = initial_coordinates(system) - density_fun(particle) = system.material_density[particle] + # Loop over all pairs of particles and neighbors within the kernel cutoff. + for_particle_neighbor(system, system, + initial_coords, initial_coords, + neighborhood_search; + particles=eachparticle(system)) do particle, neighbor, + initial_pos_diff, + initial_distance + # Only consider particles with a distance > 0. + initial_distance < sqrt(eps()) && return - # Calculate correction matrix - compute_gradient_correction_matrix!(correction_matrix, neighborhood_search, system, - initial_coords, density_fun) -end + volume = mass[neighbor] / material_density[neighbor] -function update_positions!(system::TotalLagrangianSPHSystem, v, u, v_ode, u_ode, semi, t) - (; current_coordinates) = system + grad_kernel = smoothing_kernel_grad(system, initial_pos_diff, + initial_distance) + result = volume * grad_kernel * initial_pos_diff' - for particle in each_moving_particle(system) - for i in 1:ndims(system) - current_coordinates[i, particle] = u[i, particle] + @inbounds for j in 1:ndims(system), i in 1:ndims(system) + corr_matrix[i, j, particle] -= result[i, j] + end + end + + @threaded for particle in eachparticle(system) + L = correction_matrix(system, particle) + result = inv(L) + + @inbounds for j in 1:ndims(system), i in 1:ndims(system) + corr_matrix[i, j, particle] = result[i, j] end end + + return corr_matrix end -function update_quantities!(system::TotalLagrangianSPHSystem, v, u, v_ode, u_ode, semi, t) +function update!(system::TotalLagrangianSPHSystem, system_index, v, u, v_ode, u_ode, + semi, t) + @unpack neighborhood_searches = semi + + # Update current coordinates + update_current_coordinates(u, system) + # Precompute PK1 stress tensor - nhs = get_neighborhood_search(system, semi) - @trixi_timeit timer() "stress tensor" compute_pk1_corrected(nhs, system) + neighborhood_search = neighborhood_searches[system_index][system_index] + @trixi_timeit timer() "precompute pk1" compute_pk1_corrected(neighborhood_search, + system) return system end -function update_final!(system::TotalLagrangianSPHSystem, v, u, v_ode, u_ode, semi, t; - update_from_callback=false) - (; boundary_model) = system +@inline function update_current_coordinates(u, system) + @unpack current_coordinates = system - # Only update boundary model - update_pressure!(boundary_model, system, v, u, v_ode, u_ode, semi) + for particle in each_moving_particle(system) + for i in 1:ndims(system) + current_coordinates[i, particle] = u[i, particle] + end + end end @inline function compute_pk1_corrected(neighborhood_search, system) - (; deformation_grad) = system + @unpack deformation_grad = system calc_deformation_grad!(deformation_grad, neighborhood_search, system) - @threaded system for particle in eachparticle(system) - F_particle = deformation_gradient(system, particle) - pk1_particle = pk1_stress_tensor(F_particle, system) + @threaded for particle in eachparticle(system) + J_particle = deformation_gradient(system, particle) + pk1_particle = pk1_stress_tensor(J_particle, system) pk1_particle_corrected = pk1_particle * correction_matrix(system, particle) @inbounds for j in 1:ndims(system), i in 1:ndims(system) @@ -267,7 +331,7 @@ end end @inline function calc_deformation_grad!(deformation_grad, neighborhood_search, system) - (; mass, material_density) = system + @unpack mass, material_density = system # Reset deformation gradient set_zero!(deformation_grad) @@ -303,30 +367,29 @@ end end # First Piola-Kirchhoff stress tensor -@inline function pk1_stress_tensor(F, system) - S = pk2_stress_tensor(F, system) +@inline function pk1_stress_tensor(J, system) + S = pk2_stress_tensor(J, system) - return F * S + return J * S end # Second Piola-Kirchhoff stress tensor -@inline function pk2_stress_tensor(F, system) - (; lame_lambda, lame_mu) = system +@inline function pk2_stress_tensor(J, system) + @unpack lame_lambda, lame_mu = system # Compute the Green-Lagrange strain - E = 0.5 * (transpose(F) * F - I) + E = 0.5 * (transpose(J) * J - I) return lame_lambda * tr(E) * I + 2 * lame_mu * E end @inline function calc_penalty_force!(dv, particle, neighbor, initial_pos_diff, - initial_distance, system, m_a, m_b, rho_a, rho_b, - ::Nothing) + initial_distance, system, ::Nothing) return dv end function write_u0!(u0, system::TotalLagrangianSPHSystem) - (; initial_condition) = system + @unpack initial_condition = system for particle in each_moving_particle(system) # Write particle coordinates @@ -339,7 +402,7 @@ function write_u0!(u0, system::TotalLagrangianSPHSystem) end function write_v0!(v0, system::TotalLagrangianSPHSystem) - (; initial_condition, boundary_model) = system + @unpack initial_condition, boundary_model = system for particle in each_moving_particle(system) # Write particle velocities @@ -353,14 +416,23 @@ function write_v0!(v0, system::TotalLagrangianSPHSystem) return v0 end -function write_v0!(v0, model, system::TotalLagrangianSPHSystem) +function write_v0!(v0, ::BoundaryModelMonaghanKajtar, system::TotalLagrangianSPHSystem) return v0 end -function write_v0!(v0, ::BoundaryModelDummyParticles{ContinuityDensity}, - system::TotalLagrangianSPHSystem) - (; cache) = system.boundary_model - (; initial_density) = cache +function write_v0!(v0, ::BoundaryModelDummyParticles, system::TotalLagrangianSPHSystem) + @unpack density_calculator = system.boundary_model + + write_v0!(v0, density_calculator, system) +end + +function write_v0!(v0, density_calculator, system::TotalLagrangianSPHSystem) + return v0 +end + +function write_v0!(v0, ::ContinuityDensity, system::TotalLagrangianSPHSystem) + @unpack cache = system.boundary_model + @unpack initial_density = cache for particle in each_moving_particle(system) # Set particle densities @@ -379,59 +451,3 @@ function restart_with!(system::TotalLagrangianSPHSystem, v, u) # This is dispatched in the boundary system.jl file restart_with!(system, system.boundary_model, v, u) end - -function viscosity_model(system::TotalLagrangianSPHSystem) - return system.boundary_model.viscosity -end - -# An explanation of these equation can be found in -# J. Lubliner, 2008. Plasticity theory. -# See here below Equation 5.3.21 for the equation for the equivalent stress. -# The von-Mises stress is one form of equivalent stress, where sigma is the deviatoric stress. -# See pages 32 and 123. -function von_mises_stress(system::TotalLagrangianSPHSystem) - von_mises_stress_vector = zeros(eltype(system.pk1_corrected), nparticles(system)) - - @threaded system for particle in each_moving_particle(system) - von_mises_stress_vector[particle] = von_mises_stress(system, particle) - end - - return von_mises_stress_vector -end - -# Use this function barrier and unpack inside to avoid passing closures to Polyester.jl -# with `@batch` (`@threaded`). -# Otherwise, `@threaded` does not work here with Julia ARM on macOS. -# See https://github.com/JuliaSIMD/Polyester.jl/issues/88. -@inline function von_mises_stress(system, particle) - F = deformation_gradient(system, particle) - J = det(F) - P = pk1_corrected(system, particle) - sigma = (1.0 / J) * P * F' - - # Calculate deviatoric stress tensor - s = sigma - (1.0 / 3.0) * tr(sigma) * I - - return sqrt(3.0 / 2.0 * sum(s .^ 2)) -end - -# An explanation of these equation can be found in -# J. Lubliner, 2008. Plasticity theory. -# See here page 473 for the relation between the `pk1`, the first Piola-Kirchhoff tensor, -# and the Cauchy stress. -function cauchy_stress(system::TotalLagrangianSPHSystem) - NDIMS = ndims(system) - - cauchy_stress_tensors = zeros(eltype(system.pk1_corrected), NDIMS, NDIMS, - nparticles(system)) - - @threaded system for particle in each_moving_particle(system) - F = deformation_gradient(system, particle) - J = det(F) - P = pk1_corrected(system, particle) - sigma = (1.0 / J) * P * F' - cauchy_stress_tensors[:, :, particle] = sigma - end - - return cauchy_stress_tensors -end diff --git a/src/setups/circular_shape.jl b/src/setups/circular_shape.jl new file mode 100644 index 000000000..093190a2e --- /dev/null +++ b/src/setups/circular_shape.jl @@ -0,0 +1,196 @@ +""" + CircularShape(particle_spacing, R, center_position, density; + shape_type=FillCircle(), init_velocity=(0.0, 0.0)) + +Either a circle filled with particles or a circumference drawn by particles. + +# Arguments +- `particle_spacing`: Spacing between the particles. +- `R`: Radius of the circle. +- `center_position::Tuple`: The position of the circle center as `(x,y)`. +- `density`: Initial density of particles. + +# Keywords +- `shape_type`: `Type` to specify the circular shape (see [`FillCircle`](@ref) and [`DrawCircle`](@ref)). +- `init_velocity`: The initial velocity of the fluid particles as `(vel_x, vel_y)`. + +# Fields +- `coordinates::Matrix`: Coordinates of the particles. +- `masses::Vector`: Masses of the particles. +- `densities::Vector`: Densities of the particles. + +For adding a recess in the particle filled circle or for only drawing the circumference +see [`FillCircle`](@ref) and [`DrawCircle`](@ref) respectively. +""" +function CircularShape(particle_spacing, R, center_position, density; + shape_type=FillCircle(), init_velocity=(0.0, 0.0)) + if particle_spacing < eps() + throw(ArgumentError("`particle_spacing` needs to be positive and larger than $(eps())")) + end + + if density < eps() + throw(ArgumentError("`density` needs to be positive and larger than $(eps())")) + end + + NDIMS = 2 + ELTYPE = eltype(particle_spacing) + + x_center, y_center = center_position + + coordinates = circular_shape_coords(shape_type, R, x_center, y_center, + particle_spacing) + + n_particles = size(coordinates, 2) + densities = density * ones(ELTYPE, n_particles) + masses = density * particle_spacing^NDIMS * ones(ELTYPE, n_particles) + velocities = init_velocity .* ones(ELTYPE, size(coordinates)) + + return InitialCondition(coordinates, velocities, masses, densities) +end + +""" + FillCircle(; x_recess = (typemax(Int), typemax(Int)), + y_recess = (typemax(Int), typemax(Int))) + +Particle filled circle (required by [`CircularShape`](@ref)). + +The particles are arranged in an equidistiant grid +where the distance between the points is determined by the `particle_spacing`. +For adding a recess see example below. + +# Keywords +- `x_recess`: Tuple for recess start and end coordinates in x direction +- `y_recess`: Tuple for recess start and end coordinates in y direction + +# Example + +Particle filled circle with recess: +```julia +FillCircle(x_recess=(0.5, recess_length), y_recess=(0.0, recess_height)) +``` + +""" +struct FillCircle{ELTYPE <: Real} + x_recess::NTuple{2, ELTYPE} + y_recess::NTuple{2, ELTYPE} + + function FillCircle(; x_recess=(typemax(Int), typemax(Int)), + y_recess=(typemax(Int), typemax(Int))) + return new{eltype(x_recess)}(x_recess, y_recess) + end +end + +""" + DrawCircle(; n_layers=1, layer_inwards=false) + +Circumference drawn by particles (required by [`CircularShape`](@ref)). + +Unlike in [`FillCircle`](@ref), the particles are parametrized in a way +that the distance between neighboring particles is the `particle_spacing`. + +Multiple layers are generated by calling the function additionally with the number of layers (see example). + +# Keywords +- `n_layers`: Number of layers +- `layer_inwards`: Boolean to extend layers inwards. + +# Example + +Circumference with one layer: +```julia +DrawCircle() +``` + +Circumference with multiple layers extending outwards: +```julia +DrawCircle(n_layers=3) +``` + +Circumference with multiple layers extending inwards: +```julia +DrawCircle(n_layers=3, layer_inwards=true) +``` +""" +struct DrawCircle{} + n_layers :: Int + layer_inwards :: Bool + + function DrawCircle(; n_layers=1, layer_inwards=false) + return new{}(n_layers, layer_inwards) + end +end + +function circular_shape_coords(shape::FillCircle, R, x_center, y_center, particle_spacing) + @unpack x_recess, y_recess = shape + + x_vec = Vector{Float64}(undef, 0) + y_vec = Vector{Float64}(undef, 0) + + r(x, y) = sqrt((x - x_center)^2 + (y - y_center)^2) + + # recess condition + recess(x, y) = (y_recess[2] >= y >= y_recess[1] && + x_recess[2] >= x >= x_recess[1]) + + n_particles = round(Int, R / particle_spacing) + + for j in (-n_particles):n_particles, + i in (-n_particles):n_particles + + x = x_center + i * particle_spacing + y = y_center + j * particle_spacing + + if r(x, y) < R && !recess(x, y) + append!(x_vec, x) + append!(y_vec, y) + end + end + + particle_coords = Array{Float64, 2}(undef, 2, length(x_vec)) + particle_coords[1, :] = x_vec + particle_coords[2, :] = y_vec + + return particle_coords +end + +function circular_shape_coords(shape::DrawCircle, R, x_center, y_center, particle_spacing) + @unpack n_layers, layer_inwards = shape + + x_vec = Vector{Float64}(undef, 0) + y_vec = Vector{Float64}(undef, 0) + + layers = if layer_inwards + (-n_layers + 1):0 + else + 0:(n_layers - 1) + end + + for layer in layers + coords = draw_circle(R + particle_spacing * layer, x_center, y_center, + particle_spacing) + append!(x_vec, coords[1, :]) + append!(y_vec, coords[2, :]) + end + + particle_coords = Array{Float64, 2}(undef, 2, size(x_vec, 1)) + particle_coords[1, :] = x_vec + particle_coords[2, :] = y_vec + + return particle_coords +end + +function draw_circle(R, x_center, y_center, particle_spacing) + n_particles = round(Int, 2pi * R / particle_spacing) + + # Remove the last particle at 2pi, which overlaps with the first at 0 + t = LinRange(0, 2pi, n_particles + 1)[1:(end - 1)] + + particle_coords = Array{Float64, 2}(undef, 2, length(t)) + + for i in eachindex(t) + particle_coords[1, i] = R * cos(t[i]) + x_center + particle_coords[2, i] = R * sin(t[i]) + y_center + end + + return particle_coords +end diff --git a/src/setups/extrude_geometry.jl b/src/setups/extrude_geometry.jl deleted file mode 100644 index 82df9aaa3..000000000 --- a/src/setups/extrude_geometry.jl +++ /dev/null @@ -1,259 +0,0 @@ -@doc raw""" - extrude_geometry(geometry; particle_spacing, direction, n_extrude::Integer, - velocity=zeros(length(direction)), - mass=nothing, density=nothing, pressure=0.0) - -Extrude either a line, a plane or a shape along a specific direction. - -# Arguments -- `geometry`: Either particle coordinates or an [`InitialCondition`](@ref) - defining a 2D shape to extrude to a 3D volume, or two 2D points - ``(A, B)`` defining the interval ``[A, B]`` to extrude to a plane - in 2D, or three 3D points ``(A, B, C)`` defining the parallelogram - spanned by the vectors ``\widehat{AB}`` and ``\widehat {AC}`` to extrude - to a parallelepiped. - -# Keywords -- `particle_spacing`: Spacing between the particles. Can be omitted when `geometry` is an - `InitialCondition` (unless `geometry.particle_spacing == -1`). -- `direction`: A vector that specifies the direction in which to extrude. -- `n_extrude`: Number of layers of particles created in the direction of extrusion. -- `velocity`: Either a function mapping each particle's coordinates to its velocity, - or, for a constant fluid velocity, a vector holding this velocity. - Velocity is constant zero by default. -- `mass`: Either `nothing` (default) to automatically compute particle mass from particle - density and spacing, or a function mapping each particle's coordinates to its mass, - or a scalar for a constant mass over all particles. -- `density`: Either a function mapping each particle's coordinates to its density, - or a scalar for a constant density over all particles. - Obligatory when not using a state equation. Cannot be used together with - `state_equation`. -- `pressure`: Scalar to set the pressure of all particles to this value. - This is only used by the [`EntropicallyDampedSPHSystem`](@ref) and - will be overwritten when using an initial pressure function in the system. - Cannot be used together with hydrostatic pressure gradient. -- `tlsph`: With the [`TotalLagrangianSPHSystem`](@ref), particles need to be placed - on the boundary of the shape and not one particle radius away, as for fluids. - When `tlsph=true`, particles will be placed on the boundary of the shape. - -# Examples -```jldoctest; output = false -# Extrude a line in 2D to a plane in 2D -p1 = [0.0, 0.0] -p2 = [1.0, 1.0] - -direction = [-1.0, 1.0] - -shape = extrude_geometry((p1, p2); direction, particle_spacing=0.1, n_extrude=4, density=1000.0) - -# Extrude a parallelogram in 3D to a parallelepiped in 3D -p1 = [0.0, 0.0, 0.0] -p2 = [0.5, 1.0, 0.0] -p3 = [1.0, 0.2, 0.0] - -direction = [0.0, 0.0, 1.0] - -shape = extrude_geometry((p1, p2, p3); direction, particle_spacing=0.1, n_extrude=4, density=1000.0) - -# Extrude a 2D shape (here: a disc) to a 3D shape (here: a cylinder) -shape = SphereShape(0.1, 0.5, (0.2, 0.4), 1000.0, n_layers=3, - sphere_type=RoundSphere(end_angle=pi)) - -direction = [0.0, 0.0, 1.0] - -shape = extrude_geometry(shape; direction, particle_spacing=0.1, n_extrude=4, density=1000.0) - -# output -┌ Info: The desired size is not a multiple of the particle spacing 0.1. -└ New particle spacing is set to 0.09387239731236392. -┌ Info: The desired size is not a multiple of the particle spacing 0.1. -└ New particle spacing is set to 0.09198039027185569. -InitialCondition{Float64}(0.1, [0.44999999999999996 0.43096988312782164 … -0.23871756048182058 -0.24999999999999994; 0.4 0.4956708580912724 … 0.5001344202803415 0.4000000000000001; 0.05 0.05 … 0.35000000000000003 0.35000000000000003], [0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0], [1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002 … 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002], [1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0 … 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 … 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) -``` - -!!! warning "Experimental Implementation" - This is an experimental feature and may change in any future releases. -""" -function extrude_geometry(geometry; particle_spacing=-1, direction, n_extrude::Integer, - velocity=zeros(length(direction)), tlsph=false, - mass=nothing, density=nothing, pressure=0.0) - direction_ = normalize(direction) - NDIMS = length(direction_) - - if geometry isa InitialCondition && geometry.particle_spacing > 0 - if particle_spacing > 0 && particle_spacing != geometry.particle_spacing - throw(ArgumentError("`particle_spacing` must be -1 when using an `InitialCondition`")) - end - particle_spacing = geometry.particle_spacing - end - - if particle_spacing <= 0 - throw(ArgumentError("`particle_spacing` must be specified when not extruding an `InitialCondition`")) - end - - geometry = shift_plane_corners(geometry, direction_, particle_spacing, tlsph) - - face_coords, particle_spacing_ = sample_plane(geometry, particle_spacing; tlsph=tlsph) - - if !isapprox(particle_spacing, particle_spacing_, rtol=5e-2) - @info "The desired size is not a multiple of the particle spacing $particle_spacing." * - "\nNew particle spacing is set to $particle_spacing_." - end - - coords = (face_coords .+ i * particle_spacing_ * direction_ for i in 0:(n_extrude - 1)) - - # In this context, `stack` is faster than `hcat(coords...)` - coordinates = reshape(stack(coords), (NDIMS, size(face_coords, 2) * n_extrude)) - - if geometry isa InitialCondition - density = vcat(geometry.density, (geometry.density for i in 1:(n_extrude - 1))...) - end - - return InitialCondition(; coordinates, velocity, density, mass, pressure, - particle_spacing=particle_spacing_) -end - -# For corners/endpoints of a plane/line, sample the plane/line with particles. -# For 2D coordinates or an `InitialCondition`, add a third dimension. -function sample_plane(geometry::AbstractMatrix, particle_spacing; tlsph) - if size(geometry, 1) == 2 - # Extruding a 2D shape results in a 3D shape - - # When `tlsph=true`, particles will be placed on the x-y plane - coords = vcat(geometry, fill(tlsph ? 0.0 : 0.5particle_spacing, size(geometry, 2))') - - # TODO: 2D shapes not only in x-y plane but in any user-defined plane - return coords, particle_spacing - end - - return geometry, particle_spacing -end - -function sample_plane(shape::InitialCondition, particle_spacing; tlsph) - if ndims(shape) == 2 - # Extruding a 2D shape results in a 3D shape - - # When `tlsph=true`, particles will be placed on the x-y plane - coords = vcat(shape.coordinates, - fill(tlsph ? 0.0 : 0.5particle_spacing, size(shape.coordinates, 2))') - - # TODO: 2D shapes not only in x-y plane but in any user-defined plane - return coords, particle_spacing - end - - return shape.coordinates, particle_spacing -end - -function sample_plane(plane_points, particle_spacing; tlsph=nothing) - - # Convert to tuple - return sample_plane(tuple(plane_points...), particle_spacing; tlsph=nothing) -end - -function sample_plane(plane_points::NTuple{2}, particle_spacing; tlsph=nothing) - # Verify that points are in 2D space - if any(length.(plane_points) .!= 2) - throw(ArgumentError("all points must be 2D coordinates")) - end - - n_points = ceil(Int, norm(plane_points[2] - plane_points[1]) / particle_spacing) + 1 - - coords = stack(range(plane_points[1], plane_points[2], length=n_points)) - particle_spacing_new = norm(coords[:, 1] - coords[:, 2]) - - return coords, particle_spacing_new -end - -function sample_plane(plane_points::NTuple{3}, particle_spacing; tlsph=nothing) - # Verify that points are in 3D space - if any(length.(plane_points) .!= 3) - throw(ArgumentError("all points must be 3D coordinates")) - end - - point1_ = SVector{3}(plane_points[1]) - point2_ = SVector{3}(plane_points[2]) - point3_ = SVector{3}(plane_points[3]) - - # Vectors defining the edges of the parallelogram - edge1 = point2_ - point1_ - edge2 = point3_ - point1_ - - # Check if the points are collinear - if norm(cross(edge1, edge2)) == 0 - throw(ArgumentError("the points must not be collinear")) - end - - # Determine the number of points along each edge - num_points_edge1 = ceil(Int, norm(edge1) / particle_spacing) - num_points_edge2 = ceil(Int, norm(edge2) / particle_spacing) - - coords = zeros(3, (num_points_edge1 + 1) * (num_points_edge2 + 1)) - - index = 1 - for i in 0:num_points_edge1 - for j in 0:num_points_edge2 - point_on_plane = point1_ + (i / num_points_edge1) * edge1 + - (j / num_points_edge2) * edge2 - coords[:, index] = point_on_plane - index += 1 - end - end - - particle_spacing_new = min(norm(edge1 / num_points_edge1), - norm(edge2 / num_points_edge2)) - - return coords, particle_spacing_new -end - -# Shift corners of the plane/line inwards by half a particle spacing with `tlsph=false` -# because fluid particles need to be half a particle spacing away from the boundary of the shape. -function shift_plane_corners(geometry::Union{AbstractMatrix, InitialCondition}, - direction, particle_spacing, tlsph) - return geometry -end - -function shift_plane_corners(plane_points, direction, particle_spacing, tlsph) - shift_plane_corners(tuple(plane_points...), direction, particle_spacing, tlsph) -end - -function shift_plane_corners(plane_points::NTuple{2}, direction, particle_spacing, tlsph) - # With TLSPH, particles need to be AT the min coordinates and not half a particle - # spacing away from it. - (tlsph) && (return plane_points) - - plane_point1 = copy(plane_points[1]) - plane_point2 = copy(plane_points[2]) - - # Vectors shifting the points in the corresponding direction - dir1 = 0.5 * particle_spacing * direction - dir2 = 0.5 * particle_spacing * normalize(plane_point2 - plane_point1) - - plane_point1 .+= dir1 + dir2 - plane_point2 .+= dir1 - dir2 - - return (plane_point1, plane_point2) -end - -function shift_plane_corners(plane_points::NTuple{3}, direction, particle_spacing, tlsph) - # With TLSPH, particles need to be AT the min coordinates and not half a particle - # spacing away from it. - (tlsph) && (return plane_points) - - plane_point1 = copy(plane_points[1]) - plane_point2 = copy(plane_points[2]) - plane_point3 = copy(plane_points[3]) - - edge1 = normalize(plane_point2 - plane_point1) - edge2 = normalize(plane_point3 - plane_point1) - - # Vectors shifting the points in the corresponding direction - dir1 = 0.5 * particle_spacing * direction - dir2 = 0.5 * particle_spacing * edge1 - dir3 = 0.5 * particle_spacing * edge2 - - plane_point1 .+= dir1 + dir2 + dir3 - plane_point2 .+= dir1 - dir2 + dir3 - plane_point3 .+= dir1 + dir2 - dir3 - - return (plane_point1, plane_point2, plane_point3) -end diff --git a/src/setups/rectangular_shape.jl b/src/setups/rectangular_shape.jl index d520bbfa5..1d8df54d4 100644 --- a/src/setups/rectangular_shape.jl +++ b/src/setups/rectangular_shape.jl @@ -1,83 +1,50 @@ """ - RectangularShape(particle_spacing, n_particles_per_dimension, min_coordinates; - velocity=zeros(length(n_particles_per_dimension)), - mass=nothing, density=nothing, pressure=0.0, - acceleration=nothing, state_equation=nothing, - tlsph=false, loop_order=nothing) + RectangularShape(particle_spacing, n_particles_per_dimension, density, + particle_position; loop_order=:x_first, + init_velocity=ntuple(_ -> 0.0, length(n_particles_per_dimension))) -Rectangular shape filled with particles. Returns an [`InitialCondition`](@ref). +Rectangular shape filled with particles. # Arguments -- `particle_spacing`: Spacing between the particles. -- `n_particles_per_dimension`: Tuple containing the number of particles in x, y and z - (only 3D) direction, respectively. -- `min_coordinates`: Coordinates of the corner in negative coordinate directions. +- `particle_spacing`: Spacing between the particles. +- `n_particles_per_dimension::Tuple`: Tuple containing the number of particles in x, y and z (only 3D) direction, respectively. +- `particle_position::Tuple`: Coordinates of the corner in negative coordinate directions. +- `density`: Initial density of particles. # Keywords -- `velocity`: Either a function mapping each particle's coordinates to its velocity, - or, for a constant fluid velocity, a vector holding this velocity. - Velocity is constant zero by default. -- `mass`: Either `nothing` (default) to automatically compute particle mass from particle - density and spacing, or a function mapping each particle's coordinates to its mass, - or a scalar for a constant mass over all particles. -- `density`: Either a function mapping each particle's coordinates to its density, - or a scalar for a constant density over all particles. - Obligatory when not using a state equation. Cannot be used together with - `state_equation`. -- `pressure`: Scalar to set the pressure of all particles to this value. - This is only used by the [`EntropicallyDampedSPHSystem`](@ref) and - will be overwritten when using an initial pressure function in the system. - Cannot be used together with hydrostatic pressure gradient. -- `acceleration`: In order to initialize particles with a hydrostatic pressure gradient, - an acceleration vector can be passed. Note that only accelerations - in one coordinate direction and no diagonal accelerations are supported. - This will only change the pressure of the particles. When using the - [`WeaklyCompressibleSPHSystem`](@ref), pass a `state_equation` as well - to initialize the particles with the corresponding density and mass. - When using the [`EntropicallyDampedSPHSystem`](@ref), the pressure - will be overwritten when using an initial pressure function in the system. - This cannot be used together with the `pressure` keyword argument. -- `state_equation`: When calculating a hydrostatic pressure gradient by setting `acceleration`, - the `state_equation` will be used to set the corresponding density. - Cannot be used together with `density`. -- `tlsph`: With the [`TotalLagrangianSPHSystem`](@ref), particles need to be placed - on the boundary of the shape and not one particle radius away, as for fluids. - When `tlsph=true`, particles will be placed on the boundary of the shape. +- `loop_order`: To enforce a specific particle indexing by reordering the indexing loop (possible values: `:x_first`, `:y_first`, `:z_first`). +- `init_velocity`: The initial velocity of the fluid particles as `(vel_x, vel_y)` (or `(vel_x, vel_y, vel_z)` in 3D). -# Examples -```jldoctest; output = false, setup = :(particle_spacing = 0.1) -# 2D -rectangular = RectangularShape(particle_spacing, (5, 4), (1.0, 2.0), density=1000.0) - -# 2D with hydrostatic pressure gradient. -# `state_equation` has to be the same as for the WCSPH system. -state_equation = StateEquationCole(sound_speed=20.0, exponent=7, reference_density=1000.0) -rectangular = RectangularShape(particle_spacing, (5, 4), (1.0, 2.0), - acceleration=(0.0, -9.81), state_equation=state_equation) - -# 3D -rectangular = RectangularShape(particle_spacing, (5, 4, 7), (1.0, 2.0, 3.0), density=1000.0) +# Fields +- `coordinates::Matrix`: Coordinates of the particles. +- `masses::Vector`: Masses of the particles. +- `densities::Vector`: Densities of the particles. -# output -InitialCondition{Float64}(0.1, [1.05 1.15 … 1.35 1.45; 2.05 2.05 … 2.35 2.35; 3.05 3.05 … 3.65 3.65], [0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0], [1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002 … 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002], [1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0 … 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 … 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) +# Examples +2D: +```julia +rectangular = RectangularShape(particle_spacing, (5, 4), (1.0, 2.0), 1000.0) +``` +3D: +```julia +rectangular = RectangularShape(particle_spacing, (5, 4, 7), (1.0, 2.0, 3.0), 1000.0) ``` """ -function RectangularShape(particle_spacing, n_particles_per_dimension, min_coordinates; - velocity=zeros(length(n_particles_per_dimension)), - mass=nothing, density=nothing, pressure=0.0, - acceleration=nothing, state_equation=nothing, - tlsph=false, loop_order=nothing) +function RectangularShape(particle_spacing, n_particles_per_dimension, + particle_position, density; loop_order=:x_first, + init_velocity=ntuple(_ -> 0.0, + length(n_particles_per_dimension))) if particle_spacing < eps() throw(ArgumentError("`particle_spacing` needs to be positive and larger than $(eps())")) end NDIMS = length(n_particles_per_dimension) - if length(min_coordinates) != NDIMS - throw(ArgumentError("`min_coordinates` must be of length $NDIMS for a $(NDIMS)D problem")) + if length(particle_position) != NDIMS + throw(ArgumentError("`particle_position` must be of length $NDIMS for a $(NDIMS)D problem")) end - if density !== nothing && any(density .< eps()) + if density < eps() throw(ArgumentError("`density` needs to be positive and larger than $(eps())")) end @@ -86,160 +53,96 @@ function RectangularShape(particle_spacing, n_particles_per_dimension, min_coord n_particles = prod(n_particles_per_dimension) coordinates = rectangular_shape_coords(particle_spacing, n_particles_per_dimension, - min_coordinates, tlsph=tlsph, - loop_order=loop_order) - - # Allow zero acceleration with state equation, but interpret `nothing` acceleration - # with state equation as a likely mistake. - if acceleration isa AbstractVector || acceleration isa Tuple - if pressure != 0.0 - throw(ArgumentError("`pressure` cannot be used together with `acceleration` " * - "and `state_equation` (hydrostatic pressure gradient)")) - end + particle_position, loop_order=loop_order) + velocities = init_velocity .* ones(ELTYPE, size(coordinates)) - if state_equation === nothing - density_fun = pressure -> density - else - if density !== nothing - throw(ArgumentError("`density` cannot be used together with `acceleration` " * - "and `state_equation` (hydrostatic pressure gradient)")) - end - density_fun = pressure -> inverse_state_equation(state_equation, pressure) - end - - # Initialize hydrostatic pressure - pressure = Vector{ELTYPE}(undef, n_particles) - initialize_pressure!(pressure, particle_spacing, acceleration, - density_fun, n_particles_per_dimension, loop_order) - - if state_equation !== nothing - # Weakly compressible case: get density from inverse state equation - density = inverse_state_equation.(Ref(state_equation), pressure) - end - elseif acceleration !== nothing - throw(ArgumentError("`acceleration` must either be `nothing` or a vector/tuple")) - elseif state_equation !== nothing - throw(ArgumentError("`state_equation` must be used together with `acceleration`")) - end - - if density === nothing - throw(ArgumentError("`density` must be specified when not using `acceleration` " * - "and `state_equation` (hydrostatic pressure gradient)")) - end + densities = density * ones(ELTYPE, n_particles) + masses = density * particle_spacing^NDIMS * ones(ELTYPE, n_particles) - return InitialCondition(; coordinates, velocity, density, mass, pressure, - particle_spacing) -end - -# 1D -function loop_permutation(loop_order, NDIMS::Val{1}) - if loop_order === :x_first || loop_order === nothing - permutation = (1,) - else - throw(ArgumentError("$loop_order is not a valid loop order. " * - "Possible values are :x_first.")) - end - - return permutation -end - -# 2D -function loop_permutation(loop_order, NDIMS::Val{2}) - if loop_order === :y_first || loop_order === nothing - permutation = (1, 2) - elseif loop_order === :x_first - permutation = (2, 1) - else - throw(ArgumentError("$loop_order is not a valid loop order. " * - "Possible values are :x_first and :y_first.")) - end - - return permutation -end - -# 3D -function loop_permutation(loop_order, NDIMS::Val{3}) - if loop_order === :z_first || loop_order === nothing - permutation = (1, 2, 3) - elseif loop_order === :y_first - permutation = (2, 1, 3) - elseif loop_order === :x_first - permutation = (3, 2, 1) - else - throw(ArgumentError("$loop_order is not a valid loop order. " * - "Possible values are :x_first, :y_first and :z_first")) - end - - return permutation + return InitialCondition(coordinates, velocities, masses, densities) end function rectangular_shape_coords(particle_spacing, n_particles_per_dimension, - min_coordinates; tlsph=false, loop_order=nothing) + particle_position; loop_order=:x_first) ELTYPE = eltype(particle_spacing) NDIMS = length(n_particles_per_dimension) coordinates = Array{ELTYPE, 2}(undef, NDIMS, prod(n_particles_per_dimension)) - # With TLSPH, particles need to be AT the min coordinates and not half a particle - # spacing away from it. - if tlsph - min_coordinates = min_coordinates .- 0.5particle_spacing - end - - permutation = loop_permutation(loop_order, Val(NDIMS)) - cartesian_indices = CartesianIndices(n_particles_per_dimension) - permuted_indices = permutedims(cartesian_indices, permutation) - - for particle in eachindex(permuted_indices) - index = Tuple(permuted_indices[particle]) - - # The first particle starts at a distance `0.5particle_spacing` from - # `min_coordinates` in each dimension. - coordinates[:, particle] .= min_coordinates .+ particle_spacing .* (index .- 0.5) - end + initialize_rectangular!(coordinates, particle_spacing, particle_position, + n_particles_per_dimension, loop_order) return coordinates end -function initialize_pressure!(pressure, particle_spacing, acceleration, density_fun, - n_particles_per_dimension, loop_order) - if count(a -> abs(a) > eps(), acceleration) > 1 - throw(ArgumentError("hydrostatic pressure calculation is not supported with " * - "diagonal acceleration")) - end +# 2D +function initialize_rectangular!(coordinates, particle_spacing, + particle_position::NTuple{2}, + n_particles_per_dimension::NTuple{2}, loop_order) + n_particles_x, n_particles_y = n_particles_per_dimension + particle = 0 + + if loop_order === :x_first + for x in 1:n_particles_x, y in 1:n_particles_y + particle += 1 + fill_coordinates!(coordinates, particle, particle_position, x, y, + particle_spacing) + end + + elseif loop_order === :y_first + for y in 1:n_particles_y, x in 1:n_particles_x + particle += 1 + fill_coordinates!(coordinates, particle, particle_position, x, y, + particle_spacing) + end - # Dimension in which the acceleration is acting - accel_dim = findfirst(a -> abs(a) > eps(), acceleration) + else + throw(ArgumentError("$loop_order is not a valid loop order. Possible values are :x_first and :y_first.")) + end +end - # Compute 1D pressure gradient with explicit Euler method - factor = particle_spacing * abs(acceleration[accel_dim]) +# 3D +function initialize_rectangular!(coordinates, particle_spacing, + particle_position::NTuple{3}, + n_particles_per_dimension::NTuple{3}, loop_order) + n_particles_x, n_particles_y, n_particles_z = n_particles_per_dimension + particle = 0 + + if loop_order === :x_first + for x in 1:n_particles_x, y in 1:n_particles_y, z in 1:n_particles_z + particle += 1 + fill_coordinates!(coordinates, particle, particle_position, x, y, z, + particle_spacing) + end - pressure_1d = zeros(n_particles_per_dimension[accel_dim]) + elseif loop_order === :y_first + for y in 1:n_particles_y, x in 1:n_particles_x, z in 1:n_particles_z + particle += 1 + fill_coordinates!(coordinates, particle, particle_position, x, y, z, + particle_spacing) + end - # The first particle is half a particle spacing from the surface, so start with a - # half step. - pressure_1d[1] = 0.5factor * density_fun(0.0) + elseif loop_order === :z_first + for z in 1:n_particles_z, y in 1:n_particles_y, x in 1:n_particles_x + particle += 1 + fill_coordinates!(coordinates, particle, particle_position, x, y, z, + particle_spacing) + end - for i in 1:(length(pressure_1d) - 1) - # Explicit Euler step - pressure_1d[i + 1] = pressure_1d[i] + factor * density_fun(pressure_1d[i]) + else + throw(ArgumentError("$loop_order is not a valid loop order. Possible values are :x_first, :y_first and :z_first")) end +end - # If acceleration is pointing in negative coordinate direction, reverse the pressure - # gradient, because the surface is at the top and the gradient should start from there. - if sign(acceleration[accel_dim]) < 0 - reverse!(pressure_1d) - end +@inline function fill_coordinates!(coordinates, particle, + particle_position::NTuple{2}, x, y, particle_spacing) + coordinates[1, particle] = particle_position[1] + (x - 1) * particle_spacing + coordinates[2, particle] = particle_position[2] + (y - 1) * particle_spacing +end - # Loop over all particles and access 1D pressure gradient. - # Apply permutation depending on loop order to match indexing of the coordinates. - cartesian_indices = CartesianIndices(n_particles_per_dimension) - permutation = loop_permutation(loop_order, Val(length(n_particles_per_dimension))) - permuted_indices = permutedims(cartesian_indices, permutation) - for particle in eachindex(pressure) - # The index in the dimension where the acceleration is acting to index 1D pressure - # vector. - index_in_accel_dim = permuted_indices[particle][accel_dim] - pressure[particle] = pressure_1d[index_in_accel_dim] - end +@inline function fill_coordinates!(coordinates, particle, + particle_position::NTuple{3}, x, y, z, particle_spacing) + coordinates[1, particle] = particle_position[1] + (x - 1) * particle_spacing + coordinates[2, particle] = particle_position[2] + (y - 1) * particle_spacing + coordinates[3, particle] = particle_position[3] + (z - 1) * particle_spacing end diff --git a/src/setups/rectangular_tank.jl b/src/setups/rectangular_tank.jl index 70b179e3b..d4bc92100 100644 --- a/src/setups/rectangular_tank.jl +++ b/src/setups/rectangular_tank.jl @@ -1,91 +1,57 @@ @doc raw""" - RectangularTank(particle_spacing, fluid_size, tank_size, fluid_density; - velocity=zeros(length(fluid_size)), fluid_mass=nothing, - pressure=0.0, - acceleration=nothing, state_equation=nothing, - boundary_density=fluid_density, - n_layers=1, spacing_ratio=1.0, - min_coordinates=zeros(length(fluid_size)), - faces=Tuple(trues(2 * length(fluid_size)))) + RectangularTank(particle_spacing, fluid_size::NTuple{2}, tank_size::NTuple{2}, + fluid_density; + n_layers=1, spacing_ratio=1.0, init_velocity=(0.0, 0.0), + boundary_density=fluid_density, faces=Tuple(trues(4))) + + RectangularTank(particle_spacing, fluid_size::NTuple{3}, tank_size::NTuple{3}, + fluid_density; + n_layers=1, spacing_ratio=1.0, init_velocity=(0.0, 0.0, 0.0), + boundary_density=fluid_density, faces=Tuple(trues(6))) Rectangular tank filled with a fluid to set up dam-break-style simulations. # Arguments -- `particle_spacing`: Spacing between the fluid particles. +- `particle_spacing`: Spacing between the fluid particles - `fluid_size`: The dimensions of the fluid as `(x, y)` (or `(x, y, z)` in 3D). - `tank_size`: The dimensions of the tank as `(x, y)` (or `(x, y, z)` in 3D). -- `fluid_density`: The rest density of the fluid. Will only be used as default for - `boundary_density` when using a state equation. +- `fluid_density`: The rest density of the fluid. # Keywords -- `velocity`: Either a function mapping each particle's coordinates to its velocity, - or, for a constant fluid velocity, a vector holding this velocity. - Velocity is constant zero by default. -- `fluid_mass`: Either `nothing` (default) to automatically compute particle mass from particle - density and spacing, or a function mapping each particle's coordinates to its mass, - or a scalar for a constant mass over all particles. -- `pressure`: Scalar to set the pressure of all particles to this value. - This is only used by the [`EntropicallyDampedSPHSystem`](@ref) and - will be overwritten when using an initial pressure function in the system. - Cannot be used together with hydrostatic pressure gradient. -- `acceleration`: In order to initialize particles with a hydrostatic pressure gradient, - an acceleration vector can be passed. Note that only accelerations - in one coordinate direction and no diagonal accelerations are supported. - This will only change the pressure of the particles. When using the - [`WeaklyCompressibleSPHSystem`](@ref), pass a `state_equation` as well - to initialize the particles with the corresponding density and mass. - When using the [`EntropicallyDampedSPHSystem`](@ref), the pressure - will be overwritten when using an initial pressure function in the system. - This cannot be used together with the `pressure` keyword argument. -- `state_equation`: When calculating a hydrostatic pressure gradient by setting `acceleration`, - the `state_equation` will be used to set the corresponding density. - Cannot be used together with `density`. -- `boundary_density`: Density of each boundary particle (by default set to the fluid density) - `n_layers`: Number of boundary layers. -- `spacing_ratio`: Ratio of `particle_spacing` to boundary particle spacing. - A value of 2 means that the boundary particle spacing will be - half the fluid particle spacing. -- `min_coordinates`: Coordinates of the corner in negative coordinate directions. -- `faces`: By default all faces are generated. Set faces by passing a - bit-array of length 4 (2D) or 6 (3D) to generate the faces in the - normal direction: -x,+x,-y,+y,-z,+z. +- `spacing_ratio`: Ratio of `particle_spacing` to boundary particle spacing. A value of 2 means that the boundary particle spacing will be half the fluid particle spacing. +- `init_velocity`: The initial velocity of the fluid particles as `(x, y)` (or `(x, y, z)` in 3D). +- `boundary_density`: Density of the boundary particles (by default set to the rest density) +- `faces`: By default all faces are generated. Set faces by passing an bit-array of length 4 (2D) or 6 (3D) to generate the faces in the normal direction: -x,+x,-y,+y,-z,+z # Fields -- `fluid::InitialCondition`: [`InitialCondition`](@ref) for the fluid. -- `boundary::InitialCondition`: [`InitialCondition`](@ref) for the boundary. -- `fluid_size::Tuple`: Tuple containing the size of the fluid in each dimension after rounding. -- `tank_size::Tuple`: Tuple containing the size of the tank in each dimension after rounding. +- `coordinates::Matrix`: Coordinates of the fluid particles +- `velocities::Matrix`: Velocity of the fluid particles +- `masses::Vector`: Masses of the fluid particles +- `densities::Vector`: Densities of the fluid particles +- `boundary_coordinates::Matrix`: Coordinates of the boundary particles +- `boundary_masses::Vector`: Masses of the boundary particles +- `boundary_densities::Vector`: Densities of the boundary particles # Examples -```jldoctest; output = false, filter = r"RectangularTank.*", setup = :(particle_spacing = 0.1; water_width = water_depth = container_width = container_height = container_depth = 1.0; water_height = 0.5; fluid_density = 1000.0) -# 2D +2D: +```julia setup = RectangularTank(particle_spacing, (water_width, water_height), - (container_width, container_height), fluid_density, + (container_width, container_height), particle_density, n_layers=2, spacing_ratio=3) +``` -# 2D with hydrostatic pressure gradient. -# `state_equation` has to be the same as for the WCSPH system. -state_equation = StateEquationCole(sound_speed=10.0, exponent=1, reference_density=1000.0) -setup = RectangularTank(particle_spacing, (water_width, water_height), - (container_width, container_height), fluid_density, - acceleration=(0.0, -9.81), state_equation=state_equation) - -# 3D +3D: +```julia setup = RectangularTank(particle_spacing, (water_width, water_height, water_depth), - (container_width, container_height, container_depth), fluid_density, - n_layers=2) - -# output -RectangularTank{3, 6, Float64}(...) *the rest of this line is ignored by filter* + (container_width, container_height, container_depth), particle_density, n_layers=2) ``` -See also: [`reset_wall!`](@ref). +See also: [`reset_wall!`](@ref) """ struct RectangularTank{NDIMS, NDIMSt2, ELTYPE <: Real} fluid :: InitialCondition{ELTYPE} boundary :: InitialCondition{ELTYPE} - fluid_size :: NTuple{NDIMS, ELTYPE} - tank_size :: NTuple{NDIMS, ELTYPE} faces_ :: NTuple{NDIMSt2, Bool} # store if face in dir exists (-x +x -y +y -z +z) face_indices :: NTuple{NDIMSt2, Array{Int, 2}} # see `reset_wall!` particle_spacing :: ELTYPE @@ -93,209 +59,202 @@ struct RectangularTank{NDIMS, NDIMSt2, ELTYPE <: Real} n_layers :: Int n_particles_per_dimension :: NTuple{NDIMS, Int} - function RectangularTank(particle_spacing, fluid_size, tank_size, fluid_density; - velocity=zeros(length(fluid_size)), fluid_mass=nothing, - pressure=0.0, - acceleration=nothing, state_equation=nothing, - boundary_density=fluid_density, - n_layers=1, spacing_ratio=1.0, - min_coordinates=zeros(length(fluid_size)), - faces=Tuple(trues(2 * length(fluid_size)))) - NDIMS = length(fluid_size) - ELTYPE = eltype(particle_spacing) - fluid_size_ = Tuple(ELTYPE.(fluid_size)) - tank_size_ = Tuple(ELTYPE.(tank_size)) - + function RectangularTank(particle_spacing, fluid_size::NTuple{2}, tank_size, + fluid_density; + n_layers=1, spacing_ratio=1.0, init_velocity=(0.0, 0.0), + boundary_density=fluid_density, faces=Tuple(trues(4))) if particle_spacing < eps() - throw(ArgumentError("`particle_spacing` needs to be positive and larger than $(eps()).")) + throw(ArgumentError("Particle spacing needs to be positive and larger than $(eps()).")) end if fluid_density < eps() - throw(ArgumentError("`fluid_density` needs to be positive and larger than $(eps()).")) + throw(ArgumentError("Density needs to be positive and larger than $(eps()).")) end + NDIMS = 2 + if length(tank_size) != NDIMS throw(ArgumentError("`tank_size` must be of length $NDIMS for a $(NDIMS)D problem")) end - # Fluid particle data - n_particles_per_dim, fluid_size_ = fluid_particles_per_dimension(fluid_size_, - particle_spacing) + ELTYPE = eltype(particle_spacing) - # If sizes were equal before rounding, make sure they're equal after rounding as well - for dim in 1:NDIMS - if isapprox(fluid_size[dim], tank_size[dim]) - tank_size_ = setindex(tank_size_, fluid_size_[dim], dim) - end - end + # Leave space for the fluid particles + tank_size = tank_size .+ particle_spacing # Boundary particle data - n_boundaries_per_dim, tank_size_ = boundary_particles_per_dimension(tank_size_, - particle_spacing, - spacing_ratio) + n_boundaries_per_dim, tank_size = boundary_particles_per_dimension(tank_size, + particle_spacing, + spacing_ratio) - boundary_spacing = particle_spacing / spacing_ratio - boundary_coordinates, face_indices = initialize_boundaries(boundary_spacing, - tank_size_, + boundary_coordinates, face_indices = initialize_boundaries(particle_spacing / + spacing_ratio, tank_size, n_boundaries_per_dim, n_layers, faces) - boundary_masses = boundary_density * boundary_spacing^NDIMS * + boundary_masses = boundary_density * (particle_spacing / spacing_ratio)^2 * ones(ELTYPE, size(boundary_coordinates, 2)) boundary_densities = boundary_density * ones(ELTYPE, size(boundary_coordinates, 2)) boundary_velocities = zeros(ELTYPE, size(boundary_coordinates)) - n_particles_per_dim, fluid_size_ = check_tank_overlap(fluid_size_, tank_size_, - particle_spacing, - n_particles_per_dim) - - boundary = InitialCondition(coordinates=boundary_coordinates, - velocity=boundary_velocities, - mass=boundary_masses, density=boundary_densities, - particle_spacing=boundary_spacing) - - # Move the tank corner in the negative coordinate directions to the desired position - boundary.coordinates .+= min_coordinates - - if norm(fluid_size) > eps() - if state_equation !== nothing - # Use hydrostatic pressure gradient and calculate density from inverse state - # equation, so don't pass fluid density. - fluid = RectangularShape(particle_spacing, n_particles_per_dim, - zeros(NDIMS); - velocity, pressure, acceleration, state_equation, - mass=fluid_mass) - else - fluid = RectangularShape(particle_spacing, n_particles_per_dim, - zeros(NDIMS); - density=fluid_density, velocity, pressure, - acceleration, state_equation, mass=fluid_mass) - end - # Move the tank corner in the negative coordinate directions to the desired position - fluid.coordinates .+= min_coordinates - else - # Fluid is empty - fluid = InitialCondition(coordinates=zeros(ELTYPE, NDIMS, 0), density=1.0) + # Particle data + n_particles_x = fluid_particles_per_dimension(fluid_size[1], particle_spacing, + "fluid width") + n_particles_y = fluid_particles_per_dimension(fluid_size[2], particle_spacing, + "fluid height") + + if tank_size[1] < fluid_size[1] - 1e-5 * particle_spacing + n_particles_x -= 1 + @info "The fluid was overlapping.\n New fluid width is set to $((n_particles_x + 1) * particle_spacing)" end - return new{NDIMS, 2 * NDIMS, ELTYPE}(fluid, boundary, fluid_size_, tank_size_, + if tank_size[2] < fluid_size[2] - 1e-5 * particle_spacing + n_particles_y -= 1 + @info "The fluid was overlapping.\n New fluid height is set to $((n_particles_y + 1) * particle_spacing)" + end + + n_particles_per_dimension = (n_particles_x, n_particles_y) + particle_coordinates = Array{Float64, 2}(undef, 2, prod(n_particles_per_dimension)) + particle_velocities = Array{Float64, 2}(undef, 2, prod(n_particles_per_dimension)) + + initialize_particles!(particle_coordinates, particle_velocities, particle_spacing, + init_velocity, n_particles_per_dimension) + particle_densities = fluid_density * ones(Float64, + prod(n_particles_per_dimension)) + + mass = fluid_density * particle_spacing^2 + particle_masses = mass * ones(ELTYPE, prod(n_particles_per_dimension)) + + fluid = InitialCondition(particle_coordinates, particle_velocities, + particle_masses, particle_densities) + + boundary = InitialCondition(boundary_coordinates, boundary_velocities, + boundary_masses, boundary_densities) + + return new{NDIMS, 2 * NDIMS, ELTYPE}(fluid, boundary, faces, face_indices, particle_spacing, spacing_ratio, n_layers, - n_particles_per_dim) + n_particles_per_dimension) end -end -function round_n_particles(size, spacing, type) - n_particles = round(Int, size / spacing) + function RectangularTank(particle_spacing, fluid_size::NTuple{3}, tank_size, + fluid_density; + n_layers=1, spacing_ratio=1.0, init_velocity=(0.0, 0.0, 0.0), + boundary_density=fluid_density, faces=Tuple(trues(6))) + NDIMS = 3 - new_size = n_particles * spacing - if round(new_size, digits=4) != round(size, digits=4) - @info "The desired $type $size is not a multiple of the particle spacing " * - "$spacing.\nNew $type is set to $new_size." - end + if particle_spacing < eps() + throw(ArgumentError("Particle spacing needs to be positive and larger than $(eps())!")) + end - return n_particles, new_size -end + if fluid_density < eps() + throw(ArgumentError("Density needs to be positive and larger than $(eps())!")) + end -function fluid_particles_per_dimension(size::NTuple{2}, particle_spacing) - n_particles_x, new_width = round_n_particles(size[1], particle_spacing, - "fluid length in x-direction") - n_particles_y, new_height = round_n_particles(size[2], particle_spacing, - "fluid length in y-direction") + if length(tank_size) != NDIMS + throw(ArgumentError("`tank_size` must be of length $NDIMS for a $(NDIMS)D problem")) + end - return (n_particles_x, n_particles_y), (new_width, new_height) -end + ELTYPE = eltype(particle_spacing) -function fluid_particles_per_dimension(size::NTuple{3}, particle_spacing) - n_particles_x, new_x_size = round_n_particles(size[1], particle_spacing, - "fluid length in x-direction") - n_particles_y, new_y_size = round_n_particles(size[2], particle_spacing, - "fluid length in y-direction") - n_particles_z, new_z_size = round_n_particles(size[3], particle_spacing, - "fluid length in z-direction") + # Leave space for the fluid particles + tank_size = tank_size .+ particle_spacing - return (n_particles_x, n_particles_y, n_particles_z), - (new_x_size, new_y_size, new_z_size) -end + # Boundary particle data + n_boundaries_per_dim, + tank_size = boundary_particles_per_dimension(tank_size, particle_spacing, + spacing_ratio) -function boundary_particles_per_dimension(tank_size::NTuple{2}, particle_spacing, - spacing_ratio) - n_particles_x, new_width = round_n_particles(tank_size[1], - particle_spacing / spacing_ratio, - "tank length in x-direction") - n_particles_y, new_height = round_n_particles(tank_size[2], - particle_spacing / spacing_ratio, - "tank length in y-direction") - - return (n_particles_x, n_particles_y), (new_width, new_height) -end + boundary_coordinates, + face_indices = initialize_boundaries(particle_spacing / spacing_ratio, tank_size, + n_boundaries_per_dim, n_layers, faces) -function boundary_particles_per_dimension(tank_size::NTuple{3}, particle_spacing, - spacing_ratio) - n_particles_x, new_x_size = round_n_particles(tank_size[1], - particle_spacing / spacing_ratio, - "tank length in x-direction") - n_particles_y, new_y_size = round_n_particles(tank_size[2], - particle_spacing / spacing_ratio, - "tank length in y-direction") - n_particles_z, new_z_size = round_n_particles(tank_size[3], - particle_spacing / spacing_ratio, - "tank length in z-direction") - - return (n_particles_x, n_particles_y, n_particles_z), - (new_x_size, new_y_size, new_z_size) -end + boundary_masses = boundary_density * (particle_spacing / spacing_ratio)^3 * + ones(ELTYPE, size(boundary_coordinates, 2)) + boundary_densities = boundary_density * ones(ELTYPE, size(boundary_coordinates, 2)) + boundary_velocities = zeros(ELTYPE, size(boundary_coordinates)) -function check_tank_overlap(fluid_size::NTuple{2}, tank_size, particle_spacing, - n_particles_per_dim) - n_particles_x, n_particles_y = n_particles_per_dim - fluid_size_x, fluid_size_y = fluid_size + # Particle data + n_particles_x = fluid_particles_per_dimension(fluid_size[1], particle_spacing, + "fluid width") + n_particles_y = fluid_particles_per_dimension(fluid_size[2], particle_spacing, + "fluid height") + n_particles_z = fluid_particles_per_dimension(fluid_size[3], particle_spacing, + "fluid depth") + + if tank_size[1] < fluid_size[1] - 1e-5 * particle_spacing + n_particles_x -= 1 + @info "The fluid was overlapping.\n New fluid width is set to $((n_particles_x + 1) * particle_spacing)" + end - if tank_size[1] < fluid_size[1] - 1e-5 * particle_spacing - n_particles_x -= 1 - fluid_size_x = n_particles_x * particle_spacing + if tank_size[2] < fluid_size[2] - 1e-5 * particle_spacing + n_particles_y -= 1 + @info "The fluid was overlapping.\n New fluid height is set to $((n_particles_y + 1) * particle_spacing)" + end - @info "The fluid was overlapping.\n New fluid length in x-direction is set to $fluid_size_x." - end + if tank_size[3] < fluid_size[3] - 1e-5 * particle_spacing + n_particles_z -= 1 + @info "The fluid was overlapping.\n New fluid depth is set to $((n_particles_z + 1) * particle_spacing)" + end - if tank_size[2] < fluid_size[2] - 1e-5 * particle_spacing - n_particles_y -= 1 - fluid_size_y = n_particles_y * particle_spacing + n_particles_per_dimension = (n_particles_x, n_particles_y, n_particles_z) - @info "The fluid was overlapping.\n New fluid length in y-direction is set to $fluid_size_y." - end + particle_coordinates = Array{Float64, 2}(undef, 3, prod(n_particles_per_dimension)) + particle_velocities = Array{Float64, 2}(undef, 3, prod(n_particles_per_dimension)) - return (n_particles_x, n_particles_y), (fluid_size_x, fluid_size_y) -end + initialize_particles!(particle_coordinates, particle_velocities, particle_spacing, + init_velocity, n_particles_per_dimension) + particle_densities = fluid_density * ones(Float64, prod(n_particles_per_dimension)) -function check_tank_overlap(fluid_size::NTuple{3}, tank_size, particle_spacing, - n_particles_per_dim) - n_particles_x, n_particles_y, n_particles_z = n_particles_per_dim - fluid_size_x, fluid_size_y, fluid_size_z = fluid_size + mass = fluid_density * particle_spacing^3 + particle_masses = mass * ones(ELTYPE, prod(n_particles_per_dimension)) - if tank_size[1] < fluid_size[1] - 1e-5 * particle_spacing - n_particles_x -= 1 - fluid_size_x = n_particles_x * particle_spacing + fluid = InitialCondition(particle_coordinates, particle_velocities, + particle_masses, particle_densities) - @info "The fluid was overlapping.\n New fluid length in x-direction is set to $fluid_size_x." + boundary = InitialCondition(boundary_coordinates, boundary_velocities, + boundary_masses, boundary_densities) + + return new{NDIMS, 2 * NDIMS, ELTYPE}(fluid, boundary, + faces, face_indices, + particle_spacing, spacing_ratio, n_layers, + n_particles_per_dimension) end +end - if tank_size[2] < fluid_size[2] - 1e-5 * particle_spacing - n_particles_y -= 1 - fluid_size_y = n_particles_y * particle_spacing +function initialize_particles!(particle_coordinates, particle_velocities, particle_spacing, + init_velocity, n_particles_per_dimension::NTuple{2}) + for y in 1:n_particles_per_dimension[2], + x in 1:n_particles_per_dimension[1] - @info "The fluid was overlapping.\n New fluid length in y-direction is set to $fluid_size_y." - end + particle = (x - 1) * n_particles_per_dimension[2] + y - if tank_size[3] < fluid_size[3] - 1e-5 * particle_spacing - n_particles_z -= 1 - fluid_size_z = n_particles_z * particle_spacing + # Coordinates + particle_coordinates[1, particle] = x * particle_spacing + particle_coordinates[2, particle] = y * particle_spacing - @info "The fluid was overlapping.\n New fluid length in z-direction is set to $fluid_size_z." + # Velocities + particle_velocities[:, particle] .= init_velocity end +end - return (n_particles_x, n_particles_y, n_particles_z), - (fluid_size_x, fluid_size_y, fluid_size_z) +function initialize_particles!(particle_coordinates, particle_velocities, particle_spacing, + init_velocity, n_particles_per_dimension::NTuple{3}) + for z in 1:n_particles_per_dimension[3], + y in 1:n_particles_per_dimension[2], + x in 1:n_particles_per_dimension[1] + + particle = (x - 1) * n_particles_per_dimension[2] * n_particles_per_dimension[3] + + (y - 1) * n_particles_per_dimension[3] + z + + # Coordinates + particle_coordinates[1, particle] = x * particle_spacing + particle_coordinates[2, particle] = y * particle_spacing + particle_coordinates[3, particle] = z * particle_spacing + + # Velocities + particle_velocities[:, particle] .= init_velocity + end end # 2D @@ -310,20 +269,19 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{2}, face_indices_4 = Array{Int, 2}(undef, n_layers, n_particles_x) # Create empty array to extend later depending on faces and corners to build - boundary_coordinates = Array{typeof(particle_spacing), 2}(undef, 2, 0) + boundary_coordinates = Array{Float64, 2}(undef, 2, 0) # Counts the global index of the particles index = 0 # For odd faces we need to shift the face outwards if we have multiple layers - layer_offset = -n_layers * particle_spacing + layer_offset = -(n_layers - 1) * particle_spacing #### Left boundary if faces[1] left_boundary = rectangular_shape_coords(particle_spacing, (n_layers, n_particles_y), - (layer_offset, 0.0), - loop_order=:x_first) + (layer_offset, particle_spacing)) # store coordinates of left boundary boundary_coordinates = hcat(boundary_coordinates, left_boundary) @@ -340,8 +298,7 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{2}, if faces[2] right_boundary = rectangular_shape_coords(particle_spacing, (n_layers, n_particles_y), - (tank_size[1], 0.0), - loop_order=:x_first) + (tank_size[1], particle_spacing)) # store coordinates of left boundary boundary_coordinates = hcat(boundary_coordinates, right_boundary) @@ -358,7 +315,7 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{2}, if faces[3] bottom_boundary = rectangular_shape_coords(particle_spacing, (n_particles_x, n_layers), - (0.0, layer_offset), + (particle_spacing, layer_offset), loop_order=:y_first) # store coordinates of left boundary @@ -376,7 +333,7 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{2}, if faces[4] top_boundary = rectangular_shape_coords(particle_spacing, (n_particles_x, n_layers), - (0.0, tank_size[2]), + (particle_spacing, tank_size[2]), loop_order=:y_first) # store coordinates of left boundary @@ -441,20 +398,20 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{3}, face_indices_6 = Array{Int, 2}(undef, n_layers, n_particles_x * n_particles_y) # Create empty array to extend later depending on faces and corners to build - boundary_coordinates = Array{typeof(particle_spacing), 2}(undef, 3, 0) + boundary_coordinates = Array{Float64, 2}(undef, 3, 0) # Counts the global index of the particles index = 0 # For odd faces we need to shift the face outwards if we have multiple layers - layer_offset = -n_layers * particle_spacing + layer_offset = -(n_layers - 1) * particle_spacing #### -x boundary (y-z-plane) if faces[1] x_neg_boundary = rectangular_shape_coords(particle_spacing, (n_layers, n_particles_y, n_particles_z), - (layer_offset, 0.0, 0.0), - loop_order=:x_first) + (layer_offset, particle_spacing, + particle_spacing)) # store coordinates of left boundary boundary_coordinates = hcat(boundary_coordinates, x_neg_boundary) @@ -471,8 +428,8 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{3}, if faces[2] x_pos_boundary = rectangular_shape_coords(particle_spacing, (n_layers, n_particles_y, n_particles_z), - (tank_size[1], 0.0, 0.0), - loop_order=:x_first) + (tank_size[1], particle_spacing, + particle_spacing)) # store coordinates of left boundary boundary_coordinates = hcat(boundary_coordinates, x_pos_boundary) @@ -489,7 +446,8 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{3}, if faces[3] y_neg_boundary = rectangular_shape_coords(particle_spacing, (n_particles_x, n_layers, n_particles_z), - (0.0, layer_offset, 0.0), + (particle_spacing, layer_offset, + particle_spacing), loop_order=:y_first) # store coordinates of left boundary @@ -507,8 +465,8 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{3}, if faces[4] y_pos_boundary = rectangular_shape_coords(particle_spacing, (n_particles_x, n_layers, n_particles_z), - (0.0, tank_size[2], 0.0), - loop_order=:y_first) + (particle_spacing, tank_size[2], + particle_spacing), loop_order=:y_first) # store coordinates of left boundary boundary_coordinates = hcat(boundary_coordinates, y_pos_boundary) @@ -525,8 +483,8 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{3}, if faces[5] z_neg_boundary = rectangular_shape_coords(particle_spacing, (n_particles_x, n_particles_y, n_layers), - (0.0, 0.0, layer_offset), - loop_order=:z_first) + (particle_spacing, particle_spacing, + layer_offset), loop_order=:z_first) # store coordinates of left boundary boundary_coordinates = hcat(boundary_coordinates, z_neg_boundary) @@ -543,8 +501,8 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{3}, if faces[6] z_pos_boundary = rectangular_shape_coords(particle_spacing, (n_particles_x, n_particles_y, n_layers), - (0.0, 0.0, tank_size[3]), - loop_order=:z_first) + (particle_spacing, particle_spacing, + tank_size[3]), loop_order=:z_first) # store coordinates of left boundary boundary_coordinates = hcat(boundary_coordinates, z_pos_boundary) @@ -561,84 +519,84 @@ function initialize_boundaries(particle_spacing, tank_size::NTuple{3}, if faces[1] && faces[3] edge_1_3 = rectangular_shape_coords(particle_spacing, (n_layers, n_layers, n_particles_z), - (layer_offset, layer_offset, 0.0)) + (layer_offset, layer_offset, particle_spacing)) boundary_coordinates = hcat(boundary_coordinates, edge_1_3) end if faces[1] && faces[4] edge_1_4 = rectangular_shape_coords(particle_spacing, (n_layers, n_layers, n_particles_z), - (layer_offset, tank_size[2], 0.0)) + (layer_offset, tank_size[2], particle_spacing)) boundary_coordinates = hcat(boundary_coordinates, edge_1_4) end if faces[2] && faces[3] edge_2_3 = rectangular_shape_coords(particle_spacing, (n_layers, n_layers, n_particles_z), - (tank_size[1], layer_offset, 0.0)) + (tank_size[1], layer_offset, particle_spacing)) boundary_coordinates = hcat(boundary_coordinates, edge_2_3) end if faces[2] && faces[4] edge_2_4 = rectangular_shape_coords(particle_spacing, (n_layers, n_layers, n_particles_z), - (tank_size[1], tank_size[2], 0.0)) + (tank_size[1], tank_size[2], particle_spacing)) boundary_coordinates = hcat(boundary_coordinates, edge_2_4) end if faces[5] && faces[3] edge_5_3 = rectangular_shape_coords(particle_spacing, (n_particles_x, n_layers, n_layers), - (0.0, layer_offset, layer_offset)) + (particle_spacing, layer_offset, layer_offset)) boundary_coordinates = hcat(boundary_coordinates, edge_5_3) end if faces[5] && faces[4] edge_5_4 = rectangular_shape_coords(particle_spacing, (n_particles_x, n_layers, n_layers), - (0.0, tank_size[2], layer_offset)) + (particle_spacing, tank_size[2], layer_offset)) boundary_coordinates = hcat(boundary_coordinates, edge_5_4) end if faces[6] && faces[3] edge_6_3 = rectangular_shape_coords(particle_spacing, (n_particles_x, n_layers, n_layers), - (0.0, layer_offset, tank_size[3])) + (particle_spacing, layer_offset, tank_size[3])) boundary_coordinates = hcat(boundary_coordinates, edge_6_3) end if faces[6] && faces[4] edge_6_4 = rectangular_shape_coords(particle_spacing, (n_particles_x, n_layers, n_layers), - (0.0, tank_size[2], tank_size[3])) + (particle_spacing, tank_size[2], tank_size[3])) boundary_coordinates = hcat(boundary_coordinates, edge_6_4) end if faces[1] && faces[5] edge_1_5 = rectangular_shape_coords(particle_spacing, (n_layers, n_particles_y, n_layers), - (layer_offset, 0.0, layer_offset)) + (layer_offset, particle_spacing, layer_offset)) boundary_coordinates = hcat(boundary_coordinates, edge_1_5) end if faces[1] && faces[6] edge_1_6 = rectangular_shape_coords(particle_spacing, (n_layers, n_particles_y, n_layers), - (layer_offset, 0.0, tank_size[3])) + (layer_offset, particle_spacing, tank_size[3])) boundary_coordinates = hcat(boundary_coordinates, edge_1_6) end if faces[5] && faces[2] edge_5_2 = rectangular_shape_coords(particle_spacing, (n_layers, n_particles_y, n_layers), - (tank_size[1], 0.0, layer_offset)) + (tank_size[1], particle_spacing, layer_offset)) boundary_coordinates = hcat(boundary_coordinates, edge_5_2) end if faces[6] && faces[2] edge_6_2 = rectangular_shape_coords(particle_spacing, (n_layers, n_particles_y, n_layers), - (tank_size[1], 0.0, tank_size[3])) + (tank_size[1], particle_spacing, tank_size[3])) boundary_coordinates = hcat(boundary_coordinates, edge_6_2) end @@ -718,7 +676,8 @@ The selected walls of the tank will be placed at the new positions. There are overlapping particles when adjacent walls are moved inwards simultaneously. """ function reset_wall!(rectangular_tank, reset_faces, positions) - (; boundary, particle_spacing, spacing_ratio, n_layers, face_indices) = rectangular_tank + @unpack boundary, particle_spacing, spacing_ratio, + n_layers, face_indices = rectangular_tank for face in eachindex(reset_faces) dim = div(face - 1, 2) + 1 @@ -733,17 +692,86 @@ function reset_wall!(rectangular_tank, reset_faces, positions) layer_shift = if iseven(face) (layer - 1) * particle_spacing / spacing_ratio else - # Odd faces need to be shifted outwards by `particle_spacing` - # to be outside of the fluid. - -(layer - 1) * particle_spacing / spacing_ratio - particle_spacing + -(layer - 1) * particle_spacing / spacing_ratio end - # Set position - boundary.coordinates[dim, particle] = positions[face] + layer_shift + - 0.5particle_spacing + # set position + boundary.coordinates[dim, particle] = positions[face] + layer_shift end end end return rectangular_tank end + +function fluid_particles_per_dimension(size, spacing, dimension) + n_particles = round(Int, size / spacing) + + new_size = n_particles * spacing + if round(new_size, digits=4) != round(size, digits=4) + print_warn_message(dimension, size, new_size) + end + + return n_particles +end + +function boundary_particles_per_dimension(tank_size::NTuple{2}, particle_spacing, + spacing_ratio) + n_boundaries_x = round(Int, (tank_size[1] / particle_spacing * spacing_ratio)) + n_boundaries_y = round(Int, (tank_size[2] / particle_spacing * spacing_ratio)) + + new_container_width = n_boundaries_x * (particle_spacing / spacing_ratio) + new_container_height = n_boundaries_y * (particle_spacing / spacing_ratio) + + if round(new_container_width, digits=4) != round(tank_size[1], digits=4) + print_warn_message("container width", tank_size[1], new_container_width) + end + if round(new_container_height, digits=4) != round(tank_size[2], digits=4) + print_warn_message("container height", tank_size[2], new_container_height) + end + + # The container size is larger than the fluid area by one particle spacing, + # since the boundary particles enclose the fluid particles. + # For the boundary faces we need the size of the fluid area. + # Thus, remove one particle again. + n_boundaries_x -= 1 + n_boundaries_y -= 1 + + return (n_boundaries_x, n_boundaries_y), (new_container_width, new_container_height) +end + +function boundary_particles_per_dimension(tank_size::NTuple{3}, particle_spacing, + spacing_ratio) + n_boundaries_x = round(Int, tank_size[1] / particle_spacing * spacing_ratio) + n_boundaries_y = round(Int, tank_size[2] / particle_spacing * spacing_ratio) + n_boundaries_z = round(Int, tank_size[3] / particle_spacing * spacing_ratio) + + new_container_width = n_boundaries_x * (particle_spacing / spacing_ratio) + new_container_height = n_boundaries_y * (particle_spacing / spacing_ratio) + new_container_depth = n_boundaries_z * (particle_spacing / spacing_ratio) + + if round(new_container_width, digits=4) != round(tank_size[1], digits=4) + print_warn_message("container width", tank_size[1], new_container_width) + end + if round(new_container_height, digits=4) != round(tank_size[2], digits=4) + print_warn_message("container height", tank_size[2], new_container_height) + end + if round(new_container_depth, digits=4) != round(tank_size[3], digits=4) + print_warn_message("container depth", tank_size[3], new_container_depth) + end + + # The container size is larger than the fluid area by one particle spacing, + # since the boundary particles enclose the fluid particles. + # For the boundary faces we need the size of the fluid area. + # Thus, remove one particle again. + n_boundaries_x -= 1 + n_boundaries_y -= 1 + n_boundaries_z -= 1 + + return (n_boundaries_x, n_boundaries_y, n_boundaries_z), + (new_container_width, new_container_height, new_container_depth) +end + +function print_warn_message(dimension, size, new_size) + @info "The desired $dimension $size is not a multiple of the particle spacing.\n New $dimension is set to $new_size." +end diff --git a/src/setups/setups.jl b/src/setups/setups.jl index f8c625874..fc557f2fb 100644 --- a/src/setups/setups.jl +++ b/src/setups/setups.jl @@ -1,4 +1,3 @@ -include("sphere_shape.jl") +include("circular_shape.jl") include("rectangular_shape.jl") include("rectangular_tank.jl") -include("extrude_geometry.jl") diff --git a/src/setups/sphere_shape.jl b/src/setups/sphere_shape.jl deleted file mode 100644 index ba347738e..000000000 --- a/src/setups/sphere_shape.jl +++ /dev/null @@ -1,418 +0,0 @@ -""" - SphereShape(particle_spacing, radius, center_position, density; - sphere_type=VoxelSphere(), n_layers=-1, layer_outwards=false, - cutout_min=(0.0, 0.0), cutout_max=(0.0, 0.0), tlsph=false, - velocity=zeros(length(center_position)), mass=nothing, pressure=0.0) - -Generate a sphere that is either completely filled (by default) -or hollow (by passing `n_layers`). - -With the sphere type [`VoxelSphere`](@ref), a sphere of voxels (where particles are placed -in the voxel center) with a regular inner structure but corners on the surface is created. -Essentially, a grid of particles is generated and all particles outside the sphere are removed. -With the sphere type [`RoundSphere`](@ref), a perfectly round sphere with an imperfect inner -structure is created. - -A cuboid can be cut out of the sphere by specifying the two corners in negative and positive -coordinate directions as `cutout_min` and `cutout_max`. - -# Arguments -- `particle_spacing`: Spacing between the particles. -- `radius`: Radius of the sphere. -- `center_position`: The coordinates of the center of the sphere. -- `density`: Either a function mapping each particle's coordinates to its density, - or a scalar for a constant density over all particles. - -# Keywords -- `sphere_type`: Either [`VoxelSphere`](@ref) or [`RoundSphere`](@ref) (see - explanation above). -- `n_layers`: Set to an integer greater than zero to generate a hollow sphere, - where the shell consists of `n_layers` layers. -- `layer_outwards`: When set to `false` (by default), `radius` is the outer radius - of the sphere. When set to `true`, `radius` is the inner radius - of the sphere. This is only used when `n_layers > 0`. -- `cutout_min`: Corner in negative coordinate directions of a cuboid that is to be - cut out of the sphere. -- `cutout_max`: Corner in positive coordinate directions of a cuboid that is to be - cut out of the sphere. -- `tlsph`: With the [`TotalLagrangianSPHSystem`](@ref), particles need to be placed - on the boundary of the shape and not one particle radius away, as for fluids. - When `tlsph=true`, particles will be placed on the boundary of the shape. -- `velocity`: Either a function mapping each particle's coordinates to its velocity, - or, for a constant fluid velocity, a vector holding this velocity. - Velocity is constant zero by default. -- `mass`: Either `nothing` (default) to automatically compute particle mass from particle - density and spacing, or a function mapping each particle's coordinates to its mass, - or a scalar for a constant mass over all particles. -- `pressure`: Either a function mapping each particle's coordinates to its pressure, - or a scalar for a constant pressure over all particles. This is optional and - only needed when using the [`EntropicallyDampedSPHSystem`](@ref). - -# Examples -```jldoctest; output = false -# Filled circle with radius 0.5, center in (0.2, 0.4) and a particle spacing of 0.1 -SphereShape(0.1, 0.5, (0.2, 0.4), 1000.0) - -# Same as before, but perfectly round -SphereShape(0.1, 0.5, (0.2, 0.4), 1000.0, sphere_type=RoundSphere()) - -# Hollow circle with ~3 layers, outer radius 0.5, center in (0.2, 0.4) and a particle -# spacing of 0.1. -SphereShape(0.1, 0.5, (0.2, 0.4), 1000.0, n_layers=3) - -# Same as before, but perfectly round -SphereShape(0.1, 0.5, (0.2, 0.4), 1000.0, n_layers=3, sphere_type=RoundSphere()) - -# Hollow circle with 3 layers, inner radius 0.5, center in (0.2, 0.4) and a particle spacing -# of 0.1. -SphereShape(0.1, 0.5, (0.2, 0.4), 1000.0, n_layers=3, layer_outwards=true) - -# Filled circle with radius 0.1, center in (0.0, 0.0), particle spacing 0.1, but the -# rectangle [0, 1] x [-0.2, 0.2] is cut out. -SphereShape(0.1, 1.0, (0.0, 0.0), 1000.0, cutout_min=(0.0, -0.2), cutout_max=(1.0, 0.2)) - -# Filled 3D sphere with radius 0.5, center in (0.2, 0.4, 0.3) and a particle spacing of 0.1 -SphereShape(0.1, 0.5, (0.2, 0.4, 0.3), 1000.0) - -# Same as before, but perfectly round -SphereShape(0.1, 0.5, (0.2, 0.4, 0.3), 1000.0, sphere_type=RoundSphere()) - -# output -InitialCondition{Float64}(0.1, [0.25 0.17500000000000002 … 0.269548322038589 0.2; 0.4 0.44330127018922194 … 0.3127891626126164 0.4; 0.3 0.3 … -0.13595561786013038 -0.15000000000000002], [0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0], [1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002 … 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002, 1.0000000000000002], [1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0 … 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 … 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) -``` -""" -function SphereShape(particle_spacing, radius, center_position, density; - sphere_type=VoxelSphere(), n_layers=-1, layer_outwards=false, - cutout_min=(0.0, 0.0), cutout_max=(0.0, 0.0), tlsph=false, - velocity=zeros(length(center_position)), mass=nothing, pressure=0.0) - if particle_spacing < eps() - throw(ArgumentError("`particle_spacing` needs to be positive and larger than $(eps())")) - end - - NDIMS = length(center_position) - - coordinates = sphere_shape_coords(sphere_type, particle_spacing, radius, - SVector{NDIMS}(center_position), - n_layers, layer_outwards, tlsph) - - # Convert tuples to vectors - cutout_min_ = collect(cutout_min) - cutout_max_ = collect(cutout_max) - - # Remove particles in cutout - # TODO This should consider the particle radius as well - has_cutout = norm(cutout_max_ - cutout_min_) > eps() - function in_cutout(particle) - return has_cutout && - all(cutout_min_ .<= view(coordinates, :, particle) .<= cutout_max_) - end - - particles_not_in_cutout = map(!in_cutout, axes(coordinates, 2)) - coordinates = coordinates[:, particles_not_in_cutout] - - return InitialCondition(; coordinates, velocity, mass, density, pressure, - particle_spacing) -end - -""" - VoxelSphere() - -Construct a sphere of voxels (where particles are placed in the voxel center) -with a regular inner structure but corners on the surface. -Essentially, a grid of particles is generated and all particles outside the sphere are removed. -The resulting sphere will have a perfect inner structure, but is not perfectly round, -as it will have corners (like a sphere in Minecraft). - -!!! note "Usage" - See [`SphereShape`](@ref) on how to use this. -""" -struct VoxelSphere end - -""" - RoundSphere(; start_angle=0.0, end_angle=2π) - -Construct a sphere (or sphere segment) by nesting perfectly round concentric spheres. -The resulting ball will be perfectly round, but will not have a regular inner structure. - -# Keywords -- `start_angle`: The starting angle of the sphere segment in radians. It determines the - beginning point of the segment. The default is set to `0.0` representing - the positive x-axis. -- `end_angle`: The ending angle of the sphere segment in radians. It defines the termination - point of the segment. The default is set to `2pi`, completing a full sphere. - -!!! note "Usage" - See [`SphereShape`](@ref) on how to use this. - -!!! warning "Warning" - The sphere segment is intended for 2D geometries and hollow spheres. If used for filled - spheres or in a 3D context, results may not be accurate. -""" -struct RoundSphere{AR} - angle_range::AR - - function RoundSphere(; start_angle=0.0, end_angle=2pi) - if start_angle > end_angle - throw(ArgumentError("`end_angle` should be greater than `start_angle`")) - end - - angle_range = (start_angle, end_angle) - - new{typeof(angle_range)}(angle_range) - end -end - -function sphere_shape_coords(::VoxelSphere, particle_spacing, radius, center_position, - n_layers, layer_outwards, tlsph) - if n_layers > 0 - if layer_outwards - inner_radius = radius - outer_radius = radius + n_layers * particle_spacing - - if !tlsph - # Put first layer of particles half a particle spacing outside of `radius` - inner_radius += 0.5particle_spacing - outer_radius += 0.5particle_spacing - end - else - inner_radius = radius - n_layers * particle_spacing - outer_radius = radius - - if !tlsph - # Put first layer of particles half a particle spacing inside of `radius` - inner_radius -= 0.5particle_spacing - outer_radius -= 0.5particle_spacing - end - end - else - outer_radius = radius - inner_radius = -1.0 - - if !tlsph - # Put first layer of particles half a particle spacing inside of `radius` - outer_radius -= 0.5particle_spacing - end - end - - NDIMS = length(center_position) - ELTYPE = typeof(particle_spacing) - coords = SVector{NDIMS, ELTYPE}[] - - n_particles_cube = round(Int, outer_radius / particle_spacing) - - # Loop over all indices in [-n_particles_cube, n_particles_cube]^NDIMS - for i in CartesianIndices(ntuple(_ -> (-n_particles_cube):n_particles_cube, NDIMS)) - x = center_position + particle_spacing * SVector(Tuple(i)) - - # Add a small tolerance of to make sure that spheres where the radius is - # a multiple of the particle spacing are symmetric. - # Otherwise, we have `norm(x - center) == radius`, which yields non-deterministic - # results due to machine rounding errors. - # Add the tolerance to the inner radius as well to avoid duplicate particles when - # multiple concentric spheres are generated. - if inner_radius + 10eps() < norm(x - center_position) <= outer_radius + 10eps() - push!(coords, x) - end - end - - return reinterpret(reshape, ELTYPE, coords) -end - -function sphere_shape_coords(sphere::RoundSphere, particle_spacing, radius, center, - n_layers, layer_outwards, tlsph) - if n_layers > 0 - if layer_outwards - inner_radius = radius - else - inner_radius = radius - n_layers * particle_spacing - end - - if !tlsph - # Put first layer of particles half a particle spacing outside of inner radius - inner_radius += 0.5particle_spacing - end - else - if tlsph - # Just create a sphere that is 0.5 particle spacing larger - radius += 0.5particle_spacing - end - - # Each layer has thickness `particle_spacing` - n_layers = round(Int, radius / particle_spacing) - - if n_layers < 1 - # Just return one particle at the center - return collect(reshape(center, (length(center), 1))) - end - - # Same as above, which puts the inner radius between 0 and `particle_spacing` - inner_radius = max(0.0, radius - n_layers * particle_spacing + 0.5particle_spacing) - end - - coords = zeros(length(center), 0) - - for layer in 0:(n_layers - 1) - sphere_coords = round_sphere(sphere, particle_spacing, - inner_radius + layer * particle_spacing, center) - coords = hcat(coords, sphere_coords) - end - - return coords -end - -function round_sphere(sphere, particle_spacing, radius, center::SVector{2}) - (; angle_range) = sphere - - theta = angle_range[2] - angle_range[1] - n_particles = round(Int, theta * radius / particle_spacing) - - if n_particles <= 2 - # 2 or less particles produce weird, asymmetric results. - # Just return one particle at the center. - return collect(reshape(center, (2, 1))) - end - - if !isapprox(theta, 2pi) - t = LinRange(angle_range[1], angle_range[2], n_particles + 1) - else - # Remove the last particle at 2pi, which overlaps with the first at 0 - t = LinRange(angle_range[1], angle_range[2], n_particles + 1)[1:(end - 1)] - end - - particle_coords = Array{Float64, 2}(undef, 2, length(t)) - - for i in axes(particle_coords, 2) - particle_coords[:, i] = center + radius * SVector(cos(t[i]), sin(t[i])) - end - - return particle_coords -end - -function round_sphere(sphere, particle_spacing, radius, center::SVector{3}) - # The number of particles can either be calculated in 2D or in 3D. - # Let δ be the particle spacing and r the sphere radius. - # - # The volume of a particle is δ^3 and the volume of the sphere shell with - # inner radius r - δ/2 and outer radius r + δ/2 is 4pi/3 * ((r + δ/2)^3 - (r - δ/2)^3). - # The number of particles is then - # n = 4pi / (3 δ^3) * ((r + δ/2)^3 - (r - δ/2)^3) = 4pi r^2 / δ^2 + pi/3. - # - # For small numbers of particles, we get better results without the term pi/3. - # Omitting the term for the inner layers yields results with only ~5 particles less than - # the theoretically optimal number of particles for the target density. - n_particles = round(Int, 4pi * radius^2 / particle_spacing^2 + pi / 3) - if n_particles < 300 - n_particles = round(Int, 4pi * radius^2 / particle_spacing^2) - end - - # With fewer than 5 particles, this doesn't work properly - if n_particles < 5 - if n_particles == 4 - # Return tetrahedron - return [+1 -1 -1 +1; - +1 -1 +1 -1; - +1 +1 -1 -1] * radius / sqrt(3) .+ center - elseif n_particles == 3 - # Return 2D triangle - y = sin(2pi / 3) - return [1 -0.5 -0.5; - 0 y -y; - 0 0 0] * radius .+ center - elseif n_particles == 2 - # Return two particles - return [-1 1; - 0 0; - 0 0] * radius .+ center - else - return collect(reshape(center, (3, 1))) - end - end - - # The following is a slightly adapted version of the "recursive zonal equal area - # partition" of the sphere as explained by Leopardi (2006). - # - # With the equal area partition, the density at the poles is too high. - # Instead, we slightly increase the area of the poles and modify the algorithm - # accordingly. - # - # References: - # - Paul Leopardi. - # "A partition of the unit sphere into regions of equal area and small diameter". - # In: Electronic Transactions on Numerical Analysis 25 (2006), pages 309-327. - # [http://eudml.org/doc/129860](http://eudml.org/doc/129860). - - # This is the Θ function, which is defined by Leopardi only as the inverse of V, without - # giving a closed formula. - theta(v) = acos(1 - v / 2pi) - - # Ideal area of the equal area partition - ideal_area = 4pi / n_particles - - # Increase polar area to avoid higher density at the poles - polar_area = 1.23ideal_area - - polar_radius = theta(polar_area) - - # Divide the remaining surface area equally - collar_cell_area = (4pi - 2polar_area) / (n_particles - 2) - - # Strictly following Leopardi here. The collars should have equiangular spacing. - collar_angle = sqrt(collar_cell_area) - n_collars = max(1, round(Int, (pi - 2polar_radius) / collar_angle)) - fitting_collar_angle = (pi - 2polar_radius) / n_collars - - collar_area = [2pi * (cos(polar_radius + (j - 2) * fitting_collar_angle) - - cos(polar_radius + (j - 1) * fitting_collar_angle)) - for j in 2:(n_collars + 1)] - - # Here, we count the poles as well - ideal_number_cells = collar_area / collar_cell_area - pushfirst!(ideal_number_cells, 1) - push!(ideal_number_cells, 1) - - # Cumulative rounding to maintain the total number of cells - actual_number_cells = ones(Int, length(ideal_number_cells)) - a = zeros(length(ideal_number_cells)) - for j in 2:(n_collars + 1) - actual_number_cells[j] = round(Int, ideal_number_cells[j] + a[j - 1]) - - a[j] = a[j - 1] + ideal_number_cells[j] - actual_number_cells[j] - end - - collar_start_latitude = [theta(polar_area + - sum(actual_number_cells[2:(j - 1)]) * collar_cell_area) - for j in 2:(n_collars + 2)] - - # Put particles in the center of each collar - collar_latitude = [0.5 * (collar_start_latitude[i] + collar_start_latitude[i + 1]) - for i in 1:n_collars] - - # Put the first and last particle on the pole - pushfirst!(collar_latitude, 0.0) - push!(collar_latitude, pi) - - # To compute the particle positions in each collar, we use the 2D `round_sphere` - # function to generate a circle. - particle_coords = zeros(3, 0) - - for circle in 1:(n_collars + 2) - z = radius * cos(collar_latitude[circle]) - circle_radius = radius * sin(collar_latitude[circle]) - - circle_spacing = 2pi * circle_radius / actual_number_cells[circle] - - # At the poles, `circle_radius` is zero, so we can pass any positive spacing - if circle_spacing < eps() - circle_spacing = 1.0 - end - - circle_coords_2d = round_sphere(sphere, circle_spacing, circle_radius, - SVector(center[1], center[2])) - circle_coords_3d = vcat(circle_coords_2d, - center[3] .+ z * ones(1, size(circle_coords_2d, 2))) - - particle_coords = hcat(particle_coords, circle_coords_3d) - end - - return particle_coords -end diff --git a/src/util.jl b/src/util.jl index 172f0a800..65092371d 100644 --- a/src/util.jl +++ b/src/util.jl @@ -1,16 +1,19 @@ -# Same as `foreach`, but it optimizes away for small input tuples -@inline function foreach_noalloc(func, collection) +# Same as `foreach(enumerate(something))`, but without allocations. +# +# Note that compile times may increase if this is used with big tuples. +@inline foreach_enumerate(func, collection) = foreach_enumerate(func, collection, 1) +@inline foreach_enumerate(func, collection::Tuple{}, index) = nothing + +@inline function foreach_enumerate(func, collection, index) element = first(collection) remaining_collection = Base.tail(collection) - func(element) + func((index, element)) # Process remaining collection - foreach_noalloc(func, remaining_collection) + foreach_enumerate(func, remaining_collection, index + 1) end -@inline foreach_noalloc(func, collection::Tuple{}) = nothing - # Print informative message at startup function print_startup_message() s = """ @@ -26,76 +29,101 @@ function print_startup_message() println(s) end +# Enable debug timings `@trixi_timeit timer() "name" stuff...`. +# This allows us to disable timings completely by executing +# `TimerOutputs.disable_debug_timings(TrixiParticles)` +# and to enable them again by executing +# `TimerOutputs.enable_debug_timings(TrixiParticles)` +timeit_debug_enabled() = true + +# Store main timer for global timing of functions +const main_timer = TimerOutput() + +# Always call timer() to hide implementation details +timer() = main_timer + +# @trixi_timeit timer() "some label" expression +# +# Basically the same as a special case of `@timeit_debug` from +# [TimerOutputs.jl](https://github.com/KristofferC/TimerOutputs.jl), +# but without `try ... finally ... end` block. Thus, it's not exception-safe, +# but it also avoids some related performance problems. Since we do not use +# exception handling in TrixiParticles, that's not really an issue. +# +# Copied from [Trixi.jl](https://github.com/trixi-framework/Trixi.jl). +macro trixi_timeit(timer_output, label, expr) + timeit_block = quote + if timeit_debug_enabled() + local to = $(esc(timer_output)) + local enabled = to.enabled + if enabled + local accumulated_data = $(TimerOutputs.push!)(to, $(esc(label))) + end + local b0 = $(TimerOutputs.gc_bytes)() + local t0 = $(TimerOutputs.time_ns)() + end + local val = $(esc(expr)) + if timeit_debug_enabled() && enabled + $(TimerOutputs.do_accumulate!)(accumulated_data, t0, b0) + $(TimerOutputs.pop!)(to) + end + val + end +end + """ - @threaded system for ... end + @threaded for ... end -Run either a threaded CPU loop or launch a kernel on the GPU, depending on the type of `system`. Semantically the same as `Threads.@threads` when iterating over a `AbstractUnitRange` but without guarantee that the underlying implementation uses `Threads.@threads` or works for more general `for` loops. -The first argument must either be a particle system or an array from which can be derived -if the loop has to be run threaded on the CPU or launched as a kernel on the GPU. - -In particular, the underlying threading capabilities might be provided by other packages -such as [Polyester.jl](https://github.com/JuliaSIMD/Polyester.jl). +In particular, there may be an additional check whether only one thread is used +to reduce the overhead of serial execution or the underlying threading capabilities +might be provided by other packages such as [Polyester.jl](https://github.com/JuliaSIMD/Polyester.jl). !!! warn This macro does not necessarily work for general `for` loops. For example, it does not necessarily support general iterables such as `eachline(filename)`. -""" -macro threaded(system, expr) - # Reverse-engineer the for loop. - # `expr.args[1]` is the head of the for loop, like `i = eachindex(x)`. - # So, `expr.args[1].args[2]` is the iterator `eachindex(x)` - # and `expr.args[1].args[1]` is the loop variable `i`. - iterator = expr.args[1].args[2] - i = expr.args[1].args[1] - inner_loop = expr.args[2] - - # Assemble the for loop again as a call to `parallel_foreach`, using `$i` to use the - # same loop variable as used in the for loop. - return esc(quote - TrixiParticles.parallel_foreach($iterator, $system) do $i - $inner_loop - end - end) -end - -# Use `Polyester.@batch` for low-overhead threading -@inline function parallel_foreach(f, iterator, system) - Polyester.@batch for i in iterator - @inline f(i) - end -end - -# On GPUs, execute `f` inside a GPU kernel with KernelAbstractions.jl -@inline function parallel_foreach(f, iterator, system::Union{GPUSystem, AbstractGPUArray}) - # On the GPU, we can only loop over `1:N`. Therefore, we loop over `1:length(iterator)` - # and index with `iterator[eachindex(iterator)[i]]`. - # Note that this only works with vector-like iterators that support arbitrary indexing. - indices = eachindex(iterator) - ndrange = length(indices) - # Skip empty loops - ndrange == 0 && return +Some discussion can be found at +[https://discourse.julialang.org/t/overhead-of-threads-threads/53964](https://discourse.julialang.org/t/overhead-of-threads-threads/53964) +and +[https://discourse.julialang.org/t/threads-threads-with-one-thread-how-to-remove-the-overhead/58435](https://discourse.julialang.org/t/threads-threads-with-one-thread-how-to-remove-the-overhead/58435). - backend = KernelAbstractions.get_backend(system) - - # Call the generic kernel that is defined below, which only calls a function with - # the global GPU index. - generic_kernel(backend)(ndrange=ndrange) do i - @inline f(iterator[indices[i]]) - end - - KernelAbstractions.synchronize(backend) -end +Copied from [Trixi.jl](https://github.com/trixi-framework/Trixi.jl). +""" +macro threaded(expr) + # Use `esc(quote ... end)` for nested macro calls as suggested in + # https://github.com/JuliaLang/julia/issues/23221 + # + # The following code is a simple version using only `Threads.@threads` from the + # standard library with an additional check whether only a single thread is used + # to reduce some overhead (and allocations) for serial execution. + # + # return esc(quote + # let + # if Threads.nthreads() == 1 + # $(expr) + # else + # Threads.@threads $(expr) + # end + # end + # end) + # + # However, the code below using `@batch` from Polyester.jl is more efficient, + # since this packages provides threads with less overhead. Since it is written + # by Chris Elrod, the author of LoopVectorization.jl, we expect this package + # to provide the most efficient and useful implementation of threads (as we use + # them) available in Julia. + # !!! danger "Heisenbug" + # Look at the comments for `wrap_array` when considering to change this macro. -@kernel function generic_kernel(f) - i = @index(Global) - @inline f(i) + return esc(quote + TrixiParticles.@batch $(expr) + end) end -@doc raw""" +""" examples_dir() Return the directory where the example files provided with TrixiParticles.jl are located. If TrixiParticles is @@ -105,31 +133,125 @@ modified. To find out which files are available, use, e.g., `readdir`. Copied from [Trixi.jl](https://github.com/trixi-framework/Trixi.jl). # Examples -```jldoctest; output = false, filter = r"\d+-element Vector.*"s +```@example readdir(examples_dir()) - -# output -7-element Vector{String}: - [...] (the rest is ignored by filter condition) ``` """ -examples_dir() = pkgdir(TrixiParticles, "examples") +examples_dir() = joinpath(pathof(TrixiParticles) |> dirname |> dirname, "examples") +# Note: We can't call the method below `TrixiParticles.include` since that is created automatically +# inside `module TrixiParticles` to `include` source files and evaluate them within the global scope +# of `TrixiParticles`. However, users will want to evaluate in the global scope of `Main` or something +# similar to manage dependencies on their own. """ - validation_dir() + trixi_include([mod::Module=Main,] example::AbstractString; kwargs...) -Return the directory where the validation files provided with TrixiParticles.jl are located. If TrixiParticles is -installed as a regular package (with `]add TrixiParticles`), these files are read-only and should *not* be -modified. To find out which files are available, use, e.g., `readdir`. +`include` the file `example` and evaluate its content in the global scope of module `mod`. +You can override specific assignments in `example` by supplying keyword arguments. +It's basic purpose is to make it easier to modify some parameters while running TrixiParticles from the +REPL. Additionally, this is used in tests to reduce the computational burden for CI while still +providing examples with sensible default values for users. + +Before replacing assignments in `example`, the keyword argument `maxiters` is inserted +into calls to `solve` and `TrixiParticles.solve` with it's default value used in the SciML ecosystem +for ODEs, see https://diffeq.sciml.ai/stable/basics/common_solver_opts/#Miscellaneous. Copied from [Trixi.jl](https://github.com/trixi-framework/Trixi.jl). # Examples -```@example -readdir(validation_dir()) + +```jldoctest +julia> redirect_stdout(devnull) do + trixi_include(@__MODULE__, joinpath(examples_dir(), "dam_break_2d.jl"), + tspan=(0.0, 0.1)) + sol.t[end] + end +0.1 ``` """ -validation_dir() = pkgdir(TrixiParticles, "validation") +function trixi_include(mod::Module, elixir::AbstractString; kwargs...) + Base.include(ex -> replace_assignments(insert_maxiters(ex); kwargs...), mod, elixir) +end + +trixi_include(elixir::AbstractString; kwargs...) = trixi_include(Main, elixir; kwargs...) + +# Helper methods used in the functions defined above, also copied from Trixi.jl + +# Apply the function `f` to `expr` and all sub-expressions recursively. +walkexpr(f, expr::Expr) = f(Expr(expr.head, (walkexpr(f, arg) for arg in expr.args)...)) +walkexpr(f, x) = f(x) + +# Insert the keyword argument `maxiters` into calls to `solve` and `TrixiParticles.solve` +# with default value `10^5` if it is not already present. +function insert_maxiters(expr) + maxiters_default = 10^5 + + expr = walkexpr(expr) do x + if x isa Expr + is_plain_solve = x.head === Symbol("call") && x.args[1] === Symbol("solve") + is_trixi_solve = (x.head === Symbol("call") && x.args[1] isa Expr && + x.args[1].head === Symbol(".") && + x.args[1].args[1] === Symbol("TrixiParticles") && + x.args[1].args[2] isa QuoteNode && + x.args[1].args[2].value === Symbol("solve")) + + if is_plain_solve || is_trixi_solve + # Do nothing if `maxiters` is already set as keyword argument... + for arg in x.args + if arg isa Expr && arg.head === Symbol("kw") && + arg.args[1] === Symbol("maxiters") + return x + end + end + + # ...and insert it otherwise. + push!(x.args, Expr(Symbol("kw"), Symbol("maxiters"), maxiters_default)) + end + end + return x + end + + return expr +end + +# Replace assignments to `key` in `expr` by `key = val` for all `(key,val)` in `kwargs`. +function replace_assignments(expr; kwargs...) + # replace explicit and keyword assignments + expr = walkexpr(expr) do x + if x isa Expr + for (key, val) in kwargs + if (x.head === Symbol("=") || x.head === :kw) && x.args[1] === Symbol(key) + x.args[2] = :($val) + # dump(x) + end + end + end + return x + end + + return expr +end + +# find a (keyword or common) assignment to `destination` in `expr` +# and return the assigned value +function find_assignment(expr, destination) + # declare result to be able to assign to it in the closure + local result + + # find explicit and keyword assignments + walkexpr(expr) do x + if x isa Expr + if (x.head === Symbol("=") || x.head === :kw) && + x.args[1] === Symbol(destination) + result = x.args[2] + # dump(x) + end + end + return x + end + + result +end """ @autoinfiltrate @@ -177,25 +299,3 @@ macro autoinfiltrate(condition=true) lnn, esc(condition)) end - -function type2string(type) - return string(nameof(typeof(type))) -end - -function compute_git_hash() - pkg_directory = pkgdir(@__MODULE__) - git_directory = joinpath(pkg_directory, ".git") - - # Check if the .git directory exists - if !isdir(git_directory) - return "UnknownVersion" - end - - try - git_cmd = Cmd(`git describe --tags --always --first-parent --dirty`, - dir=pkg_directory) - return string(readchomp(git_cmd)) - catch e - return "UnknownVersion" - end -end diff --git a/src/visualization/recipes_plots.jl b/src/visualization/recipes_plots.jl deleted file mode 100644 index f7e4d5b23..000000000 --- a/src/visualization/recipes_plots.jl +++ /dev/null @@ -1,69 +0,0 @@ -# Solution type when running a simulation with TrixiParticles.jl and OrdinaryDiffEq.jl -const TrixiParticlesODESolution = ODESolution{<:Any, <:Any, <:Any, <:Any, <:Any, <:Any, - <:Any, - <:ODEProblem{<:Any, <:Any, <:Any, - <:Semidiscretization}} - -RecipesBase.@recipe function f(sol::TrixiParticlesODESolution) - # Redirect everything to the recipe - return sol.u[end].x..., sol.prob.p -end - -RecipesBase.@recipe function f(v_ode, u_ode, semi::Semidiscretization; - size=(600, 400)) # Default size - systems_data = map(semi.systems) do system - u = wrap_u(u_ode, system, semi) - coordinates = active_coordinates(u, system) - x = collect(coordinates[1, :]) - y = collect(coordinates[2, :]) - - particle_spacing = system.initial_condition.particle_spacing - if particle_spacing < 0 - particle_spacing = 0.0 - end - - x_min, y_min = minimum(coordinates, dims=2) .- 0.5particle_spacing - x_max, y_max = maximum(coordinates, dims=2) .+ 0.5particle_spacing - - return (; x, y, x_min, x_max, y_min, y_max, particle_spacing, - label=timer_name(system)) - end - - x_min = minimum(data.x_min for data in systems_data) - x_max = maximum(data.x_max for data in systems_data) - y_min = minimum(data.y_min for data in systems_data) - y_max = maximum(data.y_max for data in systems_data) - - # Note that this assumes the plot area to be ~10% smaller than `size`, - # which is the case when showing a single plot with the legend inside. - # With the legend outside, this is no longer the case, so the `markersize` has to be - # set manually. - pixel_size = max((x_max - x_min) / size[1], (y_max - y_min) / size[2]) - - xlims --> (x_min, x_max) - ylims --> (y_min, y_max) - aspect_ratio --> :equal - - seriestype --> :scatter - markerstrokewidth --> 0 - grid --> false - - for system_data in systems_data - @series begin - if system_data.particle_spacing < eps() - # Fall back to 1px marker radius - markersize --> 1 - else - pixels_per_particle = system_data.particle_spacing / pixel_size - - # Marker radius in pixels - markersize --> 0.5 * pixels_per_particle - end - - label --> system_data.label - - # Return data for plotting - system_data.x, system_data.y - end - end -end diff --git a/src/visualization/write2vtk.jl b/src/visualization/write2vtk.jl index 0372e7167..37ec6ca37 100644 --- a/src/visualization/write2vtk.jl +++ b/src/visualization/write2vtk.jl @@ -1,83 +1,26 @@ -function system_names(systems) +function trixi2vtk(vu_ode, semi, t; iter=nothing, output_directory="out", prefix="", + custom_quantities...) + @unpack systems = semi + v_ode, u_ode = vu_ode.x + # Add `_i` to each system name, where `i` is the index of the corresponding # system type. # `["fluid", "boundary", "boundary"]` becomes `["fluid_1", "boundary_1", "boundary_2"]`. - cnames = vtkname.(systems) + cnames = systems .|> vtkname filenames = [string(cnames[i], "_", count(==(cnames[i]), cnames[1:i])) for i in eachindex(cnames)] - return filenames -end - -""" - trixi2vtk(vu_ode, semi, t; iter=nothing, output_directory="out", prefix="", - write_meta_data=true, max_coordinates=Inf, custom_quantities...) - -Convert Trixi simulation data to VTK format. -# Arguments -- `vu_ode`: Solution of the TrixiParticles ODE system at one time step. - This expects an `ArrayPartition` as returned in the examples as `sol.u[end]`. -- `semi`: Semidiscretization of the TrixiParticles simulation. -- `t`: Current time of the simulation. - -# Keywords -- `iter=nothing`: Iteration number when multiple iterations are to be stored in - separate files. This number is just appended to the filename. -- `output_directory="out"`: Output directory path. -- `prefix=""`: Prefix for output files. -- `write_meta_data=true`: Write meta data. -- `max_coordinates=Inf` The coordinates of particles will be clipped if their absolute - values exceed this threshold. -- `custom_quantities...`: Additional custom quantities to include in the VTK output. - Each custom quantity must be a function of `(v, u, t, system)`, - which will be called for every system, where `v` and `u` are the - wrapped solution arrays for the corresponding system and `t` is - the current simulation time. Note that working with these `v` - and `u` arrays requires undocumented internal functions of - TrixiParticles. See [Custom Quantities](@ref custom_quantities) - for a list of pre-defined custom quantities that can be used here. - -# Example -```jldoctest; output = false, setup = :(trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), tspan=(0.0, 0.01), callbacks=nothing)) -trixi2vtk(sol.u[end], semi, 0.0, iter=1, output_directory="output", prefix="solution") - -# Additionally store the kinetic energy of each system as "my_custom_quantity" -trixi2vtk(sol.u[end], semi, 0.0, iter=1, my_custom_quantity=kinetic_energy) - -# output - -``` -""" -function trixi2vtk(vu_ode, semi, t; iter=nothing, output_directory="out", prefix="", - write_meta_data=true, git_hash=compute_git_hash(), - max_coordinates=Inf, custom_quantities...) - (; systems) = semi - v_ode, u_ode = vu_ode.x - - # Update quantities that are stored in the systems. These quantities (e.g. pressure) - # still have the values from the last stage of the previous step if not updated here. - @trixi_timeit timer() "update systems" update_systems_and_nhs(v_ode, u_ode, semi, t; - update_from_callback=true) - - filenames = system_names(systems) - - foreach_system(semi) do system - system_index = system_indices(system, semi) - - v = wrap_v(v_ode, system, semi) - u = wrap_u(u_ode, system, semi) - periodic_box = get_neighborhood_search(system, semi).periodic_box - - trixi2vtk(v, u, t, system, periodic_box; - system_name=filenames[system_index], output_directory, iter, prefix, - write_meta_data, git_hash, max_coordinates, custom_quantities...) + foreach_enumerate(systems) do (system_index, system) + v = wrap_v(v_ode, system_index, system, semi) + u = wrap_u(u_ode, system_index, system, semi) + trixi2vtk(v, u, t, system; output_directory=output_directory, + system_name=filenames[system_index], iter=iter, prefix=prefix, + custom_quantities...) end end -# Convert data for a single TrixiParticle system to VTK format -function trixi2vtk(v, u, t, system, periodic_box; output_directory="out", prefix="", - iter=nothing, system_name=vtkname(system), write_meta_data=true, - max_coordinates=Inf, git_hash=compute_git_hash(), +function trixi2vtk(v, u, t, system; output_directory="out", prefix="", iter=nothing, + system_name=vtkname(system), custom_quantities...) mkpath(output_directory) @@ -89,299 +32,74 @@ function trixi2vtk(v, u, t, system, periodic_box; output_directory="out", prefix add_opt_str_pre(prefix) * "$system_name" * add_opt_str_post(iter)) - collection_file = joinpath(output_directory, - add_opt_str_pre(prefix) * "$system_name") - - # Reset the collection when the iteration is 0 - pvd = paraview_collection(collection_file; append=iter > 0) - - points = PointNeighbors.periodic_coords(active_coordinates(u, system), - periodic_box) + points = current_coordinates(u, system) cells = [MeshCell(VTKCellTypes.VTK_VERTEX, (i,)) for i in axes(points, 2)] - if abs(maximum(points)) > max_coordinates || abs(minimum(points)) > max_coordinates - println("Warning: At least one particle's absolute coordinates exceed `max_coordinates`" - * - " and have been clipped") - for i in eachindex(points) - points[i] = clamp(points[i], -max_coordinates, max_coordinates) - end - end - - @trixi_timeit timer() "write to vtk" vtk_grid(file, points, cells) do vtk - # dispatches based on the different system types e.g. FluidSystem, TotalLagrangianSPHSystem - write2vtk!(vtk, v, u, t, system, write_meta_data=write_meta_data) + vtk_grid(file, points, cells) do vtk + write2vtk!(vtk, v, u, t, system) # Store particle index - vtk["index"] = active_particles(system) - vtk["time"] = t - - if write_meta_data - vtk["solver_version"] = git_hash - vtk["julia_version"] = string(VERSION) - end + vtk["index"] = eachparticle(system) # Extract custom quantities for this system - for (key, quantity) in custom_quantities - value = custom_quantity(quantity, v, u, t, system) + for (key, func) in custom_quantities + value = func(v, u, t, system) if value !== nothing - vtk[string(key)] = value + vtk[string(key)] = func(v, u, t, system) end end - - # Add to collection - pvd[t] = vtk end - vtk_save(pvd) -end - -function custom_quantity(quantity::AbstractArray, v, u, t, system) - return quantity -end - -function custom_quantity(quantity, v, u, t, system) - # Assume `quantity` is a function of `v`, `u`, `t`, and `system` - return quantity(v, u, t, system) end -""" - trixi2vtk(coordinates; output_directory="out", prefix="", filename="coordinates") - -Convert coordinate data to VTK format. - -# Arguments -- `coordinates`: Coordinates to be saved. - -# Keywords -- `output_directory="out"`: Output directory path. -- `prefix=""`: Prefix for the output file. -- `filename="coordinates"`: Name of the output file. - -# Returns -- `file::AbstractString`: Path to the generated VTK file. -""" -function trixi2vtk(coordinates; output_directory="out", prefix="", filename="coordinates", - custom_quantities...) +function trixi2vtk(coordinates; output_directory="out", prefix="", filename="coordinates") mkpath(output_directory) file = prefix === "" ? joinpath(output_directory, filename) : joinpath(output_directory, "$(prefix)_$filename") points = coordinates cells = [MeshCell(VTKCellTypes.VTK_VERTEX, (i,)) for i in axes(points, 2)] - - vtk_grid(file, points, cells) do vtk - # Store particle index. - vtk["index"] = [i for i in axes(coordinates, 2)] - - # Extract custom quantities for this system. - for (key, quantity) in custom_quantities - if quantity !== nothing - vtk[string(key)] = quantity - end - end - end + vtk_grid(vtk -> nothing, file, points, cells) return file end -""" - trixi2vtk(initial_condition::InitialCondition; output_directory="out", - prefix="", filename="initial_condition", custom_quantities...) +vtkname(system::WeaklyCompressibleSPHSystem) = "fluid" +vtkname(system::TotalLagrangianSPHSystem) = "solid" +vtkname(system::BoundarySPHSystem) = "boundary" -Convert [`InitialCondition`](@ref) data to VTK format. +function write2vtk!(vtk, v, u, t, system::WeaklyCompressibleSPHSystem) + @unpack density_calculator, cache = system -# Arguments -- `initial_condition`: [`InitialCondition`](@ref) to be saved. - -# Keywords -- `output_directory="out"`: Output directory path. -- `prefix=""`: Prefix for the output file. -- `filename="coordinates"`: Name of the output file. - -# Returns -- `file::AbstractString`: Path to the generated VTK file. -""" -function trixi2vtk(initial_condition::InitialCondition; output_directory="out", - prefix="", filename="initial_condition", custom_quantities...) - (; coordinates, velocity, density, mass, pressure) = initial_condition - - return trixi2vtk(coordinates; output_directory, prefix, filename, - density=density, initial_velocity=velocity, mass=mass, - pressure=pressure) -end - -function write2vtk!(vtk, v, u, t, system; write_meta_data=true) vtk["velocity"] = view(v, 1:ndims(system), :) - - return vtk -end - -function write2vtk!(vtk, v, u, t, system::FluidSystem; write_meta_data=true) - vtk["velocity"] = [current_velocity(v, system, particle) - for particle in active_particles(system)] vtk["density"] = [particle_density(v, system, particle) - for particle in active_particles(system)] - vtk["pressure"] = [particle_pressure(v, system, particle) - for particle in active_particles(system)] - - if write_meta_data - vtk["acceleration"] = system.acceleration - vtk["viscosity"] = type2string(system.viscosity) - write2vtk!(vtk, system.viscosity) - vtk["smoothing_kernel"] = type2string(system.smoothing_kernel) - vtk["smoothing_length"] = system.smoothing_length - vtk["density_calculator"] = type2string(system.density_calculator) - - if system isa WeaklyCompressibleSPHSystem - vtk["correction_method"] = type2string(system.correction) - if system.correction isa AkinciFreeSurfaceCorrection - vtk["correction_rho0"] = system.correction.rho0 - end - vtk["state_equation"] = type2string(system.state_equation) - vtk["state_equation_rho0"] = system.state_equation.reference_density - vtk["state_equation_pa"] = system.state_equation.background_pressure - vtk["state_equation_c"] = system.state_equation.sound_speed - vtk["state_equation_exponent"] = system.state_equation.exponent - - vtk["solver"] = "WCSPH" - else - vtk["solver"] = "EDAC" - vtk["sound_speed"] = system.sound_speed - end - end + for particle in eachparticle(system)] + vtk["pressure"] = system.pressure return vtk end -write2vtk!(vtk, viscosity::Nothing) = vtk - -function write2vtk!(vtk, viscosity::ViscosityAdami) - vtk["viscosity_nu"] = viscosity.nu - vtk["viscosity_epsilon"] = viscosity.epsilon -end - -function write2vtk!(vtk, viscosity::ArtificialViscosityMonaghan) - vtk["viscosity_alpha"] = viscosity.alpha - vtk["viscosity_beta"] = viscosity.beta - vtk["viscosity_epsilon"] = viscosity.epsilon -end - -function write2vtk!(vtk, v, u, t, system::TotalLagrangianSPHSystem; write_meta_data=true) +function write2vtk!(vtk, v, u, t, system::TotalLagrangianSPHSystem) n_fixed_particles = nparticles(system) - n_moving_particles(system) vtk["velocity"] = hcat(view(v, 1:ndims(system), :), zeros(ndims(system), n_fixed_particles)) - vtk["jacobian"] = [det(deformation_gradient(system, particle)) - for particle in eachparticle(system)] - - vtk["von_mises_stress"] = von_mises_stress(system) - - sigma = cauchy_stress(system) - vtk["sigma_11"] = sigma[1, 1, :] - vtk["sigma_22"] = sigma[2, 2, :] - if ndims(system) == 3 - vtk["sigma_33"] = sigma[3, 3, :] - end - vtk["material_density"] = system.material_density - if write_meta_data - vtk["young_modulus"] = system.young_modulus - vtk["poisson_ratio"] = system.poisson_ratio - vtk["lame_lambda"] = system.lame_lambda - vtk["lame_mu"] = system.lame_mu - vtk["smoothing_kernel"] = type2string(system.smoothing_kernel) - vtk["smoothing_length"] = system.smoothing_length - end - - write2vtk!(vtk, v, u, t, system.boundary_model, system, write_meta_data=write_meta_data) -end - -function write2vtk!(vtk, v, u, t, system::OpenBoundarySPHSystem; write_meta_data=true) - (; reference_velocity, reference_pressure, reference_density) = system - - vtk["velocity"] = [current_velocity(v, system, particle) - for particle in active_particles(system)] - vtk["density"] = [particle_density(v, system, particle) - for particle in active_particles(system)] - vtk["pressure"] = [particle_pressure(v, system, particle) - for particle in active_particles(system)] - - NDIMS = ndims(system) - ELTYPE = eltype(system) - coords = reinterpret(reshape, SVector{NDIMS, ELTYPE}, active_coordinates(u, system)) - - vtk["prescribed_velocity"] = stack(reference_velocity.(coords, t)) - vtk["prescribed_density"] = reference_density.(coords, t) - vtk["prescribed_pressure"] = reference_pressure.(coords, t) - - if write_meta_data - vtk["boundary_zone"] = type2string(system.boundary_zone) - vtk["sound_speed"] = system.sound_speed - vtk["width"] = round(system.boundary_zone.zone_width, digits=3) - vtk["flow_direction"] = system.flow_direction - vtk["velocity_function"] = string(nameof(system.reference_velocity)) - vtk["pressure_function"] = string(nameof(system.reference_pressure)) - vtk["density_function"] = string(nameof(system.reference_density)) - end - - return vtk -end - -function write2vtk!(vtk, v, u, t, system::BoundarySPHSystem; write_meta_data=true) - write2vtk!(vtk, v, u, t, system.boundary_model, system, write_meta_data=write_meta_data) -end - -function write2vtk!(vtk, v, u, t, model, system; write_meta_data=true) - return vtk -end - -function write2vtk!(vtk, v, u, t, model::BoundaryModelMonaghanKajtar, system; - write_meta_data=true) - if write_meta_data - vtk["boundary_model"] = "BoundaryModelMonaghanKajtar" - vtk["boundary_spacing_ratio"] = model.beta - vtk["boundary_K"] = model.K - end + write2vtk!(vtk, v, u, t, system.boundary_model, system) end -function write2vtk!(vtk, v, u, t, model::BoundaryModelDummyParticles, system; - write_meta_data=true) - if write_meta_data - vtk["boundary_model"] = "BoundaryModelDummyParticles" - vtk["smoothing_kernel"] = type2string(system.boundary_model.smoothing_kernel) - vtk["smoothing_length"] = system.boundary_model.smoothing_length - vtk["density_calculator"] = type2string(system.boundary_model.density_calculator) - vtk["state_equation"] = type2string(system.boundary_model.state_equation) - end - - write2vtk!(vtk, v, u, t, model, model.viscosity, system, - write_meta_data=write_meta_data) +function write2vtk!(vtk, v, u, t, system::BoundarySPHSystem) + write2vtk!(vtk, v, u, t, system.boundary_model, system) end -function write2vtk!(vtk, v, u, t, model::BoundaryModelDummyParticles, viscosity, system; - write_meta_data=true) - vtk["hydrodynamic_density"] = [particle_density(v, system, particle) - for particle in eachparticle(system)] - vtk["pressure"] = model.pressure - - if write_meta_data - vtk["viscosity_model"] = type2string(viscosity) - end - +function write2vtk!(vtk, v, u, t, model, system) return vtk end -function write2vtk!(vtk, v, u, t, model::BoundaryModelDummyParticles, - viscosity::ViscosityAdami, system; write_meta_data=true) +function write2vtk!(vtk, v, u, t, model::BoundaryModelDummyParticles, system) vtk["hydrodynamic_density"] = [particle_density(v, system, particle) for particle in eachparticle(system)] vtk["pressure"] = model.pressure - vtk["wall_velocity"] = view(model.cache.wall_velocity, 1:ndims(system), :) - - if write_meta_data - vtk["viscosity_model"] = "ViscosityAdami" - end return vtk end diff --git a/test/Project.toml b/test/Project.toml index ef78271e3..c18f9cde1 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,27 +1,10 @@ [deps] -CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a" -Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" -JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" -QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -CSV = "0.10" -CairoMakie = "0.12" -DataFrames = "1.6" -GLM = "1.9" -Glob = "1.3" -JSON = "0.21" OrdinaryDiffEq = "6.49" -Plots = "1" Polyester = "0.7" -QuadGK = "2" diff --git a/test/callbacks/callbacks.jl b/test/callbacks/callbacks.jl deleted file mode 100644 index 274fde65d..000000000 --- a/test/callbacks/callbacks.jl +++ /dev/null @@ -1,7 +0,0 @@ -@testset verbose=true "Callbacks" begin - include("info.jl") - include("stepsize.jl") - include("postprocess.jl") - include("update.jl") - include("solution_saving.jl") -end diff --git a/test/callbacks/info.jl b/test/callbacks/info.jl deleted file mode 100644 index fab2fb2f3..000000000 --- a/test/callbacks/info.jl +++ /dev/null @@ -1,167 +0,0 @@ -@testset verbose=true "InfoCallback" begin - @testset verbose=true "show" begin - callback = InfoCallback(interval=10) - - show_compact = "InfoCallback(interval=10)" - @test repr(callback) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ InfoCallback │ - │ ════════════ │ - │ interval: ……………………………………………………… 10 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - end - - @testset verbose=true "initialize" begin - callback = InfoCallback() - - # Build a mock `integrator`, which is a `NamedTuple` holding the fields that are - # accessed in `initialize_info_callback`. - continuous_callbacks = (:cb1, :cb2) - discrete_callbacks = (callback, (; (affect!)=:cb3)) - - semi = (; systems=(:system1, :system2)) - - integrator = (; p=semi, - opts=(; - callback=(; continuous_callbacks, discrete_callbacks), - adaptive=true, abstol=1e-2, reltol=1e-1, - controller=:controller), - alg=Val(:alg), - sol=(; prob=(; tspan=(0.1, 0.5)))) - - expected = """ - - ████████╗██████╗ ██╗██╗ ██╗██╗██████╗ █████╗ ██████╗ ████████╗██╗ ██████╗██╗ ███████╗███████╗ - ╚══██╔══╝██╔══██╗██║╚██╗██╔╝██║██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██║██╔════╝██║ ██╔════╝██╔════╝ - ██║ ██████╔╝██║ ╚███╔╝ ██║██████╔╝███████║██████╔╝ ██║ ██║██║ ██║ █████╗ ███████╗ - ██║ ██╔══██╗██║ ██╔██╗ ██║██╔═══╝ ██╔══██║██╔══██╗ ██║ ██║██║ ██║ ██╔══╝ ╚════██║ - ██║ ██║ ██║██║██╔╝ ██╗██║██║ ██║ ██║██║ ██║ ██║ ██║╚██████╗███████╗███████╗███████║ - ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝╚══════╝╚══════╝ - - - (systems = (:system1, :system2),) - - :system1 - - :system2 - - :cb1 - - :cb2 - - (affect! = :cb3,) - - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Time integration │ - │ ════════════════ │ - │ Start time: ………………………………………………… 0.1 │ - │ Final time: ………………………………………………… 0.5 │ - │ time integrator: …………………………………… Val │ - │ adaptive: ……………………………………………………… true │ - │ abstol: …………………………………………………………… 0.01 │ - │ reltol: …………………………………………………………… 0.1 │ - │ controller: ………………………………………………… controller │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Environment information │ - │ ═══════════════════════ │ - │ #threads: ……………………………………………………… $(@sprintf("%-40d", Threads.nthreads())) │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘ - - """ - - # Redirect `stdout` to a string - pipe = Pipe() - redirect_stdout(pipe) do - TrixiParticles.initialize_info_callback(callback, nothing, nothing, integrator) - end - close(pipe.in) - output = String(read(pipe)) - - @test output == expected - end - - @testset verbose=true "affect! not finished" begin - callback = InfoCallback() - - # Set `start_time` to -1e109 to make the output independent of the current time - callback.affect!.start_time = -1e109 - - # Build a mock `integrator`, which is a `NamedTuple` holding the fields that are - # accessed in `initialize_info_callback`. - integrator = (; t=23.42, - stats=(; naccept=453), - iter=472, - dt=1.4548e-3, - sol=(; prob=(; tspan=(0.0, 30.0)))) - - TrixiParticles.isfinished(::NamedTuple) = false - TrixiParticles.u_modified!(::NamedTuple, _) = nothing - - expected = "#timesteps: 453 │ Δt: 1.4548e-03 │ sim. time: 2.3420e+01 (78.067%) │ run time: 1.0000e+100 s\n" - - # Redirect `stdout` to a string - pipe = Pipe() - redirect_stdout(pipe) do - callback.affect!(integrator) - end - close(pipe.in) - output = String(read(pipe)) - - @test output == expected - end - - @testset verbose=true "affect! finished" begin - callback = InfoCallback() - - # Set `start_time` to -1e109 to make the output independent of the current time - callback.affect!.start_time = -1e109 - - # Build a mock `integrator`, which is a `NamedTuple` holding the fields that are - # accessed in `initialize_info_callback`. - integrator = (; t=23.0, - stats=(; naccept=453), - iter=472, - dt=1e-3) - - TrixiParticles.isfinished(::NamedTuple) = true - TrixiParticles.u_modified!(::NamedTuple, _) = nothing - - expected = """ - ──────────────────────────────────────────────────────────────────────────────────────────────────── - Trixi simulation finished. Final time: 23.0 Time steps: 453 (accepted), 472 (total) - ──────────────────────────────────────────────────────────────────────────────────────────────────── - - ──────────────────────────────────────────────────────────────────── - TrixiParticles.jl Time Allocations""" - - # Redirect `stdout` to a string - pipe = Pipe() - redirect_stdout(pipe) do - callback.affect!(integrator) - end - close(pipe.in) - output = String(read(pipe)) - - @test startswith(output, expected) - end - - # TODO add unit tests for all summary box functions - @testset verbose=true "Summary Box Squeeze" begin - io = IOBuffer() - TrixiParticles.summary_box(io, "Test", ["test" => "x"^100]) - output = String(take!(io)) - - expected = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Test │ - │ ════ │ - │ test: ………………………………………………………………… xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx…xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - - @test output == expected - end -end diff --git a/test/callbacks/postprocess.jl b/test/callbacks/postprocess.jl deleted file mode 100644 index 372a7b453..000000000 --- a/test/callbacks/postprocess.jl +++ /dev/null @@ -1,123 +0,0 @@ -@testset verbose=true "PostprocessCallback" begin - @testset verbose=true "show" begin - function example_function(v, u, t, system) - return 0 - end - - callback = PostprocessCallback(another_function=(v, u, t, system) -> 1; interval=10, - example_function, write_file_interval=0) - - show_compact = "PostprocessCallback(interval=10, functions=[another_function, example_function])" - @test repr(callback) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ PostprocessCallback │ - │ ═══════════════════ │ - │ interval: ……………………………………………………… 10 │ - │ write file: ………………………………………………… no │ - │ exclude boundary: ………………………………… yes │ - │ filename: ……………………………………………………… values │ - │ output directory: ………………………………… out │ - │ append timestamp: ………………………………… no │ - │ write json file: …………………………………… yes │ - │ write csv file: ……………………………………… yes │ - │ function1: …………………………………………………… another_function │ - │ function2: …………………………………………………… example_function │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - - callback = PostprocessCallback(; dt=0.1, example_function, write_file_interval=0) - - show_compact = "PostprocessCallback(dt=0.1, functions=[example_function])" - @test repr(callback) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ PostprocessCallback │ - │ ═══════════════════ │ - │ dt: ……………………………………………………………………… 0.1 │ - │ write file: ………………………………………………… no │ - │ exclude boundary: ………………………………… yes │ - │ filename: ……………………………………………………… values │ - │ output directory: ………………………………… out │ - │ append timestamp: ………………………………… no │ - │ write json file: …………………………………… yes │ - │ write csv file: ……………………………………… yes │ - │ function1: …………………………………………………… example_function │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - - callback = PostprocessCallback(; dt=0.1, example_function, write_file_interval=3) - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ PostprocessCallback │ - │ ═══════════════════ │ - │ dt: ……………………………………………………………………… 0.1 │ - │ write file: ………………………………………………… every 3 * dt │ - │ exclude boundary: ………………………………… yes │ - │ filename: ……………………………………………………… values │ - │ output directory: ………………………………… out │ - │ append timestamp: ………………………………… no │ - │ write json file: …………………………………… yes │ - │ write csv file: ……………………………………… yes │ - │ function1: …………………………………………………… example_function │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - - callback = PostprocessCallback(; interval=23, example_function, - write_file_interval=4) - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ PostprocessCallback │ - │ ═══════════════════ │ - │ interval: ……………………………………………………… 23 │ - │ write file: ………………………………………………… every 4 * interval │ - │ exclude boundary: ………………………………… yes │ - │ filename: ……………………………………………………… values │ - │ output directory: ………………………………… out │ - │ append timestamp: ………………………………… no │ - │ write json file: …………………………………… yes │ - │ write csv file: ……………………………………… yes │ - │ function1: …………………………………………………… example_function │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - - callback = PostprocessCallback(; interval=23, example_function) - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ PostprocessCallback │ - │ ═══════════════════ │ - │ interval: ……………………………………………………… 23 │ - │ write file: ………………………………………………… always │ - │ exclude boundary: ………………………………… yes │ - │ filename: ……………………………………………………… values │ - │ output directory: ………………………………… out │ - │ append timestamp: ………………………………… no │ - │ write json file: …………………………………… yes │ - │ write csv file: ……………………………………… yes │ - │ function1: …………………………………………………… example_function │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - - callback = PostprocessCallback(; dt=0.2, example_function) - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ PostprocessCallback │ - │ ═══════════════════ │ - │ dt: ……………………………………………………………………… 0.2 │ - │ write file: ………………………………………………… always │ - │ exclude boundary: ………………………………… yes │ - │ filename: ……………………………………………………… values │ - │ output directory: ………………………………… out │ - │ append timestamp: ………………………………… no │ - │ write json file: …………………………………… yes │ - │ write csv file: ……………………………………… yes │ - │ function1: …………………………………………………… example_function │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - end -end diff --git a/test/callbacks/solution_saving.jl b/test/callbacks/solution_saving.jl deleted file mode 100644 index 3cc765b65..000000000 --- a/test/callbacks/solution_saving.jl +++ /dev/null @@ -1,68 +0,0 @@ -@testset verbose=true "SolutionSavingCallback" begin - @testset verbose=true "show" begin - out = joinpath(pkgdir(TrixiParticles), "out") - output_directory_padded = out * " "^(65 - length(out)) - - @testset verbose=true "dt" begin - callback = SolutionSavingCallback(dt=0.02, prefix="test", output_directory=out) - - show_compact = "SolutionSavingCallback(dt=0.02)" - @test repr(callback) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ SolutionSavingCallback │ - │ ══════════════════════ │ - │ dt: ……………………………………………………………………… 0.02 │ - │ custom quantities: ……………………………… nothing │ - │ save initial solution: …………………… yes │ - │ save final solution: ………………………… yes │ - │ output directory: ………………………………… $(output_directory_padded)│ - │ prefix: …………………………………………………………… test │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - end - - @testset verbose=true "interval" begin - callback = SolutionSavingCallback(interval=100, prefix="test", - output_directory=out) - - show_compact = "SolutionSavingCallback(interval=100)" - @test repr(callback) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ SolutionSavingCallback │ - │ ══════════════════════ │ - │ interval: ……………………………………………………… 100 │ - │ custom quantities: ……………………………… nothing │ - │ save initial solution: …………………… yes │ - │ save final solution: ………………………… yes │ - │ output directory: ………………………………… $(output_directory_padded)│ - │ prefix: …………………………………………………………… test │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - end - - @testset verbose=true "interval" begin - callback = SolutionSavingCallback(save_times=[1.0, 2.0, 3.0], prefix="test", - output_directory=out) - - show_compact = "SolutionSavingCallback(save_times=[1.0, 2.0, 3.0])" - @test repr(callback) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ SolutionSavingCallback │ - │ ══════════════════════ │ - │ save_times: ………………………………………………… [1.0, 2.0, 3.0] │ - │ custom quantities: ……………………………… nothing │ - │ save initial solution: …………………… yes │ - │ save final solution: ………………………… yes │ - │ output directory: ………………………………… $(output_directory_padded)│ - │ prefix: …………………………………………………………… test │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - end - end -end diff --git a/test/callbacks/stepsize.jl b/test/callbacks/stepsize.jl deleted file mode 100644 index c83b8bc71..000000000 --- a/test/callbacks/stepsize.jl +++ /dev/null @@ -1,17 +0,0 @@ -@testset verbose=true "StepsizeCallback" begin - @testset verbose=true "show" begin - callback = StepsizeCallback(cfl=1.2) - - show_compact = "StepsizeCallback(is_constant=true, cfl_number=1.2)" - @test repr(callback) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ StepsizeCallback │ - │ ════════════════ │ - │ is constant: ……………………………………………… true │ - │ CFL number: ………………………………………………… 1.2 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback) == show_box - end -end diff --git a/test/callbacks/update.jl b/test/callbacks/update.jl deleted file mode 100644 index 180f0bb97..000000000 --- a/test/callbacks/update.jl +++ /dev/null @@ -1,48 +0,0 @@ -@testset verbose=true "UpdateCallback" begin - @testset verbose=true "show" begin - # Default - callback0 = UpdateCallback() - - show_compact = "UpdateCallback(interval=1)" - @test repr(callback0) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ UpdateCallback │ - │ ══════════════ │ - │ interval: ……………………………………………………… 1 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback0) == show_box - - callback1 = UpdateCallback(interval=11) - - show_compact = "UpdateCallback(interval=11)" - @test repr(callback1) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ UpdateCallback │ - │ ══════════════ │ - │ interval: ……………………………………………………… 11 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback1) == show_box - - callback2 = UpdateCallback(dt=1.2) - - show_compact = "UpdateCallback(dt=1.2)" - @test repr(callback2) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ UpdateCallback │ - │ ══════════════ │ - │ dt: ……………………………………………………………………… 1.2 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", callback2) == show_box - end - - @testset "Illegal Input" begin - error_str = "Setting both interval and dt is not supported!" - @test_throws ArgumentError(error_str) UpdateCallback(dt=0.1, interval=1) - end -end diff --git a/test/count_allocations.jl b/test/count_allocations.jl deleted file mode 100644 index 5957bc67a..000000000 --- a/test/count_allocations.jl +++ /dev/null @@ -1,80 +0,0 @@ -# Wrapper for any neighborhood search that forwards `for_particle_neighbor` to the wrapped -# neighborhood search, but doesn't do anything in the update step. -# This is used in the example tests to test for zero allocations in the `kick!` function. -struct NoUpdateNeighborhoodSearch{NHS} - nhs::NHS -end - -# Copy a `Semidiscretization`, but wrap the neighborhood searches with -# `NoUpdateNeighborhoodSearch`. -function copy_semi_with_no_update_nhs(semi) - neighborhood_searches = Tuple(Tuple(NoUpdateNeighborhoodSearch(nhs) - for nhs in searches) - for searches in semi.neighborhood_searches) - - return Semidiscretization(semi.systems, semi.ranges_u, semi.ranges_v, - neighborhood_searches) -end - -# Forward `foreach_neighbor` to wrapped neighborhood search -@inline function TrixiParticles.PointNeighbors.foreach_neighbor(f, system_coords, - neighbor_coords, - neighborhood_search::NoUpdateNeighborhoodSearch, - particle; - search_radius=neighborhood_search.nhs.search_radius) - TrixiParticles.PointNeighbors.foreach_neighbor(f, system_coords, neighbor_coords, - neighborhood_search.nhs, particle, - search_radius=search_radius) -end - -# No update -@inline function TrixiParticles.PointNeighbors.update!(search::NoUpdateNeighborhoodSearch, - x, y; - particles_moving=(true, true)) - return search -end - -# Count allocations of one call to the right-hand side (`kick!` + `drift!`) -function count_rhs_allocations(sol, semi) - t = sol.t[end] - v_ode, u_ode = sol.u[end].x - dv_ode = similar(v_ode) - du_ode = similar(u_ode) - - # Wrap neighborhood searches to avoid counting alloctations in the NHS update - semi_no_nhs_update = copy_semi_with_no_update_nhs(semi) - - try - # Disable timers, which cause extra allocations - TrixiParticles.disable_debug_timings() - - # Disable multithreading, which causes extra allocations - return disable_polyester_threads() do - # We need `@invokelatest` here to ensure that the most recent method of - # `TrixiParticles.timeit_debug_enabled()` is called, which is redefined in - # `disable_debug_timings` above. - return @invokelatest count_rhs_allocations_inner(dv_ode, du_ode, v_ode, u_ode, - semi_no_nhs_update, t) - end - finally - # Enable timers again - @invokelatest TrixiParticles.enable_debug_timings() - end -end - -# Function barrier to avoid type instabilites with `semi_no_nhs_update`, which will -# cause extra allocations. -@inline function count_rhs_allocations_inner(dv_ode, du_ode, v_ode, u_ode, - semi_no_nhs_update, t) - # Run RHS once to avoid counting allocations from compilation - TrixiParticles.kick!(dv_ode, v_ode, u_ode, semi_no_nhs_update, t) - TrixiParticles.drift!(du_ode, v_ode, u_ode, semi_no_nhs_update, t) - - # Count allocations - allocations_kick = @allocated TrixiParticles.kick!(dv_ode, v_ode, u_ode, - semi_no_nhs_update, t) - allocations_drift = @allocated TrixiParticles.drift!(du_ode, v_ode, u_ode, - semi_no_nhs_update, t) - - return allocations_kick + allocations_drift -end diff --git a/test/examples/dam_break_2d_corrections.jl b/test/examples/dam_break_2d_corrections.jl deleted file mode 100644 index 5183e6b57..000000000 --- a/test/examples/dam_break_2d_corrections.jl +++ /dev/null @@ -1,110 +0,0 @@ -@trixi_testset "dam_break_2d.jl with corrections" begin - fluid_density = 1000.0 - particle_spacing = 0.05 - #tspan = (0.0, 5.7 / sqrt(9.81)) - tspan = (0.0, 0.1) - - correction_dict = Dict( - "no_correction" => nothing, - "shepard_kernel_correction" => ShepardKernelCorrection(), - "akinci_free_surf_correction" => AkinciFreeSurfaceCorrection(fluid_density), - "kernel_correction_summation_correction" => KernelCorrection(), - "kernel_correction_continuity_correction" => KernelCorrection(), - "blended_gradient_summation_correction" => BlendedGradientCorrection(0.5), - "blended_gradient_continuity_correction" => BlendedGradientCorrection(0.2), - "gradient_summation_correction" => GradientCorrection(), - "mixed_kernel_gradient_summation_correction" => MixedKernelGradientCorrection(), - "gradient_continuity_correction" => GradientCorrection(), - "mixed_kernel_gradient_continuity_correction" => MixedKernelGradientCorrection(), - ) - - smoothing_length_dict = Dict( - "no_correction" => 3.0 * particle_spacing, - "shepard_kernel_correction" => 3.0 * particle_spacing, - "akinci_free_surf_correction" => 3.0 * particle_spacing, - "kernel_correction_summation_correction" => 4.0 * particle_spacing, - "kernel_correction_continuity_correction" => 3.5 * particle_spacing, - "blended_gradient_summation_correction" => 3.0 * particle_spacing, - "blended_gradient_continuity_correction" => 4.0 * particle_spacing, - "gradient_summation_correction" => 3.5 * particle_spacing, - "mixed_kernel_gradient_summation_correction" => 3.5 * particle_spacing, - "gradient_continuity_correction" => 4.5 * particle_spacing, - "mixed_kernel_gradient_continuity_correction" => 4.0 * particle_spacing, - ) - - density_calculator_dict = Dict( - "no_correction" => SummationDensity(), - "shepard_kernel_correction" => SummationDensity(), - "akinci_free_surf_correction" => SummationDensity(), - "kernel_correction_summation_correction" => SummationDensity(), - "kernel_correction_continuity_correction" => ContinuityDensity(), - "blended_gradient_summation_correction" => SummationDensity(), - "blended_gradient_continuity_correction" => ContinuityDensity(), - "gradient_summation_correction" => SummationDensity(), - "gradient_continuity_correction" => ContinuityDensity(), - "mixed_kernel_gradient_summation_correction" => SummationDensity(), - "mixed_kernel_gradient_continuity_correction" => ContinuityDensity(), - ) - - smoothing_kernel_dict = Dict( - "no_correction" => WendlandC2Kernel{2}(), - "shepard_kernel_correction" => WendlandC2Kernel{2}(), - "akinci_free_surf_correction" => WendlandC2Kernel{2}(), - "kernel_correction_summation_correction" => WendlandC6Kernel{2}(), - "kernel_correction_continuity_correction" => WendlandC6Kernel{2}(), - "blended_gradient_summation_correction" => WendlandC2Kernel{2}(), - "blended_gradient_continuity_correction" => WendlandC6Kernel{2}(), - "gradient_summation_correction" => WendlandC6Kernel{2}(), - "gradient_continuity_correction" => WendlandC6Kernel{2}(), - "mixed_kernel_gradient_summation_correction" => WendlandC6Kernel{2}(), - "mixed_kernel_gradient_continuity_correction" => WendlandC6Kernel{2}(), - ) - - @testset "continuity_reinit" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), - fluid_particle_spacing=particle_spacing, - smoothing_length=3.0 * particle_spacing, - boundary_density_calculator=ContinuityDensity(), - fluid_density_calculator=ContinuityDensity(), - correction=nothing, use_reinit=true, - prefix="continuity_reinit", tspan=tspan, - fluid_density=fluid_density, - density_diffusion=nothing) - - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @testset verbose=true "$correction_name" for correction_name in keys(correction_dict) - local fluid_density_calculator = density_calculator_dict[correction_name] - local correction = correction_dict[correction_name] - local smoothing_kernel = smoothing_kernel_dict[correction_name] - local smoothing_length = smoothing_length_dict[correction_name] - - println("="^100) - println("fluid/dam_break_2d.jl with ", correction_name) - - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), - fluid_particle_spacing=particle_spacing, - smoothing_length=smoothing_length, - boundary_density_calculator=SummationDensity(), - fluid_density_calculator=fluid_density_calculator, - correction=correction, use_reinit=false, - clip_negative_pressure=(fluid_density_calculator isa - SummationDensity), - smoothing_kernel=smoothing_kernel, - prefix="$(correction_name)", tspan=tspan, - fluid_density=fluid_density, - density_diffusion=nothing, - boundary_layers=5, sol=nothing) - - # Some correction methods require very small time steps at the beginning of the simulation. - # An adaptive time integrator makes this easier and faster. - sol = solve(ode, RDPK3SpFSAL35(), save_everystep=false, callback=callbacks) - - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end -end diff --git a/test/examples/examples.jl b/test/examples/examples.jl index 19b6ba2b9..00eef6166 100644 --- a/test/examples/examples.jl +++ b/test/examples/examples.jl @@ -2,324 +2,117 @@ # but without checking the correctness of the solution. @testset verbose=true "Examples" begin @testset verbose=true "Fluid" begin - @trixi_testset "fluid/oscillating_drop_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "oscillating_drop_2d.jl")) + @trixi_testset "fluid/rectangular_tank_2d.jl" begin + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fluid", + "rectangular_tank_2d.jl"), tspan=(0.0, 0.1)) @test sol.retcode == ReturnCode.Success - # This error varies between serial and multithreaded runs - @test isapprox(error_A, 0.0001717690010767381, atol=5e-7) - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/hydrostatic_water_column_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "hydrostatic_water_column_2d.jl")) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/hydrostatic_water_column_2d.jl with source term damping" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "hydrostatic_water_column_2d.jl"), - source_terms=SourceTermDamping(; - damping_coefficient=1e-4)) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/hydrostatic_water_column_2d.jl with SummationDensity" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "hydrostatic_water_column_2d.jl"), - fluid_density_calculator=SummationDensity(), - clip_negative_pressure=true) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/hydrostatic_water_column_3d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "hydrostatic_water_column_3d.jl"), - tspan=(0.0, 0.1)) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/hydrostatic_water_column_3d.jl with SummationDensity" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "hydrostatic_water_column_3d.jl"), - tspan=(0.0, 0.1), - fluid_density_calculator=SummationDensity(), - clip_negative_pressure=true) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/hydrostatic_water_column_edac_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "hydrostatic_water_column_edac_2d.jl")) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/accelerated_tank_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, tspan=(0.0, 0.5), - joinpath(examples_dir(), "fluid", - "accelerated_tank_2d.jl")) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end @trixi_testset "fluid/dam_break_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "dam_break_2d.jl"), tspan=(0.0, 0.1)) [ - r"┌ Info: The desired tank length in y-direction .*\n", - r"└ New tank length in y-direction.*\n", - ] - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/dam_break_2d.jl with KernelAbstractions.jl" begin - # Emulate the GPU code on the CPU by passing `data_type = Array` - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "dam_break_2d.jl"), tspan=(0.0, 0.1), - data_type=Array) [ - r"┌ Info: The desired tank length in y-direction .*\n", - r"└ New tank length in y-direction.*\n", - ] + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), + tspan=(0.0, 0.1)) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end @trixi_testset "fluid/dam_break_3d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "dam_break_3d.jl"), - tspan=(0.0, 0.1), fluid_particle_spacing=0.1) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fluid", "dam_break_3d.jl"), + tspan=(0.0, 0.1)) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end @trixi_testset "fluid/falling_water_column_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "falling_water_column_2d.jl"), - tspan=(0.0, 0.4)) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/periodic_channel_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "periodic_channel_2d.jl"), - tspan=(0.0, 0.4)) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/pipe_flow_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, tspan=(0.0, 0.5), - joinpath(examples_dir(), "fluid", - "pipe_flow_2d.jl")) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/dam_break_2d_surface_tension.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "dam_break_2d_surface_tension.jl"), - tspan=(0.0, 0.1)) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/sphere_surface_tension_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "sphere_surface_tension_2d.jl")) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/sphere_surface_tension_3d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "sphere_surface_tension_3d.jl")) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/falling_water_spheres_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "falling_water_spheres_2d.jl")) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/falling_water_spheres_3d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "falling_water_spheres_3d.jl")) [ - r"┌ Info: The desired tank length in x-direction .*\n", - r"└ New tank length in x-direction.*\n", - r"┌ Info: The desired tank length in y-direction .*\n", - r"└ New tank length in y-direction.*\n", - r"┌ Info: The desired tank length in z-direction .*\n", - r"└ New tank length in z-direction.*\n", - ] - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - end - - @trixi_testset "fluid/sphere_surface_tension_wall_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", - "sphere_surface_tension_wall_2d.jl")) - end - - @trixi_testset "fluid/moving_wall_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, tspan=(0.0, 0.5), - joinpath(examples_dir(), "fluid", - "moving_wall_2d.jl")) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fluid", + "falling_water_column_2d.jl"), + tspan=(0.0, 0.4)) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end - - include("dam_break_2d_corrections.jl") end @testset verbose=true "Solid" begin @trixi_testset "solid/oscillating_beam_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "solid", - "oscillating_beam_2d.jl"), - tspan=(0.0, 0.1)) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "solid", + "oscillating_beam_2d.jl"), tspan=(0.0, 0.1)) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end end @testset verbose=true "FSI" begin @trixi_testset "fsi/falling_water_column_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fsi", - "falling_water_column_2d.jl"), - tspan=(0.0, 0.4)) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fsi", + "falling_water_column_2d.jl"), + tspan=(0.0, 0.4)) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end - @trixi_testset "fsi/dam_break_plate_2d.jl" begin + @trixi_testset "fsi/dam_break_2d.jl" begin # Use rounded dimensions to avoid warnings - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fsi", - "dam_break_plate_2d.jl"), - initial_fluid_size=(0.15, 0.29), - tspan=(0.0, 0.4), - dtmax=1e-3) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fsi", "dam_break_2d.jl"), + water_width=0.15, + water_height=0.29, + tank_width=0.58, + tspan_relaxing=(0.0, 2.0), + tspan=(0.0, 0.4), + dtmax=1e-3) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end @trixi_testset "fsi/dam_break_gate_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fsi", - "dam_break_gate_2d.jl"), - tspan=(0.0, 0.4), - dtmax=1e-3) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fsi", + "dam_break_gate_2d.jl"), + tspan_relaxing=(0.0, 2.0), + tspan=(0.0, 0.4), + dtmax=1e-3) + @test sol.retcode == ReturnCode.Success + end + + @trixi_testset "fsi/bending_beam_2d.jl" begin + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fsi", + "bending_beam_2d.jl"), + n_particles_y=5) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end @trixi_testset "fsi/falling_spheres_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "fsi", - "falling_spheres_2d.jl"), - tspan=(0.0, 1.0)) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "fsi", + "falling_spheres_2d.jl"), + tspan=(0.0, 1.0)) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end end @testset verbose=true "N-Body" begin @trixi_testset "n_body/n_body_solar_system.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "n_body", - "n_body_solar_system.jl")) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "n_body", + "n_body_solar_system.jl")) @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end @trixi_testset "n_body/n_body_benchmark_trixi.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "n_body", - "n_body_benchmark_trixi.jl")) [ - r"WARNING: Method definition interact!.*\n", - ] + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "n_body", + "n_body_benchmark_trixi.jl")) end @trixi_testset "n_body/n_body_benchmark_reference.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "n_body", - "n_body_benchmark_reference.jl")) + @test_nowarn trixi_include(@__MODULE__, + joinpath(examples_dir(), "n_body", + "n_body_benchmark_reference.jl")) end @trixi_testset "n_body/n_body_benchmark_reference_faster.jl" begin - @test_nowarn_mod trixi_include(joinpath(examples_dir(), "n_body", - "n_body_benchmark_reference_faster.jl")) - end - end - - @testset verbose=true "Postprocessing" begin - @trixi_testset "postprocessing/interpolation_plane.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "postprocessing", - "interpolation_plane.jl"), - tspan=(0.0, 0.01)) [ - r"WARNING: importing deprecated binding Makie.*\n", - r"WARNING: using deprecated binding Colors.*\n", - r"WARNING: using deprecated binding PlotUtils.*\n", - r"WARNING: Makie.* is deprecated.*\n", - r" likely near none:1\n", - r", use .* instead.\n", - ] - @test sol.retcode == ReturnCode.Success + @test_nowarn trixi_include(joinpath(examples_dir(), "n_body", + "n_body_benchmark_reference_faster.jl")) end - @trixi_testset "postprocessing/interpolation_point_line.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "postprocessing", - "interpolation_point_line.jl")) - @test sol.retcode == ReturnCode.Success - end - @trixi_testset "postprocessing/postprocessing.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), - "postprocessing", - "postprocessing.jl")) - @test sol.retcode == ReturnCode.Success - end - end -end - -@testset verbose=true "DEM" begin - @trixi_testset "dem/rectangular_tank_2d.jl" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(examples_dir(), "dem", - "rectangular_tank_2d.jl"), - tspan=(0.0, 0.1)) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 end end diff --git a/test/general/buffer.jl b/test/general/buffer.jl deleted file mode 100644 index 7a8371ea7..000000000 --- a/test/general/buffer.jl +++ /dev/null @@ -1,68 +0,0 @@ -@testset verbose=true "`SystemBuffer`" begin - # Mock fluid system - struct FluidSystemMock3 <: TrixiParticles.FluidSystem{2, Nothing} end - - inflow = InFlow(; plane=([0.0, 0.0], [0.0, 1.0]), particle_spacing=0.2, - open_boundary_layers=2, density=1.0, flow_direction=[1.0, 0.0]) - system = OpenBoundarySPHSystem(inflow; sound_speed=1.0, fluid_system=FluidSystemMock3(), - buffer_size=0) - system_buffer = OpenBoundarySPHSystem(inflow; sound_speed=1.0, buffer_size=5, - fluid_system=FluidSystemMock3()) - - n_particles = nparticles(system) - - @testset "Iterators" begin - @test TrixiParticles.each_moving_particle(system) == 1:n_particles - - @test TrixiParticles.each_moving_particle(system_buffer) == 1:n_particles - - particle_id = TrixiParticles.activate_next_particle(system_buffer) - - TrixiParticles.update_system_buffer!(system_buffer.buffer) - - @test TrixiParticles.each_moving_particle(system_buffer) == 1:(n_particles + 1) - - TrixiParticles.deactivate_particle!(system_buffer, particle_id, - ones(2, particle_id)) - - TrixiParticles.update_system_buffer!(system_buffer.buffer) - - @test TrixiParticles.each_moving_particle(system_buffer) == 1:n_particles - - particle_id = 5 - TrixiParticles.deactivate_particle!(system_buffer, particle_id, - ones(2, particle_id)) - - TrixiParticles.update_system_buffer!(system_buffer.buffer) - - @test TrixiParticles.each_moving_particle(system_buffer) == - setdiff(1:n_particles, particle_id) - end - - @testset "Allocate Buffer" begin - initial_condition = rectangular_patch(0.1, (3, 3), perturbation_factor=0.0) - buffer = TrixiParticles.SystemBuffer(nparticles(initial_condition), 7) - - ic_with_buffer = TrixiParticles.allocate_buffer(initial_condition, buffer) - - @test nparticles(ic_with_buffer) == nparticles(initial_condition) + 7 - - masses = initial_condition.mass[1] .* ones(nparticles(ic_with_buffer)) - @test masses == ic_with_buffer.mass - - densities = initial_condition.density[1] .* ones(nparticles(ic_with_buffer)) - @test densities == ic_with_buffer.density - - pressures = initial_condition.pressure[1] .* ones(nparticles(ic_with_buffer)) - @test pressures == ic_with_buffer.pressure - - @testset "Illegal Input" begin - # The rectangular patch has a perturbed, non-constant density - ic = rectangular_patch(0.1, (3, 3)) - buffer = TrixiParticles.SystemBuffer(9, 7) - - error_str = "`initial_condition.density` needs to be constant when using `SystemBuffer`" - @test_throws ArgumentError(error_str) TrixiParticles.allocate_buffer(ic, buffer) - end - end -end diff --git a/test/general/density_calculator.jl b/test/general/density_calculator.jl deleted file mode 100644 index 2ded39476..000000000 --- a/test/general/density_calculator.jl +++ /dev/null @@ -1,35 +0,0 @@ -using OrdinaryDiffEq - -# Setup a single particle and calculate its density -@testset verbose=true "DensityCalculators" begin - @testset verbose=true "SummationDensity" begin - water_density = 1000.0 - - initial_condition = InitialCondition(coordinates=zeros(2, 1), - mass=water_density, density=water_density) - - smoothing_length = 1.0 - smoothing_kernel = SchoenbergCubicSplineKernel{2}() - - state_equation = StateEquationCole(sound_speed=10, reference_density=water_density, - exponent=7) - viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) - - fluid_system = WeaklyCompressibleSPHSystem(initial_condition, SummationDensity(), - state_equation, - smoothing_kernel, smoothing_length, - viscosity=viscosity) - - (; cache) = fluid_system - (; density) = cache # Density is in the cache for SummationDensity - - semi = Semidiscretization(fluid_system) - - tspan = (0.0, 0.01) - ode = semidiscretize(semi, tspan) - TrixiParticles.update_systems_and_nhs(ode.u0.x..., semi, 0.0) - - @test density[1] === - water_density * TrixiParticles.kernel(smoothing_kernel, 0.0, smoothing_length) - end -end diff --git a/test/general/general.jl b/test/general/general.jl index 27f60ebba..ba1bb6a87 100644 --- a/test/general/general.jl +++ b/test/general/general.jl @@ -1,6 +1,2 @@ +include("neighborhood_search.jl") include("initial_condition.jl") -include("smoothing_kernels.jl") -include("density_calculator.jl") -include("semidiscretization.jl") -include("interpolation.jl") -include("buffer.jl") diff --git a/test/general/initial_condition.jl b/test/general/initial_condition.jl index 468ebe65b..1064704bc 100644 --- a/test/general/initial_condition.jl +++ b/test/general/initial_condition.jl @@ -1,319 +1,62 @@ -@testset verbose=true "InitialCondition" begin - disjoint_shapes_dict = Dict( - "Rectangular Shapes" => (RectangularShape(0.1, (3, 4), (-1.0, 1.0), - density=1.0), - RectangularShape(0.1, (4, 5), (0.0, 1.0), density=1.0, - velocity=(0.3, -0.5))), - "Touching Rectangular Shapes" => (RectangularShape(0.1, (3, 4), (-1.0, 1.0), - density=1.0), - RectangularShape(0.1, (4, 5), (0.0, 1.0), - density=1.0), - RectangularShape(0.1, (2, 10), (0.0, 0.0), - density=1.0)), - "Sphere Shapes" => (SphereShape(0.15, 0.5, (-1.0, 1.0), 1.0), - SphereShape(0.15, 0.2, (0.0, 1.0), 1.0), - SphereShape(0.15, 1.0, (0.0, -0.2), 1.0, - sphere_type=RoundSphere())), - "Touching Mixed Shapes" => (RectangularShape(0.1, (3, 10), (-1.0, 0.0), - density=1.0), - SphereShape(0.1, 0.5, (-1.0, 1.5), 1000.0), - SphereShape(0.1, 0.5, (1.0, 0.5), 1000.0, - sphere_type=RoundSphere()))) +# 2D +@testset "Merge InitialConditions 2D" begin + @testset "Rectangular Shapes" begin + shape_1 = RectangularShape(0.1, (3, 4), (-1.0, 1.0), 1.0) + shape_2 = RectangularShape(0.05, (3, 4), (0.0, 1.0), 1.0) + shape_3 = RectangularShape(0.2, (3, 4), (0.0, 0.0), 1.0) - @testset verbose=true "Constructors" begin - @testset "Illegal Inputs" begin - error_str = "`coordinates` and `velocities` must be of the same size" - @test_throws ArgumentError(error_str) InitialCondition(coordinates=zeros(2, 3), - velocity=zeros(2, 4), - mass=ones(3), - density=ones(3)) + expected_coords_1 = [-1.0 -1.0 -1.0 -1.0 -0.9 -0.9 -0.9 -0.9 -0.8 -0.8 -0.8 -0.8 0.0 0.0 0.0 0.0 0.05 0.05 0.05 0.05 0.1 0.1 0.1 0.1; + 1.0 1.1 1.2 1.3 1.0 1.1 1.2 1.3 1.0 1.1 1.2 1.3 1.0 1.05 1.1 1.15 1.0 1.05 1.1 1.15 1.0 1.05 1.1 1.15] + expected_coords_2 = [-1.0 -1.0 -1.0 -1.0 -0.9 -0.9 -0.9 -0.9 -0.8 -0.8 -0.8 -0.8 0.0 0.0 0.0 0.0 0.05 0.05 0.05 0.05 0.1 0.1 0.1 0.1 0.0 0.0 0.0 0.0 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4; + 1.0 1.1 1.2 1.3 1.0 1.1 1.2 1.3 1.0 1.1 1.2 1.3 1.0 1.05 1.1 1.15 1.0 1.05 1.1 1.15 1.0 1.05 1.1 1.15 0.0 0.2 0.4 0.6 0.0 0.2 0.4 0.6 0.0 0.2 0.4 0.6] + initial_condition = InitialCondition(shape_1, shape_2) + @test initial_condition.coordinates ≈ expected_coords_1 - error_str = "`velocity` must be 2-dimensional for 2-dimensional `coordinates`" - @test_throws ArgumentError(error_str) InitialCondition(coordinates=zeros(2, 3), - velocity=x -> (1, 2, 3), - mass=ones(3), - density=ones(3)) - - error_str = """ - Expected: length(mass) == size(coordinates, 2) - Got: size(coordinates, 2) = 2, length(mass) = 3""" - @test_throws ArgumentError(error_str) InitialCondition(coordinates=zeros(2, 2), - velocity=zeros(2, 2), - mass=ones(3), - density=ones(2)) - - error_str = """ - Expected: length(density) == size(coordinates, 2) - Got: size(coordinates, 2) = 2, length(density) = 3""" - @test_throws ArgumentError(error_str) InitialCondition(coordinates=zeros(2, 2), - velocity=zeros(2, 2), - mass=ones(2), - density=ones(3)) - - error_str = """ - Expected: length(pressure) == size(coordinates, 2) - Got: size(coordinates, 2) = 2, length(pressure) = 3""" - @test_throws ArgumentError(error_str) InitialCondition(coordinates=zeros(2, 2), - velocity=zeros(2, 2), - mass=ones(2), - density=ones(2), - pressure=ones(3)) - - error_str = "`mass` must be specified when not using `particle_spacing`" - @test_throws ArgumentError(error_str) InitialCondition(coordinates=zeros(2, 2), - velocity=zeros(2, 2), - density=ones(2)) - - error_str = "density must be positive and larger than `eps()`" - @test_throws ArgumentError(error_str) InitialCondition(coordinates=zeros(2, 2), - velocity=zeros(2, 2), - density=zeros(2), - mass=ones(2)) - end - - @testset "Constant Quantities" begin - ic_actual1 = InitialCondition(coordinates=zeros(2, 5), velocity=(1.0, 2.0), - mass=3.0, density=4.0, pressure=5.0) - ic_actual2 = InitialCondition(coordinates=zeros(2, 5), velocity=[1.0, 2.0], - mass=3.0, density=4.0, pressure=5.0) - ic_expected = InitialCondition(coordinates=zeros(2, 5), - velocity=(1, 2) .* ones(2, 5), - mass=3 * ones(5), density=4 * ones(5), - pressure=5 * ones(5)) - - @test ic_actual1.coordinates == ic_actual2.coordinates == - ic_expected.coordinates - @test ic_actual1.velocity == ic_actual2.velocity == ic_expected.velocity - @test ic_actual1.mass == ic_actual2.mass == ic_expected.mass - @test ic_actual1.density == ic_actual2.density == ic_expected.density - @test ic_actual1.pressure == ic_actual2.pressure == ic_expected.pressure - end - - @testset "Automatic Mass Calculation" begin - particle_spacing = 0.13 - coordinates = [88.3 10.4 5.2 48.3 58.9; - 23.6 92.5 92.1 96.7 84.8; - 77.5 44.1 18.2 30.5 44.0] - ic_actual = InitialCondition(; coordinates, velocity=x -> 2x, - density=x -> 4x[2], pressure=x -> 5x[3], - particle_spacing) - ic_expected = InitialCondition(; coordinates, velocity=2coordinates, - mass=particle_spacing^3 * 4coordinates[2, :], - density=4coordinates[2, :], - pressure=5coordinates[3, :]) - - @test ic_actual.coordinates == ic_expected.coordinates - @test ic_actual.velocity == ic_expected.velocity - @test ic_actual.mass == ic_expected.mass - @test ic_actual.density == ic_expected.density - @test ic_actual.pressure == ic_expected.pressure - end - - @testset "Quantities as Functions" begin - coordinates = [88.3 10.4 5.2 48.3 58.9; - 23.6 92.5 92.1 96.7 84.8; - 77.5 44.1 18.2 30.5 44.0] - ic_actual = InitialCondition(; coordinates, velocity=x -> 2x, mass=x -> 3x[1], - density=x -> 4x[2], pressure=x -> 5x[3]) - ic_expected = InitialCondition(; coordinates, velocity=2coordinates, - mass=3coordinates[1, :], - density=4coordinates[2, :], - pressure=5coordinates[3, :]) - - @test ic_actual.coordinates == ic_expected.coordinates - @test ic_actual.velocity == ic_expected.velocity - @test ic_actual.mass == ic_expected.mass - @test ic_actual.density == ic_expected.density - @test ic_actual.pressure == ic_expected.pressure - end + initial_condition = InitialCondition(shape_1, shape_2, shape_3) + @test initial_condition.coordinates ≈ expected_coords_2 end - @testset verbose=true "Union of Disjoint Shapes" begin - @testset "$key" for key in keys(disjoint_shapes_dict) - shapes = disjoint_shapes_dict[key] - initial_condition = union(shapes...) - - # Number of particles should be the sum of the individual numbers of particles - @test nparticles(initial_condition) == - sum(nparticles(shape) for shape in shapes) - @test initial_condition.particle_spacing == first(shapes).particle_spacing - - for i in eachindex(shapes) - start_index = sum((nparticles(shapes[j]) for j in 1:(i - 1)), init=0) + 1 - end_index = start_index + nparticles(shapes[i]) - 1 - - # All arrays are just appended - @test view(initial_condition.coordinates, :, start_index:end_index) == - shapes[i].coordinates - @test view(initial_condition.velocity, :, start_index:end_index) == - shapes[i].velocity - @test view(initial_condition.mass, start_index:end_index) == - shapes[i].mass - @test view(initial_condition.density, start_index:end_index) == - shapes[i].density - end - end - end - - @testset "Union of Shapes with Different Spacing" begin - shape1 = RectangularShape(0.13, (9, 10), (0.0, 0.0), density=1.0) - shape2 = RectangularShape(0.1, (4, 5), (1.0, 1.0), density=1.0) - - error = ArgumentError("all passed initial conditions must have the same particle spacing") - - @test_throws error union(shape1, shape2) - end - - @testset verbose=true "Union of Overlapping Shapes" begin - @testset "Rectangular Shapes" begin - shape1 = RectangularShape(0.13, (9, 10), (0.0, 0.0), density=1.0, - loop_order=:x_first) - shape2 = RectangularShape(0.13, (4, 5), (1.0, 1.0), density=1.0, - loop_order=:x_first) - - initial_condition = union(shape1, shape2) - - expected_coords = [0.065 0.065 0.065 0.065 0.065 0.065 0.065 0.065 0.065 0.065 0.195 0.195 0.195 0.195 0.195 0.195 0.195 0.195 0.195 0.195 0.325 0.325 0.325 0.325 0.325 0.325 0.325 0.325 0.325 0.325 0.455 0.455 0.455 0.455 0.455 0.455 0.455 0.455 0.455 0.455 0.585 0.585 0.585 0.585 0.585 0.585 0.585 0.585 0.585 0.585 0.715 0.715 0.715 0.715 0.715 0.715 0.715 0.715 0.715 0.715 0.845 0.845 0.845 0.845 0.845 0.845 0.845 0.845 0.845 0.845 0.975 0.975 0.975 0.975 0.975 0.975 0.975 0.975 0.975 0.975 1.105 1.105 1.105 1.105 1.105 1.105 1.105 1.105 1.105 1.105 1.065 1.065 1.065 1.195 1.195 1.195 1.195 1.195 1.325 1.325 1.325 1.325 1.325 1.455 1.455 1.455 1.455 1.455; - 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 1.325 1.455 1.585 1.065 1.195 1.325 1.455 1.585 1.065 1.195 1.325 1.455 1.585 1.065 1.195 1.325 1.455 1.585] - @test initial_condition.coordinates ≈ expected_coords - end - - @testset "Rectangle with Added RoundSphere" begin - shape1 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0, - loop_order=:x_first) - shape2 = SphereShape(0.1, 0.3, (0.7, 0.6), 1.0, sphere_type=RoundSphere()) + @testset "Circular Shapes" begin + shape_1 = CircularShape(0.1, 0.5, (-1.0, 1.0), 1.0) + shape_2 = CircularShape(0.05, 0.2, (0.0, 1.0), 1.0) + shape_3 = CircularShape(0.15, 1.0, (0.0, -0.2), 1.0) - initial_condition = union(shape1, shape2) + expected_coords_1 = [-1.2 -1.1 -1.0 -0.9 -0.8 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 0.0 -0.1 -0.05 0.0 0.05 0.1 -0.15 -0.1 -0.05 0.0 0.05 0.1 0.15 -0.15 -0.1 -0.05 0.0 0.05 0.1 0.15 -0.15 -0.1 -0.05 0.0 0.05 0.1 0.15 -0.15 -0.1 -0.05 0.0 0.05 0.1 0.15 -0.15 -0.1 -0.05 0.0 0.05 0.1 0.15 -0.1 -0.05 0.0 0.05 0.1 0.0; + 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.4 1.4 1.4 1.4 1.4 1.4 1.4 0.8 0.85 0.85 0.85 0.85 0.85 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.95 0.95 0.95 0.95 0.95 0.95 0.95 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.05 1.05 1.05 1.05 1.05 1.05 1.05 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.15 1.15 1.15 1.15 1.15 1.2] - expected_coords = [-0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.85 0.81490667 0.81490667 0.95 0.93096988 0.8767767 0.8767767 0.93096988; - 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.6 0.69641814 0.50358186 0.6 0.69567086 0.7767767 0.4232233 0.50432914] - @test initial_condition.coordinates ≈ expected_coords - end + expected_coords_2 = [-1.2 -1.1 -1.0 -0.9 -0.8 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -0.6 -1.4 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 -1.3 -1.2 -1.1 -1.0 -0.9 -0.8 -0.7 0.0 -0.1 -0.05 0.0 0.05 0.1 -0.15000000000000002 -0.1 -0.05 0.0 0.05 0.1 0.15000000000000002 -0.15000000000000002 -0.1 -0.05 0.0 0.05 0.1 0.15000000000000002 -0.15000000000000002 -0.1 -0.05 0.0 0.05 0.1 0.15000000000000002 -0.15000000000000002 -0.1 -0.05 0.0 0.05 0.1 0.15000000000000002 -0.15000000000000002 -0.1 -0.05 0.0 0.05 0.1 0.15000000000000002 -0.1 -0.05 0.0 0.05 0.1 0.0 -0.3 -0.15 0.0 0.15 0.3 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 -0.8999999999999999 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 0.8999999999999999 -0.8999999999999999 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 0.8999999999999999 -0.8999999999999999 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 0.8999999999999999 -0.8999999999999999 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 0.8999999999999999 -0.8999999999999999 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 0.8999999999999999 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 -0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 0.75 -0.6 -0.44999999999999996 -0.3 -0.15 0.0 0.15 0.3 0.44999999999999996 0.6 -0.3 -0.15 0.0 0.15 0.3; + 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.4 1.4 1.4 1.4 1.4 1.4 1.4 0.8 0.85 0.85 0.85 0.85 0.85 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.95 0.95 0.95 0.95 0.95 0.95 0.95 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.05 1.05 1.05 1.05 1.05 1.05 1.05 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.15 1.15 1.15 1.15 1.15 1.2 -1.0999999999999999 -1.0999999999999999 -1.0999999999999999 -1.0999999999999999 -1.0999999999999999 -0.95 -0.95 -0.95 -0.95 -0.95 -0.95 -0.95 -0.95 -0.95 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.6499999999999999 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 -0.05000000000000002 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.09999999999999998 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.24999999999999994 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.7 0.7 0.7 0.7 0.7] - @testset "RoundSphere Inside Rectangle" begin - # Same as above, but this will produce a `RoundSphere` inside the rectangle, - # as the first shape in the union is prioritized. - shape1 = SphereShape(0.1, 0.3, (0.7, 0.6), 1.0, sphere_type=RoundSphere()) - shape2 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0, - loop_order=:x_first) + initial_condition = InitialCondition(shape_1, shape_2) + @test initial_condition.coordinates ≈ expected_coords_1 - initial_condition = union(shape1, shape2) - - expected_coords = [0.75 0.675 0.675 0.85 0.81490667 0.72604723 0.625 0.55904611 0.55904611 0.625 0.72604723 0.81490667 0.95 0.93096988 0.8767767 0.79567086 0.7 0.60432914 0.5232233 0.46903012 0.45 0.46903012 0.5232233 0.60432914 0.7 0.79567086 0.8767767 0.93096988 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.75 0.75 0.75 0.75 0.75 0.75 0.75; - 0.6 0.64330127 0.55669873 0.6 0.69641814 0.74772116 0.72990381 0.65130302 0.54869698 0.47009619 0.45227884 0.50358186 0.6 0.69567086 0.7767767 0.83096988 0.85 0.83096988 0.7767767 0.69567086 0.6 0.50432914 0.4232233 0.36903012 0.35 0.36903012 0.4232233 0.50432914 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25] - @test initial_condition.coordinates ≈ expected_coords - end - end - - @testset verbose=true "Setdiff of Disjoint Shapes" begin - @testset "$key" for key in keys(disjoint_shapes_dict) - shapes = disjoint_shapes_dict[key] - initial_condition = setdiff(shapes...) - - @test initial_condition.particle_spacing == first(shapes).particle_spacing - @test initial_condition.coordinates == first(shapes).coordinates - @test initial_condition.velocity == first(shapes).velocity - @test initial_condition.mass == first(shapes).mass - @test initial_condition.density == first(shapes).density - end + initial_condition = InitialCondition(shape_1, shape_2, shape_3) + @test initial_condition.coordinates ≈ expected_coords_2 end - @testset verbose=true "Setdiff of Overlapping Shapes" begin - @testset "Rectangular Shapes" begin - shape1 = RectangularShape(0.13, (9, 10), (0.0, 0.0), density=1.0, - loop_order=:x_first) - shape2 = RectangularShape(0.13, (4, 5), (1.0, 1.0), density=1.0, - loop_order=:x_first) - - initial_condition = setdiff(shape1, shape2) - - expected_coords = [0.065 0.065 0.065 0.065 0.065 0.065 0.065 0.065 0.065 0.065 0.195 0.195 0.195 0.195 0.195 0.195 0.195 0.195 0.195 0.195 0.325 0.325 0.325 0.325 0.325 0.325 0.325 0.325 0.325 0.325 0.455 0.455 0.455 0.455 0.455 0.455 0.455 0.455 0.455 0.455 0.585 0.585 0.585 0.585 0.585 0.585 0.585 0.585 0.585 0.585 0.715 0.715 0.715 0.715 0.715 0.715 0.715 0.715 0.715 0.715 0.845 0.845 0.845 0.845 0.845 0.845 0.845 0.845 0.845 0.845 0.975 0.975 0.975 0.975 0.975 0.975 0.975 0.975 0.975 0.975 1.105 1.105 1.105 1.105 1.105 1.105 1.105 1.105; - 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975 1.105 1.235 0.065 0.195 0.325 0.455 0.585 0.715 0.845 0.975] - @test initial_condition.coordinates ≈ expected_coords - end + @testset "Mixed Shapes" begin + shape_1 = CircularShape(0.1, 0.8, (0.0, 1.0), 1.0) + shape_2 = RectangularShape(0.05, (3, 4), (-0.5, 0.0), 1.0) - @testset "Rectangle without RoundSphere" begin - shape1 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0, - loop_order=:x_first) - shape2 = SphereShape(0.1, 0.35, (0.0, 0.6), 1.0, sphere_type=RoundSphere()) + expected_coords = [-0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 -0.7000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 0.7000000000000001 -0.7000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 0.7000000000000001 -0.7000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 0.7000000000000001 -0.7000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 0.7000000000000001 -0.7000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 0.7000000000000001 -0.7000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 0.7000000000000001 -0.7000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 0.7000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 -0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.6000000000000001 -0.5 -0.4 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 -0.30000000000000004 -0.2 -0.1 0.0 0.1 0.2 0.30000000000000004 -0.5 -0.5 -0.5 -0.5 -0.45 -0.45 -0.45 -0.45 -0.4 -0.4 -0.4 -0.4; + 0.29999999999999993 0.29999999999999993 0.29999999999999993 0.29999999999999993 0.29999999999999993 0.29999999999999993 0.29999999999999993 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.3999999999999999 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.6 1.6 1.6 1.6 1.6 1.6 1.6 1.6 1.6 1.6 1.6 1.7000000000000002 1.7000000000000002 1.7000000000000002 1.7000000000000002 1.7000000000000002 1.7000000000000002 1.7000000000000002 0.0 0.05 0.1 0.15000000000000002 0.0 0.05 0.1 0.15000000000000002 0.0 0.05 0.1 0.15000000000000002] - initial_condition = setdiff(shape1, shape2) - - expected_coords = [-0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75; - 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25 0.05 0.15 1.05 1.15 1.25 0.05 0.15 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25] - @test initial_condition.coordinates ≈ expected_coords - end - - @testset "Rectangle without Low-Res Sphere" begin - shape1 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0, - loop_order=:x_first) - shape2 = SphereShape(0.2, 0.35, (0.0, 0.6), 1.0) - - initial_condition = setdiff(shape1, shape2) - - expected_coords = [-0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.65 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.55 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75; - 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15 1.25] - @test initial_condition.coordinates ≈ expected_coords - end + initial_condition = InitialCondition(shape_1, shape_2) + @test initial_condition.coordinates ≈ expected_coords end +end - @testset verbose=true "Intersect of Disjoint Shapes" begin - @testset "$key" for key in keys(disjoint_shapes_dict) - shapes = disjoint_shapes_dict[key] - initial_condition = intersect(shapes...) - - @test initial_condition.particle_spacing == first(shapes).particle_spacing - @test length(initial_condition.coordinates) == 0 - @test length(initial_condition.velocity) == 0 - @test length(initial_condition.mass) == 0 - @test length(initial_condition.density) == 0 - end - end - - @testset verbose=true "Intersect of Overlapping Shapes" begin - @testset "Rectangular Shapes" begin - shape1 = RectangularShape(0.13, (9, 10), (0.0, 0.0), density=1.0) - shape2 = RectangularShape(0.13, (4, 5), (1.0, 1.0), density=1.0) - - initial_condition = intersect(shape1, shape2) - - expected_coords = [1.105 1.105; 1.105 1.235] - @test initial_condition.coordinates ≈ expected_coords - end - - @testset "Rectangle and RoundSphere" begin - shape1 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0, - loop_order=:x_first) - shape2 = SphereShape(0.1, 0.35, (0.0, 0.6), 1.0, sphere_type=RoundSphere()) - - initial_condition = intersect(shape1, shape2) - - expected_coords = [-0.35 -0.35 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35; - 0.55 0.65 0.35 0.45 0.55 0.65 0.75 0.85 0.35 0.45 0.55 0.65 0.75 0.85 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 0.35 0.45 0.55 0.65 0.75 0.85 0.35 0.45 0.55 0.65 0.75 0.85 0.55 0.65] - @test initial_condition.coordinates ≈ expected_coords - end - - @testset "RoundSphere and Rectangle" begin - shape1 = SphereShape(0.1, 0.35, (0.7, 0.6), 1.0, sphere_type=RoundSphere()) - shape2 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0) - - initial_condition = intersect(shape1, shape2) - - expected_coords = [0.8 0.75 0.65 0.6 0.65 0.75 0.81361295 0.72410734 0.62907902 0.55029785 0.50581164 0.50581164 0.55029785 0.62907902 0.72410734 0.81361295 0.77364565 0.6752262 0.57949137 0.49681553 0.43615787 0.40409161 0.40409161 0.43615787 0.49681553 0.57949137 0.6752262 0.77364565; - 0.6 0.68660254 0.68660254 0.6 0.51339746 0.51339746 0.76459677 0.79854177 0.78700325 0.73262453 0.64786313 0.55213687 0.46737547 0.41299675 0.40145823 0.43540323 0.89082008 0.89897535 0.874732 0.82071717 0.74278422 0.64937838 0.55062162 0.45721578 0.37928283 0.325268 0.30102465 0.30917992] - @test initial_condition.coordinates ≈ expected_coords - end - - @testset "Rectangle and Low-Res Sphere" begin - shape1 = RectangularShape(0.1, (16, 13), (-0.8, 0.0), density=1.0, - loop_order=:x_first) - shape2 = SphereShape(0.2, 0.35, (0.0, 0.6), 1.0) +# 3D +@testset "Merge InitialConditions 3D" begin + @testset "Rectangular Shapes" begin + shape_1 = RectangularShape(0.1, (3, 4, 2), (-1.0, 1.0, 0.1), 1.0) + shape_2 = RectangularShape(0.05, (3, 4, 5), (-0.5, 0.0, -0.2), 1.0) - initial_condition = intersect(shape1, shape2) + expected_coords = [-1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.9 -0.9 -0.9 -0.9 -0.9 -0.9 -0.9 -0.9 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.8 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.45 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4; + 1.0 1.0 1.1 1.1 1.2 1.2 1.3 1.3 1.0 1.0 1.1 1.1 1.2 1.2 1.3 1.3 1.0 1.0 1.1 1.1 1.2 1.2 1.3 1.3 0.0 0.0 0.0 0.0 0.0 0.05 0.05 0.05 0.05 0.05 0.1 0.1 0.1 0.1 0.1 0.15000000000000002 0.15000000000000002 0.15000000000000002 0.15000000000000002 0.15000000000000002 0.0 0.0 0.0 0.0 0.0 0.05 0.05 0.05 0.05 0.05 0.1 0.1 0.1 0.1 0.1 0.15000000000000002 0.15000000000000002 0.15000000000000002 0.15000000000000002 0.15000000000000002 0.0 0.0 0.0 0.0 0.0 0.05 0.05 0.05 0.05 0.05 0.1 0.1 0.1 0.1 0.1 0.15000000000000002 0.15000000000000002 0.15000000000000002 0.15000000000000002 0.15000000000000002; + 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0 -0.2 -0.15000000000000002 -0.1 -0.04999999999999999 0.0] - expected_coords = [-0.25 -0.25 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.25 0.25; - 0.55 0.65 0.55 0.65 0.35 0.45 0.55 0.65 0.75 0.85 0.35 0.45 0.55 0.65 0.75 0.85 0.55 0.65 0.55 0.65] - @test initial_condition.coordinates ≈ expected_coords - end + initial_condition = InitialCondition(shape_1, shape_2) + @test initial_condition.coordinates ≈ expected_coords end end diff --git a/test/general/interpolation.jl b/test/general/interpolation.jl deleted file mode 100644 index 899e60528..000000000 --- a/test/general/interpolation.jl +++ /dev/null @@ -1,1180 +0,0 @@ -@testset verbose=true "SPH Interpolation" begin - function compare_interpolation_result(actual, expected; tolerance=1e-8) - @test length(actual.density) == length(expected.density) - for i in 1:length(expected.density) - @test actual.neighbor_count[i] == expected.neighbor_count[i] - @test actual.coord[i] == expected.coord[i] - @test isapprox(actual.density[i], expected.density[i], atol=tolerance) || - isnan(actual.density[i]) && isnan(expected.density[i]) - @test isapprox(actual.velocity[i], expected.velocity[i], atol=tolerance) || - all(isnan.(actual.velocity[i])) && all(isnan.(expected.velocity[i])) - @test isapprox(actual.pressure[i], expected.pressure[i], atol=tolerance) || - isnan(actual.pressure[i]) && isnan(expected.pressure[i]) - end - end - - function binary_search_outside(start, end_, func=nothing; tolerance=1e-5) - original_start = start - direction = start <= end_ ? 1 : -1 - - while abs(end_ - start) > tolerance - mid = (start + end_) / 2 - result = func(mid) - - if result.neighbor_count == 0 - end_ = mid - else - start = mid - end - end - - mid_point = (start + end_) / 2 - - if func(mid_point).neighbor_count > 0 - if func(start).neighbor_count == 0 - mid_point = start - else - mid_point = end_ - end - end - - return direction > 0 ? mid_point - original_start : original_start - mid_point - end - - @testset verbose=true "2D" begin - function set_values(coord) - mass = 1.0 - density = 666 - pressure = 2 * coord[2] - velocity = [5 + 3 * coord[1], 0.1 * coord[2]^2 + 0.1] - - return (mass, density, pressure, velocity) - end - - function set_values_bnd(coord) - coord[2] = 0.0 - return set_values(coord) - end - - function expected_result(wall_distance, max_wallheight, neighbor_count) - if wall_distance > max_wallheight - wall_distance = max_wallheight - end - - const_density = 666.0 - const_pressure = 2 * wall_distance - const_velocity = [5, 0.1 * wall_distance^2 + 0.1] - - return (density=const_density, - neighbor_count=neighbor_count, - coord=[0.0, wall_distance], - velocity=const_velocity, - pressure=const_pressure) - end - - nx = 10 - ny = 10 - bnd_nx = nx - bnd_ny = 3 - particle_spacing = 0.2 - wall_height = ny * particle_spacing - 0.5 * particle_spacing - smoothing_length = 1.2 * 0.5 * particle_spacing - smoothing_kernel = SchoenbergCubicSplineKernel{2}() - sound_speed = 10 * sqrt(9.81 * 0.9) - - state_equation = StateEquationCole(; sound_speed, reference_density=1000.0, - exponent=7, clip_negative_pressure=false) - - fluid = rectangular_patch(particle_spacing, (nx, ny), seed=1, - perturbation_factor=0.0, perturbation_factor_position=0.0, - set_function=set_values, - offset=[0.0, ny * 0.5 * particle_spacing]) - bnd = rectangular_patch(particle_spacing, (bnd_nx, bnd_ny), seed=1, - perturbation_factor=0.0, perturbation_factor_position=0.0, - set_function=set_values_bnd, - offset=[0.0, -bnd_ny * 0.5 * particle_spacing]) - - viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) - - fluid_system = WeaklyCompressibleSPHSystem(fluid, ContinuityDensity(), - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - acceleration=(0.0, -9.81)) - - boundary_model = BoundaryModelDummyParticles(bnd.density, bnd.mass, - state_equation=state_equation, - AdamiPressureExtrapolation(), - smoothing_kernel, smoothing_length) - - boundary_system = BoundarySPHSystem(bnd, boundary_model) - - # Overwrite `system.pressure` because we skip the update step - fluid_system.pressure .= fluid.pressure - - u_no_bnd = fluid.coordinates - # Density is integrated with `ContinuityDensity` - v_no_bnd = vcat(fluid.velocity, fluid.density') - - u_bnd = hcat(fluid.coordinates, bnd.coordinates) - v_bnd_velocity = hcat(fluid.velocity, bnd.velocity) - v_bnd_density = vcat(fluid.density, bnd.density) - - v_bnd = vcat(v_bnd_velocity, v_bnd_density') - - semi_no_boundary = Semidiscretization(fluid_system, - neighborhood_search=GridNeighborhoodSearch) - semi_boundary = Semidiscretization(fluid_system, boundary_system, - neighborhood_search=GridNeighborhoodSearch) - - # some simple results - expected_zero(y) = (density=NaN, neighbor_count=0, coord=[0.0, y], - velocity=[NaN, NaN], pressure=NaN) - - for cut_off_bnd in [true, false] - @testset verbose=true "Interpolation Point no boundary - cut_off_bnd = $(cut_off_bnd)" begin - interpolation_walldistance(y) = TrixiParticles.interpolate_point([0.0, y], - semi_no_boundary, - fluid_system, - v_no_bnd, - u_no_bnd, - cut_off_bnd=cut_off_bnd) - - # top outside - distance_top_outside = binary_search_outside(ny * particle_spacing, - (ny + 2) * particle_spacing, - interpolation_walldistance) - @test isapprox(distance_top_outside, 0.11817321777343714, atol=1e-14) - - result_zero = interpolation_walldistance(ny * particle_spacing + - distance_top_outside) - compare_interpolation_result(result_zero, - expected_zero(ny * particle_spacing + - distance_top_outside)) - - result_top_outside = interpolation_walldistance(ny * particle_spacing + - 0.5 * distance_top_outside) - compare_interpolation_result(result_top_outside, - expected_result(ny * particle_spacing + - 0.5 * distance_top_outside, - wall_height, 2)) - - # top at free surface - result_top = interpolation_walldistance(ny * particle_spacing) - compare_interpolation_result(result_top, - expected_result(ny * particle_spacing, - wall_height, - 2)) - - # center - result_center = interpolation_walldistance(ny * 0.5 * particle_spacing) - compare_interpolation_result(result_center, - expected_result(ny * 0.5 * particle_spacing, - wall_height, 5)) - - # at wall - exp_res = (density=665.9999999999999, - neighbor_count=2, - coord=[0.0, 0.0], - velocity=[5.0, 0.16363759578999118], - pressure=0.2) - result_bottom = interpolation_walldistance(0.0) - compare_interpolation_result(result_bottom, exp_res) - - distance_bottom_outside = binary_search_outside(0.0, -2 * particle_spacing, - interpolation_walldistance) - @test isapprox(distance_bottom_outside, 0.1181732177734375, atol=1e-14) - - exp_res = (density=666.0, - neighbor_count=2, - coord=[0.0, -0.5 * distance_bottom_outside], - velocity=[5.0, 0.18100000000000002], - pressure=0.2) - result_bottom_outside = interpolation_walldistance(-0.5 * - distance_bottom_outside) - compare_interpolation_result(result_bottom_outside, exp_res) - - result_zero = interpolation_walldistance(-distance_bottom_outside) - compare_interpolation_result(result_zero, - expected_zero(-distance_bottom_outside)) - - multi_point_coords = [[0.0, 0.0], [0.0, 0.5], [0.0, 1.0]] - - result_multipoint = TrixiParticles.interpolate_point(multi_point_coords, - semi_no_boundary, - fluid_system, - v_no_bnd, u_no_bnd, - cut_off_bnd=cut_off_bnd) - - expected_multi = (density=[666.0, 666.0000000000001, 666.0], - neighbor_count=[2, 6, 5], - coord=[[0.0, 0.0], [0.0, 0.5], [0.0, 1.0]], - velocity=[ - [5.0, 0.10100000000000002], - [5.000000000000001, 0.12501295337729817], - [5.0, 0.20035665520692278], - ], - pressure=[0.19999999999999996, 1.0000000000000002, 2.0]) - - compare_interpolation_result(result_multipoint, expected_multi) - end - @testset verbose=true "Interpolation Line no boundary - cut_off_bnd = $(cut_off_bnd)" begin - result_endpoint = TrixiParticles.interpolate_line([1.0, -0.05], [1.0, 1.0], - 5, semi_no_boundary, - fluid_system, - v_no_bnd, u_no_bnd, - endpoint=true, - cut_off_bnd=cut_off_bnd) - - result = TrixiParticles.interpolate_line([1.0, -0.05], [1.0, 1.0], - 5, semi_no_boundary, - fluid_system, v_no_bnd, u_no_bnd, - endpoint=false, - cut_off_bnd=cut_off_bnd) - - expected_res = (density=[666.0, 666.0, 666.0], neighbor_count=[2, 2, 1], - coord=SVector{2, Float64}[[1.0, 0.2125], - [1.0, 0.47500000000000003], - [1.0, 0.7375]], - velocity=SVector{2, Float64}[[ - 7.699999999999999, - 0.10605429538320173, - ], [7.7, 0.12465095587703466], - [7.7, 0.14900000000000002]], - pressure=[ - 0.4527147691600855, - 0.9912738969258665, - 1.4000000000000001, - ]) - expected_res_end = (density=[666.0, 666.0, 666.0, 666.0, 666.0], - neighbor_count=[1, 2, 2, 1, 1], - coord=SVector{2, Float64}[[1.0, -0.05], [1.0, 0.2125], - [1.0, 0.475], [1.0, 0.7375], - [1.0, 1.0]], - velocity=SVector{2, Float64}[[7.7, 0.10099999999999999], - [ - 7.699999999999999, - 0.10605429538320173, - ], - [ - 7.699999999999999, - 0.12465095587703465, - ], - [7.7, 0.14900000000000002], - [7.7, 0.22100000000000006]], - pressure=[ - 0.19999999999999998, - 0.4527147691600855, - 0.9912738969258663, - 1.4000000000000001, - 2.2, - ]) - - compare_interpolation_result(result, expected_res) - compare_interpolation_result(result_endpoint, expected_res_end) - end - @testset verbose=true "Interpolation Plane no boundary - cut_off_bnd = $(cut_off_bnd)" begin - interpolation_start = [0.0, 0.0] - interpolation_end = [1.0, 1.0] - resolution = 0.25 - - result = interpolate_plane_2d(interpolation_start, interpolation_end, - resolution, semi_no_boundary, - fluid_system, v_no_bnd, u_no_bnd) - - expected_res = (density=[ - 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, - 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, - 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, - 666.0, 666.0, 666.0, 666.0, - ], - neighbor_count=[ - 2, 2, 3, 2, 1, 4, 4, 4, 4, 2, 6, 4, 5, 4, 3, 4, 4, 4, - 3, 1, 5, 4, 6, 3, 1, - ], - coord=SVector{2, Float64}[[0.0, 0.0], [0.25, 0.0], - [0.5, 0.0], [0.75, 0.0], - [1.0, 0.0], [0.0, 0.25], - [0.25, 0.25], [0.5, 0.25], - [0.75, 0.25], [1.0, 0.25], - [0.0, 0.5], [0.25, 0.5], - [0.5, 0.5], [0.75, 0.5], - [1.0, 0.5], [0.0, 0.75], - [0.25, 0.75], [0.5, 0.75], - [0.75, 0.75], [1.0, 0.75], - [0.0, 1.0], [0.25, 1.0], - [0.5, 1.0], [0.75, 1.0], - [1.0, 1.0]], - velocity=SVector{2, Float64}[[5.0, 0.10100000000000002], - [ - 5.844853603211259, - 0.10099999999999999, - ], [6.5, 0.101], - [7.155146396788742, 0.101], - [7.7, 0.101], - [ - 5.000000000000001, - 0.10826471470948347, - ], - [ - 5.8376544066143845, - 0.10816872542152514, - ], - [ - 6.499999999999999, - 0.10807333490890002, - ], - [ - 7.162345593385616, - 0.10816872542152513, - ], - [7.7, 0.10826471470948347], - [ - 5.000000000000001, - 0.12501295337729817, - ], - [ - 5.8305001181675005, - 0.12504927969391108, - ], - [ - 6.499999999999998, - 0.12507142857142856, - ], - [ - 7.1694998818325, - 0.12504927969391108, - ], - [ - 7.700000000000002, - 0.12501295337729815, - ], - [ - 4.999999999999999, - 0.15194114116206617, - ], - [ - 5.837654406614385, - 0.15232509831389957, - ], - [ - 6.500000000000001, - 0.15270666036440003, - ], - [ - 7.160218593182242, - 0.1522116583030529, - ], - [7.7, 0.14900000000000002], - [5.0, 0.20035665520692278], - [5.84485360321126, 0.201], - [6.5, 0.20100000000000004], - [ - 7.128901370428878, - 0.2019633790142959, - ], - [7.7, 0.22100000000000006]], - pressure=[ - 0.19999999999999996, - 0.19999999999999996, - 0.19999999999999996, - 0.19999999999999996, - 0.19999999999999996, - 0.5632357354741733, - 0.5584362710762559, - 0.5536667454449997, - 0.5584362710762559, - 0.5632357354741733, - 1.0000000000000002, - 1.0, 0.9999999999999999, - 0.9999999999999999, - 1.0, 1.436764264525827, - 1.4415637289237442, - 1.4463332545550007, - 1.4401457287881612, - 1.4000000000000001, - 2.0, 2.0, - 2.0, 2.009633790142959, 2.2, - ]) - - compare_interpolation_result(result, expected_res) - - result = interpolate_plane_2d(interpolation_start, interpolation_end, - resolution, semi_no_boundary, fluid_system, - v_no_bnd, u_no_bnd, - smoothing_length=0.5 * smoothing_length) - expected_res = (density=[ - 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, - 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, - 666.0, 666.0, 666.0, 666.0, 666.0, 666.0, - ], - neighbor_count=[ - 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 2, 2, 2, - ], - coord=SVector{2, Float64}[[0.25, 0.0], [0.5, 0.0], - [0.75, 0.0], [0.0, 0.25], - [0.25, 0.25], [0.5, 0.25], - [0.75, 0.25], [1.0, 0.25], - [0.0, 0.5], [0.25, 0.5], - [0.5, 0.5], [0.75, 0.5], - [1.0, 0.5], [0.0, 0.75], - [0.25, 0.75], [0.5, 0.75], - [0.75, 0.75], [1.0, 0.75], - [0.0, 1.0], [0.25, 1.0], - [0.5, 1.0], [0.75, 1.0]], - velocity=SVector{2, Float64}[[5.9, 0.101], - [6.499999999999999, 0.101], - [7.1000000000000005, 0.101], - [ - 4.999999999999994, - 0.10900000000000003, - ], [5.9, 0.10900000000000001], - [6.5, 0.109], - [ - 7.1000000000000005, - 0.10900000000000003, - ], [7.7, 0.10900000000000001], - [4.999999999999998, 0.125], - [5.9, 0.125], [6.5, 0.125], - [7.1, 0.125], [7.7, 0.125], - [ - 4.999999999999995, - 0.14900000000000002, - ], - [ - 5.900000000000001, - 0.14900000000000002, - ], [6.5, 0.14900000000000002], - [ - 7.1000000000000005, - 0.14900000000000002, - ], [7.7, 0.14900000000000002], - [5.0, 0.2], - [ - 5.8999999999999995, - 0.20099999999999962, - ], [6.5, 0.20099999999999985], - [ - 7.100000000000001, - 0.20099999999999968, - ]], - pressure=[ - 0.19999999999999996, - 0.19999999999999996, - 0.19999999999999996, - 0.6000000000000001, - 0.6000000000000001, - 0.6000000000000001, - 0.6000000000000001, - 0.6000000000000001, - 1.0, 1.0, 1.0, 1.0, - 1.0, 1.4000000000000004, - 1.4000000000000001, - 1.4000000000000001, - 1.4000000000000001, - 1.4000000000000001, - 2.0, 1.9999999999999962, - 1.9999999999999984, - 1.9999999999999967, - ]) - - compare_interpolation_result(result, expected_res) - end - end - - for cut_off_bnd in [true, false] - @testset verbose=true "Interpolation Point boundary - cut_off_bnd = $(cut_off_bnd)" begin - interpolation_walldistance(y) = TrixiParticles.interpolate_point([0.0, y], - semi_boundary, - fluid_system, - v_bnd, - u_bnd, - cut_off_bnd=cut_off_bnd) - - # top outside - distance_top_outside = binary_search_outside(ny * particle_spacing, - (ny + 2) * particle_spacing, - interpolation_walldistance) - @test isapprox(distance_top_outside, 0.11817321777343714, atol=1e-14) - - result_zero = interpolation_walldistance(ny * particle_spacing + - distance_top_outside) - compare_interpolation_result(result_zero, - expected_zero(ny * particle_spacing + - distance_top_outside)) - - result_top_outside = interpolation_walldistance(ny * particle_spacing + - 0.5 * distance_top_outside) - compare_interpolation_result(result_top_outside, - expected_result(ny * particle_spacing + - 0.5 * distance_top_outside, - wall_height, 2)) - - # top at free surface - result_top = interpolation_walldistance(ny * particle_spacing) - compare_interpolation_result(result_top, - expected_result(ny * particle_spacing, - wall_height, - 2)) - - # center - result_center = interpolation_walldistance(ny * 0.5 * particle_spacing) - compare_interpolation_result(result_center, - expected_result(ny * 0.5 * particle_spacing, - wall_height, 5)) - - # at wall - result_bottom = interpolation_walldistance(0.0) - if cut_off_bnd - exp_res = (density=666, - neighbor_count=4, - coord=[0.0, 0.0], - velocity=[5.0, 0.16363759578999118], - pressure=0.2) - compare_interpolation_result(result_bottom, exp_res) - else - exp_res = (density=666, - neighbor_count=2, - coord=[0.0, 0.0], - velocity=[5.0, 0.16363759578999118], - pressure=0.2) - compare_interpolation_result(result_bottom, exp_res) - end - - distance_bottom_outside = binary_search_outside(0.0, -2 * particle_spacing, - interpolation_walldistance, - tolerance=1e-12) - if cut_off_bnd - @test isapprox(distance_bottom_outside, 3.637978807091713e-13, - atol=1e-14) - else - @test isapprox(distance_bottom_outside, 0.11817145975473978, atol=1e-14) - end - - result_bottom_outside = interpolation_walldistance(-0.5 * - distance_bottom_outside) - - if cut_off_bnd - compare_interpolation_result(result_bottom_outside, - expected_zero(-0.5 * - distance_bottom_outside)) - else - exp_res = (density=666, - neighbor_count=2, - coord=[0.0, -0.5 * distance_bottom_outside], - velocity=[5.0, 0.16363759578999118], - pressure=0.2) - compare_interpolation_result(result_bottom_outside, exp_res) - end - - result_zero = interpolation_walldistance(-distance_bottom_outside) - compare_interpolation_result(result_zero, - expected_zero(-distance_bottom_outside)) - - multi_point_coords = [[0.0, 0.0], [0.0, 0.5], [0.0, 1.0]] - - result_multipoint = TrixiParticles.interpolate_point(multi_point_coords, - semi_boundary, - fluid_system, - v_bnd, u_bnd, - cut_off_bnd=cut_off_bnd) - if cut_off_bnd - expected_multi = (density=[666.0, 666.0000000000001, 666.0], - neighbor_count=[4, 6, 5], - coord=[[0.0, 0.0], [0.0, 0.5], [0.0, 1.0]], - velocity=[ - [5.0, 0.10100000000000002], - [5.000000000000001, 0.12501295337729817], - [5.0, 0.20035665520692278], - ], - pressure=[ - 0.19999999999999996, - 1.0000000000000002, - 2.0, - ]) - - compare_interpolation_result(result_multipoint, expected_multi) - else - expected_multi = (density=[666.0, 666.0000000000001, 666.0], - neighbor_count=[2, 6, 5], - coord=[[0.0, 0.0], [0.0, 0.5], [0.0, 1.0]], - velocity=[ - [5.0, 0.10100000000000002], - [5.000000000000001, 0.12501295337729817], - [5.0, 0.20035665520692278], - ], - pressure=[ - 0.19999999999999996, - 1.0000000000000002, - 2.0, - ]) - - compare_interpolation_result(result_multipoint, expected_multi) - end - end - @testset verbose=true "Interpolation Line boundary - cut_off_bnd = $(cut_off_bnd)" begin - result_endpoint = TrixiParticles.interpolate_line([1.0, -0.05], [1.0, 1.0], - 5, semi_boundary, - fluid_system, - v_bnd, u_bnd, - endpoint=true, - cut_off_bnd=cut_off_bnd) - - result = TrixiParticles.interpolate_line([1.0, -0.05], [1.0, 1.0], - 5, semi_no_boundary, - fluid_system, v_no_bnd, u_no_bnd, - endpoint=false, - cut_off_bnd=cut_off_bnd) - if cut_off_bnd - expected_res = (density=[666.0, 666.0, 666.0], neighbor_count=[2, 2, 1], - coord=SVector{2, Float64}[[1.0, 0.2125], - [1.0, 0.47500000000000003], - [1.0, 0.7375]], - velocity=SVector{2, Float64}[[ - 7.699999999999999, - 0.10605429538320173, - ], - [7.7, 0.12465095587703466], - [7.7, 0.14900000000000002]], - pressure=[ - 0.4527147691600855, - 0.9912738969258665, - 1.4000000000000001, - ]) - expected_res_end = (density=[ - NaN, - 666.0, - 665.9999999999999, - 666.0, - 666.0, - ], - neighbor_count=[0, 2, 2, 1, 1], - coord=SVector{2, Float64}[[1.0, -0.05], - [1.0, 0.2125], - [1.0, 0.475], - [1.0, 0.7375], - [1.0, 1.0]], - velocity=SVector{2, Float64}[[NaN, NaN], - [ - 7.699999999999999, - 0.10605429538320173, - ], - [ - 7.699999999999999, - 0.12465095587703465, - ], - [ - 7.7, - 0.14900000000000002, - ], - [ - 7.7, - 0.22100000000000006, - ]], - pressure=[ - NaN, - 0.4527147691600855, - 0.9912738969258663, - 1.4000000000000001, - 2.2, - ]) - - compare_interpolation_result(result, expected_res) - compare_interpolation_result(result_endpoint, expected_res_end) - - else - expected_res = (density=[666.0, 666.0, 666.0], neighbor_count=[2, 2, 1], - coord=SVector{2, Float64}[[1.0, 0.2125], - [1.0, 0.47500000000000003], - [1.0, 0.7375]], - velocity=SVector{2, Float64}[[ - 7.699999999999999, - 0.10605429538320173, - ], - [7.7, 0.12465095587703466], - [7.7, 0.14900000000000002]], - pressure=[ - 0.4527147691600855, - 0.9912738969258665, - 1.4000000000000001, - ]) - expected_res_end = (density=[ - 666.0, - 666.0, - 665.9999999999999, - 666.0, - 666.0, - ], neighbor_count=[1, 2, 2, 1, 1], - coord=SVector{2, Float64}[[1.0, -0.05], - [1.0, 0.2125], - [1.0, 0.475], - [1.0, 0.7375], - [1.0, 1.0]], - velocity=SVector{2, Float64}[[ - 7.7, - 0.10099999999999999, - ], - [ - 7.699999999999999, - 0.10605429538320173, - ], - [ - 7.699999999999999, - 0.12465095587703465, - ], - [ - 7.7, - 0.14900000000000002, - ], - [ - 7.7, - 0.22100000000000006, - ]], - pressure=[ - 0.19999999999999998, - 0.4527147691600855, - 0.9912738969258663, - 1.4000000000000001, - 2.2, - ]) - - compare_interpolation_result(result, expected_res) - compare_interpolation_result(result_endpoint, expected_res_end) - end - end - end - end - - @testset verbose=true "3D" begin - function set_values(coord) - mass = 1.0 - density = 666 - pressure = 2 * coord[2] - velocity = [5 + 3 * coord[1], 0.1 * coord[2]^2 + 0.1, coord[3]] - - return (mass, density, pressure, velocity) - end - - function set_values_bnd(coord) - coord[2] = 0.0 - return set_values(coord) - end - - function expected_result(wall_distance, max_wallheight, neighbor_count) - if wall_distance > max_wallheight - wall_distance = max_wallheight - end - - const_density = 666.0 - const_pressure = 2 * wall_distance - const_velocity = [5, 0.1 * wall_distance^2 + 0.1, 0.0] - - return (density=const_density, - neighbor_count=neighbor_count, - coord=[0.0, wall_distance, 0.0], - velocity=const_velocity, - pressure=const_pressure) - end - - nx = 10 - ny = 10 - nz = 10 - bnd_nx = nx - bnd_ny = 3 - bnd_nz = nz - particle_spacing = 0.2 - wall_height = ny * particle_spacing - 0.5 * particle_spacing - smoothing_length = 1.2 * 0.5 * particle_spacing - smoothing_kernel = SchoenbergCubicSplineKernel{3}() - sound_speed = 10 * sqrt(9.81 * 0.9) - - state_equation = StateEquationCole(; sound_speed, reference_density=1000.0, - exponent=7, clip_negative_pressure=false) - - fluid = rectangular_patch(particle_spacing, (nx, ny, nz), seed=1, - perturbation_factor=0.0, perturbation_factor_position=0.0, - set_function=set_values, - offset=[0.0, ny * 0.5 * particle_spacing, 0.0]) - bnd = rectangular_patch(particle_spacing, (bnd_nx, bnd_ny, bnd_nz), seed=1, - perturbation_factor=0.0, perturbation_factor_position=0.0, - set_function=set_values_bnd, - offset=[0.0, -bnd_ny * 0.5 * particle_spacing, 0.0]) - - viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0) - - fluid_system = WeaklyCompressibleSPHSystem(fluid, ContinuityDensity(), - state_equation, smoothing_kernel, - smoothing_length, viscosity=viscosity, - acceleration=(0.0, -9.81, 0.0)) - - boundary_model = BoundaryModelDummyParticles(bnd.density, bnd.mass, - state_equation=state_equation, - AdamiPressureExtrapolation(), - smoothing_kernel, smoothing_length) - - boundary_system = BoundarySPHSystem(bnd, boundary_model) - - # Overwrite `system.pressure` because we skip the update step - fluid_system.pressure .= fluid.pressure - - u_no_bnd = fluid.coordinates - # Density is integrated with `ContinuityDensity` - v_no_bnd = vcat(fluid.velocity, fluid.density') - - u_bnd = hcat(fluid.coordinates, bnd.coordinates) - v_bnd_velocity = hcat(fluid.velocity, bnd.velocity) - v_bnd_density = vcat(fluid.density, bnd.density) - - v_bnd = vcat(v_bnd_velocity, v_bnd_density') - - semi_no_boundary = Semidiscretization(fluid_system, - neighborhood_search=GridNeighborhoodSearch) - semi_boundary = Semidiscretization(fluid_system, boundary_system, - neighborhood_search=GridNeighborhoodSearch) - - # some simple results - expected_zero(y) = (density=NaN, neighbor_count=0, coord=[0.0, y, 0.0], - velocity=[NaN, NaN, NaN], pressure=NaN) - - for cut_off_bnd in [true, false] - @testset verbose=true "Interpolation Point no boundary - cut_off_bnd = $(cut_off_bnd)" begin - interpolation_walldistance(y) = TrixiParticles.interpolate_point([ - 0.0, - y, - 0.0, - ], - semi_no_boundary, - fluid_system, - v_no_bnd, - u_no_bnd, - cut_off_bnd=cut_off_bnd) - - # top outside - distance_top_outside = binary_search_outside(ny * particle_spacing, - (ny + 2) * particle_spacing, - interpolation_walldistance, - tolerance=1e-8) - @test isapprox(distance_top_outside, 0.09390581548213905, atol=1e-14) - - result_zero = interpolation_walldistance(ny * particle_spacing + - distance_top_outside) - - compare_interpolation_result(result_zero, - expected_zero(ny * particle_spacing + - distance_top_outside)) - - result_top_outside = interpolation_walldistance(ny * particle_spacing + - 0.5 * distance_top_outside) - compare_interpolation_result(result_top_outside, - expected_result(ny * particle_spacing + - 0.5 * distance_top_outside, - wall_height, 4)) - - # top at free surface - result_top = interpolation_walldistance(ny * particle_spacing) - compare_interpolation_result(result_top, - expected_result(ny * particle_spacing, - wall_height, - 4)) - - # center - result_center = interpolation_walldistance(ny * 0.5 * particle_spacing) - compare_interpolation_result(result_center, - expected_result(ny * 0.5 * particle_spacing, - wall_height, 9)) - - # at wall - exp_res = (density=665.9999999999999, - neighbor_count=4, - coord=[0.0, 0.0], - velocity=[5.0, 0.16363759578999118], - pressure=0.2) - result_bottom = interpolation_walldistance(0.0) - compare_interpolation_result(result_bottom, exp_res) - - distance_bottom_outside = binary_search_outside(0.0, -2 * particle_spacing, - interpolation_walldistance, - tolerance=1e-12) - @test isapprox(distance_bottom_outside, 0.09390581390689477, atol=1e-14) - - exp_res = (density=666.0, - neighbor_count=4, - coord=[0.0, -0.5 * distance_bottom_outside], - velocity=[5.0, 0.18100000000000002], - pressure=0.2) - result_bottom_outside = interpolation_walldistance(-0.5 * - distance_bottom_outside) - compare_interpolation_result(result_bottom_outside, exp_res) - - result_zero = interpolation_walldistance(-distance_bottom_outside) - compare_interpolation_result(result_zero, - expected_zero(-distance_bottom_outside)) - - multi_point_coords = [[0.0, 0.0, 0.0], [0.0, 0.5, 0.0], [0.0, 1.0, 0.0]] - - result_multipoint = TrixiParticles.interpolate_point(multi_point_coords, - semi_no_boundary, - fluid_system, - v_no_bnd, u_no_bnd, - cut_off_bnd=cut_off_bnd) - - expected_multi = (density=[666.0, 666.0, 666.0], neighbor_count=[4, 4, 9], - coord=[[0.0, 0.0, 0.0], [0.0, 0.5, 0.0], [0.0, 1.0, 0.0]], - velocity=[ - [5.0, 0.101, 0.0], - [5.0, 0.125, 0.0], - [5.0, 0.20025646054622268, 0.0], - ], pressure=[0.19999999999999996, 1.0, 2.0]) - - compare_interpolation_result(result_multipoint, expected_multi) - end - end - - for cut_off_bnd in [true, false] - @testset verbose=true "Interpolation Point boundary - cut_off_bnd = $(cut_off_bnd)" begin - interpolation_walldistance(y) = TrixiParticles.interpolate_point([ - 0.0, - y, - 0.0, - ], - semi_boundary, - fluid_system, - v_no_bnd, - u_no_bnd, - cut_off_bnd=cut_off_bnd) - - # top outside - distance_top_outside = binary_search_outside(ny * particle_spacing, - (ny + 2) * particle_spacing, - interpolation_walldistance) - @test isapprox(distance_top_outside, 0.09390869140624947, atol=1e-14) - - result_zero = interpolation_walldistance(ny * particle_spacing + - distance_top_outside) - compare_interpolation_result(result_zero, - expected_zero(ny * particle_spacing + - distance_top_outside)) - - result_top_outside = interpolation_walldistance(ny * particle_spacing + - 0.5 * distance_top_outside) - compare_interpolation_result(result_top_outside, - expected_result(ny * particle_spacing + - 0.5 * distance_top_outside, - wall_height, 4)) - - # top at free surface - result_top = interpolation_walldistance(ny * particle_spacing) - compare_interpolation_result(result_top, - expected_result(ny * particle_spacing, - wall_height, 4)) - - # center - result_center = interpolation_walldistance(ny * 0.5 * particle_spacing) - compare_interpolation_result(result_center, - expected_result(ny * 0.5 * particle_spacing, - wall_height, 9)) - - # at wall - result_bottom = interpolation_walldistance(0.0) - if cut_off_bnd - exp_res = (density=666, - neighbor_count=8, - coord=[0.0, 0.0], - velocity=[5.0, 0.16363759578999118], - pressure=0.2) - compare_interpolation_result(result_bottom, exp_res) - else - exp_res = (density=666, - neighbor_count=4, - coord=[0.0, 0.0], - velocity=[5.0, 0.16363759578999118], - pressure=0.2) - compare_interpolation_result(result_bottom, exp_res) - end - - distance_bottom_outside = binary_search_outside(0.0, -2 * particle_spacing, - interpolation_walldistance, - tolerance=1e-12) - if cut_off_bnd - @test isapprox(distance_bottom_outside, 3.637978807091713e-13, - atol=1e-14) - else - @test isapprox(distance_bottom_outside, 0.09390581390689477, atol=1e-14) - end - - result_bottom_outside = interpolation_walldistance(-0.5 * - distance_bottom_outside) - - if cut_off_bnd - compare_interpolation_result(result_bottom_outside, - expected_zero(-0.5 * - distance_bottom_outside)) - else - exp_res = (density=666, - neighbor_count=4, - coord=[0.0, -0.5 * distance_bottom_outside], - velocity=[5.0, 0.16363759578999118], - pressure=0.2) - compare_interpolation_result(result_bottom_outside, exp_res) - end - - result_zero = interpolation_walldistance(-distance_bottom_outside) - compare_interpolation_result(result_zero, - expected_zero(-distance_bottom_outside)) - - multi_point_coords = [[0.0, 0.0, 0.0], [0.0, 0.5, 0.0], [0.0, 1.0, 0.0]] - - result_multipoint = TrixiParticles.interpolate_point(multi_point_coords, - semi_no_boundary, - fluid_system, - v_no_bnd, u_no_bnd, - cut_off_bnd=cut_off_bnd) - - expected_multi = (density=[666.0, 666.0, 666.0], neighbor_count=[4, 4, 9], - coord=[[0.0, 0.0, 0.0], [0.0, 0.5, 0.0], [0.0, 1.0, 0.0]], - velocity=[ - [5.0, 0.101, 0.0], - [5.0, 0.125, 0.0], - [5.0, 0.20025646054622268, 0.0], - ], pressure=[0.19999999999999996, 1.0, 2.0]) - - compare_interpolation_result(result_multipoint, expected_multi) - end - - @testset verbose=true "Interpolation Plane no boundary - cut_off_bnd = $(cut_off_bnd)" begin - p1 = [0.0, 0.0, 0.0] - p2 = [1.0, 1.0, 0.0] - p3 = [0.0, 1.0, 0.0] - resolution = 0.5 - - result = interpolate_plane_3d(p1, p2, p3, - resolution, semi_no_boundary, - fluid_system, v_no_bnd, u_no_bnd) - - expected_res = (density=[ - 666.0, - 666.0, - 666.0, - 666.0, - 666.0, - 666.0, - 666.0, - 666.0, - 666.0, - 666.0, - 666.0, - 666.0, - ], neighbor_count=[4, 4, 9, 6, 8, 6, 6, 8, 6, 4, 2, 1], - coord=SVector{3, Float64}[[0.0, 0.0, 0.0], [0.0, 0.5, 0.0], - [0.0, 1.0, 0.0], - [ - 0.3333333333333333, - 0.3333333333333333, - 0.0, - ], - [ - 0.3333333333333333, - 0.8333333333333333, - 0.0, - ], - [ - 0.3333333333333333, - 1.3333333333333333, - 0.0, - ], - [ - 0.6666666666666666, - 0.6666666666666666, - 0.0, - ], - [ - 0.6666666666666666, - 1.1666666666666665, - 0.0, - ], - [ - 0.6666666666666666, - 1.6666666666666665, - 0.0, - ], [1.0, 1.0, 0.0], - [1.0, 1.5, 0.0], [1.0, 2.0, 0.0]], - velocity=SVector{3, Float64}[[ - 5.0, - 0.101, - -8.637243445401583e-17, - ], - [ - 5.0, - 0.125, - -7.070877847937661e-17, - ], - [ - 5.0, - 0.20025646054622268, - -2.2734045974413372e-17, - ], - [ - 5.920251592989799, - 0.10954004247972798, - -7.466540216672048e-17, - ], - [ - 5.912901655029027, - 0.1752639260703962, - -8.888366469079487e-17, - ], - [ - 5.920251592989798, - 0.2708901486790478, - -5.308243435290283e-17, - ], - [ - 7.079748407010201, - 0.14818993628040808, - -7.466540216672064e-17, - ], - [ - 7.087098344970975, - 0.22960411089440566, - -8.19920883032382e-17, - ], - [ - 7.079748407010202, - 0.38683983008108835, - -1.119981032500812e-16, - ], - [ - 7.699999999999998, - 0.20099999999999996, - -1.2273977527675892e-16, - ], - [ - 7.700000000000001, - 0.32500000000000007, - -6.222372506185122e-17, - ], - [ - 7.699999999999999, - 0.4610000000000001, - 0.10000000000000009, - ]], - pressure=[ - 0.19999999999999996, - 1.0, - 2.0, - 0.6135010619931992, - 1.728299075879952, - 2.6135010619931984, - 1.386498938006801, - 2.2717009241200476, - 3.386498938006801, - 1.9999999999999998, - 3.0000000000000004, - 3.8000000000000003, - ]) - - compare_interpolation_result(result, expected_res) - end - end - end -end diff --git a/test/general/neighborhood_search.jl b/test/general/neighborhood_search.jl new file mode 100644 index 000000000..42f0ead98 --- /dev/null +++ b/test/general/neighborhood_search.jl @@ -0,0 +1,142 @@ +@testset verbose=true "Neighborhood Search" begin + @testset verbose=true "TrivialNeighborhoodSearch" begin + # Setup with 5 particles + nhs = TrixiParticles.TrivialNeighborhoodSearch(Base.OneTo(5)) + + # Get each neighbor for arbitrary coordinates + neighbors = collect(TrixiParticles.eachneighbor([1.0, 2.0], nhs)) + + #### Verification + @test neighbors == [1, 2, 3, 4, 5] + end + + @testset verbose=true "SpatialHashingSearch" begin + @testset "Coordinate Limits" begin + # Test the threshold for very large and very small coordinates. + nhs = SpatialHashingSearch{2}(1.0, 0) + coords1 = [Inf, -Inf] + coords2 = [NaN, 0] + coords3 = [typemax(Int) + 1.0, -typemax(Int) - 1.0] + + @test TrixiParticles.cell_coords(coords1, nhs) == (typemax(Int), typemin(Int)) + @test TrixiParticles.cell_coords(coords2, nhs) == (typemax(Int), 0) + @test TrixiParticles.cell_coords(coords3, nhs) == (typemax(Int), typemin(Int)) + end + + @testset "Rectangular Point Cloud 2D" begin + #### Setup + # Rectangular filled with equidistant spaced particles + # from (x, y) = (-0.25, -0.25) to (x, y) = (0.35, 0.35) + range = -0.25:0.1:0.35 + coordinates1 = hcat(collect.(Iterators.product(range, range))...) + nparticles = size(coordinates1, 2) + + particle_position1 = [0.05, 0.05] + particle_spacing = 0.1 + radius = particle_spacing + + # Create neighborhood search + nhs1 = SpatialHashingSearch{2}(radius, nparticles) + + coords_fun(i) = coordinates1[:, i] + TrixiParticles.initialize!(nhs1, coords_fun) + + # Get each neighbor for `particle_position1` + neighbors1 = sort(collect(TrixiParticles.eachneighbor(particle_position1, nhs1))) + + # Move particles + coordinates2 = coordinates1 .+ [1.4, -3.5] + + # Update neighborhood search + coords_fun2(i) = coordinates2[:, i] + TrixiParticles.update!(nhs1, coords_fun2) + + # Get each neighbor for updated NHS + neighbors2 = sort(collect(TrixiParticles.eachneighbor(particle_position1, nhs1))) + + # Change position + particle_position2 = particle_position1 .+ [1.4, -3.5] + + # Get each neighbor for `particle_position2` + neighbors3 = sort(collect(TrixiParticles.eachneighbor(particle_position2, nhs1))) + + # Double search radius + nhs2 = SpatialHashingSearch{2}(2 * radius, size(coordinates1, 2)) + TrixiParticles.initialize!(nhs2, coords_fun) + + # Get each neighbor in double search radius + neighbors4 = sort(collect(TrixiParticles.eachneighbor(particle_position1, nhs2))) + + # Move particles + coordinates2 = coordinates1 .+ [0.4, -0.4] + + # Update neighborhood search + TrixiParticles.update!(nhs2, coords_fun2) + + # Get each neighbor in double search radius + neighbors5 = sort(collect(TrixiParticles.eachneighbor(particle_position1, nhs2))) + + #### Verification + @test neighbors1 == [17, 18, 19, 24, 25, 26, 31, 32, 33] + + @test neighbors2 == Int[] + + @test neighbors3 == [17, 18, 19, 24, 25, 26, 31, 32, 33] + + @test neighbors4 == [9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, + 26, 27, 28, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, + 48, 49] + + @test neighbors5 == [36, 37, 38, 43, 44, 45] + end + + @testset "Rectangular Point Cloud 3D" begin + #### Setup + # Rectangular filled with equidistant spaced particles + # from (x, y, z) = (-0.25, -0.25, -0.25) to (x, y) = (0.35, 0.35, 0.35) + range = -0.25:0.1:0.35 + coordinates1 = hcat(collect.(Iterators.product(range, range, range))...) + nparticles = size(coordinates1, 2) + + particle_position1 = [0.05, 0.05, 0.05] + particle_spacing = 0.1 + radius = particle_spacing + + # Create neighborhood search + nhs1 = SpatialHashingSearch{3}(radius, nparticles) + + coords_fun(i) = coordinates1[:, i] + TrixiParticles.initialize!(nhs1, coords_fun) + + # Get each neighbor for `particle_position1` + neighbors1 = sort(collect(TrixiParticles.eachneighbor(particle_position1, nhs1))) + + # Move particles + coordinates2 = coordinates1 .+ [1.4, -3.5, 0.8] + + # Update neighborhood search + coords_fun2(i) = coordinates2[:, i] + TrixiParticles.update!(nhs1, coords_fun2) + + # Get each neighbor for updated NHS + neighbors2 = sort(collect(TrixiParticles.eachneighbor(particle_position1, nhs1))) + + # Change position + particle_position2 = particle_position1 .+ [1.4, -3.5, 0.8] + + # Get each neighbor for `particle_position2` + neighbors3 = sort(collect(TrixiParticles.eachneighbor(particle_position2, nhs1))) + + #### Verification + @test neighbors1 == + [115, 116, 117, 122, 123, 124, 129, 130, 131, 164, 165, 166, 171, 172, + 173, 178, 179, 180, 213, 214, 215, 220, 221, 222, 227, 228, 229] + + @test neighbors2 == Int[] + + @test neighbors3 == + [115, 116, 117, 122, 123, 124, 129, 130, 131, 164, 165, 166, 171, 172, + 173, 178, 179, 180, 213, 214, 215, 220, 221, 222, 227, 228, 229] + end + end +end diff --git a/test/general/semidiscretization.jl b/test/general/semidiscretization.jl deleted file mode 100644 index 457b5b84d..000000000 --- a/test/general/semidiscretization.jl +++ /dev/null @@ -1,151 +0,0 @@ -# Use `@trixi_testset` to isolate the mock functions in a separate namespace -@trixi_testset "Semidiscretization" begin - # Mock systems. `System1` will use the CPU backend, `System2` is a `GPUSystem`, using - # the GPU backend (emulated on the CPU). - struct System1 <: TrixiParticles.System{3, String} end - struct System2 <: TrixiParticles.System{3, Nothing} end - - # `System2` has no field `mass`, so we have to manually define the backend - function TrixiParticles.KernelAbstractions.get_backend(::System2) - return TrixiParticles.KernelAbstractions.CPU() - end - - system1 = System1() - system2 = System2() - - TrixiParticles.u_nvariables(::System1) = 3 - TrixiParticles.u_nvariables(::System2) = 4 - TrixiParticles.v_nvariables(::System1) = 3 - TrixiParticles.v_nvariables(::System2) = 2 - TrixiParticles.nparticles(::System1) = 2 - TrixiParticles.nparticles(::System2) = 3 - TrixiParticles.n_moving_particles(::System1) = 2 - TrixiParticles.n_moving_particles(::System2) = 3 - - TrixiParticles.compact_support(::System1, neighbor) = 0.2 - TrixiParticles.compact_support(::System2, neighbor) = 0.2 - - @testset verbose=true "Constructor" begin - semi = Semidiscretization(system1, system2, neighborhood_search=nothing) - - # Verification - @test semi.ranges_u == (1:6, 7:18) - @test semi.ranges_v == (1:6, 7:12) - - nhs = ((TrixiParticles.TrivialNeighborhoodSearch{3}(0.2, Base.OneTo(2)), - TrixiParticles.TrivialNeighborhoodSearch{3}(0.2, Base.OneTo(3))), - (TrixiParticles.TrivialNeighborhoodSearch{3}(0.2, Base.OneTo(2)), - TrixiParticles.TrivialNeighborhoodSearch{3}(0.2, Base.OneTo(3)))) - @test semi.neighborhood_searches == nhs - end - - @testset verbose=true "Check Configuration" begin - @testset verbose=true "Solid-Fluid Interaction" begin - # Mock boundary model - struct BoundaryModelMock end - - # Mock fluid system - struct FluidSystemMock <: TrixiParticles.FluidSystem{2, Nothing} end - - kernel = Val(:smoothing_kernel) - Base.ndims(::Val{:smoothing_kernel}) = 2 - - ic = InitialCondition(; particle_spacing=1.0, coordinates=ones(2, 2), - density=[1.0, 1.0]) - - fluid_system = FluidSystemMock() - model_a = BoundaryModelMock() - model_b = BoundaryModelDummyParticles([1.0], [1.0], ContinuityDensity(), kernel, - 1.0) - - # FSI without boundary model. - solid_system1 = TotalLagrangianSPHSystem(ic, kernel, 1.0, 1.0, 1.0) - - error_str = "a boundary model for `TotalLagrangianSPHSystem` must be " * - "specified when simulating a fluid-structure interaction." - @test_throws ArgumentError(error_str) Semidiscretization(fluid_system, - solid_system1, - neighborhood_search=nothing) - - # FSI with boundary model - solid_system2 = TotalLagrangianSPHSystem(ic, kernel, 1.0, 1.0, 1.0, - boundary_model=model_a) - - @test_nowarn TrixiParticles.check_configuration((solid_system2, fluid_system)) - - # FSI with wrong boundary model - solid_system3 = TotalLagrangianSPHSystem(ic, kernel, 1.0, 1.0, 1.0, - boundary_model=model_b) - - error_str = "`BoundaryModelDummyParticles` with density calculator " * - "`ContinuityDensity` is not yet supported for a `TotalLagrangianSPHSystem`" - @test_throws ArgumentError(error_str) Semidiscretization(solid_system3, - fluid_system, - neighborhood_search=nothing) - end - - @testset verbose=true "WCSPH-Boundary Interaction" begin - kernel = SchoenbergCubicSplineKernel{2}() - ic = InitialCondition(; particle_spacing=1.0, coordinates=ones(2, 2), - density=[1.0, 1.0]) - - boundary_model = BoundaryModelDummyParticles(ic.density, ic.mass, - SummationDensity(), kernel, 1.0) - boundary_system = BoundarySPHSystem(ic, boundary_model) - fluid_system = WeaklyCompressibleSPHSystem(ic, SummationDensity(), nothing, - kernel, 1.0) - - error_str = "`WeaklyCompressibleSPHSystem` cannot be used without setting a " * - "`state_equation` for all boundary models" - @test_throws ArgumentError(error_str) Semidiscretization(fluid_system, - boundary_system) - end - end - - @testset verbose=true "`show`" begin - semi = Semidiscretization(system1, system2, neighborhood_search=nothing) - - show_compact = "Semidiscretization($System1(), $System2(), neighborhood_search=TrivialNeighborhoodSearch)" - @test repr(semi) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ Semidiscretization │ - │ ══════════════════ │ - │ #spatial dimensions: ………………………… 3 │ - │ #systems: ……………………………………………………… 2 │ - │ neighborhood search: ………………………… TrivialNeighborhoodSearch │ - │ total #particles: ………………………………… 5 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", semi) == show_box - end - - @testset verbose=true "Source Terms" begin - TrixiParticles.source_terms(::System1) = SourceTermDamping(damping_coefficient=0.1) - TrixiParticles.particle_density(v, system::System1, particle) = 0.0 - TrixiParticles.particle_pressure(v, system::System1, particle) = 0.0 - - semi = Semidiscretization(system1, system2, neighborhood_search=nothing) - - dv_ode = zeros(3 * 2 + 2 * 3) - du_ode = zeros(3 * 2 + 4 * 3) - u_ode = zero(du_ode) - - v1 = [1.0 2.0 - 3.0 4.0 - 5.0 6.0] - v2 = zeros(4 * 3) - v_ode = vcat(vec(v1), v2) - - # Avoid `SystemBuffer` barrier - TrixiParticles.each_moving_particle(system::Union{System1, System2}) = TrixiParticles.eachparticle(system) - - TrixiParticles.add_source_terms!(dv_ode, v_ode, u_ode, semi) - - dv1 = TrixiParticles.wrap_v(dv_ode, system1, semi) - @test dv1 == -0.1 * v1 - - dv2 = TrixiParticles.wrap_v(dv_ode, system2, semi) - @test iszero(dv2) - end -end diff --git a/test/general/smoothing_kernels.jl b/test/general/smoothing_kernels.jl deleted file mode 100644 index 18f98f117..000000000 --- a/test/general/smoothing_kernels.jl +++ /dev/null @@ -1,93 +0,0 @@ -@testset verbose=true "Smoothing Kernels" begin - # Don't show all kernel tests in the final overview - @testset verbose=false "Integral" begin - # All smoothing kernels should integrate to something close to 1 - function integrate_kernel_2d(smk) - integral_2d_radial, _ = quadgk(r -> r * TrixiParticles.kernel(smk, r, 1.0), 0, - TrixiParticles.compact_support(smk, 1.0), - rtol=1e-15) - return 2 * pi * integral_2d_radial - end - - function integrate_kernel_3d(smk) - integral_3d_radial, _ = quadgk(r -> r^2 * TrixiParticles.kernel(smk, r, 1.0), 0, - TrixiParticles.compact_support(smk, 1.0), - rtol=1e-15) - return 4 * pi * integral_3d_radial - end - - # Treat the truncated Gaussian kernel separately - @testset "GaussianKernel" begin - error_2d = abs(integrate_kernel_2d(GaussianKernel{2}()) - 1.0) - error_3d = abs(integrate_kernel_3d(GaussianKernel{3}()) - 1.0) - - # Large error due to truncation - @test 1e-4 < error_2d < 1e-3 - @test 1e-4 < error_3d < 1e-3 - end - - # All other kernels - kernels = [ - SchoenbergCubicSplineKernel, - SchoenbergQuarticSplineKernel, - SchoenbergQuinticSplineKernel, - WendlandC2Kernel, - WendlandC4Kernel, - WendlandC6Kernel, - SpikyKernel, - Poly6Kernel, - ] - - @testset "$kernel" for kernel in kernels - # The integral should be 1 for all kernels - error_2d = abs(integrate_kernel_2d(kernel{2}()) - 1.0) - error_3d = abs(integrate_kernel_3d(kernel{3}()) - 1.0) - - @test error_2d <= 1e-15 - @test error_3d <= 1e-15 - end - end - - # Don't show all kernel tests in the final overview - @testset verbose=false "Kernel Derivative" begin - # Test `kernel_deriv` against automatic differentiation of `kernel` - kernels = [ - GaussianKernel, - SchoenbergCubicSplineKernel, - SchoenbergQuarticSplineKernel, - SchoenbergQuinticSplineKernel, - WendlandC2Kernel, - WendlandC4Kernel, - WendlandC6Kernel, - SpikyKernel, - Poly6Kernel, - ] - - # Test 4 different smoothing lengths - smoothing_lengths = 0.25:0.25:1 - - @testset "$kernel_type" for kernel_type in kernels - for ndims in 2:3 - kernel_ = kernel_type{ndims}() - - for h in smoothing_lengths - # Test 11 different radii - radii = 0:(0.1h):(h + eps()) - - for r in radii - # Automatic differentation of `kernel` - fun = x -> TrixiParticles.kernel(kernel_, x, h) - automatic_deriv = TrixiParticles.ForwardDiff.derivative(fun, r) - - # Analytical derivative with `kernel_deriv` - analytic_deriv = TrixiParticles.kernel_deriv(kernel_, r, h) - - # This should work with very tight tolerances - @test isapprox(analytic_deriv, automatic_deriv, - rtol=5e-15, atol=2eps()) - end - end - end - end - end -end diff --git a/test/rectangular_patch.jl b/test/rectangular_patch.jl deleted file mode 100644 index e18e61973..000000000 --- a/test/rectangular_patch.jl +++ /dev/null @@ -1,47 +0,0 @@ -# Rectangular patch of particles, optionally with a perturbation in position and/or quantities -function rectangular_patch(particle_spacing, size; density=1000.0, pressure=0.0, seed=1, - perturbation_factor=1.0, perturbation_factor_position=1.0, - set_function=nothing, offset=ntuple(_ -> 0.0, length(size))) - # Fixed seed to ensure reproducibility - Random.seed!(seed) - - # Center particle at the origin (assuming odd size) - min_corner = -particle_spacing / 2 .* size - ic = RectangularShape(particle_spacing, size, min_corner, - density=density, pressure=pressure) - - perturb!(ic.coordinates, perturbation_factor_position * 0.5 * particle_spacing) - - # Don't perturb center particle position - center_particle = ceil(Int, prod(size) / 2) - ic.coordinates[:, center_particle] .= 0.0 - - for i in 1:Base.size(ic.coordinates, 2) - ic.coordinates[:, i] .+= offset - end - - if set_function !== nothing - for i in 1:Base.size(ic.coordinates, 2) - coord = ic.coordinates[:, i] - ic.mass[i], ic.density[i], ic.pressure[i], ic.velocity[:, i] = set_function(coord) - end - end - - if perturbation_factor > eps() - perturb!(ic.mass, perturbation_factor * 0.1 * ic.mass[1]) - perturb!(ic.density, perturbation_factor * 0.1 * density) - perturb!(ic.pressure, perturbation_factor * 2000) - perturb!(ic.velocity, perturbation_factor * 0.5 * particle_spacing) - end - - return ic -end - -function perturb!(data, amplitude) - for i in eachindex(data) - # Perturbation in the interval (-amplitude, amplitude) - data[i] += 2 * amplitude * rand() - amplitude - end - - return data -end diff --git a/test/runtests.jl b/test/runtests.jl index 9c732c77b..e242526c2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -9,6 +9,5 @@ const TRIXIPARTICLES_TEST = lowercase(get(ENV, "TRIXIPARTICLES_TEST", "all")) if TRIXIPARTICLES_TEST in ("all", "examples") include("examples/examples.jl") - include("validation/validation.jl") end end; diff --git a/test/schemes/boundary/dummy_particles/dummy_particles.jl b/test/schemes/boundary/dummy_particles/dummy_particles.jl deleted file mode 100644 index 5dbd7c0a3..000000000 --- a/test/schemes/boundary/dummy_particles/dummy_particles.jl +++ /dev/null @@ -1,140 +0,0 @@ -@testset verbose=true "Dummy Particles" begin - @testset "show" begin - boundary_model = BoundaryModelDummyParticles([1000.0], [1.0], - SummationDensity(), - SchoenbergCubicSplineKernel{2}(), 0.1) - - show_compact = "BoundaryModelDummyParticles(SummationDensity, Nothing)" - @test repr(boundary_model) == show_compact - end - - @testset "Viscosity Adami: Wall Velocity" begin - particle_spacing = 0.1 - - # Boundary particles in fluid compact support - boundary_1 = RectangularShape(particle_spacing, (10, 1), (0.0, 0.2), density=257.0) - boundary_2 = RectangularShape(particle_spacing, (10, 1), (0.0, 0.1), density=257.0) - - # Boundary particles out of fluid compact support - boundary_3 = RectangularShape(particle_spacing, (10, 1), (0, 0), density=257.0) - - boundary = union(boundary_1, boundary_2, boundary_3) - - particles_in_compact_support = length(boundary_1.mass) + length(boundary_2.mass) - - fluid = RectangularShape(particle_spacing, (16, 5), (-0.3, 0.3), density=257.0, - loop_order=:x_first) - - smoothing_kernel = SchoenbergCubicSplineKernel{2}() - smoothing_length = 1.2 * particle_spacing - viscosity = ViscosityAdami(nu=1e-6) - state_equation = StateEquationCole(sound_speed=10, reference_density=257, - exponent=7) - - boundary_model = BoundaryModelDummyParticles(boundary.density, boundary.mass, - state_equation=state_equation, - AdamiPressureExtrapolation(), - smoothing_kernel, smoothing_length, - viscosity=viscosity) - - boundary_system = BoundarySPHSystem(boundary, boundary_model) - - fluid_system = WeaklyCompressibleSPHSystem(fluid, SummationDensity(), - state_equation, - smoothing_kernel, smoothing_length) - - neighborhood_search = TrixiParticles.TrivialNeighborhoodSearch{2}(1.0, - TrixiParticles.eachparticle(fluid_system)) - - velocities = [[0; -1], [1; 1], [-1; 0], [0.7; 0.2], [0.3; 0.8]] - - @testset "Wall Velocity $v_fluid" for v_fluid in velocities - viscosity = boundary_system.boundary_model.viscosity - volume = boundary_system.boundary_model.cache.volume - - TrixiParticles.reset_cache!(boundary_system.boundary_model.cache, - boundary_system.boundary_model.viscosity) - TrixiParticles.adami_pressure_extrapolation!(boundary_model, boundary_system, - fluid_system, boundary.coordinates, - fluid.coordinates, - v_fluid .* - ones(size(fluid.coordinates)), - neighborhood_search) - - for particle in TrixiParticles.eachparticle(boundary_system) - if volume[particle] > eps() - TrixiParticles.compute_wall_velocity!(viscosity, boundary_system, - boundary.coordinates, particle) - end - end - - v_wall = zeros(size(boundary.coordinates)) - v_wall[:, 1:particles_in_compact_support] .= -v_fluid - - @test isapprox(boundary_system.boundary_model.cache.wall_velocity, v_wall) - end - - scale_v = [1, 0.5, 0.7, 1.8, 67.5] - @testset "Wall Velocity Staggerd: Factor $scale" for scale in scale_v - viscosity = boundary_system.boundary_model.viscosity - volume = boundary_system.boundary_model.cache.volume - - # For a constant velocity profile (each fluid particle has the same velocity) - # the wall velocity is `v_wall = -v_fluid` (see eq. 22 in Adami_2012). - # Thus, generate a staggered velocity profile to test the smoothed velocity field - # for a variable velocity profile. - v_fluid = zeros(size(fluid.coordinates)) - for i in TrixiParticles.eachparticle(fluid_system) - if mod(i, 2) == 1 - v_fluid[:, i] .= scale - end - end - - TrixiParticles.reset_cache!(boundary_system.boundary_model.cache, - boundary_system.boundary_model.viscosity) - TrixiParticles.adami_pressure_extrapolation!(boundary_model, boundary_system, - fluid_system, boundary.coordinates, - fluid.coordinates, v_fluid, - neighborhood_search) - - for particle in TrixiParticles.eachparticle(boundary_system) - if volume[particle] > eps() - TrixiParticles.compute_wall_velocity!(viscosity, boundary_system, - boundary.coordinates, particle) - end - end - - v_wall = zeros(size(boundary.coordinates)) - - # First boundary row - for i in 1:length(boundary_1.mass) - if mod(i, 2) == 1 - - # Particles with a diagonal distance to a fluid particle with `v_fluid > 0.0` - v_wall[:, i] .= -0.42040669416720744 * scale - else - - # Particles with a orthogonal distance to a fluid particle with `v_fluid > 0.0` - v_wall[:, i] .= -0.5795933058327924 * scale - end - end - - # Second boundary row - for i in (length(boundary_1.mass) + 1):particles_in_compact_support - if true == mod(i, 2) - - # Particles with a diagonal distance to a fluid particle with `v_fluid > 0.0` - v_wall[:, i] .= -0.12101100073462243 * scale - else - - # Particles with a orthogonal distance to a fluid particle with `v_fluid > 0.0` - v_wall[:, i] .= -0.8789889992653775 * scale - end - end - - @test isapprox(boundary_system.boundary_model.cache.wall_velocity, v_wall) - end - end -end - -include("rhs.jl") diff --git a/test/schemes/boundary/dummy_particles/rhs.jl b/test/schemes/boundary/dummy_particles/rhs.jl deleted file mode 100644 index b3eb0d365..000000000 --- a/test/schemes/boundary/dummy_particles/rhs.jl +++ /dev/null @@ -1,307 +0,0 @@ -@testset verbose=true "Dummy Particles RHS" begin - # This is a more complicated version of the total energy preservation test in - # `test/schemes/fluid/weakly_compressible_sph/rhs.jl`. See the comments there. - # - # Note that this only works for boundary models where the potential energy is included - # in the internal energy. For repulsive boundary particles (Monghan-Kajtar), this does - # not work. A fluid particle close to a repulsive particle has a high potential energy - # that will be converted to kinetic energy when running a simulation. - # In order to make this test work, we would have to calculate this potential energy - # somehow. The same holds for `PressureMirroring`. - # For `AdamiPressureExtrapolation`, we would have to calculate a complicated derivative - # of the boundary particle density. - @testset verbose=true "Momentum and Total Energy Conservation" begin - # We are testing the momentum conservation of SPH with random initial configurations - density_calculators = [ContinuityDensity(), SummationDensity()] - - # Create several neighbor systems to test fluid-neighbor interaction - function second_systems(initial_condition, density_calculator, state_equation, - smoothing_kernel, smoothing_length) - second_fluid_system = WeaklyCompressibleSPHSystem(initial_condition, - density_calculator, - state_equation, - smoothing_kernel, - smoothing_length) - - # Overwrite `second_fluid_system.pressure` because we skip the update step - second_fluid_system.pressure .= initial_condition.pressure - - u_fluid = initial_condition.coordinates - if density_calculator isa SummationDensity - # Density is stored in the cache - v_fluid = initial_condition.velocity - second_fluid_system.cache.density .= initial_condition.density - else - # Density is integrated with `ContinuityDensity` - v_fluid = vcat(initial_condition.velocity, initial_condition.density') - end - - # Boundary systems. - # Note that we don't need to explicitly test dummy - # particles with `SummationDensity` and `AdamiPressureExtrpolation`, - # since the same code will be run as for `ContinuityDensity`. - # The advantage of `ContinuityDensity` is that the density will be - # perturbed without having to run a summation or Adami update step. - boundary_model_zeroing = BoundaryModelDummyParticles(initial_condition.density, - initial_condition.mass, - PressureZeroing(), - smoothing_kernel, - smoothing_length) - boundary_system_zeroing = BoundarySPHSystem(initial_condition, - boundary_model_zeroing) - boundary_model_continuity = BoundaryModelDummyParticles(initial_condition.density, - initial_condition.mass, - ContinuityDensity(), - smoothing_kernel, - smoothing_length) - # Overwrite `boundary_model_continuity.pressure` because we skip the update step - boundary_model_continuity.pressure .= initial_condition.pressure - boundary_system_continuity = BoundarySPHSystem(initial_condition, - boundary_model_continuity) - - boundary_model_summation = BoundaryModelDummyParticles(initial_condition.density, - initial_condition.mass, - SummationDensity(), - smoothing_kernel, - smoothing_length) - # Overwrite `boundary_model_summation.pressure` because we skip the update step - boundary_model_summation.pressure .= initial_condition.pressure - # Density is stored in the cache - boundary_model_summation.cache.density .= initial_condition.density - boundary_system_summation = BoundarySPHSystem(initial_condition, - boundary_model_summation) - - u_boundary = zeros(0, TrixiParticles.nparticles(initial_condition)) - v_boundary = zeros(0, TrixiParticles.nparticles(initial_condition)) - - v_boundary_continuity = copy(initial_condition.density') - - # TLSPH system - solid_system = TotalLagrangianSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, 0.0, 0.0, - boundary_model=boundary_model_continuity) - - # Positions of the solid particles are not used here - u_solid = zeros(0, TrixiParticles.nparticles(solid_system)) - v_solid = vcat(initial_condition.velocity, - initial_condition.density') - - systems = Dict( - "Fluid-Fluid" => second_fluid_system, - "Fluid-BoundaryDummyPressureZeroing" => boundary_system_zeroing, - "Fluid-BoundaryDummyContinuityDensity" => boundary_system_continuity, - "Fluid-TLSPH" => solid_system, - ) - - if density_calculator isa SummationDensity - # Dummy particles with `SummationDensity` will only pass energy preservation - # if the fluid is also using `SummationDensity`. - systems["Fluid-BoundaryDummySummationDensity"] = boundary_system_summation - end - - vu = Dict( - "Fluid-Fluid" => (v_fluid, u_fluid), - "Fluid-BoundaryDummyPressureZeroing" => (v_boundary, u_boundary), - "Fluid-BoundaryDummyContinuityDensity" => (v_boundary_continuity, - u_boundary), - "Fluid-BoundaryDummySummationDensity" => (v_boundary, u_boundary), - "Fluid-TLSPH" => (v_solid, u_solid), - ) - - return systems, vu - end - - particle_spacing = 0.1 - - # The state equation is only needed to unpack `sound_speed`, so we can mock - # it by using a `NamedTuple`. - state_equation = (; sound_speed=0.0) - smoothing_kernel = SchoenbergCubicSplineKernel{2}() - smoothing_length = 1.2particle_spacing - search_radius = TrixiParticles.compact_support(smoothing_kernel, smoothing_length) - - @testset "`$(nameof(typeof(density_calculator)))`" for density_calculator in density_calculators - # Run three times with different seed for the random initial condition - for seed in 1:3 - # A larger number of particles will increase accumulated errors in the - # summation. A larger tolerance will have to be used for the tests below. - ic = rectangular_patch(particle_spacing, (3, 3), seed=seed) - - # Split initial condition at center particle into two systems - center_particle = ceil(Int, TrixiParticles.nparticles(ic) / 2) - fluid = InitialCondition{ndims(ic)}(ic.coordinates[:, 1:center_particle], - ic.velocity[:, 1:center_particle], - ic.mass[1:center_particle], - ic.density[1:center_particle], - ic.pressure[1:center_particle], - ic.particle_spacing) - - boundary = InitialCondition{ndims(ic)}(ic.coordinates[:, - (center_particle + 1):end], - ic.velocity[:, - (center_particle + 1):end], - ic.mass[(center_particle + 1):end], - ic.density[(center_particle + 1):end], - ic.pressure[(center_particle + 1):end], - ic.particle_spacing) - - fluid_system = WeaklyCompressibleSPHSystem(fluid, - density_calculator, - state_equation, - smoothing_kernel, - smoothing_length) - n_particles = TrixiParticles.nparticles(fluid_system) - - # Overwrite `fluid_system.pressure` because we skip the update step - fluid_system.pressure .= fluid.pressure - - u = fluid.coordinates - if density_calculator isa SummationDensity - # Density is stored in the cache - v = fluid.velocity - fluid_system.cache.density .= fluid.density - else - # Density is integrated with `ContinuityDensity` - v = vcat(fluid.velocity, fluid.density') - end - - # Create several neighbor systems to test fluid-neighbor interaction - systems, vu = second_systems(boundary, density_calculator, - state_equation, - smoothing_kernel, smoothing_length) - - nhs = TrixiParticles.TrivialNeighborhoodSearch{2}(search_radius, - TrixiParticles.eachparticle(fluid_system)) - - @testset "$key" for key in keys(systems) - neighbor_system = systems[key] - v_neighbor, u_neighbor = vu[key] - - nhs2 = TrixiParticles.TrivialNeighborhoodSearch{2}(search_radius, - TrixiParticles.eachparticle(neighbor_system)) - - # Compute interactions - dv = zero(v) - - # Fluid-fluid interact - TrixiParticles.interact!(dv, v, u, v, u, nhs, - fluid_system, fluid_system) - - # Fluid-neighbor interact - TrixiParticles.interact!(dv, v, u, v_neighbor, u_neighbor, nhs2, - fluid_system, neighbor_system) - - # Neighbor-fluid interact - dv_neighbor = zero(v_neighbor) - TrixiParticles.interact!(dv_neighbor, v_neighbor, u_neighbor, v, u, - nhs, neighbor_system, fluid_system) - - if neighbor_system isa WeaklyCompressibleSPHSystem - # If both are fluids, neighbor-neighbor interaction is necessary - # for energy preservation. - TrixiParticles.interact!(dv_neighbor, v_neighbor, u_neighbor, - v_neighbor, u_neighbor, - nhs2, neighbor_system, neighbor_system) - end - - # Quantities needed to test energy conservation - function drho(dv, ::ContinuityDensity, system, neighbor_system, - v, u, v_neighbor, u_neighbor, particle) - return dv[end, particle] - end - - function drho(dv, ::SummationDensity, system, neighbor_system, - v, u, v_neighbor, u_neighbor, particle) - sum1 = sum(neighbor -> drho_particle(system, system, - v, u, v, u, - particle, neighbor), - TrixiParticles.eachparticle(system)) - - sum2 = sum(neighbor -> drho_particle(system, neighbor_system, - v, u, v_neighbor, u_neighbor, - particle, neighbor), - TrixiParticles.eachparticle(neighbor_system)) - - return sum1 + sum2 - end - - function drho(dv, ::PressureZeroing, system, neighbor_system, - v, u, v_neighbor, u_neighbor, particle) - return 0.0 - end - - function drho(dv, ::PressureMirroring, system, neighbor_system, - v, u, v_neighbor, u_neighbor, particle) - return 0.0 - end - - # Derivative of the density summation. This is a slightly different - # formulation of the continuity equation. - function drho_particle(system, neighbor_system, - v, u, v_neighbor, u_neighbor, particle, neighbor) - m_b = TrixiParticles.hydrodynamic_mass(neighbor_system, neighbor) - v_diff = TrixiParticles.current_velocity(v, system, particle) - - TrixiParticles.current_velocity(v_neighbor, - neighbor_system, neighbor) - - pos_diff = TrixiParticles.current_coords(u, system, particle) - - TrixiParticles.current_coords(u_neighbor, - neighbor_system, neighbor) - distance = norm(pos_diff) - - # Only consider particles with a distance > 0 - distance < sqrt(eps()) && return 0.0 - - grad_kernel = TrixiParticles.smoothing_kernel_grad(fluid_system, - pos_diff, - distance) - - return m_b * dot(v_diff, grad_kernel) - end - - # m_a (v_a ⋅ dv_a + dte_a), - # where `te` is the thermal energy, called `u` in the Price paper. - function deriv_energy(dv, v, u, v_neighbor, u_neighbor, - system, neighbor_system, particle) - m_a = TrixiParticles.hydrodynamic_mass(system, particle) - p_a = TrixiParticles.particle_pressure(v, system, particle) - rho_a = TrixiParticles.particle_density(v, system, particle) - - if system isa WeaklyCompressibleSPHSystem - dc = system.density_calculator - else - dc = system.boundary_model.density_calculator - end - d_rho = drho(dv, dc, system, neighbor_system, - v, u, v_neighbor, u_neighbor, particle) - - dte_a = p_a / rho_a^2 * d_rho - v_a = TrixiParticles.current_velocity(v, system, particle) - dv_a = TrixiParticles.current_velocity(dv, system, particle) - - return m_a * (dot(v_a, dv_a) + dte_a) - end - - # ∑ m_a (v_a ⋅ dv_a + dte_a) - deriv_total_energy = sum(particle -> deriv_energy(dv, v, u, - v_neighbor, - u_neighbor, - fluid_system, - neighbor_system, - particle), - TrixiParticles.eachparticle(fluid_system)) - - deriv_total_energy += sum(particle -> deriv_energy(dv_neighbor, - v_neighbor, - u_neighbor, v, u, - neighbor_system, - fluid_system, - particle), - TrixiParticles.eachparticle(neighbor_system)) - - @test isapprox(deriv_total_energy, 0.0, atol=6e-15) - end - end - end - end -end diff --git a/test/schemes/boundary/monaghan_kajtar/monaghan_kajtar.jl b/test/schemes/boundary/monaghan_kajtar/monaghan_kajtar.jl deleted file mode 100644 index c3783af8b..000000000 --- a/test/schemes/boundary/monaghan_kajtar/monaghan_kajtar.jl +++ /dev/null @@ -1,69 +0,0 @@ - -@testset verbose=true "Monghan-Kajtar Repulsive Particles" begin - @testset "`show`" begin - boundary_model = BoundaryModelMonaghanKajtar(10.0, 3.0, 0.1, [1.0]) - - show_compact = "BoundaryModelMonaghanKajtar(10.0, 3.0, Nothing)" - @test repr(boundary_model) == show_compact - end - - @testset "RHS" begin - particle_spacing = 0.1 - - # The state equation is only needed to unpack `sound_speed`, so we can mock - # it by using a `NamedTuple`. - state_equation = (; sound_speed=0.0) - smoothing_kernel = SchoenbergCubicSplineKernel{2}() - smoothing_length = 1.2particle_spacing - search_radius = TrixiParticles.compact_support(smoothing_kernel, smoothing_length) - - # 3x3 fluid particles to the left of a 1x3 vertical wall, with the rightmost - # fluid particle one `particle_spacing` away from the boundary (which is at x=0) - fluid = rectangular_patch(particle_spacing, (3, 3), perturbation_factor=0.0, - perturbation_factor_position=0.0, - offset=(-1.5particle_spacing, 0.0)) - fluid_system = WeaklyCompressibleSPHSystem(fluid, ContinuityDensity(), - state_equation, smoothing_kernel, - smoothing_length) - - # Use double spacing for the boundary (exactly the opposite of what we would do - # in a simulation) to test that forces grow infinitely when a fluid particle - # comes too close to the boundary, independent of the boundary particle spacing. - boundary = rectangular_patch(2particle_spacing, (1, 3), perturbation_factor=0.0, - perturbation_factor_position=0.0) - K = 1.0 - spacing_ratio = 0.5 - boundary_model = BoundaryModelMonaghanKajtar(K, spacing_ratio, 2particle_spacing, - boundary.mass) - boundary_system = BoundarySPHSystem(boundary, boundary_model) - - # Density is integrated with `ContinuityDensity` - v = vcat(fluid.velocity, fluid.density') - u = fluid.coordinates - - v_neighbor = zeros(0, TrixiParticles.nparticles(boundary_system)) - u_neighbor = boundary.coordinates - - nhs = TrixiParticles.TrivialNeighborhoodSearch{2}(search_radius, - TrixiParticles.eachparticle(boundary_system)) - - # Result - dv = zero(fluid.velocity) - TrixiParticles.interact!(dv, v, u, v_neighbor, u_neighbor, nhs, fluid_system, - boundary_system) - - # Due to the symmetric setup, all particles will only be accelerated horizontally - @test isapprox(dv[2, :], zeros(TrixiParticles.nparticles(fluid_system)), atol=1e-14) - - # For the leftmost column of fluid particles, the boundary particles are outside the - # compact support of the kernel. - @test iszero(dv[:, [1, 4, 7]]) - - # The rightmost column of fluid particles should experience strong accelerations - # towards the left. - @test all(dv[1, [3, 6, 9]] .< -300) - - # The middle column of fluid particles should experience weaker accelerations - @test isapprox(dv[1, [2, 5, 8]], [-26.052449, -95.162888, -26.052449]) - end -end diff --git a/test/schemes/boundary/open_boundary/boundary_zone.jl b/test/schemes/boundary/open_boundary/boundary_zone.jl deleted file mode 100644 index 7a34a4bca..000000000 --- a/test/schemes/boundary/open_boundary/boundary_zone.jl +++ /dev/null @@ -1,221 +0,0 @@ -@testset verbose=true "Boundary Zone" begin - @testset verbose=true "Boundary Zone 2D" begin - particle_spacing = 0.2 - open_boundary_layers = 4 - - plane_points_1 = [[0.0, 0.0], [0.5, -0.5], [1.0, 0.5]] - plane_points_2 = [[0.0, 1.0], [0.2, 2.0], [2.3, 0.5]] - - @testset verbose=true "Points $i" for i in eachindex(plane_points_1) - point_1 = plane_points_1[i] - point_2 = plane_points_2[i] - - plane_size = point_2 - point_1 - - flow_directions = [ - normalize([-plane_size[2], plane_size[1]]), - -normalize([-plane_size[2], plane_size[1]]), - ] - - @testset verbose=true "Flow Direction $j" for j in eachindex(flow_directions) - inflow = InFlow(; plane=(point_1, point_2), particle_spacing, - flow_direction=flow_directions[j], density=1.0, - open_boundary_layers) - outflow = OutFlow(; plane=(point_1, point_2), particle_spacing, - flow_direction=flow_directions[j], density=1.0, - open_boundary_layers) - - boundary_zones = [ - inflow, - outflow, - ] - - @testset verbose=true "$(nameof(typeof(boundary_zone)))" for boundary_zone in boundary_zones - zone_width = open_boundary_layers * - boundary_zone.initial_condition.particle_spacing - sign_ = (boundary_zone isa InFlow) ? -1 : 1 - - @test plane_points_1[i] == boundary_zone.zone_origin - @test plane_points_2[i] - boundary_zone.zone_origin == - boundary_zone.spanning_set[2] - @test isapprox(sign_ * flow_directions[j], - normalize(boundary_zone.spanning_set[1]), atol=1e-14) - @test isapprox(zone_width, norm(boundary_zone.spanning_set[1]), - atol=1e-14) - end - end - end - end - - @testset verbose=true "Boundary Zone 3D" begin - particle_spacing = 0.05 - open_boundary_layers = 4 - - plane_points_1 = [ - [0.0, 0.0, 0.0], - [0.3113730847835541, 0.19079485535621643, -0.440864622592926], - ] - plane_points_2 = [ - [1.0, 0.0, 0.0], - [-0.10468611121177673, 0.252103328704834, -0.44965094327926636], - ] - plane_points_3 = [ - [0.0, 1.0, 0.0], - [0.3113730847835541, 0.25057315826416016, -0.02374829351902008], - ] - - @testset verbose=true "Points $i" for i in eachindex(plane_points_1) - point_1 = plane_points_1[i] - point_2 = plane_points_2[i] - point_3 = plane_points_3[i] - - edge1 = point_2 - point_1 - edge2 = point_3 - point_1 - - flow_directions = [ - normalize(cross(edge1, edge2)), - -normalize(cross(edge1, edge2)), - ] - - @testset verbose=true "Flow Direction $j" for j in eachindex(flow_directions) - inflow = InFlow(; plane=(point_1, point_2, point_3), particle_spacing, - flow_direction=flow_directions[j], density=1.0, - open_boundary_layers) - outflow = OutFlow(; plane=(point_1, point_2, point_3), particle_spacing, - flow_direction=flow_directions[j], density=1.0, - open_boundary_layers) - - boundary_zones = [ - inflow, - outflow, - ] - - @testset verbose=true "$(nameof(typeof(boundary_zone)))" for boundary_zone in boundary_zones - zone_width = open_boundary_layers * - boundary_zone.initial_condition.particle_spacing - sign_ = (boundary_zone isa InFlow) ? -1 : 1 - - @test plane_points_1[i] == boundary_zone.zone_origin - @test plane_points_2[i] - boundary_zone.zone_origin == - boundary_zone.spanning_set[2] - @test plane_points_3[i] - boundary_zone.zone_origin == - boundary_zone.spanning_set[3] - @test isapprox(sign_ * flow_directions[j], - normalize(boundary_zone.spanning_set[1]), atol=1e-14) - @test isapprox(zone_width, norm(boundary_zone.spanning_set[1]), - atol=1e-14) - end - end - end - end - - @testset verbose=true "Particle In Boundary Zone 2D" begin - plane_points = [[-0.2, -0.5], [0.3, 0.6]] - plane_size = plane_points[2] - plane_points[1] - - flow_direction = normalize([-plane_size[2], plane_size[1]]) - - inflow = InFlow(; plane=plane_points, particle_spacing=0.1, - flow_direction, density=1.0, open_boundary_layers=4) - outflow = OutFlow(; plane=plane_points, particle_spacing=0.1, - flow_direction, density=1.0, open_boundary_layers=4) - - boundary_zones = [ - inflow, - outflow, - ] - - @testset verbose=true "$(nameof(typeof(boundary_zone)))" for boundary_zone in boundary_zones - perturb_ = boundary_zone isa InFlow ? sqrt(eps()) : -sqrt(eps()) - - point1 = plane_points[1] - point2 = plane_points[2] - point3 = boundary_zone.spanning_set[1] + boundary_zone.zone_origin - - query_points = Dict( - "Behind" => ([-1.0, -1.0], false), - "Before" => ([2.0, 2.0], false), - "Closely On Point 1" => (point1 + perturb_ * flow_direction, false), - "Closely On Point 2" => (point2 + perturb_ * flow_direction, false), - "Closely On Point 3" => (point3 - perturb_ * flow_direction, false)) - - @testset verbose=true "$k" for k in keys(query_points) - (particle_position, evaluation) = query_points[k] - - @test evaluation == - TrixiParticles.is_in_boundary_zone(boundary_zone, particle_position) - end - end - end - - @testset verbose=true "Particle In Boundary Zone 3D" begin - point1 = [-0.2, -0.5, 0.0] - point2 = [0.3, 0.5, 0.0] - point3 = [0.13111173850909402, -0.665555869254547, 0.0] - - flow_direction = normalize(cross(point2 - point1, point3 - point1)) - - inflow = InFlow(; plane=[point1, point2, point3], particle_spacing=0.1, - flow_direction, density=1.0, open_boundary_layers=4) - outflow = OutFlow(; plane=[point1, point2, point3], particle_spacing=0.1, - flow_direction, density=1.0, open_boundary_layers=4) - - boundary_zones = [ - inflow, - outflow, - ] - - @testset verbose=true "$(nameof(typeof(boundary_zone)))" for boundary_zone in boundary_zones - perturb_ = boundary_zone isa InFlow ? eps() : -eps() - point4 = boundary_zone.spanning_set[1] + boundary_zone.zone_origin - - query_points = Dict( - "Behind" => ([-1.0, -1.0, 1.2], false), - "Before" => ([2.0, 2.0, -1.2], false), - "Closely On Point 1" => (point1 + perturb_ * flow_direction, false), - "Closely On Point 2" => (point2 + perturb_ * flow_direction, false), - "Closely On Point 3" => (point3 + perturb_ * flow_direction, false), - "Closely On Point 4" => (point4 - perturb_ * flow_direction, false)) - - @testset verbose=true "$k" for k in keys(query_points) - (particle_position, evaluation) = query_points[k] - - @test evaluation == - TrixiParticles.is_in_boundary_zone(boundary_zone, particle_position) - end - end - end - - @testset verbose=true "Illegal Inputs" begin - no_rectangular_plane = [[0.2, 0.3, -0.5], [-1.0, 1.5, 0.2], [-0.2, 2.0, -0.5]] - flow_direction = [0.0, 0.0, 1.0] - - error_str = "the vectors `AB` and `AC` for the provided points `A`, `B`, `C` must be orthogonal" - - @test_throws ArgumentError(error_str) InFlow(; plane=no_rectangular_plane, - particle_spacing=0.1, - flow_direction, density=1.0, - open_boundary_layers=2) - @test_throws ArgumentError(error_str) OutFlow(; plane=no_rectangular_plane, - particle_spacing=0.1, - flow_direction, density=1.0, - open_boundary_layers=2) - - rectangular_plane = [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]] - flow_direction = [0.0, 1.0, 0.0] - - error_str = "`flow_direction` is not normal to inflow plane" - - @test_throws ArgumentError(error_str) InFlow(; plane=rectangular_plane, - particle_spacing=0.1, - flow_direction, density=1.0, - open_boundary_layers=2) - - error_str = "`flow_direction` is not normal to outflow plane" - - @test_throws ArgumentError(error_str) OutFlow(; plane=rectangular_plane, - particle_spacing=0.1, - flow_direction, density=1.0, - open_boundary_layers=2) - end -end diff --git a/test/schemes/boundary/open_boundary/characteristic_variables.jl b/test/schemes/boundary/open_boundary/characteristic_variables.jl deleted file mode 100644 index 1fe20722a..000000000 --- a/test/schemes/boundary/open_boundary/characteristic_variables.jl +++ /dev/null @@ -1,134 +0,0 @@ -@testset verbose=true "Characteristic Variables" begin - particle_spacing = 0.1 - - # Number of boundary particles in the influence of fluid particles - influenced_particles = [20, 52, 26] - - open_boundary_layers = 8 - sound_speed = 20.0 - density = 1000.0 - pressure = 5.0 - - smoothing_kernel = SchoenbergCubicSplineKernel{2}() - smoothing_length = 1.2particle_spacing - - # Prescribed quantities - reference_velocity = (pos, t) -> SVector(t, 0.0) - reference_pressure = (pos, t) -> 50_000.0 * t - reference_density = (pos, t) -> 1000.0 * t - - # Plane points of open boundary - plane_points_1 = [[0.0, 0.0], [0.5, -0.5], [1.0, 0.5]] - plane_points_2 = [[0.0, 1.0], [0.2, 2.0], [2.3, 0.5]] - - @testset "Points $i" for i in eachindex(plane_points_1) - n_influenced = influenced_particles[i] - - plane_points = [plane_points_1[i], plane_points_2[i]] - - plane_size = plane_points[2] - plane_points[1] - flow_directions = [ - normalize([-plane_size[2], plane_size[1]]), - -normalize([-plane_size[2], plane_size[1]]), - ] - - @testset "Flow Direction $j" for j in eachindex(flow_directions) - flow_direction = flow_directions[j] - inflow = InFlow(; plane=plane_points, particle_spacing, density, - flow_direction, open_boundary_layers) - outflow = OutFlow(; plane=plane_points, particle_spacing, density, - flow_direction, open_boundary_layers) - - boundary_zones = [ - inflow, - outflow, - ] - - @testset "`$(nameof(typeof(boundary_zone)))`" for boundary_zone in boundary_zones - sign_ = (boundary_zone isa InFlow) ? 1 : -1 - fluid = extrude_geometry(plane_points; particle_spacing, n_extrude=4, - density, pressure, - direction=(sign_ * flow_direction)) - - fluid_system = EntropicallyDampedSPHSystem(fluid, smoothing_kernel, - buffer_size=0, - density_calculator=ContinuityDensity(), - smoothing_length, sound_speed) - - boundary_system = OpenBoundarySPHSystem(boundary_zone; sound_speed, - fluid_system, buffer_size=0, - reference_velocity, - reference_pressure, - reference_density) - - semi = Semidiscretization(fluid_system, boundary_system) - - ode = semidiscretize(semi, (0.0, 5.0)) - - v0_ode, u0_ode = ode.u0.x - v = TrixiParticles.wrap_v(v0_ode, boundary_system, semi) - u = TrixiParticles.wrap_u(u0_ode, boundary_system, semi) - - # ==== Characteristic Variables - # `J1 = -sound_speed^2 * (rho - rho_ref) + (p - p_ref)` - # `J2 = rho * sound_speed * (v - v_ref) + (p - p_ref)` - # `J3 = - rho * sound_speed * (v - v_ref) + (p - p_ref)` - function J1(t) - return -sound_speed^2 * (density - reference_density(0, t)) + - (pressure - reference_pressure(0, t)) - end - function J2(t) - return density * sound_speed * - dot(-reference_velocity(0, t), flow_direction) + - (pressure - reference_pressure(0, t)) - end - function J3(t) - return -density * sound_speed * - dot(-reference_velocity(0, t), flow_direction) + - (pressure - reference_pressure(0, t)) - end - - # First evaluation. - # Particles not influenced by the fluid have zero values. - t1 = 2.0 - TrixiParticles.evaluate_characteristics!(boundary_system, - v, u, v0_ode, u0_ode, semi, t1) - evaluated_vars1 = boundary_system.characteristics - - if boundary_zone isa InFlow - @test all(isapprox.(evaluated_vars1[1, :], 0.0)) - @test all(isapprox.(evaluated_vars1[2, :], 0.0)) - @test all(isapprox.(evaluated_vars1[3, 1:n_influenced], J3(t1))) - @test all(isapprox.(evaluated_vars1[3, (n_influenced + 1):end], 0.0)) - - elseif boundary_zone isa OutFlow - @test all(isapprox.(evaluated_vars1[1, 1:n_influenced], J1(t1))) - @test all(isapprox.(evaluated_vars1[2, 1:n_influenced], J2(t1))) - @test all(isapprox.(evaluated_vars1[1:2, (n_influenced + 1):end], 0.0)) - @test all(isapprox.(evaluated_vars1[3, :], 0.0)) - end - - # Second evaluation. - # Particles not influenced by the fluid have previous values. - t2 = 3.0 - TrixiParticles.evaluate_characteristics!(boundary_system, - v, u, v0_ode, u0_ode, semi, t2) - evaluated_vars2 = boundary_system.characteristics - - if boundary_zone isa InFlow - @test all(isapprox.(evaluated_vars2[1, :], 0.0)) - @test all(isapprox.(evaluated_vars2[2, :], 0.0)) - @test all(isapprox.(evaluated_vars2[3, 1:n_influenced], J3(t2))) - @test all(isapprox.(evaluated_vars2[3, (n_influenced + 1):end], J3(t1))) - - elseif boundary_zone isa OutFlow - @test all(isapprox.(evaluated_vars2[1, 1:n_influenced], J1(t2))) - @test all(isapprox.(evaluated_vars2[2, 1:n_influenced], J2(t2))) - @test all(isapprox.(evaluated_vars2[1, (n_influenced + 1):end], J1(t1))) - @test all(isapprox.(evaluated_vars2[2, (n_influenced + 1):end], J2(t1))) - @test all(isapprox.(evaluated_vars2[3, :], 0.0)) - end - end - end - end -end diff --git a/test/schemes/boundary/open_boundary/open_boundary.jl b/test/schemes/boundary/open_boundary/open_boundary.jl deleted file mode 100644 index 5fe09c703..000000000 --- a/test/schemes/boundary/open_boundary/open_boundary.jl +++ /dev/null @@ -1,2 +0,0 @@ -include("characteristic_variables.jl") -include("boundary_zone.jl") diff --git a/test/schemes/fluid/fluid.jl b/test/schemes/fluid/fluid.jl deleted file mode 100644 index 105fb0ee8..000000000 --- a/test/schemes/fluid/fluid.jl +++ /dev/null @@ -1,4 +0,0 @@ -include("weakly_compressible_sph/weakly_compressible_sph.jl") -include("rhs.jl") -include("pressure_acceleration.jl") -include("surface_tension.jl") diff --git a/test/schemes/fluid/pressure_acceleration.jl b/test/schemes/fluid/pressure_acceleration.jl deleted file mode 100644 index 4d7eea40c..000000000 --- a/test/schemes/fluid/pressure_acceleration.jl +++ /dev/null @@ -1,68 +0,0 @@ -@testset verbose=true "Pressure Acceleration" begin - @testset verbose=true "Corresponding Density Calculator Formulation" begin - f_1 = TrixiParticles.choose_pressure_acceleration_formulation(nothing, - SummationDensity(), - 2, Float64, nothing) - - @test f_1 == TrixiParticles.pressure_acceleration_summation_density - - f_2 = TrixiParticles.choose_pressure_acceleration_formulation(nothing, - ContinuityDensity(), - 2, Float64, nothing) - @test f_2 == TrixiParticles.pressure_acceleration_continuity_density - end - - @testset verbose=true "Illegal Inputs" begin - correction_dict_1 = Dict( - "KernelCorrection" => KernelCorrection(), - "GradientCorrection" => GradientCorrection(), - "BlendedGradientCorrection" => BlendedGradientCorrection(0.5), - "MixedKernelGradientCorrection" => MixedKernelGradientCorrection(), - ) - - function p_fun_1(a::Float64, b::Float64, c::Float64, - d::Float64, e::Float64, f::Float64, - g::SVector{2, Float64}) - return 0.0 - end - - error_str = "when a correction with an asymmetric kernel gradient is " * - "used, the passed pressure acceleration formulation must " * - "provide a version with the arguments " * - "`m_a, m_b, rho_a, rho_b, p_a, p_b, W_a, W_b`" - - @testset "$correction_name" for correction_name in keys(correction_dict_1) - @test_throws ArgumentError(error_str) TrixiParticles.choose_pressure_acceleration_formulation(p_fun_1, - 1.0, - 2, - Float64, - correction_dict_1[correction_name]) - end - - correction_dict_2 = Dict( - "No Correction" => nothing, - "ShepardKernelCorrection" => ShepardKernelCorrection(), - "AkinciFreeSurfaceCorrection" => AkinciFreeSurfaceCorrection(1.0), - ) - - function p_fun_2(a::Float64, b::Float64, c::Float64, - d::Float64, e::Float64, f::Float64, - g::SVector{2, Float64}, h::SVector{2, Float64}) - return 0.0 - end - - error_str = "when not using a correction with an asymmetric kernel " * - "gradient, the passed pressure acceleration formulation must " * - "provide a version with the arguments " * - "`m_a, m_b, rho_a, rho_b, p_a, p_b, W_a`, " * - "using the symmetry of the kernel gradient" - - @testset "$correction_name" for correction_name in keys(correction_dict_2) - @test_throws ArgumentError(error_str) TrixiParticles.choose_pressure_acceleration_formulation(p_fun_2, - 1.0, - 2, - Float64, - correction_dict_2[correction_name]) - end - end -end diff --git a/test/schemes/fluid/rhs.jl b/test/schemes/fluid/rhs.jl deleted file mode 100644 index 805d22c66..000000000 --- a/test/schemes/fluid/rhs.jl +++ /dev/null @@ -1,237 +0,0 @@ -@testset verbose=true "RHS" begin - @testset verbose=true "`pressure_acceleration`" begin - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Symmetry" begin - masses = [[0.01, 0.01], [0.73, 0.31]] - densities = [ - [1000.0, 1000.0], - [1000.0, 1000.0], - [900.0, 1201.0], - [1003.0, 353.4], - ] - pressures = [ - [0.0, 0.0], - [10_000.0, 10_000.0], - [10.0, 10_000.0], - [1000.0, -1000.0], - ] - grad_kernels = [0.3, 104.0] - particle = 2 - neighbor = 3 - - # Not used for fluid-fluid interaction - pos_diff = 0 - distance = 0 - - density_calculators = [ContinuityDensity(), SummationDensity()] - - pressure_accelerations = [ - TrixiParticles.inter_particle_averaged_pressure, - TrixiParticles.pressure_acceleration_continuity_density, - TrixiParticles.pressure_acceleration_summation_density, - ] - - @testset "`$(nameof(typeof(density_calculator)))`" for density_calculator in density_calculators - @testset "`$(nameof(typeof(pressure_acceleration)))`" for pressure_acceleration in pressure_accelerations - for (m_a, m_b) in masses, (rho_a, rho_b) in densities, - (p_a, p_b) in pressures, grad_kernel in grad_kernels - - # Partly copied from constructor test, just to create a WCSPH system - coordinates = zeros(2, 3) - velocity = zeros(2, 3) - mass = zeros(3) - density = ones(3) - state_equation = Val(:state_equation) - smoothing_kernel = Val(:smoothing_kernel) - TrixiParticles.ndims(::Val{:smoothing_kernel}) = 2 - smoothing_length = -1.0 - - fluid = InitialCondition(; coordinates, velocity, mass, density) - - @testset verbose=true "$system_name" for system_name in [ - "WCSPH", - "EDAC", - ] - if system_name == "WCSPH" - system = WeaklyCompressibleSPHSystem(fluid, - density_calculator, - state_equation, - smoothing_kernel, - smoothing_length; - pressure_acceleration) - elseif system_name == "EDAC" - system = EntropicallyDampedSPHSystem(fluid, - smoothing_kernel, - smoothing_length, 0.0; - density_calculator, - pressure_acceleration) - end - - # Compute accelerations a -> b and b -> a - dv1 = TrixiParticles.pressure_acceleration(system, system, -1, - m_a, m_b, p_a, p_b, - rho_a, rho_b, - pos_diff, - distance, - grad_kernel, - nothing) - - dv2 = TrixiParticles.pressure_acceleration(system, system, -1, - m_b, m_a, p_b, p_a, - rho_b, rho_a, - -pos_diff, - distance, - -grad_kernel, - nothing) - - # Test that both forces are identical but in opposite directions - @test isapprox(m_a * dv1, -m_b * dv2, rtol=2eps()) - end - end - end - end - end - end - - # The following tests for linear and angular momentum and total energy conservation - # are based on Sections 3.3.4 and 3.4.2 of - # Daniel J. Price. "Smoothed Particle Hydrodynamics and Magnetohydrodynamics." - # In: Journal of Computational Physics 231.3 (2012), pages 759–94. - # https://doi.org/10.1016/j.jcp.2010.12.011 - @testset verbose=true "Momentum and Total Energy Conservation" begin - # We are testing the momentum conservation of SPH with random initial configurations - density_calculators = [ContinuityDensity(), SummationDensity()] - - particle_spacing = 0.1 - - # The state equation is only needed to unpack `sound_speed`, so we can mock - # it by using a `NamedTuple`. - state_equation = (; sound_speed=0.0) - smoothing_kernel = SchoenbergCubicSplineKernel{2}() - smoothing_length = 1.2particle_spacing - search_radius = TrixiParticles.compact_support(smoothing_kernel, smoothing_length) - - @testset "`$(nameof(typeof(density_calculator)))`" for density_calculator in density_calculators - # Run three times with different seed for the random initial condition - for seed in 1:3 - # A larger number of particles will increase accumulated errors in the - # summation. A larger tolerance has to be used for the tests below. - fluid = rectangular_patch(particle_spacing, (3, 3), seed=seed) - system_wcsph = WeaklyCompressibleSPHSystem(fluid, density_calculator, - state_equation, smoothing_kernel, - smoothing_length) - - system_edac = EntropicallyDampedSPHSystem(fluid, smoothing_kernel, - pressure_acceleration=nothing, - density_calculator=density_calculator, - smoothing_length, 0.0) - n_particles = TrixiParticles.nparticles(system_edac) - - # Overwrite `system.pressure` because we skip the update step - system_wcsph.pressure .= fluid.pressure - @testset "`$(nameof(typeof(system)))`" for system in (system_wcsph, - system_edac) - u = fluid.coordinates - if density_calculator isa SummationDensity - # Density is stored in the cache - v = fluid.velocity - system.cache.density .= fluid.density - - if system isa EntropicallyDampedSPHSystem - # pressure is integrated - v = vcat(fluid.velocity, fluid.pressure') - end - else - # Density is integrated with `ContinuityDensity` - - if system isa EntropicallyDampedSPHSystem - v = vcat(fluid.velocity, fluid.density', fluid.pressure') - else - v = vcat(fluid.velocity, fluid.density') - end - end - - nhs = TrixiParticles.TrivialNeighborhoodSearch{2}(search_radius, - TrixiParticles.eachparticle(system)) - - # Result - dv = zero(v) - TrixiParticles.interact!(dv, v, u, v, u, nhs, system, system) - - # Linear momentum conservation - # ∑ m_a dv_a - deriv_linear_momentum = sum(fluid.mass' .* view(dv, 1:2, :), dims=2) - - @test isapprox(deriv_linear_momentum, zeros(2, 1), atol=5e-14) - - # Angular momentum conservation - # m_a (r_a × dv_a) - function deriv_angular_momentum(particle) - r_a = SVector(u[1, particle], u[2, particle], 0.0) - dv_a = SVector(dv[1, particle], dv[2, particle], 0.0) - - return fluid.mass[particle] * cross(r_a, dv_a) - end - - # ∑ m_a (r_a × dv_a) - deriv_angular_momentum = sum(deriv_angular_momentum, 1:n_particles) - - # Cross product is always 3-dimensional - @test isapprox(deriv_angular_momentum, zeros(3), atol=4e-15) - - # Total energy conservation - function drho(::ContinuityDensity, ::WeaklyCompressibleSPHSystem, - particle) - return dv[end, particle] - end - function drho(::ContinuityDensity, ::EntropicallyDampedSPHSystem, - particle) - return dv[end - 1, particle] - end - - function drho(::SummationDensity, system, particle) - return sum(neighbor -> drho_particle(particle, neighbor), - 1:n_particles) - end - - # Derivative of the density summation. This is a slightly different - # formulation of the continuity equation. - function drho_particle(particle, neighbor) - m_b = TrixiParticles.hydrodynamic_mass(system, neighbor) - v_diff = TrixiParticles.current_velocity(v, system, particle) - - TrixiParticles.current_velocity(v, system, neighbor) - - pos_diff = TrixiParticles.current_coords(u, system, particle) - - TrixiParticles.current_coords(u, system, neighbor) - distance = norm(pos_diff) - - # Only consider particles with a distance > 0 - distance < sqrt(eps()) && return 0.0 - - grad_kernel = TrixiParticles.smoothing_kernel_grad(system, pos_diff, - distance) - - return m_b * dot(v_diff, grad_kernel) - end - - # m_a (v_a ⋅ dv_a + dte_a), - # where `te` is the thermal energy, called `u` in the Price paper. - function deriv_energy(particle) - p_a = fluid.pressure[particle] - rho_a = fluid.density[particle] - dte_a = p_a / rho_a^2 * drho(density_calculator, system, particle) - v_a = TrixiParticles.extract_svector(v, system, particle) - dv_a = TrixiParticles.extract_svector(dv, system, particle) - - return fluid.mass[particle] * (dot(v_a, dv_a) + dte_a) - end - - # ∑ m_a (v_a ⋅ dv_a + dte_a) - deriv_total_energy = sum(deriv_energy, 1:n_particles) - - @test isapprox(deriv_total_energy, 0.0, atol=6e-15) - end - end - end - end -end diff --git a/test/schemes/fluid/surface_tension.jl b/test/schemes/fluid/surface_tension.jl deleted file mode 100644 index 9758463f5..000000000 --- a/test/schemes/fluid/surface_tension.jl +++ /dev/null @@ -1,92 +0,0 @@ - -@testset verbose=true "Surface Tension" begin - @testset verbose=true "`cohesion_force_akinci`" begin - surface_tension = SurfaceTensionAkinci(surface_tension_coefficient=1.0) - support_radius = 1.0 - m_b = 1.0 - pos_diff = [1.0, 1.0] - - # These values can be extracted from the graphs in the paper by Akinci et al. or by manual calculation. - # Additional digits have been accepted from the actual calculation. - test_distance = 0.1 - val = TrixiParticles.cohesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance) * test_distance - @test isapprox(val[1], 0.1443038770421044, atol=6e-15) - @test isapprox(val[2], 0.1443038770421044, atol=6e-15) - - # Maximum repulsion force - test_distance = 0.01 - max = TrixiParticles.cohesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance) * test_distance - @test isapprox(max[1], 0.15913517632298307, atol=6e-15) - @test isapprox(max[2], 0.15913517632298307, atol=6e-15) - - # Near 0 - test_distance = 0.2725 - zero = TrixiParticles.cohesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance) * test_distance - @test isapprox(zero[1], 0.0004360543645195717, atol=6e-15) - @test isapprox(zero[2], 0.0004360543645195717, atol=6e-15) - - # Maximum attraction force - test_distance = 0.5 - maxa = TrixiParticles.cohesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance) * test_distance - @test isapprox(maxa[1], -0.15915494309189535, atol=6e-15) - @test isapprox(maxa[2], -0.15915494309189535, atol=6e-15) - - # Should be 0 - test_distance = 1.0 - zero = TrixiParticles.cohesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance) * test_distance - @test isapprox(zero[1], 0.0, atol=6e-15) - @test isapprox(zero[2], 0.0, atol=6e-15) - end - - @testset verbose=true "adhesion_force_akinci" begin - surface_tension = TrixiParticles.SurfaceTensionAkinci(surface_tension_coefficient=1.0) - support_radius = 1.0 - m_b = 1.0 - pos_diff = [1.0, 1.0] - - # These values can be extracted from the graphs in the paper by Akinci et al. or by manual calculation. - # Additional digits have been accepted from the actual calculation. - test_distance = 0.1 - zero = TrixiParticles.adhesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance, 1.0) * - test_distance - @test isapprox(zero[1], 0.0, atol=6e-15) - @test isapprox(zero[2], 0.0, atol=6e-15) - - test_distance = 0.5 - zero = TrixiParticles.adhesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance, 1.0) * - test_distance - @test isapprox(zero[1], 0.0, atol=6e-15) - @test isapprox(zero[2], 0.0, atol=6e-15) - - # Near 0 - test_distance = 0.51 - zero = TrixiParticles.adhesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance, 1.0) * - test_distance - @test isapprox(zero[1], -0.002619160170741761, atol=6e-15) - @test isapprox(zero[2], -0.002619160170741761, atol=6e-15) - - # Maximum adhesion force - test_distance = 0.75 - max = TrixiParticles.adhesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance, 1.0) * - test_distance - @test isapprox(max[1], -0.004949747468305833, atol=6e-15) - @test isapprox(max[2], -0.004949747468305833, atol=6e-15) - - # Should be 0 - test_distance = 1.0 - zero = TrixiParticles.adhesion_force_akinci(surface_tension, support_radius, m_b, - pos_diff, test_distance, 1.0) * - test_distance - @test isapprox(zero[1], 0.0, atol=6e-15) - @test isapprox(zero[2], 0.0, atol=6e-15) - end -end diff --git a/test/schemes/fluid/weakly_compressible_sph/density_diffusion.jl b/test/schemes/fluid/weakly_compressible_sph/density_diffusion.jl deleted file mode 100644 index 9e2c82a0f..000000000 --- a/test/schemes/fluid/weakly_compressible_sph/density_diffusion.jl +++ /dev/null @@ -1,16 +0,0 @@ -@testset verbose=true "Density Diffusion" begin - @testset verbose=true "DensityDiffusionAntuono" begin - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "show" begin - # Mock initial condition - initial_condition = Val(:initial_condition) - Base.ndims(::Val{:initial_condition}) = 2 - Base.eltype(::Val{:initial_condition}) = Float64 - TrixiParticles.nparticles(::Val{:initial_condition}) = 15 - - density_diffusion = DensityDiffusionAntuono(delta=0.1, initial_condition) - - @test repr(density_diffusion) == "DensityDiffusionAntuono(0.1)" - end - end -end diff --git a/test/schemes/fluid/weakly_compressible_sph/state_equation.jl b/test/schemes/fluid/weakly_compressible_sph/state_equation.jl deleted file mode 100644 index 404e2a6ae..000000000 --- a/test/schemes/fluid/weakly_compressible_sph/state_equation.jl +++ /dev/null @@ -1,142 +0,0 @@ -@testset verbose=true "State Equations" begin - @testset verbose=true "StateEquationCole" begin - # The equation of state was designed by Cole to accurately describe the - # physical properties of water under pressures up to 25 kbar. - # We verify that it roughly coincides with online calculators (because I couldn't - # find the original data from 1942 that Cole used to design his equation). - @testset "Physical Properties of Water" begin - # Standard speed of sound for pure water at 20°C - sound_speed = 1484.0 - - # Density of pure water at 20°C - rest_density = 998.34 - - # Work with pressures in ATM - ATM = 101_325.0 - - # 7.15 is the value used by Cole (see p. 39 of Cole 1948) - state_equation = StateEquationCole(; sound_speed, exponent=7.15, - reference_density=rest_density, - background_pressure=1ATM) - - # These densities differ from an online calculator by less than 0.05%. - # See https://www.omnicalculator.com/physics/water-density - @test TrixiParticles.inverse_state_equation(state_equation, 1ATM) == 998.34 - @test TrixiParticles.inverse_state_equation(state_equation, 100ATM) == - 1002.8323123356663 - @test TrixiParticles.inverse_state_equation(state_equation, 500ATM) == - 1019.8235062499685 - - # The online calculator says it's only accurate up to pressures of 1000 bar, - # while Cole designed his equation to be accurate up to 25 kbar. - # Therefore, these densities differ by up to 0.6%. - @test TrixiParticles.inverse_state_equation(state_equation, 1000ATM) == - 1038.8747989986027 - @test TrixiParticles.inverse_state_equation(state_equation, 3000ATM) == - 1099.0607413267035 - @test TrixiParticles.inverse_state_equation(state_equation, 9000ATM) == - 1210.4689472510186 - end - - @testset "Background Pressure and Clipping" begin - # Test background pressure - background_pressures = [0.0, 10_000.0, 100_000.0, 200_000.0] - - for background_pressure in background_pressures - state_equation = StateEquationCole(sound_speed=10.0, exponent=7, - reference_density=1000.0, - background_pressure=background_pressure) - @test state_equation(1000.0) == background_pressure - @test state_equation(1001.0) > background_pressure + 10 - # No pressure clipping - @test state_equation(999.0) < background_pressure - 10 - end - - # Test pressure clipping - state_equation = StateEquationCole(sound_speed=10.0, exponent=7, - reference_density=1000.0, - clip_negative_pressure=true) - @test state_equation(999.0) == 0.0 - @test state_equation(900.0) == 0.0 - end - end - - @testset verbose=true "Linear StateEquationCole" begin - # This equation of state does not accurately describe the physical properties of - # water under high pressures. However, it gives good results for low pressures, - # where the relation of pressure and density is almost linear. - # We verify again that it roughly coincides with online calculators. - @testset "Physical Properties of Water" begin - # Standard speed of sound for pure water at 20°C - sound_speed = 1484.0 - - # Density of pure water at 20°C - rest_density = 998.34 - - # Work with pressures in ATM - ATM = 101_325.0 - - state_equation = StateEquationCole(; sound_speed, exponent=1, - reference_density=rest_density, - background_pressure=1ATM) - - # These densities differ from an online calculator by less than 0.1%. - # See https://www.omnicalculator.com/physics/water-density - @test TrixiParticles.inverse_state_equation(state_equation, 1ATM) == 998.34 - @test TrixiParticles.inverse_state_equation(state_equation, 100ATM) == - 1002.8949541016121 - @test TrixiParticles.inverse_state_equation(state_equation, 500ATM) == - 1021.298809057621 - - # For higher pressures, this state equation fails. These densities differ - # by up to 16%. - @test TrixiParticles.inverse_state_equation(state_equation, 1000ATM) == - 1044.3036277526319 - @test TrixiParticles.inverse_state_equation(state_equation, 3000ATM) == - 1136.3229025326757 - @test TrixiParticles.inverse_state_equation(state_equation, 9000ATM) == - 1412.380726872807 - end - end - - # Don't show all state equations in the final overview - @testset verbose=false "inverse_state_equation" begin - # Verify that the `inverse_state_equation` actually is the inverse - state_equations = [ - StateEquationCole(sound_speed=1484.0, exponent=7.15, reference_density=998.34, - background_pressure=101_325.0), - StateEquationCole(sound_speed=10.0, exponent=7, reference_density=1000.0, - background_pressure=10_000.0), - StateEquationCole(sound_speed=10.0, exponent=7, reference_density=1000.0, - background_pressure=0.0), - StateEquationCole(sound_speed=10.0, exponent=7, reference_density=1000.0, - background_pressure=-100_000.0), - StateEquationCole(sound_speed=1484.0, exponent=1, reference_density=998.34, - background_pressure=101_325.0), - StateEquationCole(sound_speed=10.0, exponent=1, reference_density=1000.0, - background_pressure=100_000.0), - StateEquationCole(sound_speed=10.0, exponent=1, reference_density=1000.0, - background_pressure=90_000.0), - StateEquationCole(sound_speed=10.0, exponent=1, reference_density=1000.0, - background_pressure=0.0), - StateEquationCole(sound_speed=10.0, exponent=1, reference_density=1000.0, - background_pressure=-100_000.0), - ] - - densities = [100.0, 500.0, 900.0, 990.0, 1000.0, 1005.0, 1100.0, 1600.0] - pressures = [-100.0, 0.0, 100.0, 10_000.0, 100_000.0, 100_000_000.0] - - @testset "$state_equation" for state_equation in state_equations - for density in densities - pressure = state_equation(density) - @test TrixiParticles.inverse_state_equation(state_equation, - pressure) ≈ density - end - - for pressure in pressures - density = TrixiParticles.inverse_state_equation(state_equation, pressure) - @test isapprox(state_equation(density), pressure, atol=2e-7, rtol=1e-10) - end - end - end -end diff --git a/test/schemes/fluid/weakly_compressible_sph/weakly_compressible_sph.jl b/test/schemes/fluid/weakly_compressible_sph/weakly_compressible_sph.jl deleted file mode 100644 index 466889a5c..000000000 --- a/test/schemes/fluid/weakly_compressible_sph/weakly_compressible_sph.jl +++ /dev/null @@ -1,2 +0,0 @@ -include("density_diffusion.jl") -include("state_equation.jl") diff --git a/test/schemes/schemes.jl b/test/schemes/schemes.jl index 5cf7cd5bd..b8f73074b 100644 --- a/test/schemes/schemes.jl +++ b/test/schemes/schemes.jl @@ -1,5 +1 @@ include("solid/total_lagrangian_sph/total_lagrangian_sph.jl") -include("boundary/dummy_particles/dummy_particles.jl") -include("boundary/monaghan_kajtar/monaghan_kajtar.jl") -include("boundary/open_boundary/open_boundary.jl") -include("fluid/fluid.jl") diff --git a/test/schemes/solid/total_lagrangian_sph/rhs.jl b/test/schemes/solid/total_lagrangian_sph/rhs.jl index b64fb6c97..08634a500 100644 --- a/test/schemes/solid/total_lagrangian_sph/rhs.jl +++ b/test/schemes/solid/total_lagrangian_sph/rhs.jl @@ -1,6 +1,5 @@ @testset verbose=true "Solid RHS" begin - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "interact! Mocked" begin + @testset "interact! Mocked" begin # Pass specific PK1 and `pos_diff` to `interact!` and verify with # values calculated by hand. pk1_particle_corrected = [ @@ -32,7 +31,7 @@ [0.0, 0.0], ] - @testset verbose=true "Test $i" for i in 1:4 + @testset "Test $i" for i in 1:4 #### Setup each_moving_particle = [particle[i]] # Only calculate dv for this one particle eachparticle = [particle[i], neighbor[i]] @@ -53,27 +52,18 @@ kernel_deriv = 1.0 #### Mocking - # Mock a CPU system to test CPU code - struct MockSystemInteractCPU <: TrixiParticles.System{2, String} end - system = MockSystemInteractCPU() + # Mock the system + system = Val{:mock_system_interact}() + TrixiParticles.ndims(::Val{:mock_system_interact}) = 2 + Base.ntuple(f, ::Symbol) = ntuple(f, 2) # Make `extract_svector` work - # Mock a GPU system to emulate GPU code on the CPU - struct MockSystemInteractGPU <: TrixiParticles.System{2, Nothing} end - system_gpu = MockSystemInteractGPU() - - function TrixiParticles.KernelAbstractions.get_backend(::MockSystemInteractGPU) - return TrixiParticles.KernelAbstractions.CPU() - end - - MockSystemType = Union{MockSystemInteractCPU, MockSystemInteractGPU} - - function TrixiParticles.initial_coordinates(::MockSystemType) + function TrixiParticles.initial_coordinates(::Val{:mock_system_interact}) return initial_coordinates end - # Unpack calls should return predefined values or - # another mock object of the type Val{:mock_property_name}. - function Base.getproperty(::MockSystemType, f::Symbol) + # @unpack calls should return predefined values or + # another mock object of the type Val{:mock_property_name} + function Base.getproperty(::Val{:mock_system_interact}, f::Symbol) if f === :current_coordinates return current_coordinates elseif f === :material_density @@ -90,68 +80,56 @@ return Val(Symbol("mock_" * string(f))) end - function TrixiParticles.each_moving_particle(::MockSystemType) + function TrixiParticles.each_moving_particle(::Val{:mock_system_interact}) each_moving_particle end - TrixiParticles.eachparticle(::MockSystemType) = eachparticle - - # Mock the neighborhood search - nhs = Val{:nhs}() - TrixiParticles.PointNeighbors.eachneighbor(_, ::Val{:nhs}) = eachneighbor + TrixiParticles.eachparticle(::Val{:mock_system_interact}) = eachparticle + TrixiParticles.eachneighbor(_, ::Val{:nhs}) = eachneighbor + TrixiParticles.compact_support(::Val{:mock_smoothing_kernel}, _) = 100.0 - function Base.getproperty(::Val{:nhs}, f::Symbol) - if f === :search_radius - return 100.0 - elseif f === :periodic_box_size - return nothing + function TrixiParticles.pk1_corrected(::Val{:mock_system_dv}, particle_) + if particle_ == particle[i] + return pk1_particle_corrected[i] end - - # For all other properties, return mock objects - return Val(Symbol("mock_" * string(f))) + return pk1_neighbor_corrected[i] end - TrixiParticles.ndims(::Val{:nhs}) = 2 - function TrixiParticles.add_acceleration!(_, _, ::MockSystemType) + function TrixiParticles.add_acceleration!(_, _, ::Val{:mock_system_interact}) nothing end TrixiParticles.kernel_deriv(::Val{:mock_smoothing_kernel}, _, _) = kernel_deriv #### Verification - systems = [system, system_gpu] - names = ["CPU code", "Emulate GPU"] - @testset "$(names[j])" for j in eachindex(names) - system_ = systems[j] + dv = zeros(ndims(system), 10) + dv_expected = copy(dv) + dv_expected[:, particle[i]] = dv_particle_expected[i] - dv = zeros(ndims(system_), 10) - dv_expected = copy(dv) - dv_expected[:, particle[i]] = dv_particle_expected[i] + TrixiParticles.interact_solid_solid!(dv, Val(:nhs), system, system) - TrixiParticles.interact_solid_solid!(dv, nhs, system_, system_) - - @test dv ≈ dv_expected - end + @test dv ≈ dv_expected end end @testset verbose=true "interact! with System and Deformation Function" begin - deformations = Dict( - "rotation" => x -> [cos(0.3) -sin(0.3); sin(0.3) cos(0.3)] * x, - "stretch both" => x -> [2.0 0.0; 0.0 3.0] * x, - "rotate and stretch" => x -> [cos(0.3) -sin(0.3); sin(0.3) cos(0.3)] * - [2.0 0.0; 0.0 3.0] * x, - "nonlinear stretching" => x -> [x[1]^2, x[2]]) + deformations = Dict("rotation" => x -> [cos(0.3) -sin(0.3); sin(0.3) cos(0.3)] * x, + "stretch both" => x -> [2.0 0.0; 0.0 3.0] * x, + "rotate and stretch" => x -> [cos(0.3) -sin(0.3); + sin(0.3) cos(0.3)] * + [2.0 0.0; 0.0 3.0] * x, + "nonlinear stretching" => x -> [x[1]^2, x[2]]) # The acceleration in the first three should be zero (linear stretching) # The fourth one is calculated by hand - dv_expected_41 = Dict( - "rotation" => [0.0, 0.0], - "stretch both" => [0.0, 0.0], - "rotate and stretch" => [0.0, 0.0], - "nonlinear stretching" => [ - 10 / 1000^2 * 1.5400218087591082 * 324.67072684047224 * 1.224, 0.0, - ]) - - @testset verbose=true "Deformation Function: $deformation" for deformation in keys(deformations) + dv_expected_41 = Dict("rotation" => [0.0, 0.0], + "stretch both" => [0.0, 0.0], + "rotate and stretch" => [0.0, 0.0], + "nonlinear stretching" => [ + 10 / 1000^2 * 1.5400218087591082 * 324.67072684047224 * + 1.224, + 0.0, + ]) + + @testset "Deformation Function: $deformation" for deformation in keys(deformations) J = deformations[deformation] u = zeros(2, 81) v = zeros(2, 81) @@ -165,8 +143,9 @@ # 9 x 9 grid of particles n_particles_per_dimension = (9, 9) coordinates = Array{Float64, 2}(undef, 2, prod(n_particles_per_dimension)) - mass = 10.0 - density = 1000.0 + velocities = Array{Float64, 2}(undef, 2, prod(n_particles_per_dimension)) + masses = 10 * ones(Float64, prod(n_particles_per_dimension)) + densities = 1000 * ones(Float64, prod(n_particles_per_dimension)) for y in 1:n_particles_per_dimension[2], x in 1:n_particles_per_dimension[1] @@ -181,56 +160,29 @@ smoothing_length = 0.07 smoothing_kernel = SchoenbergCubicSplineKernel{2}() - initial_condition = InitialCondition(; coordinates, mass, density) + initial_condition = InitialCondition(coordinates, velocities, masses, densities) system = TotalLagrangianSPHSystem(initial_condition, - smoothing_kernel, smoothing_length, E, nu) + smoothing_kernel, smoothing_length, + E, nu, nothing) semi = Semidiscretization(system) tspan = (0.0, 1.0) + semidiscretize(semi, tspan) - # To make the code below work - function TrixiParticles.PtrArray{Float64}(::UndefInitializer, length) - TrixiParticles.PtrArray(zeros(length)) + # Apply the deformation matrix + for particle in axes(u, 2) + # Apply deformation + u[1:2, particle] = deformations[deformation](coordinates[:, particle]) end - # We can pass the data type `Array` to convert all systems to `GPUSystem`s - # and emulate the GPU kernels on the GPU. - # But this doesn't test `wrap_v` and `wrap_u` for non-`Array` types. - # In order to test this as well, we need a different data type, so we also - # pass `PtrArray`. - names = ["CPU code", "GPU code with CPU wrapping", "GPU code with GPU wrapping"] - data_types = [nothing, Array, TrixiParticles.PtrArray] - @testset "$(names[i])" for i in eachindex(names) - data_type = data_types[i] - ode = semidiscretize(semi, tspan, data_type=data_type) - - # Apply the deformation matrix - for particle in axes(u, 2) - # Apply deformation - u[1:2, particle] = deformations[deformation](coordinates[:, particle]) - end - - v_ode = ode.u0.x[1] - if isnothing(data_type) - u_ode = vec(u) - else - u_ode = data_type(vec(u)) - end + #### Verification for the particle in the middle + particle = 41 - @test typeof(v_ode) == typeof(u_ode) - @test length(v_ode) == length(u_ode) + dv = zeros(ndims(system), 81) + TrixiParticles.kick!(dv, v, u, semi, 0.0) - #### Verification for the particle in the middle - particle = 41 - - dv_ode = zero(v_ode) - TrixiParticles.kick!(dv_ode, v_ode, u_ode, ode.p, 0.0) - - dv = TrixiParticles.wrap_v(dv_ode, system, semi) - - @test isapprox(dv[:, particle], dv_expected_41[deformation], - rtol=sqrt(eps()), atol=sqrt(eps())) - end + @test isapprox(dv[:, particle], dv_expected_41[deformation], + rtol=sqrt(eps()), atol=sqrt(eps())) end end -end; +end diff --git a/test/setups/circular_shape.jl b/test/setups/circular_shape.jl new file mode 100644 index 000000000..6c40c3b16 --- /dev/null +++ b/test/setups/circular_shape.jl @@ -0,0 +1,51 @@ +@testset verbose=true "Circular Shape" begin + positions = [(0.0, 0.0), (3.0, 4.0), (-3.0, -4.0), (-3.0, 4.0), (3.0, -4)] + + # Circular shape + radius = 2.0 + particle_spacing = 0.8 + + shape_names = [ + "FillCircle", + "FillCircle with Recess", + "DrawCircle with One Layer", + "DrawCircle with Multiple Layers", + "DrawCircle Inwards", + ] + + function shape_type(position) + [ + FillCircle(), + FillCircle(x_recess=(position[1], + position[1] + radius), + y_recess=(position[2], + position[2] + + particle_spacing / 2)), + DrawCircle(), + DrawCircle(n_layers=2), + DrawCircle(n_layers=3, layer_inwards=true), + ] + end + + # Expected coordinates for the shape types above for the position [0, 0]. + expected_coords = [ + [-0.8 0.0 0.8 -1.6 -0.8 0.0 0.8 1.6 -1.6 -0.8 0.0 0.8 1.6 -1.6 -0.8 0.0 0.8 1.6 -0.8 0.0 0.8 + -1.6 -1.6 -1.6 -0.8 -0.8 -0.8 -0.8 -0.8 0.0 0.0 0.0 0.0 0.0 0.8 0.8 0.8 0.8 0.8 1.6 1.6 1.6], + [-0.8 0.0 0.8 -1.6 -0.8 0.0 0.8 1.6 -1.6 -0.8 -1.6 -0.8 0.0 0.8 1.6 -0.8 0.0 0.8 + -1.6 -1.6 -1.6 -0.8 -0.8 -0.8 -0.8 -0.8 0.0 0.0 0.8 0.8 0.8 0.8 0.8 1.6 1.6 1.6], + [2.0 1.84776 1.41421 0.765367 5.66554e-16 -0.765367 -1.41421 -1.84776 -2.0 -1.84776 -1.41421 -0.765367 -3.67394e-16 0.765367 1.41421 1.84776 + 0.0 0.765367 1.41421 1.84776 2.0 1.84776 1.41421 0.765367 1.13311e-15 -0.765367 -1.41421 -1.84776 -2.0 -1.84776 -1.41421 -0.765367], + [2.0 1.8477590650225735 1.4142135623730954 0.7653668647301797 5.66553889764798e-16 -0.765366864730179 -1.414213562373095 -1.8477590650225735 -2.0 -1.847759065022574 -1.4142135623730958 -0.7653668647301807 -3.6739403974420594e-16 0.7653668647301783 1.4142135623730947 1.847759065022573 2.8 2.6865803261205925 2.355509891927307 1.8336100550467982 1.163162036405282 0.3984815471651989 -0.398481547165198 -1.1631620364052817 -1.8336100550467977 -2.3555098919273068 -2.686580326120592 -2.8 -2.686580326120593 -2.355509891927307 -1.8336100550467984 -1.1631620364052817 -0.3984815471651986 0.3984815471651976 1.1631620364052808 1.8336100550467989 2.355509891927306 2.6865803261205925; + 0.0 0.7653668647301795 1.414213562373095 1.8477590650225735 2.0 1.8477590650225737 1.4142135623730951 0.7653668647301798 1.133107779529596e-15 -0.7653668647301785 -1.4142135623730943 -1.847759065022573 -2.0 -1.847759065022574 -1.4142135623730954 -0.7653668647301808 0.0 0.788851159156003 1.513794288875673 2.116098808191923 2.546969586992651 2.771500037266611 2.7715000372666116 2.5469695869926516 2.116098808191923 1.5137942888756737 0.7888511591560041 -9.005486838189165e-16 -0.7888511591560022 -1.513794288875673 -2.1160988081919228 -2.5469695869926516 -2.771500037266611 -2.7715000372666116 -2.5469695869926516 -2.1160988081919228 -1.513794288875675 -0.7888511591560033], + [0.4 -0.2 -0.2 1.2 0.919253 0.208378 -0.6 -1.12763 -1.12763 -0.6 0.208378 0.919253 2.0 1.84776 1.41421 0.765367 5.66554e-16 -0.765367 -1.41421 -1.84776 -2.0 -1.84776 -1.41421 -0.765367 -3.67394e-16 0.765367 1.41421 1.84776 + 0.0 0.34641 -0.34641 0.0 0.771345 1.18177 1.03923 0.410424 -0.410424 -1.03923 -1.18177 -0.771345 0.0 0.765367 1.41421 1.84776 2.0 1.84776 1.41421 0.765367 1.13311e-15 -0.765367 -1.41421 -1.84776 -2.0 -1.84776 -1.41421 -0.765367], + ] + + @testset "$(shape_names[i])" for i in eachindex(shape_names) + @testset "Position $position" for position in positions + shape = CircularShape(particle_spacing, radius, position, 1.0, + shape_type=shape_type(position)[i]) + @test isapprox(shape.coordinates, expected_coords[i] .+ position; atol=1e-4) + end + end +end diff --git a/test/setups/extrude_geometry.jl b/test/setups/extrude_geometry.jl deleted file mode 100644 index 7e0c8be4b..000000000 --- a/test/setups/extrude_geometry.jl +++ /dev/null @@ -1,110 +0,0 @@ -# 2D -@testset verbose=true "Extrude Geometry 2D" begin - point1 = [0.0, 0.0] - point2 = [0.5, 1.0] - directions = [ - [-1.0, 2.0], - -[-1.0, 2.0], - [-2.0, 1.0], - -[-2.0, 1.0], - [1.0, 0.0], - [0.0, 1.0], - ] - - @testset verbose=true "Extrude Line-Points" begin - expected_coords = [ - [0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 -0.0625 0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 -0.125 -0.0625 0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 -0.1875 -0.125 -0.0625 0.0 0.0625 0.125 0.1875 0.25 0.3125 -0.25 -0.1875 -0.125 -0.0625 0.0 0.0625 0.125 0.1875 0.25; - 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 1.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 1.125 1.25 0.375 0.5 0.625 0.75 0.875 1.0 1.125 1.25 1.375 0.5 0.625 0.75 0.875 1.0 1.125 1.25 1.375 1.5], - [0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.6875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.6875 0.75; - 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 -0.125 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 -0.25 -0.125 0.0 0.125 0.25 0.375 0.5 0.625 0.75 -0.375 -0.25 -0.125 0.0 0.125 0.25 0.375 0.5 0.625 -0.5 -0.375 -0.25 -0.125 0.0 0.125 0.25 0.375 0.5], - [0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 -0.125 -0.0625 0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 -0.25 -0.1875 -0.125 -0.0625 0.0 0.0625 0.125 0.1875 0.25 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0.0 0.0625 0.125 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0.0; - 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 0.0625 0.1875 0.3125 0.4375 0.5625 0.6875 0.8125 0.9375 1.0625 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 1.125 0.1875 0.3125 0.4375 0.5625 0.6875 0.8125 0.9375 1.0625 1.1875 0.25 0.375 0.5 0.625 0.75 0.875 1.0 1.125 1.25], - [0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.6875 0.75 0.375 0.4375 0.5 0.5625 0.625 0.6875 0.75 0.8125 0.875 0.5 0.5625 0.625 0.6875 0.75 0.8125 0.875 0.9375 1.0; - 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 -0.0625 0.0625 0.1875 0.3125 0.4375 0.5625 0.6875 0.8125 0.9375 -0.125 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 -0.1875 -0.0625 0.0625 0.1875 0.3125 0.4375 0.5625 0.6875 0.8125 -0.25 -0.125 0.0 0.125 0.25 0.375 0.5 0.625 0.75], - [0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.13975424859373686 0.20225424859373686 0.26475424859373686 0.32725424859373686 0.38975424859373686 0.45225424859373686 0.5147542485937369 0.5772542485937369 0.6397542485937369 0.2795084971874737 0.3420084971874737 0.4045084971874737 0.4670084971874737 0.5295084971874737 0.5920084971874737 0.6545084971874737 0.7170084971874737 0.7795084971874737 0.4192627457812106 0.4817627457812106 0.5442627457812106 0.6067627457812106 0.6692627457812106 0.7317627457812106 0.7942627457812106 0.8567627457812106 0.9192627457812106 0.5590169943749475 0.6215169943749475 0.6840169943749475 0.7465169943749475 0.8090169943749475 0.8715169943749475 0.9340169943749475 0.9965169943749475 1.0590169943749475; - 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0], - [0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5; - 0.0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1.0 0.13975424859373686 0.26475424859373686 0.38975424859373686 0.5147542485937369 0.6397542485937369 0.7647542485937369 0.8897542485937369 1.0147542485937369 1.1397542485937369 0.2795084971874737 0.4045084971874737 0.5295084971874737 0.6545084971874737 0.7795084971874737 0.9045084971874737 1.0295084971874737 1.1545084971874737 1.2795084971874737 0.4192627457812106 0.5442627457812106 0.6692627457812106 0.7942627457812106 0.9192627457812106 1.0442627457812106 1.1692627457812106 1.2942627457812106 1.4192627457812106 0.5590169943749475 0.6840169943749475 0.8090169943749475 0.9340169943749475 1.0590169943749475 1.1840169943749475 1.3090169943749475 1.4340169943749475 1.5590169943749475], - ] - - @testset "Direction $i" for i in eachindex(directions) - shape = extrude_geometry((point1, point2); direction=directions[i], tlsph=true, - particle_spacing=0.15, n_extrude=5, density=1.0) - - @test shape.coordinates ≈ expected_coords[i] - end - end - - @testset verbose=true "Shifted Particles" begin - point1 = [0.0, 0.0] - point2 = [0.0, 1.0] - - expected_coords = [-0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.35 -0.44999999999999996 -0.44999999999999996 -0.44999999999999996 -0.44999999999999996 -0.44999999999999996 -0.44999999999999996 -0.44999999999999996 -0.44999999999999996 -0.44999999999999996 -0.44999999999999996; - 0.05 0.15 0.24999999999999997 0.35 0.44999999999999996 0.55 0.65 0.7499999999999999 0.8499999999999999 0.95 0.05 0.15 0.24999999999999997 0.35 0.44999999999999996 0.55 0.65 0.7499999999999999 0.8499999999999999 0.95 0.05 0.15 0.24999999999999997 0.35 0.44999999999999996 0.55 0.65 0.7499999999999999 0.8499999999999999 0.95 0.05 0.15 0.24999999999999997 0.35 0.44999999999999996 0.55 0.65 0.7499999999999999 0.8499999999999999 0.95 0.05 0.15 0.24999999999999997 0.35 0.44999999999999996 0.55 0.65 0.7499999999999999 0.8499999999999999 0.95] - shape = extrude_geometry((point1, point2); direction=[-1.0, 0.0], - particle_spacing=0.1, n_extrude=5, density=1.0) - - @test shape.coordinates ≈ expected_coords - end -end - -# 3D -@testset verbose=true "Extrude Geometry 3D" begin - @testset verbose=true "Extrude 2D Shape" begin - geometry = SphereShape(0.1, 0.5, (0.2, 0.4), 1000.0, n_layers=3, - sphere_type=RoundSphere(end_angle=pi)) - particle_spacing = geometry.particle_spacing - - directions = [[0.0, 0.0, 1.0], [0.0, -1.0, 1.0]] - - expected_coords = [ - [0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994 0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994 0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994 0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994 0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994; - 0.4 0.4956708580912724 0.5767766952966369 0.6309698831278217 0.6499999999999999 0.6309698831278217 0.5767766952966369 0.4956708580912725 0.4000000000000001 0.4 0.4986063948945004 0.5892242861094592 0.6645123510239904 0.7183711983740815 0.7464375046583265 0.7464375046583265 0.7183711983740815 0.6645123510239904 0.5892242861094591 0.49860639489450054 0.4000000000000001 0.4 0.5001344202803415 0.5952476826029012 0.6805704108364301 0.7518241671106134 0.8054359905560886 0.8387175604818207 0.85 0.8387175604818207 0.8054359905560886 0.7518241671106134 0.6805704108364301 0.5952476826029012 0.5001344202803415 0.4000000000000001 0.4 0.4956708580912724 0.5767766952966369 0.6309698831278217 0.6499999999999999 0.6309698831278217 0.5767766952966369 0.4956708580912725 0.4000000000000001 0.4 0.4986063948945004 0.5892242861094592 0.6645123510239904 0.7183711983740815 0.7464375046583265 0.7464375046583265 0.7183711983740815 0.6645123510239904 0.5892242861094591 0.49860639489450054 0.4000000000000001 0.4 0.5001344202803415 0.5952476826029012 0.6805704108364301 0.7518241671106134 0.8054359905560886 0.8387175604818207 0.85 0.8387175604818207 0.8054359905560886 0.7518241671106134 0.6805704108364301 0.5952476826029012 0.5001344202803415 0.4000000000000001 0.4 0.4956708580912724 0.5767766952966369 0.6309698831278217 0.6499999999999999 0.6309698831278217 0.5767766952966369 0.4956708580912725 0.4000000000000001 0.4 0.4986063948945004 0.5892242861094592 0.6645123510239904 0.7183711983740815 0.7464375046583265 0.7464375046583265 0.7183711983740815 0.6645123510239904 0.5892242861094591 0.49860639489450054 0.4000000000000001 0.4 0.5001344202803415 0.5952476826029012 0.6805704108364301 0.7518241671106134 0.8054359905560886 0.8387175604818207 0.85 0.8387175604818207 0.8054359905560886 0.7518241671106134 0.6805704108364301 0.5952476826029012 0.5001344202803415 0.4000000000000001 0.4 0.4956708580912724 0.5767766952966369 0.6309698831278217 0.6499999999999999 0.6309698831278217 0.5767766952966369 0.4956708580912725 0.4000000000000001 0.4 0.4986063948945004 0.5892242861094592 0.6645123510239904 0.7183711983740815 0.7464375046583265 0.7464375046583265 0.7183711983740815 0.6645123510239904 0.5892242861094591 0.49860639489450054 0.4000000000000001 0.4 0.5001344202803415 0.5952476826029012 0.6805704108364301 0.7518241671106134 0.8054359905560886 0.8387175604818207 0.85 0.8387175604818207 0.8054359905560886 0.7518241671106134 0.6805704108364301 0.5952476826029012 0.5001344202803415 0.4000000000000001 0.4 0.4956708580912724 0.5767766952966369 0.6309698831278217 0.6499999999999999 0.6309698831278217 0.5767766952966369 0.4956708580912725 0.4000000000000001 0.4 0.4986063948945004 0.5892242861094592 0.6645123510239904 0.7183711983740815 0.7464375046583265 0.7464375046583265 0.7183711983740815 0.6645123510239904 0.5892242861094591 0.49860639489450054 0.4000000000000001 0.4 0.5001344202803415 0.5952476826029012 0.6805704108364301 0.7518241671106134 0.8054359905560886 0.8387175604818207 0.85 0.8387175604818207 0.8054359905560886 0.7518241671106134 0.6805704108364301 0.5952476826029012 0.5001344202803415 0.4000000000000001; - 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4], - [0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994 0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994 0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994 0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994 0.44999999999999996 0.43096988312782164 0.3767766952966369 0.29567085809127247 0.20000000000000004 0.10432914190872761 0.023223304703363173 -0.030969883127821618 -0.04999999999999993 0.55 0.5358225407650741 0.4944387364909134 0.42920125688084976 0.3453952545506602 0.24981019339564986 0.15018980660435027 0.0546047454493398 -0.029201256880849707 -0.09443873649091344 -0.135822540765074 -0.14999999999999997 0.6499999999999999 0.6387175604818206 0.6054359905560887 0.5518241671106134 0.4805704108364301 0.39524768260290116 0.3001344202803415 0.20000000000000004 0.09986557971965856 0.0047523173970988875 -0.08057041083643002 -0.1518241671106133 -0.20543599055608852 -0.23871756048182058 -0.24999999999999994; - 0.4 0.4956708580912724 0.5767766952966369 0.6309698831278217 0.6499999999999999 0.6309698831278217 0.5767766952966369 0.4956708580912725 0.4000000000000001 0.4 0.4986063948945004 0.5892242861094592 0.6645123510239904 0.7183711983740815 0.7464375046583265 0.7464375046583265 0.7183711983740815 0.6645123510239904 0.5892242861094591 0.49860639489450054 0.4000000000000001 0.4 0.5001344202803415 0.5952476826029012 0.6805704108364301 0.7518241671106134 0.8054359905560886 0.8387175604818207 0.85 0.8387175604818207 0.8054359905560886 0.7518241671106134 0.6805704108364301 0.5952476826029012 0.5001344202803415 0.4000000000000001 0.3292893218813453 0.4249601799726177 0.5060660171779822 0.5602592050091669 0.5792893218813452 0.5602592050091669 0.5060660171779822 0.4249601799726177 0.3292893218813453 0.3292893218813453 0.4278957167758457 0.5185136079908045 0.5938016729053357 0.6476605202554268 0.6757268265396718 0.6757268265396718 0.6476605202554268 0.5938016729053357 0.5185136079908044 0.4278957167758458 0.3292893218813453 0.3292893218813453 0.4294237421616868 0.5245370044842464 0.6098597327177754 0.6811134889919587 0.7347253124374339 0.7680068823631659 0.7792893218813453 0.7680068823631659 0.7347253124374339 0.6811134889919587 0.6098597327177754 0.5245370044842464 0.4294237421616868 0.3292893218813453 0.2585786437626905 0.3542495018539629 0.4353553390593274 0.48954852689051215 0.5085786437626905 0.48954852689051215 0.4353553390593274 0.354249501853963 0.2585786437626906 0.2585786437626905 0.3571850386571909 0.4478029298721497 0.5230909947866809 0.576949842136772 0.605016148421017 0.605016148421017 0.576949842136772 0.5230909947866809 0.4478029298721496 0.35718503865719103 0.2585786437626906 0.2585786437626905 0.358713064043032 0.45382632636559167 0.5391490545991207 0.610402810873304 0.6640146343187792 0.6972962042445112 0.7085786437626904 0.6972962042445112 0.6640146343187792 0.610402810873304 0.5391490545991207 0.45382632636559167 0.358713064043032 0.2585786437626906 0.18786796564403574 0.28353882373530814 0.3646446609406726 0.41883784877185737 0.43786796564403563 0.41883784877185737 0.3646446609406726 0.2835388237353082 0.1878679656440358 0.18786796564403574 0.28647436053853614 0.3770922517534949 0.45238031666802614 0.5062391640181172 0.5343054703023622 0.5343054703023622 0.5062391640181172 0.45238031666802614 0.3770922517534948 0.28647436053853625 0.1878679656440358 0.18786796564403574 0.2880023859243772 0.3831156482469369 0.4684383764804658 0.5396921327546491 0.5933039562001243 0.6265855261258564 0.6378679656440357 0.6265855261258564 0.5933039562001243 0.5396921327546491 0.4684383764804658 0.3831156482469369 0.2880023859243772 0.1878679656440358 0.11715728752538102 0.21282814561665342 0.2939339828220179 0.34812717065320264 0.3671572875253809 0.34812717065320264 0.2939339828220179 0.21282814561665347 0.11715728752538107 0.11715728752538102 0.21576368241988142 0.3063815736348402 0.3816696385493714 0.43552848589946247 0.46359479218370747 0.46359479218370747 0.43552848589946247 0.3816696385493714 0.3063815736348401 0.21576368241988153 0.11715728752538107 0.11715728752538102 0.2172917078057225 0.31240497012828217 0.3977276983618111 0.4689814546359944 0.5225932780814696 0.5558748480072017 0.567157287525381 0.5558748480072017 0.5225932780814696 0.4689814546359944 0.3977276983618111 0.31240497012828217 0.2172917078057225 0.11715728752538107; - 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.07071067811865475 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.1414213562373095 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.21213203435596428 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619 0.282842712474619], - ] - - @testset "Direction $i" for i in eachindex(directions) - shape = extrude_geometry(geometry; direction=directions[i], particle_spacing, - n_extrude=5, tlsph=true, density=1.0) - - @test shape.coordinates ≈ expected_coords[i] - end - end - - @testset verbose=true "Extrude 3D Plane" begin - p1 = [0.0, 0.0, 0.0] - p2 = [0.5, 1.0, 1.0] - p3 = [1.0, 0.2, 0.0] - - direction = [0.0, 0.0, 1.0] - - expected_coords = [0.0 0.09090909090909091 0.18181818181818182 0.2727272727272727 0.36363636363636365 0.45454545454545453 0.5454545454545454 0.6363636363636364 0.7272727272727273 0.8181818181818182 0.9090909090909091 1.0 0.03333333333333333 0.12424242424242424 0.21515151515151515 0.30606060606060603 0.396969696969697 0.48787878787878786 0.5787878787878787 0.6696969696969697 0.7606060606060606 0.8515151515151516 0.9424242424242424 1.0333333333333334 0.06666666666666667 0.1575757575757576 0.24848484848484848 0.33939393939393936 0.4303030303030303 0.5212121212121212 0.6121212121212121 0.703030303030303 0.793939393939394 0.8848484848484849 0.9757575757575757 1.0666666666666667 0.1 0.19090909090909092 0.28181818181818186 0.3727272727272727 0.4636363636363636 0.5545454545454546 0.6454545454545454 0.7363636363636363 0.8272727272727273 0.9181818181818182 1.009090909090909 1.1 0.13333333333333333 0.22424242424242424 0.3151515151515152 0.406060606060606 0.49696969696969695 0.5878787878787879 0.6787878787878787 0.7696969696969697 0.8606060606060606 0.9515151515151515 1.0424242424242425 1.1333333333333333 0.16666666666666666 0.25757575757575757 0.3484848484848485 0.43939393939393934 0.5303030303030303 0.6212121212121212 0.712121212121212 0.803030303030303 0.8939393939393939 0.9848484848484849 1.0757575757575757 1.1666666666666667 0.2 0.2909090909090909 0.38181818181818183 0.4727272727272727 0.5636363636363637 0.6545454545454545 0.7454545454545454 0.8363636363636364 0.9272727272727272 1.0181818181818183 1.1090909090909091 1.2 0.23333333333333334 0.3242424242424242 0.41515151515151516 0.5060606060606061 0.5969696969696969 0.6878787878787879 0.7787878787878788 0.8696969696969696 0.9606060606060607 1.0515151515151515 1.1424242424242423 1.2333333333333334 0.26666666666666666 0.35757575757575755 0.4484848484848485 0.5393939393939393 0.6303030303030304 0.7212121212121212 0.812121212121212 0.9030303030303031 0.9939393939393939 1.084848484848485 1.1757575757575758 1.2666666666666666 0.3 0.3909090909090909 0.4818181818181818 0.5727272727272728 0.6636363636363636 0.7545454545454545 0.8454545454545455 0.9363636363636363 1.0272727272727273 1.1181818181818182 1.209090909090909 1.3 0.3333333333333333 0.4242424242424242 0.5151515151515151 0.606060606060606 0.696969696969697 0.7878787878787878 0.8787878787878787 0.9696969696969697 1.0606060606060606 1.1515151515151516 1.2424242424242424 1.3333333333333333 0.36666666666666664 0.4575757575757575 0.5484848484848485 0.6393939393939394 0.7303030303030302 0.8212121212121212 0.9121212121212121 1.003030303030303 1.093939393939394 1.1848484848484848 1.2757575757575756 1.3666666666666667 0.4 0.49090909090909096 0.5818181818181818 0.6727272727272727 0.7636363636363637 0.8545454545454545 0.9454545454545454 1.0363636363636364 1.1272727272727274 1.2181818181818183 1.309090909090909 1.4 0.43333333333333335 0.5242424242424243 0.6151515151515152 0.706060606060606 0.796969696969697 0.8878787878787879 0.9787878787878788 1.0696969696969698 1.1606060606060606 1.2515151515151515 1.3424242424242423 1.4333333333333333 0.4666666666666667 0.5575757575757576 0.6484848484848484 0.7393939393939394 0.8303030303030303 0.9212121212121211 1.0121212121212122 1.103030303030303 1.1939393939393939 1.284848484848485 1.3757575757575757 1.4666666666666668 0.5 0.5909090909090909 0.6818181818181819 0.7727272727272727 0.8636363636363636 0.9545454545454546 1.0454545454545454 1.1363636363636362 1.2272727272727273 1.3181818181818183 1.4090909090909092 1.5 0.0 0.09090909090909091 0.18181818181818182 0.2727272727272727 0.36363636363636365 0.45454545454545453 0.5454545454545454 0.6363636363636364 0.7272727272727273 0.8181818181818182 0.9090909090909091 1.0 0.03333333333333333 0.12424242424242424 0.21515151515151515 0.30606060606060603 0.396969696969697 0.48787878787878786 0.5787878787878787 0.6696969696969697 0.7606060606060606 0.8515151515151516 0.9424242424242424 1.0333333333333334 0.06666666666666667 0.1575757575757576 0.24848484848484848 0.33939393939393936 0.4303030303030303 0.5212121212121212 0.6121212121212121 0.703030303030303 0.793939393939394 0.8848484848484849 0.9757575757575757 1.0666666666666667 0.1 0.19090909090909092 0.28181818181818186 0.3727272727272727 0.4636363636363636 0.5545454545454546 0.6454545454545454 0.7363636363636363 0.8272727272727273 0.9181818181818182 1.009090909090909 1.1 0.13333333333333333 0.22424242424242424 0.3151515151515152 0.406060606060606 0.49696969696969695 0.5878787878787879 0.6787878787878787 0.7696969696969697 0.8606060606060606 0.9515151515151515 1.0424242424242425 1.1333333333333333 0.16666666666666666 0.25757575757575757 0.3484848484848485 0.43939393939393934 0.5303030303030303 0.6212121212121212 0.712121212121212 0.803030303030303 0.8939393939393939 0.9848484848484849 1.0757575757575757 1.1666666666666667 0.2 0.2909090909090909 0.38181818181818183 0.4727272727272727 0.5636363636363637 0.6545454545454545 0.7454545454545454 0.8363636363636364 0.9272727272727272 1.0181818181818183 1.1090909090909091 1.2 0.23333333333333334 0.3242424242424242 0.41515151515151516 0.5060606060606061 0.5969696969696969 0.6878787878787879 0.7787878787878788 0.8696969696969696 0.9606060606060607 1.0515151515151515 1.1424242424242423 1.2333333333333334 0.26666666666666666 0.35757575757575755 0.4484848484848485 0.5393939393939393 0.6303030303030304 0.7212121212121212 0.812121212121212 0.9030303030303031 0.9939393939393939 1.084848484848485 1.1757575757575758 1.2666666666666666 0.3 0.3909090909090909 0.4818181818181818 0.5727272727272728 0.6636363636363636 0.7545454545454545 0.8454545454545455 0.9363636363636363 1.0272727272727273 1.1181818181818182 1.209090909090909 1.3 0.3333333333333333 0.4242424242424242 0.5151515151515151 0.606060606060606 0.696969696969697 0.7878787878787878 0.8787878787878787 0.9696969696969697 1.0606060606060606 1.1515151515151516 1.2424242424242424 1.3333333333333333 0.36666666666666664 0.4575757575757575 0.5484848484848485 0.6393939393939394 0.7303030303030302 0.8212121212121212 0.9121212121212121 1.003030303030303 1.093939393939394 1.1848484848484848 1.2757575757575756 1.3666666666666667 0.4 0.49090909090909096 0.5818181818181818 0.6727272727272727 0.7636363636363637 0.8545454545454545 0.9454545454545454 1.0363636363636364 1.1272727272727274 1.2181818181818183 1.309090909090909 1.4 0.43333333333333335 0.5242424242424243 0.6151515151515152 0.706060606060606 0.796969696969697 0.8878787878787879 0.9787878787878788 1.0696969696969698 1.1606060606060606 1.2515151515151515 1.3424242424242423 1.4333333333333333 0.4666666666666667 0.5575757575757576 0.6484848484848484 0.7393939393939394 0.8303030303030303 0.9212121212121211 1.0121212121212122 1.103030303030303 1.1939393939393939 1.284848484848485 1.3757575757575757 1.4666666666666668 0.5 0.5909090909090909 0.6818181818181819 0.7727272727272727 0.8636363636363636 0.9545454545454546 1.0454545454545454 1.1363636363636362 1.2272727272727273 1.3181818181818183 1.4090909090909092 1.5 0.0 0.09090909090909091 0.18181818181818182 0.2727272727272727 0.36363636363636365 0.45454545454545453 0.5454545454545454 0.6363636363636364 0.7272727272727273 0.8181818181818182 0.9090909090909091 1.0 0.03333333333333333 0.12424242424242424 0.21515151515151515 0.30606060606060603 0.396969696969697 0.48787878787878786 0.5787878787878787 0.6696969696969697 0.7606060606060606 0.8515151515151516 0.9424242424242424 1.0333333333333334 0.06666666666666667 0.1575757575757576 0.24848484848484848 0.33939393939393936 0.4303030303030303 0.5212121212121212 0.6121212121212121 0.703030303030303 0.793939393939394 0.8848484848484849 0.9757575757575757 1.0666666666666667 0.1 0.19090909090909092 0.28181818181818186 0.3727272727272727 0.4636363636363636 0.5545454545454546 0.6454545454545454 0.7363636363636363 0.8272727272727273 0.9181818181818182 1.009090909090909 1.1 0.13333333333333333 0.22424242424242424 0.3151515151515152 0.406060606060606 0.49696969696969695 0.5878787878787879 0.6787878787878787 0.7696969696969697 0.8606060606060606 0.9515151515151515 1.0424242424242425 1.1333333333333333 0.16666666666666666 0.25757575757575757 0.3484848484848485 0.43939393939393934 0.5303030303030303 0.6212121212121212 0.712121212121212 0.803030303030303 0.8939393939393939 0.9848484848484849 1.0757575757575757 1.1666666666666667 0.2 0.2909090909090909 0.38181818181818183 0.4727272727272727 0.5636363636363637 0.6545454545454545 0.7454545454545454 0.8363636363636364 0.9272727272727272 1.0181818181818183 1.1090909090909091 1.2 0.23333333333333334 0.3242424242424242 0.41515151515151516 0.5060606060606061 0.5969696969696969 0.6878787878787879 0.7787878787878788 0.8696969696969696 0.9606060606060607 1.0515151515151515 1.1424242424242423 1.2333333333333334 0.26666666666666666 0.35757575757575755 0.4484848484848485 0.5393939393939393 0.6303030303030304 0.7212121212121212 0.812121212121212 0.9030303030303031 0.9939393939393939 1.084848484848485 1.1757575757575758 1.2666666666666666 0.3 0.3909090909090909 0.4818181818181818 0.5727272727272728 0.6636363636363636 0.7545454545454545 0.8454545454545455 0.9363636363636363 1.0272727272727273 1.1181818181818182 1.209090909090909 1.3 0.3333333333333333 0.4242424242424242 0.5151515151515151 0.606060606060606 0.696969696969697 0.7878787878787878 0.8787878787878787 0.9696969696969697 1.0606060606060606 1.1515151515151516 1.2424242424242424 1.3333333333333333 0.36666666666666664 0.4575757575757575 0.5484848484848485 0.6393939393939394 0.7303030303030302 0.8212121212121212 0.9121212121212121 1.003030303030303 1.093939393939394 1.1848484848484848 1.2757575757575756 1.3666666666666667 0.4 0.49090909090909096 0.5818181818181818 0.6727272727272727 0.7636363636363637 0.8545454545454545 0.9454545454545454 1.0363636363636364 1.1272727272727274 1.2181818181818183 1.309090909090909 1.4 0.43333333333333335 0.5242424242424243 0.6151515151515152 0.706060606060606 0.796969696969697 0.8878787878787879 0.9787878787878788 1.0696969696969698 1.1606060606060606 1.2515151515151515 1.3424242424242423 1.4333333333333333 0.4666666666666667 0.5575757575757576 0.6484848484848484 0.7393939393939394 0.8303030303030303 0.9212121212121211 1.0121212121212122 1.103030303030303 1.1939393939393939 1.284848484848485 1.3757575757575757 1.4666666666666668 0.5 0.5909090909090909 0.6818181818181819 0.7727272727272727 0.8636363636363636 0.9545454545454546 1.0454545454545454 1.1363636363636362 1.2272727272727273 1.3181818181818183 1.4090909090909092 1.5 0.0 0.09090909090909091 0.18181818181818182 0.2727272727272727 0.36363636363636365 0.45454545454545453 0.5454545454545454 0.6363636363636364 0.7272727272727273 0.8181818181818182 0.9090909090909091 1.0 0.03333333333333333 0.12424242424242424 0.21515151515151515 0.30606060606060603 0.396969696969697 0.48787878787878786 0.5787878787878787 0.6696969696969697 0.7606060606060606 0.8515151515151516 0.9424242424242424 1.0333333333333334 0.06666666666666667 0.1575757575757576 0.24848484848484848 0.33939393939393936 0.4303030303030303 0.5212121212121212 0.6121212121212121 0.703030303030303 0.793939393939394 0.8848484848484849 0.9757575757575757 1.0666666666666667 0.1 0.19090909090909092 0.28181818181818186 0.3727272727272727 0.4636363636363636 0.5545454545454546 0.6454545454545454 0.7363636363636363 0.8272727272727273 0.9181818181818182 1.009090909090909 1.1 0.13333333333333333 0.22424242424242424 0.3151515151515152 0.406060606060606 0.49696969696969695 0.5878787878787879 0.6787878787878787 0.7696969696969697 0.8606060606060606 0.9515151515151515 1.0424242424242425 1.1333333333333333 0.16666666666666666 0.25757575757575757 0.3484848484848485 0.43939393939393934 0.5303030303030303 0.6212121212121212 0.712121212121212 0.803030303030303 0.8939393939393939 0.9848484848484849 1.0757575757575757 1.1666666666666667 0.2 0.2909090909090909 0.38181818181818183 0.4727272727272727 0.5636363636363637 0.6545454545454545 0.7454545454545454 0.8363636363636364 0.9272727272727272 1.0181818181818183 1.1090909090909091 1.2 0.23333333333333334 0.3242424242424242 0.41515151515151516 0.5060606060606061 0.5969696969696969 0.6878787878787879 0.7787878787878788 0.8696969696969696 0.9606060606060607 1.0515151515151515 1.1424242424242423 1.2333333333333334 0.26666666666666666 0.35757575757575755 0.4484848484848485 0.5393939393939393 0.6303030303030304 0.7212121212121212 0.812121212121212 0.9030303030303031 0.9939393939393939 1.084848484848485 1.1757575757575758 1.2666666666666666 0.3 0.3909090909090909 0.4818181818181818 0.5727272727272728 0.6636363636363636 0.7545454545454545 0.8454545454545455 0.9363636363636363 1.0272727272727273 1.1181818181818182 1.209090909090909 1.3 0.3333333333333333 0.4242424242424242 0.5151515151515151 0.606060606060606 0.696969696969697 0.7878787878787878 0.8787878787878787 0.9696969696969697 1.0606060606060606 1.1515151515151516 1.2424242424242424 1.3333333333333333 0.36666666666666664 0.4575757575757575 0.5484848484848485 0.6393939393939394 0.7303030303030302 0.8212121212121212 0.9121212121212121 1.003030303030303 1.093939393939394 1.1848484848484848 1.2757575757575756 1.3666666666666667 0.4 0.49090909090909096 0.5818181818181818 0.6727272727272727 0.7636363636363637 0.8545454545454545 0.9454545454545454 1.0363636363636364 1.1272727272727274 1.2181818181818183 1.309090909090909 1.4 0.43333333333333335 0.5242424242424243 0.6151515151515152 0.706060606060606 0.796969696969697 0.8878787878787879 0.9787878787878788 1.0696969696969698 1.1606060606060606 1.2515151515151515 1.3424242424242423 1.4333333333333333 0.4666666666666667 0.5575757575757576 0.6484848484848484 0.7393939393939394 0.8303030303030303 0.9212121212121211 1.0121212121212122 1.103030303030303 1.1939393939393939 1.284848484848485 1.3757575757575757 1.4666666666666668 0.5 0.5909090909090909 0.6818181818181819 0.7727272727272727 0.8636363636363636 0.9545454545454546 1.0454545454545454 1.1363636363636362 1.2272727272727273 1.3181818181818183 1.4090909090909092 1.5; - 0.0 0.018181818181818184 0.03636363636363637 0.05454545454545454 0.07272727272727274 0.09090909090909091 0.10909090909090909 0.1272727272727273 0.14545454545454548 0.16363636363636366 0.18181818181818182 0.2 0.06666666666666667 0.08484848484848485 0.10303030303030303 0.12121212121212122 0.1393939393939394 0.1575757575757576 0.17575757575757575 0.19393939393939397 0.21212121212121215 0.23030303030303034 0.24848484848484848 0.26666666666666666 0.13333333333333333 0.15151515151515152 0.1696969696969697 0.18787878787878787 0.20606060606060606 0.22424242424242424 0.24242424242424243 0.2606060606060606 0.2787878787878788 0.296969696969697 0.3151515151515152 0.33333333333333337 0.2 0.2181818181818182 0.2363636363636364 0.2545454545454546 0.27272727272727276 0.2909090909090909 0.3090909090909091 0.32727272727272727 0.34545454545454546 0.36363636363636365 0.38181818181818183 0.4 0.26666666666666666 0.28484848484848485 0.30303030303030304 0.3212121212121212 0.3393939393939394 0.35757575757575755 0.37575757575757573 0.3939393939393939 0.4121212121212121 0.4303030303030303 0.4484848484848485 0.4666666666666667 0.3333333333333333 0.3515151515151515 0.3696969696969697 0.3878787878787879 0.40606060606060607 0.4242424242424242 0.4424242424242424 0.4606060606060606 0.47878787878787876 0.49696969696969695 0.5151515151515151 0.5333333333333333 0.4 0.4181818181818182 0.4363636363636364 0.4545454545454546 0.4727272727272728 0.49090909090909096 0.5090909090909091 0.5272727272727273 0.5454545454545455 0.5636363636363637 0.5818181818181818 0.6000000000000001 0.4666666666666667 0.48484848484848486 0.503030303030303 0.5212121212121212 0.5393939393939394 0.5575757575757576 0.5757575757575758 0.593939393939394 0.6121212121212122 0.6303030303030304 0.6484848484848484 0.6666666666666667 0.5333333333333333 0.5515151515151515 0.5696969696969697 0.5878787878787879 0.6060606060606061 0.6242424242424243 0.6424242424242425 0.6606060606060606 0.6787878787878788 0.696969696969697 0.7151515151515151 0.7333333333333334 0.6 0.6181818181818182 0.6363636363636364 0.6545454545454545 0.6727272727272727 0.6909090909090909 0.7090909090909091 0.7272727272727273 0.7454545454545455 0.7636363636363637 0.7818181818181817 0.8 0.6666666666666666 0.6848484848484848 0.703030303030303 0.7212121212121212 0.7393939393939394 0.7575757575757576 0.7757575757575758 0.793939393939394 0.8121212121212121 0.8303030303030303 0.8484848484848484 0.8666666666666667 0.7333333333333333 0.7515151515151515 0.7696969696969697 0.7878787878787878 0.806060606060606 0.8242424242424242 0.8424242424242424 0.8606060606060606 0.8787878787878788 0.896969696969697 0.915151515151515 0.9333333333333333 0.8 0.8181818181818182 0.8363636363636364 0.8545454545454546 0.8727272727272728 0.890909090909091 0.9090909090909092 0.9272727272727274 0.9454545454545455 0.9636363636363637 0.9818181818181819 1.0 0.8666666666666667 0.8848484848484849 0.9030303030303031 0.9212121212121213 0.9393939393939394 0.9575757575757576 0.9757575757575758 0.993939393939394 1.0121212121212122 1.0303030303030303 1.0484848484848486 1.0666666666666667 0.9333333333333333 0.9515151515151515 0.9696969696969697 0.9878787878787879 1.006060606060606 1.0242424242424242 1.0424242424242425 1.0606060606060606 1.0787878787878789 1.096969696969697 1.1151515151515152 1.1333333333333333 1.0 1.018181818181818 1.0363636363636364 1.0545454545454545 1.0727272727272728 1.0909090909090908 1.1090909090909091 1.1272727272727272 1.1454545454545455 1.1636363636363636 1.1818181818181819 1.2 0.0 0.018181818181818184 0.03636363636363637 0.05454545454545454 0.07272727272727274 0.09090909090909091 0.10909090909090909 0.1272727272727273 0.14545454545454548 0.16363636363636366 0.18181818181818182 0.2 0.06666666666666667 0.08484848484848485 0.10303030303030303 0.12121212121212122 0.1393939393939394 0.1575757575757576 0.17575757575757575 0.19393939393939397 0.21212121212121215 0.23030303030303034 0.24848484848484848 0.26666666666666666 0.13333333333333333 0.15151515151515152 0.1696969696969697 0.18787878787878787 0.20606060606060606 0.22424242424242424 0.24242424242424243 0.2606060606060606 0.2787878787878788 0.296969696969697 0.3151515151515152 0.33333333333333337 0.2 0.2181818181818182 0.2363636363636364 0.2545454545454546 0.27272727272727276 0.2909090909090909 0.3090909090909091 0.32727272727272727 0.34545454545454546 0.36363636363636365 0.38181818181818183 0.4 0.26666666666666666 0.28484848484848485 0.30303030303030304 0.3212121212121212 0.3393939393939394 0.35757575757575755 0.37575757575757573 0.3939393939393939 0.4121212121212121 0.4303030303030303 0.4484848484848485 0.4666666666666667 0.3333333333333333 0.3515151515151515 0.3696969696969697 0.3878787878787879 0.40606060606060607 0.4242424242424242 0.4424242424242424 0.4606060606060606 0.47878787878787876 0.49696969696969695 0.5151515151515151 0.5333333333333333 0.4 0.4181818181818182 0.4363636363636364 0.4545454545454546 0.4727272727272728 0.49090909090909096 0.5090909090909091 0.5272727272727273 0.5454545454545455 0.5636363636363637 0.5818181818181818 0.6000000000000001 0.4666666666666667 0.48484848484848486 0.503030303030303 0.5212121212121212 0.5393939393939394 0.5575757575757576 0.5757575757575758 0.593939393939394 0.6121212121212122 0.6303030303030304 0.6484848484848484 0.6666666666666667 0.5333333333333333 0.5515151515151515 0.5696969696969697 0.5878787878787879 0.6060606060606061 0.6242424242424243 0.6424242424242425 0.6606060606060606 0.6787878787878788 0.696969696969697 0.7151515151515151 0.7333333333333334 0.6 0.6181818181818182 0.6363636363636364 0.6545454545454545 0.6727272727272727 0.6909090909090909 0.7090909090909091 0.7272727272727273 0.7454545454545455 0.7636363636363637 0.7818181818181817 0.8 0.6666666666666666 0.6848484848484848 0.703030303030303 0.7212121212121212 0.7393939393939394 0.7575757575757576 0.7757575757575758 0.793939393939394 0.8121212121212121 0.8303030303030303 0.8484848484848484 0.8666666666666667 0.7333333333333333 0.7515151515151515 0.7696969696969697 0.7878787878787878 0.806060606060606 0.8242424242424242 0.8424242424242424 0.8606060606060606 0.8787878787878788 0.896969696969697 0.915151515151515 0.9333333333333333 0.8 0.8181818181818182 0.8363636363636364 0.8545454545454546 0.8727272727272728 0.890909090909091 0.9090909090909092 0.9272727272727274 0.9454545454545455 0.9636363636363637 0.9818181818181819 1.0 0.8666666666666667 0.8848484848484849 0.9030303030303031 0.9212121212121213 0.9393939393939394 0.9575757575757576 0.9757575757575758 0.993939393939394 1.0121212121212122 1.0303030303030303 1.0484848484848486 1.0666666666666667 0.9333333333333333 0.9515151515151515 0.9696969696969697 0.9878787878787879 1.006060606060606 1.0242424242424242 1.0424242424242425 1.0606060606060606 1.0787878787878789 1.096969696969697 1.1151515151515152 1.1333333333333333 1.0 1.018181818181818 1.0363636363636364 1.0545454545454545 1.0727272727272728 1.0909090909090908 1.1090909090909091 1.1272727272727272 1.1454545454545455 1.1636363636363636 1.1818181818181819 1.2 0.0 0.018181818181818184 0.03636363636363637 0.05454545454545454 0.07272727272727274 0.09090909090909091 0.10909090909090909 0.1272727272727273 0.14545454545454548 0.16363636363636366 0.18181818181818182 0.2 0.06666666666666667 0.08484848484848485 0.10303030303030303 0.12121212121212122 0.1393939393939394 0.1575757575757576 0.17575757575757575 0.19393939393939397 0.21212121212121215 0.23030303030303034 0.24848484848484848 0.26666666666666666 0.13333333333333333 0.15151515151515152 0.1696969696969697 0.18787878787878787 0.20606060606060606 0.22424242424242424 0.24242424242424243 0.2606060606060606 0.2787878787878788 0.296969696969697 0.3151515151515152 0.33333333333333337 0.2 0.2181818181818182 0.2363636363636364 0.2545454545454546 0.27272727272727276 0.2909090909090909 0.3090909090909091 0.32727272727272727 0.34545454545454546 0.36363636363636365 0.38181818181818183 0.4 0.26666666666666666 0.28484848484848485 0.30303030303030304 0.3212121212121212 0.3393939393939394 0.35757575757575755 0.37575757575757573 0.3939393939393939 0.4121212121212121 0.4303030303030303 0.4484848484848485 0.4666666666666667 0.3333333333333333 0.3515151515151515 0.3696969696969697 0.3878787878787879 0.40606060606060607 0.4242424242424242 0.4424242424242424 0.4606060606060606 0.47878787878787876 0.49696969696969695 0.5151515151515151 0.5333333333333333 0.4 0.4181818181818182 0.4363636363636364 0.4545454545454546 0.4727272727272728 0.49090909090909096 0.5090909090909091 0.5272727272727273 0.5454545454545455 0.5636363636363637 0.5818181818181818 0.6000000000000001 0.4666666666666667 0.48484848484848486 0.503030303030303 0.5212121212121212 0.5393939393939394 0.5575757575757576 0.5757575757575758 0.593939393939394 0.6121212121212122 0.6303030303030304 0.6484848484848484 0.6666666666666667 0.5333333333333333 0.5515151515151515 0.5696969696969697 0.5878787878787879 0.6060606060606061 0.6242424242424243 0.6424242424242425 0.6606060606060606 0.6787878787878788 0.696969696969697 0.7151515151515151 0.7333333333333334 0.6 0.6181818181818182 0.6363636363636364 0.6545454545454545 0.6727272727272727 0.6909090909090909 0.7090909090909091 0.7272727272727273 0.7454545454545455 0.7636363636363637 0.7818181818181817 0.8 0.6666666666666666 0.6848484848484848 0.703030303030303 0.7212121212121212 0.7393939393939394 0.7575757575757576 0.7757575757575758 0.793939393939394 0.8121212121212121 0.8303030303030303 0.8484848484848484 0.8666666666666667 0.7333333333333333 0.7515151515151515 0.7696969696969697 0.7878787878787878 0.806060606060606 0.8242424242424242 0.8424242424242424 0.8606060606060606 0.8787878787878788 0.896969696969697 0.915151515151515 0.9333333333333333 0.8 0.8181818181818182 0.8363636363636364 0.8545454545454546 0.8727272727272728 0.890909090909091 0.9090909090909092 0.9272727272727274 0.9454545454545455 0.9636363636363637 0.9818181818181819 1.0 0.8666666666666667 0.8848484848484849 0.9030303030303031 0.9212121212121213 0.9393939393939394 0.9575757575757576 0.9757575757575758 0.993939393939394 1.0121212121212122 1.0303030303030303 1.0484848484848486 1.0666666666666667 0.9333333333333333 0.9515151515151515 0.9696969696969697 0.9878787878787879 1.006060606060606 1.0242424242424242 1.0424242424242425 1.0606060606060606 1.0787878787878789 1.096969696969697 1.1151515151515152 1.1333333333333333 1.0 1.018181818181818 1.0363636363636364 1.0545454545454545 1.0727272727272728 1.0909090909090908 1.1090909090909091 1.1272727272727272 1.1454545454545455 1.1636363636363636 1.1818181818181819 1.2 0.0 0.018181818181818184 0.03636363636363637 0.05454545454545454 0.07272727272727274 0.09090909090909091 0.10909090909090909 0.1272727272727273 0.14545454545454548 0.16363636363636366 0.18181818181818182 0.2 0.06666666666666667 0.08484848484848485 0.10303030303030303 0.12121212121212122 0.1393939393939394 0.1575757575757576 0.17575757575757575 0.19393939393939397 0.21212121212121215 0.23030303030303034 0.24848484848484848 0.26666666666666666 0.13333333333333333 0.15151515151515152 0.1696969696969697 0.18787878787878787 0.20606060606060606 0.22424242424242424 0.24242424242424243 0.2606060606060606 0.2787878787878788 0.296969696969697 0.3151515151515152 0.33333333333333337 0.2 0.2181818181818182 0.2363636363636364 0.2545454545454546 0.27272727272727276 0.2909090909090909 0.3090909090909091 0.32727272727272727 0.34545454545454546 0.36363636363636365 0.38181818181818183 0.4 0.26666666666666666 0.28484848484848485 0.30303030303030304 0.3212121212121212 0.3393939393939394 0.35757575757575755 0.37575757575757573 0.3939393939393939 0.4121212121212121 0.4303030303030303 0.4484848484848485 0.4666666666666667 0.3333333333333333 0.3515151515151515 0.3696969696969697 0.3878787878787879 0.40606060606060607 0.4242424242424242 0.4424242424242424 0.4606060606060606 0.47878787878787876 0.49696969696969695 0.5151515151515151 0.5333333333333333 0.4 0.4181818181818182 0.4363636363636364 0.4545454545454546 0.4727272727272728 0.49090909090909096 0.5090909090909091 0.5272727272727273 0.5454545454545455 0.5636363636363637 0.5818181818181818 0.6000000000000001 0.4666666666666667 0.48484848484848486 0.503030303030303 0.5212121212121212 0.5393939393939394 0.5575757575757576 0.5757575757575758 0.593939393939394 0.6121212121212122 0.6303030303030304 0.6484848484848484 0.6666666666666667 0.5333333333333333 0.5515151515151515 0.5696969696969697 0.5878787878787879 0.6060606060606061 0.6242424242424243 0.6424242424242425 0.6606060606060606 0.6787878787878788 0.696969696969697 0.7151515151515151 0.7333333333333334 0.6 0.6181818181818182 0.6363636363636364 0.6545454545454545 0.6727272727272727 0.6909090909090909 0.7090909090909091 0.7272727272727273 0.7454545454545455 0.7636363636363637 0.7818181818181817 0.8 0.6666666666666666 0.6848484848484848 0.703030303030303 0.7212121212121212 0.7393939393939394 0.7575757575757576 0.7757575757575758 0.793939393939394 0.8121212121212121 0.8303030303030303 0.8484848484848484 0.8666666666666667 0.7333333333333333 0.7515151515151515 0.7696969696969697 0.7878787878787878 0.806060606060606 0.8242424242424242 0.8424242424242424 0.8606060606060606 0.8787878787878788 0.896969696969697 0.915151515151515 0.9333333333333333 0.8 0.8181818181818182 0.8363636363636364 0.8545454545454546 0.8727272727272728 0.890909090909091 0.9090909090909092 0.9272727272727274 0.9454545454545455 0.9636363636363637 0.9818181818181819 1.0 0.8666666666666667 0.8848484848484849 0.9030303030303031 0.9212121212121213 0.9393939393939394 0.9575757575757576 0.9757575757575758 0.993939393939394 1.0121212121212122 1.0303030303030303 1.0484848484848486 1.0666666666666667 0.9333333333333333 0.9515151515151515 0.9696969696969697 0.9878787878787879 1.006060606060606 1.0242424242424242 1.0424242424242425 1.0606060606060606 1.0787878787878789 1.096969696969697 1.1151515151515152 1.1333333333333333 1.0 1.018181818181818 1.0363636363636364 1.0545454545454545 1.0727272727272728 1.0909090909090908 1.1090909090909091 1.1272727272727272 1.1454545454545455 1.1636363636363636 1.1818181818181819 1.2; - 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.7333333333333333 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.8666666666666667 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 0.9333333333333333 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.092709445701687 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.15937611236835367 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.22604277903502035 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.292709445701687 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.35937611236835365 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.4260427790350203 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.492709445701687 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.5593761123683537 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.6260427790350204 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.692709445701687 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.7593761123683537 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8260427790350203 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.8927094457016871 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 0.9593761123683537 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.0260427790350204 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 1.092709445701687 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.185418891403374 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.2520855580700407 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.31875222473670733 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.38541889140337404 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.4520855580700407 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.5187522247367073 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.585418891403374 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.6520855580700406 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.7187522247367073 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.785418891403374 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.8520855580700406 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.9187522247367073 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 0.985418891403374 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.0520855580700408 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.1187522247367074 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 1.185418891403374 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.278128337105061 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.34479500377172767 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.4114616704383943 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.47812833710506103 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.5447950037717277 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.6114616704383944 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.678128337105061 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.7447950037717277 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.8114616704383943 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.878128337105061 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 0.9447950037717276 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0114616704383943 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.0781283371050612 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.1447950037717276 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.2114616704383945 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061 1.278128337105061] - - shape = extrude_geometry((p1, p2, p3); direction, particle_spacing=0.1, n_extrude=4, - density=1000.0, tlsph=true) - - @test shape.coordinates ≈ expected_coords - end - - @testset verbose=true "Shifted Particles" begin - p1 = [0.0, 0.0, 0.0] - p2 = [0.5, 1.0, 0.0] - p3 = [1.0, 0.2, 0.0] - - direction = [0.0, 0.0, 1.0] - - expected_coords = [0.0713897135595439 0.1615839068026347 0.25177810004572554 0.3419722932888163 0.43216648653190715 0.5223606797749979 0.6125548730180886 0.7027490662611794 0.7929432595042704 0.8831374527473611 0.9733316459904519 0.11277868087318066 0.20297287411627146 0.29316706735936227 0.383361260602453 0.47355545384554387 0.5637496470886346 0.6539438403317254 0.7441380335748161 0.8343322268179071 0.9245264200609978 1.0147206133040885 0.15416764818681739 0.2443618414299082 0.334556034672999 0.42475022791608974 0.5149444211591806 0.6051386144022713 0.6953328076453621 0.7855270008884528 0.8757211941315438 0.9659153873746346 1.0561095806177252 0.19555661550045414 0.28575080874354497 0.3759450019866357 0.46613919522972647 0.5563333884728173 0.6465275817159081 0.7367217749589988 0.8269159682020896 0.9171101614451805 1.0073043546882714 1.0974985479313621 0.2369455828140909 0.3271397760571817 0.4173339693002725 0.5075281625433632 0.5977223557864542 0.6879165490295449 0.7781107422726357 0.8683049355157264 0.9584991287588174 1.0486933220019081 1.1388875152449989 0.2783345501277276 0.3685287433708184 0.4587229366139092 0.5489171298569999 0.6391113231000909 0.7293055163431816 0.8194997095862724 0.9096939028293631 0.9998880960724541 1.0900822893155449 1.1802764825586356 0.3197235174413644 0.4099177106844552 0.500111903927546 0.5903060971706368 0.6805002904137276 0.7706944836568184 0.8608886768999091 0.9510828701429999 1.0412770633860908 1.1314712566291816 1.2216654498722723 0.36111248475500113 0.45130667799809193 0.5415008712411827 0.6316950644842735 0.7218892577273643 0.8120834509704551 0.9022776442135458 0.9924718374566366 1.0826660306997276 1.1728602239428183 1.263054417185909 0.40250145206863785 0.49269564531172866 0.5828898385548195 0.6730840317979102 0.7632782250410011 0.8534724182840918 0.9436666115271826 1.0338608047702733 1.1240549980133643 1.214249191256455 1.3044433844995458 0.4438904193822747 0.5340846126253656 0.6242788058684563 0.714472999111547 0.8046671923546379 0.8948613855977287 0.9850555788408194 1.07524977208391 1.1654439653270012 1.255638158570092 1.3458323518131827 0.4852793866959113 0.5754735799390021 0.6656677731820929 0.7558619664251837 0.8460561596682745 0.9362503529113653 1.026444546154456 1.1166387393975468 1.2068329326406377 1.2970271258837285 1.3872213191268192 0.5266683540095481 0.616862547252639 0.7070567404957298 0.7972509337388205 0.8874451269819114 0.9776393202250021 1.0678335134680927 1.1580277067111835 1.2482218999542747 1.3384160931973654 1.4286102864404562 0.0713897135595439 0.1615839068026347 0.25177810004572554 0.3419722932888163 0.43216648653190715 0.5223606797749979 0.6125548730180886 0.7027490662611794 0.7929432595042704 0.8831374527473611 0.9733316459904519 0.11277868087318066 0.20297287411627146 0.29316706735936227 0.383361260602453 0.47355545384554387 0.5637496470886346 0.6539438403317254 0.7441380335748161 0.8343322268179071 0.9245264200609978 1.0147206133040885 0.15416764818681739 0.2443618414299082 0.334556034672999 0.42475022791608974 0.5149444211591806 0.6051386144022713 0.6953328076453621 0.7855270008884528 0.8757211941315438 0.9659153873746346 1.0561095806177252 0.19555661550045414 0.28575080874354497 0.3759450019866357 0.46613919522972647 0.5563333884728173 0.6465275817159081 0.7367217749589988 0.8269159682020896 0.9171101614451805 1.0073043546882714 1.0974985479313621 0.2369455828140909 0.3271397760571817 0.4173339693002725 0.5075281625433632 0.5977223557864542 0.6879165490295449 0.7781107422726357 0.8683049355157264 0.9584991287588174 1.0486933220019081 1.1388875152449989 0.2783345501277276 0.3685287433708184 0.4587229366139092 0.5489171298569999 0.6391113231000909 0.7293055163431816 0.8194997095862724 0.9096939028293631 0.9998880960724541 1.0900822893155449 1.1802764825586356 0.3197235174413644 0.4099177106844552 0.500111903927546 0.5903060971706368 0.6805002904137276 0.7706944836568184 0.8608886768999091 0.9510828701429999 1.0412770633860908 1.1314712566291816 1.2216654498722723 0.36111248475500113 0.45130667799809193 0.5415008712411827 0.6316950644842735 0.7218892577273643 0.8120834509704551 0.9022776442135458 0.9924718374566366 1.0826660306997276 1.1728602239428183 1.263054417185909 0.40250145206863785 0.49269564531172866 0.5828898385548195 0.6730840317979102 0.7632782250410011 0.8534724182840918 0.9436666115271826 1.0338608047702733 1.1240549980133643 1.214249191256455 1.3044433844995458 0.4438904193822747 0.5340846126253656 0.6242788058684563 0.714472999111547 0.8046671923546379 0.8948613855977287 0.9850555788408194 1.07524977208391 1.1654439653270012 1.255638158570092 1.3458323518131827 0.4852793866959113 0.5754735799390021 0.6656677731820929 0.7558619664251837 0.8460561596682745 0.9362503529113653 1.026444546154456 1.1166387393975468 1.2068329326406377 1.2970271258837285 1.3872213191268192 0.5266683540095481 0.616862547252639 0.7070567404957298 0.7972509337388205 0.8874451269819114 0.9776393202250021 1.0678335134680927 1.1580277067111835 1.2482218999542747 1.3384160931973654 1.4286102864404562 0.0713897135595439 0.1615839068026347 0.25177810004572554 0.3419722932888163 0.43216648653190715 0.5223606797749979 0.6125548730180886 0.7027490662611794 0.7929432595042704 0.8831374527473611 0.9733316459904519 0.11277868087318066 0.20297287411627146 0.29316706735936227 0.383361260602453 0.47355545384554387 0.5637496470886346 0.6539438403317254 0.7441380335748161 0.8343322268179071 0.9245264200609978 1.0147206133040885 0.15416764818681739 0.2443618414299082 0.334556034672999 0.42475022791608974 0.5149444211591806 0.6051386144022713 0.6953328076453621 0.7855270008884528 0.8757211941315438 0.9659153873746346 1.0561095806177252 0.19555661550045414 0.28575080874354497 0.3759450019866357 0.46613919522972647 0.5563333884728173 0.6465275817159081 0.7367217749589988 0.8269159682020896 0.9171101614451805 1.0073043546882714 1.0974985479313621 0.2369455828140909 0.3271397760571817 0.4173339693002725 0.5075281625433632 0.5977223557864542 0.6879165490295449 0.7781107422726357 0.8683049355157264 0.9584991287588174 1.0486933220019081 1.1388875152449989 0.2783345501277276 0.3685287433708184 0.4587229366139092 0.5489171298569999 0.6391113231000909 0.7293055163431816 0.8194997095862724 0.9096939028293631 0.9998880960724541 1.0900822893155449 1.1802764825586356 0.3197235174413644 0.4099177106844552 0.500111903927546 0.5903060971706368 0.6805002904137276 0.7706944836568184 0.8608886768999091 0.9510828701429999 1.0412770633860908 1.1314712566291816 1.2216654498722723 0.36111248475500113 0.45130667799809193 0.5415008712411827 0.6316950644842735 0.7218892577273643 0.8120834509704551 0.9022776442135458 0.9924718374566366 1.0826660306997276 1.1728602239428183 1.263054417185909 0.40250145206863785 0.49269564531172866 0.5828898385548195 0.6730840317979102 0.7632782250410011 0.8534724182840918 0.9436666115271826 1.0338608047702733 1.1240549980133643 1.214249191256455 1.3044433844995458 0.4438904193822747 0.5340846126253656 0.6242788058684563 0.714472999111547 0.8046671923546379 0.8948613855977287 0.9850555788408194 1.07524977208391 1.1654439653270012 1.255638158570092 1.3458323518131827 0.4852793866959113 0.5754735799390021 0.6656677731820929 0.7558619664251837 0.8460561596682745 0.9362503529113653 1.026444546154456 1.1166387393975468 1.2068329326406377 1.2970271258837285 1.3872213191268192 0.5266683540095481 0.616862547252639 0.7070567404957298 0.7972509337388205 0.8874451269819114 0.9776393202250021 1.0678335134680927 1.1580277067111835 1.2482218999542747 1.3384160931973654 1.4286102864404562 0.0713897135595439 0.1615839068026347 0.25177810004572554 0.3419722932888163 0.43216648653190715 0.5223606797749979 0.6125548730180886 0.7027490662611794 0.7929432595042704 0.8831374527473611 0.9733316459904519 0.11277868087318066 0.20297287411627146 0.29316706735936227 0.383361260602453 0.47355545384554387 0.5637496470886346 0.6539438403317254 0.7441380335748161 0.8343322268179071 0.9245264200609978 1.0147206133040885 0.15416764818681739 0.2443618414299082 0.334556034672999 0.42475022791608974 0.5149444211591806 0.6051386144022713 0.6953328076453621 0.7855270008884528 0.8757211941315438 0.9659153873746346 1.0561095806177252 0.19555661550045414 0.28575080874354497 0.3759450019866357 0.46613919522972647 0.5563333884728173 0.6465275817159081 0.7367217749589988 0.8269159682020896 0.9171101614451805 1.0073043546882714 1.0974985479313621 0.2369455828140909 0.3271397760571817 0.4173339693002725 0.5075281625433632 0.5977223557864542 0.6879165490295449 0.7781107422726357 0.8683049355157264 0.9584991287588174 1.0486933220019081 1.1388875152449989 0.2783345501277276 0.3685287433708184 0.4587229366139092 0.5489171298569999 0.6391113231000909 0.7293055163431816 0.8194997095862724 0.9096939028293631 0.9998880960724541 1.0900822893155449 1.1802764825586356 0.3197235174413644 0.4099177106844552 0.500111903927546 0.5903060971706368 0.6805002904137276 0.7706944836568184 0.8608886768999091 0.9510828701429999 1.0412770633860908 1.1314712566291816 1.2216654498722723 0.36111248475500113 0.45130667799809193 0.5415008712411827 0.6316950644842735 0.7218892577273643 0.8120834509704551 0.9022776442135458 0.9924718374566366 1.0826660306997276 1.1728602239428183 1.263054417185909 0.40250145206863785 0.49269564531172866 0.5828898385548195 0.6730840317979102 0.7632782250410011 0.8534724182840918 0.9436666115271826 1.0338608047702733 1.1240549980133643 1.214249191256455 1.3044433844995458 0.4438904193822747 0.5340846126253656 0.6242788058684563 0.714472999111547 0.8046671923546379 0.8948613855977287 0.9850555788408194 1.07524977208391 1.1654439653270012 1.255638158570092 1.3458323518131827 0.4852793866959113 0.5754735799390021 0.6656677731820929 0.7558619664251837 0.8460561596682745 0.9362503529113653 1.026444546154456 1.1166387393975468 1.2068329326406377 1.2970271258837285 1.3872213191268192 0.5266683540095481 0.616862547252639 0.7070567404957298 0.7972509337388205 0.8874451269819114 0.9776393202250021 1.0678335134680927 1.1580277067111835 1.2482218999542747 1.3384160931973654 1.4286102864404562; - 0.054527166306904996 0.07256600495552315 0.09060484360414131 0.10864368225275947 0.12668252090137763 0.1447213595499958 0.16276019819861395 0.18079903684723211 0.19883787549585027 0.21687671414446844 0.2349155527930866 0.1373051009341785 0.15534393958279666 0.17338277823141482 0.19142161688003298 0.20946045552865114 0.2274992941772693 0.24553813282588746 0.26357697147450565 0.28161581012312376 0.29965464877174197 0.3176934874203601 0.22008303556145198 0.23812187421007014 0.2561607128586883 0.27419955150730646 0.2922383901559246 0.3102772288045428 0.32831606745316094 0.3463549061017791 0.36439374475039726 0.3824325833990154 0.4004714220476336 0.3028609701887255 0.32089980883734365 0.3389386474859618 0.35697748613457997 0.37501632478319813 0.3930551634318163 0.41109400208043445 0.4291328407290526 0.44717167937767077 0.46521051802628893 0.4832493566749071 0.385638904815999 0.40367774346461716 0.4217165821132353 0.4397554207618535 0.45779425941047164 0.4758330980590898 0.49387193670770796 0.5119107753563261 0.5299496140049442 0.5479884526535624 0.5660272913021807 0.46841683944327245 0.4864556780918906 0.5044945167405088 0.5225333553891269 0.540572194037745 0.5586110326863633 0.5766498713349815 0.5946887099835996 0.6127275486322177 0.6307663872808359 0.6488052259294541 0.551194774070546 0.5692336127191642 0.5872724513677823 0.6053112900164004 0.6233501286650186 0.6413889673136368 0.6594278059622549 0.677466644610873 0.6955054832594912 0.7135443219081095 0.7315831605567276 0.6339727086978194 0.6520115473464376 0.6700503859950557 0.6880892246436738 0.706128063292292 0.7241669019409103 0.7422057405895284 0.7602445792381465 0.7782834178867647 0.7963222565353829 0.814361095184001 0.716750643325093 0.7347894819737111 0.7528283206223293 0.7708671592709475 0.7889059979195656 0.8069448365681837 0.8249836752168019 0.8430225138654202 0.8610613525140383 0.8791001911626564 0.8971390298112746 0.7995285779523665 0.8175674166009848 0.8356062552496029 0.853645093898221 0.8716839325468392 0.8897227711954574 0.9077616098440755 0.9258004484926936 0.9438392871413118 0.96187812578993 0.9799169644385481 0.8823065125796399 0.900345351228258 0.9183841898768762 0.9364230285254944 0.9544618671741125 0.9725007058227306 0.9905395444713488 1.008578383119967 1.0266172217685852 1.0446560604172033 1.0626948990658214 0.9650844472069134 0.9831232858555317 1.0011621245041498 1.0192009631527679 1.0372398018013862 1.0552786404500043 1.0733174790986224 1.0913563177472405 1.1093951563958586 1.127433995044477 1.145472833693095 0.054527166306904996 0.07256600495552315 0.09060484360414131 0.10864368225275947 0.12668252090137763 0.1447213595499958 0.16276019819861395 0.18079903684723211 0.19883787549585027 0.21687671414446844 0.2349155527930866 0.1373051009341785 0.15534393958279666 0.17338277823141482 0.19142161688003298 0.20946045552865114 0.2274992941772693 0.24553813282588746 0.26357697147450565 0.28161581012312376 0.29965464877174197 0.3176934874203601 0.22008303556145198 0.23812187421007014 0.2561607128586883 0.27419955150730646 0.2922383901559246 0.3102772288045428 0.32831606745316094 0.3463549061017791 0.36439374475039726 0.3824325833990154 0.4004714220476336 0.3028609701887255 0.32089980883734365 0.3389386474859618 0.35697748613457997 0.37501632478319813 0.3930551634318163 0.41109400208043445 0.4291328407290526 0.44717167937767077 0.46521051802628893 0.4832493566749071 0.385638904815999 0.40367774346461716 0.4217165821132353 0.4397554207618535 0.45779425941047164 0.4758330980590898 0.49387193670770796 0.5119107753563261 0.5299496140049442 0.5479884526535624 0.5660272913021807 0.46841683944327245 0.4864556780918906 0.5044945167405088 0.5225333553891269 0.540572194037745 0.5586110326863633 0.5766498713349815 0.5946887099835996 0.6127275486322177 0.6307663872808359 0.6488052259294541 0.551194774070546 0.5692336127191642 0.5872724513677823 0.6053112900164004 0.6233501286650186 0.6413889673136368 0.6594278059622549 0.677466644610873 0.6955054832594912 0.7135443219081095 0.7315831605567276 0.6339727086978194 0.6520115473464376 0.6700503859950557 0.6880892246436738 0.706128063292292 0.7241669019409103 0.7422057405895284 0.7602445792381465 0.7782834178867647 0.7963222565353829 0.814361095184001 0.716750643325093 0.7347894819737111 0.7528283206223293 0.7708671592709475 0.7889059979195656 0.8069448365681837 0.8249836752168019 0.8430225138654202 0.8610613525140383 0.8791001911626564 0.8971390298112746 0.7995285779523665 0.8175674166009848 0.8356062552496029 0.853645093898221 0.8716839325468392 0.8897227711954574 0.9077616098440755 0.9258004484926936 0.9438392871413118 0.96187812578993 0.9799169644385481 0.8823065125796399 0.900345351228258 0.9183841898768762 0.9364230285254944 0.9544618671741125 0.9725007058227306 0.9905395444713488 1.008578383119967 1.0266172217685852 1.0446560604172033 1.0626948990658214 0.9650844472069134 0.9831232858555317 1.0011621245041498 1.0192009631527679 1.0372398018013862 1.0552786404500043 1.0733174790986224 1.0913563177472405 1.1093951563958586 1.127433995044477 1.145472833693095 0.054527166306904996 0.07256600495552315 0.09060484360414131 0.10864368225275947 0.12668252090137763 0.1447213595499958 0.16276019819861395 0.18079903684723211 0.19883787549585027 0.21687671414446844 0.2349155527930866 0.1373051009341785 0.15534393958279666 0.17338277823141482 0.19142161688003298 0.20946045552865114 0.2274992941772693 0.24553813282588746 0.26357697147450565 0.28161581012312376 0.29965464877174197 0.3176934874203601 0.22008303556145198 0.23812187421007014 0.2561607128586883 0.27419955150730646 0.2922383901559246 0.3102772288045428 0.32831606745316094 0.3463549061017791 0.36439374475039726 0.3824325833990154 0.4004714220476336 0.3028609701887255 0.32089980883734365 0.3389386474859618 0.35697748613457997 0.37501632478319813 0.3930551634318163 0.41109400208043445 0.4291328407290526 0.44717167937767077 0.46521051802628893 0.4832493566749071 0.385638904815999 0.40367774346461716 0.4217165821132353 0.4397554207618535 0.45779425941047164 0.4758330980590898 0.49387193670770796 0.5119107753563261 0.5299496140049442 0.5479884526535624 0.5660272913021807 0.46841683944327245 0.4864556780918906 0.5044945167405088 0.5225333553891269 0.540572194037745 0.5586110326863633 0.5766498713349815 0.5946887099835996 0.6127275486322177 0.6307663872808359 0.6488052259294541 0.551194774070546 0.5692336127191642 0.5872724513677823 0.6053112900164004 0.6233501286650186 0.6413889673136368 0.6594278059622549 0.677466644610873 0.6955054832594912 0.7135443219081095 0.7315831605567276 0.6339727086978194 0.6520115473464376 0.6700503859950557 0.6880892246436738 0.706128063292292 0.7241669019409103 0.7422057405895284 0.7602445792381465 0.7782834178867647 0.7963222565353829 0.814361095184001 0.716750643325093 0.7347894819737111 0.7528283206223293 0.7708671592709475 0.7889059979195656 0.8069448365681837 0.8249836752168019 0.8430225138654202 0.8610613525140383 0.8791001911626564 0.8971390298112746 0.7995285779523665 0.8175674166009848 0.8356062552496029 0.853645093898221 0.8716839325468392 0.8897227711954574 0.9077616098440755 0.9258004484926936 0.9438392871413118 0.96187812578993 0.9799169644385481 0.8823065125796399 0.900345351228258 0.9183841898768762 0.9364230285254944 0.9544618671741125 0.9725007058227306 0.9905395444713488 1.008578383119967 1.0266172217685852 1.0446560604172033 1.0626948990658214 0.9650844472069134 0.9831232858555317 1.0011621245041498 1.0192009631527679 1.0372398018013862 1.0552786404500043 1.0733174790986224 1.0913563177472405 1.1093951563958586 1.127433995044477 1.145472833693095 0.054527166306904996 0.07256600495552315 0.09060484360414131 0.10864368225275947 0.12668252090137763 0.1447213595499958 0.16276019819861395 0.18079903684723211 0.19883787549585027 0.21687671414446844 0.2349155527930866 0.1373051009341785 0.15534393958279666 0.17338277823141482 0.19142161688003298 0.20946045552865114 0.2274992941772693 0.24553813282588746 0.26357697147450565 0.28161581012312376 0.29965464877174197 0.3176934874203601 0.22008303556145198 0.23812187421007014 0.2561607128586883 0.27419955150730646 0.2922383901559246 0.3102772288045428 0.32831606745316094 0.3463549061017791 0.36439374475039726 0.3824325833990154 0.4004714220476336 0.3028609701887255 0.32089980883734365 0.3389386474859618 0.35697748613457997 0.37501632478319813 0.3930551634318163 0.41109400208043445 0.4291328407290526 0.44717167937767077 0.46521051802628893 0.4832493566749071 0.385638904815999 0.40367774346461716 0.4217165821132353 0.4397554207618535 0.45779425941047164 0.4758330980590898 0.49387193670770796 0.5119107753563261 0.5299496140049442 0.5479884526535624 0.5660272913021807 0.46841683944327245 0.4864556780918906 0.5044945167405088 0.5225333553891269 0.540572194037745 0.5586110326863633 0.5766498713349815 0.5946887099835996 0.6127275486322177 0.6307663872808359 0.6488052259294541 0.551194774070546 0.5692336127191642 0.5872724513677823 0.6053112900164004 0.6233501286650186 0.6413889673136368 0.6594278059622549 0.677466644610873 0.6955054832594912 0.7135443219081095 0.7315831605567276 0.6339727086978194 0.6520115473464376 0.6700503859950557 0.6880892246436738 0.706128063292292 0.7241669019409103 0.7422057405895284 0.7602445792381465 0.7782834178867647 0.7963222565353829 0.814361095184001 0.716750643325093 0.7347894819737111 0.7528283206223293 0.7708671592709475 0.7889059979195656 0.8069448365681837 0.8249836752168019 0.8430225138654202 0.8610613525140383 0.8791001911626564 0.8971390298112746 0.7995285779523665 0.8175674166009848 0.8356062552496029 0.853645093898221 0.8716839325468392 0.8897227711954574 0.9077616098440755 0.9258004484926936 0.9438392871413118 0.96187812578993 0.9799169644385481 0.8823065125796399 0.900345351228258 0.9183841898768762 0.9364230285254944 0.9544618671741125 0.9725007058227306 0.9905395444713488 1.008578383119967 1.0266172217685852 1.0446560604172033 1.0626948990658214 0.9650844472069134 0.9831232858555317 1.0011621245041498 1.0192009631527679 1.0372398018013862 1.0552786404500043 1.0733174790986224 1.0913563177472405 1.1093951563958586 1.127433995044477 1.145472833693095; - 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.14198039027185572 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.2339607805437114 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671 0.3259411708155671] - - shape = extrude_geometry((p1, p2, p3); direction, particle_spacing=0.1, n_extrude=4, - density=1000.0) - - @test shape.coordinates ≈ expected_coords - end -end diff --git a/test/setups/rectangular_shape.jl b/test/setups/rectangular_shape.jl index 8a57132e9..91dc2019f 100644 --- a/test/setups/rectangular_shape.jl +++ b/test/setups/rectangular_shape.jl @@ -1,363 +1,58 @@ # 2D -@testset verbose=true "Rectangular Shape 2D" begin - @testset verbose=true "No Hydrostatic Pressure" begin - @testset "Positions" begin - # Rectangular shape - particle_spacing = 0.01 - n_particles_per_dimension = (4, 3) - - positions = [(0.0, 0.0), (3.0, 4.0), (-3.0, -4.0), (-3.0, 4.0), (3.0, -4.0)] - - expected_coords = [ - [0.005 0.005 0.005 0.015 0.015 0.015 0.025 0.025 0.025 0.035 0.035 0.035; - 0.005 0.015 0.025 0.005 0.015 0.025 0.005 0.015 0.025 0.005 0.015 0.025], - [3.005 3.005 3.005 3.015 3.015 3.015 3.025 3.025 3.025 3.035 3.035 3.035; - 4.005 4.015 4.025 4.005 4.015 4.025 4.005 4.015 4.025 4.005 4.015 4.025], - [-2.995 -2.995 -2.995 -2.985 -2.985 -2.985 -2.975 -2.975 -2.975 -2.965 -2.965 -2.965; - -3.995 -3.985 -3.975 -3.995 -3.985 -3.975 -3.995 -3.985 -3.975 -3.995 -3.985 -3.975], - [-2.995 -2.995 -2.995 -2.985 -2.985 -2.985 -2.975 -2.975 -2.975 -2.965 -2.965 -2.965; - 4.005 4.015 4.025 4.005 4.015 4.025 4.005 4.015 4.025 4.005 4.015 4.025], - [3.005 3.005 3.005 3.015 3.015 3.015 3.025 3.025 3.025 3.035 3.035 3.035; - -3.995 -3.985 -3.975 -3.995 -3.985 -3.975 -3.995 -3.985 -3.975 -3.995 -3.985 -3.975], - ] - - @testset "Position $i" for i in eachindex(positions) - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, positions[i], - density=1.0, loop_order=:x_first) - - @test shape.coordinates == expected_coords[i] - end - end - - @testset verbose=true "Loop Orders" begin - loop_orders = [:y_first, :x_first] - - expected_coords = [ - [0.0 1.0 0.0 1.0; - 0.0 0.0 1.0 1.0], - [0.0 0.0 1.0 1.0; - 0.0 1.0 0.0 1.0], - ] - - @testset "$(loop_orders[i])" for i in eachindex(loop_orders) - shape = RectangularShape(1.0, (2, 2), (0.0, 0.0), density=1.0, tlsph=true, - loop_order=loop_orders[i]) - - @test shape.coordinates == expected_coords[i] - end - end - end - - # Only show all of these nested testsets in case of errors - @testset verbose=false "Incompressible Hydrostatic Pressure" begin - particle_spacing = 0.1 - - pressure = [0.95 0.85 0.75 0.65 0.55 0.45 0.35 0.25 0.15 0.05; - 0.95 0.85 0.75 0.65 0.55 0.45 0.35 0.25 0.15 0.05] - - @testset "Vertical Gravity" begin - n_particles_per_dimension = (2, 10) - - @testset "Loop Order :y_first" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - density=1000.0, acceleration=(0.0, -9.81)) - - @test shape.pressure ≈ 9.81 * 1000.0 * vec(pressure) - @test shape.density == 1000 * ones(20) - @test shape.mass == 1000 * 0.1^2 * ones(20) - end - - @testset "Loop Order :x_first" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - density=1000.0, acceleration=(0.0, -9.81), - loop_order=:x_first) - - # Transpose `pressure` - @test shape.pressure ≈ 9.81 * 1000.0 * vec(pressure') - end - - @testset "Positive Acceleration" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - density=1000.0, acceleration=(0.0, 9.81)) - - # Same as before, but revsere pressure - @test shape.pressure ≈ 9.81 * 1000.0 * vec(reverse(pressure)) - end - end - - @testset "Horizontal Gravity" begin - n_particles_per_dimension = (10, 2) - - @testset "Loop Order :y_first" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - density=1000.0, acceleration=(-3.73, 0.0)) - - @test shape.pressure ≈ 3.73 * 1000.0 * vec(pressure') - @test shape.density == 1000 * ones(prod(n_particles_per_dimension)) - @test shape.mass == - 1000 * particle_spacing^2 * ones(prod(n_particles_per_dimension)) - end - - @testset "Loop Order :x_first" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - density=1000.0, acceleration=(-3.73, 0.0), - loop_order=:x_first) - - # Don't transpose `pressure` - @test shape.pressure ≈ 3.73 * 1000.0 * vec(pressure) - end - - @testset "Positive Acceleration" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - density=1000.0, acceleration=(4.71, 0.0)) - - # Same as before, but revsere pressure - @test shape.pressure ≈ 4.71 * 1000.0 * vec(reverse(pressure')) - end - end - end - - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Compressible Hydrostatic Pressure" begin - particle_spacing = 0.1 - - state_equation = Val(:state_equation) - function TrixiParticles.inverse_state_equation(::Val{:state_equation}, pressure) - return 1000.0 + 10pressure - end - - pressure = [2300.0 1100.0 500.0 200.0 50.0; - 2300.0 1100.0 500.0 200.0 50.0] - - # Only show all of these nested testsets in case of errors - @testset verbose=false "Vertical Gravity" begin - n_particles_per_dimension = (2, 5) - - @testset "Loop Order :y_first" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - acceleration=(0.0, -1.0), - state_equation=state_equation) - - @test shape.pressure ≈ vec(pressure) - @test shape.density == - TrixiParticles.inverse_state_equation.(Ref(state_equation), - shape.pressure) - @test shape.mass == particle_spacing^2 * shape.density - end - - @testset "Loop Order :x_first" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - acceleration=(0.0, -1.0), - state_equation=state_equation, - loop_order=:x_first) - - # Transpose `pressure` - @test shape.pressure ≈ vec(pressure') - end - - @testset "Positive Acceleration" begin - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - acceleration=(0.0, 1.0), - state_equation=state_equation) - - @test shape.pressure ≈ vec(reverse(pressure)) - @test shape.density == - TrixiParticles.inverse_state_equation.(Ref(state_equation), - shape.pressure) - @test shape.mass == particle_spacing^2 * shape.density - end - end - - @testset "Horizontal Gravity" begin - n_particles_per_dimension = (5, 2) - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, (0.0, 0.0), - acceleration=(-1.0, 0.0), - state_equation=state_equation) - - @test shape.pressure ≈ 1.0 * vec(pressure') - @test shape.density == - TrixiParticles.inverse_state_equation.(Ref(state_equation), - shape.pressure) - @test shape.mass == particle_spacing^2 * shape.density - end +@testset "Rectangular Shape 2D" begin + + # Rectangular shape + particle_spacing = 0.01 + n_particles_per_dimension = (4, 3) + + positions = [(0.0, 0.0), (3.0, 4.0), (-3.0, -4.0), (-3.0, 4.0), (3.0, -4.0)] + + expected_coords = [ + [0.0 0.0 0.0 0.01 0.01 0.01 0.02 0.02 0.02 0.03 0.03 0.03; + 0.0 0.01 0.02 0.0 0.01 0.02 0.0 0.01 0.02 0.0 0.01 0.02], + [3.0 3.0 3.0 3.01 3.01 3.01 3.02 3.02 3.02 3.03 3.03 3.03; + 4.0 4.01 4.02 4.0 4.01 4.02 4.0 4.01 4.02 4.0 4.01 4.02], + [-3.0 -3.0 -3.0 -2.99 -2.99 -2.99 -2.98 -2.98 -2.98 -2.97 -2.97 -2.97; + -4.0 -3.99 -3.98 -4.0 -3.99 -3.98 -4.0 -3.99 -3.98 -4.0 -3.99 -3.98], + [-3.0 -3.0 -3.0 -2.99 -2.99 -2.99 -2.98 -2.98 -2.98 -2.97 -2.97 -2.97; + 4.0 4.01 4.02 4.0 4.01 4.02 4.0 4.01 4.02 4.0 4.01 4.02], + [3.0 3.0 3.0 3.01 3.01 3.01 3.02 3.02 3.02 3.03 3.03 3.03; + -4.0 -3.99 -3.98 -4.0 -3.99 -3.98 -4.0 -3.99 -3.98 -4.0 -3.99 -3.98], + ] + + @testset "Position $i" for i in eachindex(positions) + shape = RectangularShape(particle_spacing, + n_particles_per_dimension, positions[i], 1.0) + + @test shape.coordinates == expected_coords[i] end end # 3D -@testset verbose=true "Rectangular Shape 3D" begin - @testset verbose=true "No Hydrostatic Pressure" begin - @testset "Positions" begin - # Rectangular shape - particle_spacing = 0.01 - n_particles_per_dimension = (4, 3, 5) - - positions = [(0.0, 0.0, 0.0), (3.0, 4.0, 2.0), (-3.0, -4.0, -2.0)] - - expected_coords = [ - [0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.005 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.015 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.025 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035; - 0.005 0.005 0.005 0.005 0.005 0.015 0.015 0.015 0.015 0.015 0.025 0.025 0.025 0.025 0.025 0.005 0.005 0.005 0.005 0.005 0.015 0.015 0.015 0.015 0.015 0.025 0.025 0.025 0.025 0.025 0.005 0.005 0.005 0.005 0.005 0.015 0.015 0.015 0.015 0.015 0.025 0.025 0.025 0.025 0.025 0.005 0.005 0.005 0.005 0.005 0.015 0.015 0.015 0.015 0.015 0.025 0.025 0.025 0.025 0.025; - 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045 0.005 0.015 0.025 0.035 0.045], - [3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.005 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.015 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.025 3.035 3.035 3.035 3.035 3.035 3.035 3.035 3.035 3.035 3.035 3.035 3.035 3.035 3.035 3.035; - 4.005 4.005 4.005 4.005 4.005 4.015 4.015 4.015 4.015 4.015 4.025 4.025 4.025 4.025 4.025 4.005 4.005 4.005 4.005 4.005 4.015 4.015 4.015 4.015 4.015 4.025 4.025 4.025 4.025 4.025 4.005 4.005 4.005 4.005 4.005 4.015 4.015 4.015 4.015 4.015 4.025 4.025 4.025 4.025 4.025 4.005 4.005 4.005 4.005 4.005 4.015 4.015 4.015 4.015 4.015 4.025 4.025 4.025 4.025 4.025; - 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045 2.005 2.015 2.025 2.035 2.045], - [-2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.995 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.985 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.975 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965 -2.965; - -3.995 -3.995 -3.995 -3.995 -3.995 -3.985 -3.985 -3.985 -3.985 -3.985 -3.975 -3.975 -3.975 -3.975 -3.975 -3.995 -3.995 -3.995 -3.995 -3.995 -3.985 -3.985 -3.985 -3.985 -3.985 -3.975 -3.975 -3.975 -3.975 -3.975 -3.995 -3.995 -3.995 -3.995 -3.995 -3.985 -3.985 -3.985 -3.985 -3.985 -3.975 -3.975 -3.975 -3.975 -3.975 -3.995 -3.995 -3.995 -3.995 -3.995 -3.985 -3.985 -3.985 -3.985 -3.985 -3.975 -3.975 -3.975 -3.975 -3.975; - -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955 -1.995 -1.985 -1.975 -1.965 -1.955], - ] - - @testset "Position $i" for i in eachindex(positions) - shape = RectangularShape(particle_spacing, - n_particles_per_dimension, positions[i], - density=1.0, loop_order=:x_first) - - @test shape.coordinates == expected_coords[i] - end - end - - @testset verbose=true "Loop Orders" begin - loop_orders = [:z_first, :y_first, :x_first] - - expected_coords = [ - [0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0; - 0.0 0.0 1.0 1.0 0.0 0.0 1.0 1.0; - 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0], - [0.0 0.0 1.0 1.0 0.0 0.0 1.0 1.0; - 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0; - 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0], - [0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0; - 0.0 0.0 1.0 1.0 0.0 0.0 1.0 1.0; - 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0], - ] - - @testset "$(loop_orders[i])" for i in eachindex(loop_orders) - shape = RectangularShape(1.0, (2, 2, 2), (0.0, 0.0, 0.0), density=1.0, - tlsph=true, loop_order=loop_orders[i]) - - @test shape.coordinates == expected_coords[i] - end - end - end - - @testset "Incompressible Hydrostatic Pressure" begin - particle_spacing = 0.2 - - # Pressure distribution with gravity `(0.0, -1.0, 0.0)` and density `1.0` - pressure = [0.9; 0.9;; - 0.7; 0.7;; - 0.5; 0.5;; - 0.3; 0.3;; - 0.1; 0.1;;; - 0.9; 0.9;; - 0.7; 0.7;; - 0.5; 0.5;; - 0.3; 0.3;; - 0.1; 0.1;;; - 0.9; 0.9;; - 0.7; 0.7;; - 0.5; 0.5;; - 0.3; 0.3;; - 0.1; 0.1] - - n_particles_per_dimension = (2, 5, 3) - acceleration = (0.0, -9.81, 0.0) - - loop_orders = [:z_first, :y_first, :x_first] - permutations = [ - [1, 2, 3], # Gravity in negative y-direction - [2, 1, 3], # Gravity in negative x-direction - [1, 3, 2], # Gravity in negative z-direction - ] - - @testset "Permutation $permutation" for permutation in permutations - @testset "Loop Order $loop_order" for loop_order in loop_orders - n_particles_per_dimension_ = collect(n_particles_per_dimension) - permute!(n_particles_per_dimension_, permutation) - - acceleration_ = collect(acceleration) - permute!(acceleration_, permutation) - - shape = RectangularShape(particle_spacing, - Tuple(n_particles_per_dimension_), - (0.0, 0.0, 0.0), density=1000.0, - loop_order=loop_order, acceleration=acceleration_) - - # Permute pressure with acceleration permutation - permuted1 = permutedims(pressure, permutation) - - # Permute pressure with loop order permutation - loop_order_permutation = TrixiParticles.loop_permutation(loop_order, Val(3)) - permuted2 = permutedims(permuted1, loop_order_permutation) - - @test shape.pressure ≈ 9.81 * 1000.0 * vec(permuted2) - @test shape.density == 1000 * ones(prod(n_particles_per_dimension)) - @test shape.mass == - 1000 * particle_spacing^3 * ones(prod(n_particles_per_dimension)) - end - end - end - - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Compressible Hydrostatic Pressure" begin - particle_spacing = 0.1 - - state_equation = Val(:state_equation) - function TrixiParticles.inverse_state_equation(::Val{:state_equation}, pressure) - return 1000.0 + 10pressure - end - - # Pressure distribution with gravity `(0.0, -1.0, 0.0)` - pressure = [2300.0; 2300.0;; - 1100.0; 1100.0;; - 500.0; 500.0;; - 200.0; 200.0;; - 50.0; 50.0;;; - 2300.0; 2300.0;; - 1100.0; 1100.0;; - 500.0; 500.0;; - 200.0; 200.0;; - 50.0; 50.0;;; - 2300.0; 2300.0;; - 1100.0; 1100.0;; - 500.0; 500.0;; - 200.0; 200.0;; - 50.0; 50.0] - - n_particles_per_dimension = (2, 5, 3) - acceleration = (0.0, -1.0, 0.0) - - permutations = [ - [1, 2, 3], # Gravity in negative y-direction - [2, 1, 3], # Gravity in negative x-direction - [1, 3, 2], # Gravity in negative z-direction - ] - @testset "Permutation $permutation" for permutation in permutations - n_particles_per_dimension_ = collect(n_particles_per_dimension) - permute!(n_particles_per_dimension_, permutation) - - acceleration_ = collect(acceleration) - permute!(acceleration_, permutation) - - shape = RectangularShape(particle_spacing, - Tuple(n_particles_per_dimension_), (0.0, 0.0, 0.0), - acceleration=acceleration_, - state_equation=state_equation) - - @test shape.pressure ≈ vec(permutedims(pressure, permutation)) - density = TrixiParticles.inverse_state_equation.(Ref(state_equation), - shape.pressure) - @test shape.density == density - @test shape.mass == particle_spacing^3 * shape.density - end +@testset "Rectangular Shape 3D" begin + + # Rectangular shape + particle_spacing = 0.01 + n_particles_per_dimension = (4, 3, 5) + + positions = [(0.0, 0.0, 0.0), (3.0, 4.0, 2.0), (-3.0, -4.0, -2.0)] + + expected_coords = [ + [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.02 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03; + 0.0 0.0 0.0 0.0 0.0 0.01 0.01 0.01 0.01 0.01 0.02 0.02 0.02 0.02 0.02 0.0 0.0 0.0 0.0 0.0 0.01 0.01 0.01 0.01 0.01 0.02 0.02 0.02 0.02 0.02 0.0 0.0 0.0 0.0 0.0 0.01 0.01 0.01 0.01 0.01 0.02 0.02 0.02 0.02 0.02 0.0 0.0 0.0 0.0 0.0 0.01 0.01 0.01 0.01 0.01 0.02 0.02 0.02 0.02 0.02; + 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04 0.0 0.01 0.02 0.03 0.04], + [3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.01 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.02 3.03 3.03 3.03 3.03 3.03 3.03 3.03 3.03 3.03 3.03 3.03 3.03 3.03 3.03 3.03; + 4.0 4.0 4.0 4.0 4.0 4.01 4.01 4.01 4.01 4.01 4.02 4.02 4.02 4.02 4.02 4.0 4.0 4.0 4.0 4.0 4.01 4.01 4.01 4.01 4.01 4.02 4.02 4.02 4.02 4.02 4.0 4.0 4.0 4.0 4.0 4.01 4.01 4.01 4.01 4.01 4.02 4.02 4.02 4.02 4.02 4.0 4.0 4.0 4.0 4.0 4.01 4.01 4.01 4.01 4.01 4.02 4.02 4.02 4.02 4.02; + 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04 2.0 2.01 2.02 2.03 2.04], + [-3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -3.0 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.99 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.98 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97 -2.97; + -4.0 -4.0 -4.0 -4.0 -4.0 -3.99 -3.99 -3.99 -3.99 -3.99 -3.98 -3.98 -3.98 -3.98 -3.98 -4.0 -4.0 -4.0 -4.0 -4.0 -3.99 -3.99 -3.99 -3.99 -3.99 -3.98 -3.98 -3.98 -3.98 -3.98 -4.0 -4.0 -4.0 -4.0 -4.0 -3.99 -3.99 -3.99 -3.99 -3.99 -3.98 -3.98 -3.98 -3.98 -3.98 -4.0 -4.0 -4.0 -4.0 -4.0 -3.99 -3.99 -3.99 -3.99 -3.99 -3.98 -3.98 -3.98 -3.98 -3.98; + -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96 -2.0 -1.99 -1.98 -1.97 -1.96], + ] + + @testset "Position $i" for i in eachindex(positions) + shape = RectangularShape(particle_spacing, + n_particles_per_dimension, positions[i], 1.0) + + @test shape.coordinates == expected_coords[i] end end diff --git a/test/setups/rectangular_tank.jl b/test/setups/rectangular_tank.jl index c934b7ce5..f5af2f45f 100644 --- a/test/setups/rectangular_tank.jl +++ b/test/setups/rectangular_tank.jl @@ -1,63 +1,54 @@ @testset verbose=true "Rectangular Tank 2D" begin @testset verbose=true "One Boundary Layer" begin water_width = 0.5 - water_height = 0.4 - tank_width = 0.5 - tank_height = 0.5 + water_height = 0.5 + container_width = 0.5 + container_height = 0.5 water_density = 1000 n_layers = 1 @testset "Coordinates" begin particle_spacings = [0.1, 0.2] spacing_ratios = [1, 3] - min_coordinates = [(0.0, 0.0), (-0.3, 2.0)] expected_fluid_coords = [ - [0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45; - 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35], - [0.1 0.3 0.1 0.3; - 0.1 0.1 0.3 0.3], # This is rounded to fluid size 4x4 + [0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 + 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5], + [0.2 0.2 0.4 0.4; 0.2 0.4 0.2 0.4], ] expected_bound_coords = [ - [ - [-0.05 -0.05 -0.05 -0.05 -0.05 0.55 0.55 0.55 0.55 0.55 0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45 -0.05 -0.05 0.55 0.55; - 0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45 -0.05 -0.05 -0.05 -0.05 -0.05 0.55 0.55 0.55 0.55 0.55 -0.05 0.55 -0.05 0.55], - [-0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.41666667 0.45 0.48333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.41666667 0.45 0.48333333 -0.01666667 -0.01666667 0.51666667 0.51666667; - 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.41666667 0.45 0.48333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.41666667 0.45 0.48333333 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 0.51666667 -0.01666667 0.51666667 -0.01666667 0.51666667], - ], - [ - [-0.1 -0.1 0.5 0.5 0.1 0.3 0.1 0.3 -0.1 -0.1 0.5 0.5; - 0.1 0.3 0.1 0.3 -0.1 -0.1 0.5 0.5 -0.1 0.5 -0.1 0.5], - [-0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 -0.03333333 -0.03333333 0.43333333 0.43333333; - 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.43333333 0.5 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.43333333 0.5 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.56666667 0.56666667 0.56666667 0.56666667 0.56666667 0.56666667 -0.03333333 0.56666667 -0.03333333 0.56666667], - ], + [0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.0 0.0 0.6 0.6 + 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.0 0.6 0.0 0.6], + [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.5 0.5333333333333333 0.5666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.5 0.5333333333333333 0.5666666666666667 0.0 0.0 0.6 0.6; + 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.5 0.5333333333333333 0.5666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.5 0.5333333333333333 0.5666666666666667 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.0 0.6 0.0 0.6], + [0.0 0.0 0.6000000000000001 0.6000000000000001 0.2 0.4 0.2 0.4 0.0 0.0 0.6000000000000001 0.6000000000000001; + 0.2 0.4 0.2 0.4 0.0 0.0 0.6000000000000001 0.6000000000000001 0.0 0.6000000000000001 0.0 0.6000000000000001], + [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.6 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.6 0.0 0.0 0.6666666666666666 0.6666666666666666; + 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.6 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.0 0.6666666666666666 0.0 0.6666666666666666], ] - - @testset "Move Tank: $(min_coordinates[i])" for i in eachindex(min_coordinates) - @testset "Particle Spacing: $(particle_spacings[j])" for j in eachindex(particle_spacings) - @testset "Spacing Ratio: $(spacing_ratios[k])" for k in eachindex(spacing_ratios) - tank = RectangularTank(particle_spacings[j], - (water_width, water_height), - (tank_width, tank_height), - water_density, - spacing_ratio=spacing_ratios[k], - min_coordinates=min_coordinates[i]) - expected_fluid_coords_ = copy(expected_fluid_coords[j]) - expected_bound_coords_ = copy(expected_bound_coords[j][k]) - expected_fluid_coords_ .+= min_coordinates[i] - expected_bound_coords_ .+= min_coordinates[i] - @test isapprox(tank.fluid.coordinates, expected_fluid_coords_) - @test isapprox(tank.boundary.coordinates, expected_bound_coords_) - end + boundary_coords_index = 0 + + @testset "Particle Spacing: $(particle_spacings[i])" for i in eachindex(particle_spacings) + @testset "Spacing Ratio: $spacing_ratio" for spacing_ratio in spacing_ratios + tank = RectangularTank(particle_spacings[i], + (water_width, water_height), + (container_width, container_height), + water_density, + spacing_ratio=spacing_ratio) + + boundary_coords_index += 1 + @test isapprox(tank.fluid.coordinates, expected_fluid_coords[i]) + @test isapprox(tank.boundary.coordinates, + expected_bound_coords[boundary_coords_index]) end end end @testset "Velocities" begin tank = RectangularTank(0.2, (water_width, water_height), - (tank_width, tank_height), water_density, - velocity=(1.0, 2.5)) + (container_width, container_height), water_density, + init_velocity=(1.0, 2.5)) expected_velocities = [1.0 1.0 1.0 1.0; 2.5 2.5 2.5 2.5] @@ -65,108 +56,80 @@ end @testset "Reset Wall" begin - name = ["+x Wall", "+y Wall"] - reset_faces = [ - (false, true, false, false), - (true, false, true, true), # Check that left and bottom walls don't move - ] + tank = RectangularTank(0.1, (0.2, 0.2), (0.5, 0.5), water_density) - expected_coordinates = [ - [-0.05 -0.05 -0.05 -0.05 -0.05 0.25 0.25 0.25 0.25 0.25 0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45 -0.05 -0.05 0.55 0.55; - 0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45 -0.05 -0.05 -0.05 -0.05 -0.05 0.55 0.55 0.55 0.55 0.55 -0.05 0.55 -0.05 0.55], - [-0.05 -0.05 -0.05 -0.05 -0.05 0.55 0.55 0.55 0.55 0.55 0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45 -0.05 -0.05 0.55 0.55; - 0.05 0.15 0.25 0.35 0.45 0.05 0.15 0.25 0.35 0.45 -0.05 -0.05 -0.05 -0.05 -0.05 0.25 0.25 0.25 0.25 0.25 -0.05 0.55 -0.05 0.55], - ] - - @testset "$(name[i])" for i in eachindex(name) - tank = RectangularTank(0.1, (0.2, 0.2), (0.5, 0.5), water_density) + positions = (0, 0.3, 0, 0) + reset_faces = (false, true, false, false) - positions = (0, 0.2, 0, 0.2) + reset_wall!(tank, reset_faces, positions) - reset_wall!(tank, reset_faces[i], positions) + expected_coordinates = [0.0 0.0 0.0 0.0 0.0 0.3 0.3 0.3 0.3 0.3 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.0 0.0 0.6000000000000001 0.6000000000000001; + 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.0 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.0 0.6000000000000001 0.0 0.6000000000000001] - @test isapprox(tank.boundary.coordinates, expected_coordinates[i]) - end + @test isapprox(tank.boundary.coordinates, expected_coordinates) end - @testset "Info and Error" begin + @testset "Info And Error" begin particle_spacing = 0.2 - str = "Info: The desired fluid length in x-direction 0.5" - @test_warn str RectangularTank(particle_spacing, (water_width, water_height), - (tank_width, tank_height), water_density, - spacing_ratio=3) - - error = ArgumentError("`tank_size` must be of length 2 for a 2D problem") - @test_throws error RectangularTank(particle_spacing, - (water_width, water_height), - (tank_width, tank_height, 0), - water_density, spacing_ratio=3) - - error = ArgumentError("`tank_size` must be of length 3 for a 3D problem") - @test_throws error RectangularTank(particle_spacing, - (water_width, water_height, 0.5), - (tank_width, tank_height), - water_density, spacing_ratio=3) + @test_warn "Info: The desired container width 0.7" RectangularTank(particle_spacing, + (water_width, + water_height), + (container_width, + container_height), + water_density, + spacing_ratio=3) + + error_str = "`tank_size` must be of length 2 for a 2D problem" + @test_throws ArgumentError(error_str) RectangularTank(particle_spacing, + (water_width, + water_height), + (container_width, + container_height, + 0), + water_density, + spacing_ratio=3) + + error_str = "`tank_size` must be of length 3 for a 3D problem" + @test_throws ArgumentError(error_str) RectangularTank(particle_spacing, + (water_width, + water_height, + 0.5), + (container_width, + container_height), + water_density, + spacing_ratio=3) end end @testset verbose=true "Multiple Boundary Layers" begin water_width = 0.5 water_height = 0.5 - tank_width = 1.0 - tank_height = 1.0 + container_width = 1 + container_height = 1 water_density = 500 @testset "Coordinates" begin - expected_bound_coords = [-1.25 -1.25 -0.75 -0.75 -0.25 -0.25 1.25 1.25 1.75 1.75 2.25 2.25 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25; - 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 -1.25 -1.25 -0.75 -0.75 -0.25 -0.25 1.25 1.25 1.75 1.75 2.25 2.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25] + expected_bound_coords = [-1.0 -1.0 -0.5 -0.5 0.0 0.0 1.5 1.5 2.0 2.0 2.5 2.5 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5; + 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 -1.0 -1.0 -0.5 -0.5 0.0 0.0 1.5 1.5 2.0 2.0 2.5 2.5 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5] tank = RectangularTank(0.5, (water_width, water_height), - (tank_width, tank_height), water_density, + (container_width, container_height), water_density, n_layers=3) @test isapprox(tank.boundary.coordinates, expected_bound_coords) end @testset "Reset Wall" begin - name = ["+x Wall", "+y Wall"] - reset_faces = [ - (false, true, false, false), - (true, false, true, true), # Check that only the top wall moves - ] - - expected_coordinates = [ - [-0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.25 0.25 0.25 0.35 0.35 0.35 0.45 0.45 0.45 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 0.35 0.45 0.55 0.35 0.45 0.55 0.35 0.45 0.55 0.35 0.45 0.55 0.35 0.45 0.55 0.35 0.45 0.55; - 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55], - [-0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.25 -0.25 -0.25 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 0.35 0.45 0.55 0.35 0.45 0.55 0.35 0.45 0.55 0.35 0.45 0.55 0.35 0.45 0.55 0.35 0.45 0.55; - 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.25 -0.25 -0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.45 0.45 0.45 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55], - ] - - @testset "$(name[i])" for i in eachindex(name) - tank = RectangularTank(0.1, (0.2, 0.2), (0.3, 0.3), water_density, - n_layers=3) - - positions = (0, 0.2, 0, 0.2) - - reset_wall!(tank, reset_faces[i], positions) - - @test isapprox(tank.boundary.coordinates, expected_coordinates[i]) - end - - @testset "All Walls" begin - tank = RectangularTank(0.1, (0.2, 0.2), (0.2, 0.3), water_density, - n_layers=3) + tank = RectangularTank(0.1, (0.2, 0.2), (0.5, 0.5), water_density, n_layers=3) - # Move all walls outwards by one particle spacing - positions = (-0.1, 0.3, -0.1, 0.4) + positions = (0, 0.3, 0, 0) + reset_faces = (false, true, false, false) - reset_wall!(tank, (true, true, true, true), positions) + reset_wall!(tank, reset_faces, positions) - expected_coordinates = [-0.15 -0.15 -0.15 -0.25 -0.25 -0.25 -0.35 -0.35 -0.35 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55 0.05 0.15 0.05 0.15 0.05 0.15 0.05 0.15 0.05 0.15 0.05 0.15 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 -0.25 -0.15 -0.05 0.25 0.35 0.45 0.25 0.35 0.45 0.25 0.35 0.45 0.25 0.35 0.45 0.25 0.35 0.45 0.25 0.35 0.45; - 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.15 -0.15 -0.25 -0.25 -0.35 -0.35 0.45 0.45 0.55 0.55 0.65 0.65 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55 -0.25 -0.25 -0.25 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.55 0.55 0.55] - - @test isapprox(tank.boundary.coordinates, expected_coordinates) - end + expected_coordinates = [-0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.8 0.8 0.8 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.8 0.8 0.8; + 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.8 0.8 0.8 0.8 0.8 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 0.6000000000000001 0.7000000000000001 0.8 0.6000000000000001 0.7000000000000001 0.8 0.6000000000000001 0.7000000000000001 0.8 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 0.6000000000000001 0.7000000000000001 0.8 0.6000000000000001 0.7000000000000001 0.8 0.6000000000000001 0.7000000000000001 0.8] + @test isapprox(tank.boundary.coordinates, expected_coordinates) end end @@ -192,57 +155,65 @@ # One boundary layer expected_bound_coords1 = [ - [0.1 0.3 0.5 0.7; 0.9 0.9 0.9 0.9], - [0.1 0.3 0.5 0.7; -0.1 -0.1 -0.1 -0.1], - [0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7; -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9], - [0.9 0.9 0.9 0.9; 0.1 0.3 0.5 0.7], - [0.9 0.9 0.9 0.9 0.1 0.3 0.5 0.7 0.9; 0.1 0.3 0.5 0.7 0.9 0.9 0.9 0.9 0.9], - [0.9 0.9 0.9 0.9 0.1 0.3 0.5 0.7 0.9; 0.1 0.3 0.5 0.7 -0.1 -0.1 -0.1 -0.1 -0.1], - [0.9 0.9 0.9 0.9 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.9 0.9; - 0.1 0.3 0.5 0.7 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 -0.1 0.9], - [-0.1 -0.1 -0.1 -0.1; 0.1 0.3 0.5 0.7], - [-0.1 -0.1 -0.1 -0.1 0.1 0.3 0.5 0.7 -0.1; 0.1 0.3 0.5 0.7 0.9 0.9 0.9 0.9 0.9], - [-0.1 -0.1 -0.1 -0.1 0.1 0.3 0.5 0.7 -0.1; - 0.1 0.3 0.5 0.7 -0.1 -0.1 -0.1 -0.1 -0.1], - [-0.1 -0.1 -0.1 -0.1 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.1 -0.1; - 0.1 0.3 0.5 0.7 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 -0.1 0.9], - [-0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9; 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7], - [-0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 0.1 0.3 0.5 0.7 -0.1 0.9; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.9 0.9 0.9 0.9 0.9 0.9], - [-0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 0.1 0.3 0.5 0.7 -0.1 0.9; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1], - ] + [0.2 0.4 0.6 0.8 + 1.0 1.0 1.0 1.0], + [0.2 0.4 0.6 0.8 + 0.0 0.0 0.0 0.0], + [0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 + 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0], + [1.0 1.0 1.0 1.0 + 0.2 0.4 0.6 0.8], + [1.0 1.0 1.0 1.0 0.2 0.4 0.6 0.8 1.0 + 0.2 0.4 0.6 0.8 1.0 1.0 1.0 1.0 1.0], + [1.0 1.0 1.0 1.0 0.2 0.4 0.6 0.8 1.0 + 0.2 0.4 0.6 0.8 0.0 0.0 0.0 0.0 0.0], + [1.0 1.0 1.0 1.0 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 1.0 1.0 + 0.2 0.4 0.6 0.8 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0], + [0.0 0.0 0.0 0.0 + 0.2 0.4 0.6 0.8], + [0.0 0.0 0.0 0.0 0.2 0.4 0.6 0.8 0.0 + 0.2 0.4 0.6 0.8 1.0 1.0 1.0 1.0 1.0], + [0.0 0.0 0.0 0.0 0.2 0.4 0.6 0.8 0.0 + 0.2 0.4 0.6 0.8 0.0 0.0 0.0 0.0 0.0], + [0.0 0.0 0.0 0.0 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.0 0.0 + 0.2 0.4 0.6 0.8 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 0.0 1.0], + [0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 + 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8], + [0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 0.2 0.4 0.6 0.8 0.0 1.0 + 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 1.0 1.0 1.0 1.0 1.0 1.0], + [0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 0.2 0.4 0.6 0.8 0.0 1.0 + 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.0 0.0 0.0 0.0 0.0 0.0]] # Multiple boundary layers expected_bound_coords2 = [ - [0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7; - 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3], - [0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7; - -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1], - [0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7; - -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3], - [0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7], - [0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3], - [0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1], - [0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3], - [-0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7], - [-0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3], - [-0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1], - [-0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3], - [-0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7], - [-0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3], - [-0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1], + [0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 + 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4], + [0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 + -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0], + [0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 + -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4], + [1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 + 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8 0.2 0.4 0.6 0.8], + [1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 1.0 1.0 1.0 1.2 1.2 1.2 1.4 1.4 1.4; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4], + [1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 1.0 1.0 1.0 1.2 1.2 1.2 1.4 1.4 1.4; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0], + [1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 1.0 1.0 1.0 1.2 1.2 1.2 1.4 1.4 1.4 1.0 1.0 1.0 1.2 1.2 1.2 1.4 1.4 1.4; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 -0.4 -0.2 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4], + [-0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8], + [-0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4], + [-0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0], + [-0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 -0.4 -0.2 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4], + [-0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8], + [-0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0 1.0 1.0 1.0 1.2 1.2 1.2 1.4 1.4 1.4; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4], + [-0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0 1.0 1.0 1.0 1.2 1.2 1.2 1.4 1.4 1.4; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0 -0.4 -0.2 0.0], ] expected_bound_coords = (expected_bound_coords1, expected_bound_coords2) @@ -264,95 +235,70 @@ end water_width = 0.4 water_height = 0.4 water_depth = 0.4 - tank_width = 0.4 - tank_height = 0.4 - tank_depth = 0.4 + container_width = 0.4 + container_height = 0.4 + container_depth = 0.4 water_density = 1000.0 n_layers = 1 @testset "Coordinates" begin particle_spacings = [0.1, 0.2] spacing_ratios = [1, 3] - min_coordinates = [(0.0, 0.0, 0.0), (-0.3, 2.0, -0.5)] expected_fluid_coords = [ - [0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35; - 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35; - 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35], - [0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3; - 0.1 0.1 0.3 0.3 0.1 0.1 0.3 0.3; - 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3], + [0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4; + 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4; + 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4], + [0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4; 0.2 0.2 0.4 0.4 0.2 0.2 0.4 0.4; + 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4], ] expected_bound_coords = [ - [ - [-0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45; - 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 -0.05 0.45 -0.05 0.45 -0.05 0.45 -0.05 0.45; - 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 -0.05 -0.05 0.45 0.45 -0.05 -0.05 0.45 0.45], - [-0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667; - 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 -0.01666667 0.41666667 -0.01666667 0.41666667 -0.01666667 0.41666667 -0.01666667 0.41666667; - 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.01666667 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.08333333 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.11666667 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.18333333 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.21666667 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.28333333 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.31666667 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 0.38333333 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 0.01666667 0.05 0.08333333 0.11666667 0.15 0.18333333 0.21666667 0.25 0.28333333 0.31666667 0.35 0.38333333 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 -0.01666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 0.41666667 -0.01666667 -0.01666667 0.41666667 0.41666667 -0.01666667 -0.01666667 0.41666667 0.41666667], - ], - [ - [-0.1 -0.1 -0.1 -0.1 0.5 0.5 0.5 0.5 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 -0.1 -0.1 -0.1 -0.1 0.5 0.5 0.5 0.5 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 -0.1 -0.1 -0.1 -0.1 0.5 0.5 0.5 0.5 -0.1 -0.1 -0.1 -0.1 0.5 0.5 0.5 0.5; - 0.1 0.1 0.3 0.3 0.1 0.1 0.3 0.3 -0.1 -0.1 -0.1 -0.1 0.5 0.5 0.5 0.5 0.1 0.1 0.3 0.3 0.1 0.1 0.3 0.3 -0.1 -0.1 0.5 0.5 -0.1 -0.1 0.5 0.5 -0.1 -0.1 0.5 0.5 -0.1 -0.1 0.5 0.5 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 -0.1 0.5 -0.1 0.5 -0.1 0.5 -0.1 0.5; - 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.1 0.3 0.3 0.1 0.1 0.3 0.3 -0.1 -0.1 -0.1 -0.1 0.5 0.5 0.5 0.5 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.3 -0.1 -0.1 -0.1 -0.1 0.5 0.5 0.5 0.5 -0.1 -0.1 0.5 0.5 -0.1 -0.1 0.5 0.5 -0.1 -0.1 0.5 0.5 -0.1 -0.1 0.5 0.5], - [-0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333; - 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.1 0.1 0.1 0.1 0.1 0.1 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.3 0.3 0.3 0.3 0.3 0.3 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.1 0.1 0.1 0.1 0.1 0.1 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.3 0.3 0.3 0.3 0.3 0.3 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.1 0.1 0.1 0.1 0.1 0.1 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.3 0.3 0.3 0.3 0.3 0.3 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.1 0.1 0.1 0.1 0.1 0.1 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.3 0.3 0.3 0.3 0.3 0.3 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 -0.03333333 0.43333333 -0.03333333 0.43333333 -0.03333333 0.43333333 -0.03333333 0.43333333; - 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.1 0.1 0.1 0.1 0.1 0.1 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.3 0.3 0.3 0.3 0.3 0.3 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.03333333 0.1 0.1 0.1 0.1 0.1 0.1 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.16666667 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.23333333 0.3 0.3 0.3 0.3 0.3 0.3 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 0.36666667 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 0.03333333 0.1 0.16666667 0.23333333 0.3 0.36666667 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 -0.03333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 0.43333333 -0.03333333 -0.03333333 0.43333333 0.43333333 -0.03333333 -0.03333333 0.43333333 0.43333333], - ], + [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5; + 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.0 0.5 0.0 0.5 0.0 0.5 0.0 0.5; + 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.1 0.2 0.30000000000000004 0.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.0 0.0 0.5 0.5 0.0 0.0 0.5 0.5], + [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5; + 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.03333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.16666666666666666 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.19999999999999998 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.23333333333333334 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.36666666666666664 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.43333333333333335 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.0 0.5 0.0 0.5 0.0 0.5 0.0 0.5; + 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.03333333333333333 0.06666666666666667 0.1 0.13333333333333333 0.16666666666666666 0.19999999999999998 0.23333333333333334 0.26666666666666666 0.3 0.3333333333333333 0.36666666666666664 0.39999999999999997 0.43333333333333335 0.4666666666666667 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.5 0.5 0.0 0.0 0.5 0.5], + [0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.2 0.2 0.4 0.4 0.2 0.2 0.4 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001; + 0.2 0.2 0.4 0.4 0.2 0.2 0.4 0.4 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.2 0.2 0.4 0.4 0.2 0.2 0.4 0.4 0.0 0.0 0.6000000000000001 0.6000000000000001 0.0 0.0 0.6000000000000001 0.6000000000000001 0.0 0.0 0.6000000000000001 0.6000000000000001 0.0 0.0 0.6000000000000001 0.6000000000000001 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.0 0.6000000000000001 0.0 0.6000000000000001 0.0 0.6000000000000001 0.0 0.6000000000000001; + 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.2 0.4 0.2 0.4 0.2 0.4 0.2 0.4 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.0 0.0 0.6000000000000001 0.6000000000000001 0.0 0.0 0.6000000000000001 0.6000000000000001 0.0 0.0 0.6000000000000001 0.6000000000000001 0.0 0.0 0.6000000000000001 0.6000000000000001], + [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6; + 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.06666666666666667 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.13333333333333333 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.26666666666666666 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.3333333333333333 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.39999999999999997 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.4666666666666667 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.5333333333333333 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.0 0.6 0.0 0.6 0.0 0.6 0.0 0.6; + 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.06666666666666667 0.13333333333333333 0.2 0.26666666666666666 0.3333333333333333 0.39999999999999997 0.4666666666666667 0.5333333333333333 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.0 0.0 0.6 0.6 0.0 0.0 0.6 0.6], ] - - @testset "Move Tank: $(min_coordinates[i])" for i in eachindex(min_coordinates) - @testset "Particle Spacing: $(particle_spacings[j])" for j in eachindex(particle_spacings) - @testset "Spacing Ratio: $(spacing_ratios[k])" for k in eachindex(spacing_ratios) - tank = RectangularTank(particle_spacings[j], - (water_width, water_height, water_depth), - (tank_width, tank_height, tank_depth), - water_density, - spacing_ratio=spacing_ratios[k], - min_coordinates=min_coordinates[i]) - expected_fluid_coords_ = copy(expected_fluid_coords[j]) - expected_bound_coords_ = copy(expected_bound_coords[j][k]) - expected_fluid_coords_ .+= min_coordinates[i] - expected_bound_coords_ .+= min_coordinates[i] - - @test isapprox(tank.fluid.coordinates, expected_fluid_coords_) - @test isapprox(tank.boundary.coordinates, expected_bound_coords_) - end + boundary_coords_index = 0 + + @testset "Particle Spacing: $(particle_spacings[i])" for i in eachindex(particle_spacings) + @testset "Spacing Ratio: $spacing_ratio" for spacing_ratio in spacing_ratios + tank = RectangularTank(particle_spacings[i], + (water_width, water_height, water_depth), + (container_width, container_height, + container_depth), + water_density, + spacing_ratio=spacing_ratio) + + boundary_coords_index += 1 + @test isapprox(tank.fluid.coordinates, expected_fluid_coords[i]) + @test isapprox(tank.boundary.coordinates, + expected_bound_coords[boundary_coords_index]) end end end @testset "Reset Wall" begin - name = ["+x Wall", "+z Wall", "-y Wall"] - reset_faces = [ - (false, true, false, false, false, false), - (true, false, false, false, true, true), # Check that -x and -z walls don't move - (false, false, true, false, false, false), - ] - - expected_coordinates = [ - [-0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35; - 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 0.35 0.35 0.35 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 0.35 -0.05 0.35 -0.05 0.35 -0.05 0.35; - 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.35 0.35 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 0.45 0.45 0.45 -0.05 -0.05 -0.05 0.45 0.45 0.45 -0.05 -0.05 0.45 0.45 -0.05 -0.05 0.45 0.45], - [-0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35; - 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 0.35 0.35 0.35 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 0.35 -0.05 0.35 -0.05 0.35 -0.05 0.35; - 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.35 0.35 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 0.45 0.45 0.45 -0.05 -0.05 -0.05 0.45 0.45 0.45 -0.05 -0.05 0.45 0.45 -0.05 -0.05 0.45 0.45], - [-0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35; - 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 0.35 0.35 0.35 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.05 0.35 -0.05 0.35 -0.05 0.35 -0.05 0.35; - 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.35 0.35 0.35 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 -0.05 -0.05 -0.05 0.45 0.45 0.45 -0.05 -0.05 -0.05 0.45 0.45 0.45 -0.05 -0.05 0.45 0.45 -0.05 -0.05 0.45 0.45], - ] - - @testset "$(name[i])" for i in eachindex(name) - tank = RectangularTank(0.1, (0.2, 0.2, 0.2), (0.3, 0.3, 0.4), water_density) + tank = RectangularTank(0.1, (0.2, 0.2, 0.2), (0.5, 0.5, 0.2), water_density, + faces=(true, true, true, false, true, false)) - positions = (0.0, 0.2, 0.1, 0.0, 0.0, 0.2) + positions = (0, 0.3, 0, 0, 0, 0) + reset_faces = (false, true, false, false, false, false) - reset_wall!(tank, reset_faces[i], positions) + reset_wall!(tank, reset_faces, positions) - @test isapprox(tank.boundary.coordinates, expected_coordinates[i]) - end + expected_coordinates = [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.0 0.0 0.6000000000000001 0.6000000000000001 0.1 0.2 0.30000000000000004 0.4 0.5 0.0 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.0 0.6000000000000001; + 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.0 0.0; + 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.2 0.1 0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0] + @test isapprox(tank.boundary.coordinates, expected_coordinates) end end @@ -360,53 +306,37 @@ end water_width = 0.5 water_height = 0.5 water_depth = 0.5 - tank_width = 1.0 - tank_height = 1.0 - tank_depth = 1.0 + container_width = 1 + container_height = 1 + container_depth = 1 water_density = 500 @testset "Coordinates" begin - expected_bound_coords = [-1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25; - 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 -1.25 -0.75 -0.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 1.25 1.75 2.25 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 -1.25 -1.25 -0.75 -0.75 -0.25 -0.25 -1.25 -1.25 -0.75 -0.75 -0.25 -0.25 -1.25 -1.25 -0.75 -0.75 -0.25 -0.25 1.25 1.25 1.75 1.75 2.25 2.25 1.25 1.25 1.75 1.75 2.25 2.25 1.25 1.25 1.75 1.75 2.25 2.25 -1.25 -1.25 -0.75 -0.75 -0.25 -0.25 -1.25 -1.25 -0.75 -0.75 -0.25 -0.25 -1.25 -1.25 -0.75 -0.75 -0.25 -0.25 1.25 1.25 1.75 1.75 2.25 2.25 1.25 1.25 1.75 1.75 2.25 2.25 1.25 1.25 1.75 1.75 2.25 2.25 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 0.25 0.25 0.25 0.75 0.75 0.75 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25 1.25 1.25 1.25 1.75 1.75 1.75 2.25 2.25 2.25; - 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.75 0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.75 0.75 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 2.25 2.25 1.25 1.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 2.25 2.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 2.25 2.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 2.25 2.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -1.25 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.75 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 1.75 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25] + expected_bound_coords = [-1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 1.5 1.5 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 2.5 2.5 1.5 1.5 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 2.5 2.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 1.5 1.5 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 2.5 2.5 1.5 1.5 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 2.5 2.5 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5; + 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0 1.0 -1.0 -1.0 -0.5 -0.5 0.0 0.0 -1.0 -1.0 -0.5 -0.5 0.0 0.0 -1.0 -1.0 -0.5 -0.5 0.0 0.0 1.5 1.5 2.0 2.0 2.5 2.5 1.5 1.5 2.0 2.0 2.5 2.5 1.5 1.5 2.0 2.0 2.5 2.5 -1.0 -1.0 -0.5 -0.5 0.0 0.0 -1.0 -1.0 -0.5 -0.5 0.0 0.0 -1.0 -1.0 -0.5 -0.5 0.0 0.0 1.5 1.5 2.0 2.0 2.5 2.5 1.5 1.5 2.0 2.0 2.5 2.5 1.5 1.5 2.0 2.0 2.5 2.5 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 0.5 0.5 0.5 1.0 1.0 1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 0.0 0.0 0.0 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5 1.5 1.5 1.5 2.0 2.0 2.0 2.5 2.5 2.5; + 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 -0.5 -0.5 0.0 0.0 0.0 0.0 1.5 1.5 1.5 1.5 2.0 2.0 2.0 2.0 2.5 2.5 2.5 2.5 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 0.5 1.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 -1.0 -0.5 0.0 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5 1.5 2.0 2.5] tank = RectangularTank(0.5, (water_width, water_height, water_depth), - (tank_width, tank_height, tank_depth), - water_density, n_layers=3) + (container_width, container_height, container_depth), + water_density, + n_layers=3) @test isapprox(tank.boundary.coordinates, expected_bound_coords) end @testset "Reset Wall" begin - name = ["+x Wall", "+z Wall", "-y Wall"] - reset_faces = [ - (false, true, false, false, false, false), - (true, false, false, false, true, true), # Check that -x and -z walls don't move - (false, false, true, false, false, false), - ] + tank = RectangularTank(0.1, (0.2, 0.2, 0.2), (0.5, 0.5, 0.2), water_density, + n_layers=3, faces=(true, true, true, false, true, false)) - expected_coordinates = [ - [-0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45; - 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.35 0.35 0.35 0.45 0.45 0.45 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.35 0.35 0.35 0.45 0.45 0.45 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45; - 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55], - [-0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45; - 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.35 0.35 0.35 0.45 0.45 0.45 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.35 0.35 0.35 0.45 0.45 0.45 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45; - 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55], - [-0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.35 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 0.05 0.15 0.25 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 -0.15 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45; - 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.35 0.45 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 0.05 0.05 0.05 0.15 0.15 0.15 0.25 0.25 0.25 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.35 0.35 0.35 0.45 0.45 0.45 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 0.35 0.35 0.35 0.45 0.45 0.45 0.35 0.35 0.35 0.45 0.45 0.45 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 0.05 0.05 0.15 0.15 0.25 0.25 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45 -0.15 -0.15 -0.05 -0.05 -0.15 -0.15 -0.05 -0.05 0.35 0.35 0.45 0.45 0.35 0.35 0.45 0.45; - 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.15 0.25 0.35 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.35 0.35 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.55 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 0.05 0.05 0.05 0.05 0.15 0.15 0.15 0.15 0.25 0.25 0.25 0.25 0.35 0.35 0.35 0.35 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 -0.15 -0.15 -0.15 -0.15 -0.05 -0.05 -0.05 -0.05 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55 0.45 0.45 0.45 0.45 0.55 0.55 0.55 0.55], - ] + positions = (0, 0.3, 0, 0, 0, 0) + reset_faces = (false, true, false, false, false, false) - @testset "$(name[i])" for i in eachindex(name) - tank = RectangularTank(0.1, (0.2, 0.2, 0.2), (0.3, 0.3, 0.4), water_density, - n_layers=2) + reset_wall!(tank, reset_faces, positions) - positions = (0.0, 0.2, 0.1, 0.0, 0.0, 0.2) - - reset_wall!(tank, reset_faces[i], positions) - - @test isapprox(tank.boundary.coordinates, expected_coordinates[i]) - end + expected_coordinates = [-0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 0.1 0.2 0.30000000000000004 0.4 0.5 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.8 0.8 0.8 0.8 0.8 0.8 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.7000000000000001 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8; + 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 0.1 0.1 0.2 0.2 0.30000000000000004 0.30000000000000004 0.4 0.4 0.5 0.5 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 -0.2 -0.2 -0.1 -0.1 0.0 0.0 -0.2 -0.2 -0.1 -0.1 0.0 0.0 -0.2 -0.2 -0.1 -0.1 0.0 0.0 -0.2 -0.2 -0.1 -0.1 0.0 0.0 -0.2 -0.2 -0.1 -0.1 0.0 0.0 -0.2 -0.2 -0.1 -0.1 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.1 0.1 0.1 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.5 0.5 0.5 0.1 0.1 0.1 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.5 0.5 0.5 0.1 0.1 0.1 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.5 0.5 0.5 0.1 0.1 0.1 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.5 0.5 0.5 0.1 0.1 0.1 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.5 0.5 0.5 0.1 0.1 0.1 0.2 0.2 0.2 0.30000000000000004 0.30000000000000004 0.30000000000000004 0.4 0.4 0.4 0.5 0.5 0.5 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 0.0 0.0 0.0; + 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 0.1 0.2 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0 -0.2 -0.1 0.0] + @test isapprox(tank.boundary.coordinates, expected_coordinates) end end @@ -421,22 +351,22 @@ end # One boundary layer expected_bound_coords1 = [ - [0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7; - -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 -0.1 -0.1 -0.1 -0.1; - 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9], - [-0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9; - 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7], + [0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8; + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.0 0.0 0.0 0.0; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0], + [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0; + 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8], ] # Multiple boundary layers expected_bound_coords2 = [ - [0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7; - -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1; - 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3], - [-0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 1.3 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 0.1 0.1 0.1 0.3 0.3 0.3 0.5 0.5 0.5 0.7 0.7 0.7 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3; - 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 -0.5 -0.3 -0.1 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 0.9 1.1 1.3 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.3 -0.3 -0.3 -0.1 -0.1 -0.1 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3 0.9 0.9 0.9 1.1 1.1 1.1 1.3 1.3 1.3; - 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.3 0.5 0.7 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7], + [0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8; + -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 0.0 0.0 0.0; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4 1.0 1.2 1.4], + [-0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4; + 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 0.2 0.2 0.2 0.2 0.4 0.4 0.4 0.4 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.6000000000000001 0.8 0.8 0.8 0.8 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 -0.4 -0.4 -0.4 -0.4 -0.2 -0.2 -0.2 -0.2 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4 1.0 1.0 1.0 1.0 1.2 1.2 1.2 1.2 1.4 1.4 1.4 1.4; + 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8 0.2 0.4 0.6000000000000001 0.8], ] expected_bound_coords = (expected_bound_coords1, expected_bound_coords2) diff --git a/test/setups/setups.jl b/test/setups/setups.jl index 0a72c9410..7d0a94f9c 100644 --- a/test/setups/setups.jl +++ b/test/setups/setups.jl @@ -1,4 +1,3 @@ include("rectangular_shape.jl") -include("sphere_shape.jl") +include("circular_shape.jl") include("rectangular_tank.jl") -include("extrude_geometry.jl") diff --git a/test/setups/sphere_shape.jl b/test/setups/sphere_shape.jl deleted file mode 100644 index 7577ed1ab..000000000 --- a/test/setups/sphere_shape.jl +++ /dev/null @@ -1,154 +0,0 @@ -@testset verbose=true "SphereShape" begin - @testset verbose=true "SphereShape 2D" begin - radius = 2.4 - particle_spacing = 0.8 - - shape_names = [ - "1-particle VoxelSphere", - "1-particle RoundSphere", - "5-particle VoxelSphere", - "5-particle RoundSphere", - "7-particle RoundSphere", - "Filled VoxelSphere", - "Filled VoxelSphere with Cutout", - "Hollow VoxelSphere with Multiple Layers", - "Hollow VoxelSphere Outwards", - "Hollow RoundSphere with One Layer", - "Hollow RoundSphere with Multiple Layers", - "Hollow RoundSphere Outwards", - "Hollow RoundSphere Segment", - ] - - shapes = [ - SphereShape(1.0, 1.0, (0.0, 0.0), 1000.0), - SphereShape(1.0, 0.3, (0.0, 0.0), 1000.0, sphere_type=RoundSphere()), - SphereShape(1.0, 1.5, (0.0, 0.0), 1000.0), - SphereShape(1.0, 1.26, (0.0, 0.0), 1000.0, sphere_type=RoundSphere()), - SphereShape(1.0, 1.5, (0.0, 0.0), 1000.0, sphere_type=RoundSphere()), - SphereShape(particle_spacing, radius, (0.0, 0.0), 1000.0), - SphereShape(particle_spacing, radius, (3.0, 4.0), 1000.0, - cutout_min=(3.0, 4.0), cutout_max=(5.0, 4.0 + 0.5particle_spacing)), - SphereShape(particle_spacing, 4.4, (0.3, 0.4), 1000.0, - n_layers=2), - SphereShape(particle_spacing, 3.6, (0.3, 0.4), 1000.0, - n_layers=3, layer_outwards=true), - SphereShape(particle_spacing, radius, (-3.0, -4.0), 1000.0, - sphere_type=RoundSphere(), n_layers=1), - SphereShape(particle_spacing, radius, (3.0, -4), 1000.0, - sphere_type=RoundSphere(), - n_layers=2), - SphereShape(particle_spacing, radius, (-3.0, 4.0), 1000.0, - sphere_type=RoundSphere(), - n_layers=3, layer_outwards=true), - SphereShape(particle_spacing, radius, (3.0, -4), 1000.0, - sphere_type=RoundSphere(start_angle=pi, end_angle=1.5pi), - n_layers=3, layer_outwards=true), - ] - - expected_coords = [ - [0.0; 0.0], - [0.0; 0.0], - [0.0 -1.0 0.0 1.0 0.0; -1.0 0.0 0.0 0.0 1.0], - [0.76 0.23485292 -0.61485292 -0.61485292 0.23485292; - 0.0 0.72280295 0.44671679 -0.44671679 -0.72280295], - # Note that this 7-particle configuration is better than the 5-particle - # configuration of the `VoxelSphere` above. The sphere has the volume - # of 7.07 particles, so 7 is the optimal number of particles. - [0.0 1.0 0.5 -0.5 -1.0 -0.5 0.5; - 0.0 0.0 0.8660254 0.8660254 0.0 -0.8660254 -0.8660254], - [-0.8 0.0 0.8 -1.6 -0.8 0.0 0.8 1.6 -1.6 -0.8 0.0 0.8 1.6 -1.6 -0.8 0.0 0.8 1.6 -0.8 0.0 0.8 - -1.6 -1.6 -1.6 -0.8 -0.8 -0.8 -0.8 -0.8 0.0 0.0 0.0 0.0 0.0 0.8 0.8 0.8 0.8 0.8 1.6 1.6 1.6], - [2.2 3.0 3.8 1.4 2.2 3.0 3.8 4.6 1.4 2.2 1.4 2.2 3.0 3.8 4.6 2.2 3.0 3.8; - 2.4 2.4 2.4 3.2 3.2 3.2 3.2 3.2 4.0 4.0 4.8 4.8 4.8 4.8 4.8 5.6 5.6 5.6], - [0.3 -2.1 -1.3 -0.5 0.3 1.1 1.9 2.7 -2.9 -2.1 -1.3 -0.5 1.1 1.9 2.7 3.5 -2.9 -2.1 2.7 3.5 -2.9 -2.1 2.7 3.5 -3.7 -2.9 3.5 4.3 -2.9 -2.1 2.7 3.5 -2.9 -2.1 2.7 3.5 -2.9 -2.1 -1.3 -0.5 1.1 1.9 2.7 3.5 -2.1 -1.3 -0.5 0.3 1.1 1.9 2.7 0.3; - -3.6 -2.8 -2.8 -2.8 -2.8 -2.8 -2.8 -2.8 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -1.2 -1.2 -1.2 -1.2 -0.4 -0.4 -0.4 -0.4 0.4 0.4 0.4 0.4 1.2 1.2 1.2 1.2 2.0 2.0 2.0 2.0 2.8 2.8 2.8 2.8 2.8 2.8 2.8 2.8 3.6 3.6 3.6 3.6 3.6 3.6 3.6 4.4], - [0.3 -2.1 -1.3 -0.5 0.3 1.1 1.9 2.7 -3.7 -2.9 -2.1 -1.3 -0.5 0.3 1.1 1.9 2.7 3.5 4.3 -4.5 -3.7 -2.9 -2.1 -1.3 -0.5 1.1 1.9 2.7 3.5 4.3 5.1 -4.5 -3.7 -2.9 3.5 4.3 5.1 -5.3 -4.5 -3.7 4.3 5.1 5.9 -5.3 -4.5 -3.7 4.3 5.1 5.9 -5.3 -4.5 -3.7 4.3 5.1 5.9 -6.1 -5.3 -4.5 5.1 5.9 6.7 -5.3 -4.5 -3.7 4.3 5.1 5.9 -5.3 -4.5 -3.7 4.3 5.1 5.9 -5.3 -4.5 -3.7 4.3 5.1 5.9 -4.5 -3.7 -2.9 3.5 4.3 5.1 -4.5 -3.7 -2.9 -2.1 -1.3 -0.5 1.1 1.9 2.7 3.5 4.3 5.1 -3.7 -2.9 -2.1 -1.3 -0.5 0.3 1.1 1.9 2.7 3.5 4.3 -2.1 -1.3 -0.5 0.3 1.1 1.9 2.7 0.3; - -6.0 -5.2 -5.2 -5.2 -5.2 -5.2 -5.2 -5.2 -4.4 -4.4 -4.4 -4.4 -4.4 -4.4 -4.4 -4.4 -4.4 -4.4 -4.4 -3.6 -3.6 -3.6 -3.6 -3.6 -3.6 -3.6 -3.6 -3.6 -3.6 -3.6 -3.6 -2.8 -2.8 -2.8 -2.8 -2.8 -2.8 -2.0 -2.0 -2.0 -2.0 -2.0 -2.0 -1.2 -1.2 -1.2 -1.2 -1.2 -1.2 -0.4 -0.4 -0.4 -0.4 -0.4 -0.4 0.4 0.4 0.4 0.4 0.4 0.4 1.2 1.2 1.2 1.2 1.2 1.2 2.0 2.0 2.0 2.0 2.0 2.0 2.8 2.8 2.8 2.8 2.8 2.8 3.6 3.6 3.6 3.6 3.6 3.6 4.4 4.4 4.4 4.4 4.4 4.4 4.4 4.4 4.4 4.4 4.4 4.4 5.2 5.2 5.2 5.2 5.2 5.2 5.2 5.2 5.2 5.2 5.2 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.8], - [-1.0 -1.15224 -1.58579 -2.23463 -3.0 -3.76537 -4.41421 -4.84776 -5.0 -4.84776 -4.41421 -3.76537 -3.0 -2.23463 -1.58579 -1.15224; - -4.0 -3.23463 -2.58579 -2.15224 -2.0 -2.15224 -2.58579 -3.23463 -4.0 -4.76537 -5.41421 -5.84776 -6.0 -5.84776 -5.41421 -4.76537], - [4.2 3.91925333 3.20837781 2.4 1.87236886 1.87236886 2.4 3.20837781 3.91925333 5.0 4.84775907 4.41421356 3.76536686 3.0 2.23463314 1.58578644 1.15224093 1.0 1.15224093 1.58578644 2.23463314 3.0 3.76536686 4.41421356 4.84775907; - -4.0 -3.22865487 -2.8182307 -2.96076952 -3.58957583 -4.41042417 -5.03923048 -5.1817693 -4.77134513 -4.0 -3.23463314 -2.58578644 -2.15224093 -2.0 -2.15224093 -2.58578644 -3.23463314 -4.0 -4.76536686 -5.41421356 -5.84775907 -6.0 -5.84775907 -5.41421356 -4.76536686], - [-0.2 -0.31341967 -0.64449011 -1.16638994 -1.83683796 -2.60151845 -3.39848155 -4.16316204 -4.83361006 -5.35550989 -5.68658033 -5.8 -5.68658033 -5.35550989 -4.83361006 -4.16316204 -3.39848155 -2.60151845 -1.83683796 -1.16638994 -0.64449011 -0.31341967 0.6 0.50974048 0.24348792 -0.18540666 -0.75543671 -1.43801854 -2.19892464 -3.0 -3.80107536 -4.56198146 -5.24456329 -5.81459334 -6.24348792 -6.50974048 -6.6 -6.50974048 -6.24348792 -5.81459334 -5.24456329 -4.56198146 -3.80107536 -3.0 -2.19892464 -1.43801854 -0.75543671 -0.18540666 0.24348792 0.50974048 1.4 1.32929019 1.11943343 0.77717469 0.31351445 -0.25664487 -0.91497789 -1.64032522 -2.40937363 -3.19740525 -3.97909211 -4.72931014 -5.42394672 -6.04067566 -6.55967478 -6.96426302 -7.24143659 -7.38228689 -7.38228689 -7.24143659 -6.96426302 -6.55967478 -6.04067566 -5.42394672 -4.72931014 -3.97909211 -3.19740525 -2.40937363 -1.64032522 -0.91497789 -0.25664487 0.31351445 0.77717469 1.11943343 1.32929019; - 4.0 4.78885116 5.51379429 6.11609881 6.54696959 6.77150004 6.77150004 6.54696959 6.11609881 5.51379429 4.78885116 4.0 3.21114884 2.48620571 1.88390119 1.45303041 1.22849996 1.22849996 1.45303041 1.88390119 2.48620571 3.21114884 4.0 4.80107536 5.56198146 6.24456329 6.81459334 7.24348792 7.50974048 7.6 7.50974048 7.24348792 6.81459334 6.24456329 5.56198146 4.80107536 4.0 3.19892464 2.43801854 1.75543671 1.18540666 0.75651208 0.49025952 0.4 0.49025952 0.75651208 1.18540666 1.75543671 2.43801854 3.19892464 4.0 4.78565034 5.54604923 6.25675682 6.89493039 7.44005852 7.87462034 8.18464867 8.36017895 8.39556949 8.28968281 8.0459222 7.67212232 7.1802974 6.58625511 5.90908845 5.17056212 4.39441296 3.60558704 2.82943788 2.09091155 1.41374489 0.8197026 0.32787768 -0.0459222 -0.28968281 -0.39556949 -0.36017895 -0.18464867 0.12537966 0.55994148 1.10506961 1.74324318 2.45395077 3.21434966], - [0.20000000000000018 0.33704175437357 0.7347524157501475 1.354201293581075 2.134752415750147 2.9999999999999996 -0.5999999999999996 -0.5097404838545647 -0.2434879244487087 0.18540666311509257 0.7554367133085589 1.4380185391767903 2.1989246377572673 2.9999999999999996 -1.4000000000000004 -1.3331541132537161 -1.1346475314579978 -0.8105117766515302 -0.37059554972350384 0.17173451737922596 0.8000000000000016 1.4951113693670546 2.2359480182655065 2.999999999999999; - -3.9999999999999996 -4.865247584249852 -5.645798706418924 -6.2652475842498525 -6.662958245626429 -6.8 -3.9999999999999996 -4.801075362242731 -5.561981460823208 -6.24456328669144 -6.814593336884906 -7.243487924448708 -7.509740483854564 -7.6 -3.9999999999999996 -4.764051981734492 -5.504888630632941 -6.200000000000001 -6.828265482620774 -7.370595549723503 -7.810511776651531 -8.134647531457997 -8.333154113253716 -8.4], - ] - - @testset "$(shape_names[i])" for i in eachindex(shape_names) - @test isapprox(shapes[i].coordinates, expected_coords[i]; atol=1e-4) - end - end - - @testset verbose=true "SphereShape 3D" begin - shape_names = [ - "1-particle VoxelSphere", - "7-particle VoxelSphere", - "1-particle RoundSphere", - "2-particle RoundSphere", - "3-particle RoundSphere", - "4-particle RoundSphere", - "5-particle RoundSphere", - "6-particle RoundSphere", - "VoxelSphere with Cutout and tlsph", - "VoxelSphere with Two Layers and tlsph", - "VoxelSphere with Two Layers Outwards and tlsph", - "RoundSphere with Two Layers", - "RoundSphere with Two Layers Outwards and tlsph", - ] - - shapes = [ - SphereShape(1.0, 1.0, (0.2, -1.0, 0.3), 1000.0), - SphereShape(1.0, 1.5, (0.0, 0.0, 0.0), 1000.0), - SphereShape(1.0, 0.8, (0.2, -1.0, 0.3), 1000.0, sphere_type=RoundSphere()), - SphereShape(1.0, 0.9, (0.2, -1.0, 0.3), 1000.0, sphere_type=RoundSphere()), - SphereShape(1.0, 1.0, (0.2, -1.0, 0.3), 1000.0, sphere_type=RoundSphere()), - SphereShape(1.0, 1.05, (0.2, -1.0, 0.3), 1000.0, sphere_type=RoundSphere()), - SphereShape(1.0, 1.1, (0.2, -1.0, 0.3), 1000.0, sphere_type=RoundSphere()), - SphereShape(1.0, 1.2, (-0.3, 0.1, 0.8), 1000.0, sphere_type=RoundSphere()), - SphereShape(0.1, 0.5, (0.3, 0.4, 0.5), 1000.0, cutout_min=(0.18, 0.4, 0.5), - cutout_max=(0.42, 10.0, 1.0), tlsph=true), - SphereShape(0.1, 0.5, (0.3, 0.4, 0.5), 1000.0, n_layers=2, tlsph=true), - SphereShape(0.1, 0.5, (0.3, 0.4, 0.5), 1000.0, n_layers=2, - layer_outwards=true, tlsph=true), - SphereShape(0.1, 0.5, (0.3, 0.4, 0.5), 1000.0, n_layers=2, - sphere_type=RoundSphere()), - SphereShape(0.1, 0.55, (0.3, 0.4, 0.5), 1000.0, n_layers=2, layer_outwards=true, - sphere_type=RoundSphere(), tlsph=true), - ] - - expected_coords = [ - [0.2, -1.0, 0.3], - [0.0 0.0 -1.0 0.0 1.0 0.0 0.0; 0.0 -1.0 0.0 0.0 0.0 1.0 0.0; - -1.0 0.0 0.0 0.0 0.0 0.0 1.0], - [0.2, -1.0, 0.3], - [-0.2 0.6; -1.0 -1.0; 0.3 0.3], - [0.7 -0.05 -0.05; -1.0 -0.5669873 -1.4330127; 0.3 0.3 0.3], - [0.51754265 -0.11754265 -0.11754265 0.51754265; - -0.68245735 -1.31754265 -0.68245735 -1.31754265; - 0.61754265 0.61754265 -0.01754265 -0.01754265], - [0.2 0.8 -0.1 -0.1 0.2; -1.0 -1.0 -0.48038476 -1.51961524 -1.0; - 0.9 0.3 0.3 0.3 -0.3], - [-0.3 0.4 -0.3 -1.0 -0.3 -0.3; 0.1 0.1 0.8 0.1 -0.6 0.1; - 1.5 0.8 0.8 0.8 0.8 0.1], - [0.3 0.3 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.3 0.3 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.3 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.3 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.1 0.5 0.6 0.7 0.8 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.0 0.1 0.5 0.6 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.0 0.1 0.5 0.6 0.1 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.0 0.1 0.5 0.6 0.1 0.5 0.3 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.0 0.1 0.5 0.6 -0.0 0.1 0.5 0.6 0.1 0.5 0.3 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.5 0.6 0.1 0.5 0.1 0.5; - 0.4 0.1 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.7 0.0 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.8 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.8 0.8 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.8 0.8 0.0 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.1 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.6 0.6; - 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9], - [0.3 0.3 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.3 0.3 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.3 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.3 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.2 -0.1 0.7 0.8 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.3 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.6 0.7 -0.1 -0.0 0.1 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.3 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.3 0.3 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 0.3 0.3; - 0.4 0.1 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.7 0.0 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.8 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.0 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.8 0.1 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.7 0.4; - 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0], - [0.3 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.2 -0.1 0.7 0.8 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.3 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.2 -0.1 0.7 0.8 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.4 -0.3 0.9 1.0 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.2 -0.1 0.7 0.8 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.3 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.3 -0.2 -0.1 0.7 0.8 0.9 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.2 -0.1 0.7 0.8 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.2 -0.1 -0.0 0.6 0.7 0.8 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.1 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.1 0.2 0.3 0.4 0.5 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 -0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.1 0.2 0.3 0.4 0.5 0.3; - 0.4 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -0.3 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.1 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -0.2 -0.2 -0.2 -0.2 -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.4; - -0.2 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.2], - [0.3 0.41091791 0.36915619 0.27531844 0.20006642 0.20006642 0.27531844 0.36915619 0.49858033 0.47197561 0.39929017 0.3 0.20070983 0.12802439 0.10141967 0.12802439 0.20070983 0.3 0.39929017 0.47197561 0.56884782 0.54838299 0.49010411 0.40288361 0.3 0.19711639 0.10989589 0.05161701 0.03115218 0.05161701 0.10989589 0.19711639 0.3 0.40288361 0.49010411 0.54838299 0.61993839 0.60427949 0.55883559 0.48805507 0.3988664 0.3 0.2011336 0.11194493 0.04116441 -0.00427949 -0.01993839 -0.00427949 0.04116441 0.11194493 0.2011336 0.3 0.3988664 0.48805507 0.55883559 0.60427949 0.64668776 0.6312854 0.58644687 0.51615628 0.42665926 0.32590801 0.22285472 0.12665612 0.04585989 -0.01235488 -0.04281555 -0.04281555 -0.01235488 0.04585989 0.12665612 0.22285472 0.32590801 0.42665926 0.51615628 0.58644687 0.6312854 0.64668776 0.6312854 0.58644687 0.51615628 0.42665926 0.32590801 0.22285472 0.12665612 0.04585989 -0.01235488 -0.04281555 -0.04281555 -0.01235488 0.04585989 0.12665612 0.22285472 0.32590801 0.42665926 0.51615628 0.58644687 0.6312854 0.61993839 0.60427949 0.55883559 0.48805507 0.3988664 0.3 0.2011336 0.11194493 0.04116441 -0.00427949 -0.01993839 -0.00427949 0.04116441 0.11194493 0.2011336 0.3 0.3988664 0.48805507 0.55883559 0.60427949 0.56884782 0.54838299 0.49010411 0.40288361 0.3 0.19711639 0.10989589 0.05161701 0.03115218 0.05161701 0.10989589 0.19711639 0.3 0.40288361 0.49010411 0.54838299 0.49858033 0.47197561 0.39929017 0.3 0.20070983 0.12802439 0.10141967 0.12802439 0.20070983 0.3 0.39929017 0.47197561 0.41091791 0.36915619 0.27531844 0.20006642 0.20006642 0.27531844 0.36915619 0.3 0.3 0.41154685 0.36954832 0.27517849 0.19949976 0.19949976 0.27517849 0.36954832 0.505355 0.48183282 0.41665493 0.32475281 0.22718012 0.14628958 0.10061225 0.10061225 0.14628958 0.22718012 0.32475281 0.41665493 0.48183282 0.58681549 0.56744748 0.51195921 0.42784467 0.326464 0.22150921 0.12715505 0.05614455 0.01806809 0.01806809 0.05614455 0.12715505 0.22150921 0.326464 0.42784467 0.51195921 0.56744748 0.65420965 0.63986167 0.59798012 0.53195799 0.447144 0.35040929 0.24959071 0.152856 0.06804201 0.00201988 -0.03986167 -0.05420965 -0.03986167 0.00201988 0.06804201 0.152856 0.24959071 0.35040929 0.447144 0.53195799 0.59798012 0.63986167 0.7068799 0.69505671 0.66027426 0.60455398 0.53113413 0.4442816 0.34904395 0.25095605 0.1557184 0.06886587 -0.00455398 -0.06027426 -0.09505671 -0.1068799 -0.09505671 -0.06027426 -0.00455398 0.06886587 0.1557184 0.25095605 0.34904395 0.4442816 0.53113413 0.60455398 0.66027426 0.69505671 0.7392343 0.72739468 0.6925141 0.63647299 0.56229253 0.47397182 0.37627224 0.2744608 0.17402618 0.08038285 -0.00142086 -0.0669749 -0.11274523 -0.13626435 -0.13626435 -0.11274523 -0.0669749 -0.00142086 0.08038285 0.17402618 0.2744608 0.37627224 0.47397182 0.56229253 0.63647299 0.6925141 0.72739468 0.75 0.73871756 0.70543599 0.65182417 0.58057041 0.49524768 0.40013442 0.3 0.19986558 0.10475232 0.01942959 -0.05182417 -0.10543599 -0.13871756 -0.15 -0.13871756 -0.10543599 -0.05182417 0.01942959 0.10475232 0.19986558 0.3 0.40013442 0.49524768 0.58057041 0.65182417 0.70543599 0.73871756 0.7392343 0.72739468 0.6925141 0.63647299 0.56229253 0.47397182 0.37627224 0.2744608 0.17402618 0.08038285 -0.00142086 -0.0669749 -0.11274523 -0.13626435 -0.13626435 -0.11274523 -0.0669749 -0.00142086 0.08038285 0.17402618 0.2744608 0.37627224 0.47397182 0.56229253 0.63647299 0.6925141 0.72739468 0.7068799 0.69505671 0.66027426 0.60455398 0.53113413 0.4442816 0.34904395 0.25095605 0.1557184 0.06886587 -0.00455398 -0.06027426 -0.09505671 -0.1068799 -0.09505671 -0.06027426 -0.00455398 0.06886587 0.1557184 0.25095605 0.34904395 0.4442816 0.53113413 0.60455398 0.66027426 0.69505671 0.65420965 0.63986167 0.59798012 0.53195799 0.447144 0.35040929 0.24959071 0.152856 0.06804201 0.00201988 -0.03986167 -0.05420965 -0.03986167 0.00201988 0.06804201 0.152856 0.24959071 0.35040929 0.447144 0.53195799 0.59798012 0.63986167 0.58681549 0.56744748 0.51195921 0.42784467 0.326464 0.22150921 0.12715505 0.05614455 0.01806809 0.01806809 0.05614455 0.12715505 0.22150921 0.326464 0.42784467 0.51195921 0.56744748 0.505355 0.48183282 0.41665493 0.32475281 0.22718012 0.14628958 0.10061225 0.10061225 0.14628958 0.22718012 0.32475281 0.41665493 0.48183282 0.41154685 0.36954832 0.27517849 0.19949976 0.19949976 0.27517849 0.36954832 0.3; - 0.4 0.4 0.48671911 0.50813697 0.44812548 0.35187452 0.29186303 0.31328089 0.4 0.49929017 0.57197561 0.59858033 0.57197561 0.49929017 0.4 0.30070983 0.22802439 0.20141967 0.22802439 0.30070983 0.4 0.50288361 0.59010411 0.64838299 0.66884782 0.64838299 0.59010411 0.50288361 0.4 0.29711639 0.20989589 0.15161701 0.13115218 0.15161701 0.20989589 0.29711639 0.4 0.4988664 0.58805507 0.65883559 0.70427949 0.71993839 0.70427949 0.65883559 0.58805507 0.4988664 0.4 0.3011336 0.21194493 0.14116441 0.09572051 0.08006161 0.09572051 0.14116441 0.21194493 0.3011336 0.4 0.50218801 0.59529617 0.67105141 0.72272254 0.74571835 0.73799558 0.70024041 0.63580756 0.55042218 0.45167113 0.34832887 0.24957782 0.16419244 0.09975959 0.06200442 0.05428165 0.07727746 0.12894859 0.20470383 0.29781199 0.4 0.50218801 0.59529617 0.67105141 0.72272254 0.74571835 0.73799558 0.70024041 0.63580756 0.55042218 0.45167113 0.34832887 0.24957782 0.16419244 0.09975959 0.06200442 0.05428165 0.07727746 0.12894859 0.20470383 0.29781199 0.4 0.4988664 0.58805507 0.65883559 0.70427949 0.71993839 0.70427949 0.65883559 0.58805507 0.4988664 0.4 0.3011336 0.21194493 0.14116441 0.09572051 0.08006161 0.09572051 0.14116441 0.21194493 0.3011336 0.4 0.50288361 0.59010411 0.64838299 0.66884782 0.64838299 0.59010411 0.50288361 0.4 0.29711639 0.20989589 0.15161701 0.13115218 0.15161701 0.20989589 0.29711639 0.4 0.49929017 0.57197561 0.59858033 0.57197561 0.49929017 0.4 0.30070983 0.22802439 0.20141967 0.22802439 0.30070983 0.4 0.48671911 0.50813697 0.44812548 0.35187452 0.29186303 0.31328089 0.4 0.4 0.4 0.48721084 0.50875014 0.44839836 0.35160164 0.29124986 0.31278916 0.4 0.49543322 0.56900385 0.60385773 0.59201026 0.53617555 0.44914467 0.35085533 0.26382445 0.20798974 0.19614227 0.23099615 0.30456678 0.4 0.50360971 0.59322635 0.6567467 0.68559199 0.6758665 0.6288837 0.5509889 0.45270221 0.34729779 0.2490111 0.1711163 0.1241335 0.11440801 0.1432533 0.20677365 0.29639029 0.4 0.49979239 0.59150019 0.66769379 0.72220043 0.7506043 0.7506043 0.72220043 0.66769379 0.59150019 0.49979239 0.4 0.30020761 0.20849981 0.13230621 0.07779957 0.0493957 0.0493957 0.07779957 0.13230621 0.20849981 0.30020761 0.4 0.49737273 0.58908652 0.66981128 0.73485559 0.78043932 0.80391329 0.80391329 0.78043932 0.73485559 0.66981128 0.58908652 0.49737273 0.4 0.30262727 0.21091348 0.13018872 0.06514441 0.01956068 -0.00391329 -0.00391329 0.01956068 0.06514441 0.13018872 0.21091348 0.30262727 0.4 0.5012944 0.59712799 0.68233436 0.75232002 0.80331201 0.83256134 0.83849118 0.82078185 0.78038806 0.71948745 0.64136319 0.55022698 0.45099199 0.34900801 0.24977302 0.15863681 0.08051255 0.01961194 -0.02078185 -0.03849118 -0.03256134 -0.00331201 0.04767998 0.11766564 0.20287201 0.2987056 0.4 0.50013442 0.59524768 0.68057041 0.75182417 0.80543599 0.83871756 0.85 0.83871756 0.80543599 0.75182417 0.68057041 0.59524768 0.50013442 0.4 0.29986558 0.20475232 0.11942959 0.04817583 -0.00543599 -0.03871756 -0.05 -0.03871756 -0.00543599 0.04817583 0.11942959 0.20475232 0.29986558 0.4 0.5012944 0.59712799 0.68233436 0.75232002 0.80331201 0.83256134 0.83849118 0.82078185 0.78038806 0.71948745 0.64136319 0.55022698 0.45099199 0.34900801 0.24977302 0.15863681 0.08051255 0.01961194 -0.02078185 -0.03849118 -0.03256134 -0.00331201 0.04767998 0.11766564 0.20287201 0.2987056 0.4 0.49737273 0.58908652 0.66981128 0.73485559 0.78043932 0.80391329 0.80391329 0.78043932 0.73485559 0.66981128 0.58908652 0.49737273 0.4 0.30262727 0.21091348 0.13018872 0.06514441 0.01956068 -0.00391329 -0.00391329 0.01956068 0.06514441 0.13018872 0.21091348 0.30262727 0.4 0.49979239 0.59150019 0.66769379 0.72220043 0.7506043 0.7506043 0.72220043 0.66769379 0.59150019 0.49979239 0.4 0.30020761 0.20849981 0.13230621 0.07779957 0.0493957 0.0493957 0.07779957 0.13230621 0.20849981 0.30020761 0.4 0.50360971 0.59322635 0.6567467 0.68559199 0.6758665 0.6288837 0.5509889 0.45270221 0.34729779 0.2490111 0.1711163 0.1241335 0.11440801 0.1432533 0.20677365 0.29639029 0.4 0.49543322 0.56900385 0.60385773 0.59201026 0.53617555 0.44914467 0.35085533 0.26382445 0.20798974 0.19614227 0.23099615 0.30456678 0.4 0.48721084 0.50875014 0.44839836 0.35160164 0.29124986 0.31278916 0.4; - 0.85 0.83195966 0.83195966 0.83195966 0.83195966 0.83195966 0.83195966 0.83195966 0.78821147 0.78821147 0.78821147 0.78821147 0.78821147 0.78821147 0.78821147 0.78821147 0.78821147 0.78821147 0.78821147 0.78821147 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.72410009 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.64191345 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.54803744 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.45196256 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.35808655 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.27589991 0.21178853 0.21178853 0.21178853 0.21178853 0.21178853 0.21178853 0.21178853 0.21178853 0.21178853 0.21178853 0.21178853 0.21178853 0.16804034 0.16804034 0.16804034 0.16804034 0.16804034 0.16804034 0.16804034 0.15 0.95 0.93595562 0.93595562 0.93595562 0.93595562 0.93595562 0.93595562 0.93595562 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.90041145 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.84675189 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.77755275 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.69222057 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5978429 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.4021571 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.30777943 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.22244725 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.15324811 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.09958855 0.06404438 0.06404438 0.06404438 0.06404438 0.06404438 0.06404438 0.06404438 0.05], - [0.3 0.41157406 0.36956529 0.27517244 0.19947525 0.19947525 0.27517244 0.36956529 0.50686098 0.4831663 0.41751043 0.32493434 0.22664609 0.14516233 0.09915002 0.09915002 0.14516233 0.22664609 0.32493434 0.41751043 0.4831663 0.59629658 0.58024241 0.53381963 0.46205887 0.37273651 0.27553202 0.18097902 0.09932379 0.03941494 0.00774452 0.00774452 0.03941494 0.09932379 0.18097902 0.27553202 0.37273651 0.46205887 0.53381963 0.58024241 0.6763414 0.66351787 0.62592121 0.56611355 0.4881707 0.39740432 0.3 0.20259568 0.1118293 0.03388645 -0.02592121 -0.06351787 -0.0763414 -0.06351787 -0.02592121 0.03388645 0.1118293 0.20259568 0.3 0.39740432 0.4881707 0.56611355 0.62592121 0.66351787 0.74214449 0.73022643 0.69511475 0.63870233 0.56403038 0.47512449 0.37677759 0.27429158 0.17319153 0.07892775 -0.00341796 -0.06940633 -0.11547992 -0.13915487 -0.13915487 -0.11547992 -0.06940633 -0.00341796 0.07892775 0.17319153 0.27429158 0.37677759 0.47512449 0.56403038 0.63870233 0.69511475 0.73022643 0.79397679 0.78448516 0.75637504 0.71072669 0.64929434 0.5744388 0.48903673 0.39637009 0.3 0.20362991 0.11096327 0.0255612 -0.04929434 -0.11072669 -0.15637504 -0.18448516 -0.19397679 -0.18448516 -0.15637504 -0.11072669 -0.04929434 0.0255612 0.11096327 0.20362991 0.3 0.39637009 0.48903673 0.5744388 0.64929434 0.71072669 0.75637504 0.78448516 0.82980744 0.82023313 0.79185624 0.74570238 0.68343968 0.60731846 0.52008996 0.42490684 0.32520925 0.22460054 0.12671696 0.03509628 -0.04695009 -0.11645678 -0.17091163 -0.20834651 -0.22740843 -0.22740843 -0.20834651 -0.17091163 -0.11645678 -0.04695009 0.03509628 0.12671696 0.22460054 0.32520925 0.42490684 0.52008996 0.60731846 0.68343968 0.74570238 0.79185624 0.82023313 0.8477922 0.83898895 0.81286216 0.77025155 0.71252668 0.64154285 0.55958156 0.4692771 0.37353194 0.2754234 0.17810477 0.08470395 -0.00177707 -0.07855873 -0.1431732 -0.19354372 -0.22805134 -0.24558695 -0.24558695 -0.22805134 -0.19354372 -0.1431732 -0.07855873 -0.00177707 0.08470395 0.17810477 0.2754234 0.37353194 0.4692771 0.55958156 0.64154285 0.71252668 0.77025155 0.81286216 0.83898895 0.84766126 0.83833629 0.81067892 0.76563099 0.70472655 0.63003964 0.54411363 0.44987462 0.35053181 0.24946819 0.15012538 0.05588637 -0.03003964 -0.10472655 -0.16563099 -0.21067892 -0.23833629 -0.24766126 -0.23833629 -0.21067892 -0.16563099 -0.10472655 -0.03003964 0.05588637 0.15012538 0.24946819 0.35053181 0.44987462 0.54411363 0.63003964 0.70472655 0.76563099 0.81067892 0.83833629 0.82980744 0.82023313 0.79185624 0.74570238 0.68343968 0.60731846 0.52008996 0.42490684 0.32520925 0.22460054 0.12671696 0.03509628 -0.04695009 -0.11645678 -0.17091163 -0.20834651 -0.22740843 -0.22740843 -0.20834651 -0.17091163 -0.11645678 -0.04695009 0.03509628 0.12671696 0.22460054 0.32520925 0.42490684 0.52008996 0.60731846 0.68343968 0.74570238 0.79185624 0.82023313 0.79397679 0.78448516 0.75637504 0.71072669 0.64929434 0.5744388 0.48903673 0.39637009 0.3 0.20362991 0.11096327 0.0255612 -0.04929434 -0.11072669 -0.15637504 -0.18448516 -0.19397679 -0.18448516 -0.15637504 -0.11072669 -0.04929434 0.0255612 0.11096327 0.20362991 0.3 0.39637009 0.48903673 0.5744388 0.64929434 0.71072669 0.75637504 0.78448516 0.74214449 0.73022643 0.69511475 0.63870233 0.56403038 0.47512449 0.37677759 0.27429158 0.17319153 0.07892775 -0.00341796 -0.06940633 -0.11547992 -0.13915487 -0.13915487 -0.11547992 -0.06940633 -0.00341796 0.07892775 0.17319153 0.27429158 0.37677759 0.47512449 0.56403038 0.63870233 0.69511475 0.73022643 0.6763414 0.66351787 0.62592121 0.56611355 0.4881707 0.39740432 0.3 0.20259568 0.1118293 0.03388645 -0.02592121 -0.06351787 -0.0763414 -0.06351787 -0.02592121 0.03388645 0.1118293 0.20259568 0.3 0.39740432 0.4881707 0.56611355 0.62592121 0.66351787 0.59629658 0.58024241 0.53381963 0.46205887 0.37273651 0.27553202 0.18097902 0.09932379 0.03941494 0.00774452 0.00774452 0.03941494 0.09932379 0.18097902 0.27553202 0.37273651 0.46205887 0.53381963 0.58024241 0.50686098 0.4831663 0.41751043 0.32493434 0.22664609 0.14516233 0.09915002 0.09915002 0.14516233 0.22664609 0.32493434 0.41751043 0.4831663 0.41157406 0.36956529 0.27517244 0.19947525 0.19947525 0.27517244 0.36956529 0.3 0.3 0.41173428 0.36966519 0.27513678 0.19933089 0.19933089 0.27513678 0.36966519 0.50797533 0.48415301 0.41814345 0.32506866 0.22625093 0.14432823 0.09806805 0.09806805 0.14432823 0.22625093 0.32506866 0.41814345 0.48415301 0.60190095 0.58712487 0.544243 0.47745293 0.39329252 0.3 0.20670748 0.12254707 0.055757 0.01287513 -0.00190095 0.01287513 0.055757 0.12254707 0.20670748 0.3 0.39329252 0.47745293 0.544243 0.58712487 0.68795667 0.67473737 0.63598033 0.57432679 0.49397834 0.40041058 0.3 0.19958942 0.10602166 0.02567321 -0.03598033 -0.07473737 -0.08795667 -0.07473737 -0.03598033 0.02567321 0.10602166 0.19958942 0.3 0.40041058 0.49397834 0.57432679 0.63598033 0.67473737 0.76366294 0.75353079 0.72357717 0.6751112 0.61025106 0.53183147 0.44327973 0.34846597 0.25153403 0.15672027 0.06816853 -0.01025106 -0.0751112 -0.12357717 -0.15353079 -0.16366294 -0.15353079 -0.12357717 -0.0751112 -0.01025106 0.06816853 0.15672027 0.25153403 0.34846597 0.44327973 0.53183147 0.61025106 0.6751112 0.72357717 0.75353079 0.82856536 0.8190135 0.79070313 0.74465748 0.68254074 0.60659799 0.51957399 0.42461401 0.32515015 0.22477731 0.1271232 0.03571732 -0.0461367 -0.11548044 -0.16980763 -0.20715475 -0.22617198 -0.22617198 -0.20715475 -0.16980763 -0.11548044 -0.0461367 0.03571732 0.1271232 0.22477731 0.32515015 0.42461401 0.51957399 0.60659799 0.68254074 0.74465748 0.79070313 0.8190135 0.8803953 0.87204684 0.84724163 0.80669328 0.75156829 0.6834525 0.60430548 0.51640415 0.42227726 0.32463267 0.22627945 0.13004704 0.03870386 -0.0451223 -0.11901992 -0.1808631 -0.22887273 -0.26166765 -0.27830442 -0.27830442 -0.26166765 -0.22887273 -0.1808631 -0.11901992 -0.0451223 0.03870386 0.13004704 0.22627945 0.32463267 0.42227726 0.51640415 0.60430548 0.6834525 0.75156829 0.80669328 0.84724163 0.87204684 0.91898777 0.91136701 0.88869236 0.85152215 0.80077163 0.73769045 0.66383189 0.58101457 0.49127774 0.39683102 0.3 0.20316898 0.10872226 0.01898543 -0.06383189 -0.13769045 -0.20077163 -0.25152215 -0.28869236 -0.31136701 -0.31898777 -0.31136701 -0.28869236 -0.25152215 -0.20077163 -0.13769045 -0.06383189 0.01898543 0.10872226 0.20316898 0.3 0.39683102 0.49127774 0.58101457 0.66383189 0.73769045 0.80077163 0.85152215 0.88869236 0.91136701 0.94220053 0.93429398 0.910769 0.87220486 0.81955114 0.75410435 0.677476 0.59155294 0.49845088 0.4004623 0.3 0.1995377 0.10154912 0.00844706 -0.077476 -0.15410435 -0.21955114 -0.27220486 -0.310769 -0.33429398 -0.34220053 -0.33429398 -0.310769 -0.27220486 -0.21955114 -0.15410435 -0.077476 0.00844706 0.10154912 0.1995377 0.3 0.4004623 0.49845088 0.59155294 0.677476 0.75410435 0.81955114 0.87220486 0.910769 0.93429398 0.95 0.94274004 0.92112232 0.88562976 0.8370552 0.77648372 0.70526837 0.625 0.53747167 0.44463861 0.34857456 0.25142544 0.15536139 0.06252833 -0.025 -0.10526837 -0.17648372 -0.2370552 -0.28562976 -0.32112232 -0.34274004 -0.35 -0.34274004 -0.32112232 -0.28562976 -0.2370552 -0.17648372 -0.10526837 -0.025 0.06252833 0.15536139 0.25142544 0.34857456 0.44463861 0.53747167 0.625 0.70526837 0.77648372 0.8370552 0.88562976 0.92112232 0.94274004 0.94220053 0.93429398 0.910769 0.87220486 0.81955114 0.75410435 0.677476 0.59155294 0.49845088 0.4004623 0.3 0.1995377 0.10154912 0.00844706 -0.077476 -0.15410435 -0.21955114 -0.27220486 -0.310769 -0.33429398 -0.34220053 -0.33429398 -0.310769 -0.27220486 -0.21955114 -0.15410435 -0.077476 0.00844706 0.10154912 0.1995377 0.3 0.4004623 0.49845088 0.59155294 0.677476 0.75410435 0.81955114 0.87220486 0.910769 0.93429398 0.91898777 0.91136701 0.88869236 0.85152215 0.80077163 0.73769045 0.66383189 0.58101457 0.49127774 0.39683102 0.3 0.20316898 0.10872226 0.01898543 -0.06383189 -0.13769045 -0.20077163 -0.25152215 -0.28869236 -0.31136701 -0.31898777 -0.31136701 -0.28869236 -0.25152215 -0.20077163 -0.13769045 -0.06383189 0.01898543 0.10872226 0.20316898 0.3 0.39683102 0.49127774 0.58101457 0.66383189 0.73769045 0.80077163 0.85152215 0.88869236 0.91136701 0.8803953 0.87204684 0.84724163 0.80669328 0.75156829 0.6834525 0.60430548 0.51640415 0.42227726 0.32463267 0.22627945 0.13004704 0.03870386 -0.0451223 -0.11901992 -0.1808631 -0.22887273 -0.26166765 -0.27830442 -0.27830442 -0.26166765 -0.22887273 -0.1808631 -0.11901992 -0.0451223 0.03870386 0.13004704 0.22627945 0.32463267 0.42227726 0.51640415 0.60430548 0.6834525 0.75156829 0.80669328 0.84724163 0.87204684 0.82856536 0.8190135 0.79070313 0.74465748 0.68254074 0.60659799 0.51957399 0.42461401 0.32515015 0.22477731 0.1271232 0.03571732 -0.0461367 -0.11548044 -0.16980763 -0.20715475 -0.22617198 -0.22617198 -0.20715475 -0.16980763 -0.11548044 -0.0461367 0.03571732 0.1271232 0.22477731 0.32515015 0.42461401 0.51957399 0.60659799 0.68254074 0.74465748 0.79070313 0.8190135 0.76366294 0.75353079 0.72357717 0.6751112 0.61025106 0.53183147 0.44327973 0.34846597 0.25153403 0.15672027 0.06816853 -0.01025106 -0.0751112 -0.12357717 -0.15353079 -0.16366294 -0.15353079 -0.12357717 -0.0751112 -0.01025106 0.06816853 0.15672027 0.25153403 0.34846597 0.44327973 0.53183147 0.61025106 0.6751112 0.72357717 0.75353079 0.68795667 0.67473737 0.63598033 0.57432679 0.49397834 0.40041058 0.3 0.19958942 0.10602166 0.02567321 -0.03598033 -0.07473737 -0.08795667 -0.07473737 -0.03598033 0.02567321 0.10602166 0.19958942 0.3 0.40041058 0.49397834 0.57432679 0.63598033 0.67473737 0.60190095 0.58712487 0.544243 0.47745293 0.39329252 0.3 0.20670748 0.12254707 0.055757 0.01287513 -0.00190095 0.01287513 0.055757 0.12254707 0.20670748 0.3 0.39329252 0.47745293 0.544243 0.58712487 0.50797533 0.48415301 0.41814345 0.32506866 0.22625093 0.14432823 0.09806805 0.09806805 0.14432823 0.22625093 0.32506866 0.41814345 0.48415301 0.41173428 0.36966519 0.27513678 0.19933089 0.19933089 0.27513678 0.36966519 0.3; - 0.4 0.4 0.48723211 0.50877666 0.44841017 0.35158983 0.29122334 0.31276789 0.4 0.49613309 0.57024325 0.60535273 0.59341838 0.5371742 0.44950507 0.35049493 0.2628258 0.20658162 0.19464727 0.22975675 0.30386691 0.4 0.49620734 0.58198912 0.64804956 0.68722998 0.69528457 0.6713405 0.61799248 0.54102158 0.44876881 0.35123119 0.25897842 0.18200752 0.1286595 0.10471543 0.11277002 0.15195044 0.21801088 0.30379266 0.4 0.49740432 0.5881707 0.66611355 0.72592121 0.76351787 0.7763414 0.76351787 0.72592121 0.66611355 0.5881707 0.49740432 0.4 0.30259568 0.2118293 0.13388645 0.07407879 0.03648213 0.0236586 0.03648213 0.07407879 0.13388645 0.2118293 0.30259568 0.4 0.50196554 0.59843409 0.684205 0.75465435 0.80598419 0.83542732 0.84139645 0.82356979 0.78290836 0.72160425 0.64296237 0.55122232 0.45132984 0.34867016 0.24877768 0.15703763 0.07839575 0.01709164 -0.02356979 -0.04139645 -0.03542732 -0.00598419 0.04534565 0.115795 0.20156591 0.29803446 0.4 0.49637009 0.58903673 0.6744388 0.74929434 0.81072669 0.85637504 0.88448516 0.89397679 0.88448516 0.85637504 0.81072669 0.74929434 0.6744388 0.58903673 0.49637009 0.4 0.30362991 0.21096327 0.1255612 0.05070566 -0.01072669 -0.05637504 -0.08448516 -0.09397679 -0.08448516 -0.05637504 -0.01072669 0.05070566 0.1255612 0.21096327 0.30362991 0.4 0.50026672 0.59690953 0.68643553 0.76560899 0.8315684 0.8819298 0.914873 0.92920735 0.92441476 0.90066846 0.8588267 0.80040175 0.72750523 0.64277182 0.549264 0.4503614 0.3496386 0.250736 0.15722818 0.07249477 -0.00040175 -0.0588267 -0.10066846 -0.12441476 -0.12920735 -0.114873 -0.0819298 -0.0315684 0.03439101 0.11356447 0.20309047 0.29973328 0.4 0.49781207 0.59248039 0.68096222 0.7604137 0.82828119 0.88238336 0.92098134 0.94283455 0.94724061 0.93405791 0.90371014 0.85717272 0.79594139 0.72198418 0.63767813 0.54573291 0.44910371 0.35089629 0.25426709 0.16232187 0.07801582 0.00405861 -0.05717272 -0.10371014 -0.13405791 -0.14724061 -0.14283455 -0.12098134 -0.08238336 -0.02828119 0.0395863 0.11903778 0.20751961 0.30218793 0.4 0.50063249 0.59783807 0.6883065 0.768957 0.83704312 0.89024626 0.92675464 0.94532503 0.94532503 0.92675464 0.89024626 0.83704312 0.768957 0.6883065 0.59783807 0.50063249 0.4 0.29936751 0.20216193 0.1116935 0.031043 -0.03704312 -0.09024626 -0.12675464 -0.14532503 -0.14532503 -0.12675464 -0.09024626 -0.03704312 0.031043 0.1116935 0.20216193 0.29936751 0.4 0.50026672 0.59690953 0.68643553 0.76560899 0.8315684 0.8819298 0.914873 0.92920735 0.92441476 0.90066846 0.8588267 0.80040175 0.72750523 0.64277182 0.549264 0.4503614 0.3496386 0.250736 0.15722818 0.07249477 -0.00040175 -0.0588267 -0.10066846 -0.12441476 -0.12920735 -0.114873 -0.0819298 -0.0315684 0.03439101 0.11356447 0.20309047 0.29973328 0.4 0.49637009 0.58903673 0.6744388 0.74929434 0.81072669 0.85637504 0.88448516 0.89397679 0.88448516 0.85637504 0.81072669 0.74929434 0.6744388 0.58903673 0.49637009 0.4 0.30362991 0.21096327 0.1255612 0.05070566 -0.01072669 -0.05637504 -0.08448516 -0.09397679 -0.08448516 -0.05637504 -0.01072669 0.05070566 0.1255612 0.21096327 0.30362991 0.4 0.50196554 0.59843409 0.684205 0.75465435 0.80598419 0.83542732 0.84139645 0.82356979 0.78290836 0.72160425 0.64296237 0.55122232 0.45132984 0.34867016 0.24877768 0.15703763 0.07839575 0.01709164 -0.02356979 -0.04139645 -0.03542732 -0.00598419 0.04534565 0.115795 0.20156591 0.29803446 0.4 0.49740432 0.5881707 0.66611355 0.72592121 0.76351787 0.7763414 0.76351787 0.72592121 0.66611355 0.5881707 0.49740432 0.4 0.30259568 0.2118293 0.13388645 0.07407879 0.03648213 0.0236586 0.03648213 0.07407879 0.13388645 0.2118293 0.30259568 0.4 0.49620734 0.58198912 0.64804956 0.68722998 0.69528457 0.6713405 0.61799248 0.54102158 0.44876881 0.35123119 0.25897842 0.18200752 0.1286595 0.10471543 0.11277002 0.15195044 0.21801088 0.30379266 0.4 0.49613309 0.57024325 0.60535273 0.59341838 0.5371742 0.44950507 0.35049493 0.2628258 0.20658162 0.19464727 0.22975675 0.30386691 0.4 0.48723211 0.50877666 0.44841017 0.35158983 0.29122334 0.31276789 0.4 0.4 0.4 0.48735738 0.50893287 0.44847969 0.35152031 0.29106713 0.31264262 0.4 0.49665096 0.57116034 0.60645896 0.59446031 0.53791315 0.44977175 0.35022825 0.26208685 0.20553969 0.19354104 0.22883966 0.30334904 0.4 0.49329252 0.57745293 0.644243 0.68712487 0.70190095 0.68712487 0.644243 0.57745293 0.49329252 0.4 0.30670748 0.22254707 0.155757 0.11287513 0.09809905 0.11287513 0.155757 0.22254707 0.30670748 0.4 0.50041058 0.59397834 0.67432679 0.73598033 0.77473737 0.78795667 0.77473737 0.73598033 0.67432679 0.59397834 0.50041058 0.4 0.29958942 0.20602166 0.12567321 0.06401967 0.02526263 0.01204333 0.02526263 0.06401967 0.12567321 0.20602166 0.29958942 0.4 0.49640095 0.58858871 0.67253424 0.74456871 0.80154388 0.84096966 0.86112295 0.86112295 0.84096966 0.80154388 0.74456871 0.67253424 0.58858871 0.49640095 0.4 0.30359905 0.21141129 0.12746576 0.05543129 -0.00154388 -0.04096966 -0.06112295 -0.06112295 -0.04096966 -0.00154388 0.05543129 0.12746576 0.21141129 0.30359905 0.4 0.50003165 0.5964479 0.68576401 0.76475186 0.83055663 0.88079996 0.91366593 0.92796668 0.92318533 0.8994947 0.85775103 0.79946305 0.72673743 0.64220267 0.54891407 0.45024333 0.34975667 0.25108593 0.15779733 0.07326257 0.00053695 -0.05775103 -0.0994947 -0.12318533 -0.12796668 -0.11366593 -0.08079996 -0.03055663 0.03524814 0.11423599 0.2035521 0.29996835 0.4 0.49808728 0.59335277 0.68305585 0.76461593 0.83568667 0.89422351 0.93854243 0.96736846 0.97987234 0.97569435 0.95495467 0.91824997 0.86663615 0.80159806 0.72500673 0.63906555 0.54624688 0.44922096 0.35077904 0.25375312 0.16093445 0.07499327 -0.00159806 -0.06663615 -0.11824997 -0.15495467 -0.17569435 -0.17987234 -0.16736846 -0.13854243 -0.09422351 -0.03568667 0.03538407 0.11694415 0.20664723 0.30191272 0.4 0.49683102 0.59127774 0.68101457 0.76383189 0.83769045 0.90077163 0.95152215 0.98869236 1.01136701 1.01898777 1.01136701 0.98869236 0.95152215 0.90077163 0.83769045 0.76383189 0.68101457 0.59127774 0.49683102 0.4 0.30316898 0.20872226 0.11898543 0.03616811 -0.03769045 -0.10077163 -0.15152215 -0.18869236 -0.21136701 -0.21898777 -0.21136701 -0.18869236 -0.15152215 -0.10077163 -0.03769045 0.03616811 0.11898543 0.20872226 0.30316898 0.4 0.5004623 0.59845088 0.69155294 0.777476 0.85410435 0.91955114 0.97220486 1.010769 1.03429398 1.04220053 1.03429398 1.010769 0.97220486 0.91955114 0.85410435 0.777476 0.69155294 0.59845088 0.5004623 0.4 0.2995377 0.20154912 0.10844706 0.022524 -0.05410435 -0.11955114 -0.17220486 -0.210769 -0.23429398 -0.24220053 -0.23429398 -0.210769 -0.17220486 -0.11955114 -0.05410435 0.022524 0.10844706 0.20154912 0.2995377 0.4 0.49687747 0.59159086 0.68202443 0.76615804 0.84211228 0.90819046 0.96291651 1.00506794 1.03370314 1.04818247 1.04818247 1.03370314 1.00506794 0.96291651 0.90819046 0.84211228 0.76615804 0.68202443 0.59159086 0.49687747 0.4 0.30312253 0.20840914 0.11797557 0.03384196 -0.04211228 -0.10819046 -0.16291651 -0.20506794 -0.23370314 -0.24818247 -0.24818247 -0.23370314 -0.20506794 -0.16291651 -0.10819046 -0.04211228 0.03384196 0.11797557 0.20840914 0.30312253 0.4 0.5004623 0.59845088 0.69155294 0.777476 0.85410435 0.91955114 0.97220486 1.010769 1.03429398 1.04220053 1.03429398 1.010769 0.97220486 0.91955114 0.85410435 0.777476 0.69155294 0.59845088 0.5004623 0.4 0.2995377 0.20154912 0.10844706 0.022524 -0.05410435 -0.11955114 -0.17220486 -0.210769 -0.23429398 -0.24220053 -0.23429398 -0.210769 -0.17220486 -0.11955114 -0.05410435 0.022524 0.10844706 0.20154912 0.2995377 0.4 0.49683102 0.59127774 0.68101457 0.76383189 0.83769045 0.90077163 0.95152215 0.98869236 1.01136701 1.01898777 1.01136701 0.98869236 0.95152215 0.90077163 0.83769045 0.76383189 0.68101457 0.59127774 0.49683102 0.4 0.30316898 0.20872226 0.11898543 0.03616811 -0.03769045 -0.10077163 -0.15152215 -0.18869236 -0.21136701 -0.21898777 -0.21136701 -0.18869236 -0.15152215 -0.10077163 -0.03769045 0.03616811 0.11898543 0.20872226 0.30316898 0.4 0.49808728 0.59335277 0.68305585 0.76461593 0.83568667 0.89422351 0.93854243 0.96736846 0.97987234 0.97569435 0.95495467 0.91824997 0.86663615 0.80159806 0.72500673 0.63906555 0.54624688 0.44922096 0.35077904 0.25375312 0.16093445 0.07499327 -0.00159806 -0.06663615 -0.11824997 -0.15495467 -0.17569435 -0.17987234 -0.16736846 -0.13854243 -0.09422351 -0.03568667 0.03538407 0.11694415 0.20664723 0.30191272 0.4 0.50003165 0.5964479 0.68576401 0.76475186 0.83055663 0.88079996 0.91366593 0.92796668 0.92318533 0.8994947 0.85775103 0.79946305 0.72673743 0.64220267 0.54891407 0.45024333 0.34975667 0.25108593 0.15779733 0.07326257 0.00053695 -0.05775103 -0.0994947 -0.12318533 -0.12796668 -0.11366593 -0.08079996 -0.03055663 0.03524814 0.11423599 0.2035521 0.29996835 0.4 0.49640095 0.58858871 0.67253424 0.74456871 0.80154388 0.84096966 0.86112295 0.86112295 0.84096966 0.80154388 0.74456871 0.67253424 0.58858871 0.49640095 0.4 0.30359905 0.21141129 0.12746576 0.05543129 -0.00154388 -0.04096966 -0.06112295 -0.06112295 -0.04096966 -0.00154388 0.05543129 0.12746576 0.21141129 0.30359905 0.4 0.50041058 0.59397834 0.67432679 0.73598033 0.77473737 0.78795667 0.77473737 0.73598033 0.67432679 0.59397834 0.50041058 0.4 0.29958942 0.20602166 0.12567321 0.06401967 0.02526263 0.01204333 0.02526263 0.06401967 0.12567321 0.20602166 0.29958942 0.4 0.49329252 0.57745293 0.644243 0.68712487 0.70190095 0.68712487 0.644243 0.57745293 0.49329252 0.4 0.30670748 0.22254707 0.155757 0.11287513 0.09809905 0.11287513 0.155757 0.22254707 0.30670748 0.4 0.49665096 0.57116034 0.60645896 0.59446031 0.53791315 0.44977175 0.35022825 0.26208685 0.20553969 0.19354104 0.22883966 0.30334904 0.4 0.48735738 0.50893287 0.44847969 0.35152031 0.29106713 0.31264262 0.4; - 1.05 1.03856404 1.03856404 1.03856404 1.03856404 1.03856404 1.03856404 1.03856404 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 1.00961607 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.96336631 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.90108248 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.82712115 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.74184072 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.64766204 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.54923114 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.449333 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.35233796 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.25815928 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.17287885 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.09891752 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 0.03663369 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.00961607 -0.03856404 -0.03856404 -0.03856404 -0.03856404 -0.03856404 -0.03856404 -0.03856404 -0.05 1.15 1.14032449 1.14032449 1.14032449 1.14032449 1.14032449 1.14032449 1.14032449 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.11582973 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.07563514 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 1.02152624 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.95553999 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.87831027 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.79264535 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.69837877 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.60039163 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.39960837 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.30162123 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.20735465 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.12168973 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 0.04446001 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.02152624 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.07563514 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.11582973 -0.14032449 -0.14032449 -0.14032449 -0.14032449 -0.14032449 -0.14032449 -0.14032449 -0.15], - ] - - @testset "$(shape_names[i])" for i in eachindex(shape_names) - @test isapprox(shapes[i].coordinates, expected_coords[i]) - end - end -end diff --git a/test/systems/boundary_system.jl b/test/systems/boundary_system.jl deleted file mode 100644 index 2ffa40af4..000000000 --- a/test/systems/boundary_system.jl +++ /dev/null @@ -1,128 +0,0 @@ -@testset verbose=true "BoundarySystem" begin - coordinates_ = [ - [1.0 2.0 - 1.0 2.0], - [1.0 2.0 - 1.0 2.0 - 1.0 2.0], - ] - mass = [1.0, 1.0] - density = [1000.0, 1000.0] - - @testset verbose=true "Constructor" begin - @testset "$(i+1)D" for i in 1:2 - NDIMS = i + 1 - coordinates = coordinates_[i] - initial_condition = InitialCondition(; coordinates, mass, density) - model = Val(:boundary_model) - - system = BoundarySPHSystem(initial_condition, model) - TrixiParticles.update_positions!(system, 0, 0, 0, 0, 0, 0.0) - - @test system isa BoundarySPHSystem - @test ndims(system) == NDIMS - @test system.coordinates == coordinates - @test system.boundary_model == model - @test system.movement === nothing - @test system.ismoving[] == false - end - end - - @testset verbose=true "Moving Boundaries" begin - @testset "$(i+1)D" for i in 1:2 - NDIMS = i + 1 - coordinates = coordinates_[i] - - initial_condition = InitialCondition(; coordinates, mass, density) - model = (; hydrodynamic_mass=3) - - function movement_function(t) - if NDIMS == 2 - return SVector(0.5 * t, 0.3 * t^2) - end - - return SVector(0.5 * t, 0.3 * t^2, 0.1 * t^3) - end - - is_moving(t) = t < 1.0 - bm = BoundaryMovement(movement_function, is_moving) - system = BoundarySPHSystem(initial_condition, model, movement=bm) - - # Moving - t = 0.6 - system.movement(system, t) - if NDIMS == 2 - new_coordinates = coordinates .+ [0.5 * t, 0.3 * t^2] - new_velocity = [0.5, 0.6 * t] .* ones(size(new_coordinates)) - new_acceleration = [0.0, 0.6] .* ones(size(new_coordinates)) - else - new_coordinates = coordinates .+ [0.5 * t, 0.3 * t^2, 0.1 * t^3] - new_velocity = [0.5, 0.6 * t, 0.3 * t^2] .* ones(size(new_coordinates)) - new_acceleration = [0.0, 0.6, 0.6 * t] .* ones(size(new_coordinates)) - end - - @test isapprox(new_coordinates, system.coordinates) - @test isapprox(new_velocity, system.cache.velocity) - @test isapprox(new_acceleration, system.cache.acceleration) - - # Stop moving - t = 1.0 - system.movement(system, t) - - @test isapprox(new_coordinates, system.coordinates) - - # Move only a single particle - new_coordinates = copy(coordinates_[i]) - new_velocity = zero(new_coordinates) - new_acceleration = zero(new_coordinates) - - initial_condition = InitialCondition(; coordinates, mass, density) - - bm = BoundaryMovement(movement_function, is_moving, moving_particles=[2]) - system = BoundarySPHSystem(initial_condition, model, movement=bm) - - t = 0.1 - system.movement(system, t) - - if NDIMS == 2 - new_coordinates[:, 2] .+= [0.5 * t, 0.3 * t^2] - new_velocity[:, 2] .= [0.5, 0.6 * t] - new_acceleration[:, 2] .= [0.0, 0.6] - else - new_coordinates[:, 2] .+= [0.5 * t, 0.3 * t^2, 0.1 * t^3] - new_velocity[:, 2] .= [0.5, 0.6 * t, 0.3 * t^2] - new_acceleration[:, 2] = [0.0, 0.6, 0.6 * t] - end - - @test isapprox(new_coordinates, system.coordinates) - @test isapprox(new_velocity, system.cache.velocity) - @test isapprox(new_acceleration, system.cache.acceleration) - end - end - - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "show" begin - coordinates = [1.0 2.0 - 1.0 2.0] - mass = [1.0, 1.0] - density = [1000.0, 1000.0] - initial_condition = InitialCondition(; coordinates, mass, density) - model = (; hydrodynamic_mass=3) - - system = BoundarySPHSystem(initial_condition, model) - - show_compact = "BoundarySPHSystem{2}((hydrodynamic_mass = 3,), nothing, 0.0) with 2 particles" - @test repr(system) == show_compact - - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ BoundarySPHSystem{2} │ - │ ════════════════════ │ - │ #particles: ………………………………………………… 2 │ - │ boundary model: ……………………………………… (hydrodynamic_mass = 3,) │ - │ movement function: ……………………………… nothing │ - │ adhesion coefficient: ……………………… 0.0 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", system) == show_box - end -end diff --git a/test/systems/dem_system.jl b/test/systems/dem_system.jl deleted file mode 100644 index c7ae18bcb..000000000 --- a/test/systems/dem_system.jl +++ /dev/null @@ -1,26 +0,0 @@ -include("../test_util.jl") -@testset verbose=true "DEMSystem" begin - @trixi_testset "show" begin - coordinates = [1.0 2.0 - 1.0 2.0] - mass = [1.25, 1.5] - density = [990.0, 1000.0] - - initial_condition = InitialCondition(; coordinates, mass, density) - system = DEMSystem(initial_condition, 2 * 10^5, 10e9, 0.3, acceleration=(0.0, 10.0)) - - show_compact = "DEMSystem{2}(InitialCondition{Float64}(-1.0, [1.0 2.0; 1.0 2.0], [0.0 0.0; 0.0 0.0], [1.25, 1.5], [990.0, 1000.0], [0.0, 0.0]), 1.0e10, 0.3, 200000.0, 0.0001) with 2 particles" - @test repr(system) == show_compact - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ DEMSystem{2} │ - │ ════════════ │ - │ #particles: ………………………………………………… 2 │ - │ elastic_modulus: …………………………………… 1.0e10 │ - │ poissons_ratio: ……………………………………… 0.3 │ - │ normal_stiffness: ………………………………… 200000.0 │ - │ damping_coefficient: ………………………… 0.0001 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", system) == show_box - end -end diff --git a/test/systems/edac_system.jl b/test/systems/edac_system.jl deleted file mode 100644 index 33b06384d..000000000 --- a/test/systems/edac_system.jl +++ /dev/null @@ -1,204 +0,0 @@ -@testset verbose=true "EntropicallyDampedSPHSystem" begin - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Constructors" begin - coordinates_ = [ - [1.0 2.0 - 1.0 2.0], - [1.0 2.0 - 1.0 2.0 - 1.0 2.0], - ] - - @testset "$(i+1)D" for i in 1:2 - NDIMS = i + 1 - coordinates = coordinates_[i] - mass = [1.25, 1.5] - density = [990.0, 1000.0] - smoothing_kernel = Val(:smoothing_kernel) - TrixiParticles.ndims(::Val{:smoothing_kernel}) = i + 1 - smoothing_kernel2 = Val(:smoothing_kernel2) - # The wrong dimension. 2 -> 3, 3 -> 2. - TrixiParticles.ndims(::Val{:smoothing_kernel2}) = i % 2 + 2 - smoothing_length = 0.362 - sound_speed = 10.0 - - initial_condition = InitialCondition(; coordinates, mass, density) - - system = EntropicallyDampedSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, sound_speed) - - @test system isa EntropicallyDampedSPHSystem{NDIMS} - @test system.initial_condition == initial_condition - @test system.mass == mass - @test system.smoothing_kernel == smoothing_kernel - @test system.smoothing_length == smoothing_length - @test system.viscosity === nothing - @test system.nu_edac == (0.5 * smoothing_length * sound_speed) / 8 - @test system.acceleration == [0.0 for _ in 1:NDIMS] - - error_str1 = "`acceleration` must be of length $NDIMS for a $(NDIMS)D problem" - @test_throws ArgumentError(error_str1) EntropicallyDampedSPHSystem(initial_condition, - smoothing_kernel, - smoothing_length, - sound_speed, - acceleration=(0.0)) - - error_str2 = "smoothing kernel dimensionality must be $NDIMS for a $(NDIMS)D problem" - @test_throws ArgumentError(error_str2) EntropicallyDampedSPHSystem(initial_condition, - smoothing_kernel2, - smoothing_length, - sound_speed) - end - end - - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Constructors with Setups" begin - setups = [ - RectangularShape(0.123, (2, 3), (-1.0, 0.1), density=1.0, pressure=1.0), - RectangularShape(0.123, (2, 3, 2), (-1.0, 0.1, 2.1), density=1.0), - RectangularTank(0.123, (0.369, 0.246), (0.369, 0.369), 1020.0).fluid, - RectangularTank(0.123, (0.369, 0.246, 0.246), (0.369, 0.492, 0.492), - 1020.0).fluid, - SphereShape(0.52, 0.1, (-0.2, 0.123), 1.0), - ] - setup_names = [ - "RectangularShape 2D", - "RectangularShape 3D", - "RectangularTank 2D", - "RectangularTank 3D", - "SphereShape 2D", - ] - NDIMS_ = [2, 3, 2, 3, 2] - - @testset "$(setup_names[i])" for i in eachindex(setups) - setup = setups[i] - NDIMS = NDIMS_[i] - smoothing_kernel = Val(:smoothing_kernel) - TrixiParticles.ndims(::Val{:smoothing_kernel}) = NDIMS - smoothing_length = 0.362 - sound_speed = 10.0 - - system = EntropicallyDampedSPHSystem(setup, smoothing_kernel, smoothing_length, - sound_speed) - - @test system isa EntropicallyDampedSPHSystem{NDIMS} - @test system.initial_condition == setup - @test system.mass == setup.mass - @test system.smoothing_kernel == smoothing_kernel - @test system.smoothing_length == smoothing_length - @test system.viscosity === nothing - @test system.nu_edac == (0.5 * smoothing_length * sound_speed) / 8 - @test system.acceleration == [0.0 for _ in 1:NDIMS] - @test length(system.mass) == size(setup.coordinates, 2) - end - - # wrong dimension of acceleration - NDIMS_ = [2, 3] - @testset "Wrong acceleration dimension" for i in eachindex(NDIMS_) - setup = setups[i] - NDIMS = NDIMS_[i] - smoothing_kernel = Val(:smoothing_kernel) - TrixiParticles.ndims(::Val{:smoothing_kernel}) = NDIMS - smoothing_length = 0.362 - sound_speed = 10.0 - - error_str = "`acceleration` must be of length $NDIMS for a $(NDIMS)D problem" - @test_throws ArgumentError(error_str) EntropicallyDampedSPHSystem(setup, - smoothing_kernel, - smoothing_length, - sound_speed, - acceleration=(0.0)) - end - end - - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "show" begin - coordinates = [1.0 2.0 - 1.0 2.0] - mass = [1.25, 1.5] - density = [990.0, 1000.0] - smoothing_kernel = Val(:smoothing_kernel) - TrixiParticles.ndims(::Val{:smoothing_kernel}) = 2 - smoothing_length = 0.362 - sound_speed = 10.0 - - initial_condition = InitialCondition(; coordinates, mass, density) - system = EntropicallyDampedSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, sound_speed) - - show_compact = "EntropicallyDampedSPHSystem{2}(SummationDensity(), nothing, Val{:smoothing_kernel}(), [0.0, 0.0]) with 2 particles" - @test repr(system) == show_compact - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ EntropicallyDampedSPHSystem{2} │ - │ ══════════════════════════════ │ - │ #particles: ………………………………………………… 2 │ - │ density calculator: …………………………… SummationDensity │ - │ viscosity: …………………………………………………… Nothing │ - │ ν₍EDAC₎: ………………………………………………………… ≈ 0.226 │ - │ smoothing kernel: ………………………………… Val │ - │ acceleration: …………………………………………… [0.0, 0.0] │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", system) == show_box - end - - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "write_u0!" begin - coordinates = [1.0 2.0 - 1.0 2.0] - mass = [1.25, 1.5] - density = [990.0, 1000.0] - pressure = [5.0, 7.8] - smoothing_kernel = Val(:smoothing_kernel) - smoothing_length = 0.362 - sound_speed = 10.0 - - initial_condition = InitialCondition(; coordinates, mass, density, pressure) - system = EntropicallyDampedSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, sound_speed) - - u0 = zeros(TrixiParticles.u_nvariables(system), - TrixiParticles.n_moving_particles(system)) - TrixiParticles.write_u0!(u0, system) - - @test u0 == coordinates - end - - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "write_v0!" begin - coordinates = [0.5 2.0 - 1.0 2.0] - velocity = 2 * coordinates - mass = [1.25, 1.5] - density = [990.0, 1000.0] - pressure = [5.0, 7.8] - pressure_function(x) = 1.0 - 0.2 * ℯ^-((first(x) - 0.5)^2 / 0.001) - smoothing_kernel = Val(:smoothing_kernel) - smoothing_length = 0.362 - sound_speed = 10.0 - - initial_condition = InitialCondition(; coordinates, velocity, mass, density, - pressure) - - system = EntropicallyDampedSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, sound_speed) - - v0 = zeros(TrixiParticles.v_nvariables(system), - TrixiParticles.n_moving_particles(system)) - TrixiParticles.write_v0!(v0, system) - - @test v0 == vcat(velocity, pressure') - - initial_condition = InitialCondition(; coordinates, velocity, mass, density, - pressure=pressure_function) - - system = EntropicallyDampedSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, sound_speed) - - v0 = zeros(TrixiParticles.v_nvariables(system), - TrixiParticles.n_moving_particles(system)) - TrixiParticles.write_v0!(v0, system) - - @test v0 == vcat(velocity, [0.8, 1.0]') - end -end diff --git a/test/systems/wcsph_system.jl b/test/systems/fluid_system.jl similarity index 71% rename from test/systems/wcsph_system.jl rename to test/systems/fluid_system.jl index 68f69aea8..390b4cf62 100644 --- a/test/systems/wcsph_system.jl +++ b/test/systems/fluid_system.jl @@ -1,6 +1,5 @@ @testset verbose=true "WeaklyCompressibleSPHSystem" begin - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Constructors" begin + @testset verbose=true "Constructors" begin coordinates_ = [ [1.0 2.0 1.0 2.0], @@ -17,8 +16,9 @@ @testset "$(typeof(density_calculator))" for density_calculator in density_calculators NDIMS = i + 1 coordinates = coordinates_[i] - mass = [1.25, 1.5] - density = [990.0, 1000.0] + velocities = zero(coordinates) + masses = [1.25, 1.5] + densities = [990.0, 1000.0] state_equation = Val(:state_equation) smoothing_kernel = Val(:smoothing_kernel) TrixiParticles.ndims(::Val{:smoothing_kernel}) = i + 1 @@ -27,7 +27,8 @@ TrixiParticles.ndims(::Val{:smoothing_kernel2}) = i % 2 + 2 smoothing_length = 0.362 - initial_condition = InitialCondition(; coordinates, mass, density) + initial_condition = InitialCondition(coordinates, velocities, masses, + densities) system = WeaklyCompressibleSPHSystem(initial_condition, density_calculator, state_equation, smoothing_kernel, @@ -35,12 +36,12 @@ @test system isa WeaklyCompressibleSPHSystem{NDIMS} @test system.initial_condition == initial_condition - @test system.mass == mass + @test system.mass == masses @test system.density_calculator == density_calculator @test system.state_equation == state_equation @test system.smoothing_kernel == smoothing_kernel @test system.smoothing_length == smoothing_length - @test system.viscosity === nothing + @test system.viscosity isa TrixiParticles.NoViscosity @test system.acceleration == [0.0 for _ in 1:NDIMS] if density_calculator isa SummationDensity @@ -65,70 +66,39 @@ end end - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Constructors with Setups" begin + @testset verbose=true "Constructors with Setups" begin setups = [ - RectangularShape(0.123, (2, 3), (-1.0, 0.1), density=1.0), - RectangularShape(0.123, (2, 3, 2), (-1.0, 0.1, 2.1), density=1.0), + RectangularShape(0.123, (2, 3), (-1.0, 0.1), 1.0), + RectangularShape(0.123, (2, 3, 2), (-1.0, 0.1, 2.1), 1.0), RectangularTank(0.123, (0.369, 0.246), (0.369, 0.369), 1020.0).fluid, RectangularTank(0.123, (0.369, 0.246, 0.246), (0.369, 0.492, 0.492), 1020.0).fluid, - SphereShape(0.52, 0.1, (-0.2, 0.123), 1.0), - RectangularShape(0.123, (2, 3), (-1.0, 0.1), density=1.0), - RectangularShape(0.123, (2, 3), (-1.0, 0.1), density=1.0), - RectangularShape(0.123, (2, 3), (-1.0, 0.1), density=1.0), + CircularShape(0.52, 0.1, (-0.2, 0.123), 1.0), ] setup_names = [ "RectangularShape 2D", "RectangularShape 3D", "RectangularTank 2D", "RectangularTank 3D", - "SphereShape 2D", - "RectangularShape 2D with ShepardKernelCorrection", - "RectangularShape 2D with AkinciFreeSurfaceCorrection", - "RectangularShape 2D with KernelCorrection", + "CircularShape", ] - NDIMS_ = [2, 3, 2, 3, 2, 2, 2, 2] + NDIMS_ = [2, 3, 2, 3, 2] density_calculators = [ SummationDensity(), ContinuityDensity(), ] - correction = [ - Nothing(), - Nothing(), - Nothing(), - Nothing(), - Nothing(), - ShepardKernelCorrection(), - AkinciFreeSurfaceCorrection(1000.0), - KernelCorrection(), - ] - @testset "$(setup_names[i])" for i in eachindex(setups) setup = setups[i] NDIMS = NDIMS_[i] - corr = correction[i] state_equation = Val(:state_equation) smoothing_kernel = Val(:smoothing_kernel) TrixiParticles.ndims(::Val{:smoothing_kernel}) = NDIMS smoothing_length = 0.362 @testset "$(typeof(density_calculator))" for density_calculator in density_calculators - if density_calculator isa ContinuityDensity && - corr isa ShepardKernelCorrection - error_str = "`ShepardKernelCorrection` cannot be used with `ContinuityDensity`" - @test_throws ArgumentError(error_str) WeaklyCompressibleSPHSystem(setup, - density_calculator, - state_equation, - smoothing_kernel, - smoothing_length, - correction=corr) - continue - end system = WeaklyCompressibleSPHSystem(setup, density_calculator, state_equation, smoothing_kernel, - smoothing_length, - correction=corr) + smoothing_length) @test system isa WeaklyCompressibleSPHSystem{NDIMS} @test system.initial_condition == setup @@ -137,17 +107,13 @@ @test system.state_equation == state_equation @test system.smoothing_kernel == smoothing_kernel @test system.smoothing_length == smoothing_length - @test system.viscosity === nothing + @test system.viscosity isa TrixiParticles.NoViscosity @test system.acceleration == [0.0 for _ in 1:NDIMS] @test length(system.mass) == size(setup.coordinates, 2) if density_calculator isa SummationDensity @test length(system.cache.density) == size(setup.coordinates, 2) end - if corr isa ShepardKernelCorrection || corr isa KernelCorrection - @test length(system.cache.kernel_correction_coefficient) == - size(setup.coordinates, 2) - end end end @@ -173,27 +139,27 @@ end end - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "show" begin + @testset verbose=true "show" begin coordinates = [1.0 2.0 1.0 2.0] - mass = [1.25, 1.5] - density = [990.0, 1000.0] + velocities = zero(coordinates) + masses = [1.25, 1.5] + densities = [990.0, 1000.0] state_equation = Val(:state_equation) smoothing_kernel = Val(:smoothing_kernel) TrixiParticles.ndims(::Val{:smoothing_kernel}) = 2 smoothing_length = 0.362 density_calculator = SummationDensity() - density_diffusion = Val(:density_diffusion) - initial_condition = InitialCondition(; coordinates, mass, density) + initial_condition = InitialCondition(coordinates, velocities, masses, densities) system = WeaklyCompressibleSPHSystem(initial_condition, density_calculator, state_equation, smoothing_kernel, - smoothing_length, - density_diffusion=density_diffusion) + smoothing_length) - show_compact = "WeaklyCompressibleSPHSystem{2}(SummationDensity(), nothing, Val{:state_equation}(), Val{:smoothing_kernel}(), nothing, Val{:density_diffusion}(), nothing, [0.0, 0.0], nothing) with 2 particles" + show_compact = "WeaklyCompressibleSPHSystem{2}(SummationDensity(), " * + "Val{:state_equation}(), Val{:smoothing_kernel}(), " * + "TrixiParticles.NoViscosity(), [0.0, 0.0]) with 2 particles" @test repr(system) == show_compact show_box = """ ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ @@ -201,14 +167,10 @@ │ ══════════════════════════════ │ │ #particles: ………………………………………………… 2 │ │ density calculator: …………………………… SummationDensity │ - │ correction method: ……………………………… Nothing │ │ state equation: ……………………………………… Val │ │ smoothing kernel: ………………………………… Val │ - │ viscosity: …………………………………………………… nothing │ - │ density diffusion: ……………………………… Val{:density_diffusion}() │ - │ surface tension: …………………………………… nothing │ + │ viscosity: …………………………………………………… TrixiParticles.NoViscosity() │ │ acceleration: …………………………………………… [0.0, 0.0] │ - │ source terms: …………………………………………… Nothing │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" @test repr("text/plain", system) == show_box end @@ -216,14 +178,15 @@ @testset verbose=true "write_u0!" begin coordinates = [1.0 2.0 1.0 2.0] - mass = [1.25, 1.5] - density = [990.0, 1000.0] + velocities = zero(coordinates) + masses = [1.25, 1.5] + densities = [990.0, 1000.0] state_equation = Val(:state_equation) smoothing_kernel = Val(:smoothing_kernel) smoothing_length = 0.362 density_calculator = SummationDensity() - initial_condition = InitialCondition(; coordinates, mass, density) + initial_condition = InitialCondition(coordinates, velocities, masses, densities) system = WeaklyCompressibleSPHSystem(initial_condition, density_calculator, state_equation, smoothing_kernel, @@ -239,14 +202,14 @@ @testset verbose=true "write_v0!" begin coordinates = [1.0 2.0 1.0 2.0] - velocity = 2 * coordinates - mass = [1.25, 1.5] - density = [990.0, 1000.0] + velocities = 2 * coordinates + masses = [1.25, 1.5] + densities = [990.0, 1000.0] state_equation = Val(:state_equation) smoothing_kernel = Val(:smoothing_kernel) smoothing_length = 0.362 - initial_condition = InitialCondition(; coordinates, velocity, mass, density) + initial_condition = InitialCondition(coordinates, velocities, masses, densities) # SummationDensity system = WeaklyCompressibleSPHSystem(initial_condition, @@ -258,7 +221,7 @@ TrixiParticles.n_moving_particles(system)) TrixiParticles.write_v0!(v0, system) - @test v0 == velocity + @test v0 == velocities # ContinuityDensity system = WeaklyCompressibleSPHSystem(initial_condition, @@ -270,6 +233,6 @@ TrixiParticles.n_moving_particles(system)) TrixiParticles.write_v0!(v0, system) - @test v0 == vcat(velocity, density') + @test v0 == vcat(velocities, densities') end end diff --git a/test/systems/open_boundary_system.jl b/test/systems/open_boundary_system.jl deleted file mode 100644 index 1158aaff0..000000000 --- a/test/systems/open_boundary_system.jl +++ /dev/null @@ -1,90 +0,0 @@ -@testset verbose=true "`OpenBoundarySPHSystem`" begin - @testset verbose=true "Illegal Inputs" begin - plane = ([0.0, 0.0], [0.0, 1.0]) - flow_direction = (1.0, 0.0) - - # Mock fluid system - struct FluidSystemMock2 <: TrixiParticles.FluidSystem{2, Nothing} end - - inflow = InFlow(; plane, particle_spacing=0.1, - flow_direction, density=1.0, open_boundary_layers=2) - - error_str = "`reference_velocity` must be either a function mapping " * - "each particle's coordinates and time to its velocity, " * - "an array where the ``i``-th column holds the velocity of particle ``i`` " * - "or, for a constant fluid velocity, a vector of length 2 for a 2D problem holding this velocity" - - reference_velocity = 1.0 - @test_throws ArgumentError(error_str) OpenBoundarySPHSystem(inflow; sound_speed=1.0, - buffer_size=0, - fluid_system=FluidSystemMock2(), - reference_velocity) - - error_str = "`reference_pressure` must be either a function mapping " * - "each particle's coordinates and time to its pressure, " * - "a vector holding the pressure of each particle, or a scalar" - - reference_pressure = [1.0, 1.0] - @test_throws ArgumentError(error_str) OpenBoundarySPHSystem(inflow; sound_speed=1.0, - buffer_size=0, - fluid_system=FluidSystemMock2(), - reference_pressure) - - error_str = "`reference_density` must be either a function mapping " * - "each particle's coordinates and time to its density, " * - "a vector holding the density of each particle, or a scalar" - - reference_density = [1.0, 1.0] - @test_throws ArgumentError(error_str) OpenBoundarySPHSystem(inflow; sound_speed=1.0, - buffer_size=0, - fluid_system=FluidSystemMock2(), - reference_density) - end - @testset "`show`" begin - inflow = InFlow(; plane=([0.0, 0.0], [0.0, 1.0]), particle_spacing=0.05, - flow_direction=(1.0, 0.0), density=1.0, open_boundary_layers=4) - system = OpenBoundarySPHSystem(inflow; sound_speed=1.0, buffer_size=0, - fluid_system=FluidSystemMock2()) - - show_compact = "OpenBoundarySPHSystem{2}(InFlow) with 80 particles" - @test repr(system) == show_compact - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ OpenBoundarySPHSystem{2} │ - │ ════════════════════════ │ - │ #particles: ………………………………………………… 80 │ - │ #buffer_particles: ……………………………… 0 │ - │ fluid system: …………………………………………… FluidSystemMock2 │ - │ boundary: ……………………………………………………… InFlow │ - │ flow direction: ……………………………………… [1.0, 0.0] │ - │ prescribed velocity: ………………………… constant_vector │ - │ prescribed pressure: ………………………… constant_scalar │ - │ prescribed density: …………………………… constant_scalar │ - │ width: ……………………………………………………………… 0.2 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", system) == show_box - - outflow = OutFlow(; plane=([0.0, 0.0], [0.0, 1.0]), particle_spacing=0.05, - flow_direction=(1.0, 0.0), density=1.0, open_boundary_layers=4) - system = OpenBoundarySPHSystem(outflow; sound_speed=1.0, buffer_size=0, - fluid_system=FluidSystemMock2()) - - show_compact = "OpenBoundarySPHSystem{2}(OutFlow) with 80 particles" - @test repr(system) == show_compact - show_box = """ - ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ - │ OpenBoundarySPHSystem{2} │ - │ ════════════════════════ │ - │ #particles: ………………………………………………… 80 │ - │ #buffer_particles: ……………………………… 0 │ - │ fluid system: …………………………………………… FluidSystemMock2 │ - │ boundary: ……………………………………………………… OutFlow │ - │ flow direction: ……………………………………… [1.0, 0.0] │ - │ prescribed velocity: ………………………… constant_vector │ - │ prescribed pressure: ………………………… constant_scalar │ - │ prescribed density: …………………………… constant_scalar │ - │ width: ……………………………………………………………… 0.2 │ - └──────────────────────────────────────────────────────────────────────────────────────────────────┘""" - @test repr("text/plain", system) == show_box - end -end diff --git a/test/systems/solid_system.jl b/test/systems/solid_system.jl index 369022273..a64149e58 100644 --- a/test/systems/solid_system.jl +++ b/test/systems/solid_system.jl @@ -1,6 +1,5 @@ @testset verbose=true "TotalLagrangianSPHSystem" begin - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Constructor" begin + @testset verbose=true "Constructor" begin coordinates_ = [ [1.0 2.0 1.0 2.0], @@ -11,7 +10,8 @@ @testset "$(i+1)D" for i in 1:2 NDIMS = i + 1 coordinates = coordinates_[i] - mass = [1.25, 1.5] + velocities = zero(coordinates) + masses = [1.25, 1.5] material_densities = [990.0, 1000.0] smoothing_kernel = Val(:smoothing_kernel) TrixiParticles.ndims(::Val{:smoothing_kernel}) = i + 1 @@ -21,18 +21,17 @@ E = 2.5 boundary_model = Val(:boundary_model) - initial_condition = InitialCondition(; coordinates, mass, - density=material_densities) + initial_condition = InitialCondition(coordinates, velocities, masses, + material_densities) system = TotalLagrangianSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, E, nu, - boundary_model=boundary_model) + smoothing_length, E, nu, boundary_model) @test system isa TotalLagrangianSPHSystem @test ndims(system) == NDIMS @test system.initial_condition == initial_condition @test system.initial_coordinates == coordinates @test system.current_coordinates == coordinates - @test system.mass == mass + @test system.mass == masses @test system.material_density == material_densities @test system.n_moving_particles == 2 @test system.young_modulus == E @@ -46,11 +45,11 @@ end end - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "show" begin + @testset verbose=true "show" begin coordinates = [1.0 2.0 1.0 2.0] - mass = [1.25, 1.5] + velocities = zero(coordinates) + masses = [1.25, 1.5] material_densities = [990.0, 1000.0] smoothing_kernel = Val(:smoothing_kernel) TrixiParticles.ndims(::Val{:smoothing_kernel}) = 2 @@ -60,11 +59,10 @@ E = 2.5 boundary_model = Val(:boundary_model) - initial_condition = InitialCondition(; coordinates, mass, - density=material_densities) + initial_condition = InitialCondition(coordinates, velocities, masses, + material_densities) system = TotalLagrangianSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, E, nu, - boundary_model=boundary_model) + smoothing_length, E, nu, boundary_model) show_compact = "TotalLagrangianSPHSystem{2}(2.5, 0.25, Val{:smoothing_kernel}(), " * "[0.0, 0.0], Val{:boundary_model}(), nothing) with 2 particles" @@ -87,8 +85,7 @@ end @testset verbose=true "Deformation Gradient" begin - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Manual Calculation" begin + @testset verbose=true "Manual Calculation" begin # Compare against manually calculated values. # # This is a proof of concept showing that mocking in Julia unit tests works without @@ -129,7 +126,8 @@ system = Val(:mock_system_tensor) TrixiParticles.ndims(::Val{:mock_system_tensor}) = 2 Base.ntuple(f, ::Symbol) = ntuple(f, 2) # Make `extract_svector` work - function TrixiParticles.current_coords(system::Val{:mock_system_tensor}, + function TrixiParticles.current_coords(system::Val{:mock_system_tensor + }, particle) return TrixiParticles.extract_svector(current_coordinates[i], system, particle) @@ -139,7 +137,9 @@ return initial_coordinates[i] end - # All unpack calls should return another mock object + TrixiParticles.compact_support(::Val{:mock_system_tensor}, _) = Inf + + # All @unpack calls should return another mock object # of the type `Val{:mock_property_name}`, but we want to have some real matrices # as properties as opposed to only mock objects. function Base.getproperty(::Val{:mock_system_tensor}, f::Symbol) @@ -153,19 +153,7 @@ return Val(Symbol("mock_" * string(f))) end - TrixiParticles.PointNeighbors.eachneighbor(_, ::Val{:nhs}) = neighbors - - function Base.getproperty(::Val{:nhs}, f::Symbol) - if f === :search_radius - return Inf - elseif f === :periodic_box_size - return nothing - end - - # For all other properties, return mock objects - return Val(Symbol("mock_" * string(f))) - end - TrixiParticles.ndims(::Val{:nhs}) = 2 + TrixiParticles.eachneighbor(_, ::Val{:mock_nhs}) = neighbors Base.getindex(::Val{:mock_material_density}, ::Int64) = density @@ -175,7 +163,8 @@ # Compute deformation gradient deformation_grad = ones(2, 2, 2) - TrixiParticles.calc_deformation_grad!(deformation_grad, Val(:nhs), system) + TrixiParticles.calc_deformation_grad!(deformation_grad, Val(:mock_nhs), + system) #### Verification @test deformation_grad[:, :, particle] == expected[i] @@ -185,17 +174,17 @@ @testset verbose=true "Deformation Functions" begin # We generate a grid of particles, apply a deformation, and verify that the computed # deformation gradient matches the deformation matrix. - deformations = Dict( - "Stretch x" => x -> [2.0 0.0; 0.0 1.0] * x, - "Stretch Both" => x -> [2.0 0.0; 0.0 3.0] * x, - "Rotation" => x -> [cos(0.3) -sin(0.3); sin(0.3) cos(0.3)] * x, - "Nonlinear Stretching" => x -> [x[1]^2, x[2]]) - - deformation_gradients = Dict( - "Stretch x" => [2.0 0.0; 0.0 1.0], - "Stretch Both" => [2.0 0.0; 0.0 3.0], - "Rotation" => [cos(0.3) -sin(0.3); sin(0.3) cos(0.3)], - "Nonlinear Stretching" => [1.0 0.0; 0.0 1.0]) + deformations = Dict("Stretch x" => x -> [2.0 0.0; 0.0 1.0] * x, + "Stretch Both" => x -> [2.0 0.0; 0.0 3.0] * x, + "Rotation" => x -> [cos(0.3) -sin(0.3); sin(0.3) cos(0.3)] * + x, + "Nonlinear Stretching" => x -> [x[1]^2, x[2]]) + + deformation_gradients = Dict("Stretch x" => [2.0 0.0; 0.0 1.0], + "Stretch Both" => [2.0 0.0; 0.0 3.0], + "Rotation" => [cos(0.3) -sin(0.3); + sin(0.3) cos(0.3)], + "Nonlinear Stretching" => [1.0 0.0; 0.0 1.0]) @testset "$deformation_name" for deformation_name in keys(deformations) deformation = deformations[deformation_name] @@ -205,20 +194,21 @@ coordinates = hcat(collect.(Iterators.product(range, range))...) n_particles_per_dimension = (9, 9) - mass = 10 * ones(Float64, prod(n_particles_per_dimension)) - density = 1000 * ones(Float64, prod(n_particles_per_dimension)) + velocities = zero(coordinates) + masses = 10 * ones(Float64, prod(n_particles_per_dimension)) + densities = 1000 * ones(Float64, prod(n_particles_per_dimension)) smoothing_length = 0.12 smoothing_kernel = SchoenbergCubicSplineKernel{2}() search_radius = TrixiParticles.compact_support(smoothing_kernel, smoothing_length) - initial_condition = InitialCondition(; coordinates, mass, density) - system = TotalLagrangianSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, 1.0, 1.0) - nhs = TrixiParticles.TrivialNeighborhoodSearch{2}(1.0, - TrixiParticles.eachparticle(system)) - + initial_condition = InitialCondition(coordinates, velocities, masses, + densities) + system = TotalLagrangianSPHSystem(initial_condition, + smoothing_kernel, smoothing_length, + 1.0, 1.0, nothing) + nhs = TrixiParticles.TrivialNeighborhoodSearch(TrixiParticles.eachparticle(system)) TrixiParticles.initialize!(system, nhs) # Apply the deformation matrix @@ -238,13 +228,11 @@ end end - # Use `@trixi_testset` to isolate the mock functions in a separate namespace - @trixi_testset "Stress tensors" begin + @testset verbose=true "Stress tensors" begin deformations = Dict("rotation" => [cos(0.3) -sin(0.3); sin(0.3) cos(0.3)], "stretch both" => [2.0 0.0; 0.0 3.0], "rotate and stretch" => [cos(0.3) -sin(0.3); - sin(0.3) cos(0.3)] * [2.0 0.0; 0.0 3.0] - ) + sin(0.3) cos(0.3)] * [2.0 0.0; 0.0 3.0]) expected_pk2 = Dict("rotation" => zeros(2, 2), # No stress in rotations only "stretch both" => [8.5 0.0; 0.0 13.5], # Calculated by hand @@ -255,8 +243,7 @@ "stretch both" => [17.0 0.0; 0.0 40.5], "rotate and stretch" => [cos(0.3) -sin(0.3); sin(0.3) cos(0.3)] * - [2.0 0.0; 0.0 3.0] * [8.5 0.0; 0.0 13.5] - ) + [2.0 0.0; 0.0 3.0] * [8.5 0.0; 0.0 13.5]) @testset "Deformation Function: $deformation" for deformation in keys(deformations) #### Setup @@ -269,7 +256,7 @@ # and deformation gradient than to actually construct a system. system = Val(:mock_system) - # All unpack calls should return another mock object + # All @unpack calls should return another mock object # of the type `Val{:mock_property_name}`, but we want to have the actual # Lamé constants as properties. function Base.getproperty(::Val{:mock_system}, f::Symbol) @@ -292,7 +279,8 @@ @testset verbose=true "write_u0!" begin coordinates = [1.0 2.0 1.0 2.0] - mass = [1.25, 1.5] + velocities = zero(coordinates) + masses = [1.25, 1.5] material_densities = [990.0, 1000.0] smoothing_kernel = Val(:smoothing_kernel) smoothing_length = 0.362 @@ -301,11 +289,10 @@ E = 2.5 boundary_model = Val(:boundary_model) - initial_condition = InitialCondition(; coordinates, mass, - density=material_densities) + initial_condition = InitialCondition(coordinates, velocities, masses, + material_densities) system = TotalLagrangianSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, E, nu, - boundary_model=boundary_model) + smoothing_length, E, nu, boundary_model) u0 = zeros(TrixiParticles.u_nvariables(system), TrixiParticles.n_moving_particles(system)) @@ -317,8 +304,8 @@ @testset verbose=true "write_v0!" begin coordinates = [1.0 2.0 1.0 2.0] - velocity = zero(coordinates) - mass = [1.25, 1.5] + velocities = zero(coordinates) + masses = [1.25, 1.5] material_densities = [990.0, 1000.0] smoothing_kernel = Val(:smoothing_kernel) smoothing_length = 0.362 @@ -327,49 +314,15 @@ E = 2.5 boundary_model = Val(:boundary_model) - initial_condition = InitialCondition(; coordinates, velocity, mass, - density=material_densities) + initial_condition = InitialCondition(coordinates, velocities, masses, + material_densities) system = TotalLagrangianSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, E, nu, - boundary_model=boundary_model) + smoothing_length, E, nu, boundary_model) v0 = zeros(TrixiParticles.v_nvariables(system), TrixiParticles.n_moving_particles(system)) TrixiParticles.write_v0!(v0, system) - @test v0 == velocity - end - - @testset verbose=true "compute_von_mises_stress" begin - # System setup - coordinates = [1.0 2.0; 1.0 2.0] - velocity = zero(coordinates) - mass = [1.25, 1.5] - material_densities = [990.0, 1000.0] - smoothing_kernel = Val(:smoothing_kernel) - smoothing_length = 0.362 - nu = 0.25 # Poisson's ratio - E = 2.5 # Young's modulus - - initial_condition = InitialCondition(; coordinates, velocity, mass, - density=material_densities) - system = TotalLagrangianSPHSystem(initial_condition, smoothing_kernel, - smoothing_length, E, nu) - - # Initialize deformation_grad and pk1_corrected with arbitrary values - for particle in TrixiParticles.eachparticle(system) - system.deformation_grad[:, :, particle] = [1.0 0.2; 0.2 1.0] - system.pk1_corrected[:, :, particle] = [1.0 0.5; 0.5 1.0] - end - - von_mises_stress = TrixiParticles.von_mises_stress(system) - cauchy_stress = TrixiParticles.cauchy_stress(system) - - reference_stress_tensor = [1.145833 0.729167; 0.729167 1.145833;;; - 1.145833 0.729167; 0.729167 1.145833] - - # Verify against calculation by hand - @test isapprox(von_mises_stress[1], 1.4257267477533202, atol=1e-14) - @test isapprox(reference_stress_tensor, cauchy_stress, atol=1e-6) + @test v0 == velocities end end diff --git a/test/systems/systems.jl b/test/systems/systems.jl index 697f575fa..08bd8bbf2 100644 --- a/test/systems/systems.jl +++ b/test/systems/systems.jl @@ -1,6 +1,2 @@ -include("wcsph_system.jl") -include("edac_system.jl") +include("fluid_system.jl") include("solid_system.jl") -include("boundary_system.jl") -include("open_boundary_system.jl") -include("dem_system.jl") diff --git a/test/test_util.jl b/test/test_util.jl index 5937cc68f..eff0b6b99 100644 --- a/test/test_util.jl +++ b/test/test_util.jl @@ -2,12 +2,6 @@ using Test using TrixiParticles using LinearAlgebra using Printf -using CSV: CSV -using DataFrames: DataFrame -using JSON: JSON -using QuadGK: quadgk # For integration in smoothing kernel tests -using Random: Random # For rectangular patch -using Polyester: disable_polyester_threads # For `count_rhs_allocations` """ @trixi_testset "name of the testset" #= code to test #= @@ -22,68 +16,15 @@ macro trixi_testset(name, expr) # TODO: `@eval` is evil quote - println("═"^100) - println($name) + local time_start = time_ns() @eval module $mod using Test using TrixiParticles - # We also include this file again to provide the definition of - # the other testing macros. This allows to use `@trixi_testset` - # in a nested fashion and also call `@test_nowarn_mod` from - # there. - include(@__FILE__) - - @testset verbose=true $name $expr + @testset $name $expr end nothing end end - -# Copied from TrixiBase.jl. See https://github.com/trixi-framework/TrixiBase.jl/issues/9. -""" - @test_nowarn_mod expr - -Modified version of `@test_nowarn expr` that prints the content of `stderr` when -it is not empty and ignores some common info statements printed in Trixi.jl -uses. -""" -macro test_nowarn_mod(expr, additional_ignore_content=String[]) - quote - let fname = tempname() - try - ret = open(fname, "w") do f - redirect_stderr(f) do - $(esc(expr)) - end - end - stderr_content = read(fname, String) - if !isempty(stderr_content) - println("Content of `stderr`:\n", stderr_content) - end - - # Patterns matching the following ones will be ignored. Additional patterns - # passed as arguments can also be regular expressions, so we just use the - # type `Any` for `ignore_content`. - ignore_content = Any["[ Info: You just called `trixi_include`. Julia may now compile the code, please be patient.\n"] - append!(ignore_content, $additional_ignore_content) - for pattern in ignore_content - stderr_content = replace(stderr_content, pattern => "") - end - - # We also ignore simple module redefinitions for convenience. Thus, we - # check whether every line of `stderr_content` is of the form of a - # module replacement warning. - @test occursin(r"^(WARNING: replacing module .+\.\n)*$", stderr_content) - ret - finally - rm(fname, force=true) - end - end - end -end - -include("count_allocations.jl") -include("rectangular_patch.jl") diff --git a/test/unittest.jl b/test/unittest.jl index 5c05924e1..36a4e7276 100644 --- a/test/unittest.jl +++ b/test/unittest.jl @@ -1,9 +1,8 @@ # Separate file that can be executed to only run unit tests. # Include `test_util.jl` first. @testset verbose=true "Unit Tests" begin - include("callbacks/callbacks.jl") - include("general/general.jl") - include("setups/setups.jl") include("systems/systems.jl") + include("general/general.jl") include("schemes/schemes.jl") + include("setups/setups.jl") end; diff --git a/test/validation/validation.jl b/test/validation/validation.jl deleted file mode 100644 index 1fd67ac28..000000000 --- a/test/validation/validation.jl +++ /dev/null @@ -1,75 +0,0 @@ -@testset verbose=true "Validation" begin - @trixi_testset "general" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(validation_dir(), "general", - "investigate_relaxation.jl"), - tspan=(0.0, 1.0)) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - # Verify number of plots - @test plot1.n == 4 - end - - @trixi_testset "oscillating_beam_2d" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(validation_dir(), "oscillating_beam_2d", - "validation_oscillating_beam_2d.jl"), - tspan=(0.0, 1.0)) - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - @test isapprox(error_deflection_x, 0, atol=eps()) - @test isapprox(error_deflection_y, 0, atol=eps()) - - # Ignore method redefinitions from duplicate `include("../validation_util.jl")` - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(validation_dir(), "oscillating_beam_2d", - "plot_oscillating_beam_results.jl")) [ - r"WARNING: Method definition linear_interpolation.*\n", - r"WARNING: Method definition interpolated_mse.*\n", - r"WARNING: Method definition extract_number_from_filename.*\n", - r"WARNING: Method definition extract_resolution_from_filename.*\n", - r"WARNING: importing deprecated binding Makie.*\n", - r"WARNING: Makie.* is deprecated.*\n", - r" likely near none:1\n", - r", use .* instead.\n", - ] - # Verify number of plots - @test length(ax1.scene.plots) >= 6 - end - - @trixi_testset "dam_break_2d" begin - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(validation_dir(), "dam_break_2d", - "validation_dam_break_2d.jl")) [ - r"┌ Info: The desired tank length in y-direction.*\n", - r"└ New tank length in y-direction is set to.*\n", - ] - @test sol.retcode == ReturnCode.Success - @test count_rhs_allocations(sol, semi) == 0 - - if VERSION >= v"1.10" - @test isapprox(error_edac_P1, 0, atol=1e-9) - @test isapprox(error_edac_P2, 0, atol=6e-12) - @test isapprox(error_wcsph_P1, 0, atol=eps()) - @test isapprox(error_wcsph_P2, 0, atol=eps()) - else - # 1.9 causes a large difference in the solution - @test isapprox(error_edac_P1, 0, atol=1e-8) - @test isapprox(error_edac_P2, 0, atol=1e-10) - @test isapprox(error_wcsph_P1, 0, atol=10) - @test isapprox(error_wcsph_P2, 0, atol=1e-3) - end - - # Ignore method redefinitions from duplicate `include("../validation_util.jl")` - @test_nowarn_mod trixi_include(@__MODULE__, - joinpath(validation_dir(), "dam_break_2d", - "plot_dam_break_results.jl")) [ - r"WARNING: Method definition linear_interpolation.*\n", - r"WARNING: Method definition interpolated_mse.*\n", - r"WARNING: Method definition extract_number_from_filename.*\n", - r"WARNING: Method definition extract_resolution_from_filename.*\n", - ] - # Verify number of plots - @test length(axs_edac[1].scene.plots) >= 2 - end -end diff --git a/validation/dam_break_2d/README.md b/validation/dam_break_2d/README.md deleted file mode 100644 index d712580b1..000000000 --- a/validation/dam_break_2d/README.md +++ /dev/null @@ -1,8 +0,0 @@ -The following files are provided here: - -1) Validation simulation: validation_dam_break_2d.jl -2) Comparison with TrixiParticles.jl and literature reference: plot_dam_break_results.jl -3) TrixiParticles.jl reference files: validation_reference_[0015, 00075, 0001875].j (0025 is the default CI resolution. Note that resolution 0015 takes around 2-5 minutes, 00075 around 5-10 minutes, 0001875 around 2-4 hours). -4) exp_surge_front.csv was manually extracted from Martin and Moyce, "Part IV. An experimental study of the collapse of liquid columns on a rigid horizontal plane", Phil. Tran. R. Soc. London, 1952, doi: https://doi.org/10.1098/rsta.1952.0006 -5) exp_pressure_sensor_P*.csv was manually extracted from B. Buchner, "Green Water on Ship-type Offshore Structures", Ph.D. Thesis, Delft University of Technology, 2002. -6) sim_pressure_sensor_P*.csv was manually extracted from S. Marrone et al., "δ-SPH model for simulating violent impact flows", Computer Methods in Applied Mechanics and Engineering, 2011, doi: https://doi.org/10.1016/j.cma.2010.12.016 \ No newline at end of file diff --git a/validation/dam_break_2d/exp_pressure_sensor_P1.csv b/validation/dam_break_2d/exp_pressure_sensor_P1.csv deleted file mode 100644 index 7ecbd6a4c..000000000 --- a/validation/dam_break_2d/exp_pressure_sensor_P1.csv +++ /dev/null @@ -1,99 +0,0 @@ -time,P1 -2.02512,-0.01792 -2.06281,0.02087 -2.12405,-0.02169 -2.16801,0.01112 -2.24966,-0.02026 -2.27165,0.01033 -2.42553,-0.01511 -2.47263,0.07666 -2.49148,0.15352 -2.55271,0.26544 -2.61552,0.37138 -2.62337,0.46317 -2.65007,0.56241 -2.67205,0.60494 -2.68932,0.66239 -2.77411,0.68698 -2.83535,0.67203 -2.90287,0.66081 -2.96097,0.64586 -3.02221,0.64285 -3.02535,0.60106 -3.13212,0.57862 -3.19336,0.56367 -3.23105,0.54574 -3.36765,0.54121 -3.51996,0.54487 -3.67856,0.54108 -3.90467,0.54396 -4.06012,0.55584 -4.22342,0.55801 -4.35532,0.55497 -4.45267,0.55119 -4.57044,0.54293 -4.71961,0.53765 -4.81696,0.51746 -4.91745,0.51293 -5.03836,0.51438 -5.15926,0.51358 -5.30372,0.5262 -5.34141,0.54335 -5.44504,0.54928 -5.53454,0.56939 -5.58636,0.58802 -5.61463,0.60741 -5.69157,0.6335 -5.74966,0.65586 -5.78107,0.67451 -5.78735,0.69092 -5.80619,0.71554 -5.81404,0.83196 -5.81561,0.7424 -5.82503,0.76479 -5.83288,0.87672 -5.83603,0.85956 -5.869,0.83939 -5.88156,0.7976 -5.90354,0.76475 -5.92082,0.72445 -5.93652,0.67892 -5.96792,0.64756 -6.04172,0.60947 -6.05114,0.57887 -6.10296,0.55721 -6.15007,0.54301 -6.2223,0.55641 -6.28039,0.58101 -6.31494,0.60562 -6.31965,0.61831 -6.36048,0.56232 -6.3699,0.59441 -6.38874,0.54589 -6.41072,0.51901 -6.42328,0.49662 -6.5175,0.48539 -6.56146,0.4682 -6.6227,0.49206 -6.6541,0.50249 -6.70749,0.52187 -6.74204,0.53902 -6.75774,0.47633 -6.77187,0.54797 -6.79385,0.51139 -6.8127,0.47257 -6.88022,0.41732 -6.88807,0.45762 -6.91162,0.43223 -6.93517,0.40461 -7.00112,0.43817 -7.02467,0.44786 -7.06079,0.46799 -7.10947,0.4926 -7.12674,0.50453 -7.14715,0.45228 -7.15814,0.47616 -7.18327,0.43958 -7.23194,0.43732 -7.25707,0.41641 -7.29946,0.41565 \ No newline at end of file diff --git a/validation/dam_break_2d/exp_pressure_sensor_P2.csv b/validation/dam_break_2d/exp_pressure_sensor_P2.csv deleted file mode 100644 index 3f8fa036f..000000000 --- a/validation/dam_break_2d/exp_pressure_sensor_P2.csv +++ /dev/null @@ -1,48 +0,0 @@ -time,P2 -3.06662,-0.009371 -3.10965,0.006076 -3.17904,-0.015926 -3.29146,0.002483 -3.3789,-0.018927 -3.49688,-0.000817 -3.60514,-0.010937 -3.79251,0.015187 -3.82998,-0.007999 -4.01041,0.019612 -4.02568,-0.002976 -4.21582,0.019284 -4.28522,0.004712 -4.37405,0.028473 -4.47536,0.024595 -4.64885,0.043589 -4.77932,0.081013 -4.86676,0.103586 -4.9889,0.133583 -5.1263,0.167738 -5.20541,0.182882 -5.24566,0.195357 -5.31922,0.218229 -5.46912,0.22415 -5.59126,0.235722 -5.69674,0.224116 -5.73838,0.174779 -5.74115,0.194392 -5.81055,0.156046 -5.85496,0.141181 -5.88272,0.114431 -5.88966,0.154548 -6.00208,0.091827 -6.0118,0.067755 -6.07425,0.057641 -6.15892,0.033557 -6.26718,0.020466 -6.34351,0.003218 -6.49757,0.012705 -6.57252,0.005561 -6.65441,0.01179 -6.76544,0.005235 -6.90978,0.010563 -6.9542,0.002236 -7.06523,0.00846 -7.30951,0.000994 -7.52047,0.011364 \ No newline at end of file diff --git a/validation/dam_break_2d/exp_surge_front.csv b/validation/dam_break_2d/exp_surge_front.csv deleted file mode 100644 index 909120c2b..000000000 --- a/validation/dam_break_2d/exp_surge_front.csv +++ /dev/null @@ -1,11 +0,0 @@ -time,surge_front -0.43012,1.10782 -0.61418,1.218 -0.79556,1.43732 -0.97016,1.67128 -1.13698,1.89286 -1.29153,2.10882 -1.44156,2.33378 -1.62065,2.56436 -1.75728,2.78708 -1.92861,3.00078 \ No newline at end of file diff --git a/validation/dam_break_2d/plot_dam_break_results.jl b/validation/dam_break_2d/plot_dam_break_results.jl deleted file mode 100644 index 124d28828..000000000 --- a/validation/dam_break_2d/plot_dam_break_results.jl +++ /dev/null @@ -1,134 +0,0 @@ -include("../validation_util.jl") - -# Activate for interactive plot -# using GLMakie -using CairoMakie -using CSV -using DataFrames -using JSON -using Glob -using Printf -using TrixiParticles - -# Initial width of the fluid -H = 0.6 -W = 2 * H - -normalization_factor_time = sqrt(9.81 / H) -normalization_factor_pressure = 1000 * 9.81 * H - -case_dir = joinpath(validation_dir(), "dam_break_2d") - -edac_reference_files = glob("validation_reference_edac*.json", - case_dir) -edac_sim_files = glob("validation_result_dam_break_edac*.json", - "out/") - -merged_files = vcat(edac_reference_files, edac_sim_files) -edac_files = sort(merged_files, by=extract_number_from_filename) - -wcsph_reference_files = glob("validation_reference_wcsph*.json", - case_dir) -wcsph_sim_files = glob("validation_result_dam_break_wcsph*.json", - "out/") - -merged_files = vcat(wcsph_reference_files, wcsph_sim_files) -wcsph_files = sort(merged_files, by=extract_number_from_filename) - -surge_front = CSV.read(joinpath(case_dir, "exp_surge_front.csv"), DataFrame) - -exp_P1 = CSV.read(joinpath(case_dir, "exp_pressure_sensor_P1.csv"), DataFrame) -exp_P2 = CSV.read(joinpath(case_dir, "exp_pressure_sensor_P2.csv"), DataFrame) - -sim_P1 = CSV.read(joinpath(case_dir, "sim_pressure_sensor_P1.csv"), DataFrame) -sim_P2 = CSV.read(joinpath(case_dir, "sim_pressure_sensor_P2.csv"), DataFrame) - -n_sensors = 2 -fig = Figure(size=(1200, 1200)) -axs_edac = [Axis(fig[1, i], title="Sensor P$i with EDAC") for i in 1:n_sensors] -axs_wcsph = [Axis(fig[3, i], title="Sensor P$i with WCSPH") for i in 1:n_sensors] -ax_max_x_edac = Axis(fig[5, 1], title="Surge Front with EDAC") -ax_max_x_wcsph = Axis(fig[5, 2], title="Surge Front with WCSPH") - -function plot_results(axs, ax_max, files) - for ax in axs - ax.xlabel = "Time" - ax.ylabel = "Pressure" - xlims!(ax, 0.0, 8.0) - ylims!(ax, -0.1, 1.0) - end - - # Define a regex to extract the sensor number from the key names - sensor_number_regex = r"pressure_P(\d+)_fluid_\d+" - - for (file_number, json_file) in enumerate(files) - json_data = JSON.parsefile(json_file) - time = json_data["pressure_P1_fluid_1"]["time"] .* normalization_factor_time - pressure_P1 = json_data["pressure_P1_fluid_1"]["values"] ./ - normalization_factor_pressure - pressure_P2 = json_data["pressure_P2_fluid_1"]["values"] ./ - normalization_factor_pressure - - label_prefix = occursin("reference", json_file) ? "Reference " : "" - - lines!(axs[1], time, pressure_P1, - label="$(label_prefix)dp=$(extract_resolution_from_filename(json_file))", - color=file_number, colormap=:tab10, colorrange=(1, 10)) - lines!(axs[2], time, pressure_P2, - label="$(label_prefix)dp=$(extract_resolution_from_filename(json_file))", - color=file_number, colormap=:tab10, colorrange=(1, 10)) - value = json_data["max_x_coord_fluid_1"] - lines!(ax_max, value["time"] .* sqrt(9.81), Float64.(value["values"]) ./ W, - label="$(label_prefix)dp=$(extract_resolution_from_filename(json_file))") - end -end - -plot_results(axs_edac, ax_max_x_edac, edac_files) -plot_results(axs_wcsph, ax_max_x_wcsph, wcsph_files) - -# Plot reference values -function plot_experiment(ax, time, data, label, color=:black, marker=:utriangle, - markersize=6) - scatter!(ax, time, data; color, marker, markersize, label) -end - -function plot_simulation(ax, time, data, label, color=:red, linestyle=:dash, linewidth=3) - lines!(ax, time, data; color, linestyle, linewidth, label) -end - -# Plot for Pressure Sensor P1 -plot_experiment(axs_edac[1], exp_P1.time, exp_P1.P1, "Buchner 2002 (exp)") -plot_simulation(axs_edac[1], sim_P1.time, sim_P1.h320, "Marrone et al. 2011 (sim)") -plot_experiment(axs_wcsph[1], exp_P1.time, exp_P1.P1, "Buchner 2002 (exp)") -plot_simulation(axs_wcsph[1], sim_P1.time, sim_P1.h320, "Marrone et al. 2011 (sim)") - -# Plot for Pressure Sensor P2 -plot_experiment(axs_edac[2], exp_P2.time, exp_P2.P2, "Buchner 2002 (exp)") -plot_simulation(axs_edac[2], sim_P2.time, sim_P2.h320, "Marrone et al. 2011 (sim)") -plot_experiment(axs_wcsph[2], exp_P2.time, exp_P2.P2, "Buchner 2002 (exp)") -plot_simulation(axs_wcsph[2], sim_P2.time, sim_P2.h320, "Marrone et al. 2011 (sim)") - -# Plot for Surge Front -for ax_max in [ax_max_x_edac, ax_max_x_wcsph] - ax_max.xlabel = "Time" - ax_max.ylabel = "Surge Front" - xlims!(ax_max, 0.0, 3.0) - ylims!(ax_max, 1, 3.0) - plot_experiment(ax_max, surge_front.time, surge_front.surge_front, - "Martin and Moyce 1952 (exp)") -end - -for (i, ax) in enumerate(axs_edac) - Legend(fig[2, i], ax; tellwidth=false, orientation=:horizontal, valign=:top, nbanks=3) -end -for (i, ax) in enumerate(axs_wcsph) - Legend(fig[4, i], ax; tellwidth=false, orientation=:horizontal, valign=:top, nbanks=3) -end -Legend(fig[6, 1], ax_max_x_edac, tellwidth=false, orientation=:horizontal, valign=:top, - nbanks=2) -Legend(fig[6, 2], ax_max_x_wcsph, tellwidth=false, orientation=:horizontal, valign=:top, - nbanks=2) - -fig -# Uncomment to save the figure -# save("dam_break_validation.svg", fig) diff --git a/validation/dam_break_2d/sim_pressure_sensor_P1.csv b/validation/dam_break_2d/sim_pressure_sensor_P1.csv deleted file mode 100644 index 62adda751..000000000 --- a/validation/dam_break_2d/sim_pressure_sensor_P1.csv +++ /dev/null @@ -1,526 +0,0 @@ -time,exp,h40,h320,h80 -2.00471,-0.05335,0.00625,0.00282,0.00373 -2.00785,-0.05025,0.00538,0.00298,0.00337 -2.01099,-0.04623,0.00447,0.00314,0.00301 -2.02512,-0.01792,0.00016,0.00384,0.00144 -2.06281,0.02087,0.00103,0.0047,-0.00175 -2.0738,0.0148,0.00169,0.00445,-0.00218 -2.07851,0.01126,0.00199,0.00424,-0.00227 -2.08165,0.00872,0.0022,0.00407,-0.0023 -2.12405,-0.02169,0.00527,0.00135,-0.00065 -2.14917,0.00206,0.00699,0.00068,0.00068 -2.16801,0.01112,0.00814,0.00082,0.00117 -2.23396,-0.0146,0.01071,0.00307,0.00065 -2.24966,-0.02026,0.01087,0.00362,0.00037 -2.27165,0.01033,0.01071,0.00363,-3e-06 -2.30462,0.0043,0.00941,0.00136,-0.0005 -2.34859,-0.00699,0.00487,-0.00104,-0.00089 -2.36429,-0.01061,0.00208,-0.00169,-0.00091 -2.4114,-0.01652,-0.01162,-0.00241,-0.00182 -2.42553,-0.01511,-0.01725,-0.00161,-0.00336 -2.42867,-0.01437,-0.01857,-0.00125,-0.00391 -2.44437,-0.00689,-0.02549,0.0013,-0.00874 -2.46478,0.02475,-0.03447,-0.00265,-0.02259 -2.46949,0.04603,-0.03634,-0.00169,-0.02671 -2.47263,0.07666,-0.0375,-0.00048,-0.02925 -2.48834,0.14632,-0.04156,0.0109,-0.03081 -2.49148,0.15352,-0.04186,0.01409,-0.02725 -2.49933,0.17028,-0.04148,0.02367,-0.01266 -2.50875,0.189,-0.0382,0.04335,0.01247 -2.51189,0.19501,-0.03623,0.05277,0.02187 -2.5166,0.20383,-0.03231,0.06545,0.03614 -2.52602,0.22087,-0.02062,0.0866,0.06321 -2.52916,0.2264,-0.01557,0.09231,0.07179 -2.54329,0.25031,0.01401,0.11395,0.109 -2.54643,0.25543,0.022,0.14007,0.11699 -2.55271,0.26544,0.03933,0.1626,0.13257 -2.55428,0.26789,0.04391,0.16991,0.13637 -2.55742,0.27276,0.05337,0.18808,0.14379 -2.56371,0.28233,0.07324,0.22364,0.15778 -2.56528,0.2847,0.07838,0.20051,0.16112 -2.57313,0.29649,0.10488,0.24677,0.1781 -2.57627,0.30121,0.11576,0.25617,0.18632 -2.58726,0.31794,0.15442,0.28128,0.23333 -2.58883,0.32039,0.15996,0.28482,0.26393 -2.59825,0.33566,0.19298,0.30945,0.3024 -2.59982,0.33835,0.19842,0.31443,0.30795 -2.6061,0.34979,0.21989,0.33706,0.32804 -2.60924,0.35611,0.23044,0.34948,0.33631 -2.61552,0.37138,0.25118,0.37498,0.3525 -2.62337,0.46317,0.27651,0.40522,0.37359 -2.62651,0.48502,0.28648,0.41615,0.38268 -2.63122,0.5066,0.30127,0.4311,0.39824 -2.63908,0.53381,0.32554,0.45345,0.43928 -2.65007,0.56241,0.35879,0.48243,0.46299 -2.65792,0.57716,0.38206,0.5042,0.47684 -2.66263,0.58451,0.39585,0.51956,0.48479 -2.67205,0.60494,0.42304,0.55023,0.50065 -2.68147,0.65255,0.44972,0.57135,0.51762 -2.68932,0.66239,0.47157,0.58448,0.53289 -2.70188,0.67114,0.50576,0.60199,0.55791 -2.71288,0.67619,0.53477,0.61518,0.57746 -2.72073,0.67897,0.5548,0.62362,0.58924 -2.73172,0.68204,0.5813,0.63402,0.60494 -2.75841,0.6864,0.62185,0.65131,0.63699 -2.75998,0.68653,0.62132,0.65211,0.63808 -2.77254,0.687,0.59819,0.65871,0.62952 -2.77411,0.68698,0.5957,0.6596,0.62868 -2.77725,0.68688,0.59519,0.66142,0.62835 -2.77882,0.6868,0.59765,0.66235,0.62856 -2.7961,0.68434,0.63118,0.67344,0.63548 -2.81494,0.67862,0.64219,0.68559,0.64379 -2.83064,0.67333,0.64196,0.69445,0.65114 -2.83535,0.67203,0.64114,0.69664,0.65365 -2.84338,0.67024,0.6393,0.69954,0.65792 -2.86205,0.66725,0.63374,0.69973,0.66456 -2.88575,0.66402,0.62626,0.69123,0.66839 -2.90287,0.66081,0.62237,0.69029,0.66949 -2.91543,0.65722,0.622,0.69124,0.66953 -2.92642,0.65351,0.6259,0.69212,0.66901 -2.93561,0.65053,0.63501,0.6924,0.66817 -2.94841,0.64739,0.66974,0.69157,0.66649 -2.96097,0.64586,0.66615,0.68939,0.66443 -2.9751,0.64574,0.65929,0.68548,0.66182 -2.98546,0.64615,0.65734,0.68171,0.65985 -2.99708,0.64666,0.6564,0.67677,0.65778 -3.02221,0.64285,0.65576,0.66826,0.65424 -3.02378,0.60237,0.65571,0.66822,0.65399 -3.02535,0.60106,0.65565,0.66832,0.65373 -3.03948,0.59421,0.65456,0.67137,0.64956 -3.04576,0.59228,0.65329,0.67164,0.64538 -3.0646,0.58798,0.63823,0.66796,0.63537 -3.06617,0.58768,0.63795,0.66746,0.6354 -3.06931,0.58712,0.63835,0.66638,0.63573 -3.10386,0.58211,0.65692,0.6518,0.64132 -3.11485,0.58076,0.66072,0.64678,0.6351 -3.12741,0.57922,0.63833,0.64103,0.62405 -3.13212,0.57862,0.63701,0.63891,0.62191 -3.16667,0.57306,0.64502,0.625,0.62608 -3.16741,0.5729,0.64514,0.62477,0.62605 -3.17138,0.572,0.64558,0.62366,0.62562 -3.19336,0.56367,0.64365,0.62205,0.61729 -3.20749,0.55259,0.63904,0.62449,0.60934 -3.21377,0.54981,0.63626,0.62494,0.6062 -3.21976,0.548,0.63291,0.62475,0.60981 -3.22633,0.54655,0.62737,0.62396,0.6144 -3.22948,0.54599,0.62261,0.62343,0.6148 -3.23105,0.54574,0.6184,0.62314,0.61487 -3.24361,0.54418,0.60693,0.62027,0.61412 -3.286,0.54164,0.61992,0.606,0.60766 -3.29385,0.54142,0.62184,0.60243,0.60648 -3.32212,0.54097,0.60988,0.59155,0.60253 -3.33468,0.54093,0.59954,0.59048,0.6008 -3.34881,0.54099,0.59196,0.5896,0.59873 -3.35038,0.541,0.60539,0.58951,0.59847 -3.35352,0.54103,0.60445,0.58935,0.59793 -3.36765,0.54121,0.59539,0.58867,0.59454 -3.38179,0.54148,0.5843,0.58811,0.59195 -3.38336,0.54151,0.58299,0.58805,0.59177 -3.40848,0.54218,0.57104,0.5873,0.58944 -3.43674,0.54306,0.59267,0.58683,0.58675 -3.4493,0.54346,0.59784,0.58677,0.5852 -3.45559,0.54366,0.59416,0.58679,0.58426 -3.47914,0.54431,0.56952,0.58719,0.57975 -3.48542,0.54446,0.56535,0.58743,0.57851 -3.49484,0.54464,0.56727,0.58793,0.57711 -3.49641,0.54467,0.56802,0.58803,0.57697 -3.51996,0.54487,0.5807,0.59032,0.57715 -3.53567,0.54478,0.58949,0.59262,0.57621 -3.54352,0.54467,0.59188,0.59381,0.57489 -3.55608,0.54441,0.58292,0.59502,0.57224 -3.55922,0.54433,0.56351,0.59505,0.57156 -3.56124,0.54428,0.56053,0.59499,0.57113 -3.58591,0.54355,0.55007,0.5912,0.5674 -3.59062,0.5434,0.55081,0.5902,0.56723 -3.61607,0.54258,0.56102,0.58667,0.57001 -3.62988,0.54216,0.56722,0.58941,0.57282 -3.63773,0.54194,0.57015,0.59255,0.57393 -3.65186,0.54159,0.57413,0.59631,0.57247 -3.66756,0.54126,0.57466,0.59379,0.57287 -3.67384,0.54115,0.56553,0.59184,0.57391 -3.67856,0.54108,0.56536,0.59026,0.57488 -3.6817,0.54103,0.5657,0.5892,0.57558 -3.6974,0.54084,0.56911,0.58435,0.57936 -3.75393,0.54065,0.58821,0.57761,0.59023 -3.75864,0.54066,0.59029,0.5775,0.59064 -3.77277,0.54074,0.59863,0.57737,0.59104 -3.78219,0.54082,0.60372,0.57737,0.59047 -3.808,0.54112,0.60278,0.57712,0.5858 -3.82301,0.54137,0.60295,0.57638,0.58173 -3.85536,0.54212,0.60981,0.57473,0.57428 -3.8607,0.54227,0.6103,0.57468,0.57383 -3.86227,0.54232,0.6104,0.57468,0.57377 -3.90467,0.54396,0.60895,0.57581,0.5805 -3.9077,0.54412,0.60866,0.57589,0.58125 -3.93764,0.54591,0.6044,0.57664,0.58649 -3.96005,0.54759,0.59854,0.57824,0.58529 -3.98946,0.55014,0.5902,0.58145,0.58013 -4.02086,0.55296,0.58543,0.5846,0.576 -4.0397,0.55448,0.58348,0.5857,0.57571 -4.06012,0.55584,0.58177,0.58557,0.57675 -4.06797,0.55626,0.58121,0.58517,0.57739 -4.1135,0.55784,0.57745,0.58193,0.58172 -4.11664,0.55791,0.57695,0.58177,0.58193 -4.12764,0.5581,0.57447,0.58131,0.58241 -4.17788,0.55839,0.56027,0.58036,0.5764 -4.18259,0.55837,0.56,0.58035,0.57519 -4.19358,0.55831,0.55981,0.58041,0.57219 -4.22342,0.55801,0.5612,0.57832,0.56468 -4.24383,0.55769,0.56326,0.57666,0.56181 -4.25482,0.55749,0.56473,0.5758,0.56173 -4.2721,0.55713,0.56769,0.57447,0.56431 -4.31135,0.55616,0.57289,0.57153,0.57302 -4.31606,0.55603,0.56803,0.57118,0.57289 -4.34118,0.55534,0.54303,0.56933,0.56407 -4.35532,0.55497,0.53968,0.5683,0.55678 -4.36788,0.55465,0.54009,0.56739,0.55198 -4.38672,0.55417,0.54525,0.56603,0.55003 -4.40556,0.5536,0.55271,0.56468,0.55185 -4.42284,0.55293,0.54554,0.56345,0.55419 -4.44796,0.55152,0.53254,0.56168,0.55482 -4.45267,0.55119,0.52998,0.56135,0.55456 -4.46994,0.54983,0.52581,0.56015,0.55307 -4.48597,0.54846,0.5278,0.55906,0.55132 -4.48721,0.54835,0.528,0.55897,0.55118 -4.50449,0.5469,0.53177,0.55784,0.54917 -4.53589,0.54461,0.53698,0.55634,0.5456 -4.5433,0.54417,0.5366,0.55666,0.54481 -4.57044,0.54293,0.53427,0.5561,0.54213 -4.59315,0.54234,0.53186,0.55546,0.54036 -4.60027,0.54221,0.53107,0.55487,0.53994 -4.61559,0.54196,0.52939,0.55367,0.5393 -4.65298,0.5413,0.52695,0.55069,0.53876 -4.67042,0.54081,0.52699,0.5501,0.53816 -4.68349,0.54029,0.52711,0.54965,0.53692 -4.71961,0.53765,0.52707,0.54862,0.52887 -4.74271,0.53433,0.52643,0.54829,0.52342 -4.75101,0.53276,0.52598,0.5483,0.52196 -4.76985,0.52855,0.52419,0.54872,0.51978 -4.80253,0.52042,0.51427,0.54945,0.51864 -4.81068,0.51865,0.51149,0.54908,0.51879 -4.81696,0.51746,0.51184,0.54862,0.51905 -4.82638,0.51598,0.51379,0.5477,0.51969 -4.84522,0.51402,0.51446,0.54521,0.52189 -4.86092,0.51313,0.51043,0.54257,0.51818 -4.86235,0.51308,0.50993,0.54231,0.51722 -4.8939,0.51267,0.49503,0.53603,0.49435 -4.89704,0.51269,0.49299,0.5354,0.49354 -4.90803,0.5128,0.4898,0.53334,0.49549 -4.91745,0.51293,0.49343,0.53177,0.50111 -4.92716,0.5131,0.49687,0.53044,0.50712 -4.93315,0.51321,0.49872,0.52978,0.50994 -4.94258,0.51338,0.50098,0.52899,0.51267 -4.97241,0.51393,0.49799,0.52754,0.51402 -4.98449,0.51412,0.48695,0.52686,0.51306 -4.98497,0.51413,0.48679,0.52682,0.51301 -4.99282,0.51423,0.48764,0.52602,0.51216 -5.00381,0.51435,0.49126,0.52434,0.51078 -5.02266,0.51444,0.49625,0.5211,0.50803 -5.02423,0.51444,0.49722,0.52087,0.50778 -5.03522,0.5144,0.50617,0.51947,0.50595 -5.03836,0.51438,0.50614,0.51912,0.50541 -5.06505,0.51392,0.50059,0.51671,0.50019 -5.06662,0.51389,0.5002,0.5166,0.49984 -5.06976,0.51382,0.49944,0.51639,0.49912 -5.0996,0.5132,0.49495,0.5127,0.49345 -5.10745,0.5131,0.49503,0.51136,0.49345 -5.13257,0.51307,0.49792,0.50685,0.49618 -5.15926,0.51358,0.50248,0.50185,0.49855 -5.16712,0.51384,0.50394,0.50034,0.49865 -5.17811,0.51427,0.50611,0.49819,0.49819 -5.19538,0.51511,0.50909,0.49469,0.49658 -5.2048,0.51564,0.5088,0.49266,0.49554 -5.22521,0.51699,0.50907,0.48798,0.49372 -5.23306,0.51758,0.5096,0.48892,0.49342 -5.23777,0.51796,0.50997,0.48972,0.4934 -5.27389,0.52152,0.51204,0.49493,0.49661 -5.28959,0.52364,0.50606,0.49636,0.49853 -5.2943,0.5244,0.49713,0.49658,0.4986 -5.30058,0.52555,0.49477,0.49668,0.4874 -5.30372,0.5262,0.49393,0.49663,0.4861 -5.31157,0.52824,0.49262,0.49618,0.48489 -5.33356,0.54118,0.4927,0.49261,0.48482 -5.33984,0.54306,0.49317,0.49126,0.48514 -5.34141,0.54335,0.4933,0.49092,0.48524 -5.35083,0.54447,0.49409,0.48892,0.48587 -5.37438,0.54569,0.49539,0.48513,0.48754 -5.38694,0.5461,0.49482,0.48448,0.48807 -5.38852,0.54615,0.49462,0.48445,0.48811 -5.41364,0.54708,0.48928,0.48287,0.48794 -5.41678,0.54723,0.48884,0.48239,0.48784 -5.4419,0.54897,0.48693,0.47809,0.48659 -5.44504,0.54928,0.48679,0.47767,0.48638 -5.47488,0.55363,0.48583,0.47613,0.48298 -5.48744,0.55624,0.48548,0.47682,0.4806 -5.52983,0.56793,0.48357,0.48166,0.47185 -5.53454,0.56939,0.48306,0.48225,0.47107 -5.55025,0.57428,0.48006,0.48393,0.46938 -5.55182,0.57477,0.47983,0.48405,0.46933 -5.55653,0.57628,0.47929,0.4843,0.46939 -5.58479,0.58714,0.47832,0.47804,0.47439 -5.58636,0.58802,0.47837,0.47757,0.47463 -5.59264,0.59253,0.47872,0.47608,0.47533 -5.61463,0.60741,0.47981,0.47354,0.47555 -5.6162,0.6081,0.4798,0.47343,0.4755 -5.65231,0.62091,0.47822,0.47113,0.47382 -5.65545,0.62191,0.47807,0.47083,0.47378 -5.66958,0.6264,0.47754,0.46863,0.47443 -5.68686,0.63194,0.47729,0.46984,0.47529 -5.68843,0.63246,0.47729,0.47007,0.47527 -5.69157,0.6335,0.4773,0.47054,0.4752 -5.7371,0.65055,0.47975,0.47744,0.47319 -5.74809,0.65519,0.48106,0.47881,0.47303 -5.74966,0.65586,0.48127,0.47899,0.47303 -5.78107,0.67451,0.48564,0.48182,0.4739 -5.78735,0.69092,0.48641,0.48217,0.47415 -5.80462,0.70752,0.48793,0.48271,0.47457 -5.80619,0.71554,0.48801,0.48272,0.47458 -5.81247,0.79425,0.48821,0.48272,0.47449 -5.81404,0.83196,0.48823,0.4827,0.47444 -5.81561,0.7424,0.48825,0.48268,0.47438 -5.82503,0.76479,0.48816,0.48246,0.47377 -5.83288,0.87672,0.48789,0.48216,0.47301 -5.83603,0.85956,0.48774,0.48201,0.47266 -5.85801,0.84627,0.48657,0.4806,0.47074 -5.86272,0.84408,0.48641,0.48024,0.47081 -5.869,0.83939,0.48634,0.47973,0.47129 -5.88156,0.7976,0.48671,0.47868,0.47316 -5.89412,0.77696,0.4876,0.47763,0.47521 -5.90354,0.76475,0.48838,0.47691,0.4764 -5.90668,0.75964,0.48863,0.4767,0.47675 -5.92082,0.72445,0.48964,0.476,0.47825 -5.93024,0.69598,0.49026,0.47594,0.47931 -5.93652,0.67892,0.49068,0.4762,0.48009 -5.94437,0.66461,0.49123,0.47697,0.48115 -5.9585,0.65284,0.49234,0.4797,0.48332 -5.96792,0.64756,0.49322,0.48227,0.48477 -5.9852,0.63932,0.49512,0.48487,0.48681 -5.99462,0.63504,0.49632,0.48361,0.48636 -6.00875,0.62854,0.49829,0.48082,0.48465 -6.01503,0.62553,0.49925,0.48,0.48859 -6.04015,0.61082,0.50615,0.48484,0.50546 -6.04172,0.60947,0.50699,0.48582,0.5065 -6.048,0.60022,0.51171,0.49066,0.51059 -6.05114,0.57887,0.51553,0.49358,0.51259 -6.05742,0.57421,0.53708,0.50026,0.5165 -6.08255,0.5642,0.54051,0.52736,0.52997 -6.08412,0.56368,0.54107,0.49527,0.53063 -6.08569,0.56316,0.54154,0.49028,0.53125 -6.09354,0.56054,0.54244,0.46766,0.53369 -6.10139,0.55779,0.54301,0.50041,0.53407 -6.10296,0.55721,0.54358,0.50701,0.53361 -6.10767,0.55536,0.54676,0.51989,0.52944 -6.11238,0.55339,0.55185,0.523,0.49004 -6.13437,0.54507,0.58033,0.51152,0.51644 -6.13751,0.54435,0.58301,0.51092,0.52084 -6.15007,0.54301,0.59448,0.51269,0.53834 -6.15321,0.54299,0.60196,0.51383,0.5426 -6.16734,0.54397,0.65563,0.52087,0.56016 -6.16891,0.54416,0.65867,0.52179,0.56184 -6.17205,0.54457,0.62285,0.52366,0.56495 -6.17362,0.5448,0.63703,0.52462,0.56637 -6.18304,0.54638,0.64374,0.53031,0.57269 -6.18775,0.5473,0.68404,0.5328,0.57405 -6.19089,0.54796,0.66165,0.53424,0.57406 -6.1956,0.54902,0.67069,0.53615,0.57284 -6.20502,0.55135,0.70567,0.54085,0.58998 -6.20817,0.55219,0.72656,0.54298,0.59187 -6.20974,0.55263,0.72922,0.54414,0.59298 -6.2223,0.55641,0.74596,0.55456,0.60506 -6.23172,0.55964,0.76461,0.56321,0.6176 -6.238,0.56199,0.78625,0.56932,0.637 -6.24428,0.56449,0.79761,0.5758,0.64965 -6.24742,0.56579,0.80789,0.57933,0.65489 -6.25213,0.56782,0.84595,0.58543,0.66145 -6.25841,0.57062,0.85896,0.59467,0.66535 -6.25998,0.57134,0.86759,0.59689,0.66336 -6.26312,0.57279,0.87998,0.60117,0.64147 -6.26626,0.57427,0.884,0.60529,0.65142 -6.27568,0.57876,0.89513,0.61725,0.68922 -6.27882,0.58026,0.89967,0.62119,0.69904 -6.28039,0.58101,0.90258,0.62315,0.70302 -6.28511,0.58324,0.91459,0.62903,0.71175 -6.28825,0.58474,0.92078,0.63296,0.71608 -6.2961,0.58866,0.93474,0.64287,0.72724 -6.29924,0.59038,0.94294,0.64689,0.73226 -6.30238,0.59226,0.94959,0.65098,0.73772 -6.30305,0.59269,0.95086,0.65187,0.73894 -6.31337,0.60236,0.95861,0.66678,0.76264 -6.31494,0.60562,0.95296,0.66945,0.76831 -6.31651,0.62284,0.91831,0.67232,0.77744 -6.31808,0.62075,0.93473,0.67538,0.78933 -6.31965,0.61831,0.92044,0.67857,0.79799 -6.32049,0.61695,0.90825,0.68029,0.80184 -6.32122,0.61576,0.89816,0.68176,0.80487 -6.32436,0.61058,0.87875,0.688,0.81645 -6.32907,0.60283,0.86084,0.69706,0.83171 -6.33378,0.59523,0.83099,0.70575,0.8457 -6.33545,0.5926,0.82649,0.70872,0.85042 -6.34163,0.58319,0.81717,0.71942,0.86681 -6.3432,0.58092,0.81457,0.72227,0.8706 -6.3504,0.57127,0.80111,0.73714,0.88499 -6.35576,0.56545,0.79407,0.74997,0.89292 -6.35734,0.56411,0.79441,0.75389,0.89527 -6.36048,0.56232,0.80933,0.76182,0.90044 -6.36676,0.56859,0.74441,0.77786,0.91556 -6.36833,0.57933,0.76082,0.78184,0.92276 -6.3699,0.59441,0.75976,0.78577,0.93979 -6.37035,0.59425,0.75882,0.78689,0.94458 -6.37461,0.58341,0.74721,0.79714,0.95187 -6.38089,0.56451,0.73097,0.81113,0.94558 -6.38281,0.5593,0.72681,0.81531,0.94291 -6.38874,0.54589,0.71592,0.8301,0.93361 -6.39278,0.53932,0.71005,0.84374,0.92666 -6.39973,0.5312,0.70559,0.87009,0.91384 -6.4013,0.52971,0.72424,0.87484,0.91081 -6.40773,0.52389,0.70751,0.88875,0.89757 -6.41072,0.51901,0.69961,0.89275,0.89038 -6.41543,0.49967,0.68847,0.89709,0.87125 -6.41857,0.49814,0.68244,0.89896,0.83394 -6.42328,0.49662,0.67632,0.90047,0.82362 -6.43266,0.4948,0.67196,0.89822,0.80845 -6.43428,0.49457,0.67124,0.89673,0.80574 -6.43742,0.49415,0.66409,0.8922,0.7996 -6.44213,0.49361,0.6593,0.8796,0.7766 -6.4437,0.49345,0.65862,0.87385,0.76825 -6.44512,0.4933,0.65814,0.86859,0.76346 -6.45509,0.49241,0.65628,0.84016,0.74679 -6.45783,0.49218,0.65594,0.83247,0.74661 -6.46506,0.49161,0.65495,0.81054,0.75961 -6.46882,0.49132,0.65406,0.7992,0.76231 -6.47039,0.4912,0.65342,0.79512,0.76153 -6.47503,0.49083,0.64162,0.78566,0.7551 -6.4751,0.49082,0.64138,0.78554,0.75498 -6.48452,0.49003,0.62794,0.77188,0.73505 -6.48923,0.48958,0.63988,0.76545,0.7257 -6.49248,0.48926,0.63534,0.76077,0.73196 -6.50179,0.48816,0.61823,0.74671,0.72398 -6.50808,0.48724,0.60931,0.73947,0.7227 -6.51242,0.48647,0.59551,0.73589,0.72283 -6.51279,0.4864,0.59434,0.73563,0.72287 -6.51436,0.48609,0.61002,0.7346,0.72306 -6.5175,0.48539,0.61142,0.73282,0.72359 -6.54576,0.4723,0.61299,0.72431,0.73276 -6.54732,0.47139,0.61224,0.72403,0.73337 -6.54733,0.47139,0.60254,0.72402,0.73337 -6.56146,0.4682,0.59283,0.72184,0.73861 -6.56303,0.46838,0.58611,0.72165,0.73909 -6.56617,0.46893,0.5874,0.7213,0.73984 -6.57402,0.47104,0.58926,0.72068,0.72939 -6.57873,0.47264,0.58685,0.72049,0.73054 -6.58188,0.4738,0.5667,0.72044,0.7318 -6.5847,0.4749,0.58215,0.72046,0.73303 -6.59444,0.479,0.5555,0.72089,0.73731 -6.60857,0.48547,0.54505,0.72177,0.7422 -6.61171,0.48695,0.54248,0.72186,0.74281 -6.61642,0.48916,0.53908,0.72181,0.74318 -6.6196,0.49064,0.53877,0.72163,0.74306 -6.6227,0.49206,0.53882,0.72129,0.74268 -6.63212,0.49599,0.53758,0.7196,0.7404 -6.6384,0.49809,0.53064,0.71828,0.74056 -6.64782,0.50062,0.51966,0.71694,0.75748 -6.64951,0.5011,0.51811,0.71688,0.75817 -6.65096,0.50152,0.51683,0.71687,0.75846 -6.6541,0.50249,0.51419,0.71705,0.75849 -6.67942,0.51156,0.49255,0.72515,0.75224 -6.68237,0.51266,0.48905,0.72658,0.75178 -6.69022,0.51559,0.46666,0.73047,0.75248 -6.70121,0.51963,0.46293,0.73546,0.77785 -6.70435,0.52076,0.46143,0.73665,0.77683 -6.70749,0.52187,0.45793,0.7377,0.77356 -6.71432,0.52424,0.44932,0.73936,0.76555 -6.71691,0.52513,0.44799,0.73973,0.76366 -6.7279,0.52915,0.44723,0.74014,0.78007 -6.74047,0.53673,0.44574,0.74024,0.78566 -6.74204,0.53902,0.44434,0.74038,0.78598 -6.74832,0.50004,0.42783,0.74146,0.787 -6.74921,0.49606,0.42695,0.74171,0.78713 -6.75617,0.47653,0.42481,0.74446,0.78827 -6.75774,0.47633,0.42482,0.74525,0.7886 -6.76559,0.51857,0.42633,0.74996,0.7908 -6.77187,0.54797,0.42707,0.75422,0.79317 -6.77815,0.5492,0.4099,0.75847,0.79582 -6.77972,0.54744,0.40835,0.75948,0.79647 -6.78162,0.5446,0.40675,0.76065,0.79723 -6.79385,0.51139,0.39866,0.76694,0.80109 -6.80013,0.48914,0.39417,0.76967,0.80243 -6.8017,0.48644,0.39273,0.77034,0.80272 -6.81113,0.47434,0.3778,0.77465,0.80352 -6.81153,0.47389,0.37758,0.77485,0.80351 -6.8127,0.47257,0.37716,0.77546,0.80344 -6.8284,0.45614,0.37779,0.78552,0.79821 -6.82997,0.45459,0.37769,0.7867,0.79719 -6.83895,0.44601,0.37423,0.7938,0.78973 -6.84253,0.44272,0.37107,0.79674,0.78611 -6.85509,0.43193,0.35987,0.80588,0.77147 -6.87079,0.42086,0.35613,0.8122,0.7508 -6.87236,0.42001,0.34654,0.8125,0.74867 -6.87384,0.41928,0.34565,0.81273,0.74665 -6.8755,0.41855,0.34494,0.81294,0.74438 -6.88022,0.41732,0.34362,0.81322,0.73786 -6.88807,0.45762,0.34219,0.8129,0.72668 -6.91162,0.43223,0.33848,0.80649,0.68824 -6.9179,0.41537,0.33671,0.80269,0.67547 -6.91871,0.41348,0.33636,0.80205,0.67368 -6.91947,0.41191,0.32328,0.80141,0.67195 -6.92261,0.40743,0.33277,0.79809,0.66432 -6.92732,0.40465,0.31656,0.78947,0.65076 -6.93366,0.40436,0.3156,0.77362,0.62684 -6.93517,0.40461,0.31541,0.77133,0.62012 -6.95087,0.41026,0.31281,0.75546,0.54864 -6.95859,0.41404,0.30861,0.74754,0.51962 -6.9603,0.41493,0.30535,0.7454,0.51363 -6.96501,0.41744,0.29714,0.73825,0.49777 -6.97604,0.42361,0.29484,0.71792,0.46392 -6.98228,0.42723,0.29489,0.70904,0.44653 -6.98542,0.42907,0.29564,0.705,0.43823 -6.99598,0.43524,0.28864,0.69067,0.41245 -7.00112,0.43817,0.28492,0.6811,0.40104 -7.00269,0.43903,0.28369,0.6778,0.39771 -7.01093,0.44314,0.27763,0.66223,0.38139 -7.01211,0.44365,0.27715,0.66047,0.37921 -7.01839,0.44574,0.27547,0.65241,0.36828 -7.02467,0.44786,0.27443,0.64561,0.35844 -7.03586,0.45434,0.27333,0.63497,0.34337 -7.05765,0.46648,0.27471,0.61705,0.32119 -7.06079,0.46799,0.27583,0.61476,0.3186 -7.06577,0.47025,0.27873,0.61127,0.31474 -7.07492,0.47415,0.28366,0.60531,0.30834 -7.08905,0.48027,0.26425,0.59743,0.29989 -7.09376,0.48251,0.2538,0.59519,0.29739 -7.10066,0.48624,0.25025,0.5923,0.29394 -7.10947,0.4926,0.24728,0.58932,0.28988 -7.11104,0.49413,0.24707,0.58888,0.28919 -7.11889,0.50467,0.27021,0.58713,0.28588 -7.12674,0.50453,0.27103,0.58616,0.28277 -7.13805,0.47222,0.26986,0.58636,0.27858 -7.14401,0.457,0.2687,0.58729,0.27649 -7.14715,0.45228,0.26739,0.58799,0.27541 -7.15186,0.45753,0.25228,0.58926,0.27384 -7.15814,0.47616,0.23607,0.59131,0.2718 -7.17295,0.45058,0.21317,0.597,0.26722 -7.17541,0.44712,0.21496,0.59796,0.26648 -7.17856,0.44349,0.23287,0.59915,0.26556 -7.1817,0.44069,0.26048,0.60033,0.26464 -7.18327,0.43958,0.25939,0.60092,0.26419 -7.20037,0.43535,0.24462,0.60765,0.2594 -7.21938,0.43708,0.2321,0.61877,0.25436 -7.2228,0.43743,0.23237,0.62186,0.25348 -7.23194,0.43732,0.25672,0.63342,0.25116 -7.23775,0.43525,0.26223,0.64081,0.2497 -7.2445,0.42937,0.25299,0.64641,0.24804 -7.24921,0.42356,0.21119,0.64853,0.24688 -7.25707,0.41641,0.21468,0.64918,0.24498 -7.25769,0.41607,0.21498,0.64909,0.24482 -7.28013,0.41331,0.22515,0.6325,0.23949 -7.28761,0.41404,0.22926,0.60288,0.23773 -7.28847,0.41415,0.22983,0.59685,0.23753 -7.29259,0.41468,0.23337,0.57326,0.23657 -7.29475,0.41498,0.24401,0.56159,0.23606 -7.29758,0.41538,0.24585,0.54364,0.2354 -7.29946,0.41565,0.2455,0.52094,0.23496 -7.30007,0.41574,0.24533,0.51403,0.23482 -7.3026,0.4161,0.24401,0.49013,0.23423 -7.30574,0.41654,0.24251,0.46117,0.2335 -7.31045,0.41716,0.24169,0.40744,0.23241 -7.31516,0.41768,0.24123,0.3537,0.23132 \ No newline at end of file diff --git a/validation/dam_break_2d/sim_pressure_sensor_P2.csv b/validation/dam_break_2d/sim_pressure_sensor_P2.csv deleted file mode 100644 index 9b2b15ad8..000000000 --- a/validation/dam_break_2d/sim_pressure_sensor_P2.csv +++ /dev/null @@ -1,271 +0,0 @@ -time,exp,h40,h80,h320 -2.99329,-0.003494,-0.024238,-0.005919,0.00128 -3.00553,-0.015227,-0.021572,-0.003589,0.001019 -3.00728,-0.016577,-0.021187,-0.003167,0.000984 -3.0405,-0.024482,-0.014254,-0.000973,0.000442 -3.06662,-0.009371,-0.01079,-0.003062,0.000178 -3.06848,-0.007995,-0.010712,-0.00323,0.000164 -3.10346,0.007016,-0.018955,-0.005912,-4.7e-05 -3.10965,0.006076,-0.021852,-0.006149,-7.4e-05 -3.11395,0.004728,-0.02371,-0.006226,-9.1e-05 -3.13668,-0.005927,-0.027571,-0.004977,-0.000162 -3.16466,-0.014863,-0.018641,-0.002115,-0.000218 -3.17904,-0.015926,-0.01517,-0.002166,-0.000235 -3.18389,-0.015761,-0.014474,-0.002332,-0.000239 -3.19614,-0.014485,-0.013626,-0.002845,-0.000247 -3.24335,-0.004529,-0.015262,-0.003999,-0.000247 -3.26084,-0.000808,-0.015983,-0.00386,-0.000238 -3.29146,0.002483,-0.01509,-0.003182,-0.000213 -3.32554,-0.004655,-0.012248,-0.00211,-0.000174 -3.371,-0.018361,-0.010321,-0.000648,-0.00011 -3.3789,-0.018927,-0.010186,-0.000464,-9.7e-05 -3.40598,-0.016902,-0.010014,-0.000252,-5.1e-05 -3.44794,-0.008673,-0.010215,-0.000659,2.6e-05 -3.49688,-0.000817,-0.009718,-0.000598,0.000126 -3.49866,-0.000763,-0.009653,-0.000593,0.000129 -3.57385,-0.011145,-0.004048,-0.000663,0.000298 -3.5756,-0.011243,-0.003936,-0.000678,0.000302 -3.60514,-0.010937,-0.002581,-0.001061,0.000372 -3.65604,-0.004909,-0.003311,-0.001743,0.000497 -3.66706,-0.003194,-0.004756,-0.001763,0.000524 -3.69276,0.001053,-0.008487,-0.001444,0.000588 -3.69975,0.002245,-0.008185,-0.001251,0.000606 -3.72214,0.006078,-0.005062,-0.000368,0.000988 -3.77502,0.014078,0.001172,0.002442,0.001923 -3.78544,0.01499,0.001537,0.002944,0.00163 -3.79251,0.015187,0.001588,0.003234,0.001924 -3.79768,0.014861,0.001536,0.003407,0.002194 -3.82569,-0.007992,0.000339,0.003622,0.003803 -3.82998,-0.007999,6e-05,0.003578,0.004056 -3.87812,-0.002171,-0.003356,0.00377,0.00693 -3.89211,0.000193,-0.003721,0.00424,0.007774 -3.94282,0.009347,0.006007,0.006706,0.010864 -4.01041,0.019612,0.008439,0.01072,0.015075 -4.01277,0.019662,0.00847,0.010864,0.015225 -4.02568,-0.002976,0.008699,0.011652,0.016049 -4.0355,-0.002719,0.008988,0.012254,0.016682 -4.06143,-7.1e-05,0.010569,0.013879,0.018392 -4.11211,0.007032,0.015898,0.017419,0.022158 -4.11769,0.007846,0.016464,0.017846,0.021416 -4.13343,0.010122,0.017953,0.019083,0.022788 -4.16498,0.014434,0.02072,0.021702,0.025924 -4.21582,0.019284,0.025438,0.026279,0.031324 -4.2296,0.019363,0.026932,0.027599,0.032815 -4.28522,0.004712,0.03433,0.03333,0.038868 -4.3048,0.008604,0.037099,0.035532,0.041004 -4.32753,0.015819,0.040022,0.038235,0.043479 -4.37405,0.028473,0.04481,0.044163,0.048513 -4.44819,0.025729,0.053483,0.053857,0.056235 -4.4514,0.025502,0.05392,0.054234,0.056545 -4.47536,0.024595,0.057311,0.05675,0.058589 -4.49766,0.024953,0.060635,0.059055,0.060312 -4.51813,0.026011,0.063804,0.062084,0.063695 -4.61081,0.036632,0.079515,0.079668,0.079046 -4.63704,0.041238,0.084532,0.082829,0.083441 -4.64885,0.043589,0.086954,0.083864,0.085436 -4.66731,0.047661,0.091041,0.085473,0.088591 -4.68076,0.05094,0.094321,0.087146,0.09095 -4.70697,0.05805,0.101556,0.092717,0.096604 -4.72972,0.064923,0.108106,0.099345,0.100599 -4.73497,0.066583,0.10953,0.100992,0.10145 -4.74883,0.071067,0.113115,0.105196,0.103674 -4.77932,0.081013,0.120294,0.111315,0.108822 -4.78044,0.081365,0.120541,0.111469,0.109037 -4.79069,0.0845,0.122755,0.112768,0.111216 -4.82594,0.094008,0.129642,0.116758,0.120174 -4.83115,0.095272,0.130556,0.117374,0.121222 -4.85563,0.101001,0.134502,0.120818,0.125324 -4.86676,0.103586,0.13615,0.123094,0.126851 -4.87,0.104346,0.13662,0.123903,0.127243 -4.89935,0.111338,0.140779,0.133167,0.132673 -4.90966,0.11384,0.14226,0.135898,0.135257 -4.94306,0.12206,0.147389,0.143149,0.143844 -4.98153,0.131715,0.15414,0.150753,0.153588 -4.9889,0.133583,0.155526,0.152192,0.1554 -5.02863,0.143724,0.16358,0.159961,0.164487 -5.05323,0.149984,0.169463,0.164786,0.168417 -5.07421,0.155261,0.181441,0.168925,0.169138 -5.0749,0.155432,0.181759,0.169061,0.169197 -5.10795,0.163493,0.194084,0.175672,0.178627 -5.12143,0.166633,0.19909,0.178439,0.18323 -5.1263,0.167738,0.200999,0.179464,0.184763 -5.14066,0.17087,0.207266,0.182658,0.18803 -5.141,0.17094,0.207431,0.182737,0.188057 -5.17039,0.176741,0.225115,0.190787,0.188973 -5.17739,0.178005,0.226731,0.192607,0.189915 -5.18947,0.18011,0.226474,0.19567,0.191824 -5.20541,0.182882,0.224237,0.199647,0.194684 -5.2246,0.187139,0.221856,0.204398,0.198387 -5.24384,0.194487,0.229342,0.209176,0.202259 -5.24566,0.195357,0.229964,0.209633,0.202633 -5.26132,0.202888,0.230569,0.213614,0.205869 -5.26482,0.204412,0.230462,0.214535,0.206598 -5.28231,0.210729,0.234952,0.221081,0.210277 -5.2858,0.211745,0.23857,0.22297,0.211018 -5.30329,0.215789,0.246931,0.230308,0.214744 -5.31922,0.218229,0.246675,0.235646,0.218159 -5.33477,0.219758,0.245441,0.239438,0.221497 -5.34149,0.220243,0.24505,0.240413,0.222936 -5.35225,0.220864,0.245426,0.241063,0.225224 -5.36799,0.221519,0.255907,0.240837,0.22847 -5.38335,0.221967,0.25219,0.240844,0.230949 -5.38548,0.222019,0.251564,0.240928,0.231261 -5.40646,0.222453,0.247664,0.242727,0.234537 -5.42741,0.222851,0.249242,0.245665,0.237547 -5.44843,0.223363,0.253098,0.24953,0.239923 -5.45542,0.223587,0.254022,0.251108,0.240577 -5.46912,0.22415,0.253539,0.254286,0.241727 -5.47588,0.224506,0.252607,0.255289,0.242257 -5.48165,0.224853,0.252895,0.255786,0.242704 -5.4834,0.224966,0.253454,0.25589,0.24284 -5.49914,0.226142,0.262253,0.256296,0.244083 -5.51488,0.227582,0.257383,0.256206,0.24542 -5.52656,0.228789,0.260036,0.255951,0.246496 -5.53936,0.230208,0.26337,0.255519,0.247743 -5.54636,0.231007,0.252511,0.255215,0.248432 -5.5481,0.231207,0.25097,0.255131,0.248603 -5.56559,0.233186,0.243896,0.25412,0.250252 -5.58133,0.234822,0.238278,0.253014,0.251545 -5.59045,0.235653,0.246973,0.252365,0.252147 -5.59126,0.235722,0.247434,0.252311,0.252193 -5.59357,0.235913,0.248011,0.252158,0.252317 -5.60056,0.23644,0.245232,0.251754,0.25263 -5.61455,0.237217,0.239022,0.2512,0.253013 -5.63729,0.237394,0.243584,0.248753,0.253387 -5.64253,0.237182,0.245008,0.247535,0.253529 -5.64333,0.23714,0.245169,0.247334,0.253554 -5.67401,0.232854,0.239013,0.240393,0.255211 -5.67751,0.231926,0.237797,0.240135,0.255457 -5.6962,0.224416,0.2309,0.242046,0.256849 -5.69674,0.224116,0.230688,0.242186,0.256889 -5.71073,0.213967,0.224701,0.248742,0.25795 -5.72472,0.198417,0.217419,0.258849,0.259022 -5.73521,0.181528,0.210173,0.256679,0.259847 -5.73838,0.174779,0.207351,0.255859,0.260101 -5.74115,0.194392,0.204493,0.255125,0.260327 -5.74467,0.193585,0.200258,0.254192,0.260615 -5.76319,0.184195,0.176846,0.249736,0.262179 -5.77893,0.174493,0.174771,0.247234,0.263515 -5.79535,0.164384,0.178111,0.246473,0.264853 -5.79817,0.162723,0.179087,0.246507,0.265074 -5.79991,0.161713,0.185078,0.246548,0.265209 -5.81055,0.156046,0.197748,0.247086,0.266021 -5.8174,0.153072,0.205294,0.247643,0.266548 -5.83664,0.148034,0.220642,0.249472,0.268164 -5.84602,0.145849,0.215544,0.249683,0.269091 -5.85496,0.141181,0.207992,0.248382,0.270093 -5.86287,0.13412,0.201302,0.246099,0.271033 -5.86636,0.130428,0.198547,0.245095,0.271452 -5.88272,0.114431,0.187622,0.24219,0.27327 -5.88966,0.154548,0.18385,0.242192,0.273903 -5.89449,0.15378,0.181575,0.242732,0.274273 -5.89959,0.152415,0.179598,0.243847,0.274597 -5.90483,0.150634,0.178323,0.245613,0.274875 -5.92232,0.143051,0.180566,0.254715,0.275626 -5.94331,0.131939,0.164662,0.267803,0.276917 -5.94516,0.130877,0.16287,0.268874,0.277096 -5.95729,0.123668,0.149484,0.274922,0.278707 -5.97828,0.110042,0.120651,0.280096,0.28365 -5.98262,0.107011,0.118548,0.280201,0.28511 -5.98877,0.102548,0.117087,0.279778,0.287527 -6.00101,0.092778,0.113908,0.277264,0.293764 -6.00208,0.091827,0.113022,0.276971,0.294397 -6.00465,0.089431,0.11031,0.276237,0.295957 -6.0118,0.067755,0.116974,0.274025,0.300586 -6.01675,0.066834,0.128134,0.272435,0.304311 -6.02007,0.066389,0.136286,0.271391,0.307276 -6.03424,0.064635,0.170181,0.268538,0.31821 -6.03549,0.064473,0.172954,0.268661,0.318596 -6.05872,0.060931,0.212536,0.245321,0.318166 -6.06193,0.060328,0.215789,0.238278,0.317177 -6.07096,0.058425,0.220982,0.217821,0.311289 -6.07425,0.057641,0.221206,0.210215,0.307135 -6.07515,0.057418,0.221106,0.208136,0.305853 -6.08396,0.055022,0.216687,0.187602,0.294058 -6.09278,0.052323,0.206632,0.166981,0.282264 -6.09718,0.050897,0.199783,0.156682,0.270469 -6.10379,0.048707,0.187603,0.141299,0.259147 -6.1104,0.046503,0.173592,0.126062,0.247352 -6.11481,0.045052,0.163525,0.116038,0.235558 -6.11922,0.043632,0.153116,0.106187,0.223764 -6.12342,0.042315,0.143089,0.097041,0.21256 -6.12362,0.042253,0.142608,0.09661,0.21197 -6.12692,0.041255,0.134857,0.089736,0.202626 -6.12803,0.040926,0.132289,0.087488,0.200176 -6.13464,0.03905,0.117637,0.075169,0.188381 -6.13904,0.037884,0.108504,0.054541,0.176587 -6.13916,0.037855,0.108276,0.067834,0.176255 -6.14345,0.03679,0.099909,0.048195,0.164793 -6.14786,0.035772,0.09186,0.044368,0.153471 -6.14965,0.03538,0.088738,0.043121,0.148855 -6.15226,0.034831,0.084338,0.041508,0.141677 -6.15667,0.033968,0.077309,0.039144,0.129882 -6.15892,0.033557,0.073897,0.038054,0.125854 -6.16328,0.032816,0.067576,0.036091,0.118088 -6.16769,0.032132,0.061542,0.034256,0.106294 -6.17413,0.031229,0.053226,0.031754,0.09484 -6.17429,0.031207,0.053021,0.031692,0.094499 -6.1787,0.030647,0.047621,0.030069,0.082705 -6.18531,0.029873,0.039883,0.027712,0.070911 -6.19192,0.029163,0.032555,0.025401,0.059588 -6.20073,0.028288,0.023418,0.022299,0.047793 -6.20955,0.027464,0.015057,0.019014,0.035999 -6.21785,0.026703,0.008001,0.015404,0.028389 -6.22277,0.026248,0.004274,0.012587,0.024675 -6.23184,0.025376,-0.001447,0.003749,0.01837 -6.23819,0.02472,-0.004254,-0.000632,0.014294 -6.24233,0.024261,-0.005461,-0.001823,0.011344 -6.24259,0.02423,-0.005521,-0.00188,0.010991 -6.26718,0.020466,-0.004605,-0.004022,0.002671 -6.27344,0.018968,-0.003642,-0.004176,0.002024 -6.27905,0.017355,-0.002952,-0.004258,0.001586 -6.32277,0.004711,-0.002842,-0.004082,4.2e-05 -6.33851,0.003361,-0.004833,-0.003935,-0.000152 -6.34351,0.003218,-0.006236,-0.003894,-0.000194 -6.349,0.003183,-0.0112,-0.003852,-0.000232 -6.37173,0.003894,-0.009331,-0.003739,-0.000326 -6.37919,0.004316,-0.010336,-0.003727,-0.000351 -6.4102,0.006575,-0.01383,-0.003861,-0.000555 -6.42769,0.008023,-0.008821,-0.004097,-0.00076 -6.43427,0.008575,-0.007037,-0.004222,-0.000831 -6.4563,0.010364,-0.003017,-0.004786,-0.000834 -6.48015,0.011994,-0.000735,-0.005669,-0.000838 -6.49757,0.012705,0.000169,-0.006533,-0.000841 -6.50918,0.012732,0.000566,-0.007246,-0.000842 -6.52212,0.012169,0.000877,-0.00823,-0.000841 -6.57252,0.005561,0.001257,-0.010875,-0.000837 -6.57633,0.00555,0.001248,-0.010485,-0.000837 -6.65441,0.01179,0.000394,6.8e-05,-0.000836 -6.66026,0.01173,0.000295,0.000361,-0.000837 -6.67775,0.010842,-1.6e-05,0.000652,-0.00084 -6.74933,0.005528,-0.001765,-0.002851,-0.000877 -6.76544,0.005235,-0.002768,-0.003872,-0.000904 -6.77043,0.005239,-0.003221,-0.004148,-0.000916 -6.77218,0.00525,-0.0034,-0.004238,-0.000921 -6.7978,0.005847,-0.006622,-0.005082,-0.001356 -6.82114,0.006864,-0.0079,-0.00513,-0.001664 -6.85068,0.008437,-0.003577,-0.004661,-0.001836 -6.87535,0.009723,-0.001153,-0.004164,-0.000977 -6.89633,0.0105,-4.8e-05,-0.003767,-0.000911 -6.90135,0.010586,0.000126,-0.003676,-0.0009 -6.90978,0.010563,0.000363,-0.003525,-0.000884 -6.9542,0.002236,0.000897,-0.00277,-0.000832 -7.05371,0.008399,0.000332,-0.001195,-0.000811 -7.06523,0.00846,0.000205,-0.001017,-0.000813 -7.12191,0.007267,-0.000456,-0.000245,-0.00083 -7.17787,0.005076,-0.001056,-0.000465,-0.000858 -7.26006,0.001978,-0.001757,-0.003847,-0.000911 -7.30951,0.000994,-0.002066,-0.003665,-0.000947 -7.33097,0.000967,-0.002173,-0.003476,-0.000964 -7.38247,0.002046,-0.002367,-0.0029,-0.000999 -7.38385,0.002097,-0.002371,-0.002883,-0.000972 -7.43893,0.004972,-0.002486,-0.002173,-0.00098 -7.49401,0.009135,-0.002531,-0.001466,-0.000988 -7.51187,0.010634,-0.002534,-0.001263,-0.00099 -7.52047,0.011364,-0.002534,-0.001176,-0.000991 -7.54688,0.013589,-0.002528,-0.00097,-0.000996 -7.60196,0.017753,-0.002494,-0.001149,-0.001004 -7.61329,0.01847,-0.002484,-0.001278,-0.001006 -7.65484,0.020546,-0.002442,-0.001196,-0.001012 -7.68324,0.021401,-0.002412,-0.000932,-0.001016 -7.68499,0.021438,-0.00241,-0.000914,-0.001016 \ No newline at end of file diff --git a/validation/dam_break_2d/validation_dam_break_2d.jl b/validation/dam_break_2d/validation_dam_break_2d.jl deleted file mode 100644 index bfe216fde..000000000 --- a/validation/dam_break_2d/validation_dam_break_2d.jl +++ /dev/null @@ -1,161 +0,0 @@ - -include("../validation_util.jl") - -using TrixiParticles -using JSON - -gravity = 9.81 - -H = 0.6 -W = 2 * H -tspan = (0.0, 8.0 / sqrt(gravity / H)) - -# `particle_spacing` in this case is set relative to `H`, the initial height of the fluid. -# Use H / 80, H / 320 for validation. -# Note: H / 320 takes a few hours! -particle_spacing = H / 40 -smoothing_length = 3.5 * particle_spacing -smoothing_kernel = WendlandC2Kernel{2}() - -fluid_density = 1000.0 -sound_speed = 20 * sqrt(gravity * H) - -boundary_layers = 4 -spacing_ratio = 1 -boundary_particle_spacing = particle_spacing / spacing_ratio - -initial_fluid_size = (W, H) -tank_size = (floor(5.366 * H / boundary_particle_spacing) * boundary_particle_spacing, 4.0) - -# The top of the sensors is at the position where the middle of the sensors is in the experiment. -# -# > Note, the probe position in the numerical setup does not exactly match the position in the experiment, but -# > Greco [36] showed that this shift gives better agreement and reported several uncertainties in the -# > measurements motivating this adjustment. -# S. Adami, X. Y. Hu, N. A. Adams. -# "A generalized wall boundary condition for smoothed particle hydrodynamics". -# In: Journal of Computational Physics 231, 21 (2012), pages 7057--7075. -# https://doi.org/10.1016/J.JCP.2012.05.005 -sensor_size = 0.009 -P1_y_top = 160 / 600 * H -P1_y_bottom = P1_y_top - sensor_size -P2_y_top = (160 + 424) / 600 * H -P2_y_bottom = P2_y_top - sensor_size -P3_y_top = (160 + 424 + 416) / 600 * H -P3_y_bottom = P3_y_top - sensor_size - -sensor_names = ["P1", "P2", "P3"] - -tank_right_wall_x = floor(5.366 * H / particle_spacing) * particle_spacing - - 0.5 * particle_spacing - -pressure_P1 = (v, u, t, sys) -> interpolated_pressure([tank_right_wall_x, P1_y_top], - [tank_right_wall_x, P1_y_bottom], - v, u, t, sys) -pressure_P2 = (v, u, t, sys) -> interpolated_pressure([tank_right_wall_x, P2_y_top], - [tank_right_wall_x, P2_y_bottom], - v, u, t, sys) -pressure_P3 = (v, u, t, sys) -> interpolated_pressure([tank_right_wall_x, P3_y_top], - [tank_right_wall_x, P3_y_bottom], - v, u, t, sys) - -function max_x_coord(v, u, t, system) - return maximum(particle -> TrixiParticles.current_coords(u, system, particle)[1], - TrixiParticles.eachparticle(system)) -end - -function interpolated_pressure(coord_top, coord_bottom, v, u, t, system) - n_interpolation_points = 10 - interpolated_values = interpolate_line(coord_top, coord_bottom, - n_interpolation_points, semi, system, v, u, - smoothing_length=2.0 * system.smoothing_length, - clip_negative_pressure=true) - return sum(map(x -> isnan(x) ? 0.0 : x, interpolated_values.pressure)) / - n_interpolation_points -end - -formatted_string = replace(string(particle_spacing), "." => "") - -# EDAC simulation -############################################################################################ -method = "edac" -postprocessing_cb = PostprocessCallback(; dt=0.02, output_directory="out", - filename="validation_result_dam_break_" * - method * "_" * formatted_string, - write_csv=false, max_x_coord, pressure_P1, - pressure_P2, pressure_P3) - -tank_edac = RectangularTank(particle_spacing, initial_fluid_size, tank_size, fluid_density, - n_layers=boundary_layers, spacing_ratio=spacing_ratio, - acceleration=(0.0, -gravity), state_equation=nothing) - -alpha = 0.02 -viscosity_edac = ViscosityAdami(nu=alpha * smoothing_length * sound_speed / 8) -fluid_system_edac = EntropicallyDampedSPHSystem(tank_edac.fluid, smoothing_kernel, - smoothing_length, - sound_speed, viscosity=viscosity_edac, - density_calculator=ContinuityDensity(), - pressure_acceleration=nothing, - acceleration=(0.0, -gravity)) - -trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), - fluid_particle_spacing=particle_spacing, - smoothing_length=smoothing_length, smoothing_kernel=smoothing_kernel, - boundary_layers=4, state_equation=nothing, - solution_prefix="validation_" * method * "_" * formatted_string, - extra_callback=postprocessing_cb, tspan=tspan, - fluid_system=fluid_system_edac, tank=tank_edac, - threaded_nhs_update=false) # To get the same results with different thread numbers - -reference_file_edac_name = joinpath(validation_dir(), "dam_break_2d", - "validation_reference_edac_$formatted_string.json") -run_file_edac_name = joinpath("out", - "validation_result_dam_break_edac_$formatted_string.json") - -reference_data = JSON.parsefile(reference_file_edac_name) -run_data = JSON.parsefile(run_file_edac_name) - -error_edac_P1 = interpolated_mse(reference_data["pressure_P1_fluid_1"]["time"], - reference_data["pressure_P1_fluid_1"]["values"], - run_data["pressure_P1_fluid_1"]["time"], - run_data["pressure_P1_fluid_1"]["values"]) - -error_edac_P2 = interpolated_mse(reference_data["pressure_P2_fluid_1"]["time"], - reference_data["pressure_P2_fluid_1"]["values"], - run_data["pressure_P2_fluid_1"]["time"], - run_data["pressure_P2_fluid_1"]["values"]) - -# WCSPH simulation -############################################################################################ -method = "wcsph" -postprocessing_cb = PostprocessCallback(; dt=0.02, output_directory="out", - filename="validation_result_dam_break_" * - method * "_" * formatted_string, - write_csv=false, max_x_coord, pressure_P1, - pressure_P2, pressure_P3) - -trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), - fluid_particle_spacing=particle_spacing, - smoothing_length=smoothing_length, smoothing_kernel=smoothing_kernel, - boundary_layers=4, - solution_prefix="validation_" * method * "_" * formatted_string, - extra_callback=postprocessing_cb, tspan=tspan, - threaded_nhs_update=false) # To get the same results with different thread numbers - -reference_file_wcsph_name = joinpath(validation_dir(), "dam_break_2d", - "validation_reference_wcsph_$formatted_string.json") -run_file_wcsph_name = joinpath("out", - "validation_result_dam_break_wcsph_$formatted_string.json") - -reference_data = JSON.parsefile(reference_file_wcsph_name) -run_data = JSON.parsefile(run_file_wcsph_name) - -error_wcsph_P1 = interpolated_mse(reference_data["pressure_P1_fluid_1"]["time"], - reference_data["pressure_P1_fluid_1"]["values"], - run_data["pressure_P1_fluid_1"]["time"], - run_data["pressure_P1_fluid_1"]["values"]) - -error_wcsph_P2 = interpolated_mse(reference_data["pressure_P2_fluid_1"]["time"], - reference_data["pressure_P2_fluid_1"]["values"], - run_data["pressure_P2_fluid_1"]["time"], - run_data["pressure_P2_fluid_1"]["values"]) diff --git a/validation/dam_break_2d/validation_reference_edac_0001875.json b/validation/dam_break_2d/validation_reference_edac_0001875.json deleted file mode 100644 index c0bd126da..000000000 --- a/validation/dam_break_2d/validation_reference_edac_0001875.json +++ /dev/null @@ -1,847 +0,0 @@ -{ - "pressure_P1_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 12.7359793055971, - 28.5145237236281, - 121.18168891145856, - 316.403957811798, - 672.8347524740096, - 975.7435164971901, - 1234.7711524201573, - 1267.680802913088, - 1325.9539878370165, - 1369.2759819671567, - 1350.4045030210407, - 1486.383129259401, - 1533.1394246949553, - 1660.155468017621, - 1743.1540612366239, - 1883.4808330153646, - 1968.8761154337378, - 2055.5802596756357, - 2272.252411907779, - 2325.017625624002, - 2344.031120910614, - 2339.1747220108127, - 2554.788413947325, - 2558.8206401087564, - 2561.4739343811502, - 2673.201703494265, - 2687.0498811013213, - 2665.652476816712, - 2796.719586397012, - 2690.6854597061447, - 2823.976655280274, - 2773.888397659288, - 2770.7246352561287, - 2733.8073822998463, - 2791.441447325751, - 2758.279567000115, - 2775.3420612807868, - 2754.1897112804113, - 2780.4439704978495, - 2832.8226883106045, - 2832.207096183353, - 2919.172692602965, - 2978.1005453219236, - 3055.533747183998, - 3115.2877143793003, - 3304.5758576941566, - 3716.945192978689, - 4139.041856711153, - 5089.9979516091435, - 6784.711878272115, - 5398.159733462215, - 5383.433219097706, - 5694.021068009453, - 5567.551168262456, - 5700.433087898954, - 6512.9993263423485, - 6921.981388579496, - 2126.342769759701, - 4818.481846720581, - 2147.0886483178983, - 2035.776595240432, - 3286.8706549891367, - 0.0, - 183.40990436617943, - 0.0, - 240.28213505770492, - 23.58938714055236, - 8.693169047793514, - 45.131256074044394 - ], - "datatype": "Float64", - "type": "series" - }, - "meta": { - "julia_version": "1.10.2", - "solver_version": "98fe4b85-dirty", - "solver_name": "TrixiParticles.jl" - }, - "pressure_P2_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 21.472697885978445, - 10.036855178405164, - 17.953156099725824, - 11.193310410622063, - 15.83130169456302, - 28.300612730060152, - 23.415266211843004, - 7.8618294949455905, - 19.77745609502992, - 6.78805576189078, - 16.60577689715863, - 15.765413654803334, - 9.60572951183119, - 38.139007072131825, - 31.696665025734763, - 77.87194738026172, - 163.8658377974792, - 180.69274449627062, - 222.54545096994465, - 267.3263578713369, - 286.5018951603133, - 384.4746403145662, - 445.98342590607035, - 575.2469414095979, - 596.268916294803, - 753.3967517055345, - 846.4516642336127, - 905.705056613858, - 1027.3067437018638, - 1133.7076645333389, - 1261.3890568617142, - 1368.9933149540043, - 1451.027232035189, - 1534.1833594826799, - 1613.4690245827069, - 1676.8665162894079, - 1697.3325324590646, - 1748.1514300345352, - 1747.3641613490236, - 1857.658956085584, - 1431.5179859919629, - 345.7287754717464, - 22.280850379549335, - 13.04647104615773, - 19.835843255318192, - 7.334800977648827, - 2.2899246175283445, - 5.707395070400249, - 0.0, - 0.0, - 7.462732625470549, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - }, - "max_x_coord_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 1.1990625, - 1.2063432940755658, - 1.2250029680741252, - 1.2530386861909606, - 1.288380049164496, - 1.3296514917312396, - 1.3761229671532695, - 1.4273044663017989, - 1.4827926673621, - 1.5422127863194253, - 1.6052157918941716, - 1.6714596553470806, - 1.7406580805572875, - 1.812374269690358, - 1.8864315942123377, - 1.9627470006302623, - 2.041216921028526, - 2.121617826397508, - 2.203751516733095, - 2.2876038129918603, - 2.373149729066263, - 2.46009044721456, - 2.547933146106392, - 2.636834633661893, - 2.7269083994450263, - 2.8180682120678515, - 2.910233637533954, - 3.003343213189532, - 3.0971895719847193, - 3.1915593646002023, - 3.2196902197292787, - 3.219119439082579, - 3.219160083870915, - 3.2188337175742134, - 3.2188660956650565, - 3.2188456697301047, - 3.218791604574891, - 3.218819504101484, - 3.2188097432071134, - 3.2188700523552267, - 3.2187898253144627, - 3.2188181722874565, - 3.2188315383940687, - 3.2188099963666703, - 3.218788914955046, - 3.2188087786969635, - 3.218788151059705, - 3.218818465460849, - 3.2188210252066938, - 3.218820071146196, - 3.2187641750692, - 3.2187894758955875, - 3.21878178722089, - 3.218787156513524, - 3.2187741708911304, - 3.2187372524939875, - 3.218723777155505, - 3.218801110338959, - 3.2187595553187642, - 3.218794551698227, - 3.2189359364973846, - 3.2189754134306097, - 3.2187959457458852, - 3.2187582476135965, - 3.2187811787494365, - 3.2187738977564107, - 3.2187371959054767, - 3.2187617001374567, - 3.218770150918383, - 3.2188413372559417, - 3.2187391407868957, - 3.2189228917502835, - 3.2187628973469233, - 3.218748622087054, - 3.2187667204087425, - 3.2188150192510254, - 3.2187066040729677, - 3.2187422551705183, - 3.2188285350292256, - 3.2187540013873512, - 3.218817745001026, - 3.218753323146198, - 3.2190417019977278, - 3.218902290859742, - 3.21917334895788, - 3.219890659836416, - 3.220026541071697, - 3.2193949673980007, - 3.2198247605564982, - 3.220694585297862, - 3.22067370122762, - 3.2206288665574703, - 3.2205844767554037, - 3.2209111988932424, - 3.219942974737926, - 3.219950820221985, - 3.221179717942062, - 3.220626177302738, - 3.2206076584431527, - 3.2206012236298225 - ], - "datatype": "Float64", - "type": "series" - }, - "pressure_P3_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 15.529277655179897, - 12.81309061156936, - 11.495076082392263, - 16.74388970629975, - 9.60944005771834, - 5.502557441697027, - 3.2002845914885194, - 19.107397293757252, - 3.4181356258315487, - 12.434467294945737, - 4.8763962142257125, - 2.960353563187964, - 4.528842104467208, - 4.19743959199365, - 4.3593462737199555, - 1.9808774326465148, - 2.2930486613951038, - 1.2802765276810233, - 0.8553600802283693, - 1.2013864991905048, - 0.9812959138648975, - 2.9223327935557912, - 3.6221245567188896, - 10.69892561088472, - 5.184896692900523, - 3.7350019298198482, - 8.366625185809166, - 3.8411397481336578, - 4.372304023877084, - 13.618701695211328, - 22.034252504158683, - 9.524242299283609, - 11.640219137102804, - 8.59664828444686, - 5.184157038067201, - 2.8799668253121937, - 13.032063157575939, - 4.933994270495964, - 9.780250778572684, - 0.0, - 0.0, - 0.406470135144525, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - } -} \ No newline at end of file diff --git a/validation/dam_break_2d/validation_reference_edac_00075.json b/validation/dam_break_2d/validation_reference_edac_00075.json deleted file mode 100644 index bd53415c1..000000000 --- a/validation/dam_break_2d/validation_reference_edac_00075.json +++ /dev/null @@ -1,847 +0,0 @@ -{ - "pressure_P1_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 63.829505651630846, - 220.30826119648836, - 356.39160841531566, - 535.516077453837, - 963.5802099739906, - 881.3573623650755, - 1324.980773435947, - 1333.3272539220463, - 1299.4073738291438, - 1333.2914543308548, - 1453.4742215160632, - 1644.1466295611085, - 1786.0017052646526, - 1781.3058297672237, - 1898.829394763771, - 1908.5607738029503, - 2043.1272321029107, - 2299.9805783396173, - 2397.2803813327737, - 2194.9681883855856, - 2490.947559662288, - 2464.2354854843725, - 2567.5142907053973, - 2509.8512859444154, - 2802.7113346478886, - 2601.3616867718347, - 2725.748923436639, - 2716.6396869340956, - 2725.0700332563947, - 2604.6917694756244, - 2863.1584278286573, - 2766.133568172541, - 2778.5781481461536, - 2682.5791033620744, - 2785.9028160596604, - 2795.2322853133, - 2764.726744940796, - 2717.46050450239, - 2831.3719415971464, - 2925.490108702938, - 2979.583547611059, - 3105.2850856824093, - 3244.3856460898687, - 3294.1171515493043, - 3785.2292794318246, - 3913.511788275557, - 4531.301263579918, - 5761.126046753425, - 7519.351325972794, - 4153.756277506261, - 3279.8000230800862, - 5688.623347209816, - 5433.102770408339, - 7597.346718048364, - 5052.317899702394, - 3116.5428328888825, - 2349.516037719813, - 1213.8474417759014, - 650.7827228183571, - 1865.2307953276857, - 446.83827900878543, - 1327.092311634857, - 529.5215672655502, - 1309.9510132813543, - 861.8276663220553, - 1527.4281446551856, - 1394.2536482885102, - 2036.0762266565296 - ], - "datatype": "Float64", - "type": "series" - }, - "meta": { - "julia_version": "1.10.2", - "solver_version": "98fe4b85-dirty", - "solver_name": "TrixiParticles.jl" - }, - "pressure_P2_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 5.0282935721918545, - 41.66902559762977, - 16.195175000569556, - 9.772190471505196, - 56.784903933109135, - 23.006398092933928, - 13.765969200139901, - 12.598747857884188, - 11.712832468476293, - 13.966219219297994, - 14.100333535764658, - 39.437277554825684, - 43.5423194791, - 16.231952571132442, - 96.81208250744115, - 128.9850320577453, - 152.71711006265843, - 170.3856803346461, - 238.89851359304885, - 305.98841083043874, - 371.02145365540594, - 461.8754645655811, - 525.3023700444741, - 677.4712733719313, - 767.479320282582, - 861.0047206691031, - 991.6954099442231, - 1090.8555925376113, - 1128.8356302289744, - 1445.7568270904444, - 1479.4249349982256, - 1475.1956396616933, - 1584.4783609712804, - 1639.2918017908673, - 1726.2818799954275, - 1792.8565787121727, - 1900.00143514012, - 1940.0073845390475, - 1665.5954705697288, - 1631.7514029572583, - 694.5720280501272, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - }, - "max_x_coord_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 1.19625, - 1.2023976467184008, - 1.2179944997990482, - 1.2432317106166832, - 1.2768921158107565, - 1.3174944089678398, - 1.363773913458999, - 1.4147586979970606, - 1.4698590397345028, - 1.5286639090988325, - 1.590883005387329, - 1.656242684041159, - 1.7244429453366437, - 1.7952163157185361, - 1.8683754102276249, - 1.9437962223600003, - 2.021336588700605, - 2.100786406989409, - 2.1820406570528568, - 2.2648743393364077, - 2.3489210372982403, - 2.434103799766087, - 2.5205804045738502, - 2.6082968893405742, - 2.6971417538554188, - 2.7866789792173656, - 2.876522591465255, - 2.9667925003714157, - 3.0577166572369734, - 3.1494195562105856, - 3.2172367424978736, - 3.217731452032734, - 3.2176100586254948, - 3.2178700938455798, - 3.2174898133893666, - 3.217267185894823, - 3.2172536924069224, - 3.217178702109812, - 3.2169691406849776, - 3.2168368639030445, - 3.2167343156157084, - 3.216642708903159, - 3.2165359705888847, - 3.216420106135052, - 3.216315087121993, - 3.216190326215446, - 3.216086124722576, - 3.2160385803340965, - 3.216050053818234, - 3.2160337820246196, - 3.2159943819220134, - 3.2159347008094636, - 3.2159127074293994, - 3.2161083211358203, - 3.2162808850626914, - 3.2164244345505755, - 3.2165585437378996, - 3.216654795235872, - 3.2167269365074875, - 3.216754375138281, - 3.2167515055859415, - 3.2167113688123066, - 3.2168153500403998, - 3.2168712431681596, - 3.2168536846066127, - 3.2168026454487033, - 3.2167299797134388, - 3.2166043221498684, - 3.216397049710712, - 3.216081168666742, - 3.2157922944378425, - 3.2156285236165765, - 3.2154261368640507, - 3.2153412042296288, - 3.215305319578891, - 3.2152944492058126, - 3.215288739691573, - 3.2157531909289943, - 3.2152702645965245, - 3.2152575344380456, - 3.2163065921762928, - 3.2164701917963145, - 3.215482938016915, - 3.215197010284924, - 3.217028337267962, - 3.215886930265487, - 3.21745500028446, - 3.2194509283015993, - 3.2209682870062513, - 3.2196219325073554, - 3.21698451537636, - 3.215699412041782, - 3.216737459567915, - 3.217914844950135, - 3.218091583913962, - 3.218082833508435, - 3.218072479714611, - 3.2180687378422013, - 3.2180571470855797, - 3.2180340698377394 - ], - "datatype": "Float64", - "type": "series" - }, - "pressure_P3_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 14.324062948361998, - 0.0, - 11.556323366686689, - 19.897416547062722, - 14.549414170009893, - 37.376587539311515, - 23.679461389760764, - 26.23284934504549, - 9.843110841979625, - 15.047834587442887, - 11.679194179286295, - 10.421649034630363, - 8.53145201559001, - 8.231779655818643, - 7.4710115038618525, - 7.89190390537256, - 7.4076574494687915, - 7.094814898306931, - 6.551896878368265, - 5.657355192996434, - 8.354870819924713, - 6.5641582916196395, - 11.620899941621703, - 10.246057034822284, - 47.32516861754617, - 9.59894792866611, - 9.923660936595967, - 12.807942681526749, - 9.741126570754219, - 0.0, - 0.0, - 35.099437812161575, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - } -} \ No newline at end of file diff --git a/validation/dam_break_2d/validation_reference_edac_0015.json b/validation/dam_break_2d/validation_reference_edac_0015.json deleted file mode 100644 index fb8ead957..000000000 --- a/validation/dam_break_2d/validation_reference_edac_0015.json +++ /dev/null @@ -1,847 +0,0 @@ -{ - "pressure_P1_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 604.3957582210057, - 854.3064249701162, - 806.7433554645238, - 863.2834525323564, - 1172.7188760362817, - 1185.7354823957364, - 1029.8194599051196, - 1220.8424591289627, - 1129.1130583250354, - 1681.2917027821925, - 1541.84704989596, - 1941.681744886013, - 1703.342852837277, - 1820.7752456709127, - 2273.6190702267386, - 2059.549528549632, - 2492.42657872154, - 2431.891435051085, - 2341.412705521953, - 2380.5056651594596, - 2476.6304064185897, - 2377.215248491543, - 2407.6934046918395, - 2621.6411290967458, - 2604.698214284965, - 2546.399443630783, - 2689.6843234734833, - 2654.639435738155, - 2815.3615123943055, - 2642.321187463903, - 2862.2882422981534, - 2811.523774221353, - 2800.9092531867764, - 2952.9564218334053, - 2844.26385035426, - 2874.3035321104517, - 2947.9713669965477, - 2981.736356294694, - 3022.7152925706846, - 3095.8959107824994, - 3223.283421806281, - 3438.1549422956728, - 3461.615757497162, - 3889.532826771071, - 4764.8350876461145, - 6691.330618320588, - 5937.57389697787, - 6470.044184482702, - 5114.121178496523, - 3634.978964640017, - 3802.0393876762696, - 2751.9597721194446, - 2027.8908055573243, - 1718.7065075201758, - 1535.5875986343772, - 1382.352588739524, - 1479.4637838388012, - 1636.543321007025, - 1580.840904760441, - 1362.2790951007676, - 1307.4981559335906, - 1483.0941976925808, - 1582.6084515968898, - 3052.2514672201683, - 34536.29685017654, - 37.65095815197997 - ], - "datatype": "Float64", - "type": "series" - }, - "meta": { - "julia_version": "1.10.2", - "solver_version": "v0.1.0-22-g4d428a23-dirty", - "solver_name": "TrixiParticles.jl" - }, - "pressure_P2_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.4586145071541898, - 35.23970220674639, - 37.545723914493706, - 13.731385167730085, - 18.84645797568068, - 19.822484197824288, - 16.23077067519315, - 56.87642077158365, - 37.33671454346889, - 78.42964734337639, - 75.04969120367215, - 166.6148408881951, - 162.73529547483014, - 281.72822678093445, - 314.5217962647108, - 297.23412415145486, - 357.6400963258884, - 448.65581898807187, - 465.0729072685026, - 612.2400999708409, - 751.9411576661471, - 889.945132047711, - 1033.4736519596122, - 1058.2021923062105, - 1247.2730353264728, - 1414.0754183693182, - 1588.3865333590663, - 1665.7825902521158, - 1545.8294821241884, - 1673.9628180445059, - 1683.2228111190875, - 1629.4962936654842, - 1359.6993745648126, - 887.9118718296219, - 1629.9983551561381, - 1234.4717618954708, - 2004.325882177016, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - }, - "max_x_coord_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 1.1925, - 1.1979624310701857, - 1.2116593613380129, - 1.234012919268563, - 1.2647682353578247, - 1.302960573952499, - 1.3475843440024642, - 1.3976361698571822, - 1.452219981156139, - 1.5105209474752668, - 1.572142938860141, - 1.6367982265986325, - 1.7042518338466686, - 1.774293799870995, - 1.8467352027968729, - 1.9213758913869938, - 1.9980351614993215, - 2.0765445792095147, - 2.1566383641391074, - 2.238003134643122, - 2.3206381687170166, - 2.404491939404275, - 2.4895406309022796, - 2.575727348830502, - 2.662752245491369, - 2.7501950551381618, - 2.837835825711919, - 2.925713154425575, - 3.0138975572145523, - 3.102445768668486, - 3.191484721683206, - 3.2105882666919006, - 3.210602566477464, - 3.2104070754233653, - 3.2102742072774215, - 3.210140068534911, - 3.210439644793008, - 3.211288433609166, - 3.21212082548689, - 3.2125141820856595, - 3.212599029590776, - 3.211945134461789, - 3.210893702477077, - 3.2095320951690947, - 3.2088660426953854, - 3.2087134506109494, - 3.20857376087247, - 3.2083568996870397, - 3.2083890435617195, - 3.2080318779499213, - 3.2079261547153983, - 3.207855507756003, - 3.2077741195888656, - 3.2077060027314293, - 3.207670669165742, - 3.2076288978754195, - 3.2075941374177193, - 3.2075586504257148, - 3.207536831952301, - 3.2075265213627917, - 3.2102187933610122, - 3.2126950751999495, - 3.21196641463669, - 3.2074630303747598, - 3.207445287458887, - 3.2074252902484464, - 3.2074042323917, - 3.2073895391869978, - 3.207376753579594, - 3.2073732467888774, - 3.2073483132064147, - 3.207664818066874, - 3.20731546185251, - 3.207854005492601, - 3.208580052098399, - 3.2072818774036804, - 3.207267975766838, - 3.2072489587527926, - 3.2072243341066873, - 3.207219589202814, - 3.207207135145238, - 3.207191617668057, - 3.207167720999116, - 3.2071482230764086, - 3.2071253085042755, - 3.2071076627464006, - 3.207079688551678, - 3.2070631437453248, - 3.207023980424338, - 3.2070022030549534, - 3.2069578815542865, - 3.206882240708722, - 3.206818992733722, - 3.206722841165657, - 3.206641258674049, - 3.20651704330811, - 3.2063950957148926, - 3.206329455325389, - 3.206229289248844, - 3.2061593054711004 - ], - "datatype": "Float64", - "type": "series" - }, - "pressure_P3_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 3.9648485713534356, - 5.688115787337868, - 5.021169068061549, - 3.4690420744982595, - 3.5587374771061193, - 3.1571728370072245, - 3.002903045034488, - 4.056831537710453, - 6.550226835881946, - 4.570655703611319, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 13.98887227719292, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/dam_break_2d/validation_reference_wcsph_0001875.json b/validation/dam_break_2d/validation_reference_wcsph_0001875.json deleted file mode 100644 index 143fa2d58..000000000 --- a/validation/dam_break_2d/validation_reference_wcsph_0001875.json +++ /dev/null @@ -1,847 +0,0 @@ -{ - "pressure_P1_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 45.784395004426884, - 29.0963004807273, - 82.09143011178865, - 480.5173247987532, - 973.3483022920233, - 950.6415064448477, - 1205.9391286167588, - 1290.217132972779, - 1493.2505500620105, - 791.1303597083299, - 1621.3332817032026, - 1209.649967879809, - 1450.1769634267432, - 1667.706462908013, - 2021.1368753192794, - 2064.739712897202, - 2257.648079488593, - 2059.094957473553, - 2005.5908178585112, - 2245.7005690725623, - 2144.823341827724, - 2401.6276418260254, - 2511.8101954813187, - 2392.8729062435004, - 2728.389883490009, - 2453.68997501138, - 2574.8103376583067, - 2644.8208050406383, - 2795.560194487943, - 2760.374005463031, - 2665.0826676713305, - 2729.435007141164, - 2781.3157684269163, - 2626.429904341887, - 2825.0779162423023, - 2715.766574533961, - 2850.599606872627, - 2717.4272822426187, - 2855.0549332258984, - 2978.689965745355, - 2976.375589014323, - 2921.329964480744, - 3030.587428212174, - 3142.963554938571, - 3064.474348949782, - 3292.874691549051, - 3592.4250266859026, - 4290.388250924816, - 5103.386394463199, - 6745.91427044437, - 5592.075646090989, - 5198.727685514661, - 5192.428024560253, - 4810.974638781969, - 4057.474362834096, - 4982.9085809799635, - 4326.893681723601, - 2365.5792257312305, - 794.455434481232, - 115.03811223063278, - 1595.8828694583096, - 48.06627062092718, - 142.2684567691535, - 426.8228505863073, - 0.0, - 706.4392919333849, - 0.0, - 150.25642381312346, - 2277.737279445718 - ], - "datatype": "Float64", - "type": "series" - }, - "meta": { - "julia_version": "1.10.3", - "solver_version": "v0.1.1-14-g16ba4ad3-dirty", - "solver_name": "TrixiParticles.jl" - }, - "pressure_P2_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 8.134978657093146, - 16.116098542012196, - 14.366905888289647, - 16.181410038300935, - 9.851210123836067, - 27.796007277259566, - 11.17503157781834, - 1.0934215179075044, - 12.844439624904116, - 5.940102595559185, - 19.600847118274284, - 38.053279321766254, - 21.295762396264585, - 12.976253972328617, - 81.24650675781987, - 34.479345653339756, - 245.37183177529965, - 306.79960278612987, - 160.13536073045663, - 315.6922797256672, - 296.080651120703, - 333.2708743720141, - 513.4937918935809, - 495.83807208024655, - 520.7690916129709, - 725.2386100241195, - 858.3613537623429, - 898.8101400627029, - 1026.828064254389, - 1190.5527204068717, - 1260.8739368797535, - 1379.7241579310062, - 1441.7980954536122, - 1477.007856603721, - 1547.1434162566334, - 1583.8840399538308, - 1700.7432601788023, - 1785.0753079682509, - 1733.8949904850874, - 1764.7490159275246, - 1432.4338785761856, - 395.27999913305814, - 34.94150836405466, - 24.900856184771346, - 7.679262019233791, - 28.035980801784653, - 8.438531609013937, - 8.387476071262533, - 16.627723954709776, - 16.034203643304302, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - }, - "max_x_coord_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 1.1990625, - 1.206291218862206, - 1.2251427920923224, - 1.2533926435243583, - 1.2887327249295564, - 1.3298850673213958, - 1.3762353875886921, - 1.4273098662098027, - 1.4826998207876958, - 1.5420431133536183, - 1.6049044398640613, - 1.6709129699713863, - 1.7398473740262257, - 1.8114203023139126, - 1.8854018187827515, - 1.9616117463234828, - 2.0398817409263104, - 2.1200612626004065, - 2.2020224091181038, - 2.285594356795057, - 2.370625789198274, - 2.4569731709642886, - 2.544597123506079, - 2.633505929520998, - 2.7236864465713833, - 2.8147879428876723, - 2.906985603226265, - 3.000343813149392, - 3.0938721073746325, - 3.1880835992151018, - 3.219445769851805, - 3.2194928505759695, - 3.218972846850055, - 3.218850285198104, - 3.2188789186256095, - 3.218899343489275, - 3.2188060714124114, - 3.218805595407585, - 3.2187922335479557, - 3.2187791224898405, - 3.2188049650925525, - 3.218802965005493, - 3.21874633513394, - 3.218778527620756, - 3.218787800086968, - 3.21877763324876, - 3.2187869503277957, - 3.218801723646658, - 3.2188059646005005, - 3.218802904113761, - 3.2187598378629003, - 3.2187926829108324, - 3.2187830153192003, - 3.2187940663279653, - 3.21887316742644, - 3.2189410001275878, - 3.218960821745065, - 3.218969175054672, - 3.219004759769721, - 3.219034463808112, - 3.2190504796248742, - 3.2190521499490696, - 3.219306855849682, - 3.219525377857718, - 3.2197256432100385, - 3.2199100830560936, - 3.2200888769402294, - 3.220104092135281, - 3.2196277874250585, - 3.2196708582832905, - 3.2192796817127145, - 3.2189086136367777, - 3.218969678322776, - 3.21907942406814, - 3.2190411300367785, - 3.2188676944901733, - 3.2188447959347966, - 3.2189454004639897, - 3.218944669941815, - 3.218860166560762, - 3.2187814287838155, - 3.2188050298515645, - 3.2187352008556602, - 3.2187739282258416, - 3.21912366161124, - 3.2186659672343008, - 3.220265299799684, - 3.218952070255997, - 3.220715876032403, - 3.220063428269404, - 3.221695913083556, - 3.221860930773287, - 3.2203023876287897, - 3.2202986314807363, - 3.219811690478277, - 3.219840248409694, - 3.2199399387860748, - 3.220772411716257, - 3.219926013023057, - 3.221087670404958 - ], - "datatype": "Float64", - "type": "series" - }, - "pressure_P3_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 30.94820884379941, - 22.90822490454815, - 7.396807867640719, - 7.414100503599705, - 7.607592499293037, - 8.584551268164507, - 15.886168735323801, - 17.583653786794144, - 3.998937810844999, - 26.61922910335046, - 1.143643827251536, - 2.827292135466822, - 1.5729938238346048, - 4.595785914798647, - 2.9661048359859876, - 0.279238435624049, - 0.5856484421451172, - 0.009552267527160834, - 0.0010030857424828412, - 3.720823736828451, - 3.9029906118718665, - 0.034405964785396745, - 3.820213730523163, - 8.931893089299567, - 11.186430353660104, - 4.365343796995128, - 9.257621003118746, - 8.875071770189836, - 5.232857413378655, - 35.57141974974755, - 2.695571516358929, - 0.2777628099152869, - 4.869266502185761, - 10.106394305611726, - 4.6574265770569045, - 4.788598767426367, - 16.250354085392793, - 31.4444062316207, - 8.623685759947092, - 20.213228683789133, - 6.33056812306364, - 0.0, - 0.0, - 20.32651578506585, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/dam_break_2d/validation_reference_wcsph_00075.json b/validation/dam_break_2d/validation_reference_wcsph_00075.json deleted file mode 100644 index fed5edbce..000000000 --- a/validation/dam_break_2d/validation_reference_wcsph_00075.json +++ /dev/null @@ -1,847 +0,0 @@ -{ - "pressure_P1_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 58.344991574597245, - 138.3079819297823, - 422.44543275991543, - 916.8379090327911, - 419.0542812820178, - 1347.4169400618655, - 2349.6352547704764, - 1064.5188397369652, - 27.28474677852581, - 101.40272350576802, - 781.2699036849094, - 1397.375646820365, - 1380.062731506342, - 1194.529392969989, - 577.3455172987748, - 837.930707986937, - 3081.161976053418, - 3318.476728313081, - 840.9237550556791, - 2892.0625372919735, - 3033.1045842317258, - 1259.1306900753145, - 3817.228202280832, - 1635.2988377088582, - 3229.66356315531, - 3186.684524742882, - 985.5939469237841, - 4559.785446597643, - 2323.036294969968, - 870.2389644974486, - 3913.740475400634, - 4345.220860174271, - 1727.481685909364, - 317.0817954906028, - 2136.9635058026806, - 4477.765360075153, - 5281.26500304141, - 4350.273753361081, - 2546.9182615226355, - 1165.5955609655477, - 734.9000832904637, - 461.3215749633864, - 519.663763497804, - 387.3458428471696, - 419.23300905557824, - 1315.620427554483, - 3777.79723772579, - 7077.795941168353, - 6982.577978305283, - 7332.201328785472, - 6519.795708535393, - 4443.747044691211, - 7050.928045952259, - 2588.3483986830647, - 1964.994261825345, - 1933.4846460072567, - 5032.453646266516, - 4272.017659452722, - 2275.8426396788036, - 879.224598485221, - 1907.8934504222573, - 1363.6979297710648, - 595.0588557689321, - 2553.1879813651676, - 341.1912981329048, - 1605.7780612629278, - 524.6937275195312, - 2009.0164472926597 - ], - "datatype": "Float64", - "type": "series" - }, - "meta": { - "julia_version": "1.10.3", - "solver_version": "v0.1.1-12-g81063e0c-dirty", - "solver_name": "TrixiParticles.jl" - }, - "pressure_P2_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 20.313232646831917, - 45.50619773676554, - 6.167987928920181, - 23.887316107055206, - 4.430146943903635, - 8.768108012133887, - 8.968265715355544, - 40.80561634950723, - 13.266294706155914, - 7.219760928606955, - 35.837355015060986, - 21.21805714727239, - 3.4965726828218804, - 85.24808274134794, - 198.65072969366972, - 84.55703995068527, - 222.2918851291387, - 255.16931211945393, - 287.2663679859116, - 390.13505695583376, - 462.164671744731, - 478.8093301950632, - 667.5463321442569, - 708.8526827117113, - 644.7813417154648, - 1006.6892456341614, - 1022.7891602511103, - 1088.3173425223758, - 974.9347449872591, - 1302.0652060904554, - 1561.291264087963, - 1894.1485159976914, - 1935.3743926330087, - 1664.0454616980896, - 1417.613710039965, - 1572.8675261801695, - 1469.2600241416771, - 1576.6503876078307, - 1357.7509207067628, - 627.6625285260745, - 171.3536996335749, - 16.555442318313464, - 0.0, - 0.0, - 0.0, - 6.927952002970758, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - }, - "max_x_coord_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 1.19625, - 1.2023151894699518, - 1.2178047411946762, - 1.243157491913713, - 1.2770869973245222, - 1.3179282960365564, - 1.364441291682277, - 1.415616412333505, - 1.470830679860593, - 1.5296724290345078, - 1.5918075373727558, - 1.6569645052768505, - 1.7248666483318564, - 1.7952375999021615, - 1.8679490290611642, - 1.942910014856134, - 2.0200484369245837, - 2.0991787194449247, - 2.1799742972516323, - 2.262067264672173, - 2.3452911203047084, - 2.429713872083454, - 2.515361512205054, - 2.602293896796202, - 2.6906214381249502, - 2.780398787100884, - 2.871371035052104, - 2.9631624013020352, - 3.0557396096262015, - 3.148099574918203, - 3.217883381034535, - 3.2182521991925985, - 3.2190358988544725, - 3.219663973025696, - 3.2192588413421133, - 3.2183918503396116, - 3.218238394517403, - 3.218217349335105, - 3.2182135276397252, - 3.2182331098537738, - 3.2182123548665516, - 3.2182351451319717, - 3.2181860314410704, - 3.2181826027766878, - 3.218261609150298, - 3.218290039492455, - 3.2181013332172035, - 3.2181807074655313, - 3.2182413760911555, - 3.218236604272375, - 3.2181908383681304, - 3.218206894438717, - 3.218192216494783, - 3.218218304785117, - 3.218209781428932, - 3.2182014695397645, - 3.2181983905211684, - 3.2182177816258646, - 3.2182083303461964, - 3.2182141488580966, - 3.2181940144865506, - 3.2181949194681048, - 3.218204747679178, - 3.2181938551074114, - 3.218197842690469, - 3.218205426948579, - 3.2182070153293743, - 3.218334642138954, - 3.218585647160275, - 3.218886605377294, - 3.2192020710208524, - 3.219574419943034, - 3.2195825815053456, - 3.2189357478307796, - 3.2181998457861263, - 3.2181963889480194, - 3.2181940755753153, - 3.218211667716726, - 3.2182091551294123, - 3.218208689192436, - 3.2182110246884466, - 3.2182138808799348, - 3.2181947548040326, - 3.21908316441958, - 3.218192847601368, - 3.2182125261578234, - 3.2182085567456062, - 3.218202507636954, - 3.2181962807514024, - 3.2182248069249417, - 3.2181984126618266, - 3.2182146801522773, - 3.219360754040278, - 3.2206149671663638, - 3.220484842692027, - 3.219420656013077, - 3.2194090912602475, - 3.2194099228296955, - 3.219378813315998, - 3.2195112418230374 - ], - "datatype": "Float64", - "type": "series" - }, - "pressure_P3_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 48.77745540928442, - 10.358164540228152, - 15.049608310077256, - 8.912918416371017, - 3.1038547498987126, - 9.080093846498611, - 11.001862497415107, - 4.389149064297083, - 9.327454050543402, - 8.079108270395704, - 8.873144682478369, - 11.70989304656271, - 9.778468385332287, - 10.139553590994097, - 7.951623034613833, - 3.903962005507205, - 7.599910342535063, - 8.624094009131955, - 8.186379762767322, - 4.029544470513885, - 3.983062631983286, - 3.2253097131812596, - 13.985451999478542, - 2.350909911211228, - 9.466000090043943, - 15.270276355793007, - 4.803286926676352, - 17.17179251061254, - 16.4819672034308, - 35.117451725247186, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 6.527361143284767, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/dam_break_2d/validation_reference_wcsph_0015.json b/validation/dam_break_2d/validation_reference_wcsph_0015.json deleted file mode 100644 index 670a13f7a..000000000 --- a/validation/dam_break_2d/validation_reference_wcsph_0015.json +++ /dev/null @@ -1,847 +0,0 @@ -{ - "pressure_P1_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 741.993989499188, - 1074.8234774705008, - 780.1667978016657, - 750.2646819009395, - 1867.0876175708631, - 2289.2233812476165, - 1854.7785819902779, - 1898.4536989266617, - 1467.7442261288045, - 1634.0625951725135, - 1051.0175330299053, - 1792.9924178916986, - 2224.449593047438, - 2072.497420987851, - 1759.794387609291, - 2213.4462548625984, - 2195.882761495324, - 2296.9359071622694, - 2110.261628995037, - 2199.283711290986, - 2970.3736472205856, - 2306.9377872024497, - 2708.5496860356457, - 3000.1783021126685, - 2269.7935071889146, - 2084.462044237944, - 2584.891574798109, - 2922.9584610302077, - 2700.9638330280814, - 2912.962403023275, - 2333.0896174441677, - 2272.70021772166, - 2482.9249133633994, - 2818.1450177572733, - 2995.435467727107, - 2909.3691069629745, - 3100.77267069721, - 3025.9643852018985, - 3235.2107438665453, - 3257.726890859399, - 2988.8564114485575, - 3115.182446969521, - 3505.8949466499425, - 3713.810524900102, - 4590.058796083151, - 4355.887013844826, - 6158.300373074685, - 6758.121068681193, - 5923.416082268637, - 3778.132671948576, - 853.0072739525398, - 1654.167440624306, - 1293.1342883693856, - 5038.477782149967, - 2514.857909325529, - 2194.8799832441873, - 670.5436529503403, - 1266.7144427699454, - 637.4225382331412, - 1349.35969801679, - 2013.3006836641252, - 1472.444123400624, - 1092.6572808458293, - 1240.5339171417113, - 3713.2055968317923, - 794.5971054101079 - ], - "datatype": "Float64", - "type": "series" - }, - "meta": { - "julia_version": "1.10.3", - "solver_version": "v0.1.1-12-g81063e0c", - "solver_name": "TrixiParticles.jl" - }, - "pressure_P2_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 47.77942633833136, - 44.375511308801165, - 30.473913165821585, - 8.476970647743345, - 33.57949027495734, - 1.8632530695075122, - 22.444832138896185, - 5.229749466466734, - 12.45236780256954, - 113.28034507259024, - 16.872509526872864, - 183.5309631867931, - 124.91977274284777, - 119.71991124316344, - 157.1870298933421, - 274.4122702419585, - 366.9283073596733, - 436.7984767499305, - 656.8651152221494, - 693.6807559949332, - 709.8622378950579, - 940.2747009417171, - 713.595404833571, - 1152.7154288766947, - 1175.086016427977, - 1117.072092779762, - 1473.3110894037666, - 1398.3815929624138, - 1426.719077735046, - 1724.6637655473126, - 1689.600981475803, - 1716.4157506396168, - 2313.2400917892637, - 1548.166884927166, - 873.0003498783823, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - }, - "max_x_coord_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 1.1925, - 1.1979096218668641, - 1.2114046382489772, - 1.2336420690085275, - 1.264406620833113, - 1.30283624717504, - 1.3476751813676164, - 1.3979265161874295, - 1.4526822092129983, - 1.5111470319630946, - 1.572927201056311, - 1.6376619970447712, - 1.7050782695517803, - 1.7749222353523972, - 1.8470381017706896, - 1.9214486425691817, - 1.9977114877634146, - 2.075603680636452, - 2.1548845384780377, - 2.2354024463749025, - 2.317146330306622, - 2.400082966455745, - 2.4841380843809278, - 2.569322713974655, - 2.6555845619869305, - 2.742628218729764, - 2.8301077178490366, - 2.917793645723983, - 3.0055781193133417, - 3.0934656910674185, - 3.1819553106957756, - 3.210824766445999, - 3.2113869376507562, - 3.211412733613088, - 3.211416086243693, - 3.211389363109834, - 3.211426369650999, - 3.2113609390638658, - 3.2113423890613904, - 3.211373063658337, - 3.211416879532908, - 3.2115410232676393, - 3.211420449026326, - 3.211340414954566, - 3.2114367116108946, - 3.2114314964286104, - 3.211388714333208, - 3.211430070547672, - 3.211389214185582, - 3.211385960112267, - 3.2113923720865305, - 3.2113927640902724, - 3.2113232302750965, - 3.2112382778326545, - 3.2111709478497157, - 3.211044813629002, - 3.2109619319113025, - 3.210835775367167, - 3.210676328655387, - 3.210494708667366, - 3.2102932552996304, - 3.210065134623158, - 3.2097946508076096, - 3.2095209162914307, - 3.2091908718152014, - 3.208858073378806, - 3.208540190789524, - 3.2092530229321037, - 3.21096166446629, - 3.2087142239418385, - 3.207876985261815, - 3.209981082122852, - 3.2099475857031297, - 3.2059177379588446, - 3.205500472975577, - 3.2060914486021095, - 3.205519414840442, - 3.206014703356543, - 3.208394467358398, - 3.2096207184298824, - 3.2099349143153155, - 3.209121978170608, - 3.2060689626565755, - 3.2046673031145434, - 3.204929136720981, - 3.205524292587136, - 3.2054895995204817, - 3.206946403159766, - 3.205982786489014, - 3.2056724075416114, - 3.205688076719014, - 3.2056000742724207, - 3.205427784285096, - 3.205636810334264, - 3.2082911860239833, - 3.210702471698039, - 3.210541425755314, - 3.2095944307240436, - 3.208960536226681, - 3.2047017324364746 - ], - "datatype": "Float64", - "type": "series" - }, - "pressure_P3_fluid_1": { - "n_values": 100, - "time": [ - 0.0, - 0.02, - 0.04, - 0.06, - 0.08, - 0.1, - 0.12, - 0.14, - 0.16, - 0.18, - 0.2, - 0.22, - 0.24, - 0.26, - 0.28, - 0.3, - 0.32, - 0.34, - 0.36, - 0.38, - 0.4, - 0.42, - 0.44, - 0.46, - 0.48, - 0.5, - 0.52, - 0.54, - 0.56, - 0.58, - 0.6, - 0.62, - 0.64, - 0.66, - 0.68, - 0.7000000000000001, - 0.72, - 0.74, - 0.76, - 0.78, - 0.8, - 0.8200000000000001, - 0.84, - 0.86, - 0.88, - 0.9, - 0.92, - 0.9400000000000001, - 0.96, - 0.98, - 1.0, - 1.02, - 1.04, - 1.06, - 1.08, - 1.1, - 1.12, - 1.1400000000000001, - 1.16, - 1.18, - 1.2, - 1.22, - 1.24, - 1.26, - 1.28, - 1.3, - 1.32, - 1.34, - 1.36, - 1.3800000000000001, - 1.4000000000000001, - 1.42, - 1.44, - 1.46, - 1.48, - 1.5, - 1.52, - 1.54, - 1.56, - 1.58, - 1.6, - 1.62, - 1.6400000000000001, - 1.6600000000000001, - 1.68, - 1.7, - 1.72, - 1.74, - 1.76, - 1.78, - 1.8, - 1.82, - 1.84, - 1.86, - 1.8800000000000001, - 1.9000000000000001, - 1.92, - 1.94, - 1.96, - 1.9784774673179917 - ], - "system_name": "fluid", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 7.495670456119567, - 4.405996200470255, - 3.8637687267462297, - 5.608251475045593, - 5.873394653044703, - 8.085513883298564, - 5.478878616770271, - 4.599392627242936, - 4.4993047636542105, - 4.593772701085671, - 4.183024838311256, - 1.4104710124483635, - 3.204733460221206, - 11.008683815731874, - 5.7439955641918825, - 4.599460338927322, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 6.936334864725218, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/general/investigate_relaxation.jl b/validation/general/investigate_relaxation.jl deleted file mode 100644 index 4948988f0..000000000 --- a/validation/general/investigate_relaxation.jl +++ /dev/null @@ -1,104 +0,0 @@ -using TrixiParticles -using JSON -using Plots -using GLM -using DataFrames -using Printf - -pp_cb = PostprocessCallback(; ekin=kinetic_energy, max_pressure, avg_density, dt=0.025, - filename="relaxation", write_csv=false, write_file_interval=0) - -pp_damped_cb = PostprocessCallback(; ekin=kinetic_energy, max_pressure, avg_density, - dt=0.025, - filename="relaxation_damped", write_csv=false, - write_file_interval=0) - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - extra_callback=pp_cb, tspan=(0.0, 5.0), saving_callback=nothing, - fluid_particle_spacing=0.02, - viscosity_wall=ViscosityAdami(nu=0.5)); - -trixi_include(@__MODULE__, - joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"), - extra_callback=pp_damped_cb, tspan=(0.0, 5.0), - source_terms=SourceTermDamping(damping_coefficient=2.0), - saving_callback=nothing, fluid_particle_spacing=0.02, - viscosity_wall=ViscosityAdami(nu=0.5)); - -function calculate_regression(data::Vector{Float64}, t::Vector{Float64}) - @assert length(data)==length(t) "Data and time vectors must have the same length" - - df = DataFrame(Y=data, T=t) - # Perform linear regression - model = lm(@formula(Y~T), df) - - # Get the regression line values - trend = predict(model, df) - - # Extract the gradient of the trend line - gradient = coef(model)[2] - - return trend, gradient -end - -file_path = joinpath(pwd(), "out", "relaxation.json") -file_path_damped = joinpath(pwd(), "out", "relaxation_damped.json") - -function read_and_parse(file_path) - json_string = read(file_path, String) - json_data = JSON.parse(json_string) - - time = Vector{Float64}(json_data["ekin_fluid_1"]["time"]) - e_kin = Vector{Float64}(json_data["ekin_fluid_1"]["values"]) - p_max = Vector{Float64}(json_data["max_pressure_fluid_1"]["values"]) - avg_rho = Vector{Float64}(json_data["avg_density_fluid_1"]["values"]) - - return time, e_kin, p_max, avg_rho -end - -if file_path != "" - time, e_kin, p_max, avg_rho = read_and_parse(file_path) - time_damped, e_kin_damped, p_max_damped, avg_rho_damped = read_and_parse(file_path_damped) - - tl_ekin, grad_ekin = calculate_regression(e_kin, time) - tl_ekin_damped, grad_ekin_damped = calculate_regression(e_kin_damped, time_damped) - - tl_p_max, grad_p_max = calculate_regression(p_max, time) - tl_p_max_damped, grad_p_max_damped = calculate_regression(p_max_damped, time_damped) - - tl_avg_rho, grad_avg_rho = calculate_regression(avg_rho, time) - tl_avg_rho_damped, grad_avg_rho_damped = calculate_regression(avg_rho_damped, - time_damped) - - plot1 = Plots.plot(time, [e_kin, tl_ekin], label=["undamped" "trend"], - color=[:blue :red], linewidth=[2 2]) - - Plots.plot!(time_damped, [e_kin_damped, tl_ekin_damped], - label=["damped" "damped trend"], color=[:green :orange], linewidth=[2 2]) - - Plots.plot!(title="Kinetic Energy of the Fluid", xlabel="Time [s]", - ylabel="kinetic energy [J]") - - plot2 = Plots.plot(time, [p_max, tl_p_max], label=["sim" "trend"], color=[:blue :red], - linewidth=[2 2]) - - Plots.plot!(time_damped, [p_max_damped, tl_p_max_damped], - label=["damped" "damped trend"], - color=[:green :orange], linewidth=[2 2]) - - Plots.plot!(title="Maximum Pressure of the Fluid", xlabel="Time [s]", - ylabel="Max. Pressure [Pa]") - - plot3 = Plots.plot(time, [avg_rho, tl_avg_rho], label=["sim" "trend"], - color=[:blue :red], linewidth=[2 2]) - - Plots.plot!(time_damped, [avg_rho_damped, tl_avg_rho_damped], - label=["damped" "damped trend"], - color=[:green :orange], linewidth=[2 2]) - - Plots.plot!(title="Avg. Density of the Fluid", xlabel="Time [s]", - ylabel="Avg. Density [kg/m^3]") - - Plots.plot(plot1, plot2, plot3, layout=(2, 2), size=(1200, 1200)) -end diff --git a/validation/oscillating_beam_2d/README.md b/validation/oscillating_beam_2d/README.md deleted file mode 100644 index 008447998..000000000 --- a/validation/oscillating_beam_2d/README.md +++ /dev/null @@ -1,9 +0,0 @@ -The following files are provided here: - -1) Validation simulation: validation_oscillating_beam_2d.jl -2) Comparison with reference: compare_reference_oscillating_beam_results.jl -3) Comparison with TrixiParticles.jl and literature reference: plot_oscillating_beam_results.jl -4) TrixiParticles.jl reference files: validation_reference_[5, 9, 21, 35].j (5 is the default CI resolution, note that resolution 21 takes about 30-50 minutes while 35 takes about 4-6 hours) -5) Reference file reference_turek.csv extracted from the file csm3_l4_t0p005.point here: - https://wwwold.mathematik.tu-dortmund.de/~featflow/en/benchmarks/cfdbenchmarking/fsi_benchmark/fsi_tests/fsi_csm_tests.html - diff --git a/validation/oscillating_beam_2d/plot_oscillating_beam_results.jl b/validation/oscillating_beam_2d/plot_oscillating_beam_results.jl deleted file mode 100644 index 32c15f732..000000000 --- a/validation/oscillating_beam_2d/plot_oscillating_beam_results.jl +++ /dev/null @@ -1,79 +0,0 @@ -include("../validation_util.jl") - -# Activate for interactive plot -# using GLMakie -using CairoMakie -using CSV -using DataFrames -using JSON -using Glob -using Printf -using TrixiParticles - -elastic_plate = (length=0.35, thickness=0.02) - -# Load the reference simulation data -ref = CSV.read(joinpath(validation_dir(), "oscillating_beam_2d/reference_turek.csv"), - DataFrame) - -# Get the list of JSON files -reference_files = glob("validation_reference_*.json", - joinpath(validation_dir(), "oscillating_beam_2d")) -simulation_files = glob("validation_run_oscillating_beam_2d_*.json", "out") -merged_files = vcat(reference_files, simulation_files) -input_files = sort(merged_files, by=extract_number_from_filename) - -# Regular expressions for matching keys -key_pattern_x = r"deflection_x_solid_\d+" -key_pattern_y = r"deflection_y_solid_\d+" - -# Setup for Makie plotting -fig = Figure(size=(1200, 800)) -ax1 = Axis(fig, title="X-Axis Displacement", xlabel="Time [s]", ylabel="X Displacement") -ax2 = Axis(fig, title="Y-Axis Displacement", xlabel="Time [s]", ylabel="Y Displacement") -fig[1, 1] = ax1 -fig[2, 1] = ax2 - -for file_name in input_files - println("Loading the input file: $file_name") - json_data = JSON.parsefile(file_name) - - resolution = parse(Int, split(split(file_name, "_")[end], ".")[1]) - particle_spacing_ = elastic_plate.thickness / (resolution - 1) - - matching_keys_x = sort(collect(filter(key -> occursin(key_pattern_x, key), - keys(json_data)))) - matching_keys_y = sort(collect(filter(key -> occursin(key_pattern_y, key), - keys(json_data)))) - - if isempty(matching_keys_x) - error("No matching keys found in: $file_name") - end - - label_prefix = occursin("reference", file_name) ? "Reference" : "" - - for (matching_keys, ax) in ((matching_keys_x, ax1), (matching_keys_y, ax2)) - for key in matching_keys - data = json_data[key] - times = Float64.(data["time"]) - displacements = Float64.(data["values"]) - - mse_results = occursin(key_pattern_x, key) ? - interpolated_mse(ref.time, ref.Ux, data["time"], displacements) : - interpolated_mse(ref.time, ref.Uy, data["time"], displacements) - - label = "$label_prefix dp = $(@sprintf("%.8f", particle_spacing_)) mse=$(@sprintf("%.8f", mse_results))" - lines!(ax, times, displacements, label=label) - end - end -end - -# Plot reference data -lines!(ax1, ref.time, ref.Ux, color=:black, linestyle=:dash, - label="Turek and Hron 2006") -lines!(ax2, ref.time, ref.Uy, color=:black, linestyle=:dash, - label="Turek and Hron 2006") - -legend_ax1 = Legend(fig[1, 2], ax1) -legend_ax2 = Legend(fig[2, 2], ax2) -fig diff --git a/validation/oscillating_beam_2d/reference_turek.csv b/validation/oscillating_beam_2d/reference_turek.csv deleted file mode 100644 index c430dd375..000000000 --- a/validation/oscillating_beam_2d/reference_turek.csv +++ /dev/null @@ -1,2002 +0,0 @@ -time,Ux,Uy -0,0,0 -0.005,-1.28887291E-10,-0.0000250016078 -0.01,-5.21615594E-09,-0.000100029128 -0.015,-0.0000000503818185,-0.000225192623 -0.02,-0.000000251664243,-0.000400416792 -0.025,-0.000000822230722,-0.000623303599 -0.03,-0.0000020090807,-0.00088498406 -0.035,-0.00000405769322,-0.0011729782 -0.04,-0.00000726767088,-0.00149216761 -0.045,-0.0000118168678,-0.00188229221 -0.05,-0.0000175463851,-0.00238932119 -0.055,-0.0000245173175,-0.00302065635 -0.06,-0.0000331818263,-0.00376330894 -0.065,-0.0000440003463,-0.00462421016 -0.07,-0.0000576160284,-0.00560726522 -0.075,-0.0000747113963,-0.00669709427 -0.08,-0.0000963471539,-0.00789109466 -0.085,-0.000124562934,-0.00918913168 -0.09,-0.000161813513,-0.0105749533 -0.095,-0.000210465895,-0.0120400969 -0.1,-0.00027174696,-0.0135772202 -0.105,-0.000345775182,-0.015180168 -0.11,-0.000433950495,-0.0168689154 -0.115,-0.000538664558,-0.0186606843 -0.12,-0.000661516827,-0.0205446711 -0.125,-0.000802442461,-0.0224877616 -0.13,-0.000959433671,-0.0244489676 -0.135,-0.00113115727,-0.0264170902 -0.14,-0.00131637391,-0.0283940864 -0.145,-0.00151187142,-0.0303623681 -0.15,-0.00171606744,-0.0323120984 -0.155,-0.0019297883,-0.0342490448 -0.16,-0.00215406887,-0.0361787273 -0.165,-0.00238827949,-0.0380990331 -0.17,-0.00263097619,-0.0400171741 -0.175,-0.00288397983,-0.0419629318 -0.18,-0.00314973815,-0.0439489694 -0.185,-0.00342964253,-0.0459660972 -0.19,-0.00372444995,-0.0479997243 -0.195,-0.00403267708,-0.0500246501 -0.2,-0.00435533417,-0.0520372745 -0.205,-0.00469721466,-0.0540651512 -0.21,-0.00506131869,-0.0561293322 -0.215,-0.00544752198,-0.0582266546 -0.22,-0.00585882143,-0.0603587447 -0.225,-0.00630189785,-0.0625430309 -0.23,-0.00677826759,-0.0647824656 -0.235,-0.00728607976,-0.0670741377 -0.24,-0.00782441608,-0.0694168608 -0.245,-0.00839420954,-0.0718047341 -0.25,-0.00899759471,-0.0742219766 -0.255,-0.00962899148,-0.0766262204 -0.26,-0.0102795689,-0.0789849421 -0.265,-0.0109467511,-0.0813028938 -0.27,-0.0116295912,-0.0835920902 -0.275,-0.0123249809,-0.0858564028 -0.28,-0.0130293059,-0.0880948522 -0.285,-0.013736657,-0.0902919406 -0.29,-0.0144414263,-0.0924307367 -0.295,-0.0151434639,-0.0945205067 -0.3,-0.0158362291,-0.0965625453 -0.305,-0.0165079552,-0.0985358599 -0.31,-0.0171549094,-0.10042767 -0.315,-0.0177779374,-0.102231295 -0.32,-0.0183757173,-0.103934671 -0.325,-0.018941165,-0.105525359 -0.33,-0.0194746874,-0.107021597 -0.335,-0.01998809,-0.108463479 -0.34,-0.0204884006,-0.109869251 -0.345,-0.0209775933,-0.111236957 -0.35,-0.0214569246,-0.112560891 -0.355,-0.0219284116,-0.113841487 -0.36,-0.0223976701,-0.115090938 -0.365,-0.0228665712,-0.116316705 -0.37,-0.0233295957,-0.117508111 -0.375,-0.0237860989,-0.118652065 -0.38,-0.024238504,-0.119735487 -0.385,-0.0246889771,-0.120757939 -0.39,-0.0251397312,-0.12173839 -0.395,-0.0255843517,-0.122682532 -0.4,-0.0260224342,-0.123599168 -0.405,-0.0264623257,-0.124504293 -0.41,-0.0269000245,-0.125381563 -0.415,-0.0273205885,-0.126197108 -0.42,-0.027716068,-0.126943181 -0.425,-0.0280857935,-0.127629182 -0.43,-0.0284211493,-0.128242973 -0.435,-0.0287092152,-0.128759098 -0.44,-0.0289402617,-0.129157637 -0.445,-0.029110062,-0.129428865 -0.45,-0.0292220212,-0.129583793 -0.455,-0.029277952,-0.129644081 -0.46,-0.029274757,-0.129621174 -0.465,-0.0292134213,-0.129517783 -0.47,-0.0290984522,-0.129329917 -0.475,-0.0289336621,-0.129051994 -0.48,-0.0287189754,-0.128681634 -0.485,-0.0284485692,-0.128211613 -0.49,-0.0281273924,-0.127648254 -0.495,-0.0277669435,-0.127002666 -0.5,-0.0273703098,-0.126266069 -0.505,-0.0269378789,-0.125424957 -0.51,-0.0264759291,-0.124489259 -0.515,-0.0260019274,-0.123503042 -0.52,-0.025526797,-0.122496352 -0.525,-0.0250480455,-0.121468788 -0.53,-0.0245689331,-0.12042306 -0.535,-0.0240951259,-0.119355302 -0.54,-0.0236260302,-0.11825422 -0.545,-0.0231615897,-0.117123698 -0.55,-0.0226962834,-0.115963159 -0.555,-0.022222522,-0.114757043 -0.56,-0.0217436109,-0.113499684 -0.565,-0.0212610958,-0.112187605 -0.57,-0.0207689942,-0.110810991 -0.575,-0.0202643858,-0.109375454 -0.58,-0.019749306,-0.107903709 -0.585,-0.0192267193,-0.106412239 -0.59,-0.0186938704,-0.10489305 -0.595,-0.0181403567,-0.103311258 -0.6,-0.0175624372,-0.101646417 -0.605,-0.0169650142,-0.0999071321 -0.61,-0.0163461973,-0.0980905428 -0.615,-0.0157005463,-0.0961850648 -0.62,-0.0150281824,-0.0941866143 -0.625,-0.0143363451,-0.0920983261 -0.63,-0.0136335063,-0.08992477 -0.635,-0.0129260087,-0.0876813687 -0.64,-0.012220622,-0.0853983764 -0.645,-0.0115223518,-0.0830948386 -0.65,-0.0108378025,-0.0807844761 -0.655,-0.0101730311,-0.0784736727 -0.66,-0.00952781809,-0.0761437553 -0.665,-0.00890189607,-0.0737789811 -0.67,-0.00830091853,-0.0713972745 -0.675,-0.00773065158,-0.0690289328 -0.68,-0.00718968498,-0.0666779528 -0.685,-0.00667489423,-0.0643365521 -0.69,-0.00618908651,-0.0620174736 -0.695,-0.00573608157,-0.0597401368 -0.7,-0.00531613433,-0.0575225773 -0.705,-0.00492603195,-0.0553756421 -0.71,-0.00456144526,-0.0532968941 -0.715,-0.00422173427,-0.0512832855 -0.72,-0.00390505406,-0.0493102566 -0.725,-0.00360625053,-0.0473422678 -0.73,-0.00332243993,-0.0453695542 -0.735,-0.00305195817,-0.0433931499 -0.74,-0.00279331766,-0.0414203456 -0.745,-0.00254689959,-0.0394681278 -0.75,-0.00231016326,-0.0375256484 -0.755,-0.00208111923,-0.0355725676 -0.76,-0.0018630986,-0.0336268238 -0.765,-0.00165759939,-0.0317099789 -0.77,-0.00146333381,-0.0298189569 -0.775,-0.0012783709,-0.0279376788 -0.78,-0.00110285253,-0.0260578955 -0.785,-0.000939177167,-0.0241755458 -0.79,-0.000788451565,-0.0222777879 -0.795,-0.000651717673,-0.0203721008 -0.8,-0.000530433551,-0.0184897571 -0.805,-0.000425441674,-0.0166649579 -0.81,-0.000336355261,-0.0149227631 -0.815,-0.00026174523,-0.0132679091 -0.82,-0.000201022147,-0.0116979725 -0.825,-0.000153245817,-0.0102212345 -0.83,-0.000116985771,-0.0088552247 -0.835,-0.0000897373959,-0.00760911365 -0.84,-0.0000688703161,-0.00647007476 -0.845,-0.000052864005,-0.00541559527 -0.85,-0.000040599137,-0.00443813187 -0.855,-0.0000316138961,-0.00355367486 -0.86,-0.0000248917324,-0.00276792622 -0.865,-0.0000193403779,-0.00208284938 -0.87,-0.0000144176269,-0.0015258858 -0.875,-0.00000981593078,-0.00110368213 -0.88,-0.00000596529564,-0.000783771923 -0.885,-0.00000324843255,-0.000537173607 -0.89,-0.00000142379579,-0.00035366283 -0.895,-0.000000505167239,-0.000225164256 -0.9,-0.000000244108649,-0.00014733235 -0.905,-0.000000434604602,-0.000109370529 -0.91,-0.000000606459753,-0.0000858947664 -0.915,-0.000000512203822,-0.0000721319773 -0.92,-0.000000161201739,-0.0000869109994 -0.925,0.000000217211108,-0.000150908032 -0.93,0.000000351298227,-0.000278782598 -0.935,0.000000123162532,-0.00047366611 -0.94,-0.00000057964094,-0.000737943662 -0.945,-0.00000183264249,-0.00106803507 -0.95,-0.00000372989539,-0.00143784362 -0.955,-0.00000648872478,-0.00183772387 -0.96,-0.0000104186062,-0.00229295475 -0.965,-0.0000159721207,-0.00282804122 -0.97,-0.0000235816925,-0.0034477353 -0.975,-0.0000333925754,-0.00414556198 -0.98,-0.0000458580244,-0.00493662149 -0.985,-0.0000612586963,-0.00584566735 -0.99,-0.0000800821282,-0.00688425305 -0.995,-0.000103499319,-0.00806752006 -1,-0.000133208833,-0.00938527391 -1.005,-0.000171691439,-0.0108061071 -1.01,-0.000221475248,-0.0123172505 -1.015,-0.00028374277,-0.0139011434 -1.02,-0.000358650005,-0.0155366132 -1.025,-0.00044710128,-0.0172286879 -1.03,-0.000551988438,-0.0189984585 -1.035,-0.00067527424,-0.0208451734 -1.04,-0.000816770827,-0.0227453179 -1.045,-0.000975832712,-0.0246822389 -1.05,-0.00115130949,-0.0266575585 -1.055,-0.00134287545,-0.0286799284 -1.06,-0.00154881296,-0.0307330534 -1.065,-0.00176618627,-0.0327857823 -1.07,-0.00199373697,-0.0348194165 -1.075,-0.00223058317,-0.0368200548 -1.08,-0.00247512648,-0.0387800907 -1.085,-0.00272648366,-0.0407149655 -1.09,-0.00298535015,-0.0426475642 -1.095,-0.00325399589,-0.0445933138 -1.1,-0.00353710491,-0.0465704776 -1.105,-0.00383657078,-0.0485794556 -1.11,-0.00415048025,-0.0506016991 -1.115,-0.00447945358,-0.0526379256 -1.12,-0.00482753086,-0.0547106093 -1.125,-0.0051975918,-0.0568257145 -1.13,-0.00558840117,-0.0589575897 -1.135,-0.00600006007,-0.061090502 -1.14,-0.00643810574,-0.0632361445 -1.145,-0.00690530553,-0.0654062984 -1.15,-0.007401724,-0.0676146021 -1.155,-0.00792888206,-0.0698773612 -1.16,-0.00848813747,-0.0721969123 -1.165,-0.00908244351,-0.0745641795 -1.17,-0.00971106893,-0.0769563034 -1.175,-0.0103656872,-0.0793424667 -1.18,-0.0110401427,-0.0817091079 -1.185,-0.0117318209,-0.0840511518 -1.19,-0.0124370328,-0.0863581593 -1.195,-0.0131512555,-0.0886169723 -1.2,-0.0138644329,-0.0908009371 -1.205,-0.0145694673,-0.0928984126 -1.21,-0.0152702155,-0.0949404228 -1.215,-0.0159649949,-0.0969458208 -1.22,-0.0166439369,-0.0989010543 -1.225,-0.0173043416,-0.100800017 -1.23,-0.0179465253,-0.10263524 -1.235,-0.0185669959,-0.104388576 -1.24,-0.0191582174,-0.106044469 -1.245,-0.019715395,-0.10760532 -1.25,-0.020242454,-0.109085583 -1.255,-0.0207444538,-0.110488947 -1.26,-0.0212267396,-0.111819354 -1.265,-0.021690653,-0.113078165 -1.27,-0.0221389057,-0.114275871 -1.275,-0.0225813255,-0.11544403 -1.28,-0.023025489,-0.116607277 -1.285,-0.0234722294,-0.117767151 -1.29,-0.0239161789,-0.118899095 -1.295,-0.0243570019,-0.11998355 -1.3,-0.0247991908,-0.121022119 -1.305,-0.0252400188,-0.122015377 -1.31,-0.025671396,-0.122957103 -1.315,-0.0260895248,-0.123844295 -1.32,-0.0265001421,-0.124685728 -1.325,-0.0269053142,-0.125478493 -1.33,-0.0272947396,-0.126207223 -1.335,-0.0276643321,-0.126883626 -1.34,-0.0280159748,-0.127525997 -1.345,-0.0283430262,-0.128124221 -1.35,-0.0286379628,-0.128659453 -1.355,-0.0288893719,-0.129104088 -1.36,-0.0290821128,-0.12942702 -1.365,-0.02921571,-0.129629711 -1.37,-0.0292913863,-0.129727266 -1.375,-0.0293014544,-0.129717517 -1.38,-0.0292425471,-0.129592361 -1.385,-0.0291194518,-0.129353299 -1.39,-0.0289426121,-0.129014594 -1.395,-0.0287180225,-0.128591871 -1.4,-0.0284431539,-0.128091477 -1.405,-0.0281219076,-0.127522301 -1.41,-0.0277655519,-0.126892892 -1.415,-0.0273765117,-0.126187021 -1.42,-0.0269512775,-0.125380645 -1.425,-0.0264922711,-0.124475328 -1.43,-0.0260096787,-0.123494395 -1.435,-0.0255135838,-0.122457483 -1.44,-0.0250078867,-0.121371403 -1.445,-0.0244960893,-0.120240672 -1.45,-0.0239840264,-0.119069368 -1.455,-0.0234778329,-0.117869959 -1.46,-0.0229843114,-0.116670873 -1.465,-0.022500456,-0.115478563 -1.47,-0.0220161188,-0.114268218 -1.475,-0.0215319467,-0.113025306 -1.48,-0.0210499729,-0.111739498 -1.485,-0.0205622774,-0.110389398 -1.49,-0.0200601499,-0.108966187 -1.495,-0.0195432088,-0.107484208 -1.5,-0.0190145276,-0.105957182 -1.505,-0.0184731473,-0.104380345 -1.51,-0.0179149671,-0.102740093 -1.515,-0.017337584,-0.101032143 -1.52,-0.0167455872,-0.0992736162 -1.525,-0.0161412934,-0.0974755814 -1.53,-0.0155186752,-0.0956244587 -1.535,-0.0148742672,-0.0937014151 -1.54,-0.0142088873,-0.0916856047 -1.545,-0.0135261607,-0.0895651916 -1.55,-0.0128347112,-0.0873578407 -1.555,-0.0121389451,-0.0850842377 -1.56,-0.0114402059,-0.0827514947 -1.565,-0.0107495506,-0.0803863262 -1.57,-0.0100770073,-0.0780116975 -1.575,-0.00942537098,-0.0756250645 -1.58,-0.00879673499,-0.0732295386 -1.585,-0.00819460847,-0.0708464813 -1.59,-0.00762476439,-0.0685025639 -1.595,-0.0070855781,-0.0661881014 -1.6,-0.00657270204,-0.0638786444 -1.605,-0.00608723897,-0.0615704652 -1.61,-0.00563109181,-0.0592692046 -1.615,-0.00520609461,-0.0569997318 -1.62,-0.00481074542,-0.0547862276 -1.625,-0.00444101564,-0.0526350388 -1.63,-0.00409624632,-0.0505487753 -1.635,-0.00377681478,-0.0485228905 -1.64,-0.00348069398,-0.0465467682 -1.645,-0.00320422179,-0.044608871 -1.65,-0.00294347338,-0.0426961832 -1.655,-0.00269597,-0.0408023752 -1.66,-0.00246125646,-0.0389237916 -1.665,-0.00223598473,-0.0370336316 -1.67,-0.00201658944,-0.0351020658 -1.675,-0.00180563094,-0.033149657 -1.68,-0.00160595008,-0.0312145304 -1.685,-0.0014168891,-0.0293054713 -1.69,-0.00123746842,-0.0274239451 -1.695,-0.00106831727,-0.0255690854 -1.7,-0.000910976374,-0.0237308121 -1.705,-0.000766974183,-0.0219037466 -1.71,-0.000636792486,-0.0200913306 -1.715,-0.000520351322,-0.0182977247 -1.72,-0.000417699392,-0.016531219 -1.725,-0.000329317254,-0.01480703 -1.73,-0.000254883477,-0.0131326602 -1.735,-0.000194160316,-0.0115130841 -1.74,-0.000146729608,-0.00996966335 -1.745,-0.000111032456,-0.00854208242 -1.75,-0.00008472747,-0.00726202602 -1.755,-0.0000648408699,-0.00611926029 -1.76,-0.0000496835446,-0.00508473513 -1.765,-0.0000382816125,-0.0041479824 -1.77,-0.0000301061921,-0.00330899498 -1.775,-0.0000242714823,-0.00256309101 -1.78,-0.0000197237416,-0.00190452466 -1.785,-0.0000157926222,-0.00134153913 -1.79,-0.0000120292649,-0.000881250933 -1.795,-0.0000086197677,-0.00050887824 -1.8,-0.00000572010239,-0.000221700293 -1.805,-0.00000328140057,-0.0000259957913 -1.81,-0.00000161853118,0.0000831984082 -1.815,-0.00000055668034,0.00010112149 -1.82,-0.000000251221128,0.0000431389594 -1.825,-0.000000573758751,-0.0000401054478 -1.83,-0.000000796483415,-0.000122459739 -1.835,-0.000000867230616,-0.000214541352 -1.84,-0.000000595938778,-0.000330448817 -1.845,-0.000000245110193,-0.000481055979 -1.85,-0.000000109315231,-0.000671101435 -1.855,-0.000000372623389,-0.000914398064 -1.86,-0.00000150009253,-0.00122442825 -1.865,-0.00000365791689,-0.00159719918 -1.87,-0.00000685069944,-0.00203505337 -1.875,-0.0000111444065,-0.0025531177 -1.88,-0.0000168021554,-0.00316134574 -1.885,-0.000024523929,-0.00384598752 -1.89,-0.0000347622817,-0.00459021375 -1.895,-0.000047825416,-0.00539274248 -1.9,-0.0000641884131,-0.00626728206 -1.905,-0.0000844908396,-0.00724931988 -1.91,-0.000109711586,-0.00836830577 -1.915,-0.000141230787,-0.00961983891 -1.92,-0.000181244574,-0.0109893189 -1.925,-0.000231906851,-0.0124775363 -1.93,-0.00029495322,-0.0140782739 -1.935,-0.000371046094,-0.0157652296 -1.94,-0.000461108603,-0.0175236632 -1.945,-0.000568188889,-0.0193547907 -1.95,-0.000693937429,-0.021239183 -1.955,-0.000837762167,-0.0231466117 -1.96,-0.000998737126,-0.0250692257 -1.965,-0.00117555352,-0.0270150499 -1.97,-0.00136877519,-0.0290059281 -1.975,-0.00157923073,-0.0310510125 -1.98,-0.00180484548,-0.0331283493 -1.985,-0.00204362949,-0.0352135494 -1.99,-0.00229354525,-0.0372865663 -1.995,-0.00255267116,-0.0393375106 -2,-0.00281952486,-0.0413695993 -2.005,-0.00309214849,-0.0433790592 -2.01,-0.00337065437,-0.0453603366 -2.015,-0.00365976723,-0.0473309928 -2.02,-0.00396246511,-0.0493027082 -2.025,-0.00427700097,-0.0512680904 -2.03,-0.0046056069,-0.0532507482 -2.035,-0.00495370541,-0.0552890076 -2.04,-0.00532476325,-0.0573913664 -2.045,-0.00571936777,-0.0595383228 -2.05,-0.00613614621,-0.0617033778 -2.055,-0.00657692724,-0.0638792463 -2.06,-0.00704373701,-0.0660661962 -2.065,-0.00753735792,-0.068272316 -2.07,-0.0080591841,-0.0705080901 -2.075,-0.00860828268,-0.0727652065 -2.08,-0.00918848761,-0.0750433488 -2.085,-0.00980292409,-0.0773467128 -2.09,-0.0104474685,-0.0796693111 -2.095,-0.0111167881,-0.0820058701 -2.1,-0.0118080397,-0.0843519376 -2.105,-0.0125208694,-0.0866981762 -2.11,-0.0132492903,-0.0890152088 -2.115,-0.0139800412,-0.0912573553 -2.12,-0.0147026128,-0.0934023877 -2.125,-0.0154158523,-0.0954676835 -2.13,-0.0161189272,-0.0974698136 -2.135,-0.0168037854,-0.0994004757 -2.14,-0.0174663695,-0.101257469 -2.145,-0.0181099261,-0.103046972 -2.15,-0.0187328722,-0.104764725 -2.155,-0.0193333867,-0.106417079 -2.16,-0.0199093915,-0.108013999 -2.165,-0.0204555084,-0.10954507 -2.17,-0.0209746011,-0.111000705 -2.175,-0.021471634,-0.112375982 -2.18,-0.0219426133,-0.1136561 -2.185,-0.0223865361,-0.114842728 -2.19,-0.0228116056,-0.115964912 -2.195,-0.0232289942,-0.117055921 -2.2,-0.023645659,-0.118128994 -2.205,-0.0240581069,-0.119169983 -2.21,-0.0244685118,-0.12017645 -2.215,-0.0248852242,-0.121165315 -2.22,-0.0253076011,-0.122142061 -2.225,-0.025728583,-0.123096181 -2.23,-0.0261410815,-0.124008886 -2.235,-0.0265438055,-0.124865248 -2.24,-0.0269360397,-0.125649478 -2.245,-0.0273106075,-0.126352238 -2.25,-0.0276615101,-0.126985609 -2.255,-0.0279876801,-0.127563506 -2.26,-0.0282876659,-0.128087836 -2.265,-0.0285618443,-0.128558294 -2.27,-0.028803953,-0.128961583 -2.275,-0.0289984904,-0.129272786 -2.28,-0.0291436092,-0.129496426 -2.285,-0.029241958,-0.129646782 -2.29,-0.0292817963,-0.129703025 -2.295,-0.0292510813,-0.129633628 -2.3,-0.0291490378,-0.129428047 -2.305,-0.028981877,-0.129092827 -2.31,-0.0287561207,-0.128645715 -2.315,-0.0284735046,-0.128103418 -2.32,-0.028138495,-0.127479654 -2.325,-0.0277639097,-0.126788602 -2.33,-0.0273589491,-0.126029971 -2.335,-0.0269255606,-0.125198637 -2.34,-0.0264650821,-0.124300164 -2.345,-0.0259822478,-0.123345347 -2.35,-0.0254825558,-0.122337147 -2.355,-0.0249714662,-0.121272054 -2.36,-0.0244502063,-0.120140461 -2.365,-0.0239167872,-0.118929326 -2.37,-0.0233807447,-0.117660786 -2.375,-0.0228538982,-0.116377802 -2.38,-0.0223355537,-0.11509243 -2.385,-0.0218210578,-0.113795612 -2.39,-0.0213117821,-0.112482844 -2.395,-0.0208129892,-0.11115616 -2.4,-0.0203205801,-0.109804946 -2.405,-0.0198234763,-0.108413989 -2.41,-0.0193172296,-0.10698253 -2.415,-0.0187992124,-0.105497596 -2.42,-0.0182658672,-0.103938326 -2.425,-0.0177152387,-0.102295075 -2.43,-0.0171424659,-0.100563004 -2.435,-0.0165497786,-0.0987607245 -2.44,-0.0159445042,-0.0969165565 -2.445,-0.0153258725,-0.0950343267 -2.45,-0.0146923109,-0.0931034724 -2.455,-0.0140427718,-0.0911031048 -2.46,-0.0133796408,-0.0890256545 -2.465,-0.0127113547,-0.0868890725 -2.47,-0.0120382173,-0.0846939076 -2.475,-0.011356941,-0.0824245064 -2.48,-0.0106750742,-0.080086885 -2.485,-0.0100037848,-0.0776990711 -2.49,-0.0093480221,-0.075265308 -2.495,-0.00871177839,-0.0728041847 -2.5,-0.00810137992,-0.0703568016 -2.505,-0.00752195706,-0.0679521268 -2.51,-0.0069756394,-0.0655968321 -2.515,-0.00646100396,-0.0632798728 -2.52,-0.00597648461,-0.0609867651 -2.525,-0.00552189129,-0.0587128029 -2.53,-0.00509844259,-0.0564722439 -2.535,-0.00470457035,-0.0542781147 -2.54,-0.00433553346,-0.0521203648 -2.545,-0.00398889378,-0.0499886972 -2.55,-0.00366583608,-0.047890555 -2.555,-0.00336765453,-0.0458430093 -2.56,-0.00309114952,-0.043852337 -2.565,-0.00283259654,-0.0419172391 -2.57,-0.00259044058,-0.0400394671 -2.575,-0.00236368839,-0.038209025 -2.58,-0.00214973637,-0.0363915242 -2.585,-0.00194406707,-0.0345488575 -2.59,-0.0017461339,-0.0326801817 -2.595,-0.00155740454,-0.0308057787 -2.6,-0.00137678033,-0.0289289783 -2.605,-0.00120376237,-0.0270527764 -2.61,-0.0010391007,-0.0251813547 -2.615,-0.00088495013,-0.0233139869 -2.62,-0.000744134681,-0.0214716998 -2.625,-0.00061821753,-0.0196831374 -2.63,-0.000505970987,-0.0179448519 -2.635,-0.000406369633,-0.0162484008 -2.64,-0.000320092127,-0.0145996892 -2.645,-0.000247085079,-0.0129886325 -2.65,-0.000187458728,-0.0114087839 -2.655,-0.000140680376,-0.00987260664 -2.66,-0.000105422585,-0.00841577817 -2.665,-0.0000799652837,-0.00707964777 -2.67,-0.0000613410061,-0.00586611741 -2.675,-0.000047564248,-0.00476711585 -2.68,-0.0000378509758,-0.00378803176 -2.685,-0.0000308468888,-0.00293780319 -2.69,-0.0000257510678,-0.00221976298 -2.695,-0.0000213680195,-0.0016212106 -2.7,-0.0000174264602,-0.00112413744 -2.705,-0.0000139336696,-0.000706853735 -2.71,-0.0000107714925,-0.000353203133 -2.715,-0.00000800369272,-0.0000670062401 -2.72,-0.00000536875955,0.000148158293 -2.725,-0.00000315904515,0.000286907802 -2.73,-0.0000014766961,0.000327071709 -2.735,-0.000000393592703,0.00026970861 -2.74,-0.000000230918462,0.000153499908 -2.745,-0.000000505854682,0.00000502261106 -2.75,-0.000000742288795,-0.000182693638 -2.755,-0.000000878399312,-0.000412041819 -2.76,-0.000000913356285,-0.000668388915 -2.765,-0.00000111532392,-0.000941998006 -2.77,-0.00000149748097,-0.0012269685 -2.775,-0.00000240452132,-0.00153276529 -2.78,-0.00000430150063,-0.0018822145 -2.785,-0.00000732689792,-0.00229464764 -2.79,-0.000011893618,-0.00279480343 -2.795,-0.000018167177,-0.00339880521 -2.8,-0.0000267268,-0.00410157667 -2.805,-0.0000380775517,-0.00489129749 -2.81,-0.0000521007671,-0.00575125672 -2.815,-0.000069265027,-0.0066763093 -2.82,-0.0000903089856,-0.00769295259 -2.825,-0.000116781707,-0.00881946192 -2.83,-0.000149880633,-0.0100387361 -2.835,-0.000191146773,-0.0113434834 -2.84,-0.000242665449,-0.0127532906 -2.845,-0.000305852951,-0.0142830299 -2.85,-0.000382168748,-0.0159319069 -2.855,-0.000473321032,-0.0176943512 -2.86,-0.000581747248,-0.0195599457 -2.865,-0.000709991939,-0.0214991597 -2.87,-0.000857607835,-0.0234746235 -2.875,-0.0010234756,-0.0254663894 -2.88,-0.00120526219,-0.0274642409 -2.885,-0.00140256754,-0.0294748196 -2.89,-0.00161740419,-0.0315158162 -2.895,-0.00184801985,-0.0335753302 -2.9,-0.00209204315,-0.0356344043 -2.905,-0.00234837491,-0.0376926182 -2.91,-0.00261660027,-0.0397608805 -2.915,-0.00289629128,-0.0418495703 -2.92,-0.00318463706,-0.0439422199 -2.925,-0.00347948117,-0.0460135263 -2.93,-0.00378298364,-0.0480607149 -2.935,-0.00409670418,-0.0500804588 -2.94,-0.00441871359,-0.0520630693 -2.945,-0.00475019374,-0.0540305785 -2.95,-0.0050969638,-0.0560219781 -2.955,-0.00546382835,-0.0580551733 -2.96,-0.00585386172,-0.0601313255 -2.965,-0.00626848795,-0.0622473375 -2.97,-0.00670718679,-0.0643964291 -2.975,-0.00717194645,-0.0665819483 -2.98,-0.00766677971,-0.0688180526 -2.985,-0.00819060806,-0.0710911781 -2.99,-0.00874029683,-0.0733689126 -2.995,-0.00931672636,-0.0756370323 -3,-0.00992254642,-0.077899093 -3.005,-0.0105565408,-0.0801629873 -3.01,-0.0112136762,-0.0824303973 -3.015,-0.0118925673,-0.0847075219 -3.02,-0.0125967198,-0.0870016348 -3.025,-0.0133226267,-0.089291523 -3.03,-0.01405999,-0.0915428196 -3.035,-0.0147985114,-0.0937358128 -3.04,-0.0155314596,-0.0958679407 -3.045,-0.0162564161,-0.0979391901 -3.05,-0.0169644879,-0.0999274313 -3.055,-0.0176467145,-0.10181436 -3.06,-0.0183008717,-0.103595594 -3.065,-0.0189253805,-0.105274077 -3.07,-0.0195245916,-0.106880465 -3.075,-0.0201003337,-0.108437651 -3.08,-0.0206470464,-0.109937775 -3.085,-0.0211685861,-0.11137796 -3.09,-0.0216729701,-0.112762374 -3.095,-0.0221559521,-0.114075678 -3.1,-0.0226110061,-0.115305512 -3.105,-0.0230420525,-0.116467149 -3.11,-0.0234562702,-0.117573576 -3.115,-0.0238589468,-0.118623344 -3.12,-0.0242494303,-0.119607764 -3.125,-0.0246285689,-0.120529685 -3.13,-0.0250066819,-0.121419736 -3.135,-0.0253900689,-0.122302641 -3.14,-0.0257780639,-0.1231845 -3.145,-0.0261666606,-0.12405486 -3.15,-0.0265518392,-0.124891395 -3.155,-0.0269320557,-0.125677367 -3.16,-0.0273029929,-0.126405226 -3.165,-0.0276558019,-0.12707231 -3.17,-0.0279791805,-0.127665645 -3.175,-0.0282699071,-0.128176257 -3.18,-0.0285307905,-0.128607381 -3.185,-0.0287557279,-0.128950591 -3.19,-0.0289339074,-0.129197279 -3.195,-0.0290655638,-0.129367563 -3.2,-0.0291573164,-0.129485163 -3.205,-0.0292031745,-0.129537013 -3.21,-0.0291907061,-0.129491981 -3.215,-0.0291147132,-0.129333327 -3.22,-0.0289756461,-0.129056526 -3.225,-0.028773788,-0.12866361 -3.23,-0.0285109131,-0.128163401 -3.235,-0.0281863572,-0.127554188 -3.24,-0.0278047813,-0.126832137 -3.245,-0.0273822269,-0.126011885 -3.25,-0.0269268784,-0.125108594 -3.255,-0.0264441661,-0.124143333 -3.26,-0.025940829,-0.123136006 -3.265,-0.0254224356,-0.122092676 -3.27,-0.0248998006,-0.121019121 -3.275,-0.0243733128,-0.11989883 -3.28,-0.0238348065,-0.118706114 -3.285,-0.0232905221,-0.11745352 -3.29,-0.0227498117,-0.116168726 -3.295,-0.0222115732,-0.114852182 -3.3,-0.021672809,-0.11349344 -3.305,-0.0211354126,-0.112095219 -3.31,-0.0206061567,-0.11067061 -3.315,-0.0200872695,-0.109232262 -3.32,-0.0195743683,-0.107789693 -3.325,-0.019062439,-0.106342302 -3.33,-0.0185459853,-0.104867956 -3.335,-0.0180226908,-0.103343686 -3.34,-0.0174899515,-0.10175365 -3.345,-0.0169386781,-0.100079079 -3.35,-0.0163639864,-0.0983168932 -3.355,-0.0157696989,-0.0964833923 -3.36,-0.0151588438,-0.0945877168 -3.365,-0.0145300276,-0.0926202265 -3.37,-0.0138831818,-0.0905724434 -3.375,-0.0132249624,-0.0884598616 -3.38,-0.0125646477,-0.0863125609 -3.385,-0.0119048132,-0.0841398827 -3.39,-0.011241239,-0.0819228263 -3.395,-0.0105764957,-0.0796495964 -3.4,-0.00991894649,-0.077320708 -3.405,-0.0092726754,-0.0749292873 -3.41,-0.00864146279,-0.0724890468 -3.415,-0.00803042031,-0.0700307751 -3.42,-0.00744347443,-0.0675734886 -3.425,-0.00688599303,-0.0651370044 -3.43,-0.00636188948,-0.0627382994 -3.435,-0.00587010513,-0.0603766108 -3.44,-0.00540999442,-0.0580570761 -3.445,-0.00498410142,-0.0558081791 -3.45,-0.00459104055,-0.0536377494 -3.455,-0.00422539419,-0.0515190069 -3.46,-0.00388327074,-0.0494226331 -3.465,-0.00356350902,-0.047339144 -3.47,-0.00326769612,-0.0452832225 -3.475,-0.00299309908,-0.0432637832 -3.48,-0.0027353379,-0.041284215 -3.485,-0.00249398922,-0.0393579654 -3.49,-0.00226883527,-0.0374841428 -3.495,-0.002058912,-0.0356487099 -3.5,-0.0018619063,-0.0338357184 -3.505,-0.00167507256,-0.0320358331 -3.51,-0.0014979182,-0.0302525133 -3.515,-0.00132906302,-0.028475701 -3.52,-0.00116724118,-0.0266913023 -3.525,-0.00101220757,-0.0248829287 -3.53,-0.00086446175,-0.0230370003 -3.535,-0.000727750075,-0.0211877897 -3.54,-0.000604451852,-0.01937959 -3.545,-0.000493743489,-0.0176199958 -3.55,-0.000395020233,-0.015911683 -3.555,-0.000309462015,-0.0142683303 -3.56,-0.000237754438,-0.012689607 -3.565,-0.000179605223,-0.0111648914 -3.57,-0.000134105797,-0.00969848416 -3.575,-0.0000995170922,-0.00830443471 -3.58,-0.0000742502086,-0.00699571069 -3.585,-0.0000563063674,-0.00577458961 -3.59,-0.000043736215,-0.00463550388 -3.595,-0.0000358190039,-0.00358857121 -3.6,-0.0000312512998,-0.00266238375 -3.605,-0.0000282011848,-0.00188299394 -3.61,-0.0000253820805,-0.00125875978 -3.615,-0.0000218246149,-0.000771286581 -3.62,-0.0000180849921,-0.000386066393 -3.625,-0.0000141682608,-0.0000886134012 -3.63,-0.0000104204289,0.000125525515 -3.635,-0.00000720242474,0.000276152303 -3.64,-0.00000466848492,0.000370545008 -3.645,-0.00000289525909,0.000396588633 -3.65,-0.00000153597755,0.000354002536 -3.655,-0.000000703539496,0.00026210834 -3.66,-0.000000111447119,0.000127424058 -3.665,0.00000014773473,-0.0000708820728 -3.67,0.0000000933551034,-0.000342790015 -3.675,-0.000000493359947,-0.000677632993 -3.68,-0.00000168586205,-0.0010559188 -3.685,-0.00000307172995,-0.00144761542 -3.69,-0.00000450693649,-0.00184009469 -3.695,-0.00000635648708,-0.00225246457 -3.7,-0.00000902468638,-0.00270213083 -3.705,-0.000013234915,-0.0032006175 -3.71,-0.0000196766425,-0.00376855142 -3.715,-0.0000289216704,-0.00442198523 -3.72,-0.0000415125065,-0.00516974303 -3.725,-0.0000571169199,-0.00601282283 -3.73,-0.0000757403124,-0.00695083891 -3.735,-0.0000980205712,-0.0080065107 -3.74,-0.000125670776,-0.00918527764 -3.745,-0.0001603988,-0.0104500782 -3.75,-0.000203388164,-0.0117802254 -3.755,-0.000256033354,-0.0131828355 -3.76,-0.000319731255,-0.0146715971 -3.765,-0.000395987147,-0.0162630822 -3.77,-0.00048695228,-0.0179675115 -3.775,-0.000595093078,-0.0197791687 -3.78,-0.000722920486,-0.0216806945 -3.785,-0.000872049656,-0.0236596527 -3.79,-0.00104161799,-0.0256999126 -3.795,-0.00122921198,-0.0277749516 -3.8,-0.00143395433,-0.0298735746 -3.805,-0.00165714082,-0.031992935 -3.81,-0.00189687386,-0.0341080355 -3.815,-0.00214919392,-0.0361904395 -3.82,-0.00241188405,-0.0382400309 -3.825,-0.00268572905,-0.0402862711 -3.83,-0.00297178297,-0.0423541956 -3.835,-0.00326826833,-0.0444399032 -3.84,-0.00357453647,-0.046531823 -3.845,-0.00389037049,-0.0486191147 -3.85,-0.00421696719,-0.0506961583 -3.855,-0.00455336661,-0.0527544718 -3.86,-0.0048976182,-0.0547936151 -3.865,-0.0052531132,-0.0568295247 -3.87,-0.00562275503,-0.0588612087 -3.875,-0.00601076977,-0.0608960704 -3.88,-0.00642054566,-0.0629460732 -3.885,-0.00685062645,-0.065010648 -3.89,-0.00730517868,-0.0671157557 -3.895,-0.00779204593,-0.0692969579 -3.9,-0.00831149776,-0.0715462258 -3.905,-0.00885991396,-0.0738258639 -3.91,-0.00943662516,-0.0761143531 -3.915,-0.0100422873,-0.0784038842 -3.92,-0.0106754321,-0.0806894878 -3.925,-0.0113312969,-0.0829640329 -3.93,-0.012006012,-0.0852219072 -3.935,-0.0127011975,-0.0874642265 -3.94,-0.0134159865,-0.0896831681 -3.945,-0.0141444798,-0.0918688082 -3.95,-0.0148797393,-0.094021269 -3.955,-0.015615749,-0.0961437385 -3.96,-0.01635043,-0.0982345746 -3.965,-0.0170791363,-0.100276088 -3.97,-0.0177902028,-0.102235214 -3.975,-0.0184723391,-0.104082307 -3.98,-0.0191201584,-0.105811247 -3.985,-0.0197363742,-0.10744594 -3.99,-0.0203215058,-0.109002096 -3.995,-0.0208693074,-0.110469147 -4,-0.0213840901,-0.111852276 -4.005,-0.0218777791,-0.113172811 -4.01,-0.0223519401,-0.114435172 -4.015,-0.0228032294,-0.115642766 -4.02,-0.0232344171,-0.116811204 -4.025,-0.0236498984,-0.117941227 -4.03,-0.0240520998,-0.119016644 -4.035,-0.024441089,-0.120022167 -4.04,-0.0248138519,-0.120950329 -4.045,-0.0251722738,-0.121812467 -4.05,-0.0255257426,-0.122636473 -4.055,-0.0258787405,-0.123438291 -4.06,-0.0262287767,-0.124213048 -4.065,-0.0265752135,-0.124952025 -4.07,-0.0269194557,-0.125655543 -4.075,-0.0272646993,-0.126337449 -4.08,-0.0276062531,-0.127000393 -4.085,-0.0279272254,-0.127615316 -4.09,-0.0282213667,-0.128160279 -4.095,-0.0284888888,-0.128625151 -4.1,-0.0287185733,-0.128985995 -4.105,-0.028899813,-0.129234549 -4.11,-0.0290290304,-0.129386265 -4.115,-0.0291098163,-0.129459278 -4.12,-0.0291433917,-0.129453347 -4.125,-0.0291228783,-0.129354507 -4.13,-0.0290465074,-0.129161351 -4.135,-0.0289132003,-0.12887459 -4.14,-0.0287251063,-0.12850255 -4.145,-0.0284861258,-0.128054712 -4.15,-0.0281889112,-0.127507998 -4.155,-0.0278288731,-0.126835862 -4.16,-0.0274162791,-0.126039928 -4.165,-0.0269611468,-0.125136456 -4.17,-0.0264681988,-0.124143439 -4.175,-0.0259430583,-0.123077905 -4.18,-0.0253960681,-0.121957286 -4.185,-0.024842305,-0.120798487 -4.19,-0.024288348,-0.119603733 -4.195,-0.0237304609,-0.118366027 -4.2,-0.023171574,-0.117099496 -4.205,-0.0226195279,-0.115823774 -4.21,-0.0220728774,-0.114525987 -4.215,-0.0215273946,-0.113182336 -4.22,-0.0209820568,-0.111782887 -4.225,-0.0204376052,-0.110325331 -4.23,-0.0198976129,-0.10882808 -4.235,-0.0193645909,-0.10731829 -4.24,-0.0188328999,-0.105796477 -4.245,-0.0182981731,-0.104247814 -4.25,-0.0177642642,-0.102670355 -4.255,-0.0172319275,-0.101064781 -4.26,-0.0166933228,-0.0994169592 -4.265,-0.0161393752,-0.0977133404 -4.27,-0.0155681431,-0.0959509151 -4.275,-0.0149803731,-0.0941193663 -4.28,-0.0143726934,-0.0921949058 -4.285,-0.0137417723,-0.0901619129 -4.29,-0.013093666,-0.088038459 -4.295,-0.0124377559,-0.0858592446 -4.3,-0.0117792988,-0.0836447891 -4.305,-0.0111199045,-0.0813977926 -4.31,-0.0104610932,-0.0791108564 -4.315,-0.00981010977,-0.0767853233 -4.32,-0.00917332445,-0.0744273415 -4.325,-0.00855341628,-0.0720459231 -4.33,-0.0079526193,-0.06965128 -4.335,-0.00737046165,-0.0672332379 -4.34,-0.00681178967,-0.0647970711 -4.345,-0.00628382379,-0.0623653579 -4.35,-0.0057853057,-0.0599388337 -4.355,-0.00531653923,-0.0575368496 -4.36,-0.00488196792,-0.0552068747 -4.365,-0.00448196508,-0.0529704988 -4.37,-0.00411298207,-0.0508130296 -4.375,-0.00377150829,-0.0487113907 -4.38,-0.00345512793,-0.0466524176 -4.385,-0.00316373084,-0.0446375204 -4.39,-0.00289492171,-0.04266649 -4.395,-0.00264375662,-0.0407290068 -4.4,-0.00240787342,-0.0388153458 -4.405,-0.00218633885,-0.036917807 -4.41,-0.00197944973,-0.0350387994 -4.415,-0.00178625674,-0.0331869586 -4.42,-0.00160444189,-0.0313702839 -4.425,-0.00143304697,-0.0295940694 -4.43,-0.00127141688,-0.0278581158 -4.435,-0.00111950624,-0.0261514792 -4.44,-0.000975515293,-0.0244367915 -4.445,-0.000838391717,-0.0226886654 -4.45,-0.000710422532,-0.0209266941 -4.455,-0.000592938824,-0.0191772372 -4.46,-0.000485602328,-0.0174440392 -4.465,-0.000388025339,-0.0157268006 -4.47,-0.000302371847,-0.0140460719 -4.475,-0.000230683848,-0.0124218671 -4.48,-0.000173137338,-0.0108676833 -4.485,-0.000128530202,-0.00940790936 -4.49,-0.0000944792267,-0.00804953093 -4.495,-0.0000690522288,-0.00678664703 -4.5,-0.0000507544412,-0.00561665165 -4.505,-0.000038582988,-0.004522802 -4.51,-0.0000317223325,-0.0034960337 -4.515,-0.0000289837927,-0.00255623142 -4.52,-0.0000282651678,-0.00173582782 -4.525,-0.0000277107947,-0.00105274622 -4.53,-0.0000258882805,-0.000499814391 -4.535,-0.0000230712384,-0.0000584190838 -4.54,-0.0000194060816,0.000266763132 -4.545,-0.0000150918763,0.000464500579 -4.55,-0.0000110441934,0.000557452506 -4.555,-0.00000751828264,0.000566981757 -4.56,-0.0000049261882,0.00050469212 -4.565,-0.00000301338673,0.000395596076 -4.57,-0.00000151820108,0.000260850214 -4.575,-0.000000322509908,0.000101827903 -4.58,0.00000059020451,-0.0000969816739 -4.585,0.000000798347415,-0.00035567596 -4.59,0.0000000493169074,-0.000685129476 -4.595,-0.00000147805531,-0.00107994784 -4.6,-0.00000366677826,-0.00151357051 -4.605,-0.0000058465042,-0.00197252105 -4.61,-0.00000830115863,-0.00247737831 -4.615,-0.0000115672131,-0.00303117843 -4.62,-0.0000162920148,-0.00361952015 -4.625,-0.0000232616575,-0.00423969241 -4.63,-0.0000329975803,-0.00490043258 -4.635,-0.000045941114,-0.00561845716 -4.64,-0.0000620619089,-0.00640847064 -4.645,-0.0000815659614,-0.00729379773 -4.65,-0.000105259569,-0.00830563896 -4.655,-0.000134719447,-0.00945652815 -4.66,-0.000171768354,-0.0107253236 -4.665,-0.000217100066,-0.012085938 -4.67,-0.000271429726,-0.0135316201 -4.675,-0.000336091611,-0.0150612449 -4.68,-0.00041299797,-0.0166802141 -4.685,-0.000505029091,-0.0183920775 -4.69,-0.000613622592,-0.0201743899 -4.695,-0.000740874417,-0.0220142069 -4.7,-0.000889209496,-0.0239314897 -4.705,-0.00105841315,-0.0259290629 -4.71,-0.00124733059,-0.0279936167 -4.715,-0.00145615414,-0.0301215739 -4.72,-0.00168597739,-0.0322997427 -4.725,-0.00193579321,-0.0344957311 -4.73,-0.00220086965,-0.0366680602 -4.735,-0.00247678618,-0.0387996534 -4.74,-0.00276247521,-0.0409047169 -4.745,-0.00305794064,-0.0429970521 -4.75,-0.00336270313,-0.0450795341 -4.755,-0.00367587788,-0.0471479508 -4.76,-0.0039974206,-0.0492005426 -4.765,-0.00432953984,-0.0512498407 -4.77,-0.00467424342,-0.053312951 -4.775,-0.00503045021,-0.0553946149 -4.78,-0.00539779108,-0.0574875577 -4.785,-0.00577765692,-0.0595761867 -4.79,-0.00617338685,-0.0616550645 -4.795,-0.00658729576,-0.0637240036 -4.8,-0.00701664629,-0.065774815 -4.805,-0.00746473372,-0.0678316582 -4.81,-0.00794088632,-0.0699382994 -4.815,-0.00844800493,-0.0720989378 -4.82,-0.00898430575,-0.0742938059 -4.825,-0.00955068017,-0.076519576 -4.83,-0.0101482409,-0.0787780715 -4.835,-0.010776794,-0.081065867 -4.84,-0.011434438,-0.0833758779 -4.845,-0.0121152749,-0.0856810904 -4.85,-0.0128142393,-0.0879521534 -4.855,-0.013529478,-0.0901733726 -4.86,-0.014256647,-0.0923402355 -4.865,-0.0149881671,-0.0944575722 -4.87,-0.0157185001,-0.09653115 -4.875,-0.0164474811,-0.0985699792 -4.88,-0.017175532,-0.100573839 -4.885,-0.0178957116,-0.102523562 -4.89,-0.018594586,-0.104391085 -4.895,-0.0192647932,-0.106169732 -4.9,-0.0199086893,-0.107876839 -4.905,-0.0205210687,-0.109503569 -4.91,-0.0210932324,-0.111022846 -4.915,-0.0216241003,-0.112427493 -4.92,-0.022118993,-0.113726878 -4.925,-0.0225846531,-0.114940129 -4.93,-0.0230222706,-0.11608796 -4.935,-0.0234364659,-0.117193994 -4.94,-0.0238339554,-0.118265738 -4.945,-0.0242189483,-0.119294552 -4.95,-0.0245981564,-0.120283579 -4.955,-0.0249673665,-0.121223771 -4.96,-0.0253200942,-0.122107564 -4.965,-0.0256641851,-0.122950814 -4.97,-0.0260033724,-0.123754648 -4.975,-0.0263333283,-0.124501232 -4.98,-0.0266512326,-0.125178608 -4.985,-0.0269591198,-0.125796931 -4.99,-0.0272649495,-0.126386921 -4.995,-0.0275700025,-0.126965061 -5,-0.0278626237,-0.127515455 -5.005,-0.028137734,-0.128022491 -5.01,-0.0283960205,-0.128476871 -5.015,-0.0286285502,-0.128858279 -5.02,-0.028824016,-0.129153748 -5.025,-0.0289729188,-0.129361494 -5.03,-0.0290687001,-0.129471586 -5.035,-0.0291088721,-0.129470281 -5.04,-0.0290916579,-0.129353683 -5.045,-0.0290127016,-0.129121232 -5.05,-0.0288702805,-0.128780492 -5.055,-0.0286738205,-0.12835971 -5.06,-0.0284320131,-0.127879314 -5.065,-0.0281407158,-0.127323082 -5.07,-0.0277935426,-0.126664318 -5.075,-0.0273958998,-0.125901904 -5.08,-0.0269568087,-0.125047825 -5.085,-0.0264775073,-0.124103955 -5.09,-0.0259581051,-0.123068558 -5.095,-0.0254056145,-0.1219442 -5.1,-0.0248327836,-0.120739088 -5.105,-0.0242498593,-0.119465724 -5.11,-0.0236611523,-0.118140991 -5.115,-0.0230706563,-0.116790759 -5.12,-0.0224871188,-0.115439306 -5.125,-0.0219156395,-0.114088397 -5.13,-0.02135537,-0.112723442 -5.135,-0.020803467,-0.111329245 -5.14,-0.0202548916,-0.109890716 -5.145,-0.0197098704,-0.108413254 -5.15,-0.0191723552,-0.1069157 -5.155,-0.0186343429,-0.105381453 -5.16,-0.0180879879,-0.103785647 -5.165,-0.0175404233,-0.102140943 -5.17,-0.0169954612,-0.100463522 -5.175,-0.0164488969,-0.0987576247 -5.18,-0.0158958461,-0.0970274312 -5.185,-0.0153325615,-0.0952689827 -5.19,-0.0147596395,-0.0934686762 -5.195,-0.0141749482,-0.0916017369 -5.2,-0.0135723888,-0.0896446675 -5.205,-0.0129520175,-0.0875975135 -5.21,-0.0123167648,-0.0854703118 -5.215,-0.0116714039,-0.0832752303 -5.22,-0.0110198422,-0.0810182138 -5.225,-0.0103638689,-0.0786937026 -5.23,-0.0097113383,-0.0763139378 -5.235,-0.00907266324,-0.0739085131 -5.24,-0.00845474178,-0.0715098071 -5.245,-0.00785840222,-0.069125534 -5.25,-0.00728118997,-0.0667369095 -5.255,-0.00672722993,-0.0643424371 -5.26,-0.00620244947,-0.0619485725 -5.265,-0.00570615513,-0.0595476093 -5.27,-0.0052373492,-0.0571481476 -5.275,-0.00479897023,-0.0547849426 -5.28,-0.00439279639,-0.0524810558 -5.285,-0.00401701902,-0.0502353199 -5.29,-0.00366998796,-0.0480494597 -5.295,-0.00335045836,-0.0459294665 -5.3,-0.00305727388,-0.0438814404 -5.305,-0.00279002541,-0.0419202693 -5.31,-0.00254496708,-0.0400332161 -5.315,-0.00231682119,-0.0381816752 -5.32,-0.00210372389,-0.0363403439 -5.325,-0.00190462187,-0.0345010734 -5.33,-0.00171840743,-0.0326709953 -5.335,-0.00154279817,-0.0308565605 -5.34,-0.00137560616,-0.0290608419 -5.345,-0.00121801023,-0.0272984998 -5.35,-0.00107108974,-0.0255761487 -5.355,-0.000933703366,-0.023872212 -5.36,-0.000804670053,-0.0221726198 -5.365,-0.000684796878,-0.0204935217 -5.37,-0.000574382317,-0.0188430412 -5.375,-0.000472846412,-0.0172082809 -5.38,-0.000380182899,-0.0155747903 -5.385,-0.000297513357,-0.0139376878 -5.39,-0.000227276402,-0.0123124683 -5.395,-0.000170099107,-0.0107306736 -5.4,-0.000125276018,-0.00923084559 -5.405,-0.0000906558319,-0.00783002873 -5.41,-0.0000646938446,-0.0065290762 -5.415,-0.0000464469997,-0.00534344976 -5.42,-0.0000350679348,-0.00426821089 -5.425,-0.0000293220114,-0.00328417727 -5.43,-0.0000274065072,-0.00239739334 -5.435,-0.0000272809236,-0.00162238264 -5.44,-0.0000273284611,-0.000959600962 -5.445,-0.0000266899875,-0.000393383823 -5.45,-0.0000251621569,0.0000901159147 -5.455,-0.0000231207817,0.000475699539 -5.46,-0.0000201536414,0.000733804852 -5.465,-0.0000166087167,0.000861291056 -5.47,-0.0000125476023,0.000867833348 -5.475,-0.00000855119715,0.000769874171 -5.48,-0.0000049339304,0.000599186441 -5.485,-0.00000214435106,0.000378417549 -5.49,-0.00000023133506,0.000118787103 -5.495,0.000000549811441,-0.000169832377 -5.5,0.00000019224375,-0.00048394447 -5.505,-0.000000967135669,-0.000838720961 -5.51,-0.00000255843884,-0.00123384113 -5.515,-0.00000414761328,-0.00164951999 -5.52,-0.00000615179814,-0.00209903759 -5.525,-0.00000898287234,-0.00261483863 -5.53,-0.00001344535,-0.00321058992 -5.535,-0.0000199353173,-0.00387149035 -5.54,-0.0000285308706,-0.00457577989 -5.545,-0.0000392620928,-0.00531706165 -5.55,-0.0000524551593,-0.00609508434 -5.555,-0.0000685319626,-0.00691855964 -5.56,-0.0000884003622,-0.00780857194 -5.565,-0.000113099963,-0.00878476844 -5.57,-0.000144335753,-0.00986629833 -5.575,-0.000183379574,-0.011061928 -5.58,-0.00023068354,-0.0123666363 -5.585,-0.000286447545,-0.013783376 -5.59,-0.000351946958,-0.0153164561 -5.595,-0.000430023265,-0.0169711725 -5.6,-0.000523892772,-0.0187371961 -5.605,-0.00063520152,-0.0205667886 -5.61,-0.000764435618,-0.0224323722 -5.615,-0.000913611665,-0.02434943 -5.62,-0.00108270381,-0.0263245466 -5.625,-0.0012710463,-0.0283525409 -5.63,-0.00148002188,-0.0304412516 -5.635,-0.00171135898,-0.0325886481 -5.64,-0.0019650568,-0.0347742319 -5.645,-0.00223856357,-0.0369784475 -5.65,-0.00252722533,-0.0391841735 -5.655,-0.00282721602,-0.0413825922 -5.66,-0.00313792836,-0.0435707078 -5.665,-0.00345835235,-0.045735577 -5.67,-0.00378586939,-0.0478569663 -5.675,-0.00411801787,-0.0499223695 -5.68,-0.00445623021,-0.0519485405 -5.685,-0.00480484739,-0.0539746092 -5.69,-0.00516503511,-0.0560217204 -5.695,-0.00553626286,-0.0580874441 -5.7,-0.00592052463,-0.0601653765 -5.705,-0.00632214323,-0.0622576901 -5.71,-0.00674306362,-0.0643606207 -5.715,-0.00717990143,-0.0664577445 -5.72,-0.00763353847,-0.0685567252 -5.725,-0.00810929134,-0.0706742588 -5.73,-0.00861044096,-0.0728053829 -5.735,-0.00913707122,-0.074939399 -5.74,-0.0096893505,-0.0770807107 -5.745,-0.010270305,-0.0792460923 -5.75,-0.0108821584,-0.0814509629 -5.755,-0.0115283238,-0.0837089944 -5.76,-0.0122052783,-0.08600088 -5.765,-0.0129037809,-0.0882814657 -5.77,-0.0136221464,-0.0905328697 -5.775,-0.0143574755,-0.0927478567 -5.78,-0.0150990183,-0.0949103505 -5.785,-0.015838882,-0.097011331 -5.79,-0.0165728693,-0.0990462274 -5.795,-0.0173005659,-0.101015059 -5.8,-0.0180189314,-0.102914423 -5.805,-0.0187162765,-0.104731875 -5.81,-0.0193887608,-0.106479458 -5.815,-0.0200404519,-0.108181174 -5.82,-0.0206683497,-0.109828959 -5.825,-0.0212652933,-0.111397339 -5.83,-0.0218247333,-0.112864875 -5.835,-0.0223429847,-0.114220721 -5.84,-0.0228230308,-0.115472141 -5.845,-0.0232679713,-0.116637695 -5.85,-0.0236794687,-0.117728798 -5.855,-0.0240605767,-0.11874349 -5.86,-0.0244205142,-0.119689847 -5.865,-0.024772078,-0.120593001 -5.87,-0.0251154575,-0.121461936 -5.875,-0.0254462299,-0.122299368 -5.88,-0.025771215,-0.123121386 -5.885,-0.0260963381,-0.123926027 -5.89,-0.0264172738,-0.124685479 -5.895,-0.0267266164,-0.125375215 -5.9,-0.0270225881,-0.125996272 -5.905,-0.0273082551,-0.126564855 -5.91,-0.0275849459,-0.127092547 -5.915,-0.02784732,-0.127573687 -5.92,-0.0280895242,-0.127996564 -5.925,-0.0283142216,-0.128363751 -5.93,-0.0285216499,-0.128679121 -5.935,-0.0287060523,-0.128947582 -5.94,-0.0288590012,-0.129167694 -5.945,-0.0289676157,-0.129312585 -5.95,-0.0290257075,-0.129357772 -5.955,-0.0290322252,-0.129293559 -5.96,-0.0289768423,-0.129104502 -5.965,-0.0288498796,-0.128783912 -5.97,-0.0286594808,-0.128356394 -5.975,-0.0284152132,-0.12784274 -5.98,-0.0281148935,-0.127231296 -5.985,-0.0277590555,-0.126515685 -5.99,-0.0273538351,-0.12570912 -5.995,-0.0269104015,-0.124832392 -6,-0.0264352516,-0.123898173 -6.005,-0.0259259773,-0.122897295 -6.01,-0.0253844422,-0.121816124 -6.015,-0.0248155625,-0.120641941 -6.02,-0.0242272572,-0.119377088 -6.025,-0.0236271105,-0.118041586 -6.03,-0.0230166153,-0.116651211 -6.035,-0.0224024299,-0.115223552 -6.04,-0.0217961856,-0.113775117 -6.045,-0.0212034544,-0.11231234 -6.05,-0.0206246627,-0.11083673 -6.055,-0.0200554124,-0.109345563 -6.06,-0.0194963379,-0.107851317 -6.065,-0.0189527671,-0.106368291 -6.07,-0.0184157166,-0.104864036 -6.075,-0.0178745093,-0.103299018 -6.08,-0.0173309874,-0.101670633 -6.085,-0.016786112,-0.0999858432 -6.09,-0.0162369483,-0.0982520414 -6.095,-0.015680065,-0.0964798959 -6.1,-0.0151130528,-0.0946712689 -6.105,-0.014537285,-0.0928179179 -6.11,-0.0139561191,-0.0909181735 -6.115,-0.0133690388,-0.088972701 -6.12,-0.0127706031,-0.0869727018 -6.125,-0.0121596296,-0.0849166027 -6.13,-0.011538748,-0.082802647 -6.135,-0.0109092422,-0.0806167116 -6.14,-0.0102719237,-0.0783413186 -6.145,-0.00963006857,-0.0759730273 -6.15,-0.00899461691,-0.0735470515 -6.155,-0.00837602564,-0.0711080984 -6.16,-0.00777580508,-0.0686700334 -6.165,-0.00719411635,-0.0662305473 -6.17,-0.00663690679,-0.0638003258 -6.175,-0.00611030272,-0.0613922499 -6.18,-0.00561560565,-0.0590081019 -6.185,-0.00515136646,-0.0566530189 -6.19,-0.00471632951,-0.0543337103 -6.195,-0.00431072001,-0.0520488041 -6.2,-0.00393369435,-0.0497905784 -6.205,-0.00358451596,-0.0475642128 -6.21,-0.00326185122,-0.0453792046 -6.215,-0.00296453227,-0.0432514257 -6.22,-0.00269403666,-0.0412184409 -6.225,-0.00244853428,-0.0392875487 -6.23,-0.00222278668,-0.0374235913 -6.235,-0.00201414463,-0.0356015344 -6.24,-0.00182182639,-0.0338158874 -6.245,-0.00164408506,-0.0320613656 -6.25,-0.00147809109,-0.0303280824 -6.255,-0.00132074857,-0.0285995877 -6.26,-0.0011710944,-0.0268702613 -6.265,-0.00103058662,-0.0251462694 -6.27,-0.000898290074,-0.0234221221 -6.275,-0.000773597148,-0.0217052199 -6.28,-0.000657817541,-0.0200244137 -6.285,-0.00055125819,-0.0183923402 -6.29,-0.000454231367,-0.0168066022 -6.295,-0.00036702246,-0.0152526096 -6.3,-0.000289464481,-0.0137051936 -6.305,-0.000222589971,-0.0121605477 -6.31,-0.00016701107,-0.0106442959 -6.315,-0.000122358611,-0.00918412205 -6.32,-0.0000871505504,-0.00778078066 -6.325,-0.0000606110512,-0.0064385906 -6.33,-0.0000427671181,-0.00518805622 -6.335,-0.0000328182226,-0.00404680325 -6.34,-0.0000289094512,-0.00302161652 -6.345,-0.0000281414964,-0.00212686078 -6.35,-0.0000283518795,-0.00137313777 -6.355,-0.0000280373552,-0.000751560221 -6.36,-0.000027267655,-0.000232209709 -6.365,-0.0000262866007,0.000207115661 -6.37,-0.0000252051782,0.000569471573 -6.375,-0.0000236490019,0.000837701584 -6.38,-0.0000209101027,0.00099190329 -6.385,-0.0000168561809,0.00103653589 -6.39,-0.000011973795,0.000982393105 -6.395,-0.0000072177733,0.000841432025 -6.4,-0.00000332218862,0.000616829756 -6.405,-0.000000812215464,0.000303293012 -6.41,0.000000134520439,-0.0000754644603 -6.415,-0.000000431620384,-0.000495151042 -6.42,-0.00000196463334,-0.000954385733 -6.425,-0.00000374911593,-0.00143205858 -6.43,-0.00000557944903,-0.00190058082 -6.435,-0.00000768028696,-0.002374015 -6.44,-0.000010986496,-0.00288783708 -6.445,-0.0000162427267,-0.00346541918 -6.45,-0.0000236962378,-0.00411352109 -6.455,-0.0000333884884,-0.00482354105 -6.46,-0.0000450771767,-0.00558869662 -6.465,-0.000059131848,-0.00641338429 -6.47,-0.0000763142749,-0.0073080384 -6.475,-0.000097675062,-0.0082762553 -6.48,-0.000124155957,-0.00930918944 -6.485,-0.000157048763,-0.0104050749 -6.49,-0.000197430135,-0.0115751347 -6.495,-0.000245511702,-0.012827035 -6.5,-0.000301671838,-0.0141712295 -6.505,-0.000367573663,-0.0156323 -6.51,-0.00044647691,-0.0172346397 -6.515,-0.000541879112,-0.0189753423 -6.52,-0.000655336474,-0.0208133445 -6.525,-0.000787050727,-0.0227169844 -6.53,-0.000937919886,-0.0246872691 -6.535,-0.00110876947,-0.0267175048 -6.54,-0.0012999534,-0.0287914145 -6.545,-0.00151219101,-0.0309016105 -6.55,-0.00174629057,-0.0330345463 -6.555,-0.00200177144,-0.0351793081 -6.56,-0.00227777148,-0.0373449583 -6.565,-0.00257129754,-0.039536187 -6.57,-0.00287862711,-0.0417462319 -6.575,-0.00319970317,-0.0439748034 -6.58,-0.0035355976,-0.0462130827 -6.585,-0.00388174147,-0.0484236567 -6.59,-0.00423297119,-0.0505765228 -6.595,-0.00458790887,-0.0526752673 -6.6,-0.00494813437,-0.0547426897 -6.605,-0.00531636631,-0.0567986309 -6.61,-0.00569144381,-0.058837742 -6.615,-0.00607561087,-0.0608612937 -6.62,-0.00647564912,-0.062891962 -6.625,-0.00689461094,-0.0649424509 -6.63,-0.0073326006,-0.0670204227 -6.635,-0.00779015543,-0.0691344745 -6.64,-0.00826848935,-0.0712790804 -6.645,-0.00877078849,-0.0734374752 -6.65,-0.00929820337,-0.0755931176 -6.655,-0.00984842944,-0.077736403 -6.66,-0.0104214843,-0.0798717511 -6.665,-0.0110199343,-0.0820165771 -6.67,-0.011650055,-0.0841970147 -6.675,-0.0123107608,-0.0864052298 -6.68,-0.0129936765,-0.0886073998 -6.685,-0.0136999745,-0.0908057775 -6.69,-0.0144302346,-0.0930065326 -6.695,-0.0151765326,-0.0951957197 -6.7,-0.0159297095,-0.097351543 -6.705,-0.0166812164,-0.0994481592 -6.71,-0.0174253742,-0.10146465 -6.715,-0.0181560998,-0.103385065 -6.72,-0.0188636626,-0.105204535 -6.725,-0.0195414747,-0.106933104 -6.73,-0.0201920168,-0.108593317 -6.735,-0.0208183088,-0.110193463 -6.74,-0.021417511,-0.111724322 -6.745,-0.021985603,-0.113177908 -6.75,-0.0225164736,-0.114544402 -6.755,-0.0230111398,-0.115830802 -6.76,-0.0234755792,-0.11705453 -6.765,-0.0239061084,-0.11820258 -6.77,-0.0242971372,-0.119248092 -6.775,-0.0246555313,-0.120192278 -6.78,-0.0249927338,-0.12105863 -6.785,-0.0253110628,-0.121862485 -6.79,-0.0256108959,-0.122619851 -6.795,-0.0259006528,-0.123354974 -6.8,-0.0261897726,-0.124074765 -6.805,-0.0264812246,-0.124769418 -6.81,-0.0267705709,-0.125428142 -6.815,-0.0270534735,-0.126049836 -6.82,-0.0273284929,-0.126636321 -6.825,-0.0275941808,-0.127182367 -6.83,-0.0278474782,-0.127673133 -6.835,-0.0280779202,-0.128083012 -6.84,-0.0282813791,-0.12840365 -6.845,-0.0284628045,-0.128654047 -6.85,-0.0286218784,-0.128854658 -6.855,-0.0287525346,-0.129010257 -6.86,-0.0288455479,-0.129103793 -6.865,-0.0288964671,-0.129119379 -6.87,-0.0289092646,-0.129059297 -6.875,-0.0288743582,-0.128909128 -6.88,-0.0287759317,-0.128649833 -6.885,-0.0286156125,-0.12828943 -6.89,-0.0283944345,-0.12782251 -6.895,-0.0281084125,-0.127227242 -6.9,-0.027758746,-0.12650108 -6.905,-0.0273498296,-0.12565858 -6.91,-0.0268928796,-0.124725911 -6.915,-0.0264014916,-0.123731351 -6.92,-0.0258809364,-0.122684345 -6.925,-0.0253319001,-0.12157308 -6.93,-0.0247573757,-0.120386521 -6.935,-0.0241667497,-0.119134423 -6.94,-0.0235671274,-0.117831642 -6.945,-0.0229567868,-0.116476093 -6.95,-0.0223361742,-0.11506089 -6.955,-0.0217133434,-0.113588384 -6.96,-0.0210979305,-0.112069259 -6.965,-0.0204911076,-0.110511296 -6.97,-0.0198907967,-0.108926024 -6.975,-0.0193026035,-0.107344323 -6.98,-0.018732758,-0.105784925 -6.985,-0.0181788398,-0.10423145 -6.99,-0.0176336466,-0.10265635 -6.995,-0.017092957,-0.101047204 -7,-0.0165553196,-0.0994015455 -7.005,-0.0160161097,-0.0977138816 -7.01,-0.0154707838,-0.0959815307 -7.015,-0.0149139018,-0.0941874773 -7.02,-0.0143420252,-0.0923108907 -7.025,-0.013762254,-0.0903670838 -7.03,-0.0131784827,-0.0883783028 -7.035,-0.0125855209,-0.0863459706 -7.04,-0.0119825996,-0.0842765923 -7.045,-0.0113745233,-0.0821769687 -7.05,-0.010762948,-0.080033247 -7.055,-0.0101482115,-0.0778233155 -7.06,-0.0095298334,-0.0755339945 -7.065,-0.00891258822,-0.0731786702 -7.07,-0.00830547294,-0.070784008 -7.075,-0.00770991124,-0.0683539897 -7.08,-0.00712737639,-0.065885609 -7.085,-0.00656525242,-0.063396608 -7.09,-0.00603123701,-0.0609129687 -7.095,-0.00553033674,-0.0584636567 -7.1,-0.00506365484,-0.056076275 -7.105,-0.004627825,-0.0537513864 -7.11,-0.00422148511,-0.0514763814 -7.115,-0.00384522021,-0.0492447912 -7.12,-0.00349859215,-0.0470515782 -7.125,-0.00317883388,-0.0448893133 -7.13,-0.00288326817,-0.0427600258 -7.135,-0.00261282973,-0.0406951723 -7.14,-0.00236658574,-0.0387072401 -7.145,-0.0021397595,-0.0367731912 -7.15,-0.00193053265,-0.0348894368 -7.155,-0.00173912696,-0.033068127 -7.16,-0.00156470963,-0.0313174777 -7.165,-0.0014054609,-0.0296318766 -7.17,-0.00125751963,-0.027984982 -7.175,-0.00111853051,-0.0263480874 -7.18,-0.000987552441,-0.0247017342 -7.185,-0.000863871687,-0.0230404564 -7.19,-0.000746542949,-0.0213686052 -7.195,-0.000635748493,-0.019701517 -7.2,-0.000532655814,-0.0180584324 -7.205,-0.000438352693,-0.0164510595 -7.21,-0.000354123411,-0.0148868922 -7.215,-0.000279709296,-0.0133542653 -7.22,-0.000215301687,-0.0118494952 -7.225,-0.000161276464,-0.010404528 -7.23,-0.000117397853,-0.00903086474 -7.235,-0.0000825539834,-0.00770386777 -7.24,-0.0000562787021,-0.00641409761 -7.245,-0.0000390317334,-0.00517476088 -7.25,-0.0000298806164,-0.00400429166 -7.255,-0.0000269358895,-0.0029286346 -7.26,-0.0000272473938,-0.00197423347 -7.265,-0.0000285249286,-0.00115953474 -7.27,-0.0000297146538,-0.000488683354 -7.275,-0.0000303649644,0.0000485130257 -7.28,-0.0000305527423,0.00046541445 -7.285,-0.0000299666134,0.000778461888 -7.29,-0.0000280074269,0.000988579432 -7.295,-0.0000243872079,0.00108805414 -7.3,-0.0000194180033,0.00109612983 -7.305,-0.000014059402,0.00103903337 -7.31,-0.00000909820911,0.000924988752 -7.315,-0.00000517559697,0.000736193741 -7.32,-0.00000231053411,0.000449772487 -7.325,-0.000000667849763,0.0000730807466 -7.33,-0.000000449006325,-0.000377821786 -7.335,-0.00000122393772,-0.000896392 -7.34,-0.00000311355977,-0.00145953239 -7.345,-0.00000597764101,-0.00203356444 -7.35,-0.00000979902158,-0.00261699311 -7.355,-0.0000149923487,-0.00321992381 -7.36,-0.0000215295963,-0.00384609905 -7.365,-0.0000296357559,-0.00450772101 -7.37,-0.000039260974,-0.00520427259 -7.375,-0.0000507246044,-0.00593488144 -7.38,-0.0000653057791,-0.00672641863 -7.385,-0.0000840854285,-0.0076147434 -7.39,-0.000107883644,-0.00860759485 -7.395,-0.000137093663,-0.00968598756 -7.4,-0.000172013815,-0.0108358757 -7.405,-0.000213623687,-0.0120546609 -7.41,-0.000262525315,-0.0133411222 -7.415,-0.000319602649,-0.0146955477 -7.42,-0.000386615046,-0.0161327378 -7.425,-0.000466804859,-0.0176793171 -7.43,-0.000562994998,-0.0193416692 -7.435,-0.000676584081,-0.0211031123 -7.44,-0.000808093893,-0.0229581057 -7.445,-0.000958339371,-0.024910524 -7.45,-0.00112959956,-0.026959335 -7.455,-0.00132421669,-0.029092005 -7.46,-0.00154262391,-0.0312760328 -7.465,-0.00178364337,-0.0334732884 -7.47,-0.00204531999,-0.0356596113 -7.475,-0.0023262444,-0.0378440421 -7.48,-0.0026246048,-0.040037199 -7.485,-0.00293593819,-0.0422279736 -7.49,-0.00326194948,-0.0444291025 -7.495,-0.00360525466,-0.046649835 -7.5,-0.00396219594,-0.0488649862 -7.505,-0.00432841623,-0.0510579859 -7.51,-0.00470048175,-0.0532284617 -7.515,-0.00507802867,-0.0553825612 -7.52,-0.00546263322,-0.0575203846 -7.525,-0.00585275809,-0.0596214334 -7.53,-0.00624772745,-0.0616714976 -7.535,-0.00665132118,-0.0636832194 -7.54,-0.0070680491,-0.0656819376 -7.545,-0.00750127251,-0.0676966639 -7.55,-0.00795279095,-0.0697482875 -7.555,-0.00842465506,-0.0718360942 -7.56,-0.00892064514,-0.0739534363 -7.565,-0.00944564709,-0.0760996695 -7.57,-0.00999742601,-0.0782633505 -7.575,-0.0105710691,-0.0804275378 -7.58,-0.0111683204,-0.0825974648 -7.585,-0.011793601,-0.0847808987 -7.59,-0.0124448713,-0.086957304 -7.595,-0.0131154124,-0.0891016324 -7.6,-0.0138054065,-0.0912228161 -7.605,-0.0145180262,-0.0933445307 -7.61,-0.0152511544,-0.0954716333 -7.615,-0.0159989675,-0.09759605 -7.62,-0.016753758,-0.0996946701 -7.625,-0.0175075441,-0.101737598 -7.63,-0.0182540406,-0.103706683 -7.635,-0.018985111,-0.105593532 -7.64,-0.0196890952,-0.107388312 -7.645,-0.0203589411,-0.109085352 -7.65,-0.0209966425,-0.110686969 -7.655,-0.0216008638,-0.112191004 -7.66,-0.0221674604,-0.113596906 -7.665,-0.0226939415,-0.114910991 -7.67,-0.0231836376,-0.116155361 -7.675,-0.0236479728,-0.117359359 -7.68,-0.0240863232,-0.118513616 -7.685,-0.0244886953,-0.119583917 -7.69,-0.0248583678,-0.120565534 -7.695,-0.0252017541,-0.121468236 -7.7,-0.0255180593,-0.122292931 -7.705,-0.0258097502,-0.123050337 -7.71,-0.0260805115,-0.12375003 -7.715,-0.0263370259,-0.12439186 -7.72,-0.0265893213,-0.124986269 -7.725,-0.0268396426,-0.125547482 -7.73,-0.0270861157,-0.126087578 -7.735,-0.0273284505,-0.126614892 -7.74,-0.0275689345,-0.127129475 -7.745,-0.0278088431,-0.127619544 -7.75,-0.0280356773,-0.128048717 -7.755,-0.0282377952,-0.128393233 -7.76,-0.0284160761,-0.128662141 -7.765,-0.0285684376,-0.128864559 -7.77,-0.0286882624,-0.128997008 -7.775,-0.0287650698,-0.129039885 -7.78,-0.0287976427,-0.128989875 -7.785,-0.0287931136,-0.128863194 -7.79,-0.0287483131,-0.128664208 -7.795,-0.02865455,-0.128393524 -7.8,-0.0285077246,-0.128050645 -7.805,-0.0283063699,-0.127621074 -7.81,-0.0280460638,-0.127078227 -7.815,-0.0277252459,-0.126411542 -7.82,-0.02734213,-0.125621652 -7.825,-0.0268980711,-0.12471196 -7.83,-0.0264060956,-0.123706324 -7.835,-0.0258770843,-0.122621002 -7.84,-0.025310738,-0.121444321 -7.845,-0.0247133887,-0.120180972 -7.85,-0.0241012852,-0.118864039 -7.855,-0.0234844239,-0.117519715 -7.86,-0.0228647123,-0.116152732 -7.865,-0.0222397549,-0.11474823 -7.87,-0.021611962,-0.113294348 -7.875,-0.0209896739,-0.111790557 -7.88,-0.0203730331,-0.110235143 -7.885,-0.0197591856,-0.108634203 -7.89,-0.0191521183,-0.10700858 -7.895,-0.0185567866,-0.105371448 -7.9,-0.0179760031,-0.103721773 -7.905,-0.0174092133,-0.102058736 -7.91,-0.0168523569,-0.100382521 -7.915,-0.0163037388,-0.0986981451 -7.92,-0.0157634679,-0.0970136064 -7.925,-0.0152279638,-0.0953209863 -7.93,-0.0146882378,-0.0935832185 -7.935,-0.0141358365,-0.0917618585 -7.94,-0.0135733748,-0.0898594292 -7.945,-0.0130042188,-0.0878939484 -7.95,-0.0124219099,-0.0858614096 -7.955,-0.0118251666,-0.0837681921 -7.96,-0.0112209667,-0.0816303529 -7.965,-0.0106139107,-0.0794459232 -7.97,-0.0100079606,-0.077215863 -7.975,-0.00940411902,-0.0749436921 -7.98,-0.00880323256,-0.0726368338 -7.985,-0.00821070377,-0.0703072523 -7.99,-0.00762881308,-0.0679472684 -7.995,-0.00705824523,-0.0655400263 -8,-0.00650333732,-0.0630806631 -8.005,-0.00597041658,-0.0605862145 -8.01,-0.00546618726,-0.0580949776 -8.015,-0.00499391575,-0.0556457878 -8.02,-0.00455128451,-0.0532488866 -8.025,-0.00413742241,-0.0509002153 -8.03,-0.00375587638,-0.0486153411 -8.035,-0.00340827459,-0.0464060099 -8.04,-0.00309073804,-0.0442596725 -8.045,-0.00279930714,-0.0421722931 -8.05,-0.00253297051,-0.0401525068 -8.055,-0.00228926617,-0.0381873766 -8.06,-0.00206509694,-0.0362537095 -8.065,-0.00185798452,-0.0343458137 -8.07,-0.0016675991,-0.032477857 -8.075,-0.00149461367,-0.0306742645 -8.08,-0.00133737964,-0.0289478736 -8.085,-0.0011935621,-0.0272918366 -8.09,-0.00106018326,-0.0256770669 -8.095,-0.00093563832,-0.024080276 -8.1,-0.000820209116,-0.0225033216 -8.105,-0.000712412387,-0.0209378429 -8.11,-0.000610967727,-0.019371729 -8.115,-0.000515652776,-0.0178020039 -8.12,-0.000426920227,-0.0162306456 -8.125,-0.000346114516,-0.0146680027 -8.13,-0.000273367011,-0.013115252 -8.135,-0.000209306927,-0.0115868142 -8.14,-0.000155587387,-0.0101293241 -8.145,-0.000112114022,-0.00876419366 -8.15,-0.0000781050262,-0.00747310059 -8.155,-0.0000528468985,-0.00624245956 -8.16,-0.0000359275266,-0.00506832874 -8.165,-0.0000264482717,-0.00395273748 -8.17,-0.0000226904058,-0.00291620651 -8.175,-0.0000228161593,-0.00197659541 -8.18,-0.0000250287513,-0.00113319911 -8.185,-0.0000285985682,-0.000395674829 -8.19,-0.0000323688664,0.00021807065 -8.195,-0.000035343805,0.000700586023 -8.2,-0.000036422717,0.00105060719 -8.205,-0.0000345276111,0.00126221869 -8.21,-0.0000297860817,0.00132889674 -8.215,-0.0000233708072,0.0012770548 -8.22,-0.000017066593,0.00115236327 -8.225,-0.0000118306564,0.000977577804 -8.23,-0.00000762338271,0.000747104573 -8.235,-0.00000425094123,0.000444324341 -8.24,-0.00000165335342,0.0000712918675 -8.245,0.0000000448391163,-0.000365032969 -8.25,0.000000243548231,-0.000864164881 -8.255,-0.00000132188393,-0.00141884697 -8.26,-0.00000519382815,-0.0020257635 -8.265,-0.0000109391744,-0.00268419074 -8.27,-0.0000180924896,-0.00338716618 -8.275,-0.0000264935999,-0.00412083885 -8.28,-0.0000358170609,-0.00487912734 -8.285,-0.0000465921107,-0.00565034166 -8.29,-0.0000589109975,-0.00641611199 -8.295,-0.0000742979604,-0.00720378853 -8.3,-0.0000943298173,-0.00806557734 -8.305,-0.000119446125,-0.00901775507 -8.31,-0.000150012456,-0.0100568526 -8.315,-0.000186332044,-0.011184694 -8.32,-0.00022916915,-0.0124016678 -8.325,-0.000279830591,-0.0137142964 -8.33,-0.000339378691,-0.0151203845 -8.335,-0.000409321047,-0.0166118089 -8.34,-0.000491897044,-0.0181908307 -8.345,-0.000589484006,-0.0198472059 -8.35,-0.000703187868,-0.0215722934 -8.355,-0.000833590173,-0.0233709854 -8.36,-0.000981910825,-0.0252527255 -8.365,-0.00115135749,-0.0272371364 -8.37,-0.0013460907,-0.0293337299 -8.375,-0.00156712579,-0.0315188076 -8.38,-0.00181265326,-0.0337472647 -8.385,-0.00208023225,-0.0359923761 -8.39,-0.0023690104,-0.0382563915 -8.395,-0.00267668347,-0.0405286637 -8.4,-0.00299916578,-0.0427833757 -8.405,-0.00333561293,-0.0450161122 -8.41,-0.00368714219,-0.0472301295 -8.415,-0.00405095401,-0.0494168076 -8.42,-0.00442369821,-0.0515804896 -8.425,-0.00480383674,-0.0537389424 -8.43,-0.0051910877,-0.0559024054 -8.435,-0.0055880209,-0.058072606 -8.44,-0.00599510141,-0.0602344257 -8.445,-0.00640866804,-0.0623580124 -8.45,-0.00682681263,-0.0644313933 -8.455,-0.00725280072,-0.0664715797 -8.46,-0.00769012025,-0.0685004744 -8.465,-0.00814031579,-0.0705294654 -8.47,-0.0086053387,-0.0725564802 -8.475,-0.00908998853,-0.0745862652 -8.48,-0.00960235843,-0.0766442658 -8.485,-0.0101439252,-0.0787407346 -8.49,-0.0107096618,-0.080868823 -8.495,-0.0113016327,-0.0830349821 -8.5,-0.0119236428,-0.0852350884 -8.505,-0.012572817,-0.0874336911 -8.51,-0.0132438375,-0.0896000174 -8.515,-0.0139326242,-0.0917300947 -8.52,-0.0146376122,-0.0938300953 -8.525,-0.0153593564,-0.0959115491 -8.53,-0.0160952148,-0.0979773667 -8.535,-0.0168375952,-0.100009612 -8.54,-0.0175809987,-0.101992442 -8.545,-0.0183230507,-0.103926127 -8.55,-0.019061718,-0.105820302 -8.555,-0.019785751,-0.10766201 -8.56,-0.0204812206,-0.109423078 -8.565,-0.0211462013,-0.111091595 -8.57,-0.0217758845,-0.112650785 -8.575,-0.0223622605,-0.114087819 -8.58,-0.0229006712,-0.115407076 -8.585,-0.0233923535,-0.116628264 -8.59,-0.0238498475,-0.117784122 -8.595,-0.0242774049,-0.118877184 -8.6,-0.0246702154,-0.119892353 -8.605,-0.0250323126,-0.120837474 -8.61,-0.0253691924,-0.121725316 -8.615,-0.0256835734,-0.122562966 -8.62,-0.0259783134,-0.123354987 -8.625,-0.0262513581,-0.124088097 -8.63,-0.026501091,-0.124739052 -8.635,-0.0267349784,-0.125311445 -8.64,-0.0269601025,-0.125827931 -8.645,-0.0271729359,-0.126298326 -8.65,-0.0273734941,-0.12673343 -8.655,-0.0275717836,-0.12715163 -8.66,-0.0277727872,-0.127552356 -8.665,-0.0279706162,-0.127917935 -8.67,-0.0281559131,-0.128236505 -8.675,-0.0283247288,-0.128511898 -8.68,-0.0284761075,-0.128745879 -8.685,-0.0286010469,-0.128915965 -8.69,-0.0286855762,-0.128988617 -8.695,-0.028723885,-0.128948833 -8.7,-0.0287161275,-0.128802426 -8.705,-0.0286625001,-0.128563862 -8.71,-0.0285605972,-0.128247854 -8.715,-0.0284051224,-0.127855498 -8.72,-0.0281960994,-0.127377792 -8.725,-0.027937145,-0.126808766 -8.73,-0.0276300006,-0.126151895 -8.735,-0.027270704,-0.125404173 -8.74,-0.0268526033,-0.124554253 -8.745,-0.0263827651,-0.123608325 -8.75,-0.0258701043,-0.12256614 -8.755,-0.0253105963,-0.121402773 -8.76,-0.0247083691,-0.120119288 -8.765,-0.0240804378,-0.1187542 -8.77,-0.023439648,-0.117339861 -8.775,-0.0227932297,-0.11589351 -8.78,-0.0221447439,-0.114418486 -8.785,-0.0214959402,-0.11290849 -8.79,-0.0208555394,-0.11136973 -8.795,-0.0202281766,-0.109811938 -8.8,-0.0196099084,-0.108235067 -8.805,-0.0189997119,-0.106636817 -8.81,-0.0183967588,-0.105005303 -8.815,-0.017803709,-0.103331928 -8.82,-0.0172228394,-0.101622538 -8.825,-0.01664916,-0.0998795507 -8.83,-0.0160812453,-0.0981160835 -8.835,-0.0155241218,-0.0963584073 -8.84,-0.0149792283,-0.0946131112 -8.845,-0.0144393972,-0.0928508972 -8.85,-0.0138961488,-0.0910403778 -8.855,-0.0133502442,-0.089184394 -8.86,-0.0128011514,-0.0872856776 -8.865,-0.0122419307,-0.0853278719 -8.87,-0.0116684189,-0.0832991835 -8.875,-0.0110812424,-0.0811902935 -8.88,-0.0104855039,-0.0789986381 -8.885,-0.00988659358,-0.0767379542 -8.89,-0.0092883672,-0.074432058 -8.895,-0.00869254849,-0.0720985538 -8.9,-0.00810350559,-0.0697499386 -8.905,-0.00752796076,-0.0673963935 -8.91,-0.00696849138,-0.0650258934 -8.915,-0.00642540457,-0.0626198578 -8.92,-0.00590242299,-0.0601846237 -8.925,-0.00540422888,-0.0577432876 -8.93,-0.00493354695,-0.0553169173 -8.935,-0.00448951496,-0.0529062883 -8.94,-0.00407069776,-0.0505022891 -8.945,-0.0036829598,-0.0481352289 -8.95,-0.00333007902,-0.0458391343 -8.955,-0.00300886178,-0.0436224604 -8.96,-0.00271620098,-0.0415007761 -8.965,-0.00244963583,-0.0394757418 -8.97,-0.00220674277,-0.0375270018 -8.975,-0.00198593032,-0.0356319192 -8.98,-0.00178480298,-0.0337757245 -8.985,-0.00160064176,-0.031949556 -8.99,-0.00143251915,-0.0301609196 -8.995,-0.00127937961,-0.0284269699 -9,-0.0011384267,-0.0267423242 -9.005,-0.00100727668,-0.0250872972 -9.01,-0.000885236124,-0.0234579135 -9.015,-0.000773691694,-0.0218768394 -9.02,-0.000672463082,-0.0203519849 -9.025,-0.000578959784,-0.0188635972 -9.03,-0.000491963318,-0.0173929231 -9.035,-0.00041063318,-0.0159238597 -9.04,-0.000335624171,-0.0144473367 -9.045,-0.000267052555,-0.0129585784 -9.05,-0.00020563211,-0.0114681164 -9.055,-0.000153072134,-0.0100122365 -9.06,-0.000109991138,-0.00861789774 -9.065,-0.0000760723008,-0.0072900849 -9.07,-0.0000508093435,-0.0060337866 -9.075,-0.0000337643025,-0.00485327131 -9.08,-0.0000237606918,-0.00375786696 -9.085,-0.0000192598102,-0.00277155158 -9.09,-0.00001886098,-0.00189854627 -9.095,-0.0000212754566,-0.00110945752 -9.1,-0.0000258042454,-0.000393750008 -9.105,-0.0000312729089,0.000229422319 -9.11,-0.0000359431538,0.000749918455 -9.115,-0.0000388281838,0.00115806579 -9.12,-0.0000383524484,0.00143044501 -9.125,-0.0000349247339,0.00155293466 -9.13,-0.0000294262844,0.0015356837 -9.135,-0.0000232550353,0.00140446682 -9.14,-0.0000173987319,0.00118498967 -9.145,-0.000011606064,0.000880842497 -9.15,-0.00000629688489,0.000493842882 -9.155,-0.00000212697858,0.0000422130136 -9.16,0.000000251863795,-0.000454668412 -9.165,0.000000565538487,-0.000975259038 -9.17,-0.00000147193248,-0.00151974868 -9.175,-0.00000562415212,-0.00211239184 -9.18,-0.0000116564546,-0.00276710139 -9.185,-0.0000192275761,-0.00348350059 -9.19,-0.0000284019039,-0.00425448408 -9.195,-0.0000394272552,-0.00507687808 -9.2,-0.0000527475311,-0.00593523773 -9.205,-0.0000681974411,-0.00679840497 -9.21,-0.0000862627104,-0.00767675991 -9.215,-0.000108116319,-0.00860152481 -9.22,-0.000134202492,-0.0095753308 -9.225,-0.000165184486,-0.010598027 -9.23,-0.0002017926,-0.0116780422 -9.235,-0.000245336763,-0.012830762 -9.24,-0.000297508914,-0.0140848452 -9.245,-0.000359565744,-0.0154639536 -9.25,-0.000432542107,-0.0169640873 -9.255,-0.000517551259,-0.018567391 -9.26,-0.000616668286,-0.0202584547 -9.265,-0.000731791388,-0.0220220754 -9.27,-0.000863344969,-0.0238488713 -9.275,-0.00101262324,-0.0257359504 -9.28,-0.00118236503,-0.027693216 -9.285,-0.00137647878,-0.0297389927 -9.29,-0.00159666747,-0.0318631367 -9.295,-0.00184079788,-0.0340351032 -9.3,-0.00210833587,-0.0362519719 -9.305,-0.00239989045,-0.0385267658 -9.31,-0.00271460193,-0.0408482051 -9.315,-0.00304983957,-0.0431860792 -9.32,-0.00340235025,-0.0455125141 -9.325,-0.00376889969,-0.0478020024 -9.33,-0.00414585869,-0.0500394539 -9.335,-0.00453027812,-0.052232532 -9.34,-0.00491950595,-0.0543944452 -9.345,-0.00531358259,-0.0565353449 -9.35,-0.00571618201,-0.0586692983 -9.355,-0.00613054669,-0.0608033804 -9.36,-0.00655426399,-0.0629233355 -9.365,-0.00698309108,-0.0650173461 -9.37,-0.0074199248,-0.0671034925 -9.375,-0.00786871206,-0.0691948792 -9.38,-0.00832882447,-0.0712778839 -9.385,-0.00880063706,-0.0733332648 -9.39,-0.00928557337,-0.075354057 -9.395,-0.00978992492,-0.0773624159 -9.4,-0.0103185674,-0.0793847198 -9.405,-0.0108686892,-0.081428969 -9.41,-0.0114439936,-0.0835128689 -9.415,-0.0120500393,-0.08564082 -9.42,-0.0126865175,-0.087789804 -9.425,-0.0133526739,-0.0899478002 -9.43,-0.0140421352,-0.092102264 -9.435,-0.0147482091,-0.0942378793 -9.44,-0.0154710025,-0.0963522253 -9.445,-0.0162081642,-0.0984355493 -9.45,-0.0169496792,-0.100457631 -9.455,-0.0176865582,-0.102398393 -9.46,-0.018419363,-0.104275673 -9.465,-0.0191496118,-0.106114899 -9.47,-0.0198697066,-0.107914619 -9.475,-0.0205695664,-0.109658243 -9.48,-0.0212451791,-0.111332997 -9.485,-0.0218934404,-0.112925035 -9.49,-0.0225066506,-0.114419957 -9.495,-0.0230754661,-0.115809831 -9.5,-0.0235954299,-0.117096051 -9.505,-0.0240697296,-0.118283881 -9.51,-0.0245014379,-0.119368952 -9.515,-0.0248906602,-0.12034868 -9.52,-0.0252392222,-0.121234419 -9.525,-0.0255544731,-0.122049678 -9.53,-0.0258474514,-0.122823449 -9.535,-0.0261253978,-0.123571812 -9.54,-0.026387779,-0.124283557 -9.545,-0.0266288761,-0.124930564 -9.55,-0.02685375,-0.12551357 -9.555,-0.0270709125,-0.126051584 -9.56,-0.0272729594,-0.126534831 -9.565,-0.0274558863,-0.12695869 -9.57,-0.0276279876,-0.127332623 -9.575,-0.0277931695,-0.127654471 -9.58,-0.0279510271,-0.127924044 -9.585,-0.0280986679,-0.128152043 -9.59,-0.0282333719,-0.128353052 -9.595,-0.0283569934,-0.12853366 -9.6,-0.0284678071,-0.128682573 -9.605,-0.0285538616,-0.128768484 -9.61,-0.0286038495,-0.12876521 -9.615,-0.0286108824,-0.128664067 -9.62,-0.0285710033,-0.128466666 -9.625,-0.0284823844,-0.128179425 -9.63,-0.0283344864,-0.127787258 -9.635,-0.0281229588,-0.1272738 -9.64,-0.0278568113,-0.126651489 -9.645,-0.0275429667,-0.125940999 -9.65,-0.0271807638,-0.125153024 -9.655,-0.0267659765,-0.124286757 -9.66,-0.0263048034,-0.123348565 -9.665,-0.0258053668,-0.122334035 -9.67,-0.0252639099,-0.121214661 -9.675,-0.0246804743,-0.11998419 -9.68,-0.024063475,-0.118660503 -9.685,-0.0234211086,-0.117256721 -9.69,-0.0227623572,-0.115785297 -9.695,-0.0220934566,-0.114253119 -9.7,-0.0214178858,-0.112659424 -9.705,-0.0207456841,-0.111023365 -9.71,-0.0200891314,-0.109380689 -9.715,-0.0194507825,-0.107751394 -9.72,-0.018826212,-0.106127385 -9.725,-0.0182134731,-0.10449121 -9.73,-0.0176147935,-0.102831714 -9.735,-0.0170307764,-0.101142088 -9.74,-0.0164563519,-0.0994168498 -9.745,-0.0158849961,-0.097651453 -9.75,-0.015319709,-0.0958628014 -9.755,-0.0147650051,-0.0940615017 -9.76,-0.0142143349,-0.0922262844 -9.765,-0.0136644327,-0.0903521412 -9.77,-0.0131170977,-0.0884558264 -9.775,-0.0125717142,-0.0865452847 -9.78,-0.0120263673,-0.0846179033 -9.785,-0.0114760947,-0.0826549371 -9.79,-0.0109148321,-0.080622947 -9.795,-0.0103433848,-0.0785021711 -9.8,-0.00976560428,-0.0762996545 -9.805,-0.00918402627,-0.0740321552 -9.81,-0.00859907653,-0.0717056243 -9.815,-0.00801380469,-0.0693297276 -9.82,-0.00743913389,-0.0669297171 -9.825,-0.00688104938,-0.0645140312 -9.83,-0.0063408867,-0.0620809884 -9.835,-0.00582211437,-0.059647616 -9.84,-0.00532823398,-0.0572370838 -9.845,-0.00486185757,-0.0548586931 -9.85,-0.00442221234,-0.0524971793 -9.855,-0.00400753664,-0.0501310396 -9.86,-0.0036212075,-0.0477695222 -9.865,-0.0032667499,-0.0454417902 -9.87,-0.00294259737,-0.0431695305 -9.875,-0.0026460562,-0.0409764059 -9.88,-0.00237515718,-0.0388726362 -9.885,-0.00212855043,-0.0368499527 -9.89,-0.00190691787,-0.0349127759 -9.895,-0.00170887039,-0.03306149 -9.9,-0.0015298894,-0.0312759628 -9.905,-0.00136733222,-0.0295481342 -9.91,-0.00121988737,-0.0278804258 -9.915,-0.00108481404,-0.0262481674 -9.92,-0.000959134178,-0.0246181613 -9.925,-0.000842049186,-0.0229893325 -9.93,-0.000734780623,-0.021388893 -9.935,-0.000637439777,-0.0198394325 -9.94,-0.000548060897,-0.0183416893 -9.945,-0.000465159069,-0.0168848397 -9.95,-0.000388334571,-0.0154558919 -9.955,-0.000318195149,-0.014047896 -9.96,-0.000255091002,-0.0126545569 -9.965,-0.000199008978,-0.0112747949 -9.97,-0.000150436311,-0.00991284094 -9.975,-0.000109327953,-0.00857090876 -9.98,-0.0000757193017,-0.0072595631 -9.985,-0.0000499472341,-0.00598592666 -9.99,-0.0000317691554,-0.00476120977 -9.995,-0.0000212651478,-0.00361780561 -10,-0.0000170890481,-0.00259659438 diff --git a/validation/oscillating_beam_2d/validation_oscillating_beam_2d.jl b/validation/oscillating_beam_2d/validation_oscillating_beam_2d.jl deleted file mode 100644 index 8e6cc8340..000000000 --- a/validation/oscillating_beam_2d/validation_oscillating_beam_2d.jl +++ /dev/null @@ -1,60 +0,0 @@ -# Results are compared to the results in: -# -# P.N. Sun, D. Le Touzé, A.-M. Zhang. -# "Study of a complex fluid-structure dam-breaking benchmark problem using a multi-phase SPH method with APR". -# In: Engineering Analysis with Boundary Elements 104 (2019), pages 240-258. -# https://doi.org/10.1016/j.enganabound.2019.03.033 -# and -# Turek S , Hron J. -# "Proposal for numerical benchmarking of fluid-structure interaction between an elastic object and laminar incompressible flow." -# In: Fluid-structure interaction. Springer; 2006. p. 371–85 . -# https://doi.org/10.1007/3-540-34596-5_15 - -include("../validation_util.jl") -using TrixiParticles -using OrdinaryDiffEq -using JSON - -tspan = (0, 10) - -# `n_particles_beam_y = 5` means that the beam is 5 particles thick. -# This number is used to set the resolution of the simulation. -# It has to be odd, so that a particle is exactly in the middle of the tip of the beam. -# Use 5, 9, 21, 35 for validation. -# Note: 35 takes a very long time! -n_particles_beam_y = 5 - -# Overwrite `sol` assignment to skip time integration -trixi_include(@__MODULE__, - joinpath(examples_dir(), "solid", "oscillating_beam_2d.jl"), - n_particles_y=n_particles_beam_y, sol=nothing, tspan=tspan, - penalty_force=PenaltyForceGanzenmueller(alpha=0.01)) - -pp_callback = PostprocessCallback(; deflection_x, deflection_y, dt=0.01, - output_directory="out", - filename="validation_run_oscillating_beam_2d_$n_particles_beam_y", - write_csv=false, write_file_interval=0) -info_callback = InfoCallback(interval=2500) - -callbacks = CallbackSet(info_callback, pp_callback) - -sol = solve(ode, RDPK3SpFSAL49(), abstol=1e-8, reltol=1e-6, dt=1e-5, - save_everystep=false, callback=callbacks) - -reference_file_name = joinpath(validation_dir(), "oscillating_beam_2d", - "validation_reference_$n_particles_beam_y.json") -run_file_name = joinpath("out", - "validation_run_oscillating_beam_2d_$n_particles_beam_y.json") - -reference_data = JSON.parsefile(reference_file_name) -run_data = JSON.parsefile(run_file_name) - -error_deflection_x = interpolated_mse(reference_data["deflection_x_solid_1"]["time"], - reference_data["deflection_x_solid_1"]["values"], - run_data["deflection_x_solid_1"]["time"], - run_data["deflection_x_solid_1"]["values"]) - -error_deflection_y = interpolated_mse(reference_data["deflection_y_solid_1"]["time"], - reference_data["deflection_y_solid_1"]["values"], - run_data["deflection_y_solid_1"]["time"], - run_data["deflection_y_solid_1"]["values"]) diff --git a/validation/oscillating_beam_2d/validation_reference_17.json b/validation/oscillating_beam_2d/validation_reference_17.json deleted file mode 100644 index 6a1a210a5..000000000 --- a/validation/oscillating_beam_2d/validation_reference_17.json +++ /dev/null @@ -1,4031 +0,0 @@ -{ - "meta": { - "julia_version": "1.10.0", - "solver_version": "v0.1.0-6-g3164e99d-dirty", - "solver_name": "TrixiParticles.jl" - }, - "deflection_x_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -2.399319076751283e-10, - -2.2959089357454943e-7, - -1.9751992419991815e-6, - -7.267615518946613e-6, - -1.7132867734359625e-5, - -3.2788830933438984e-5, - -5.656978036827631e-5, - -9.4459793352486e-5, - -0.00016142145373543304, - -0.0002701851493916996, - -0.0004310403265798124, - -0.0006586652826719996, - -0.0009479078188276979, - -0.0012917224552132511, - -0.0016745502647648736, - -0.002094502735715764, - -0.0025562524654846874, - -0.0030603570460387974, - -0.003612062534906646, - -0.00422506329729333, - -0.004917676898719636, - -0.00570633918225838, - -0.006623163501407847, - -0.0076569721191531714, - -0.00880317786660384, - -0.010039062342638572, - -0.011344702070169355, - -0.012688083941339079, - -0.014037192004604404, - -0.01533632165431048, - -0.01654149052255549, - -0.01764665422306466, - -0.01865712245374701, - -0.01962969638157891, - -0.020558561808952713, - -0.021461168858475765, - -0.022342179023165543, - -0.023222491056171468, - -0.02410467130481503, - -0.024994920713383384, - -0.02584167126715098, - -0.026574461460744436, - -0.02715223913819692, - -0.02752284201212346, - -0.02769741590706737, - -0.027651042670589154, - -0.02738551740346884, - -0.02689481341133032, - -0.026223894578219664, - -0.02542689077923599, - -0.024589654507848335, - -0.023733713229563747, - -0.022863505243930382, - -0.021990086482741478, - -0.021093236419893857, - -0.020190638326279042, - -0.019263800212850346, - -0.018290971190738803, - -0.017219713297404404, - -0.016046661818398256, - -0.014769483763647562, - -0.01344190055147898, - -0.012096648259203147, - -0.01076474328940441, - -0.009486733667703862, - -0.008280025904343846, - -0.007184854246034433, - -0.0062165046498612875, - -0.0053742710394579785, - -0.004629165301402449, - -0.00397333105238562, - -0.003382015357511592, - -0.0028488395307724734, - -0.0023653000224677645, - -0.0019199738756304208, - -0.0015082756856006907, - -0.001131979787839077, - -0.0008067595988601739, - -0.0005471467520944406, - -0.00035365840334544707, - -0.00021565937304440785, - -0.00012925350818721038, - -7.71506121108878e-5, - -4.475131802994525e-5, - -2.354492120903995e-5, - -1.1104970449038465e-5, - -4.757386157128174e-6, - -3.115727228442111e-7, - 1.096912036757658e-6, - -6.226475796067277e-7, - -8.485517053458125e-7, - 5.528162178025653e-7, - -8.544639294449929e-7, - -5.491168992233231e-6, - -1.1876456331438856e-5, - -2.3326197505613155e-5, - -4.116901575401677e-5, - -6.994507244750814e-5, - -0.00011852894765518318, - -0.00020236160130571168, - -0.000336384672564749, - -0.0005284138006087513, - -0.0007809631439969489, - -0.0010928646313411172, - -0.0014466783420948315, - -0.0018433070557305475, - -0.0022801618854813577, - -0.0027563901559000126, - -0.0032741446853347123, - -0.0038423703758211913, - -0.004488063130125397, - -0.005231505494632527, - -0.006089289896219929, - -0.007059020757562706, - -0.008149149005067191, - -0.00933104969781845, - -0.010605210382055807, - -0.011944486308465896, - -0.01329855086527626, - -0.014610516997991319, - -0.015842066615901762, - -0.01698294913626397, - -0.018044571334358106, - -0.019054758778592862, - -0.02000359489738862, - -0.020921433920308485, - -0.02180437677095526, - -0.02269700424851695, - -0.023611629832147818, - -0.024534364886275417, - -0.025418471007173093, - -0.026212287074448226, - -0.02686201532578636, - -0.027340181067786462, - -0.02764540579610808, - -0.02772110363861291, - -0.027562895014820843, - -0.027156632488165966, - -0.026562356963527378, - -0.02584032729236141, - -0.025053074174637924, - -0.02422347593916585, - -0.023370647749959228, - -0.022495956499658132, - -0.02161375687728595, - -0.020744761435731396, - -0.019849877303475427, - -0.018912729548334117, - -0.01787855807714367, - -0.016735854370538705, - -0.015494167232614375, - -0.014196904909513641, - -0.012858264827953214, - -0.011510980564391704, - -0.01018681372436947, - -0.008927798939334541, - -0.007783348480864205, - -0.0067573138635314, - -0.005857559631296194, - -0.0050615280687998365, - -0.004355425518839717, - -0.003723327108469454, - -0.0031636640280406914, - -0.0026539929935607276, - -0.002182069767112771, - -0.0017419077136512362, - -0.0013340091077822525, - -0.000977520967044676, - -0.0006821837711534218, - -0.0004534160821506039, - -0.00028678229762002516, - -0.000174237070658112, - -0.00010334424958702293, - -6.114569798032488e-5, - -3.353963290197992e-5, - -1.6628033323473623e-5, - -7.035783765374504e-6, - -1.7858824171157472e-6, - 1.8513147459486845e-7, - -1.0989494220181584e-7, - -7.661171669837152e-7, - -2.7368905730629223e-7, - -3.656531918361239e-7, - -2.6773442693417415e-6, - -8.604237735521103e-6, - -1.7195666550229305e-5, - -3.0146789476159785e-5, - -5.104304814834704e-5, - -8.662596783109988e-5, - -0.0001511488349127399, - -0.0002563466767037115, - -0.0004158940075658646, - -0.0006352060711165564, - -0.000911207551209825, - -0.001236535385022608, - -0.0016099425920067523, - -0.0020223568683706006, - -0.00247185623614371, - -0.0029536439474607268, - -0.0034839342361911996, - -0.004090034324296388, - -0.004784413003188048, - -0.005584911993470942, - -0.0064944018731513675, - -0.007518484079402088, - -0.008648411166578274, - -0.009891909858341652, - -0.011206664717379577, - -0.012554167988639009, - -0.013874306049379004, - -0.015126171599389615, - -0.016308467577284158, - -0.017416954257316708, - -0.018461516714103787, - -0.019436158276965765, - -0.02036120086900306, - -0.02125052503202618, - -0.022166590500891648, - -0.023101599071339574, - -0.02404811009054597, - -0.024962509911146125, - -0.025796725158268086, - -0.026523791606864466, - -0.02711406068460709, - -0.02753371491738177, - -0.02772722651224968, - -0.02767449448635112, - -0.027361520654181015, - -0.026864684095384284, - -0.026220810859409582, - -0.025491469928959953, - -0.024696822044198097, - -0.023852493374317663, - -0.022985548776294273, - -0.022127461832405104, - -0.021283589134517666, - -0.020422315614410103, - -0.019516328272714878, - -0.018507315578743633, - -0.01740856985644096, - -0.01621394702161666, - -0.01495065645854654, - -0.0136265009829184, - -0.012264405580864612, - -0.010905006307529164, - -0.009607498122546188, - -0.008410634461264443, - -0.007328925910661144, - -0.006373428423475047, - -0.005517040035199927, - -0.004759712082880951, - -0.0040892550113505455, - -0.0034978878553036385, - -0.0029603478414684248, - -0.002461577102429835, - -0.0019902880255068256, - -0.0015551447187565626, - -0.0011679578531616497, - -0.000837592152573563, - -0.0005746896221969777, - -0.0003726243465187462, - -0.00023022863037075458, - -0.00013910936563188425, - -8.283752618831741e-5, - -4.6740185550675495e-5, - -2.4315361446258787e-5, - -1.1952333458575826e-5, - -4.715406592747939e-6, - 1.7036611693610482e-7, - 3.5881849747010364e-7, - -1.5227146794583035e-6, - -7.712357479316978e-7, - 8.162290845992182e-7, - -1.7258617308613111e-6, - -6.491558062260427e-6, - -1.1926122629346558e-5, - -2.1739302419221396e-5, - -3.833893996962878e-5, - -6.488216313443873e-5, - -0.00011057358646848758, - -0.0001916895684820341, - -0.00032282605959677024, - -0.0005056735200641982, - -0.000748255724427549, - -0.0010466378867527437, - -0.0013946521414600066, - -0.001781445862433173, - -0.0022014443956610563, - -0.0026526728491806373, - -0.003151420055027554, - -0.0037162667361138046, - -0.0043651145010003, - -0.005112150129284843, - -0.005955773464729253, - -0.006917127918681598, - -0.007997504706667713, - -0.009196090034140514, - -0.010479863453494165, - -0.011811950649326386, - -0.013125360512079187, - -0.014400233179752697, - -0.015622085365639193, - -0.016774192297527246, - -0.01785467099036997, - -0.018845271941054786, - -0.01978198108776824, - -0.02069475436014717, - -0.021627402489198755, - -0.02257607872614953, - -0.023541251137720487, - -0.0244699292363445, - -0.02534696784905799, - -0.026149929463790966, - -0.026836331775552613, - -0.02736741280695204, - -0.02767077152233094, - -0.02771839695388223, - -0.027515782890380647, - -0.02712316196694814, - -0.026570014821687138, - -0.02590750134326303, - -0.02513729861917191, - -0.024310367155561452, - -0.02346624213450138, - -0.022629136146238182, - -0.021810816461856897, - -0.02097667015950333, - -0.020089297329875577, - -0.01911610587616175, - -0.018065291319820598, - -0.016918660700222965, - -0.015699060810210497, - -0.01439011208631924, - -0.013021604062823378, - -0.01164224848807488, - -0.010308082452175182, - -0.009067881459333738, - -0.007935739413873821, - -0.006913601553495685, - -0.005996430636902916, - -0.005192104499259442, - -0.004478922996608237, - -0.0038524897424782045, - -0.0032848316939171895, - -0.0027553987253782775, - -0.0022563680071714387, - -0.001795112762141171, - -0.0013791930461302115, - -0.0010166390755015353, - -0.0007138670866952967, - -0.00047456520477168196, - -0.000302676261980217, - -0.00018480956746574906, - -0.00011101460853490952, - -6.51733218741124e-5, - -3.6213980750599006e-5, - -1.8413372358250246e-5, - -7.431452729911303e-6, - -1.823221666752417e-6, - -3.887862405904663e-7, - -7.109739576516283e-7, - -4.7625525217975806e-7, - 1.2623852457815943e-7, - -7.012248102733487e-7, - -3.7205612235524654e-6, - -8.951903825216156e-6, - -1.6767270613282648e-5, - -2.9376375803746857e-5, - -4.8413134694169635e-5, - -8.089378019310312e-5, - -0.000141897925587553, - -0.00024325632652799634, - -0.0003954336806296088, - -0.0006065044567195033, - -0.0008735692922361982, - -0.0011958720530529376, - -0.0015556753796403533, - -0.001947738163926127, - -0.0023714241949167603, - -0.002838902173273261, - -0.003368618163534065, - -0.003975051369723259, - -0.004663959567745513, - -0.005447280863695503, - -0.006351351296410401, - -0.007374975593631705, - -0.008525797750317088, - -0.009769304121932054, - -0.011068796986342, - -0.012377219195068345, - -0.013672435547194994, - -0.014925690205380315, - -0.016119034406076704, - -0.017224863859077566, - -0.018235746206022474, - -0.019197915888604478, - -0.020128693708995005, - -0.021078751532898843, - -0.02204232595884692, - -0.023008625779905867, - -0.023949065254369573, - -0.024869637968021163, - -0.025737190924692677, - -0.02651627033985282, - -0.0271420934279738, - -0.02753992938708294, - -0.027700302836075608, - -0.02761575310248998, - -0.027337932277981758, - -0.026883168211671304, - -0.026278681643791046, - -0.025545458365946794, - -0.02475194045315876, - -0.0239277860291347, - -0.023119464082717534, - -0.022326073162464932, - -0.021505195021817525, - -0.020639681253538378, - -0.01970352153962246, - -0.018701583019064216, - -0.01761390211361208, - -0.016434632369088265, - -0.015142615330229037, - -0.013782515619735036, - -0.01239035035875985, - -0.011035505768387577, - -0.009758178568576581, - -0.008566267764615054, - -0.0074816264577174385, - -0.0065084478176197225, - -0.005649745032855313, - -0.004893167442906521, - -0.004231104627514692, - -0.003626101084535205, - -0.003065773421839668, - -0.0025398635136164027, - -0.002053956338499918, - -0.0016125146824755299, - -0.00121533914573424, - -0.0008729930870744473, - -0.0005972551762028488, - -0.00038904793930932824, - -0.00024290989223885173, - -0.0001495654923865386, - -8.969193264007913e-5, - -5.169937615989717e-5, - -2.709473997358769e-5, - -1.2746485894998827e-5, - -4.669937092582899e-6, - -2.2553990319806871e-7, - -2.861262903830486e-7, - -1.2526943222179732e-6, - 1.0792792959346542e-7, - 5.621875212025174e-7, - -2.6820288873685705e-6, - -6.907177192816416e-6, - -1.2681172751882741e-5, - -2.3161632265233933e-5, - -3.7623757544402725e-5, - -6.0193370885086583e-5, - -0.0001016571366566632, - -0.00017979896958891795, - -0.00030447005447115094, - -0.00048210059146519546, - -0.0007200115624100834, - -0.0010143383246402626, - -0.0013452401788870416, - -0.0017103708460415867, - -0.002107331266735568, - -0.0025503690887373476, - -0.0030469510237013386, - -0.003605910128254286, - -0.004243603543969188, - -0.004973873385787642, - -0.005815981299341577, - -0.006783674396796446, - -0.007882788000477203, - -0.00907216309880321, - -0.010336656111984754, - -0.011634053409518674, - -0.012940019419721838, - -0.014222440920368118, - -0.015444710972291165, - -0.016573946637486736, - -0.01761304710314593, - -0.018596921290328416, - -0.019556278734318755, - -0.02052786843425841, - -0.021486237728629565, - -0.02245249558005058, - -0.023412361232922063, - -0.0243661892101531, - -0.025293213766464484, - -0.02614983084918604, - -0.02685239454116911, - -0.02734893760824053, - -0.027621544660425656, - -0.02766206418358913, - -0.02750859769707753, - -0.027146535267682348, - -0.026610394691341244, - -0.02592586482665693, - -0.025164100563011382, - -0.024379242232066112, - -0.02360486698355263, - -0.02281845147753142, - -0.022011981798914504, - -0.021171175353372373, - -0.020270923153121567, - -0.0193243361875568, - -0.01828986467913446, - -0.017148850474678734, - -0.01588586707210554, - -0.014539616749286888, - -0.013151595286395146, - -0.011785970939856338, - -0.010467318678813675, - -0.00922508178364645, - -0.008081388150026514, - -0.007043948212915763, - -0.006135710668091154, - -0.005337215707393372, - -0.0046285263389876374, - -0.003983452386465303, - -0.00339364122152247, - -0.0028412053097318646, - -0.0023330662460326335, - -0.0018641418952259348, - -0.0014335670942909884, - -0.0010542394717979464, - -0.0007371527288252411, - -0.0004938819403663142, - -0.0003183987747075734, - -0.00019830549864280345, - -0.00012084400478645785, - -7.22955720770524e-5, - -3.964064130496103e-5, - -1.9520579274623362e-5, - -7.835756310747843e-6, - -2.5015183829357746e-6, - -7.223853128457414e-7, - -1.7419652759143034e-7, - 1.4997134162308967e-7, - -1.5638268013873358e-7, - -1.3356068109260377e-6, - -4.6285082635488806e-6, - -1.093559503650976e-5, - -1.8969119078393604e-5, - -2.956317867486291e-5, - -4.425443205513524e-5, - -7.322026492923017e-5, - -0.00013136113261646987, - -0.00022806920003792808, - -0.00037746860360948764, - -0.000585041211561832, - -0.000846789319507657, - -0.00115031546587957, - -0.0014893947478847314, - -0.0018630979785939639, - -0.0022814745223917465, - -0.002743144776783002, - -0.003262487032506811, - -0.0038519888837816874, - -0.004526243761568849, - -0.0053144639959021855, - -0.006227540886947658, - -0.007261569312755178, - -0.00839587415732923, - -0.009620951194001304, - -0.010897485084341796, - -0.012212539241989895, - -0.013511027733482062, - -0.014751738777807055, - -0.015906978238251657, - -0.016974398150320202, - -0.017991050106211715, - -0.01898105058201771, - -0.0199582801051309, - -0.02091818852056787, - -0.02188906567344101, - -0.022855062206155075, - -0.02384470616394413, - -0.024823764566593354, - -0.02573465018991339, - -0.026509181630848977, - -0.027098235895592238, - -0.027483582621825986, - -0.027660633517268773, - -0.027625057496911132, - -0.027357010678048077, - -0.026895944229869018, - -0.02626560338539985, - -0.025560234087058376, - -0.024818794545472422, - -0.024063839859289837, - -0.02329259139508283, - -0.02250114379174556, - -0.021676758632901194, - -0.020822377046195495, - -0.01992799492376096, - -0.01893969763730713, - -0.017842441817172094, - -0.016609841839608952, - -0.015291061373219172, - -0.013923129400640999, - -0.012549908919287034, - -0.011199577061565325, - -0.009908921065376941, - -0.0087027145244844, - -0.007613284076229021, - -0.006655037869026104, - -0.005802854891885534, - -0.005047915178367224, - -0.0043631448367223435, - -0.0037385457790025667, - -0.0031618228624283318, - -0.002631341940369125, - -0.0021342234417850436, - -0.0016728854568556772, - -0.0012543958955209544, - -0.0008990684354713285, - -0.000620501897220127, - -0.0004089279749243113, - -0.00026018006147709993, - -0.00016224406077164355, - -9.851504568997305e-5, - -5.5784502207612e-5, - -2.86873592383885e-5, - -1.3889927350352327e-5, - -5.51077119304022e-6, - -6.189908606790695e-7, - -8.691292818774343e-8, - -1.0310724753992417e-6, - 4.8384079964769455e-8, - 1.3440387952590171e-7, - -3.9996457612545555e-6, - -9.182860806977722e-6, - -1.54194032740973e-5, - -2.3658806393045406e-5, - -3.420738016424174e-5, - -5.364264642526706e-5, - -9.313485424944368e-5, - -0.0001684569205141484, - -0.0002910649229730944, - -0.00046517549238878075, - -0.0006964789721318199, - -0.00097150868562762, - -0.0012851640282450782, - -0.0016366467576871546, - -0.0020302390960795225, - -0.0024620891361409325, - -0.00294169258125182, - -0.0034828298736263585, - -0.004112484750483203, - -0.0048490193581746666, - -0.005697472318788088, - -0.00666938691422192, - -0.007747425838790956, - -0.008923316237456791, - -0.010178110747881608, - -0.011489186417785291, - -0.012789840450559586, - -0.014047865404819615, - -0.01522355752279514, - -0.01632476224631524, - -0.01737902930481, - -0.018391462947597526, - -0.019379198203902936, - -0.020339934393814152, - -0.021305013525366123, - -0.02228943214528245, - -0.023312251149170737, - -0.024318325715074085, - -0.02527551219057106, - -0.02611275141052838, - -0.026790075675516112, - -0.02729691011188007, - -0.0276008934674411, - -0.027679260054310317, - -0.02751210132401244, - -0.02712852571438784, - -0.026572924004534038, - -0.02593366608075387, - -0.025233053338069966, - -0.024508712297884705, - -0.023747672150199406, - -0.02296214277797648, - -0.022169712245744377, - -0.021361170492511405, - -0.02050787137364729, - -0.01956616851465587, - -0.01850811332759089, - -0.017315983465480245, - -0.016041559694649987, - -0.014696768896346246, - -0.01332575492730953, - -0.011949609497063807, - -0.010611115431461371, - -0.009355880891772306, - -0.00821558614066803, - -0.007199634376941155, - -0.006296882438402207, - -0.005492557049189994, - -0.004759734822293082, - -0.004103221292162562, - -0.003503040735659324, - -0.0029475371206756917, - -0.0024223260263042112, - -0.001928277267383316, - -0.0014755182949444112, - -0.0010853239651836266, - -0.0007661881150684557, - -0.0005186595051442922, - -0.0003386027555455362, - -0.0002126418477423897, - -0.00013121604008192733, - -7.745906514905476e-5, - -4.261819552059398e-5, - -2.1519287505711304e-5, - -9.488184255779242e-6, - -2.889308547193714e-6, - -5.246707404094053e-7, - -4.547695574008692e-7, - -3.3956117079236847e-7, - -4.965907464127284e-7, - -2.490818222844471e-6, - -7.014588959408652e-6, - -1.3240047589235804e-5, - -1.918008312828956e-5, - -2.7092756466950974e-5, - -4.0067310341063145e-5, - -6.751419665967928e-5, - -0.0001230172686874642, - -0.00021775737194762446, - -0.00036357151462856896, - -0.0005627369261672621, - -0.0008080435691188992, - -0.0010990627932008779, - -0.001428053132185525, - -0.0017967381680500938, - -0.0021980572034212, - -0.0026405222424958907, - -0.0031428426395394005, - -0.0037283495479071282, - -0.004409900560454594, - -0.005200927786612519, - -0.006108106995215079, - -0.007121344000050656, - -0.008251716839472956, - -0.009476822441653598, - -0.010768698866994664, - -0.012066752566337158, - -0.013329294069579, - -0.014525984009145176, - -0.015669394627585986, - -0.01675555281060137, - -0.017790581739791145, - -0.018786954019623714, - -0.019745092379522933, - -0.02071865699123243, - -0.02172001463119705, - -0.022757052702153502, - -0.023788218905802017, - -0.02477973019145463, - -0.02566781660714257, - -0.02643912903511636, - -0.027058095720532693, - -0.027482807932945497, - -0.02767636699917808, - -0.027602729242340973, - -0.027311331791755322, - -0.026848951013340283, - -0.026279691041830977, - -0.02562843111949953, - -0.024928002134835203, - -0.024173983738307203, - -0.02341258596746998, - -0.022650216549938262, - -0.021877322691336576, - -0.021066547743542885, - -0.02016246122639065, - -0.019144776700502575, - -0.018006990268235046, - -0.01677918798702316, - -0.01546916244126112, - -0.014108195290467862, - -0.012706285448822408, - -0.011334114490191338, - -0.010036622300960751, - -0.00884530350304541, - -0.007776618148368553, - -0.006817199272163954, - -0.0059554330706657055, - -0.0051803474070953315, - -0.00449129700523937, - -0.0038618154036328955, - -0.003280781182318615, - -0.002726104098066673, - -0.002202383795954388, - -0.0017195742620945698, - -0.0012926144487427904, - -0.0009354802351138614, - -0.0006498198952978318, - -0.0004310845487874859, - -0.00027609575974330003, - -0.00017400431267788896, - -0.00010542470211083455, - -6.034744814598092e-5, - -3.231582749102513e-5, - -1.6375500120513475e-5, - -6.007676688735142e-6, - -8.934487568112992e-7, - -1.1847004011689144e-6, - -1.4700963838487624e-6, - 1.436889610628711e-7, - -8.111603377325416e-7, - -5.929545221550203e-6, - -1.077726399217882e-5, - -1.5634126286079297e-5, - -2.2726971819486685e-5, - -3.2667335936986674e-5, - -5.019674800260665e-5, - -8.711928458682294e-5, - -0.0001603837783064055, - -0.0002778202633048066, - -0.000444370912951797, - -0.0006627562540950094, - -0.0009294081597184811, - -0.0012353515478206734, - -0.0015788884396303327, - -0.0019501158433766763, - -0.002361910696726255, - -0.0028272468882409307, - -0.003369740945952382, - -0.004003315817166175, - -0.004734721513417195, - -0.005572649644874805, - -0.006529287703038733, - -0.007610867116699782, - -0.008793324203141106, - -0.010058499472653915, - -0.011339809038089732, - -0.012605168220257645, - -0.013827189913403481, - -0.015003251655213101, - -0.016121737259167657, - -0.01717967544592386, - -0.018177732360837806, - -0.01914537015167872, - -0.020130651806897715, - -0.021139730323085915, - -0.022191538229931307, - -0.02323404627358816, - -0.024243407952396212, - -0.025187368913286767, - -0.02604720845223668, - -0.02676879055805348, - -0.02730559369400698, - -0.0275986077879104, - -0.02763217254742656, - -0.02744994053484362, - -0.02708259606871921, - -0.02659506162910452, - -0.025993508022331357, - -0.025313649259785853, - -0.024582674051892628, - -0.023846656935524846, - -0.023111218051290627, - -0.022379101576093463, - -0.021597946425636283, - -0.02072488313677079, - -0.019756524386311924, - -0.01867761603102086, - -0.017507800933001305, - -0.016236209436756077, - -0.014882001364064479, - -0.013472684070671648, - -0.012078128303150748, - -0.010740978654454503, - -0.00950854727901318, - -0.008382925811758202, - -0.0073598014217400864, - -0.006446039772116774, - -0.005627188963381546, - -0.004899331219679837, - -0.00424094516652207, - -0.0036317663568045666, - -0.0030460653881085875, - -0.00249495870832267, - -0.0019829782498032023, - -0.0015253604681365052, - -0.001128935952453003, - -0.0007986415743042041, - -0.0005427682988103366, - -0.00035542803227034403, - -0.00022622605982952626, - -0.0001408894613567635, - -8.48256874693698e-5, - -4.772435058675306e-5, - -2.4611942322172453e-5, - -1.0456825624005628e-5, - -3.936803845749903e-6, - -1.8843057958406462e-6, - -1.1853642080672522e-6, - -1.840556927978909e-7, - -6.917064096501058e-7, - -3.36422920749202e-6, - -8.217311352809453e-6, - -1.3754357467365974e-5, - -2.0253649582024913e-5, - -2.818879262056484e-5, - -3.85261649381019e-5, - -6.286334737742871e-5, - -0.00011492139369712051, - -0.00020537862847624933, - -0.00034488665320314693, - -0.0005349396379412119, - -0.0007760823551759, - -0.0010589674940494342, - -0.001375125178805947, - -0.0017199387366012009, - -0.0021032660427934835, - -0.0025354261550153967, - -0.0030403843327011515, - -0.0036234528081167117, - -0.004294562911273447, - -0.005073413172204833, - -0.00597128752453846, - -0.006995426518443593, - -0.008134015608799672, - -0.009359467307442693, - -0.010615071886457328, - -0.011881374640684117, - -0.013120979564844482, - -0.014330736966139124, - -0.015477920802305367, - -0.016547086961499313, - -0.017557699602383292, - -0.018541337013668335, - -0.0195353121810124, - -0.020556905788903512, - -0.02160980666725204, - -0.022649235126570133, - -0.023684730751863392, - -0.0246784041991287, - -0.0256126346445672, - -0.026429334786048586, - -0.027062245927178763, - -0.027456948155979988, - -0.027604897027184327, - -0.027534264924717, - -0.02728011470235353, - -0.026875732479957226, - -0.026317973591809207, - -0.025674130258005357, - -0.024971152758509974, - -0.0242643850264756, - -0.023565273164965206, - -0.022857904336422485, - -0.02209641824806008, - -0.021264257447367096, - -0.020345469081401724, - -0.01932956540183528, - -0.01821999687076309, - -0.016984834783094593, - -0.015652052388820226, - -0.01424404093823467, - -0.012833822242996229, - -0.011474179812126672, - -0.010199070731195026, - -0.009011555715405462, - -0.007931865745899824, - -0.0069624674829624755, - -0.006096136797571983, - -0.0053330009491851516, - -0.0046394131352471835, - -0.003995343828818221, - -0.003382530880477963, - -0.0028064168861431926, - -0.0022689567840777913, - -0.0017803130458198257, - -0.0013419340614304054, - -0.0009709449042053508, - -0.0006745263409867475, - -0.00044958360470953584, - -0.00029308594920057773, - -0.00018687703773129227, - -0.00011529147198274803, - -6.697107523662149e-5, - -3.6325313729268505e-5, - -1.8301920445107367e-5, - -7.683254203028067e-6, - -2.81064945556464e-6, - -1.946316497136724e-6, - -8.064394994011792e-7, - 8.750733218598761e-7, - -1.523025698779712e-6, - -7.007480108511821e-6, - -1.195649543178634e-5, - -1.8377143187753298e-5 - ], - "datatype": "Float64", - "type": "series" - }, - "deflection_y_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -9.999997556011525e-5, - -0.0004017981487666883, - -0.0008787565518614017, - -0.0014706153093802694, - -0.0024051504259363686, - -0.0037972322215178225, - -0.005641981635719134, - -0.007960398858231507, - -0.010613486524838131, - -0.01357355270231286, - -0.01691902876798934, - -0.020601722811818015, - -0.024428503427351353, - -0.028329717022382288, - -0.03213622780994433, - -0.035908831834650615, - -0.03978399533216662, - -0.043710683026881345, - -0.047658697615093844, - -0.05165496876320559, - -0.055710679612661726, - -0.0599453845138708, - -0.06448326512433306, - -0.06913894385901007, - -0.07384848269412879, - -0.07850347763006828, - -0.0830290195452995, - -0.08746967133896884, - -0.09177880527821054, - -0.09577261018911098, - -0.09940934880018339, - -0.10269262822135374, - -0.10565628917472726, - -0.10850743841385453, - -0.11118851027262755, - -0.11366070314500773, - -0.11594959264564769, - -0.11806280609820097, - -0.12006289677161609, - -0.12202149137315577, - -0.12376840576904546, - -0.1251937196350047, - -0.1262617201687244, - -0.12688368468623634, - -0.12718439426172032, - -0.12715098928895532, - -0.12669974377847437, - -0.1258211199632525, - -0.12453598978185668, - -0.12290884224973762, - -0.12116144332035297, - -0.11928739749593262, - -0.11723765375566668, - -0.11503735800987762, - -0.11260884412158471, - -0.1100531904439918, - -0.10741066504862397, - -0.10456560906824629, - -0.10140823831803748, - -0.09791454555569341, - -0.094017764324498, - -0.08989276162095047, - -0.08561017920990534, - -0.0811220004819877, - -0.076499746207221, - -0.07176047219620493, - -0.06703435847444365, - -0.06251715862541933, - -0.05824035229460227, - -0.0540680096735222, - -0.050012950146459706, - -0.04597914766727466, - -0.04202506645223581, - -0.03821934337183042, - -0.034415385265260716, - -0.030524901641475942, - -0.026586106215972183, - -0.022663228434506466, - -0.018905947947356724, - -0.015481374405331604, - -0.012284473275674886, - -0.009386497619277855, - -0.006865349104482187, - -0.00478358387076461, - -0.0032217215468103976, - -0.002129511122294885, - -0.0012886225763421872, - -0.0006504807828150005, - -0.0002451821519383387, - -2.296922725714655e-5, - -6.896086982156532e-5, - -0.00025185770891069, - -0.0005020075003061199, - -0.0009392123487738536, - -0.0017246685579327507, - -0.0029085212985085224, - -0.004577399576157241, - -0.006628739665950586, - -0.008992431810520748, - -0.01180758349841192, - -0.015026324462637242, - -0.018579527999507288, - -0.022337919014925944, - -0.02612330548709932, - -0.02985937133016183, - -0.033683931737891394, - -0.037546621448101836, - -0.041440291284871394, - -0.045355794627813424, - -0.049228195323912996, - -0.053212849016542954, - -0.05745315702450916, - -0.06191656856067627, - -0.06652070136733372, - -0.07120188076773598, - -0.07580583257111735, - -0.08043168889145531, - -0.08503116114991216, - -0.08943672771074579, - -0.09356125528150663, - -0.09731651830285397, - -0.10071081353426858, - -0.10389355659267689, - -0.10690284410509521, - -0.10966328618960412, - -0.11224052079990654, - -0.11457222280359236, - -0.11677360565282052, - -0.11895246282030365, - -0.1210265542410636, - -0.12289930871988712, - -0.12448330875884085, - -0.12566965198617674, - -0.1265282025408052, - -0.12710883280374477, - -0.12727725742617835, - -0.12703934453995874, - -0.12631821827186, - -0.1251697885119012, - -0.12377147613251377, - -0.12219110507229207, - -0.12041476713392145, - -0.11847505868907734, - -0.1163037809427966, - -0.11396505594474692, - -0.11158581180564293, - -0.10906064314565524, - -0.10635561101109606, - -0.10333835180246662, - -0.09992505164383494, - -0.0962056127399408, - -0.09228586374190317, - -0.08811181312351493, - -0.08372522547525452, - -0.07911261147186255, - -0.07433467256555185, - -0.06965647419825617, - -0.06513178116418623, - -0.060767280085192096, - -0.056530285218841875, - -0.05236107866238326, - -0.04826273658385618, - -0.044360393702119034, - -0.040531823116832164, - -0.03668435796663224, - -0.03277701245820126, - -0.0287543311604155, - -0.02478692211364226, - -0.021017883945572965, - -0.017438333459375323, - -0.014046761875306877, - -0.010947319700406471, - -0.008167284060270936, - -0.0059147353149703675, - -0.004194768387729462, - -0.0028444823838013203, - -0.0017913066998276137, - -0.0009946885350999163, - -0.00044078848112799607, - -0.00017457586301481212, - -0.00012613246885227747, - -0.00011174742425918913, - -0.00022842185067864333, - -0.0005229508515033413, - -0.0011331471903878402, - -0.0021782996201915334, - -0.003608911660005339, - -0.005357073340274844, - -0.007524873555476381, - -0.010145884601059928, - -0.013198527214344316, - -0.0166632100166865, - -0.020266951924086, - -0.0239234597070969, - -0.027657369233440046, - -0.03147075976952589, - -0.035334202715018484, - -0.039229386374874435, - -0.0430251860529334, - -0.04682255980862145, - -0.050804469640988885, - -0.05497877385026853, - -0.05938687828223316, - -0.06392412302917037, - -0.06849214039140794, - -0.07312194993956096, - -0.07784880963786209, - -0.08250984760040213, - -0.08704117449144459, - -0.09126611478374372, - -0.09510750997842522, - -0.09870124980356174, - -0.10206665536527695, - -0.10520156536134563, - -0.10809779968818077, - -0.11071806944554312, - -0.11310912538057594, - -0.1154724308091257, - -0.11776179393526852, - -0.11995442647709798, - -0.12194905629014606, - -0.12360921997364277, - -0.12498924896138691, - -0.12610854332935872, - -0.12689369465739306, - -0.12729813223451727, - -0.1272430232686215, - -0.12666439217319725, - -0.12575185423952273, - -0.12455109484559165, - -0.12312552273387957, - -0.12149944624336073, - -0.11960149643863373, - -0.11749006953148655, - -0.11530330593573485, - -0.113038186789263, - -0.11065948436518655, - -0.10808222574031724, - -0.10512172950298856, - -0.10187402043560463, - -0.09836307974384018, - -0.09459486432931749, - -0.09057983789692796, - -0.08626597031713797, - -0.08165273303375364, - -0.07695315871517813, - -0.07230106180757313, - -0.06774175526150643, - -0.06334793664680986, - -0.05898726324762881, - -0.05471455375987487, - -0.05062441335540564, - -0.04670215486727449, - -0.042853173495203754, - -0.03899793430558769, - -0.0349961264754445, - -0.030949906652429325, - -0.027015413594986888, - -0.023167183408820523, - -0.01946498855816057, - -0.01590674905206695, - -0.012561221105066082, - -0.009616679119213102, - -0.0072128908116917325, - -0.0052335877391092925, - -0.003660881166790763, - -0.002397170754649366, - -0.001401413147524684, - -0.0007692548894895762, - -0.00041826864685325614, - -0.00020522766818815118, - -7.214376417760335e-5, - -4.2037224808425325e-5, - -0.00017954029599643803, - -0.000704302510702132, - -0.0015585655281089641, - -0.002714180383862179, - -0.004233561828928457, - -0.006160834821227205, - -0.008585982962137164, - -0.011527779962300932, - -0.014792178947275737, - -0.018209982583338412, - -0.021803124504210663, - -0.025483650224084477, - -0.02929937759224452, - -0.033180562957581435, - -0.03698069771516449, - -0.04070557173573251, - -0.044495409940726344, - -0.048412306290848535, - -0.05255289309712111, - -0.056895408947492676, - -0.06128609795031694, - -0.06580528197903028, - -0.0704560195045171, - -0.07520798174321566, - -0.07997467196105867, - -0.08457729736782019, - -0.0888414761811051, - -0.09285483667948803, - -0.0966295366404493, - -0.10015612110383766, - -0.10346032728976857, - -0.10641783767307159, - -0.10909690448360661, - -0.11163911902274339, - -0.11410897723017104, - -0.11651081784948515, - -0.11881975928356803, - -0.1208578067358112, - -0.12265830555926242, - -0.12424559777704436, - -0.12555931677377427, - -0.12659575477211168, - -0.1271971938191693, - -0.1272803889286988, - -0.1269326183985585, - -0.12624021658251117, - -0.12524053368071328, - -0.12401816068109461, - -0.12246032847807034, - -0.12062773518564698, - -0.11865389312124432, - -0.11657290580872805, - -0.11444680060088297, - -0.11219644736094898, - -0.10966548210876151, - -0.10684039157995004, - -0.1037707794021224, - -0.1004181680455314, - -0.09686277537873492, - -0.09297197909023489, - -0.0887006778160706, - -0.08418871251163733, - -0.07955669211391153, - -0.07493426678024041, - -0.07040803912039317, - -0.06590846554881073, - -0.06142851019436744, - -0.05713855606836997, - -0.05300974031794216, - -0.049071836288043826, - -0.04521269341599314, - -0.0412637233723261, - -0.03723472043642539, - -0.03323292191680885, - -0.02926369012204994, - -0.025376080012230358, - -0.021571165103322174, - -0.017802052648385455, - -0.01430853156131187, - -0.011221979052443239, - -0.008591468633311939, - -0.006406670464297928, - -0.00459097042093672, - -0.0030597301438626875, - -0.001945764165382658, - -0.001212325210357192, - -0.000709595302110658, - -0.0003786186990465488, - -8.726128363468338e-5, - 9.118294753840406e-5, - 5.195117701738486e-6, - -0.0003814778016940183, - -0.0010049427707161766, - -0.0019496428547892842, - -0.003204276166140287, - -0.004915377365073391, - -0.0071991742227656835, - -0.009917285441084597, - -0.012962827716850832, - -0.016249985911929672, - -0.019710698645329677, - -0.023357136690621214, - -0.027199028899735966, - -0.031001126010343973, - -0.03474085718865606, - -0.038439969036438384, - -0.04216961332937936, - -0.04608399656434365, - -0.05019225791504251, - -0.0543782212706054, - -0.058674617813344106, - -0.0631505360417798, - -0.06777632477634092, - -0.07259836701702184, - -0.07739332706695892, - -0.0819974237942156, - -0.08638548228494575, - -0.09054827848842872, - -0.09448048928254067, - -0.09821092502230569, - -0.10160657502550287, - -0.10463766823922163, - -0.10745835303081945, - -0.11009840184232927, - -0.11269612485721306, - -0.11522713984400118, - -0.1175619551711693, - -0.11968244301352429, - -0.12163999556534301, - -0.12338894353353709, - -0.12494960259280068, - -0.1261787007479933, - -0.12691421022438396, - -0.12722069122984048, - -0.12709400104376298, - -0.12662541096380214, - -0.12587459420773872, - -0.12477347001141435, - -0.12330777288019176, - -0.1216161513120188, - -0.1197315146112413, - -0.11779777566671892, - -0.11581500858937924, - -0.1136090909516827, - -0.11117533077125177, - -0.10848811005123235, - -0.10556543427584175, - -0.10244748642354609, - -0.09905323788820375, - -0.09523533209743142, - -0.09109853509939074, - -0.08668318862109825, - -0.08214019796417595, - -0.07761498436592357, - -0.07304054403006902, - -0.06844784419886082, - -0.06394091538640939, - -0.05958225225031192, - -0.055429887157369094, - -0.051496353846508434, - -0.0475383726606317, - -0.043541649751930894, - -0.039529272448833995, - -0.035514420306614, - -0.031569718984612014, - -0.02765141570663899, - -0.02367773868046316, - -0.019789474177168635, - -0.016180667785521758, - -0.012912419144149742, - -0.010116827863032125, - -0.0076813012139186725, - -0.005566769616714471, - -0.0038705333317137387, - -0.0026167726554974253, - -0.0017126471613505192, - -0.0010991110681434248, - -0.0005968459957286076, - -0.00014511800251628543, - 8.234540049842712e-5, - 0.00010159343540842858, - -0.00012078074338483201, - -0.0005821893707461893, - -0.0012693142371044182, - -0.0022853179233928884, - -0.003847890169643919, - -0.005905884489565617, - -0.008396332214922744, - -0.011247979869478437, - -0.01432046370880677, - -0.01769097790194575, - -0.021338249716835088, - -0.02509672289555881, - -0.02883642532780993, - -0.0325392110607879, - -0.03616847991379301, - -0.03992118748171986, - -0.043830224464458806, - -0.04780769735607297, - -0.05189597261347711, - -0.05610978888662753, - -0.060499131797717855, - -0.06515108609604396, - -0.06997289695901329, - -0.07472917586325928, - -0.07939705317332754, - -0.0838650808452778, - -0.08816141034680892, - -0.09230955977665885, - -0.09616258108319944, - -0.09964112779869484, - -0.10281061074165734, - -0.10572825701323173, - -0.10851758474107626, - -0.11126901237850256, - -0.11382319459964087, - -0.11621769519639, - -0.11845044726422624, - -0.12052198679851449, - -0.12248360693844502, - -0.12423659737672668, - -0.1255940215088547, - -0.1265368030554506, - -0.12704056291525428, - -0.1271362671994768, - -0.1269552230422915, - -0.12638203256543423, - -0.12541172765096514, - -0.12409448397637472, - -0.12249653193172781, - -0.12077176062165797, - -0.11900792025580666, - -0.11706980124228654, - -0.11494619865115312, - -0.11261629508300207, - -0.11004025200885312, - -0.10733726818783998, - -0.10439813975123134, - -0.10110987523793817, - -0.09744626182110103, - -0.09342262199712108, - -0.0891215503187576, - -0.08474450007661545, - -0.08024989403676681, - -0.07564355321899201, - -0.07102907360248388, - -0.06643921869463132, - -0.06206046657021442, - -0.0579264362591979, - -0.05389284240287276, - -0.049860900213523136, - -0.045852791778080146, - -0.04181150949295714, - -0.03785274535248203, - -0.033925905926221495, - -0.029896021018970077, - -0.025844056861130824, - -0.021875576049518366, - -0.01812381731189605, - -0.014743830898019837, - -0.011742171489478433, - -0.009013275785487546, - -0.006698212166193557, - -0.004805318517357668, - -0.003364840240689302, - -0.002347860788922654, - -0.001551202089789306, - -0.0008511903952812105, - -0.0003285659729547769, - -6.039781646031972e-6, - 0.00012142162496631831, - 3.9081506979128655e-6, - -0.0002191065722913811, - -0.0006751419495129654, - -0.001546387023190517, - -0.002897168096353607, - -0.004725385020825658, - -0.007000063702199459, - -0.009574152722950952, - -0.012486619260891334, - -0.01579616279757056, - -0.019333190030501, - -0.023024699850976108, - -0.026710170484823624, - -0.03031867724161811, - -0.0339590888947608, - -0.03773438902836793, - -0.04155850865960848, - -0.045472716658397486, - -0.04945180417442821, - -0.053535833791106796, - -0.057920372258022775, - -0.06255439087240285, - -0.06730082873206987, - -0.07205905234525464, - -0.07673530345627427, - -0.08127928389581444, - -0.08577763086023626, - -0.09005151676073991, - -0.09400179287483301, - -0.09761987666686316, - -0.10088890166456056, - -0.10395782678621839, - -0.10692623473667427, - -0.10973306556241955, - -0.11235433352916634, - -0.11482949027607244, - -0.11711696568398651, - -0.11936752048479977, - -0.12151091237325824, - -0.12338343186032974, - -0.12491711087325183, - -0.12602604001095058, - -0.1267292921063254, - -0.12712933583738462, - -0.12716410561877148, - -0.1267556875163003, - -0.1259615707057959, - -0.12475436566770376, - -0.12332732086728236, - -0.12178966816473186, - -0.12010228494793924, - -0.11825601845721331, - -0.11621681401727567, - -0.11394577860937917, - -0.11155987535515507, - -0.10903980202353872, - -0.10622710375641926, - -0.10310272069708612, - -0.09954848085462659, - -0.09565299107738758, - -0.09156464154234623, - -0.08729904284958413, - -0.08283613032927988, - -0.07825187503477234, - -0.07357194288583623, - -0.06897536092195493, - -0.06462298284926098, - -0.06040265478259593, - -0.05629701203860348, - -0.05222163130678451, - -0.04814654662080831, - -0.044147355812068925, - -0.04023966069115788, - -0.03625107642753997, - -0.032188175437227615, - -0.028072435588989912, - -0.023995284550647162, - -0.02019667850820678, - -0.016685084152572034, - -0.013425984083793462, - -0.010481018807677586, - -0.007938031890593163, - -0.00583744158062314, - -0.004277786268155013, - -0.0030558057137199217, - -0.0020340664401063847, - -0.0012191515769456283, - -0.0005837052757865311, - -0.00017083399458036642, - 1.684627209669158e-5, - 9.440845927025099e-5, - 7.505776573528758e-5, - -0.000244371693990178, - -0.0009086617452957572, - -0.002063013751583338, - -0.0036906309218253325, - -0.005663071378493626, - -0.008002774493626201, - -0.01078481259719276, - -0.013943926116654879, - -0.017400225369705116, - -0.021010393142991583, - -0.024558154871457225, - -0.028148245067581748, - -0.03181629581084452, - -0.0355520516006578, - -0.03934568535657515, - -0.043161120211437594, - -0.04699565553334517, - -0.05105887660293842, - -0.05540154082905612, - -0.05994170273195137, - -0.06465240171826424, - -0.06935276487310292, - -0.07402732844587136, - -0.07871403424481484, - -0.08332423640877257, - -0.08769864274092416, - -0.09179248170065961, - -0.09548904810123961, - -0.09890123946286616, - -0.1021711335651671, - -0.10524414839730649, - -0.10813974817126067, - -0.11082767791696216, - -0.11332516125301718, - -0.11575701479953752, - -0.11817298847201084, - -0.12041469318296844, - -0.12244119610054395, - -0.12410484735585602, - -0.1253785138838201, - -0.12636491237608735, - -0.12699937573004444, - -0.1272335830422475, - -0.12703656011134468, - -0.1263675826988052, - -0.1253311984820784, - -0.12411994334470484, - -0.12270665954334632, - -0.12114458147728109, - -0.11937250823766198, - -0.11736280133210784, - -0.11524615372784065, - -0.11303451771052257, - -0.11064091087721979, - -0.10799462347183728, - -0.10497452810002164, - -0.10154363354659711, - -0.09787647404478904, - -0.0939442320411769, - -0.08978713016059621, - -0.08541025863774192, - -0.08080349568243228, - -0.07612472897681145, - -0.0715752416853258, - -0.06717366762519317, - -0.06290738514542549, - -0.05873543144368625, - -0.0545461799343426, - -0.05048341768016494, - -0.046535231577216354, - -0.042602396218679714, - -0.0386051764502509, - -0.03449450444074998, - -0.030295089827606675, - -0.02622941862398938, - -0.022363809355398327, - -0.018662057185612854, - -0.015221140189260272, - -0.012045673031630549, - -0.00927787369431624, - -0.0070420484193170155, - -0.005276793176824142, - -0.003814095395183158, - -0.0026364301213813663, - -0.0016520945975272358, - -0.0009143441385050764, - -0.00046342059669294937, - -0.00013048023187646474, - 0.0001216682615035325, - 0.00023758146445218738, - 0.00010795296359618345, - -0.000406024888283181, - -0.001400748310163109, - -0.0027236733928684516, - -0.0044294925857786705, - -0.006575957894732232, - -0.009163298948830676, - -0.012207016454854407, - -0.015548620359719725, - -0.018976199393509335, - -0.022460671324722736, - -0.02604881235459515, - -0.02968328694054493, - -0.03342588086824031, - -0.03715193614747726, - -0.04083487333162969, - -0.044624619923316546, - -0.04863500538246445, - -0.05288944814932385, - -0.05738884524331268, - -0.06198617748274445, - -0.06660376997690051, - -0.07134547245173722, - -0.0761044806614952, - -0.08080754107511905, - -0.0853068058649951, - -0.08945490479191208, - -0.09327379705977315, - -0.09689995953381068, - -0.10030263870019404, - -0.10350078158052302, - -0.10648231249938166, - -0.10918841767967118, - -0.11179946202696284, - -0.11436920949377283, - -0.11687680586908825, - -0.11925884873244544, - -0.12138552572945997, - -0.12315753656858806, - -0.12467358023309541, - -0.12588801900404015, - -0.1267503447695683, - -0.12721806020106186, - -0.1271546299450473, - -0.12666041013089932, - -0.1258644410807841, - -0.12482022256502222, - -0.12356818113789056, - -0.12210767168605415, - -0.12036122146534274, - -0.11847942298825205, - -0.11650439941886268, - -0.11441513088770258, - -0.11218953259643716, - -0.10964432042597509, - -0.10672533347078302, - -0.1035030813512229, - -0.10001213001406295, - -0.096250945091055, - -0.09224946517906335, - -0.08788821613722797, - -0.08331481493048479, - -0.07871418570183054, - -0.07416690700475655, - -0.06975600830147996, - -0.06543245524859663, - -0.06112577717510775, - -0.05691515674844543, - -0.05287812008827135, - -0.0489080450911493, - -0.04499054384307894, - -0.04095573827491708, - -0.03677886877464727, - -0.03260903816165139, - -0.02852995751115036, - -0.02455981214742781, - -0.020749829349561592, - -0.017094221149892373, - -0.013691136043191625, - -0.010790853502733495, - -0.008359845013125288, - -0.006360035927419927, - -0.004699816036042317, - -0.0032942529606628983, - -0.0021661223094497934, - -0.0013912353243109334, - -0.0008113639530600951, - -0.00032983910403955145, - 5.161624259488774e-5, - 0.00034082720093713166, - 0.00032642659253884557, - -6.572383188354312e-5, - -0.0007986300686676304, - -0.0018639853452144303, - -0.003340951767453122, - -0.005235982289319738, - -0.007677374725781774, - -0.010574537689279065, - -0.013703629810668428, - -0.01700907568303077, - -0.020423725345990858, - -0.023953906656605326, - -0.027620772027792513, - -0.0313299212504713, - -0.03493300204900067, - -0.03856678522719664, - -0.042299089142487534, - -0.04624551136991152, - -0.05046575475061867, - -0.05483277098197384, - -0.05929153027910234, - -0.06390515314789812, - -0.06865525969430643, - -0.07347015174851773, - -0.07827203222650535, - -0.08279759534670382, - -0.0870430464799902, - -0.09104473728999554, - -0.09481286653285098, - -0.09837932754703636, - -0.10170704889264531, - -0.10471045605756396, - -0.1075117960886439, - -0.11024388360430727, - -0.11290555485104485, - -0.11555172348600536, - -0.11800421762672404, - -0.12018975048749456, - -0.12214927317571656, - -0.12387011166981945, - -0.12530627347959986, - -0.12641291995476694, - -0.12702303151839628, - -0.12714293282423225, - -0.12689141932856618, - -0.12628420660459147, - -0.12545048335000583, - -0.12435148940591255, - -0.12293768658133779, - -0.12129932265562844, - -0.11953910950950143, - -0.11767833031415235, - -0.11576753675991679, - -0.11363286168585406, - -0.11116298111611247, - -0.10841952896712026, - -0.10537149666662415, - -0.10208317870988382, - -0.09852225810252624, - -0.09458670373004445, - -0.09030094579354776, - -0.08584168722813203, - -0.08127785069225874, - -0.07678362867084297, - -0.07236039035913595, - -0.0679164889170083, - -0.06355908235619909, - -0.059334702810321105, - -0.05526493167750943, - -0.051327285816967196, - -0.047381352095516076, - -0.043267457213199294, - -0.039117553228314596, - -0.034962165041674244, - -0.030859419101573735, - -0.026852224233872228, - -0.0228728864974084, - -0.019015334008176683, - -0.01549941872728242, - -0.012417820633347515, - -0.009772459985547472, - -0.007569660172135818, - -0.00563674702069249, - -0.004041520928663268, - -0.002832538343878821, - -0.0019218946224355306, - -0.001212135749540457, - -0.0006193068387490633, - -5.729406825733842e-5, - 0.0003352292179545375, - 0.00040265909485930236, - 0.00020752869998462778, - -0.00031383956524118524, - -0.0011362157663747652, - -0.002331135053954033, - -0.004054643570991939, - -0.006334884782338488, - -0.008989447513743599, - -0.011945288532817292, - -0.015101494654708638, - -0.018411576626703785, - -0.021963478624642825, - -0.025601028262130447, - -0.029203545128507792, - -0.03276564352050114, - -0.03633992255306603, - -0.040013719486836845, - -0.04395374380464152, - -0.048054138504416824, - -0.05227094859697026, - -0.05666312722963572, - -0.06121085774352589, - -0.06596488480860833, - -0.07085191664195307, - -0.07564828760289119, - -0.08021924359298817, - -0.08459672938281404, - -0.08872224140244532, - -0.09268638152542871, - -0.09641085263908318, - -0.09977968021442916, - -0.10287756406638418, - -0.10579810860155396, - -0.10862083814843033, - -0.11142737104389383, - -0.11413892422874028, - -0.11661818157013445, - -0.11894319323183632, - -0.12105079857370815, - -0.12296692192160903, - -0.12464921106268673, - -0.1259130886043857, - -0.12669649395187754, - -0.12704569277809924, - -0.1269898652108603, - -0.1266391907287463, - -0.1260134795897296, - -0.12499341096186181, - -0.12369762906994679, - -0.12217414892490326, - -0.12052599151279451, - -0.118844064857144, - -0.11702736124111798, - -0.11494928204187525, - -0.11262864214692661, - -0.11002285454099035, - -0.10716933775051302, - -0.10411034005848047, - -0.10066476736595194, - -0.09684379401778227, - -0.09268745017268105, - -0.0882996686715145, - -0.08385190111462042, - -0.07942029815761555, - -0.0749115124237001, - -0.07041972416054844, - -0.06602003757178466, - -0.061750207291064674, - -0.05771776375470198, - -0.05374946648836505, - -0.0497132252407539, - -0.04561192798902902, - -0.041479277954295374, - -0.037330873260672866, - -0.033261094808486553, - -0.029150253711978234, - -0.025023588241553107, - -0.021073327809215676, - -0.017399035924501614, - -0.014144541415955454, - -0.011329081302949101, - -0.008841318166439963, - -0.006669541848573234, - -0.0049400582145917495, - -0.0035671925117684317, - -0.0025432325738188547, - -0.0017171325476942473, - -0.0009261398776764743, - -0.00025340970988864224, - 0.0001901109923997113, - 0.0004039814032324486, - 0.0003630078206727106, - 5.867412326745168e-5, - -0.00047680514120873596 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/oscillating_beam_2d/validation_reference_33.json b/validation/oscillating_beam_2d/validation_reference_33.json deleted file mode 100644 index 45b764827..000000000 --- a/validation/oscillating_beam_2d/validation_reference_33.json +++ /dev/null @@ -1,4031 +0,0 @@ -{ - "meta": { - "julia_version": "1.10.0", - "solver_version": "v0.1.0-6-g3164e99d-dirty", - "solver_name": "TrixiParticles.jl" - }, - "deflection_x_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -2.5558510863277206e-10, - -2.3337961313485422e-7, - -1.9999958832395137e-6, - -7.333024902411722e-6, - -1.733360633004999e-5, - -3.3147499823804605e-5, - -5.710564146138575e-5, - -9.450998288085266e-5, - -0.00016064710698227014, - -0.00026842107754510014, - -0.0004278162670967589, - -0.0006553771383626117, - -0.0009477118714235067, - -0.001297764942953361, - -0.001689849144064226, - -0.0021208039926826627, - -0.0025920035700621735, - -0.0031086242958802135, - -0.00367060425822735, - -0.0042932699627534765, - -0.00499164428780996, - -0.00578328414841528, - -0.006701152173500702, - -0.007743935367222177, - -0.00890635720701588, - -0.010164846478895928, - -0.011507231463020684, - -0.012893196785456085, - -0.014307233410923326, - -0.015685342820725756, - -0.016982641135310728, - -0.01817209443450185, - -0.019259968009516293, - -0.020288678413565187, - -0.021272142067080446, - -0.02222431467129604, - -0.023145589933620758, - -0.024064098008287182, - -0.024970631197535953, - -0.025899354249389273, - -0.02680629828030595, - -0.027639595769840375, - -0.02832866651755994, - -0.028830881718850676, - -0.029122974408734903, - -0.0292054750095046, - -0.02906582703498689, - -0.028686011882615436, - -0.028095543151132385, - -0.027326484190601186, - -0.0264798224553619, - -0.025587498539469122, - -0.02468779124872511, - -0.02377487719159449, - -0.02285481534242917, - -0.02191087956439114, - -0.020962236325153594, - -0.019988318337890443, - -0.01894728037444704, - -0.017812671360728005, - -0.016556906664848048, - -0.015217287187947903, - -0.01382537636565817, - -0.012430918043051187, - -0.011053654012438685, - -0.009733700267755663, - -0.008491733728368978, - -0.007375158428091666, - -0.006388136290436219, - -0.005522207634613585, - -0.0047642254470653955, - -0.0040904857081743295, - -0.0034835691331058793, - -0.0029346266949041855, - -0.00244080324441881, - -0.001981968847110216, - -0.0015586686260536387, - -0.0011705674267509236, - -0.0008375140319020202, - -0.0005693123308583847, - -0.00036731234919035183, - -0.00022672538456464109, - -0.00013665256049816277, - -8.0396504383351e-5, - -4.736033354868496e-5, - -2.672439701023599e-5, - -1.257179627012217e-5, - -4.445704367972425e-6, - -9.864628413569498e-7, - -9.188216076871925e-9, - 1.271472768737958e-7, - -1.3268426041213033e-7, - -3.959704698575095e-7, - -7.771469209827409e-7, - -3.5497703748110787e-6, - -1.1005772213634746e-5, - -2.303575486750642e-5, - -3.884376948948276e-5, - -6.626943326437651e-5, - -0.00011286769614932135, - -0.00019079026876944738, - -0.0003160301414780742, - -0.0005011853451649118, - -0.0007500400244618843, - -0.0010603471527112496, - -0.0014185403596830848, - -0.001823522675277689, - -0.0022695858570802585, - -0.002755040951794463, - -0.003283651143013211, - -0.0038559508838840184, - -0.004497442039246458, - -0.005230082660676039, - -0.006077663695405633, - -0.007038251057909339, - -0.008124891305264781, - -0.009313095158320461, - -0.010601976506165456, - -0.011972425018588084, - -0.013386765167387404, - -0.014787620684013458, - -0.01611987417695182, - -0.017358778920286866, - -0.018507810571916028, - -0.019593103235761578, - -0.02060891271774956, - -0.021584375882254647, - -0.022508579784942417, - -0.023422668186423024, - -0.024348233521016116, - -0.02530062152163448, - -0.026240544492545037, - -0.027128538330509322, - -0.02789638673667305, - -0.0285076081157844, - -0.02895354185651472, - -0.02919266555385286, - -0.029209243438136356, - -0.02895920222015086, - -0.028477097744490643, - -0.02780670597792778, - -0.02703026549268278, - -0.02618117829426836, - -0.025305656460297588, - -0.024393752892863607, - -0.023465058112569492, - -0.02254196913967066, - -0.021618506976952778, - -0.020685264549037352, - -0.019691477071807295, - -0.01860342031289891, - -0.017397977368263817, - -0.016110964225755697, - -0.014754332554721306, - -0.013370805369051164, - -0.011968449533906356, - -0.010592912951566447, - -0.00929136291159327, - -0.008099427913458024, - -0.007036240348239464, - -0.006100722383386936, - -0.005275097072120871, - -0.004537122779138092, - -0.003886638960225397, - -0.003303289543432897, - -0.0027798658074466576, - -0.002294369945890995, - -0.0018403407447509235, - -0.0014188561467817773, - -0.0010481518650607424, - -0.0007374605214681695, - -0.0004947937590051854, - -0.00031566779405722833, - -0.00019132409664301964, - -0.00011474283841761412, - -6.778394811424171e-5, - -3.862429200007789e-5, - -2.0074421572702228e-5, - -8.993691671677073e-6, - -3.2852869579769184e-6, - -1.927775787335939e-7, - 5.508029085610211e-7, - -6.454635450570123e-7, - -8.772490375785758e-7, - -6.032782873255371e-8, - -1.3089535281785025e-6, - -6.696546653972568e-6, - -1.4682846041391695e-5, - -2.6722725691874505e-5, - -4.601263177000936e-5, - -7.88417029700117e-5, - -0.00013546891745175316, - -0.0002274406498674053, - -0.00037389569352391794, - -0.0005805596739226204, - -0.0008470358671283096, - -0.001171429636433241, - -0.0015462528801752917, - -0.0019675418516668652, - -0.0024256704853721223, - -0.002918403512877532, - -0.003449619911189583, - -0.004045111643356525, - -0.004718444135202615, - -0.005498942306169485, - -0.0063867993232953335, - -0.007386231796428222, - -0.008500556994766484, - -0.009734139641863149, - -0.01106683998669905, - -0.012463919543138857, - -0.013871942523158654, - -0.015226344307501194, - -0.016517529870939907, - -0.01772536173960848, - -0.01886773267282632, - -0.0199296381097121, - -0.02092267823730276, - -0.021856078673200607, - -0.022781991014406366, - -0.02371701087519318, - -0.024681970654254703, - -0.025650451380267558, - -0.026563570245607848, - -0.027398151086220512, - -0.02811450363306539, - -0.028696181272927723, - -0.029086874536933982, - -0.02925176682797931, - -0.029137747689459648, - -0.028786782081406337, - -0.02822853979539991, - -0.027540494232438317, - -0.026757670920880883, - -0.025899341907259843, - -0.024996497309338228, - -0.024072575261416096, - -0.023158696752444308, - -0.022259454624404984, - -0.021361812415774617, - -0.020397254284333755, - -0.019355519129330256, - -0.018208722636550934, - -0.0169798153065695, - -0.015675279762824235, - -0.014309827524735863, - -0.012897834013660403, - -0.011488087384310508, - -0.01012975087784257, - -0.008871122671600451, - -0.007740142900284186, - -0.0067224977955764875, - -0.005823441462091794, - -0.005023526178503879, - -0.004319398039841549, - -0.003696169472774291, - -0.003142146954973557, - -0.0026255082931465057, - -0.0021412638811891815, - -0.001691020853898939, - -0.001284923906992752, - -0.0009374766182257965, - -0.0006499885272097106, - -0.00042714288632406117, - -0.0002674235045921347, - -0.0001613568441378166, - -9.564439858733564e-5, - -5.6169134226957684e-5, - -3.0801258990131863e-5, - -1.613075230333383e-5, - -6.751942446592274e-6, - -1.0731938375196926e-6, - 2.4738485704389745e-9, - -7.37953831209115e-7, - -7.17668407201888e-7, - 2.3287177408626292e-8, - -5.659169109994977e-7, - -3.1819888348660896e-6, - -8.740445903987482e-6, - -1.769550968722111e-5, - -3.26906568743901e-5, - -5.5937083158152934e-5, - -9.401927322777448e-5, - -0.00016224170033157792, - -0.000272528111771031, - -0.00043630357983787116, - -0.0006624811189115953, - -0.0009489924508113146, - -0.0012909750039766243, - -0.0016853420119950502, - -0.0021143174093593564, - -0.0025776405500779753, - -0.00307235585886223, - -0.003623884304973457, - -0.004250745844606385, - -0.0049670627167862635, - -0.005776659459275191, - -0.006698509704469502, - -0.007739027515127228, - -0.008901133531473704, - -0.010187593369277659, - -0.011549878483323062, - -0.012943200092276008, - -0.014315187983455713, - -0.01564804659577157, - -0.016913906500202913, - -0.018115060198543087, - -0.01921825687182782, - -0.02024054662336805, - -0.021196117932898217, - -0.022128779599673465, - -0.02308436227849553, - -0.024056276322140413, - -0.025026616152315495, - -0.025962643662673535, - -0.02685264797900777, - -0.027653478033895618, - -0.028359974566928348, - -0.028887182436666714, - -0.029189058699692405, - -0.02922375700705221, - -0.02900955386110221, - -0.02858826312934193, - -0.02800611598132524, - -0.027291777474418244, - -0.026472018613981352, - -0.025585362075672358, - -0.024664204348328167, - -0.023773008518193695, - -0.022891515938144757, - -0.022007592199404458, - -0.021074369032429652, - -0.020073404623008995, - -0.018983371301472596, - -0.01782247109257684, - -0.016574710508680535, - -0.015239270330725863, - -0.013836246017762621, - -0.012401369420262709, - -0.011008710756758688, - -0.009692482619356124, - -0.008487716227203235, - -0.007394661507194256, - -0.006417704571558658, - -0.005544786602410812, - -0.004787026817127227, - -0.004121182844265547, - -0.003523997479615404, - -0.0029761364909812738, - -0.0024629226727396203, - -0.001984313920819325, - -0.0015488151174263276, - -0.001164894115986359, - -0.0008342497444093211, - -0.0005674370991060607, - -0.00036391857246159676, - -0.00022568355187030376, - -0.00013597288799149787, - -7.957972050021134e-5, - -4.649054202565672e-5, - -2.599856573376469e-5, - -1.1938183832160831e-5, - -4.006840155335034e-6, - -7.703614506304746e-7, - -3.771721009404594e-7, - -5.374476749753221e-7, - -3.342216706170298e-7, - 1.4718739399510739e-7, - -1.0992851102731294e-6, - -4.738456207575847e-6, - -1.1767966994646883e-5, - -2.28099974665108e-5, - -3.934728235166496e-5, - -6.746759770354105e-5, - -0.00011360761608686376, - -0.0001925687967689882, - -0.00032159032567469215, - -0.0005050317128995063, - -0.0007515479053846752, - -0.0010596032174057246, - -0.0014227418192945818, - -0.0018236692039526603, - -0.0022553486607332363, - -0.00272027833498234, - -0.0032384274346219377, - -0.0038174908712088618, - -0.004472954520975736, - -0.005218219303722738, - -0.006059494238551788, - -0.007022571783763254, - -0.008117939593307977, - -0.009339989763847922, - -0.010648331613612672, - -0.012018769616815306, - -0.013392282611398243, - -0.01475642938449423, - -0.016075672034821242, - -0.017326469416627466, - -0.018480936399958126, - -0.0195325924374512, - -0.020516490156466338, - -0.021477121126197096, - -0.022446153888202536, - -0.023413511244910146, - -0.024389973366018003, - -0.025334620102377192, - -0.026261340758573726, - -0.027144543302688617, - -0.02794829507620017, - -0.028593531493732616, - -0.029028808467412792, - -0.029208460622110577, - -0.029147009201621, - -0.028874388771607584, - -0.028409568072558122, - -0.027786272749563024, - -0.02700789146282334, - -0.02614875230662478, - -0.02525571120961595, - -0.02437841177576694, - -0.0235069951920846, - -0.022638832424881405, - -0.02172200367345578, - -0.020754689248680513, - -0.019730092083776907, - -0.018631236106000315, - -0.017445889989765262, - -0.0161507135535795, - -0.014767602053865347, - -0.013333190852425236, - -0.011916286273543297, - -0.010554338571526156, - -0.009288316004466668, - -0.008112696567315447, - -0.007052396527096161, - -0.006114363014970925, - -0.005293059513904574, - -0.004573134987073513, - -0.003933516825770811, - -0.003348425292691193, - -0.0028017642539278076, - -0.002299807358560224, - -0.001837056535642978, - -0.0014198630555543046, - -0.0010475337124387085, - -0.0007341707376410933, - -0.000488619146279734, - -0.0003103567177007993, - -0.00018961381588744608, - -0.00011480639769362311, - -6.803530764437626e-5, - -3.861873548960393e-5, - -2.043059786749346e-5, - -8.562083084528993e-6, - -2.262035067535084e-6, - -1.0724872734346746e-7, - -5.159251776909457e-7, - -3.2901438729027177e-7, - 3.3599953302987373e-7, - -2.2312132536006501e-7, - -2.5216523588111883e-6, - -7.042723550509944e-6, - -1.549053808974632e-5, - -2.9305930853429363e-5, - -4.76879412792397e-5, - -7.87917980741848e-5, - -0.00013522216821976185, - -0.0002297070981173155, - -0.000375224518669226, - -0.0005826035008158481, - -0.0008522670626178175, - -0.0011812764292028488, - -0.0015499525118640722, - -0.001954293903082216, - -0.0023938688231696093, - -0.0028773292893319313, - -0.003418480378364064, - -0.00402100358621077, - -0.00469828368809011, - -0.00546887478473862, - -0.006362809230256672, - -0.007378667442093478, - -0.008528002402023283, - -0.009778137628055572, - -0.011102725905187572, - -0.012468127472285373, - -0.01385070233855723, - -0.015211210406018416, - -0.01650858600655497, - -0.017705679511915484, - -0.0187971380790265, - -0.019826786875458302, - -0.02081282559233022, - -0.0217984564353621, - -0.022769720510833757, - -0.023733186888647062, - -0.024685909011603058, - -0.025648736321275067, - -0.02658642748459389, - -0.027468556995124183, - -0.028218555961880387, - -0.028768571262076825, - -0.029097762582186715, - -0.02919242952301143, - -0.02907982420513644, - -0.028747953243599467, - -0.028215159610974705, - -0.02750239377912911, - -0.026693942947537574, - -0.02583008622969457, - -0.024975272777817137, - -0.0241183750686077, - -0.02324413648588758, - -0.022346205363707072, - -0.02141372975254674, - -0.02044184152622297, - -0.01940634553248105, - -0.01828300267839067, - -0.017033447556317194, - -0.01568708862913909, - -0.014267575554336942, - -0.012848185148501667, - -0.011457688498022367, - -0.01012551375694476, - -0.008876940720352111, - -0.007740452453394331, - -0.006725837135330481, - -0.005838595175952199, - -0.005064259738679466, - -0.004368536405806922, - -0.003741252333888556, - -0.003164045079182387, - -0.002636021922562959, - -0.0021476412848892568, - -0.0016990740094151024, - -0.0012879357874642783, - -0.0009320800827511411, - -0.0006393631186373261, - -0.00041895336714281584, - -0.0002655166757307148, - -0.00016165573625742669, - -9.684853666402926e-5, - -5.73688493200053e-5, - -3.1772062285662095e-5, - -1.5010835544171375e-5, - -4.949592524061686e-6, - -1.3516744930552882e-6, - -6.558301111625475e-7, - 2.3020920103533626e-7, - 3.0492803426707127e-7, - -5.580730426668623e-7, - -1.0943795418771884e-6, - -3.4678220099393364e-6, - -1.0815143401121663e-5, - -2.104479532244463e-5, - -3.4402880878303677e-5, - -5.521177679812528e-5, - -9.278025155684544e-5, - -0.0001619220961828205, - -0.0002721137962234388, - -0.00043959944840693543, - -0.0006714649165591169, - -0.0009604725755251731, - -0.0012972040143109376, - -0.0016730863135328566, - -0.0020876868738515797, - -0.0025444108010591604, - -0.003048226208337057, - -0.0035995176976071352, - -0.0042225896425397424, - -0.00492795651660527, - -0.005747631880201831, - -0.006691746156452183, - -0.007761459570652274, - -0.00893737938324446, - -0.010211100824328578, - -0.011553174683912704, - -0.012937089065190144, - -0.014327369422524883, - -0.01565580704894448, - -0.0168976624663168, - -0.018037709218853726, - -0.019112845821573077, - -0.020139976616798505, - -0.02114336898622121, - -0.02210867017764573, - -0.023070852860135882, - -0.024030989511114986, - -0.02500849607092387, - -0.02599507735931983, - -0.02693295076663088, - -0.027762162957338854, - -0.028422506508405998, - -0.028892316150341657, - -0.029147171179740305, - -0.029198658045098747, - -0.028999690851336246, - -0.02857698436174977, - -0.027950252993631075, - -0.02720175558597504, - -0.026394563807432492, - -0.025561517870198724, - -0.024708977399395315, - -0.023839548281662515, - -0.022953189834836518, - -0.02204514772339239, - -0.02112759528242858, - -0.020146583957397712, - -0.019078482229207827, - -0.01788464347096619, - -0.016582215234148268, - -0.01520151451165308, - -0.013795354587695097, - -0.012383137854146797, - -0.011003450637639522, - -0.009687573212999623, - -0.00847124492063539, - -0.0073893851780038045, - -0.0064305291215748794, - -0.005587761380306644, - -0.0048359205521750215, - -0.004162186024282477, - -0.0035469488224252887, - -0.002993171140997619, - -0.002479911972859905, - -0.0020002426225817493, - -0.0015556038227818592, - -0.0011561858829134963, - -0.000821075161950402, - -0.0005573747301804155, - -0.00036173931785205005, - -0.0002258411109966052, - -0.00013774081896705814, - -8.175499395685071e-5, - -4.7485814097636414e-5, - -2.4115737914442992e-5, - -1.0436310355743661e-5, - -3.932413735641127e-6, - -5.807175861849423e-7, - 5.333422739006721e-7, - -3.8856163980804936e-7, - -7.290553406535949e-7, - -2.733423887235631e-8, - -1.8453890133218742e-6, - -7.027507120671572e-6, - -1.4842480610011144e-5, - -2.4414255542171137e-5, - -3.895174277118718e-5, - -6.541574463431177e-5, - -0.00011147336501665661, - -0.00019269533453730725, - -0.0003253199049763622, - -0.0005144468255297019, - -0.0007634588696066591, - -0.001066213686798101, - -0.0014122608965004835, - -0.0018033934130566864, - -0.002232022752651719, - -0.002702947709473824, - -0.003213410228052882, - -0.003781825597128974, - -0.004430078627561229, - -0.005185992806444384, - -0.0060516598864895355, - -0.007038195616625886, - -0.008142891934383112, - -0.009349053958689568, - -0.01065424407113058, - -0.012028749568553931, - -0.013424982414735054, - -0.014776460968080274, - -0.01605853202505375, - -0.017248753409785933, - -0.018381516964247946, - -0.019448403548183002, - -0.02046888217366699, - -0.021445979420009864, - -0.022399477316132455, - -0.02336529547406102, - -0.024361594524188124, - -0.025372409873073043, - -0.026345380355874526, - -0.02724435897894184, - -0.02799486558490588, - -0.02859822092834352, - -0.029013995608896614, - -0.029218301368799382, - -0.029164096163385278, - -0.028858378166520315, - -0.028337832523945006, - -0.027678627335701977, - -0.026930740745945647, - -0.026127731686707956, - -0.02529276232058597, - -0.02441696495666451, - -0.02354212217171353, - -0.022665003754352153, - -0.02178357317467383, - -0.020850185778898467, - -0.01983648299049673, - -0.01869468013313752, - -0.017450869620438236, - -0.016124739777262476, - -0.01474324962610446, - -0.013330071438186986, - -0.011908133912963914, - -0.010537027775448626, - -0.0092560662211435, - -0.00809918700079526, - -0.00706605039761804, - -0.006156175728566027, - -0.005336859475153943, - -0.004608577615666187, - -0.003958375141071946, - -0.0033718517651271096, - -0.0028308585387709084, - -0.0023235587447559825, - -0.0018455611777261072, - -0.0014090750077637715, - -0.0010334716629091245, - -0.0007243531935967051, - -0.00048626803879248115, - -0.0003099244383508726, - -0.00019161693542230074, - -0.00011668206019360694, - -6.797847581846428e-5, - -3.721207436840901e-5, - -1.9063094748528187e-5, - -7.960249057248348e-6, - -1.824484542833904e-6, - 1.8382389499471685e-8, - -5.370358386325158e-7, - -5.576523260941713e-7, - -2.2139084920880236e-7, - -9.021753197280269e-7, - -4.0156046950401425e-6, - -9.521971648940308e-6, - -1.749707045517468e-5, - -2.8684549696900152e-5, - -4.5502249104489856e-5, - -7.76815995223723e-5, - -0.00013589039470696118, - -0.00023233982407988574, - -0.0003840196862894829, - -0.0005926669695854869, - -0.0008576020249387861, - -0.001173151041823861, - -0.001538007807775299, - -0.0019420062696303697, - -0.002380942612223602, - -0.0028517517709162887, - -0.0033786425908986506, - -0.003976206420700734, - -0.004664756299126438, - -0.00546154028190482, - -0.0063683094592285605, - -0.007388321733389769, - -0.008526674514142074, - -0.009787069500483137, - -0.011126898758787807, - -0.012514284801697972, - -0.01387659661142071, - -0.015191283563832592, - -0.01643722591961172, - -0.017620930588471473, - -0.01873613265802182, - -0.01978139692487868, - -0.020764977573772048, - -0.021724155138216628, - -0.02270279605311487, - -0.02369986765482096, - -0.02472726973713485, - -0.02572600116169038, - -0.026663457846190508, - -0.027500856890965764, - -0.028228179862366753, - -0.028787711669028992, - -0.02914048333549879, - -0.029227967364866714, - -0.029054912442476433, - -0.0286636795735129, - -0.02810295317630801, - -0.027437306581447385, - -0.026675038682856367, - -0.025849836295990913, - -0.024984357326440776, - -0.024124305035431504, - -0.023264125875013364, - -0.022417733789874106, - -0.02152432506903318, - -0.020547011495057776, - -0.01946751765907817, - -0.018289133589386886, - -0.01702776583839738, - -0.01568495782721957, - -0.014278522193260812, - -0.012836835770442034, - -0.011425047145464773, - -0.01008147672101406, - -0.008860337946427266, - -0.007753966169338933, - -0.006761279695053468, - -0.005875851264261656, - -0.005092188286809185, - -0.004394851771693353, - -0.0037729135842726746, - -0.0032044779582081073, - -0.002664495038314618, - -0.002157323822823687, - -0.001688526730087514, - -0.0012764525012071704, - -0.0009239385133349431, - -0.0006368357792765345, - -0.0004181867788676241, - -0.0002652616494012716, - -0.00016153381023537028, - -9.692143314182777e-5, - -5.6694723890471366e-5, - -3.0545296534734145e-5, - -1.4396305656971808e-5, - -5.0544920845441155e-6, - -1.2645522344256754e-6, - -3.5481197258047104e-7, - -5.960435473517656e-7, - -6.36241579365926e-7, - -4.07762541621004e-7, - -1.5479636635840066e-6, - -5.844997893744708e-6, - -1.235343419148105e-5, - -2.0394895165420923e-5, - -3.3924250744221673e-5, - -5.5591486645911736e-5, - -9.340149512498952e-5, - -0.00016351305058681653, - -0.00027842070105876804, - -0.00044689415530435594, - -0.0006745623286046887, - -0.0009566041973211314, - -0.001293758386371413, - -0.0016695790925924658, - -0.0020780334357733965, - -0.0025197176240315255, - -0.0030054651083034067, - -0.003556790161585388, - -0.00419111479342299, - -0.0049179004224900735, - -0.0057413431933932, - -0.006687133553913371, - -0.007752514904547703, - -0.00894911275186372, - -0.010246273891406477, - -0.011603072000837322, - -0.012964125877323374, - -0.014304918493821428, - -0.015598689853956293, - -0.016836431986747724, - -0.01799781458336236, - -0.019066354286988108, - -0.020075974862053536, - -0.021046122146470503, - -0.022030793307157737, - -0.023039018717317228, - -0.02406703431615198, - -0.02506853879521309, - -0.026044062023097947, - -0.026953671571626148, - -0.0277830367620725, - -0.028475911528616782, - -0.028959273755067627, - -0.029192476932846878, - -0.029162679332869257, - -0.028912430901122443, - -0.028476770541874863, - -0.027899506849079492, - -0.027183816341152578, - -0.02639134371647961, - -0.025538452699500058, - -0.02468985887967745, - -0.023859473414155452, - -0.02302985511970118, - -0.02216064369411408, - -0.02122337525540835, - -0.020202210548658173, - -0.01909299790916208, - -0.017903342336469008, - -0.01660548438486026, - -0.015224548677535366, - -0.013778043354373215, - -0.0123377579441169, - -0.010955207105487808, - -0.009668372736355735, - -0.008483900949175727, - -0.007416237287797944, - -0.006457279892821466, - -0.005607423475964657, - -0.004865206319743298, - -0.004201531156142524, - -0.0035952609907815014, - -0.003024802754501732, - -0.0024905238045149214, - -0.001993756056216933, - -0.0015481351330948745, - -0.0011518206430542466, - -0.0008193240224639298, - -0.0005542492567940926, - -0.00035743097467627605, - -0.00022459130262392213, - -0.00013753798220422775, - -8.165025003459281e-5, - -4.671677066603319e-5, - -2.4519053483496034e-5, - -1.0791379384478272e-5, - -3.231789039770394e-6, - -6.126368127801207e-7, - -1.0052660091020016e-6, - -7.966900069100724e-7, - 4.7192090768533035e-7, - -3.698864192158702e-7, - -3.5937157889520677e-6, - -7.749854801952782e-6, - -1.510675597593547e-5, - -2.5946608525562187e-5, - -4.058779172205762e-5, - -6.588359262960086e-5, - -0.0001117856534908479, - -0.0001964758461606153, - -0.00032865291616829273, - -0.0005161628122012374, - -0.0007645119661446875, - -0.0010690308511975277, - -0.0014159050570486387, - -0.0017965267965450726, - -0.002208044365521411, - -0.0026612548447393913, - -0.003174922662422197, - -0.003753170926289573, - -0.0044160686569866825, - -0.0051685651192319715, - -0.006033823135658367, - -0.007025825229635796, - -0.00815541706838152, - -0.009388843766150068, - -0.010702025728413889, - -0.012051811907267562, - -0.013403512676012697, - -0.014740219714010183, - -0.016022654682967152, - -0.01722718153758296, - -0.018333294406392364, - -0.01936760287199968, - -0.020359127607167737, - -0.021364025126265174, - -0.022369917844650034, - -0.023389306150803035, - -0.024397829451166364, - -0.025390052419696052, - -0.026360735085164844, - -0.027278425971046738, - -0.028076472621249515, - -0.028681563752514017, - -0.029057684815644635, - -0.029175978137765568, - -0.029084598094845704, - -0.028781258503362828, - -0.02830426027350963, - -0.027659492385062767, - -0.026897944296138954, - -0.02607656180125123, - -0.025254038138252388, - -0.024438595860453993, - -0.023620438286221734, - -0.022773780197132054, - -0.021862630947791895, - -0.020901115619638033, - -0.01986384811203057, - -0.01874095158932787, - -0.017500492554293867, - -0.01615346492977443, - -0.014720961527987075, - -0.01327653253166089, - -0.011861158924491133, - -0.010519050748115266, - -0.009266917875585479, - -0.008112956743466848, - -0.007080681500668318, - -0.006168079776564195, - -0.005368658784897673, - -0.004655144592592864, - -0.004010459948199707, - -0.0034043596803730036, - -0.0028435305183692194, - -0.0023232082883376526, - -0.001844813776698817, - -0.0014111487861745986, - -0.0010313317254037613, - -0.000717560965812547, - -0.0004780039527852442, - -0.00030688736359779645, - -0.00019120468094535603, - -0.00011709839909040953 - ], - "datatype": "Float64", - "type": "series" - }, - "deflection_y_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -9.999997643593724e-5, - -0.0004014788715374414, - -0.0008814387242755007, - -0.0014689092063512807, - -0.0023908696838723445, - -0.00376830421044602, - -0.005602234274929347, - -0.007911724955455831, - -0.010571499920413044, - -0.013529793026618026, - -0.016872406670330898, - -0.020574619146618567, - -0.024436099272420637, - -0.028393416089675848, - -0.03226881011045792, - -0.03609088535593349, - -0.03999377593882134, - -0.04397192490456433, - -0.04795813950360656, - -0.052001175808141745, - -0.056084858023823285, - -0.0603044346681263, - -0.06482867662607845, - -0.06952116532836772, - -0.07428701542497604, - -0.0790246580926089, - -0.08364852843901804, - -0.08816061009829641, - -0.09260224879322157, - -0.09676248450214187, - -0.10057880030569447, - -0.10403541714501871, - -0.10713738045646791, - -0.11006453452455665, - -0.1128543312708377, - -0.11543836838666904, - -0.11782741732583586, - -0.1200465092195805, - -0.12208508688082176, - -0.12409881186365398, - -0.12597504740251628, - -0.1275864225625884, - -0.1288632588973193, - -0.12971442867476898, - -0.13017862155581475, - -0.13035063450780487, - -0.130140332040059, - -0.12949920520180822, - -0.12845271385959478, - -0.12697646305155527, - -0.12528896079868518, - -0.12346783376535594, - -0.12149713145254526, - -0.11937561825630376, - -0.1170710003371697, - -0.1145438288302634, - -0.11193917205088216, - -0.10921114946483494, - -0.10624345629729957, - -0.10299354388870073, - -0.09932614095206149, - -0.09532257399042961, - -0.09111920280529226, - -0.08673930668701683, - -0.08216179614339823, - -0.0774629958074777, - -0.07262558018002443, - -0.06786889809186351, - -0.06334073482623709, - -0.05899336978549163, - -0.0547997726765027, - -0.05069315384798207, - -0.046606528813199925, - -0.042625830731496644, - -0.03879038462304139, - -0.03492067130228776, - -0.031013794632372506, - -0.027023271054853366, - -0.023041003485955645, - -0.019266942551912677, - -0.01579555455679196, - -0.01255198735918471, - -0.009617408910707625, - -0.007044192100152518, - -0.004898551017349863, - -0.003324376886788833, - -0.002179812972185946, - -0.0013162845313306384, - -0.0006780972206657764, - -0.0002534807163212284, - -1.8704437511282007e-5, - -6.89967979303676e-5, - -0.0002477558906226283, - -0.0004965273005759635, - -0.000930934514080814, - -0.0016450882368369679, - -0.0027690916774734033, - -0.00438317002406958, - -0.006379831191854044, - -0.008693071597536928, - -0.011452489491288152, - -0.014604706642341151, - -0.018147301130971048, - -0.021943536346824742, - -0.02578152486701104, - -0.029589006680496265, - -0.03346518376535988, - -0.037369619534557565, - -0.04132315604859309, - -0.045308942098682276, - -0.04921820710830884, - -0.05320276984557746, - -0.057393372182641816, - -0.06181368960653843, - -0.0664248151093244, - -0.07115326524610854, - -0.07581524215591988, - -0.08049819172438127, - -0.08518069916423207, - -0.08973597209022259, - -0.09407812473960106, - -0.09806404096777704, - -0.10165409609924039, - -0.10498725459054391, - -0.10812579112729974, - -0.11102768874340381, - -0.11375484437940739, - -0.11620855816953334, - -0.11847338653777591, - -0.12067975355932187, - -0.12281915905372101, - -0.12482608243747116, - -0.12662434053132515, - -0.12804006040334012, - -0.1291095311846807, - -0.12989863233756344, - -0.13032359896353063, - -0.13039585831150127, - -0.13000033033227798, - -0.12911798580097492, - -0.12788223030326792, - -0.12640930546983725, - -0.124720786148455, - -0.12290398883911337, - -0.12084855882024852, - -0.1185734932620819, - -0.116205694416951, - -0.11372779237342208, - -0.11115176202293442, - -0.10837856362722763, - -0.10524390721639158, - -0.10174164963909443, - -0.09798896227816119, - -0.09396004998757572, - -0.08974741817341829, - -0.08528945076350769, - -0.08056607589032869, - -0.07575102179754382, - -0.0710013146091892, - -0.06638490662484643, - -0.06197325354198598, - -0.05767773838611496, - -0.053405695547867046, - -0.049298495372878566, - -0.04532167098766807, - -0.04145180393207069, - -0.037606179212729934, - -0.033659575755168626, - -0.029591003469635176, - -0.025617243588319155, - -0.021783696279460637, - -0.018129813068898958, - -0.014711117342847019, - -0.011488024907614166, - -0.008621307633971004, - -0.006270719104683379, - -0.004427733973056126, - -0.0029919202459742205, - -0.0019219181492953503, - -0.001052859716601422, - -0.00046542523228417475, - -0.0001921662390511631, - -0.00010949624407740992, - -0.00013802933999083368, - -0.00026422184941669175, - -0.0004996046266343857, - -0.0010313963908403414, - -0.002004290261533521, - -0.0033092599236424136, - -0.004986689005831269, - -0.007035801170846552, - -0.009504607986999787, - -0.012464474145227316, - -0.015871358238154464, - -0.019467923419296554, - -0.02319225091333199, - -0.02698528899969454, - -0.030815489503711047, - -0.0347679398330249, - -0.03873803177241985, - -0.04262470791385638, - -0.04647911137186316, - -0.05042034106078307, - -0.05450335786012158, - -0.05887733761987712, - -0.0633985595283492, - -0.06796832717940146, - -0.07262223486214639, - -0.07734513588828863, - -0.08209564977817935, - -0.08681154516336372, - -0.09127544883256246, - -0.09537292569151305, - -0.09919918492310265, - -0.10272872123389845, - -0.10605275290652913, - -0.10915580822149698, - -0.11195314266835427, - -0.11448197543044904, - -0.11688640719857539, - -0.11918102667264471, - -0.12145470881867354, - -0.1236140819648435, - -0.1254774062109345, - -0.12707940938457737, - -0.1283926303654394, - -0.12942165118843646, - -0.13015826338825837, - -0.13048048491338088, - -0.1302789116287254, - -0.12966881673685318, - -0.1286594740165736, - -0.12739032904432282, - -0.12593172293272947, - -0.12419237477218709, - -0.1222098759363019, - -0.12005378027240715, - -0.11776591033333218, - -0.11544095820779943, - -0.11303757144920475, - -0.11034132689228099, - -0.10736929348773835, - -0.10407327805453549, - -0.10050058403416681, - -0.09672588157259944, - -0.09268157683618929, - -0.08828889349290897, - -0.08366599087643051, - -0.07889140132386165, - -0.07411998649894559, - -0.06952573784064033, - -0.06499962083182433, - -0.06054992224611876, - -0.05621659252007435, - -0.05202809746467787, - -0.048015428480796776, - -0.04417859475789561, - -0.04027024198631913, - -0.036269403354882296, - -0.032245805043313355, - -0.028231236648976893, - -0.024353302746740267, - -0.020614165983620453, - -0.01695746493800297, - -0.013497830917656134, - -0.010435238958898817, - -0.007795664682213353, - -0.005693529689598417, - -0.00400892612356318, - -0.0026142552617737878, - -0.0015478085013342514, - -0.0008441738920500694, - -0.00041576090840513176, - -0.00023116476453791286, - -0.0001484259299740047, - -7.089839086841035e-5, - -0.00020331876632858834, - -0.0006151862287387677, - -0.0013450003379536397, - -0.0024103942021976308, - -0.003797377383994904, - -0.005508119114857277, - -0.007758275982122828, - -0.010508876894013133, - -0.01365027005221836, - -0.017097008735496244, - -0.02067588516897547, - -0.02436834774624489, - -0.028235843389558278, - -0.03219567624871036, - -0.03610718105519231, - -0.039992639668230835, - -0.04378153295452491, - -0.04764719386411524, - -0.05173575803512905, - -0.05599628126627887, - -0.06036354219066866, - -0.06485932854161704, - -0.06943354006441069, - -0.0741534832432219, - -0.07901802041995704, - -0.08377426940570261, - -0.0883339211327538, - -0.0926136419220192, - -0.09659682309423827, - -0.10035663849665187, - -0.10391660942815266, - -0.10712945739704757, - -0.11005596006189886, - -0.112714380901891, - -0.11518806442793142, - -0.11765141107916136, - -0.12003736783529176, - -0.12224347580014473, - -0.1242444124684579, - -0.12599766022592113, - -0.1275044960337731, - -0.12883913754683074, - -0.12980725719607164, - -0.13034909809563827, - -0.13042858452558373, - -0.13003128269620431, - -0.1292951081409048, - -0.1283000382424084, - -0.12698536181614153, - -0.12538521568405644, - -0.12351715235929968, - -0.1214153167491069, - -0.1192947606857772, - -0.11710543560927592, - -0.11477054612304369, - -0.11222270188488459, - -0.10937934325901091, - -0.10624827000607968, - -0.10294661362962647, - -0.09936870007819756, - -0.09546756697076272, - -0.09124964263886219, - -0.0866875868255594, - -0.08199397555141195, - -0.07731359535310935, - -0.07266337668326894, - -0.0680505730639607, - -0.06351837011583528, - -0.05903958813419109, - -0.054806602011627154, - -0.05080149825164443, - -0.046866389988399954, - -0.04293229865610539, - -0.0389304847282621, - -0.03487399695547461, - -0.030900197216393095, - -0.027018625227653685, - -0.023122527163019706, - -0.01933058722894576, - -0.01568809364724477, - -0.012367962221608287, - -0.00953332961564511, - -0.007160654408262938, - -0.005130121701353462, - -0.003488317751447861, - -0.0022023175950754374, - -0.0012919136839137837, - -0.0007828147240774228, - -0.00044322158660495097, - -0.00017471383248441816, - -1.4893940426106977e-5, - -3.189926366528768e-5, - -0.00028381550252448706, - -0.0008741658609555635, - -0.0016669346274738733, - -0.0027311349050528812, - -0.004221683373767347, - -0.006189224373216312, - -0.008673454974262959, - -0.011609807836991648, - -0.014803883320986994, - -0.018198784778668847, - -0.021860686584851602, - -0.025669665725957372, - -0.02961017221081127, - -0.03353623051164226, - -0.037334782027875414, - -0.04109635359513016, - -0.044987555451738215, - -0.04899130507260745, - -0.053153985933169924, - -0.057427629134582395, - -0.061749248510933046, - -0.06627936689631274, - -0.0710191168543845, - -0.07585886059618083, - -0.08067376824575344, - -0.08532934753026326, - -0.0896987848689208, - -0.09390867838006875, - -0.09789978942365987, - -0.1016114558840318, - -0.10502183499675258, - -0.10806080803879055, - -0.11081990231668315, - -0.11347971228136358, - -0.11605517822532126, - -0.11850431417369901, - -0.12082500604343224, - -0.1228833245252466, - -0.1247829578609015, - -0.1265448520473224, - -0.1280714145990918, - -0.12928098869874582, - -0.1300729598752596, - -0.13035438028669943, - -0.13025233657695748, - -0.12981620909988092, - -0.12903030486049352, - -0.12794682202517102, - -0.12646910932737837, - -0.12468655989720819, - -0.12276163202087878, - -0.12075651429091067, - -0.11866080704429655, - -0.11645654852593487, - -0.11396966883980766, - -0.11125586929548031, - -0.10836682883887658, - -0.10524126236839153, - -0.10188164408645084, - -0.09817515268320744, - -0.09405772715553802, - -0.08965005203147068, - -0.08510547964772261, - -0.08045905390818865, - -0.07583648787313502, - -0.07115733110315149, - -0.06647182278440145, - -0.06195814982223322, - -0.05767101565049504, - -0.05357206274689704, - -0.049606169741049325, - -0.045608019547122305, - -0.0415464991088969, - -0.03756667830578877, - -0.03360646015189852, - -0.029673081797347366, - -0.025736348326432713, - -0.021790163087056807, - -0.017967470924512112, - -0.014516710299181248, - -0.011438922372962618, - -0.008761115007483406, - -0.006469348324952927, - -0.004499053565952802, - -0.002979966514553626, - -0.0019370560465797777, - -0.0012273090552439008, - -0.0007061061065173659, - -0.0003303566952057649, - -1.8991029079299185e-5, - 5.340153063278057e-5, - -0.00013186822062059497, - -0.0004917156770114263, - -0.0010515207846660945, - -0.0018879791227582599, - -0.003082200623998035, - -0.004804294536028906, - -0.007059272580281264, - -0.009665106713558733, - -0.012622689748659637, - -0.015859626761936637, - -0.01937635840402699, - -0.02316433699224904, - -0.027082452914095688, - -0.030911014074736162, - -0.034702274535461854, - -0.038480050274687545, - -0.042321102108501124, - -0.04632601217444584, - -0.050387111626963015, - -0.054484796158136, - -0.058730705207694064, - -0.06319616933004715, - -0.06785877179597204, - -0.07272121953043144, - -0.07752562599312272, - -0.08219529642139085, - -0.08673876859874875, - -0.09111288767804122, - -0.09529771836827965, - -0.09923155948062093, - -0.10276234201529451, - -0.10593326466323005, - -0.10889802456976397, - -0.11167622151969932, - -0.1143827285565047, - -0.11693826610247951, - -0.11926857884379, - -0.12144087045020831, - -0.12351082797614973, - -0.12542369682023377, - -0.1271842959391648, - -0.12860306157054593, - -0.12956823187600433, - -0.13014519236077224, - -0.13031522392965514, - -0.1301546423843156, - -0.12966157102141776, - -0.12873943344822933, - -0.12740499316451323, - -0.1258149633400216, - -0.12400857373209073, - -0.12214791633721674, - -0.12018421514992572, - -0.11799789718671712, - -0.11562805296650949, - -0.11307065540833924, - -0.11033331076881736, - -0.10744558227451995, - -0.1042823565790156, - -0.1006999493439189, - -0.09678648129913228, - -0.09254394143858008, - -0.08812845705558224, - -0.08363010178288292, - -0.0789915581210832, - -0.07423539597641654, - -0.06952456194596407, - -0.06492684735595451, - -0.06056394725405032, - -0.056437450256551364, - -0.052335200593379885, - -0.04826620848833856, - -0.044235485863976166, - -0.040245650781315596, - -0.036311401197460534, - -0.032399461096903844, - -0.028351828273209395, - -0.024312856534176842, - -0.02041980541328762, - -0.016773314414612064, - -0.013506713179373384, - -0.010569835216480071, - -0.00792322252004842, - -0.005693102493333039, - -0.00397268871578547, - -0.0026762106243956533, - -0.0017908197828556214, - -0.0010932471823313361, - -0.0005118942237133696, - -0.00014028232743468032, - 1.1281789036709372e-6, - -2.5849389721938412e-5, - -0.00024558426208477584, - -0.0005994106097359508, - -0.0011548678498516235, - -0.0021626242923467476, - -0.0036338821544241243, - -0.005564665231941809, - -0.00790704511061132, - -0.010585167056935603, - -0.013588899500254837, - -0.017030260333051966, - -0.02072226919067809, - -0.024523549616980715, - -0.02833951831694611, - -0.03208029492735652, - -0.03585372430851747, - -0.03974843852817765, - -0.043685185705602064, - -0.047621247719398296, - -0.051651496554729226, - -0.055763750200485365, - -0.06014288395755759, - -0.06479194314008628, - -0.0695508233739746, - -0.07431888421454502, - -0.07905155608889243, - -0.08366864294389013, - -0.08822219214682395, - -0.09262676967547392, - -0.09667328518736862, - -0.10037929734471862, - -0.10373761478785719, - -0.10684583792702883, - -0.10982625468517213, - -0.1126557907362894, - -0.11523640630548743, - -0.11766931963734233, - -0.11993468898638454, - -0.12211083579227158, - -0.12424259604133511, - -0.12614697015447124, - -0.12772841485814088, - -0.12893969081562617, - -0.12974399677586218, - -0.13021037395041993, - -0.13037846907214382, - -0.13008658643480442, - -0.12937845822893476, - -0.12825073349150187, - -0.1267991704457638, - -0.12520866436497705, - -0.12348613097355163, - -0.12157079435887445, - -0.11949069273553391, - -0.11720570080627274, - -0.11475503768538511, - -0.11224800051572525, - -0.10952234834840534, - -0.10651091926204431, - -0.10313805749784681, - -0.09937296139688408, - -0.09533145889307822, - -0.09113907788747677, - -0.08671371401244082, - -0.08210687297015824, - -0.07736844840503422, - -0.0725716684781107, - -0.06796094560000654, - -0.06355923769806048, - -0.05928698209762345, - -0.05510394229130964, - -0.05098661066626497, - -0.04689234383916279, - -0.042958044078615296, - -0.039059482902043655, - -0.035076010549277725, - -0.03102154742469928, - -0.026924022058687096, - -0.02292227339966524, - -0.019197458543402095, - -0.01573354588920257, - -0.012480572808847805, - -0.00958936368468564, - -0.007083611632422699, - -0.00509096795349061, - -0.0036125907853408554, - -0.0024701212850012765, - -0.0015299495299344237, - -0.0008419181468385679, - -0.00035290962909975514, - -9.613009331357544e-5, - -6.466859456163293e-5, - -8.894875176490048e-5, - -0.00023214461421920858, - -0.000636130122871283, - -0.0014065305850437925, - -0.0026150134335626617, - -0.004298013318321767, - -0.006286310523427492, - -0.008671389133147368, - -0.01151597262275374, - -0.014759847706863049, - -0.0183275496641562, - -0.022047561841005328, - -0.02574593497961676, - -0.029472864991108745, - -0.033308499007952054, - -0.037157982027382554, - -0.041065694203714184, - -0.04494638260241467, - -0.04882482633176756, - -0.05287619197537233, - -0.05720295623882199, - -0.06171823386371773, - -0.0664074285035502, - -0.07113020276346158, - -0.07581849796789822, - -0.08057018873064091, - -0.08527266601194924, - -0.08979086537688212, - -0.09401903699271454, - -0.0978775168934213, - -0.10139360191122254, - -0.10475213889501432, - -0.1078848954499305, - -0.11080244842430768, - -0.11350694264140684, - -0.11597440739783971, - -0.11834031892873341, - -0.12068852941767638, - -0.12292514373371692, - -0.1249724940383876, - -0.1267414803476201, - -0.12810689386538596, - -0.129198817144941, - -0.12997929825280477, - -0.1303832210160388, - -0.13036707351891944, - -0.12986398057974333, - -0.12891966960189183, - -0.12772749013273724, - -0.12631320498122547, - -0.12470347383292499, - -0.12292319484332292, - -0.12087468434212653, - -0.11868267134975398, - -0.11641339209230514, - -0.11403184451707354, - -0.11147655139792853, - -0.1086454811472128, - -0.10539311710408436, - -0.10185100651710711, - -0.09806039105321876, - -0.09401435348228483, - -0.0897494618492912, - -0.08519773090270737, - -0.08044072550479611, - -0.0756889255950585, - -0.07105936105962947, - -0.06655374959100341, - -0.0622211829751479, - -0.0579122770910927, - -0.05368580337088997, - -0.049629046135114104, - -0.045683769169113826, - -0.04176597674353215, - -0.0378021423548148, - -0.033692231746873864, - -0.029548946482819867, - -0.02556626844721052, - -0.021712678018677357, - -0.018052215827891356, - -0.014591634066754278, - -0.011397839920735724, - -0.008641212159116025, - -0.0064464612791047815, - -0.004667753712602357, - -0.0032595449419042305, - -0.0021358984017595083, - -0.001234295233688969, - -0.0006544031943620226, - -0.00033700126805166417, - -0.0001393034165707626, - -1.8031410137677242e-5, - -3.0009391418369183e-5, - -0.00021950194755892584, - -0.0008248153244125398, - -0.0018227857350878503, - -0.0031484690300699458, - -0.004845363048568353, - -0.006967348498015894, - -0.00954947028459335, - -0.012632909631179037, - -0.01604311031411272, - -0.019562566318375288, - -0.0232111120491258, - -0.026924105885754085, - -0.03073267132824422, - -0.03462348630081327, - -0.0384845526083768, - -0.042249229549081446, - -0.046094562416631374, - -0.050074735061004905, - -0.05428375587125486, - -0.058744704419176744, - -0.06328967937728092, - -0.06789804219513369, - -0.07262277057900829, - -0.0774268462540751, - -0.08221647432115557, - -0.08689407586852688, - -0.09121474231184083, - -0.09523144888594541, - -0.09899915360456248, - -0.10252559911559864, - -0.10584025683753416, - -0.10890037101929526, - -0.1116465450117643, - -0.11422015979209867, - -0.11672631346613531, - -0.1191505091416328, - -0.12153692141788708, - -0.12369727787807969, - -0.12556007791175197, - -0.12716748401679398, - -0.1285121953957393, - -0.12955093082220343, - -0.13025419629571053, - -0.13044582848816016, - -0.130157269525175, - -0.12950173717414945, - -0.1285107248855533, - -0.12731023642725003, - -0.12586915729652579, - -0.12413453794228481, - -0.1221879534472436, - -0.12012595933157644, - -0.11795284989722626, - -0.1157512714136385, - -0.11333452592504187, - -0.11059135417546677, - -0.10755604135277035, - -0.10422129414923366, - -0.10064201104447565, - -0.09683164858336904, - -0.0926794493155171, - -0.0881900420473469, - -0.08354480301674676, - -0.07880461294370796, - -0.07416755606888413, - -0.0696465942651693, - -0.0651577893314603, - -0.06074126208489568, - -0.056483071659122586, - -0.05236372366938158, - -0.04841836030850283, - -0.044519623215895116, - -0.04047262974563797, - -0.036370203526765565, - -0.032266752856619334, - -0.028231272364977716, - -0.02431790902602545, - -0.020512803797227516, - -0.01678711147467163, - -0.013392839077561398, - -0.010425792441690639, - -0.007926306516401277, - -0.005905886286043496, - -0.004216555935894836, - -0.0028132244209120635, - -0.001778058476231581, - -0.0010862136799211029, - -0.0006086698153932278, - -0.0003206433030292135, - -4.903564288461122e-5, - 0.00011935601349090906, - 1.0829946538516363e-5, - -0.0004154758802279463, - -0.0011395910221352144, - -0.0022064134947540693, - -0.0035871429297403296, - -0.00540427294910518, - -0.0078036250452042715, - -0.010636611960315671, - -0.0138056687845651, - -0.01719365323666296, - -0.020714291237148838, - -0.024380808473004542, - -0.028238137694036054, - -0.032081335886247654, - -0.03588115367296104, - -0.03963808122440194, - -0.04339011456441163, - -0.04732360661717128, - -0.051492669666553206, - -0.05578831300752226, - -0.06018984951865541, - -0.06474423336791241, - -0.06940248827430733, - -0.07425993753441179, - -0.07914208722833461, - -0.08384534612729774, - -0.08830620099121524, - -0.0925107867256192, - -0.0964533753646014, - -0.1002182078532111, - -0.10370919428064891, - -0.10684352595128212, - -0.10973710039760176, - -0.11241340121701425, - -0.11501283315548144, - -0.11759673748543689, - -0.12004744361438871, - -0.1222696482098508, - -0.12430405117875341, - -0.1260796193200519, - -0.12766940161388293, - -0.1290052690301616, - -0.12989984749997946, - -0.1303411001402197, - -0.13032265335512627, - -0.12989698819743176, - -0.1291924284409508, - -0.12821200520847356, - -0.126873229219925, - -0.1252844535872253, - -0.1234320036740105, - -0.12146118857898977, - -0.1194767355754069, - -0.1173671404030929, - -0.11503993924378977, - -0.11246189231192534, - -0.10957550663557492, - -0.10646059770909096, - -0.10315430813965588, - -0.09949017420699023, - -0.09549311395439046, - -0.09115378480899207, - -0.0865673678921022, - -0.08193160517060502, - -0.07733522024655314, - -0.07271365743250624, - -0.0681507691886053, - -0.0636496601642014, - -0.05927623844598932, - -0.055171522733041926, - -0.05119581618262519, - -0.047210403678787365, - -0.04317174014739636, - -0.03907730172665241, - -0.034965849959364345, - -0.030980985975263144, - -0.026991404689669124, - -0.02300820772207831, - -0.019158524636846884, - -0.015549404585898827, - -0.012344909117251064, - -0.009632654137352122, - -0.00729631913252431, - -0.005285349678761152, - -0.003688687590312329, - -0.002438987855850689, - -0.0015897379349341344, - -0.0010244737281154912, - -0.0005475085270302046, - -0.00012920685969973825, - 0.00010283429597605573, - 0.00013854614382560228, - -0.00011902543409735011, - -0.0006587922141186222, - -0.0013944662479521298, - -0.0024967957157893484, - -0.004091516488939564, - -0.00619533097330551, - -0.008773268812980163, - -0.011729030961055417, - -0.014869286770772006, - -0.018286086558548048, - -0.021937231221303043, - -0.0257189728321275, - -0.02955761736365061, - -0.033328981047826195, - -0.03700078618211389, - -0.04075444388823239, - -0.0446779471352023, - -0.048708490854498666, - -0.05290507731336473, - -0.05717343194993655, - -0.061583294389109824, - -0.06624854017591138, - -0.07110435263922481, - -0.0759631926011541, - -0.08074967958133455, - -0.08530700273960345, - -0.08964644379908289, - -0.09384879754202717, - -0.09778868089926868, - -0.10142360171354986, - -0.10473070961598006, - -0.10771716897085964, - -0.11052166392757432, - -0.11329807449778558, - -0.11593884183916281, - -0.11845915453827048, - -0.12078808690087346, - -0.12289726819948835, - -0.12489165009197906, - -0.12672324027352527, - -0.12824535874770435, - -0.12938967202086088, - -0.13007047817590492, - -0.13027974734495235, - -0.13018543945891298, - -0.12973292148674836, - -0.12894309713192958, - -0.12780623746456815, - -0.1263049403589645, - -0.12457929332225925, - -0.12278873075927221, - -0.12089354858938726, - -0.11888514708384551, - -0.11667952302199623, - -0.1141735485209376, - -0.11149603733428841, - -0.10862154747554247, - -0.10548882562247813, - -0.10204276830543252, - -0.098207699250829, - -0.09397915849974414, - -0.08957785004323489, - -0.08504963142646112, - -0.08045580259241598, - -0.07584466436243816, - -0.07116816310735692, - -0.06656335035266044, - -0.06218396725480942, - -0.058011912488026694, - -0.05395376765065553, - -0.0499537233660617, - -0.04584946212675313, - -0.04176267236524656, - -0.03774501550160351, - -0.03372723494793278, - -0.02968276651178612, - -0.025628198510221183, - -0.02160592207837258, - -0.01784067518489435, - -0.014484630924202073, - -0.011469057122774797, - -0.008844672568723188 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/oscillating_beam_2d/validation_reference_5.json b/validation/oscillating_beam_2d/validation_reference_5.json deleted file mode 100644 index da111b580..000000000 --- a/validation/oscillating_beam_2d/validation_reference_5.json +++ /dev/null @@ -1,4031 +0,0 @@ -{ - "meta": { - "julia_version": "1.10.0", - "solver_version": "f836223-dirty", - "solver_name": "TrixiParticles.jl" - }, - "deflection_x_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -2.1757223800378256e-10, - -2.210041758488046e-7, - -1.9337930592389085e-6, - -7.1571991772101384e-6, - -1.6994149638238643e-5, - -3.2478137831915e-5, - -5.633406530902718e-5, - -9.419166284874159e-5, - -0.00016076501782391617, - -0.0002686253109689396, - -0.00042821187380187586, - -0.0006525549711229872, - -0.000936888947216663, - -0.0012744057850360702, - -0.001650393019821561, - -0.002063703314995058, - -0.002515163371498541, - -0.0030123435221134365, - -0.0035536535380688017, - -0.004160148037059885, - -0.004842799354000726, - -0.00562338753213254, - -0.006522719644846742, - -0.007542186532157269, - -0.008666306451483141, - -0.009875820674804636, - -0.011152180599180328, - -0.012456721335600218, - -0.01376587160035131, - -0.015015360116654441, - -0.016182016343164074, - -0.017242672073206178, - -0.018222713933226553, - -0.019148562849787554, - -0.020052576157568947, - -0.020921651184946155, - -0.021775791306954173, - -0.022627072935196724, - -0.023476916164767603, - -0.02432516716435207, - -0.025122436116358726, - -0.0258106025260475, - -0.026327135096230136, - -0.026652523701658215, - -0.02676092379901812, - -0.026673106145067182, - -0.026359043884290945, - -0.025846753224236962, - -0.02516177533211511, - -0.02437012268161426, - -0.023533429239669, - -0.022693680053837095, - -0.021842732737344994, - -0.02098154281098441, - -0.020111489721573228, - -0.019215522460088508, - -0.01829884599673176, - -0.017323645051156078, - -0.016265644777484656, - -0.015098510828089329, - -0.013847603358807414, - -0.012543041895455909, - -0.011244067899301657, - -0.00996454354928783, - -0.008744894422668847, - -0.007612985447598031, - -0.006587875663196796, - -0.005683096861644754, - -0.0048974135269860275, - -0.004210043613220138, - -0.003596444550718114, - -0.0030481827690119756, - -0.0025488244908437596, - -0.002097132066416041, - -0.0016802599441831934, - -0.001299095600398037, - -0.0009578761146800119, - -0.000668951092493375, - -0.0004399614855792877, - -0.0002776874746146518, - -0.00016796190677448308, - -9.79867986298788e-5, - -5.7761720012428075e-5, - -3.4116410679241316e-5, - -1.8288542994904233e-5, - -6.611559290714553e-6, - -1.6372315041479624e-6, - -1.2079118914543052e-6, - 6.10941547352084e-8, - 9.902166537290036e-7, - -4.715764915785847e-7, - -1.1553848025536162e-6, - -1.1251065109019187e-6, - -6.221744145107344e-6, - -1.7296893458640383e-5, - -3.156910906426669e-5, - -5.291860426137607e-5, - -9.045205968177816e-5, - -0.0001558485449041358, - -0.00025933120401727683, - -0.000415240336925915, - -0.0006375937066485093, - -0.0009170587421326593, - -0.0012479294390301265, - -0.0016204192516569016, - -0.002032830301392008, - -0.0024820093581673364, - -0.0029748147813644654, - -0.0035116246597851064, - -0.00411117765072988, - -0.004787219415659849, - -0.005564153022060092, - -0.006460360006188326, - -0.007470234103252482, - -0.008584303481696143, - -0.009788331988026089, - -0.011063342304388435, - -0.012369154520479597, - -0.013682361480580996, - -0.014932893984042461, - -0.01609545603963569, - -0.017157528353801965, - -0.01814899826630234, - -0.019086382387870082, - -0.019989721101356883, - -0.020855195550158523, - -0.021708730279382304, - -0.022563512106858252, - -0.023419696905865206, - -0.02427904685393717, - -0.02508217512274591, - -0.025770804533396086, - -0.02629185539800316, - -0.026632893380958644, - -0.026763480066108625, - -0.026693815469648496, - -0.02638903925236824, - -0.02587832273154561, - -0.025198127678005222, - -0.024418302686328275, - -0.023595040863414518, - -0.022758303879443775, - -0.02190531915178906, - -0.021041824763442074, - -0.02017231618792631, - -0.019281976998383743, - -0.0183768181928865, - -0.01740747466726572, - -0.01634598836522061, - -0.015177478720859117, - -0.013932301292032323, - -0.01263435628506937, - -0.011335042537965634, - -0.010051916354108015, - -0.008825257910297313, - -0.007684279519602211, - -0.0066518919586496805, - -0.005745346932635398, - -0.0049549263381242215, - -0.004258566586721413, - -0.003637613289801056, - -0.0030861054746386674, - -0.0025842350261193747, - -0.0021300740327597767, - -0.0017107961162795005, - -0.0013247092226838508, - -0.0009775642060644296, - -0.0006849314048179012, - -0.0004541404488292988, - -0.0002875596660548707, - -0.00017336713575333285, - -0.00010221671745425098, - -6.108157489082e-5, - -3.471365775981061e-5, - -1.8042615821389774e-5, - -7.73664477426994e-6, - -2.3200247325494416e-6, - -2.183233836494658e-7, - 2.425614112344654e-7, - -1.3676430943299067e-7, - -3.06378828418552e-7, - -2.1871427596797943e-7, - -1.6306421244394187e-6, - -6.68744969001267e-6, - -1.5834927776237073e-5, - -2.999092012323512e-5, - -5.1519018775758596e-5, - -8.67687639381498e-5, - -0.00014924524658577187, - -0.00025137733296481946, - -0.00040434984703457966, - -0.0006212481283067728, - -0.0008955815535372502, - -0.0012228699924862751, - -0.0015915343573686402, - -0.002001206379899423, - -0.002449662676686837, - -0.002938241324709656, - -0.0034678875706877776, - -0.004061274061760434, - -0.004734253227115903, - -0.005506381199741284, - -0.006396553210166078, - -0.007398188300189845, - -0.008503161964160288, - -0.009699599592426278, - -0.010975470800937859, - -0.012286163636607117, - -0.01359866180741437, - -0.01484409803065423, - -0.01600802112145605, - -0.017078043732104864, - -0.018076920287072196, - -0.019021608491301967, - -0.019927249140723025, - -0.020789573202747658, - -0.021639065307619942, - -0.02250024323710398, - -0.023367452058888183, - -0.02423457381823213, - -0.02503731119806274, - -0.02572778364463091, - -0.026257435475019186, - -0.026616223642919434, - -0.026768640462244364, - -0.026714136706853908, - -0.026414552838175565, - -0.02590740496271987, - -0.0252367400707314, - -0.024468556837552558, - -0.023657276110074843, - -0.022823461351077545, - -0.021966561744809987, - -0.021098501067175646, - -0.02023436710454496, - -0.0193534912062035, - -0.018455044330362602, - -0.017486390651289818, - -0.01642576245664651, - -0.015258258717003204, - -0.014015959752745222, - -0.012725420213988481, - -0.011429386148631093, - -0.010138962068016621, - -0.008901631519945885, - -0.007755621955750636, - -0.006719632201221015, - -0.005807898194821304, - -0.005010327314959984, - -0.004307438649567952, - -0.0036794552003011627, - -0.0031232834720321123, - -0.0026202572172860372, - -0.002164767900682152, - -0.001740089138136558, - -0.0013488365562048243, - -0.0009987035425103596, - -0.0007021234072588922, - -0.0004668997846011824, - -0.0002976354662452829, - -0.00018092993310259153, - -0.00010594594269158764, - -6.250030276855334e-5, - -3.649197694649553e-5, - -1.932291492484639e-5, - -7.229831828714506e-6, - -2.3568008374885707e-6, - -1.2153606067100142e-6, - 4.7226337629435733e-7, - 6.953896418693262e-7, - -1.0038754632013536e-6, - -1.044585154208466e-6, - -6.132522608615076e-7, - -5.953229647137626e-6, - -1.614574357633458e-5, - -2.873844317641261e-5, - -4.828080313806771e-5, - -8.376924130831798e-5, - -0.00014497030892329787, - -0.00024259106823837362, - -0.0003921748821654192, - -0.0006064890675270274, - -0.0008753125953581131, - -0.0011965513322590993, - -0.00156313976333039, - -0.001972291914550728, - -0.002417438333136568, - -0.002900429634881907, - -0.0034250980357745098, - -0.004012958979170256, - -0.004681268277056894, - -0.00545020946668312, - -0.00633444348110751, - -0.007324358061099434, - -0.008420705033562015, - -0.00961510515722902, - -0.01089074943360302, - -0.01220063088040696, - -0.013513045317860795, - -0.014757055879426495, - -0.015919891557469645, - -0.016996870177587886, - -0.01800824273774637, - -0.01895949578374284, - -0.019860144616584918, - -0.0207192860663869, - -0.021572117924666734, - -0.02244014872044303, - -0.023314351903996777, - -0.024187954298184378, - -0.024990258835376644, - -0.025680956342308214, - -0.02622234304676424, - -0.02660259218051758, - -0.02677457851551579, - -0.026730215615941966, - -0.026435134701868035, - -0.02593374484792821, - -0.02527521918340553, - -0.02452172635110006, - -0.023719606410276373, - -0.02288393571110703, - -0.022023966756048452, - -0.021156713611292677, - -0.020296615548288377, - -0.019423837084435236, - -0.018534219918272754, - -0.01756540022429748, - -0.0165001408875437, - -0.015336220436216352, - -0.014104639465600699, - -0.012819854165666167, - -0.011519954549795208, - -0.01022353673145765, - -0.008980468225814331, - -0.007827660189481667, - -0.006786809845195918, - -0.0058722915316361535, - -0.005067250486187724, - -0.004354415609484019, - -0.0037210095109658226, - -0.0031630390731992586, - -0.0026572753987897935, - -0.002198269928904484, - -0.0017701859116257546, - -0.0013738730494830542, - -0.0010187289674827293, - -0.0007194720632828777, - -0.0004822803934063091, - -0.0003078858510680571, - -0.00018658226020273894, - -0.00011042856462106787, - -6.565776400835333e-5, - -3.6924434851259846e-5, - -1.928489280433876e-5, - -8.700080838863755e-6, - -2.8538682164680473e-6, - -2.5587951385519503e-7, - 3.416253768206978e-7, - -5.028587246602712e-7, - -5.259227431886337e-7, - -1.6093458837795893e-7, - -1.299500040685686e-6, - -6.220501801712519e-6, - -1.4500476503587212e-5, - -2.7226048710249362e-5, - -4.717112106294996e-5, - -8.0372355616809e-5, - -0.0001390839114496223, - -0.0002353906130209693, - -0.00038172835743760514, - -0.0005899484439310099, - -0.0008537743134678366, - -0.001172207986102125, - -0.0015359826577347468, - -0.0019427017286914872, - -0.0023855285904149093, - -0.0028626874101409516, - -0.003380896394380717, - -0.00396495662236207, - -0.004631122168438084, - -0.00539386004625636, - -0.006269866047421024, - -0.0072509180339794255, - -0.00833986163615924, - -0.00952974939635276, - -0.010806247088023857, - -0.012117579950429225, - -0.01342483018932128, - -0.014664574794959195, - -0.01583287686563073, - -0.016920600841885902, - -0.01793837591538716, - -0.018893470746799423, - -0.019792518829188088, - -0.020648501224371563, - -0.021503332452152635, - -0.0223819076680144, - -0.023264608772823103, - -0.024137709852652067, - -0.02493704766033855, - -0.025634148187589023, - -0.02619132955732051, - -0.026589832900452193, - -0.026779202369052513, - -0.026743329727690335, - -0.026452642207524024, - -0.025959919297556977, - -0.025316402043858877, - -0.024576001684823878, - -0.023781623725175838, - -0.0229440481373131, - -0.022079355848354187, - -0.021212923142103435, - -0.020362720211593632, - -0.0194993754823517, - -0.01861031913178901, - -0.017638895348894124, - -0.016576189095627247, - -0.015418630495016072, - -0.014192615370347272, - -0.01291414443718264, - -0.011612582519208381, - -0.01030765036123965, - -0.009056803167523442, - -0.007902127865942576, - -0.006857633151056086, - -0.0059359314314588185, - -0.0051224500292004205, - -0.004403041948471242, - -0.003763721397080644, - -0.0032021353923072926, - -0.0026955941222297497, - -0.0022333558269403975, - -0.0017987926350900851, - -0.001397756893141755, - -0.001041043595968405, - -0.000738059489625742, - -0.0004962097561451717, - -0.0003185760194767684, - -0.00019412332345469796, - -0.00011398110067911693, - -6.714993702872096e-5, - -3.8949443627256386e-5, - -2.051521951734747e-5, - -8.366690417538347e-6, - -3.149312242101132e-6, - -1.172342348698674e-6, - 6.58583763080145e-7, - 1.938748679930491e-7, - -1.3741993272753383e-6, - -6.810567595438854e-7, - -2.406609057037379e-7, - -5.70146646267089e-6, - -1.4702768077801132e-5, - -2.586191965192608e-5, - -4.445741019326599e-5, - -7.812468953316554e-5, - -0.00013504504538253137, - -0.0002269916213923362, - -0.0003699123686868311, - -0.0005749379937562971, - -0.0008330933717937694, - -0.0011467679354524307, - -0.0015097265408353655, - -0.0019147999196572063, - -0.0023524314038582683, - -0.0028235043363199486, - -0.003338554080590417, - -0.003918530295981049, - -0.004580155467895419, - -0.005338201912436669, - -0.00620635984716833, - -0.0071760686950277375, - -0.008258897402563636, - -0.009448568558327097, - -0.010723474943754474, - -0.012031112993470428, - -0.013335267016891195, - -0.014574374034379056, - -0.015746259704653875, - -0.016844690626222236, - -0.01787226072850323, - -0.018827235772671203, - -0.01971918446426213, - -0.02057763819290237, - -0.021441234909736095, - -0.022325945511241507, - -0.02321094823369746, - -0.02408599406731393, - -0.024884741754757966, - -0.02558691496621912, - -0.02616104049897139, - -0.026580588184817955, - -0.026783532545762934, - -0.026751843176847034, - -0.02646731583296602, - -0.02598656548694217, - -0.02536034938839349, - -0.024633022751518074, - -0.023842250580438595, - -0.022998509437386128, - -0.02213369640183266, - -0.021273264146013104, - -0.02043018093148008, - -0.019572102372389544, - -0.01868583889669312, - -0.01771203511994185, - -0.016648989617019883, - -0.015500600830515854, - -0.014285323478208767, - -0.013008581814738185, - -0.011700206330405138, - -0.01039066844893427, - -0.009136074353549128, - -0.007976402201404942, - -0.00692745808194456, - -0.006001276440078029, - -0.005177940883987653, - -0.004449099758628117, - -0.0038067169443470883, - -0.003244382596538753, - -0.002733566763107931, - -0.0022661827348934294, - -0.0018277520937683422, - -0.0014230044290495791, - -0.001062364638520108, - -0.0007570120207633368, - -0.0005121318412115716, - -0.00032874544561428687, - -0.00019994584907689905, - -0.00011880028207078563, - -7.026955685346392e-5, - -3.93123944363305e-5, - -2.1043172320267534e-5, - -1.004470535331814e-5, - -3.4510816437349767e-6, - -2.0122500371533292e-7, - 1.1072612887685906e-7, - -8.14789770153812e-7, - -5.422749823069672e-7, - 6.27241338313489e-8, - -1.059159796756859e-6, - -5.744878097180273e-6, - -1.2870795066510787e-5, - -2.478438987046916e-5, - -4.375155576341605e-5, - -7.493480577291933e-5, - -0.0001297812029851797, - -0.0002202977186380184, - -0.00035941446778303687, - -0.0005580024014845697, - -0.0008123480293034668, - -0.0011241962827003849, - -0.0014842425536704118, - -0.0018856506253807637, - -0.0023198613974684257, - -0.0027854928631174114, - -0.0032954273715928295, - -0.003872898745702791, - -0.0045318463636301876, - -0.005282418062057814, - -0.006140790955869113, - -0.007102385674121858, - -0.0081804548715812, - -0.009367351536382462, - -0.010641077629519657, - -0.011945228327893354, - -0.013242394347651731, - -0.01448173440875583, - -0.01566406869630893, - -0.01677227458400965, - -0.01780128916692325, - -0.018756437925535108, - -0.019647742486153363, - -0.020507875535287934, - -0.021376707987128152, - -0.02227083384699574, - -0.023158824372149778, - -0.02402936845158954, - -0.02482698938645811, - -0.025542106928282904, - -0.026134955874335453, - -0.026569620282258954, - -0.026782860983853685, - -0.02675621415858298, - -0.02647991972316799, - -0.026014990266564286, - -0.025406657135775723, - -0.02468848454778577, - -0.023898671045710584, - -0.023051800574779124, - -0.022187678445212022, - -0.021333475796673107, - -0.02049978711504946, - -0.01964588447367721, - -0.018756547468718632, - -0.017781345918814195, - -0.016725147336750623, - -0.015585476223627215, - -0.014376257461207298, - -0.013102169775174477, - -0.01178938917090927, - -0.010472012941775355, - -0.009214015112844753, - -0.008054389417985697, - -0.007000388379063194, - -0.0060640224928412145, - -0.00523175191642955, - -0.004498105474654401, - -0.0038514082294092145, - -0.0032855757011329145, - -0.0027722761525402206, - -0.002300274487967824, - -0.0018556635029858826, - -0.0014479287537327301, - -0.0010862231267032008, - -0.0007766401373119902, - -0.0005266199036893515, - -0.0003396825127887082, - -0.0002075312692001452, - -0.00012221591919364672, - -7.206916190244383e-5, - -4.174157378350474e-5, - -2.2369222938356526e-5, - -9.8192296593691e-6, - -3.807743266470709e-6, - -1.1984222759719998e-6, - 6.401650348153431e-7, - -2.08903263021476e-7, - -1.3999885458693129e-6, - -2.098056156585315e-7, - 3.4035294027567886e-9, - -5.2649621324896145e-6, - -1.3078436979452324e-5, - -2.34132528572073e-5, - -4.1602631561943326e-5, - -7.310546818012353e-5, - -0.00012587473657138526, - -0.00021189778069830023, - -0.00034785861608105373, - -0.0005432294702575335, - -0.0007923566769339474, - -0.0011004495182667662, - -0.001459444855253067, - -0.0018579073958476244, - -0.0022856848313481115, - -0.0027461249733946036, - -0.0032544436850382996, - -0.0038287201217548916, - -0.004482455599503998, - -0.005226034300107318, - -0.006075540742935259, - -0.007028177455179363, - -0.008103194330369656, - -0.009288868024486696, - -0.010557134059405726, - -0.011854967436759678, - -0.013149764293614863, - -0.014392237762357596, - -0.015580958189327476, - -0.016698413720176275, - -0.01773199389509944, - -0.018683744848951855, - -0.019571300585636775, - -0.020439111770080065, - -0.021318139626770483, - -0.022214968554680692, - -0.02310097438424047, - -0.023970648000920414, - -0.02477136875428726, - -0.02549803960569791, - -0.026109893679683416, - -0.026559353181497325, - -0.026778628778694802, - -0.026756215096743974, - -0.026493483973698273, - -0.02604703344905701, - -0.02545445059257151, - -0.024743471617882096, - -0.023952792694322433, - -0.023102930763377605, - -0.022243456238356663, - -0.021397756558367953, - -0.02056970781883205, - -0.01971749912443027, - -0.0188271551253702, - -0.017850923930038343, - -0.01680013247041723, - -0.015673258411948277, - -0.014471264280359608, - -0.013193599327391003, - -0.01187368404303879, - -0.01055565992725338, - -0.009296481900820386, - -0.008132039729191687, - -0.0070716362199005345, - -0.006128568898451259, - -0.0052865001340022255, - -0.0045456492825279304, - -0.0038973348009049835, - -0.003329389527091553, - -0.0028101339514203794, - -0.002332348945620233, - -0.0018849258190033469, - -0.001474238391484195, - -0.001109295740135685, - -0.0007967999728720199, - -0.0005427267950997017, - -0.00034962767642116033, - -0.00021355275962980924, - -0.00012754835863071357, - -7.521403997678977e-5, - -4.2377960831230244e-5, - -2.3399366072096583e-5, - -1.155246488493411e-5, - -3.857493830250469e-6, - -3.4004306626034264e-7, - -2.107237896953329e-7, - -8.525148202376265e-7, - -3.5957268218478333e-7, - 3.3989829417713224e-7, - -1.0427903164855756e-6, - -4.955870676892626e-6, - -1.1381443836333549e-5, - -2.2981306793623535e-5, - -4.112589832327984e-5, - -7.002082487772565e-5, - -0.00012083314322763883, - -0.00020556177858604974, - -0.0003370352944252475, - -0.0005264683267878212, - -0.000772918320887217, - -0.0010795608457576655, - -0.0014346703801064176, - -0.001828064719593292, - -0.002252134252928417, - -0.002708278842110834, - -0.003213433417906142, - -0.003785418191732781, - -0.004434236902257915, - -0.0051688304515364325, - -0.0060095114069020905, - -0.0069569174155765245, - -0.00802788227070067, - -0.009209556901219162, - -0.010473310991493234, - -0.011765708258581198, - -0.013055435808161986, - -0.014303078656939194, - -0.01550321864097326, - -0.016626285868811708, - -0.017657458647212965, - -0.018608652390867342, - -0.019499161136530052, - -0.020372782566926317, - -0.021258628143435043, - -0.022159840401203112, - -0.023042802830200493, - -0.02390785382808336, - -0.024715596307010423, - -0.02545957648271785, - -0.026086595248850875, - -0.02654370807121237, - -0.026770125233242403, - -0.026755689800704585, - -0.026507912746533024, - -0.026080258741740747, - -0.025503239941840894, - -0.024795491504948586, - -0.024003433908070415, - -0.023153198169063027, - -0.022299898085989978, - -0.02146316273406418, - -0.020641094374301394, - -0.019786863077577987, - -0.018891767657472025, - -0.01791992413173965, - -0.016880410577639948, - -0.015761973178840316, - -0.014561325227339716, - -0.013283631274602303, - -0.011959770179467033, - -0.010637958730366603, - -0.009377984134090689, - -0.008212656675826546, - -0.007143978679945429, - -0.006189806138338583, - -0.005340569005494122, - -0.004596221145796109, - -0.003943784376471804, - -0.0033715134448296658, - -0.002848517078785806, - -0.002365309066691912, - -0.0019127797343644337, - -0.0015009734838772326, - -0.0011347831940243247, - -0.0008168325898932349, - -0.0005570375970271879, - -0.0003607502198294532, - -0.00022133592781720113, - -0.00013110766850382705, - -7.764615910760275e-5, - -4.524018763080173e-5, - -2.4811084179288123e-5, - -1.1168774514236368e-5, - -4.5226900713957185e-6, - -1.2268116963976006e-6, - 5.341301866912396e-7, - -2.978481387638787e-7, - -1.2079390477315322e-6, - 1.4306435558442132e-7, - 1.0543318273992242e-7, - -4.740712521433821e-6, - -1.1663196914923901e-5, - -2.184795181264798e-5, - -3.924737535948575e-5, - -6.843595988886841e-5, - -0.00011691308435118897, - -0.0001971106890844565, - -0.00032588538937200484, - -0.0005122898084002347, - -0.0007543388203815615, - -0.001057458450361204, - -0.0014105691704512924, - -0.0017993994754232356, - -0.0022173723904829745, - -0.002670550338374378, - -0.0031750624753036916, - -0.0037427583461613345, - -0.004384547622783341, - -0.005111945255688255, - -0.0059448230191676, - -0.006885494459119901, - -0.007953907163347151, - -0.00913204599862788, - -0.010387325018339999, - -0.011672810478946083, - -0.012963206075247369, - -0.01421741201987814, - -0.01542382471455822, - -0.01655200513160865, - -0.01758257958993975, - -0.01853130627063121, - -0.01942460428185716, - -0.020310100705586143, - -0.021201825633477445, - -0.02209965401805064, - -0.022978862498310826, - -0.023847200925220857, - -0.02466250752278243, - -0.025419308240895944, - -0.02606180904236921, - -0.026527228511130152, - -0.026757024773209404, - -0.026751417997558702, - -0.02652450229396547, - -0.026116574883419008, - -0.025550369769222037, - -0.024843676450873375, - -0.02405059127566722, - -0.02320285071701006, - -0.022359541743848632, - -0.021530894789630384, - -0.020708832464720106, - -0.019852188895760015, - -0.018957729794692735, - -0.01799027839221151, - -0.016959793050773886, - -0.01585195044468496, - -0.014653387975238408, - -0.013370227697641957, - -0.012042935422095002, - -0.010723990282565599, - -0.00946360631749793, - -0.008291662321220916, - -0.007214981825172495, - -0.006253332658071431, - -0.0053952895745129625, - -0.004646061055782746, - -0.003992450078615983, - -0.0034158463831954755, - -0.0028849003212356727, - -0.002396853676758015, - -0.0019435497800917023, - -0.001529314289388628, - -0.0011591010514387934, - -0.0008371895555017161, - -0.0005730830424552358, - -0.00037067947691438174, - -0.0002280888887371546, - -0.0001368748839220002, - -8.100953435008496e-5, - -4.621152390943406e-5, - -2.6128808832015515e-5, - -1.2804485700623758e-5, - -4.28958953191394e-6, - -6.50288889181283e-7, - -2.9569733528411746e-7, - -6.888021282236423e-7, - -2.713417557309583e-8, - 3.4271082727244107e-7, - -9.394340142465651e-7, - -4.14514631869034e-6, - -1.0359989626951283e-5, - -2.17607158166655e-5, - -3.880220780067001e-5, - -6.52015094205205e-5, - -0.00011211132637162224, - -0.00019086148878633136, - -0.00031507016629045426, - -0.0004965495696440669, - -0.0007366331563553041, - -0.0010376133744781635, - -0.001385055371008359, - -0.0017687249664692928, - -0.002184007491714879, - -0.002634131064755074, - -0.00313588902368378, - -0.0037001489299952617, - -0.0043358237445217385, - -0.005053530027821995, - -0.005879702092965899, - -0.006816788439631627, - -0.007881289002144187, - -0.00905219387097278, - -0.010300026683833952, - -0.011580427478964261, - -0.012870780247450753, - -0.01413309032829696, - -0.015347381981574093, - -0.016475076255822174, - -0.0175019512396824, - -0.018454937807445393, - -0.019355529969345364, - -0.02024696040827456, - -0.0211420787506032, - -0.022040233239898566, - -0.02291510620777487, - -0.02378320601265732, - -0.024611051766874226, - -0.025385365155208894, - -0.026036261155826412, - -0.026503663687356183, - -0.026741564968396137, - -0.02675113611142199, - -0.026544001881338042, - -0.026154092400091034, - -0.025596250517267438, - -0.02488884981023637, - -0.024096846131145544, - -0.023255584127896856, - -0.022421441585677437, - -0.021598500527533204, - -0.020776628710940326, - -0.01991629215503865, - -0.019021202868165776, - -0.018062551458301934, - -0.017044180510609075, - -0.015941264958230117, - -0.014740785561412895, - -0.013456985856615922, - -0.01212845544973623, - -0.010809518161555454, - -0.009549344155971085, - -0.008373450978070462, - -0.007285478330960604, - -0.006313682574516699, - -0.005451356324852774, - -0.004699617547942514, - -0.004040367463081784, - -0.003457478054184393, - -0.0029225121849951186, - -0.0024298566692764756, - -0.0019731505968220153, - -0.0015578717960547106, - -0.0011853376596910326, - -0.0008568856691547055, - -0.0005874386200567239, - -0.00038234241269580194, - -0.00023609566313376185, - -0.0001409715445409021, - -8.411603209990126e-5, - -4.9491409891744276e-5, - -2.7171895532251966e-5, - -1.2426705093881996e-5, - -5.252977560377126e-6, - -1.3257582618941832e-6, - 5.953077203413315e-7, - -1.6176274608703523e-7, - -1.068350602873025e-6, - 3.7989227741341836e-7, - 1.3343631233286857e-7, - -4.2344827840823385e-6, - -1.0831069474137589e-5, - -2.063140231695071e-5, - -3.7033891220172865e-5, - -6.379577195553265e-5, - -0.0001078944078590216, - -0.00018266797672522594 - ], - "datatype": "Float64", - "type": "series" - }, - "deflection_y_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -9.999999694490329e-5, - -0.0004002104529763906, - -0.0008816290135478869, - -0.0014819663072841004, - -0.002421187979073078, - -0.0038076516010521547, - -0.005648625489504275, - -0.00794195040440847, - -0.01057984081113615, - -0.013510515094945429, - -0.016820065447425037, - -0.02045879820954074, - -0.024231236677467745, - -0.02807795374790227, - -0.03184733328762023, - -0.035580878461099114, - -0.03939392365112303, - -0.04329172639672841, - -0.04719185436188409, - -0.05116248753925238, - -0.055184397479241934, - -0.05937833046436138, - -0.06385371540538595, - -0.06847195825413889, - -0.07310402288419833, - -0.07768658744086562, - -0.08214544666638714, - -0.08648071487522539, - -0.09070298393819466, - -0.09460137144941656, - -0.09815230845427837, - -0.10135640984341644, - -0.10426394883091958, - -0.10700744297735773, - -0.10964558698706617, - -0.11205455485746765, - -0.11428052238175226, - -0.11634870618017153, - -0.11827644343025388, - -0.1201461157255695, - -0.12182183690468204, - -0.12315797030595457, - -0.12411960507860448, - -0.12467800850071943, - -0.12484504264410638, - -0.12472731552108443, - -0.12419298508048728, - -0.12323087588306189, - -0.1218896755918661, - -0.12023189134501368, - -0.118412181042298, - -0.11652290333100561, - -0.11445399765358626, - -0.11220748543553088, - -0.10979560602751454, - -0.10718784802737048, - -0.10448961970524452, - -0.10160775689027104, - -0.09840525934865241, - -0.09484598997917568, - -0.0909509406985766, - -0.08676443629119322, - -0.08247510059422765, - -0.07802761801321086, - -0.07341837038186773, - -0.06876124025208676, - -0.06414514522320548, - -0.05969611561757681, - -0.05551291087453288, - -0.05146846208633783, - -0.047464278195200015, - -0.04354675848780695, - -0.03965860701421804, - -0.035872799120218804, - -0.03214746679191203, - -0.028347187289547222, - -0.02446431513593806, - -0.020682219452483393, - -0.01706186818068746, - -0.013759936717255304, - -0.010793332629496978, - -0.008094063054269773, - -0.0057665158743375475, - -0.003920589809450354, - -0.0025349004046703004, - -0.0015776671684910003, - -0.0009348859526168273, - -0.0004099895799291025, - -9.398894440573041e-5, - -4.736086471085477e-6, - -0.00011386859676626969, - -0.0003939504718591443, - -0.0008200036963300645, - -0.0013810280765953649, - -0.002320441704724026, - -0.0037161000908306025, - -0.005532780824517324, - -0.007774217411311773, - -0.010360384576840244, - -0.013274413165278984, - -0.01659366350142498, - -0.020236688666540974, - -0.02399014534357772, - -0.02780227298386176, - -0.03154778527946199, - -0.03529389833073747, - -0.03913947790999718, - -0.04303966011385506, - -0.04690869550675093, - -0.0508426478417904, - -0.05485968542761958, - -0.059076279772555765, - -0.06356865632142941, - -0.06816910490969925, - -0.07277443889510046, - -0.07734594478681064, - -0.08182352771011481, - -0.08619999746839815, - -0.09045307405772851, - -0.09434906492776392, - -0.0978849013290862, - -0.10109737130330974, - -0.10404751768986385, - -0.1068403529781939, - -0.10948773205323356, - -0.11187927858162461, - -0.1140974266463228, - -0.11618471469547437, - -0.11814872923437206, - -0.12005725682093603, - -0.12174578056363054, - -0.12307576469817712, - -0.12403853738902056, - -0.12462852305270511, - -0.12485565321249395, - -0.12478384675645764, - -0.12425561420036642, - -0.12328450157174989, - -0.12195455408658434, - -0.12033222792017643, - -0.11855897283035584, - -0.11669158703394931, - -0.11461607626494254, - -0.11235541113382133, - -0.10994766241946005, - -0.10737438199367492, - -0.10472551231379372, - -0.10186120663345342, - -0.09864403884227516, - -0.09507883580610925, - -0.0912070913332146, - -0.08706663901985813, - -0.08280851355206793, - -0.07835738745869326, - -0.07372456097649331, - -0.06905534282071156, - -0.06444476857337827, - -0.06002188044735792, - -0.05584672184557242, - -0.05177018433291986, - -0.04772552583294914, - -0.043802408607105235, - -0.03994046094796023, - -0.036178939954043726, - -0.032439571618765095, - -0.028598918297801784, - -0.024698350137036, - -0.02092296643509245, - -0.017314170479862646, - -0.014003912988280909, - -0.010999556905126811, - -0.008244028029048833, - -0.005888141561253805, - -0.004040332862647818, - -0.002657032746404167, - -0.0016739284176130655, - -0.0009760176275631083, - -0.0004091601464740139, - -9.797819695604726e-5, - -2.7295376154144388e-5, - -0.00012700611487175516, - -0.0003700924271035685, - -0.0007493600722452889, - -0.0012892507017099007, - -0.002231964728974944, - -0.003626031556716886, - -0.00541029058475084, - -0.007600736131332679, - -0.010136127934572579, - -0.01304182357046666, - -0.016379723160080812, - -0.020019321114126375, - -0.023734977525507094, - -0.02751192983352494, - -0.03125198234038298, - -0.03502268039315235, - -0.03888986799954096, - -0.04277537143167436, - -0.04661407672764943, - -0.050523628366006726, - -0.054541164604606396, - -0.05878021413463055, - -0.06328663066841025, - -0.06786010033805061, - -0.07243304553226082, - -0.07700116551696876, - -0.08151428362024096, - -0.08593390065670065, - -0.09019749831343955, - -0.09407640046893129, - -0.09761202205141058, - -0.10085222960994816, - -0.10384186952468648, - -0.10667155153735706, - -0.10932340957587817, - -0.11169892389121738, - -0.11391086617103857, - -0.11602377410790925, - -0.11803427331703435, - -0.11997655848869196, - -0.12165717635604736, - -0.12297673588003794, - -0.1239597387830286, - -0.12459523888805693, - -0.12487450372802887, - -0.12483411193995783, - -0.12430690333761234, - -0.12333336527109107, - -0.12202142288866298, - -0.12043984645574984, - -0.11871637646038978, - -0.11685934106785505, - -0.11476279798859952, - -0.11249300364063052, - -0.11010901307355268, - -0.10757663514325431, - -0.10496283666904319, - -0.10210055472040508, - -0.09887344367642242, - -0.09531284576468638, - -0.09146732066271081, - -0.08737380832463251, - -0.0831462043872528, - -0.07867858693407202, - -0.07401533594851034, - -0.06934594867254573, - -0.06475898127302941, - -0.06036013659244854, - -0.056169616921540405, - -0.05205183612717804, - -0.0479848003786445, - -0.04407143263315339, - -0.040227936822849975, - -0.03647993872089339, - -0.032723173374200464, - -0.028844734315906513, - -0.0249298882528938, - -0.021168866217836806, - -0.01757602077523127, - -0.014249585040511957, - -0.011190011809819825, - -0.008383126989390092, - -0.006020615664724746, - -0.004177690840429584, - -0.0027788044867968053, - -0.0017559514599616403, - -0.0010088828129994603, - -0.0004145154261475433, - -0.00011350618028307773, - -5.3973021163470844e-5, - -0.00013820162282369985, - -0.0003396580384425179, - -0.0006725352314661866, - -0.0012025313767029637, - -0.00216098010374724, - -0.0035438520695702767, - -0.005277507472826582, - -0.007414917033782482, - -0.009919312527913293, - -0.012828409870973173, - -0.016174258338952575, - -0.019793838439816032, - -0.023474078534502216, - -0.02722453663502898, - -0.030962245773689008, - -0.034760826806396306, - -0.03864889185957176, - -0.042508861593863335, - -0.046307603263455135, - -0.05020277038942568, - -0.05423938096966105, - -0.05850179521592251, - -0.06299923456245723, - -0.06753391253370737, - -0.07208940305078514, - -0.0766709128627516, - -0.08121487965306493, - -0.085666362899278, - -0.08993470324410258, - -0.09379757298155667, - -0.09733537721518525, - -0.10061032075204074, - -0.10364818743684431, - -0.10650747310426481, - -0.10914452573186331, - -0.11150146781614644, - -0.1137280891121079, - -0.11587753119253641, - -0.11792436756329687, - -0.1198853070383163, - -0.12155573195920368, - -0.1228719369317116, - -0.12388114249183743, - -0.12456705764948445, - -0.12489983602507015, - -0.12487756518873395, - -0.12433839380350595, - -0.1233709854795002, - -0.12209639214191845, - -0.12056017422282612, - -0.11886983140332583, - -0.11701066952157757, - -0.11489918245667204, - -0.11263134137544537, - -0.11027189583197927, - -0.10778339216095568, - -0.10520255562658468, - -0.10232962318110317, - -0.0990854211202378, - -0.0955435366863083, - -0.09174287312356087, - -0.08769242052993295, - -0.08347226714640471, - -0.07898166227783487, - -0.07430582283546514, - -0.06964831240633301, - -0.06508092088405354, - -0.06069768590573297, - -0.05648830284623558, - -0.05232731341010083, - -0.04824289791269005, - -0.04434748019501816, - -0.040529904205849135, - -0.0367840330858683, - -0.03299294746210016, - -0.02908067893407397, - -0.025174331942030805, - -0.02143348634264395, - -0.0178407515105106, - -0.014485645259109767, - -0.01137566328626518, - -0.008529174940091672, - -0.006164521856747209, - -0.004324092194034236, - -0.002904630526853645, - -0.0018333717723350886, - -0.0010326396951369273, - -0.00042671645018787716, - -0.0001488115328156809, - -8.985469788583625e-5, - -0.00013763292978582163, - -0.00029803738319932223, - -0.0006017269388264926, - -0.0011330835167534716, - -0.002097162985517929, - -0.003456083117925293, - -0.0051399243654926385, - -0.007228329580372004, - -0.009704615889094608, - -0.012624132253576543, - -0.01597848218307694, - -0.019563715167582867, - -0.02319765154855885, - -0.026931169411892025, - -0.030687096713370686, - -0.034513962996129285, - -0.03840029480627755, - -0.04222245987977599, - -0.04599759398334125, - -0.04989283241215139, - -0.05394481746057069, - -0.05822141501157831, - -0.06270478094818882, - -0.06719983086270614, - -0.07174033222810089, - -0.07634366605422836, - -0.08092623668724039, - -0.0854012183116379, - -0.08965426064074622, - -0.09350215336178835, - -0.0970639185295955, - -0.10038204635648715, - -0.1034561242202705, - -0.10633251307184928, - -0.1089540531430461, - -0.11130009726136825, - -0.11354706565457338, - -0.11573805111533227, - -0.11782168231439356, - -0.11978622695373695, - -0.1214356661590669, - -0.12276102236255353, - -0.12381563106822807, - -0.1245505814450735, - -0.12492112993146973, - -0.12490591325726555, - -0.12436269198032388, - -0.12341199260505452, - -0.12217645726608518, - -0.12068662205081972, - -0.11902716397585823, - -0.11715339914979925, - -0.11502158907157072, - -0.11277009547060306, - -0.11045255040847093, - -0.1080027428303059, - -0.10543081752199751, - -0.10254194595768816, - -0.09929841311694276, - -0.09578637874223314, - -0.09202432529326057, - -0.08801275112279494, - -0.08379460857658172, - -0.07927678545565081, - -0.07459194056151994, - -0.069959821721668, - -0.06541841791956886, - -0.06103764660562671, - -0.05679118750339832, - -0.05259405622781933, - -0.04851258129951599, - -0.044638462889809966, - -0.040833664751586, - -0.037079701687477415, - -0.03325514466852906, - -0.029317394360745888, - -0.025426384734283623, - -0.02170598124926365, - -0.018110139808860816, - -0.014713063504629243, - -0.011548308961391033, - -0.00867893920115831, - -0.006327773508623471, - -0.00447753788613424, - -0.00301774270510162, - -0.0018968104294643032, - -0.0010600303808038346, - -0.0004522352787185418, - -0.00018804494782152618, - -0.0001199257478792428, - -0.00013253384420712153, - -0.00025092770807910204, - -0.0005282103892910051, - -0.001073122789129589, - -0.0020449006338289118, - -0.0033637638315066184, - -0.004984919400364783, - -0.00703586939338538, - -0.009505126856887263, - -0.012435460889324111, - -0.015775387528777614, - -0.01931707870947693, - -0.022918172487975185, - -0.026646044835014912, - -0.03041912509976545, - -0.03426913851261677, - -0.03814710567414445, - -0.04192788932346079, - -0.0456824231095636, - -0.04958872518132916, - -0.05366480741151396, - -0.05794554276554512, - -0.06239531852782126, - -0.06685370877925731, - -0.07140001245884185, - -0.07603179847012383, - -0.08064151954229924, - -0.08512718381748763, - -0.08936506009882411, - -0.0932061501110891, - -0.09679652261368332, - -0.10016297127031155, - -0.10327332209819283, - -0.10615114919021465, - -0.10874623110361194, - -0.11109762004746747, - -0.11338380115660714, - -0.11561121742131265, - -0.1177125391770883, - -0.11967361704087508, - -0.12131272899584344, - -0.12265570139891456, - -0.12375512653928007, - -0.1245405193012797, - -0.12494364766552819, - -0.12492260171230463, - -0.12437398339499398, - -0.12345558321854647, - -0.12227277594276266, - -0.12082137171165214, - -0.1191715575122866, - -0.11727881150035989, - -0.11514462655871859, - -0.11291875472149857, - -0.1106382743509186, - -0.10822049291152525, - -0.10565236377457421, - -0.10274308055888884, - -0.09950456596364746, - -0.09603510371961552, - -0.09231950245822561, - -0.08833067917560727, - -0.08409684270780463, - -0.07956042679125351, - -0.0748868318614719, - -0.0702813151459741, - -0.06575512037652446, - -0.061369489040207004, - -0.05708482111651993, - -0.05285640902240557, - -0.04878458168267406, - -0.04493882995626368, - -0.041142169196863365, - -0.037362786487135674, - -0.03349965757195231, - -0.029557509605273292, - -0.025695949614874827, - -0.02198504617970102, - -0.018367028530740435, - -0.01492832629309842, - -0.011723700926138374, - -0.00884145064663597, - -0.006496563027509996, - -0.0046308616640061105, - -0.0031288619572619946, - -0.001954509290705805, - -0.0010856665337335564, - -0.0004901514327725603, - -0.00024263260761042509, - -0.0001479834100660618, - -0.00011188822797258621, - -0.00019916438774087927, - -0.00047272487737141933, - -0.0010309755897445674, - -0.0019895896667258307, - -0.0032600973422534383, - -0.004830640651745115, - -0.00685196063989864, - -0.009315608382456248, - -0.012254665883650494, - -0.015573810799493323, - -0.019062948182060314, - -0.02263329535506315, - -0.026369759575746762, - -0.03016949428966808, - -0.0340289890187689, - -0.03787951378166193, - -0.04162434843297616, - -0.04537683031851471, - -0.049298610034787596, - -0.0533894688856315, - -0.05766423179690899, - -0.06207827174161872, - -0.06650518852881297, - -0.07106352178269883, - -0.07572955378943198, - -0.08036382074689444, - -0.08484374740465392, - -0.0890570994490535, - -0.09290794805013436, - -0.0965450317687463, - -0.09995314041777552, - -0.10307973877612586, - -0.10595305710220362, - -0.10853498705881547, - -0.11090012509908524, - -0.11322297243380572, - -0.11548680042571921, - -0.11760209603494683, - -0.11954705309153338, - -0.12117494707861971, - -0.12255452446910187, - -0.12370962835351504, - -0.12453271280716824, - -0.12494855952871435, - -0.12492266013505902, - -0.12438549923153346, - -0.12350742839695027, - -0.12237242723243706, - -0.12095405928741214, - -0.11930702661183658, - -0.11739227446444579, - -0.11526252372458566, - -0.11307617607830538, - -0.11083609898494973, - -0.10843446952709383, - -0.10585477727579422, - -0.10293469630923588, - -0.09972010251427747, - -0.09629374692731855, - -0.09261484069732108, - -0.08864232338989445, - -0.08439164354622082, - -0.07983897791233661, - -0.07518512610909613, - -0.07061582123564412, - -0.06610139638786403, - -0.06169003726695431, - -0.05736275490246115, - -0.053124166420799694, - -0.049077496869536705, - -0.045246931433540145, - -0.0414411277686435, - -0.037635822861452534, - -0.033747614816537326, - -0.029807638384979955, - -0.025971918974827056, - -0.022268378115890098, - -0.018623751789922725, - -0.01513533323880436, - -0.011896195974166551, - -0.00901891728563155, - -0.00668250072910291, - -0.004782716362729492, - -0.003224576130636714, - -0.0020081423096889733, - -0.00112713217183418, - -0.0005443106735833567, - -0.00029494713264578525, - -0.00016682038639725082, - -8.823331223451435e-5, - -0.0001514035473367016, - -0.0004258291603224506, - -0.0009985227518015272, - -0.0019354837613342196, - -0.0031466556150023025, - -0.004667809203077947, - -0.006675867873802708, - -0.009144712911133198, - -0.012077265533852768, - -0.015355872799355243, - -0.018798977463642445, - -0.02235554492246317, - -0.026103382902888488, - -0.029922169084309003, - -0.03378387782112914, - -0.03760376415862829, - -0.041313921700745014, - -0.045071599650551415, - -0.04901949166806913, - -0.053122553365136195, - -0.05737129350753655, - -0.06174203264813847, - -0.06615699803523403, - -0.0707429028225572, - -0.0754347673149791, - -0.08007514681340645, - -0.08454471390663347, - -0.08874618627240177, - -0.0926149160066846, - -0.09629683927275175, - -0.09974536667475406, - -0.10288414751799867, - -0.10574139956969063, - -0.10831197281739399, - -0.11070923011525376, - -0.11307844259087146, - -0.11536394962361503, - -0.11747411115900777, - -0.119406561099642, - -0.12104278476443316, - -0.12246336264008535, - -0.12366774993756662, - -0.12452293096958449, - -0.12494555102785898, - -0.12491163165781592, - -0.12439561458742429, - -0.12357187324573987, - -0.12248488753733948, - -0.12108180437463689, - -0.11942498762388083, - -0.11750120295693146, - -0.1153924209491895, - -0.1132442959969702, - -0.11103502329219907, - -0.10864395807152441, - -0.10604987379344331, - -0.10312181483053481, - -0.09993923882253522, - -0.09656718386341727, - -0.0929182029804503, - -0.08894077956981224, - -0.08466931313912664, - -0.08012305148432114, - -0.07550183525021122, - -0.07095728927706696, - -0.06643833585341584, - -0.06200083853419657, - -0.05764171863947108, - -0.05339844390089505, - -0.049375842267407655, - -0.04556050197274683, - -0.0417380382303386, - -0.03789594522870311, - -0.033989093024443154, - -0.030069963658488463, - -0.02626341072377468, - -0.02254772203334071, - -0.01886269964156099, - -0.015335307972828168, - -0.012081514318284955, - -0.009207956338419403, - -0.006866262027360945, - -0.0049265420323131035, - -0.003314058220584717, - -0.0020590719618660096, - -0.0011748301880232515, - -0.0006088969157684587, - -0.00034766531450835733, - -0.00017120674113636943, - -5.2494384531996674e-5, - -0.00011066167693721089, - -0.00039628608312212814, - -0.0009677011911824913, - -0.0018669820762690532, - -0.0030247491930061625, - -0.004510174448682878, - -0.006509337831775424, - -0.008979225831788123, - -0.011899411735163063, - -0.015132345607620752, - -0.018527321485830927, - -0.02207819894128932, - -0.02585192704287074, - -0.02968679808156232, - -0.033528510901452604, - -0.03731011613809524, - -0.041006153541128236, - -0.044785108070461606, - -0.04875074698230589, - -0.052847492143434274, - -0.057068352209293606, - -0.061406518134411024, - -0.06581579837543679, - -0.0704288637336824, - -0.07514674887725449, - -0.07978602777335866, - -0.08423417737917614, - -0.08842732330148624, - -0.09233287674252406, - -0.0960662550498834, - -0.09953909776905069, - -0.10267229067671771, - -0.10552014565837353, - -0.10809725017316713, - -0.11052994330920252, - -0.11293806211132361, - -0.11523907292886576, - -0.11733877104716897, - -0.11925625320238636, - -0.12091121579107944, - -0.12238556010404279, - -0.12363556967152595, - -0.12450276822203347, - -0.124923711056109, - -0.12489635319462783, - -0.12441630529578412, - -0.12364326914796808, - -0.12259485284680594, - -0.1212013444503644, - -0.1195338511365069, - -0.11760298960642844, - -0.11552472208750911, - -0.11342484234046626, - -0.11123821587124835, - -0.10883612679181204, - -0.1062261198164682, - -0.10331234459625234, - -0.10017391957448434, - -0.09684339475384357, - -0.09320899844993644, - -0.08922741955298831, - -0.08494394016015168, - -0.08040801604497255, - -0.0758229791314535, - -0.0713051612194031, - -0.06677047273680466, - -0.06229544917887479, - -0.05791310731064705, - -0.05368495934868686, - -0.049688320576745534, - -0.045869528730992336, - -0.04201774837312567, - -0.038149135563949825, - -0.034240099717408705, - -0.030342596839255775, - -0.026556082156023307, - -0.02282251337063189, - -0.019094821215556182, - -0.015532106336726633, - -0.012274633989825874, - -0.009412622379166765, - -0.0070550808945133645, - -0.0050582302737519425, - -0.0033928929033376094, - -0.0021209537406373918, - -0.00124251272295226, - -0.0006773565009494421, - -0.00038997522844125623, - -0.00017079182729826461, - -2.172708812204875e-5, - -7.856800432571101e-5, - -0.0003750725920272733, - -0.0009425107997523535, - -0.0017951590173074274, - -0.002893575880858804, - -0.004354222810911348, - -0.006361853169552359, - -0.008828796482965787, - -0.011712634454515742, - -0.01489321794507327, - -0.01825866182623011, - -0.021819373351129927, - -0.02561053147020926, - -0.029445907973030774, - -0.033264294769461876, - -0.03701574814957759, - -0.0407023866590263, - -0.044506005005833064, - -0.04849024226228266, - -0.052572293151726464, - -0.05675188505428302, - -0.061063157479460096, - -0.06548548401951348, - -0.07013092405937985, - -0.07485721651803406, - -0.07947912379929421, - -0.08391329038558809, - -0.08811480659323143, - -0.09205956116254431, - -0.09583649118291936, - -0.0993283153520731, - -0.10245008933744143, - -0.10528726357973878, - -0.10788250337852645, - -0.11036406403583839, - -0.11280436128068753, - -0.11510011522903313, - -0.11718351694036692, - -0.11910532196828526, - -0.1207908259834254, - -0.1223121199491993, - -0.12359783093612023, - -0.12447383368941863, - -0.12489159250665498, - -0.12487447919704299, - -0.1244409900992068, - -0.12372639930113177, - -0.12270562006246072, - -0.12130275443818031, - -0.11962616086372688, - -0.11770991463585383, - -0.11567242792396135, - -0.11360836193103283, - -0.1114295082424883, - -0.10901721171521932, - -0.10640060697411957, - -0.10350485449018161, - -0.10041468190590813, - -0.09712728566300485, - -0.09349575083100506, - -0.08949745420779852, - -0.08521227090099928, - -0.0807076158810287, - -0.07616007027012299, - -0.07164960832623513, - -0.06708905738931217, - -0.06258648622291971, - -0.058193796944810125, - -0.05398105950461923, - -0.050007174336087715, - -0.04617840070164624, - -0.04228938310713032, - -0.03839599722413501, - -0.03450016619864185, - -0.030632979884378228, - -0.026854197036077172, - -0.023084070819193878, - -0.019316300654275226, - -0.015739465734268304, - -0.012486572432303023, - -0.009621762339744181, - -0.007236721437564715, - -0.00518549253820615, - -0.0034742162338689906, - -0.002189696251042407, - -0.0013190110109719804, - -0.0007532396008951316, - -0.0004282390052312325, - -0.00015735120622161446, - 1.0761437444358271e-5, - -6.550213665884423e-5, - -0.00036750403459956393, - -0.0009070668499435528, - -0.0017063247717944777, - -0.002763619096903286, - -0.00421313937105779, - -0.006222818803056789, - -0.008672973324212688, - -0.011518501435152888, - -0.01464942292460087, - -0.0179885910518986, - -0.021566305758867768, - -0.02537876999088532, - -0.029201670373018136, - -0.032982900459146945, - -0.03671179198435025, - -0.04040823088584618, - -0.04424117659856801, - -0.04822704769115748, - -0.0522809022200054, - -0.056426660976299024, - -0.06072478146063106, - -0.0651625457811867, - -0.06983661491646002, - -0.07456414505166098, - -0.07916160496156768, - -0.08358178366557578, - -0.08780479054887443, - -0.09180009700807969, - -0.09561395420591635, - -0.09910262699543627, - -0.10221002558971513, - -0.10505714331978058, - -0.10768218038191583, - -0.11020312958759915, - -0.11266543515834669, - -0.11495471001311622, - -0.11702296853812448, - -0.11895130850840598, - -0.12067753215236078, - -0.12225323890189918, - -0.12356043668735009, - -0.1244264517421286, - -0.12484822522076632, - -0.12486336023904451, - -0.12448159947223543, - -0.1238125202147845, - -0.1228063980646356, - -0.12139594977321504, - -0.11971806171201547, - -0.11782173937322159, - -0.11582942494548737, - -0.11379981990843613, - -0.11161496366675397, - -0.1091835629990543, - -0.10657102464359028, - -0.10371142403895783, - -0.10066922278002967, - -0.09740624197189696, - -0.09376704562221938, - -0.08976229088043064, - -0.08548587014911739, - -0.08101306881135616, - -0.07650270600041102, - -0.0719936644567013, - -0.06739608547924998, - -0.0628664882132618, - -0.05848046958533503, - -0.05429454100889909, - -0.05032938793789524, - -0.046469609115102235, - -0.04254702476833992, - -0.038650546102512826, - -0.03477264511501836, - -0.030923950726945787, - -0.027144927945569837, - -0.023338350296810327, - -0.019533639154211864, - -0.015948180035625086, - -0.01270645551110428, - -0.009838877106964143, - -0.0074118400566889325, - -0.00529547189151134, - -0.003552723542395988, - -0.0022758426393272154, - -0.0014074895997711577, - -0.00081908490197251, - -0.00045030444443963126, - -0.00014200634580975764, - 3.0540905429511656e-5, - -6.045722102597517e-5, - -0.00035839935921143026, - -0.0008667149910605125, - -0.001612678514687764, - -0.0026314915407621604, - -0.004081992173109879, - -0.0060984406760742765, - -0.008518046499513144, - -0.011309724617622183 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/oscillating_beam_2d/validation_reference_65.json b/validation/oscillating_beam_2d/validation_reference_65.json deleted file mode 100644 index 7e69d42b1..000000000 --- a/validation/oscillating_beam_2d/validation_reference_65.json +++ /dev/null @@ -1,4031 +0,0 @@ -{ - "meta": { - "julia_version": "1.10.0", - "solver_version": "v0.1.0-6-g3164e99d-dirty", - "solver_name": "TrixiParticles.jl" - }, - "deflection_x_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -2.739832249964991e-10, - -2.3653542224888469e-7, - -2.019088094384891e-6, - -7.381545488516217e-6, - -1.746112533757005e-5, - -3.338058915158815e-5, - -5.747306713738132e-5, - -9.472281481837097e-5, - -0.00016060956717056651, - -0.0002681379410210405, - -0.00042711520621191434, - -0.0006549065427084444, - -0.0009491682403668933, - -0.0013025537893795458, - -0.0016996934292934918, - -0.0021367184058386224, - -0.0026131034723013147, - -0.003136453539353601, - -0.0037046058630558765, - -0.004333233362702804, - -0.0050355075673574334, - -0.005830541406905421, - -0.006749709379388236, - -0.0077981119812092214, - -0.008969165723405781, - -0.01023982836477938, - -0.011600108338275517, - -0.013007968546089821, - -0.014452043500654488, - -0.015867859377238447, - -0.017210881571626757, - -0.018442815358373887, - -0.019572295331341527, - -0.020629420735983783, - -0.02164130532148012, - -0.02261820745646359, - -0.023563074910459614, - -0.02449949088389014, - -0.025420525771762237, - -0.026364155894221974, - -0.02729589318738601, - -0.028171647007248946, - -0.028910346481839155, - -0.029474689238401686, - -0.02982262185669765, - -0.029965984156725967, - -0.029882572446675693, - -0.02956167117670111, - -0.029013850829855414, - -0.028271357116392892, - -0.027421629322024854, - -0.026514418355033986, - -0.02559682309629957, - -0.024664529833286986, - -0.02372934224858697, - -0.022763453515637466, - -0.021799606723947318, - -0.02081357996169031, - -0.019781130714988993, - -0.0186579287559141, - -0.01742079483582981, - -0.016080568055804934, - -0.014675799281165636, - -0.013252581646275963, - -0.01183635697467128, - -0.01046742583652005, - -0.009162565447139837, - -0.007974665029709005, - -0.006912582064426465, - -0.005983411401905725, - -0.0051689448391705195, - -0.004452261862574969, - -0.0038047917186615487, - -0.003223602337494802, - -0.0027008348136330906, - -0.002220289561833122, - -0.0017754174606601225, - -0.0013640223230071968, - -0.000999629599141738, - -0.0006955191169574215, - -0.0004606404239934081, - -0.0002900097451418171, - -0.00017681924851409292, - -0.00010416253506934092, - -6.226571732415032e-5, - -3.692899996499133e-5, - -1.869301802231993e-5, - -7.911202838328801e-6, - -2.9377659047646887e-6, - -3.157189098490498e-7, - 6.510344824905978e-7, - -2.576857079383821e-7, - -7.455566078951037e-7, - 6.228964305465823e-8, - -1.4158380071127574e-6, - -6.927152190028263e-6, - -1.6357847570203088e-5, - -2.9659480415000772e-5, - -5.145739208139988e-5, - -8.74846903632931e-5, - -0.00014631897658473614, - -0.00024591584825067736, - -0.00039978414535052353, - -0.0006150786461252, - -0.0008986685452238574, - -0.0012378606594870556, - -0.001626556494125908, - -0.0020567589119193652, - -0.00253266939889063, - -0.003047562920939273, - -0.003605538013272347, - -0.004211952028963406, - -0.0049003913209738625, - -0.005689894313016752, - -0.006593243250646252, - -0.007621842965280234, - -0.008765730886897805, - -0.010016414633109982, - -0.011360097527050639, - -0.012784899813604589, - -0.01422762750430362, - -0.015648451957093468, - -0.016981013527700428, - -0.0182214883555622, - -0.019371706622022755, - -0.02045778572546486, - -0.02148488296373885, - -0.022459369212617486, - -0.02339035009279694, - -0.024314608795304227, - -0.025266079143168807, - -0.026224228610790212, - -0.027175625908689438, - -0.028045073592774916, - -0.028792908368922232, - -0.029373063015395218, - -0.029783318468050324, - -0.029975906173663802, - -0.02993741172077924, - -0.029630814599631516, - -0.029090311941634805, - -0.02837621036342025, - -0.027553483854927563, - -0.026683154327814207, - -0.025767241449514644, - -0.024825656386404382, - -0.023866831224462925, - -0.022921830676614463, - -0.02196893863246896, - -0.021010459443007057, - -0.019982365590178408, - -0.018856600677046087, - -0.017620163123129196, - -0.01629690912784476, - -0.014914766966313941, - -0.013500412640963244, - -0.012076609364231938, - -0.01067924686724725, - -0.00936200603055859, - -0.008153160521378211, - -0.007086439788887511, - -0.006140329180590043, - -0.005304789382604702, - -0.0045622937705512845, - -0.003907568588876753, - -0.003319013295203732, - -0.0027916618800769566, - -0.0023056760642637952, - -0.0018474259486984113, - -0.0014250698801836492, - -0.0010513186171473565, - -0.0007410778169892884, - -0.0004960533030546888, - -0.00031502618318596243, - -0.0001918234110026007, - -0.0001152953185234451, - -6.683256265466175e-5, - -3.9039894692727284e-5, - -2.1359175319313195e-5, - -9.117603911368288e-6, - -3.04552113078449e-6, - -8.631957670868218e-7, - 7.183707906310843e-8, - 5.344542836072108e-8, - -8.249991152453617e-7, - -6.51615621072299e-7, - -7.531714019681779e-7, - -5.446848622858713e-6, - -1.492606850872491e-5, - -2.7057850575606945e-5, - -4.544043875970294e-5, - -7.973885208811815e-5, - -0.000136272224848355, - -0.00022614978552010223, - -0.0003714665811022644, - -0.0005786945748290084, - -0.0008460622674287266, - -0.001174259433694591, - -0.0015551373585698802, - -0.001986608949860136, - -0.0024538766080903773, - -0.00295740207470907, - -0.003498748342147806, - -0.004098043036568244, - -0.004772544969640746, - -0.005553588921166364, - -0.006442220266380749, - -0.00744077653756775, - -0.008559385716346679, - -0.009795906660881482, - -0.011139635348756782, - -0.012559486111394125, - -0.014006331871551203, - -0.015407354122822903, - -0.01674691587611804, - -0.018000690386043072, - -0.01918859912450621, - -0.020291282245378572, - -0.02131754194392682, - -0.022277612987965767, - -0.02321210317683947, - -0.02414810287906488, - -0.025114483120796005, - -0.02609528913562481, - -0.027031474434094427, - -0.027902854457599602, - -0.02865905011484926, - -0.02929096929227515, - -0.029747987672520126, - -0.029993344886371953, - -0.02996200404509891, - -0.029675897096643977, - -0.029159326193134716, - -0.02848999343096359, - -0.027708347054341054, - -0.026842336537668876, - -0.025924193829925113, - -0.0249681201056976, - -0.02401419908471475, - -0.023079723464726143, - -0.022161269973950126, - -0.021196901247653055, - -0.02017097684605529, - -0.019040081539189624, - -0.017822687008540172, - -0.016525347010921898, - -0.015164850629842297, - -0.013745264572208427, - -0.012304489967008114, - -0.01089116733024098, - -0.009562021847894675, - -0.008351773163285836, - -0.007260546789280342, - -0.006297618005083994, - -0.005437194702036796, - -0.004677930969406718, - -0.004010158881518067, - -0.0034244253593071483, - -0.0028856975624443892, - -0.0023862811958296204, - -0.0019181752188036083, - -0.001487414387983499, - -0.001108644941527126, - -0.0007892811326477012, - -0.000533801286045188, - -0.00034099724128960895, - -0.0002074352314542227, - -0.000124458645065606, - -7.436601427163181e-5, - -4.1215052539733676e-5, - -2.3035422204276124e-5, - -1.2317138181949794e-5, - -3.6344095705187485e-6, - 1.5528488933602702e-7, - -7.256621976092781e-7, - -1.2604307693120376e-6, - 2.1677026296185176e-7, - 3.5512343399268786e-8, - -1.6328351796768281e-6, - -4.676275341619629e-6, - -1.1433396499116455e-5, - -2.4641193597352284e-5, - -4.3372376010208935e-5, - -7.202982596993257e-5, - -0.00012443815584628481, - -0.00021121607042873247, - -0.00034341544681087965, - -0.000538676001156646, - -0.000796651021970296, - -0.0011141405318211839, - -0.0014908299718388585, - -0.0019149148243318703, - -0.00237662571456726, - -0.002863550673851467, - -0.003393817141196298, - -0.003985502278608999, - -0.0046589765529752025, - -0.005417541988688324, - -0.006285186664177322, - -0.007260704363184045, - -0.0083577479584942, - -0.009585780426498436, - -0.010927965734565448, - -0.01233673267344465, - -0.013763133537083916, - -0.015167054491446952, - -0.016511997877772966, - -0.017801991199213607, - -0.019003270023333296, - -0.020119491393996602, - -0.021133442459230267, - -0.022092187681750253, - -0.023035683274406693, - -0.024001231455915817, - -0.02497317966978635, - -0.02594254177259364, - -0.026877277571789815, - -0.027744443255666107, - -0.028543231680646597, - -0.029218316711079495, - -0.02972017325335169, - -0.02997601086235424, - -0.029971347180434205, - -0.029704377206778043, - -0.029243667001940754, - -0.028614185238471646, - -0.027861719786297923, - -0.026993089679029247, - -0.026056399221964954, - -0.0251077027383787, - -0.0241728253923717, - -0.023258132313839053, - -0.02233801463729318, - -0.021379113388462656, - -0.020335615681989494, - -0.019227674700303565, - -0.01803432768429264, - -0.016766447078753854, - -0.015406423535875624, - -0.013980496287682997, - -0.012525468277973406, - -0.011107645750424, - -0.009773864386343478, - -0.008552479158104642, - -0.0074441469261059545, - -0.006444533945989983, - -0.005569334554534733, - -0.0047994033739900965, - -0.004125799391889284, - -0.003525600183613531, - -0.002980961228453316, - -0.0024649282098630487, - -0.0019882363080999665, - -0.001555012961674318, - -0.0011712640094135307, - -0.0008402822640776741, - -0.0005700552116735258, - -0.000367443007580015, - -0.00022592314975666827, - -0.00013373948682704473, - -7.985629244594561e-5, - -4.7650032885870885e-5, - -2.5441637047429744e-5, - -1.292649902046028e-5, - -5.7201714149801575e-6, - -7.468627850060194e-7, - 7.197223091393035e-7, - -1.180899793007395e-6, - -1.0482641895626088e-6, - 1.071817801012731e-6, - -3.7323968693492304e-7, - -4.980843051449746e-6, - -1.0399598607158111e-5, - -2.0687259386420465e-5, - -4.062373534113872e-5, - -6.878272807547825e-5, - -0.00011283394789957102, - -0.00019270317380692958, - -0.00031960619696630443, - -0.0004998068255923638, - -0.0007468128269553787, - -0.0010599094750620708, - -0.001430688488179066, - -0.0018440806768827422, - -0.0022901518316092995, - -0.002772370087734899, - -0.0032946952480378267, - -0.0038810227453294766, - -0.004541636014061545, - -0.005287129740456364, - -0.0061215112532799765, - -0.0070815406982540074, - -0.008168515554818123, - -0.00938599280349628, - -0.010711817321641948, - -0.012105089236763844, - -0.013516418448074441, - -0.014920811933293199, - -0.016297387812296393, - -0.01760457734876164, - -0.01882082068731683, - -0.019919503517909, - -0.020943948022790815, - -0.02191294726603943, - -0.022879766073617913, - -0.023851928277909273, - -0.024827450068292456, - -0.025774561231080684, - -0.026706798255416775, - -0.027605422849472372, - -0.028436785949249366, - -0.029153182755911666, - -0.02966867377611815, - -0.029941800407470298, - -0.029956239159748876, - -0.02975258458044222, - -0.02933885454533841, - -0.028750118755258458, - -0.02798899861226073, - -0.027125246792351565, - -0.026191190373371087, - -0.025255258713308915, - -0.02434450262730753, - -0.023438643065658238, - -0.02250699245380222, - -0.02153283421302493, - -0.020510545467620322, - -0.019418524532524795, - -0.018262821845877797, - -0.016999864090215755, - -0.015640262662894422, - -0.014200123407798193, - -0.012749681731284934, - -0.011336162268239414, - -0.009997806096969486, - -0.008750174658766596, - -0.00761748738182999, - -0.006600372349797046, - -0.005701702505589934, - -0.004927521704271576, - -0.004245454301941842, - -0.003630439695898824, - -0.003064566114856726, - -0.0025465168625571355, - -0.002064186500577936, - -0.001627696790653499, - -0.001233991251134603, - -0.0008917540093031917, - -0.0006081213698837518, - -0.00039238715472961205, - -0.00024507770272635954, - -0.00014806849481519002, - -8.590089686394409e-5, - -5.163884838799149e-5, - -3.0894972908313e-5, - -1.416815094579249e-5, - -4.781156590583091e-6, - -1.9276394285228093e-6, - -7.212568348125004e-7, - 6.396861233493034e-7, - -4.965591748895548e-8, - -7.700861672788051e-7, - -1.2650734387831264e-7, - -2.3970511104920433e-6, - -1.0199811486311106e-5, - -2.0982069756592114e-5, - -3.5684392711843316e-5, - -6.267553243766155e-5, - -0.00010512870698886623, - -0.00017527510546444525, - -0.0002923887837872896, - -0.00046680689101624706, - -0.0007027592964292673, - -0.001007672875667609, - -0.0013684744683520877, - -0.0017722155406386664, - -0.0022062111414778984, - -0.002679382680917719, - -0.0032051250681021104, - -0.003781711788639397, - -0.004423571501887824, - -0.0051456341054719745, - -0.005969667320142147, - -0.006906782613442242, - -0.007987926152521085, - -0.009189161991085826, - -0.010490196444020994, - -0.011859861714025643, - -0.01327304745454827, - -0.01469232608091936, - -0.016084966221414032, - -0.01740410847924473, - -0.01861400550469411, - -0.019720094206308214, - -0.020745879205771034, - -0.02175151271531356, - -0.022731127946191865, - -0.02369957499828984, - -0.024651997824111038, - -0.0256051191527788, - -0.026543087312305536, - -0.02747706188957022, - -0.028341285123299087, - -0.029065266943688495, - -0.02959324372271316, - -0.02988849274718497, - -0.029960196993032873, - -0.029805943439005278, - -0.029442700599190574, - -0.028861149791930163, - -0.028110239400685466, - -0.02723652487083511, - -0.02633827029769903, - -0.025425554986416854, - -0.02451729968981886, - -0.023601738381593407, - -0.022662483244996645, - -0.0216896810349696, - -0.02068658530124773, - -0.019633063703701048, - -0.018482692227970776, - -0.01722579089940046, - -0.01585507067712827, - -0.014428511090822493, - -0.012982569759115103, - -0.011573782624276496, - -0.010220722611501754, - -0.008951085888334043, - -0.007784637981021025, - -0.006755392401013527, - -0.005852157987701556, - -0.005058468584463183, - -0.004361122597958511, - -0.003731112417148741, - -0.0031546501168084884, - -0.002626422547944929, - -0.0021481401961517266, - -0.0017025099274751154, - -0.001297183138869673, - -0.0009391227754954601, - -0.0006476027605393231, - -0.000423610945284536, - -0.00026401387747260197, - -0.00016132794369211334, - -9.71323823978909e-5, - -5.5983610874610346e-5, - -3.24962932398698e-5, - -1.7343874855579866e-5, - -5.911608802311452e-6, - -6.726315787131121e-7, - -7.880079004873863e-7, - -4.33778315434008e-7, - 8.764233382363429e-7, - -3.66006959739984e-8, - -1.4367552561012076e-6, - -2.3649978582174214e-6, - -7.720633966978863e-6, - -1.9909018812047652e-5, - -3.48327836370288e-5, - -5.492873812074084e-5, - -9.492590439685866e-5, - -0.00016204881211773214, - -0.00026863538265947673, - -0.0004327995947374097, - -0.0006643556160694231, - -0.0009570664598499978, - -0.0013048868561498228, - -0.0016950268101614263, - -0.0021277051405582115, - -0.0025979180836772087, - -0.0031137720523209955, - -0.0036822992741986083, - -0.00430520239409099, - -0.005007383662458287, - -0.005816725151601254, - -0.006751999391258423, - -0.007805873936101548, - -0.00898723758997827, - -0.010262957897015645, - -0.011621591719404245, - -0.01303583160777011, - -0.014475321486422998, - -0.015873049246350635, - -0.017186566020615468, - -0.018393763693792475, - -0.019515673754643637, - -0.020576795721929886, - -0.021588114546144288, - -0.022578068257253225, - -0.02352945024117481, - -0.024474061506134903, - -0.025427241572646142, - -0.02640568552614586, - -0.027351783128163443, - -0.02822969660806729, - -0.028956244624822935, - -0.029499084653388963, - -0.02984190862174141, - -0.0299719385235529, - -0.02987394464141746, - -0.029522643109089308, - -0.028950981953515587, - -0.028208359353854684, - -0.027374212898366834, - -0.02648765073058762, - -0.025600144659287505, - -0.024682251571535307, - -0.023749387278453715, - -0.02280574248947892, - -0.021858632724872262, - -0.020880423991492814, - -0.01984082015487132, - -0.018695636686605843, - -0.017429702164320493, - -0.016074109913273793, - -0.014658804433045458, - -0.013235199783715734, - -0.011811670571245603, - -0.010436855625903962, - -0.009142567983199179, - -0.007965997471568731, - -0.006916265608982286, - -0.0060040216162024485, - -0.005196764006708043, - -0.004473550887559297, - -0.00382809366010628, - -0.003247283028057213, - -0.0027196547487627343, - -0.0022306957049345044, - -0.0017774535975701444, - -0.0013577743469583292, - -0.000990791657692669, - -0.000687027243238103, - -0.0004572859364037618, - -0.00028901372530731884, - -0.00017434600956406365, - -0.00010548285784206524, - -6.342072117171416e-5, - -3.46080076694677e-5, - -1.7376049494532975e-5, - -8.115790363194542e-6, - -2.331403604782789e-6, - 7.567234833194547e-7, - 1.198642287092433e-7, - -1.0654719478919716e-6, - 9.66575458005714e-8, - 6.655418344214681e-8, - -2.9638040386914533e-6, - -8.176652847746713e-6, - -1.645204906208786e-5, - -3.109738889711666e-5, - -5.1633115238314264e-5, - -8.526243913442588e-5, - -0.00014773284627106475, - -0.0002490525529134091, - -0.0004041589216615127, - -0.0006230728344878145, - -0.0009056535063260429, - -0.001240500898409047, - -0.0016232910263756506, - -0.0020495952077291824, - -0.0025220332818301494, - -0.003026621776872407, - -0.003574700803616382, - -0.004185428753151144, - -0.004878076701576417, - -0.005675320991721466, - -0.006592757932167459, - -0.007630363986831146, - -0.00877518036508268, - -0.010038276349856656, - -0.01139181470400108, - -0.012817140785829573, - -0.014251526529727054, - -0.015647637915607082, - -0.01695607215523376, - -0.018178596159673266, - -0.019323065015707908, - -0.020410965168148276, - -0.0214357417659245, - -0.022399439092514406, - -0.02334913843440406, - -0.02429795390480971, - -0.02527726798150076, - -0.026264852224838653, - -0.027227647384460762, - -0.028089531457673844, - -0.028832735557461964, - -0.029410214782381927, - -0.0298125943345382, - -0.029993092568994517, - -0.029918113927478118, - -0.029584380883122596, - -0.029024288541093513, - -0.028315222349877045, - -0.02751603762678717, - -0.0266618755750076, - -0.025751825536517003, - -0.02483017299411866, - -0.02388911066813315, - -0.02296370540046222, - -0.022035779505587827, - -0.02107851861781379, - -0.020034947693234606, - -0.018887783064550412, - -0.017632693614840322, - -0.016297561218781786, - -0.014909316555131391, - -0.01347831254250137, - -0.012048227817342827, - -0.01064564323138728, - -0.009336609571599375, - -0.008149712385101704, - -0.007095381006656687, - -0.006154231616349037, - -0.00532661213570762, - -0.004587828809936301, - -0.003930420777609578, - -0.003345593751933995, - -0.0028138780480165826, - -0.0023161952239773576, - -0.00184732439439661, - -0.0014190269626248586, - -0.0010443908221193787, - -0.0007353897599055581, - -0.0004900629776702914, - -0.00031345772697827234, - -0.00019179897530929857, - -0.00011346225189878822, - -6.770197501743125e-5, - -3.895141614229658e-5, - -1.939400115252843e-5, - -8.539276045660404e-6, - -3.1636017761016433e-6, - -2.597731950104709e-7, - 5.216773349414616e-7, - -7.075422167046597e-7, - -1.0131139226432495e-6, - 2.3547150285185836e-8, - -1.4597576349362207e-6, - -7.608370726275293e-6, - -1.5610093183682228e-5, - -2.6419477422878757e-5, - -4.701492405623231e-5, - -7.988560474081474e-5, - -0.00013462250633883288, - -0.00022994494976513735, - -0.0003764500380915581, - -0.0005839110521293489, - -0.0008516646476012246, - -0.0011779973026450619, - -0.0015563824904771817, - -0.0019812882982810365, - -0.0024395957843802996, - -0.002936370714360148, - -0.003469488188635128, - -0.004068281514515992, - -0.004754569226053884, - -0.0055409868454686095, - -0.006433648771247025, - -0.0074429497476077855, - -0.008572327111657008, - -0.009817067723332684, - -0.011176883271682037, - -0.012593428143067853, - -0.014023272894678918, - -0.015404076206351813, - -0.016724774346087268, - -0.01797165179724375, - -0.01914910281530191, - -0.020238532218398997, - -0.021258031322555493, - -0.022220520356820317, - -0.02316525381380591, - -0.02413938887204059, - -0.025132750419969985, - -0.026126397908010246, - -0.027071861353771487, - -0.027944745659101766, - -0.028704098505648534, - -0.02934374697914688, - -0.029788163655651123, - -0.030002411708836607, - -0.029938575333956607, - -0.029622871067277623, - -0.02910578276575293, - -0.028440731312782574, - -0.02766888740962875, - -0.026813655139468318, - -0.025902647599717887, - -0.024959696263533282, - -0.02404214124802856, - -0.023131981230556986, - -0.022224345434900983, - -0.02126054848461445, - -0.02021559112181509, - -0.019070746253853355, - -0.01784519765404491, - -0.01653685117100817, - -0.015157299972240135, - -0.01372102850604251, - -0.012265902368017667, - -0.010860616610057217, - -0.009540704903151953, - -0.008344660008461458, - -0.007269021871120107, - -0.00630962160505022, - -0.0054516261981740755, - -0.004703051884854426, - -0.004040836882196419, - -0.0034501315598846616, - -0.0029067636297072097, - -0.002396247733971457, - -0.0019179845461868572, - -0.0014833384798995097, - -0.0011034444243434027, - -0.0007834349765155069, - -0.0005282363903969522, - -0.0003358984176455859, - -0.00020774374713583565, - -0.000124620636069106, - -7.270285108257335e-5, - -4.198251727088875e-5, - -2.3060948246056423e-5, - -1.0401711804386427e-5, - -3.133624927098566e-6, - -5.091856495886837e-7, - -5.14891950742502e-7, - -5.091527179867938e-7, - -3.5151523675169827e-7, - -6.78756035266126e-8, - -1.4832823911348214e-6, - -5.688054715624613e-6, - -1.3557575792355614e-5, - -2.500248424819329e-5, - -4.278530398299507e-5, - -7.388073531700012e-5, - -0.00012451817037639756, - -0.00021101599020301176, - -0.00034897783698778495, - -0.0005439660504145682, - -0.0008014142487265397, - -0.001119551406362218, - -0.0014944842207424425, - -0.0019112382881100176, - -0.0023604575128990946, - -0.0028388234841054683, - -0.0033691443952978406, - -0.0039603337497552404, - -0.004636639639145346, - -0.005404224813377878, - -0.0062732468028487975, - -0.007256705413024034, - -0.008372320088844809, - -0.009615079460206621, - -0.01095859669195215, - -0.012367478734258974, - -0.013776151188768071, - -0.015164433833471214, - -0.016500028012643775, - -0.017778482948834218, - -0.01896609439775615, - -0.020060162326364483, - -0.021062919498693378, - -0.022034750515998625, - -0.023001850526143064, - -0.023988112572223108, - -0.024986819904045665, - -0.025963092872679727, - -0.026906294320493573, - -0.027792045877620408, - -0.028602807809290032, - -0.029273922424596144, - -0.02976022908356507, - -0.02997777123646328, - -0.029941876226716457, - -0.029662652311449655, - -0.02919954454012763, - -0.028576297685781404, - -0.02781436863707909, - -0.026948663862152167, - -0.02603049415350861, - -0.025107866665870726, - -0.024201074882691798, - -0.02331636082811117, - -0.022396195974756006, - -0.021429692713910542, - -0.020384318305375182, - -0.01926729260765908, - -0.018066254411300886, - -0.016782264114435563, - -0.015396965848451738, - -0.013949615747682276, - -0.012488723683738323, - -0.01107779507858736, - -0.009761017436079322, - -0.008543068532583464, - -0.0074419791123144785, - -0.006455547838948417, - -0.005586993985553235, - -0.004823150324656467, - -0.004158396151670463, - -0.00355397429529547, - -0.0029964093442378936, - -0.0024747087215545305, - -0.0019917857979660503, - -0.0015537597136731085, - -0.0011660052960389966, - -0.0008329312707124892, - -0.0005636962178768301, - -0.00036255003515955897, - -0.0002230761235894052, - -0.00013584285364193205, - -8.001747528812997e-5, - -4.620628056295484e-5, - -2.623284998903852e-5, - -1.2235032428586923e-5, - -3.7410454016839623e-6, - -6.706636983544456e-7, - -6.878426520029457e-7, - -5.637180545692289e-7, - 9.659442368192828e-8, - 8.870694839790971e-8, - -1.3024096529035134e-6, - -4.544604281953024e-6, - -1.1584140651499375e-5, - -2.3806724965769188e-5, - -4.0559097230830066e-5, - -6.703447823086517e-5, - -0.00011482182826993981, - -0.00019335231034239841, - -0.0003207815802159786, - -0.0005065487577090022, - -0.000754361739913223, - -0.001067191152657132, - -0.0014330907250220126, - -0.0018393216335341744, - -0.0022754526762308047, - -0.002749039000276121, - -0.003271162557436813, - -0.00386128978730782, - -0.004517953724809454, - -0.00526450759647501, - -0.006111678467407344, - -0.007080486142842735, - -0.008182189194028577, - -0.009416594228003783, - -0.010742463844082506, - -0.012123954093333278, - -0.013532432607232525, - -0.014928196730369436, - -0.01629526403415338, - -0.01758233304059925, - -0.018774080737155086, - -0.019857298204920992, - -0.020875775742197344, - -0.0218579238408938, - -0.022851175247043165, - -0.02383770545880376, - -0.02482024432617641, - -0.02579046872935059, - -0.026736872735733164, - -0.02765800205959401, - -0.028504772301369885, - -0.02920860753659682, - -0.029691538385296645, - -0.02994082014228816, - -0.029935868483535077, - -0.029724317695161095, - -0.029301653190953403, - -0.02870025999766912, - -0.027937524394511637, - -0.02707055338927372, - -0.02616303648046009, - -0.025265211679342203, - -0.0243773351807825, - -0.023481070972733054, - -0.022560716406330172, - -0.02158131368384575, - -0.020561053209642688, - -0.01947275055449016, - -0.01830028366365999, - -0.017010201514153167, - -0.015625283576046256, - -0.01417141157537044, - -0.012720490788136363, - -0.011310624354651022, - -0.00997856759861604, - -0.008742925268059143, - -0.007610320337008758, - -0.00660556227913961, - -0.005725202419270159, - -0.004957177562001314, - -0.004272106344177962, - -0.003657085918308267, - -0.0030834739351286444, - -0.0025559387073905704, - -0.00207168512805761, - -0.0016291154621497772, - -0.0012284047637960982 - ], - "datatype": "Float64", - "type": "series" - }, - "deflection_y_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -9.999995508498498e-5, - -0.0004012802584984661, - -0.000882763701063197, - -0.0014682194418542995, - -0.0023843492364721544, - -0.003754745293815161, - -0.005583787588299969, - -0.007888684491978238, - -0.010551689806832241, - -0.013509525019504092, - -0.01685069555801713, - -0.02056068183842769, - -0.024438000810835185, - -0.0284199866939163, - -0.032328698059770296, - -0.03617529166148574, - -0.040090168176835556, - -0.04409162422335625, - -0.04809625802510683, - -0.052161200316481755, - -0.05625937236086453, - -0.06047523353153158, - -0.06498778048907163, - -0.06969513499420366, - -0.07448268045864666, - -0.07925565718828594, - -0.08392459870074559, - -0.08847001838535731, - -0.09296318890062638, - -0.09719589864314643, - -0.1010942919348627, - -0.10463183580911872, - -0.10780712885070183, - -0.11076721817877863, - -0.11360325044071169, - -0.11623764582825098, - -0.11867539138774166, - -0.12094163335621255, - -0.12300555411095755, - -0.1250329341638277, - -0.1269566764364466, - -0.12864352831638246, - -0.13000787483731083, - -0.13096856930117787, - -0.13151267189523708, - -0.13177070813535408, - -0.131659613016574, - -0.13113102326331444, - -0.13019769047112878, - -0.12881901147367214, - -0.12716457816178983, - -0.12536672423810663, - -0.12342633957563333, - -0.12133816720873732, - -0.11908907436354775, - -0.11658751361902314, - -0.11399498606283574, - -0.11129658884698237, - -0.10840179764353691, - -0.10524398396735919, - -0.10170457813332338, - -0.0977788234752723, - -0.09362461939732164, - -0.08928375695474407, - -0.08473980011239787, - -0.08007514900918075, - -0.0752362529609715, - -0.07039598340408817, - -0.06573782279051144, - -0.06129560031624395, - -0.057016107998451665, - -0.052875553576062884, - -0.04873637301899226, - -0.04468229087233405, - -0.04078677476147129, - -0.036920339109141775, - -0.03302296839502671, - -0.0290501056599397, - -0.025024007268581512, - -0.021115689172139337, - -0.017504699009641234, - -0.014114486725614276, - -0.011027561219183524, - -0.008259675390991698, - -0.005875578141585046, - -0.0040115304299930665, - -0.0026810847455174657, - -0.001686178800363626, - -0.0009511087999470036, - -0.00043226799778785414, - -8.080001210161204e-5, - -2.0373700487796853e-5, - -0.0001591389999186319, - -0.0003798836347523975, - -0.0007080157021597758, - -0.0012766589271889697, - -0.0021571825054631406, - -0.003533449966569099, - -0.005334904367699372, - -0.007472135267468498, - -0.010004015458216562, - -0.012950761768541187, - -0.016291473910662393, - -0.019996727457372757, - -0.023871300636749818, - -0.027711777246057244, - -0.03159579923908749, - -0.035496429199509114, - -0.03945698531764508, - -0.04347219312048538, - -0.047456645768407836, - -0.05138287936849279, - -0.055467096137475844, - -0.05975794308607648, - -0.06426785776105323, - -0.06897371366854571, - -0.07368595876633562, - -0.07838285057190954, - -0.08309948377137956, - -0.08777148057315191, - -0.0922859528847289, - -0.0965726332410045, - -0.10043466220793947, - -0.10396048310354543, - -0.10724795659615388, - -0.1103149796668374, - -0.11319283138076766, - -0.11585026219217491, - -0.11822607523127371, - -0.1204676329079973, - -0.12266373545121355, - -0.12475248291583124, - -0.12673590260028328, - -0.12842469673841936, - -0.12975178125519218, - -0.13076121327485807, - -0.13145491399706924, - -0.1317949175032961, - -0.13178585745043514, - -0.1312678158620727, - -0.13029289879010578, - -0.12899841629069242, - -0.12743621852383957, - -0.1257278781541044, - -0.12384255990109641, - -0.12170714113049529, - -0.1193909854243704, - -0.11698253673125306, - -0.11444754916195943, - -0.11184624540012507, - -0.1089930502751002, - -0.10578072880212747, - -0.10224671309451379, - -0.09841435196051772, - -0.09433981572013247, - -0.09009229012039062, - -0.08557193468008235, - -0.08079447314332663, - -0.07596458663870957, - -0.07115849702719645, - -0.06654137922431616, - -0.062115407926911885, - -0.057770549047936805, - -0.05348845765647948, - -0.0493777378793722, - -0.045372054848639924, - -0.0414998759833456, - -0.03765385010518551, - -0.0336687397520837, - -0.02962328544635063, - -0.02563653289106172, - -0.02178052286602803, - -0.01813262457170067, - -0.014715600932347014, - -0.011459442723120526, - -0.00859828696688431, - -0.006232215100337101, - -0.00436383704509378, - -0.002948534522085068, - -0.0018692005667870007, - -0.0009960581802991447, - -0.00043281950618613216, - -0.00017342194574353036, - -8.998361042386258e-5, - -0.00016639240139971166, - -0.0003024895673302934, - -0.0005472998953610711, - -0.0010911384941547538, - -0.0020406308002171043, - -0.0033270682299139827, - -0.005017157124115912, - -0.007041585504491816, - -0.009473271170061321, - -0.012430314138314899, - -0.015815738144149813, - -0.01943386712642354, - -0.023200226349388165, - -0.027017849467460053, - -0.03087370631528604, - -0.03487970185524536, - -0.0388776880360858, - -0.04281220214515955, - -0.04671275789028335, - -0.050647432634365296, - -0.054719870568020954, - -0.05907960935187196, - -0.06358549197976643, - -0.06816851981449107, - -0.07284069413510595, - -0.07754588976700762, - -0.08232065563191118, - -0.08708973766217588, - -0.09162930988112795, - -0.09583143672220608, - -0.09974375189398814, - -0.10332868479289972, - -0.10672492492095843, - -0.10989606640647791, - -0.11275437510420784, - -0.1153494627890051, - -0.11776797066065588, - -0.12005443481026758, - -0.12233434781556562, - -0.12451821898384205, - -0.12644280434291774, - -0.1281265903255538, - -0.12949035560134897, - -0.1305866210656677, - -0.13142283212591077, - -0.13186437764183406, - -0.13181336302227967, - -0.13133047556533275, - -0.13039936022007803, - -0.12919140321619313, - -0.1277788819351562, - -0.12608874969142583, - -0.12416838002511461, - -0.1220282417048761, - -0.11972044741552455, - -0.11738149484835128, - -0.11498731840235758, - -0.11236411471325561, - -0.10950367605404351, - -0.10628962280569731, - -0.10278776865986053, - -0.09908966492851144, - -0.09513283754797416, - -0.09085123901062915, - -0.08630977789316066, - -0.0815293365284898, - -0.0766934905619307, - -0.07200038125851889, - -0.06738475306709285, - -0.06287510056292608, - -0.05845741556832384, - -0.0541471539422332, - -0.050025986864029176, - -0.046132538402078205, - -0.04223677110602368, - -0.03829703970226721, - -0.03428556887687123, - -0.03022901327746142, - -0.026290600335811015, - -0.022495747052722514, - -0.01877060928338073, - -0.015196769354099226, - -0.011917882650593242, - -0.008998866443247258, - -0.006635172225424139, - -0.004741817477868894, - -0.0031897915565051276, - -0.001963001598958406, - -0.0010878927220487472, - -0.0005108994827898207, - -0.00026727600480345656, - -0.00018239234122713333, - -0.00011273530213123072, - -0.000173329418087953, - -0.00043743479525049263, - -0.0009944691599575624, - -0.001907176907605784, - -0.003133581091648285, - -0.004624912093130065, - -0.0065929785481784985, - -0.009041858441921173, - -0.011968786223544275, - -0.015301533779757109, - -0.018844979173835548, - -0.022489566104753705, - -0.02631614384218036, - -0.03027121247755346, - -0.0342596811007847, - -0.03825650775754797, - -0.04211720096638882, - -0.04594920307589192, - -0.04992535511423212, - -0.05408675054446048, - -0.058386569719650325, - -0.06284446608881371, - -0.06734239415179466, - -0.07196997474021616, - -0.0767779115618899, - -0.08161591127598784, - -0.08636216854096153, - -0.09089209798883734, - -0.09509111187107323, - -0.09902605587748933, - -0.10278224621464105, - -0.10623523325269858, - -0.1094148565797068, - -0.11226420508868612, - -0.11483443425465943, - -0.11730092133229265, - -0.11973034346819676, - -0.12203309417384234, - -0.12419990964405522, - -0.12612065109803178, - -0.12777442106937423, - -0.12926723577776192, - -0.13048950276039198, - -0.131380089745463, - -0.13185279663899477, - -0.13181603510826226, - -0.13133142002737397, - -0.13055510315300006, - -0.1294528657555913, - -0.1280883440465, - -0.1264169673510018, - -0.12443202618665426, - -0.1223079014617981, - -0.12011805565601848, - -0.11784688832998055, - -0.11547263775027611, - -0.11286170620891332, - -0.10992634801072783, - -0.10679479776071872, - -0.10340962391989897, - -0.09978761737151132, - -0.09587671639924691, - -0.09158576456653515, - -0.08697762958223558, - -0.08227004603528588, - -0.07752687055155594, - -0.0728346707064496, - -0.06821334058680187, - -0.06358430903068109, - -0.05910344102002502, - -0.05484763547809833, - -0.0507878549334356, - -0.046851049209008844, - -0.042941315904084856, - -0.03890230992719665, - -0.0348791651839515, - -0.03092052628495124, - -0.027007418410310374, - -0.023161468913900883, - -0.01937000312030536, - -0.01568735415322066, - -0.012359872458045191, - -0.009513418103763, - -0.0070729742260990935, - -0.005067308057321678, - -0.003392766663012456, - -0.0020790622186113022, - -0.0011976108527591428, - -0.0006940041018110264, - -0.0003634331696805108, - -0.00017819333314078416, - -5.8090699592007813e-5, - -6.929896441992475e-5, - -0.00038171939042295176, - -0.0009559008087079209, - -0.001756650893134504, - -0.0028407317811691554, - -0.004283620336358094, - -0.006172645902865365, - -0.008657824746822586, - -0.0115524475706294, - -0.014738720040496693, - -0.018176080828630883, - -0.021826590898421108, - -0.02566715026714158, - -0.029684402440881406, - -0.03366608028996156, - -0.037532727403258616, - -0.04138541759530048, - -0.04525051718070538, - -0.04926285174535715, - -0.05344160896813976, - -0.057694667212729076, - -0.0620071992916917, - -0.06651802504152286, - -0.07118096421823797, - -0.07602638253006519, - -0.08090808553408715, - -0.08559952137653884, - -0.09007151278217822, - -0.09435183932997081, - -0.09840357766798812, - -0.10222505982127271, - -0.10575040709050883, - -0.10885820635508721, - -0.11170784675078142, - -0.11436419049829362, - -0.11691001190370187, - -0.11939402455956409, - -0.12172462165439805, - -0.12380870917644438, - -0.12574290980283498, - -0.12749742791029783, - -0.129067720598313, - -0.1304106619503164, - -0.13131097638106484, - -0.13175041683581515, - -0.13177323861419638, - -0.13141046591371786, - -0.13072931503562824, - -0.12974726840877243, - -0.12834528703226686, - -0.12664754593949595, - -0.12470971527100426, - -0.12263564460562763, - -0.12054413565497799, - -0.1183373728407218, - -0.11590290283536146, - -0.11326036727889985, - -0.11039204084818315, - -0.1073140590979684, - -0.10408213079134768, - -0.10049482358568056, - -0.09653454796134486, - -0.0922439489012357, - -0.0876991347448914, - -0.08304551689072195, - -0.07839706256891397, - -0.07366615235849573, - -0.06893215956195652, - -0.06429406277092706, - -0.05979991046837482, - -0.05558859893916681, - -0.051566759429381576, - -0.04755844388702386, - -0.04353145541547867, - -0.039535166193178255, - -0.035532911729648356, - -0.03163947266208903, - -0.02773965396587033, - -0.023776596030034708, - -0.01988938652821247, - -0.01623295809583401, - -0.012902226811251126, - -0.010018642792529254, - -0.007520839280967065, - -0.005324451307197499, - -0.0035796806445506923, - -0.0022710550154945823, - -0.0013875221196630178, - -0.0008401289155193954, - -0.0004557632819936989, - -0.00011972759424339757, - 5.48281777115571e-6, - -7.41432421719028e-5, - -0.0003642018077813832, - -0.0008862236373623107, - -0.0015734014869019722, - -0.002526973567757468, - -0.0039555944822688505, - -0.005892326354111553, - -0.008269852137002147, - -0.01108171090827764, - -0.014149208483999667, - -0.017513342424480466, - -0.02120606229380488, - -0.02511046790484965, - -0.029060275950444164, - -0.032997552270268106, - -0.03681686341581908, - -0.04064532458164039, - -0.04462189662390774, - -0.04865338542724522, - -0.05274852939548369, - -0.056920040316110775, - -0.06120129338038697, - -0.065698116901374, - -0.07047360916641979, - -0.07529778993074315, - -0.0801021049958046, - -0.08478327647066797, - -0.0892770219526758, - -0.09364087682184759, - -0.09782563309965296, - -0.10166610299797581, - -0.10514848027202493, - -0.10829325773785375, - -0.1111522056048444, - -0.11393133810349429, - -0.11657359411418815, - -0.1190284222476293, - -0.1213101279816129, - -0.12341561719455126, - -0.12537161683137577, - -0.12726758832172375, - -0.1289254445952592, - -0.13024429773231402, - -0.13117379219736178, - -0.1316347345147929, - -0.13174379985477563, - -0.13153759874165252, - -0.13094436818870475, - -0.12994740191361956, - -0.12857236289094365, - -0.12684325268068003, - -0.12500291818937437, - -0.12305667848346948, - -0.12097384697710184, - -0.11874813563835376, - -0.11629750126178541, - -0.11364192016597549, - -0.11088272839963222, - -0.10793588254984779, - -0.10470251212704158, - -0.10114794893077858, - -0.09715805996299115, - -0.09288981575947415, - -0.08846483184275253, - -0.08390146088025839, - -0.07921292498514561, - -0.07445460690805047, - -0.06963515503206415, - -0.06498959208517104, - -0.06059779029481854, - -0.056369041868309024, - -0.05227593316314186, - -0.04821131466472757, - -0.044143845260891684, - -0.040165768217249063, - -0.0362888468978897, - -0.03234964830187579, - -0.028388373442833563, - -0.02437179874432186, - -0.020439513662889555, - -0.01680435947483143, - -0.01351849383051855, - -0.010517205218661672, - -0.007871362893012884, - -0.005609251797933296, - -0.0037902140523182245, - -0.0025230152717614345, - -0.001621136047275448, - -0.0009441696353687089, - -0.0004479389464058063, - -0.00012366976191115382, - 2.391266842093759e-5, - -0.00010983945150249905, - -0.0003699065668960246, - -0.0007412591225103796, - -0.0013470728551374187, - -0.0022889525752202095, - -0.0036895414892243834, - -0.00560930040303872, - -0.00791002612448756, - -0.01052301159253508, - -0.01355510637177473, - -0.016928962281474894, - -0.020639304513101437, - -0.024536850656171845, - -0.028423813946564923, - -0.032244008868891935, - -0.03611923328019036, - -0.04001788848668857, - -0.04399091820743285, - -0.04802338524834215, - -0.05201693135040814, - -0.0561090798369537, - -0.06043274391117761, - -0.06498842201703404, - -0.06972528598018621, - -0.07454718984835523, - -0.07925530908405007, - -0.08393020980407714, - -0.08854486425606796, - -0.09299895348835667, - -0.09720627758683822, - -0.10105797951038299, - -0.1044988028477519, - -0.10769347106840732, - -0.11070501859959787, - -0.11351800888900895, - -0.11619238917723973, - -0.11861800529505061, - -0.1208516287403979, - -0.12301170426156462, - -0.1250996098541044, - -0.1270314002432073, - -0.1287434688087393, - -0.13003776469047218, - -0.13095426077121114, - -0.13155099262812361, - -0.13178187564812244, - -0.1316652388166567, - -0.13111655221760618, - -0.13009083357595563, - -0.12871825228068912, - -0.1271209872991153, - -0.1253348256675574, - -0.12346816478303094, - -0.1213858790441824, - -0.1190825819044422, - -0.1166485479536849, - -0.11409479988445612, - -0.11141100160449179, - -0.10854628534736212, - -0.10530804170299239, - -0.10168709602105169, - -0.09778586952260289, - -0.0936041299676098, - -0.08926693878377102, - -0.08474166168797091, - -0.07999722202071405, - -0.0751513913356462, - -0.07039176006088292, - -0.0657651326365163, - -0.06139243907810383, - -0.05715528581827373, - -0.052934096656909034, - -0.04881455296529266, - -0.0448095156853483, - -0.040888756144045864, - -0.0370110460053556, - -0.03306011637193171, - -0.028966038507501277, - -0.024952291409999487, - -0.02108205815514167, - -0.01744551172289298, - -0.014090151333213341, - -0.010991833878357966, - -0.008193356691238064, - -0.0059054161010210675, - -0.00412431521459521, - -0.002780438369149943, - -0.00180949897708442, - -0.001020873731179775, - -0.00043768411693136285, - -0.00013918118266478471, - -7.412209737700341e-5, - -0.00012110334182853164, - -0.00031112705495086983, - -0.000582772075133969, - -0.001127951989441725, - -0.0021099963817665743, - -0.003506515850115751, - -0.005285242296506703, - -0.007461777078906362, - -0.01000209119860998, - -0.01297510605362455, - -0.016421741371995258, - -0.020096385953263112, - -0.023894744008190832, - -0.02771926712187847, - -0.03154428035406845, - -0.03543647663088002, - -0.03944094965617585, - -0.043380015404348424, - -0.04729174572845612, - -0.0512588930317608, - -0.05535077279013507, - -0.05971145231842327, - -0.06430518070262178, - -0.0689730747825878, - -0.07367713717292809, - -0.07842702702162486, - -0.0831353752068151, - -0.08784643373645393, - -0.0923639216345664, - -0.09653442715828103, - -0.10035884690817769, - -0.10388149121591261, - -0.1071477093012018, - -0.11026651690500315, - -0.11314024970705172, - -0.11572021423706182, - -0.11814544637688167, - -0.12042844074875855, - -0.12266684916622585, - -0.12484626965576975, - -0.12680534685162387, - -0.12844728826692048, - -0.129795242324468, - -0.13077966022829565, - -0.1314910407928166, - -0.1318632602296464, - -0.1317557711210048, - -0.131194979722906, - -0.13021082819944554, - -0.12889757626976886, - -0.12741457663947564, - -0.12574337943847336, - -0.1238094517060134, - -0.1217120261934613, - -0.11941283021758853, - -0.1170279254174967, - -0.11459402492900272, - -0.111977009833728, - -0.10906714862860269, - -0.10584191504371855, - -0.10224733798243274, - -0.09841188947324513, - -0.09439294658098578, - -0.09006871214435108, - -0.0855018220918662, - -0.08072871723457375, - -0.07588148882721682, - -0.07115877087600163, - -0.06663034177276911, - -0.062170156477961175, - -0.05783676085482924, - -0.05358988219241423, - -0.04945730732331849, - -0.045519373343829016, - -0.04165033627346434, - -0.03769717995529199, - -0.03366718089667437, - -0.02959556315890629, - -0.025566142490913168, - -0.021769421894612763, - -0.018111304426364747, - -0.014613007878654636, - -0.011398587827260725, - -0.00858967032841312, - -0.006260103223554574, - -0.0044847418769093945, - -0.0030627410274653355, - -0.001907454890621307, - -0.0010769900421991885, - -0.0005126738378360036, - -0.0002234552973361184, - -0.00014658774011626872, - -0.0001364451424035358, - -0.00016925237778794497, - -0.0004500205567040082, - -0.0010064361112670558, - -0.001959849359473383, - -0.0033009358187445405, - -0.004946625613437535, - -0.006969167653146992, - -0.009513047804928258, - -0.012512907151307226, - -0.01589359840668371, - -0.01953024924346898, - -0.023207194489703292, - -0.026989887503652242, - -0.03089821443818498, - -0.03485685955982178, - -0.03879932620573721, - -0.042717975029009536, - -0.04654314547675957, - -0.05049477513970259, - -0.05467423809138001, - -0.05903506615930791, - -0.06355838965297053, - -0.06816744538434015, - -0.07281520537389652, - -0.0775854947295271, - -0.08243777516116552, - -0.08714495919422748, - -0.09165252991280141, - -0.09581280833824685, - -0.09965213763711732, - -0.10328252485380653, - -0.10669241617557158, - -0.10980117479023016, - -0.1126614522441856, - -0.11524221698681614, - -0.11765410279370488, - -0.120061644255278, - -0.12237900339306612, - -0.12455438707419059, - -0.12650176784803213, - -0.12813985392204022, - -0.12951849608553054, - -0.13068444546058597, - -0.13147633216945162, - -0.13188021071837933, - -0.13179630109489446, - -0.13122522709519474, - -0.13032953573795486, - -0.12916524468254623, - -0.12773477045888215, - -0.1260745241807526, - -0.12413839055917415, - -0.12197471397879733, - -0.11977535695868359, - -0.117484675044354, - -0.11509619749245295, - -0.11249339776789344, - -0.10955178190590559, - -0.10631046091797489, - -0.10285830386969325, - -0.0991277713658114, - -0.0951383269016262, - -0.0908409758099292, - -0.08620055297720203, - -0.08143902191977422, - -0.07668250349329858, - -0.07200054596765636, - -0.06742972159518595, - -0.06293471770479078, - -0.058474236357201476, - -0.05423830817264091, - -0.0501918033903687, - -0.04626046962622997, - -0.04235512550657271, - -0.03834620351498348, - -0.03424961193737878, - -0.03022992558472977, - -0.02630274600007259, - -0.022435234758624925, - -0.018714326771517187, - -0.015111614067757234, - -0.01182361448055381, - -0.009023750649995605, - -0.006715589530488714, - -0.004799814278599542, - -0.003273425005448456, - -0.002031365878125496, - -0.0011431667384500556, - -0.0006482530164888499, - -0.0003594217993177166, - -0.00017310981760429618, - -6.937793015105234e-5, - -8.042831306176099e-5, - -0.0003343148214382391, - -0.0009619752813515396, - -0.0018357375867215538, - -0.003017321788808815, - -0.004567908721671895, - -0.00655607889959467, - -0.009066631679482377, - -0.012085855339334865, - -0.015374502322758363, - -0.01886094123976697, - -0.022535992203262033, - -0.02632902955911011, - -0.030285827387323376, - -0.034275110479759265, - -0.03815442837338028, - -0.04195382873935542, - -0.04583150875367341, - -0.04980992098451702, - -0.054015867011324985, - -0.05835920691941935, - -0.06275895837434799, - -0.06729874490272071, - -0.07200931313152137, - -0.0768313278318676, - -0.08170491081215074, - -0.08643802394343135, - -0.09085809017073117, - -0.0950594767316169, - -0.09901055355906005, - -0.10273122930757761, - -0.10619896448706406, - -0.10932150517395672, - -0.11210129182091862, - -0.1147361078654763, - -0.11725424206285885, - -0.11971226861409859, - -0.12208260667411991, - -0.12420677835843941, - -0.126117945873166, - -0.12783796675829998, - -0.12933141647136046, - -0.13057276218760205, - -0.13146284426315735, - -0.13182344992605524, - -0.13175811823242267, - -0.13129037267191265, - -0.13049600645677634, - -0.12944463831700775, - -0.12805632778997286, - -0.1263263963133405, - -0.12439097168368085, - -0.12230983788856659, - -0.12016321186194162, - -0.11798307283209486, - -0.11556854943117356, - -0.11291592916432554, - -0.11000882383947382, - -0.10684755791349214, - -0.1034826567140989, - -0.09987423480196193, - -0.09585460933783124, - -0.09150767154273036, - -0.08691787280620673, - -0.08219689136868266, - -0.0775254182838897, - -0.07286287668256794, - -0.06818782729618973, - -0.06359958749553993, - -0.05918024160074764, - -0.054942280717469316, - -0.05095696485461128, - -0.046999857853751416, - -0.04298438352640348, - -0.0389481601361393, - -0.03491062093451323, - -0.030919312396520404, - -0.027023511846035644, - -0.023113834950479584, - -0.01922935328042722, - -0.01561270890480608, - -0.012333638176215751, - -0.00951597579015656, - -0.007141580692651718, - -0.005107364377007101, - -0.003411933935387695, - -0.0021849043579725714, - -0.001323837614109558, - -0.0007878758353648384, - -0.0004532974930324535, - -0.00015871713576143948, - 2.122452764705303e-5, - -3.669978861634178e-5, - -0.0003297298278145209, - -0.0008684585680405685, - -0.0016815490878771908, - -0.002710378361766892, - -0.004188593146641308, - -0.006208044663033236, - -0.008709566965928936, - -0.011599752864912327, - -0.014803744235203397, - -0.018196696117468304, - -0.021864175519212256, - -0.02576544921529586, - -0.029698745626991603, - -0.03361617445749246, - -0.03744766562322429, - -0.04123556485130311, - -0.04513549639547364, - -0.04921274851626765, - -0.05334285854743661, - -0.0575971117514555, - -0.06195044731457753, - -0.06646706778119012, - -0.07123688052834838, - -0.07613522532930247, - -0.08094612819949802, - -0.08561920285401906, - -0.09008283173438501, - -0.09432424058055189, - -0.09842260658214123, - -0.10221093163287223, - -0.10564099346035712, - -0.10874495224501037, - -0.11157959107034149, - -0.11425496771647381, - -0.11690191099295712, - -0.11938302077556577, - -0.12168889199562617, - -0.12382067308830326, - -0.12574548292561896, - -0.12756159912849435, - -0.12919450583429876, - -0.13046916486829357, - -0.13132578176741214, - -0.13174444104147204, - -0.13171251806961648, - -0.13139539801515454, - -0.13072591863849062, - -0.12967915963795829, - -0.12828682596172283, - -0.12656270585164325, - -0.1246425776223956, - -0.12268656875500582, - -0.12062189475374353, - -0.1184019143416648, - -0.11599496486198473, - -0.11330475613686644, - -0.11046270349937175, - -0.1074500688357373, - -0.10415765915665572, - -0.1005230161030088, - -0.09652591327063788, - -0.09215721662415591, - -0.08764648193888354, - -0.08304805581214199, - -0.07836027997425404, - -0.07365329611057016, - -0.06891935095135278, - -0.0642804127172878, - -0.05990122630930634, - -0.05575127312968789, - -0.05167920636289913, - -0.04767327619240831, - -0.04360572052280366, - -0.03956375597341303, - -0.035619904768831395, - -0.03168458533166621, - -0.027686266428238196 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/oscillating_beam_2d/validation_reference_9.json b/validation/oscillating_beam_2d/validation_reference_9.json deleted file mode 100644 index 929b94beb..000000000 --- a/validation/oscillating_beam_2d/validation_reference_9.json +++ /dev/null @@ -1,4031 +0,0 @@ -{ - "meta": { - "julia_version": "1.10.1", - "solver_version": "c6184f4-dirty", - "solver_name": "TrixiParticles.jl" - }, - "deflection_y_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -9.999999490424051e-5, - -0.0004012832196676648, - -0.0008791249877615238, - -0.0014744439128609923, - -0.0024129801792142002, - -0.003805134706861047, - -0.005650654874440428, - -0.007963158516216044, - -0.010609091265174824, - -0.013561356329041525, - -0.016896326592064283, - -0.020563784401711048, - -0.024366309924391497, - -0.028242666143839266, - -0.03202590876504942, - -0.0357804099891023, - -0.03963397995354452, - -0.04354399583885791, - -0.04747120034038949, - -0.05145279506305573, - -0.05549947442864964, - -0.059724682744685925, - -0.06424750472493311, - -0.06888546733975537, - -0.07356900750970179, - -0.07818926647607538, - -0.0826804561192119, - -0.08707993886870671, - -0.09134924325232577, - -0.09528800576441274, - -0.09887067611626686, - -0.10210780294565608, - -0.10503889089499699, - -0.10785356922202338, - -0.11050446794168155, - -0.11294366108244587, - -0.11520068314183542, - -0.11729836860390322, - -0.11927052968923083, - -0.12119954977230323, - -0.12290476246240038, - -0.12427960262081247, - -0.12528553089476557, - -0.1258529593090568, - -0.12609103518027037, - -0.12600518255763424, - -0.1254928208006287, - -0.12454311429610142, - -0.12321527992042962, - -0.12155815824214802, - -0.11979351074143331, - -0.11790421898371008, - -0.11583562084827075, - -0.11360941536229528, - -0.11118013748100479, - -0.10860164523825717, - -0.10593627463352269, - -0.10305943879194004, - -0.09984735488017478, - -0.09630206104088668, - -0.09236328146622887, - -0.0882089088752725, - -0.08391243687243125, - -0.07942619811100193, - -0.07478752459696983, - -0.07008688710364543, - -0.06541538258441258, - -0.060969291497549406, - -0.0567628370528092, - -0.052636994352999546, - -0.04861425956434256, - -0.04463177463211459, - -0.04072097245066487, - -0.036925641809701246, - -0.03314930832887166, - -0.029256431102829744, - -0.025345265248515478, - -0.021476786243251382, - -0.01780000828778654, - -0.01446620433628247, - -0.011386597414162689, - -0.00859234045681263, - -0.006200628225116982, - -0.0042792274440524, - -0.0028411346683037833, - -0.0018623666033701271, - -0.0010903065053204652, - -0.0005084605014637443, - -0.00016174104876662612, - -1.864487784562774e-5, - -8.87459824194508e-5, - -0.0003149456395545088, - -0.0006198295258294188, - -0.0011336254735239398, - -0.0020463267561589005, - -0.0033561583117646364, - -0.005147758338114744, - -0.007317654475215108, - -0.009810635290501479, - -0.012716247127613416, - -0.016049313597476328, - -0.01964986797434592, - -0.023416080979991333, - -0.027186491092103082, - -0.03089678704383296, - -0.03470579442139331, - -0.03856816678893326, - -0.04244389140085199, - -0.04632601510685425, - -0.050230578695751656, - -0.054243501191794094, - -0.05855288198915646, - -0.06305749786109927, - -0.0676653873981864, - -0.07232409739070023, - -0.07691371621314229, - -0.08147671809248175, - -0.08599069923260863, - -0.09028640423664737, - -0.09424107670440576, - -0.09785999467181375, - -0.10111371307403096, - -0.10419074860025952, - -0.10710415811190419, - -0.10977592094630699, - -0.11224189728330608, - -0.11452239965585577, - -0.11667201978119329, - -0.11879644452890428, - -0.12080957236633794, - -0.12254098665096394, - -0.12398129124668204, - -0.12501640415648207, - -0.12571654571309532, - -0.12611668380726146, - -0.12611419676264082, - -0.12565553217245015, - -0.124765853398031, - -0.12347147672516776, - -0.1219598967643281, - -0.12032186549848137, - -0.11846435259520456, - -0.1164446839191431, - -0.11421870733795662, - -0.11184077393765715, - -0.10939806479396429, - -0.10682506258090416, - -0.1039681893704046, - -0.10080560934688211, - -0.09725568047763257, - -0.09340209829080996, - -0.08938268810710305, - -0.08511960699952073, - -0.08063962909951478, - -0.07598692377423273, - -0.0712582452656782, - -0.06663749835322501, - -0.06225873178649387, - -0.05798501381099522, - -0.053821845831147, - -0.049739007101841655, - -0.04572739160815349, - -0.04187712216862, - -0.03809332416180412, - -0.034229492135202, - -0.030282528558262835, - -0.0263243860013382, - -0.02242092400875223, - -0.018784230826099473, - -0.015357903991347236, - -0.012139638886657025, - -0.009248100100579977, - -0.006776925526045311, - -0.0047988117184901025, - -0.003338782154117991, - -0.0022112817437348505, - -0.0012923390077519501, - -0.0006607408617806884, - -0.00025047973263304067, - -9.111814698419853e-5, - -0.00010754085418237039, - -0.00018462889939373922, - -0.0003679101656733335, - -0.0008594922957344611, - -0.001698150966663852, - -0.00296158194062701, - -0.004641978522351527, - -0.006631662764362248, - -0.009048031427685023, - -0.01193402395453569, - -0.015213062406229529, - -0.01876231355337636, - -0.022443434130476676, - -0.026091399093514142, - -0.02983227871684172, - -0.03366341457571404, - -0.037502248098068354, - -0.041343111818558556, - -0.04514668188276005, - -0.04899040370919372, - -0.05306270747359594, - -0.05738883114550445, - -0.061846268336048726, - -0.06643738107382051, - -0.07103012364509748, - -0.07565303320993866, - -0.08032376870379399, - -0.08488539588039583, - -0.08918451661436329, - -0.09317320660979296, - -0.09679576884475158, - -0.10015869847825022, - -0.10336996216710187, - -0.10631264233043813, - -0.1090186711606806, - -0.11149758053832005, - -0.11381169483874298, - -0.11609007505715285, - -0.11833000108230396, - -0.12036219470780013, - -0.122155211519349, - -0.1236194755331182, - -0.12474342744464048, - -0.1256180631460188, - -0.12611972227419396, - -0.12617962650736256, - -0.1257801685417764, - -0.1249276769220799, - -0.12374553111200774, - -0.12239575332378211, - -0.12080485445913783, - -0.11900528956169552, - -0.11699566216959749, - -0.1147905491676683, - -0.11253837779786496, - -0.11020796565350244, - -0.10766989479860017, - -0.10485651776935646, - -0.10170303298874578, - -0.09819549196680978, - -0.09449611457942045, - -0.09053810115255519, - -0.0863023659825911, - -0.08182336778294759, - -0.07714414181280001, - -0.07244924650642105, - -0.0679203689025466, - -0.0635154048830566, - -0.05919476333957609, - -0.05498797645055518, - -0.05084040670700258, - -0.04688403246286254, - -0.0430671596267089, - -0.03922750733153287, - -0.03529711680495914, - -0.03131052561461157, - -0.0273021270070685, - -0.023449773570929183, - -0.01977739391650779, - -0.01621696147960677, - -0.012905027883904413, - -0.009919773897017932, - -0.007390204727864991, - -0.005393089253674819, - -0.003830708514590382, - -0.002526127630609558, - -0.001539791740588492, - -0.0008308722947625944, - -0.00039723990332758176, - -0.0002131772950809234, - -9.843298716122328e-5, - -3.897018742731774e-5, - -0.00017797384883131914, - -0.0006154876112080977, - -0.0014011889772179414, - -0.00260147874743109, - -0.004089331389302058, - -0.005971233401242284, - -0.008347070347467688, - -0.011184300923748326, - -0.014407613112754888, - -0.01788195774303957, - -0.02142041541861963, - -0.025045694918086094, - -0.028823001958274468, - -0.03262707128399744, - -0.03645503290414783, - -0.04021495413245216, - -0.04393985627792343, - -0.04780708568042993, - -0.0519245689165019, - -0.05620333931482644, - -0.06064278651023076, - -0.06516059624760778, - -0.06973084816005765, - -0.0744508953207509, - -0.07917303884281779, - -0.08374577541043315, - -0.08806182252445115, - -0.09205198769556808, - -0.09573618578735257, - -0.09925565919311513, - -0.10251221234430513, - -0.10549174523653741, - -0.10821843156928816, - -0.1107065195233743, - -0.11312626746570223, - -0.11553238765307564, - -0.11781179718674745, - -0.11988464967648067, - -0.12171170503669149, - -0.12321784140865008, - -0.12451467828337852, - -0.12550480718797896, - -0.12607883377339024, - -0.12620374579592739, - -0.12583951853155195, - -0.12507284086747242, - -0.12406165156407639, - -0.12279725243398099, - -0.12125788785735259, - -0.11949856754326002, - -0.11748278242950456, - -0.11538849394370201, - -0.11325586615142723, - -0.11098436389599753, - -0.10848798665468651, - -0.10569331019523219, - -0.10255380345056431, - -0.09918864783395266, - -0.0955904496955354, - -0.0916662916772691, - -0.08746415131158676, - -0.08295502979808543, - -0.07830176013216571, - -0.07370071479938563, - -0.06919847643102073, - -0.06474850250343657, - -0.06040009426414258, - -0.05611277370772373, - -0.051992842627117224, - -0.04809531881405239, - -0.044240773280538485, - -0.040345877972646875, - -0.03636618346597365, - -0.03232881481665646, - -0.028352201394978682, - -0.024525361172776806, - -0.02073602250141158, - -0.017088751176200682, - -0.013678608370587935, - -0.010623961308541877, - -0.008082237322855712, - -0.006014763788006015, - -0.004281870594098222, - -0.0028740430903641282, - -0.0018103595927116845, - -0.0010461677349734959, - -0.0006181525036826306, - -0.00032095183983105353, - -6.525767033384831e-5, - 6.617085282908074e-5, - -2.8433313274322733e-5, - -0.0004124121254225916, - -0.001163144566883656, - -0.0021970472196294203, - -0.003537165901314287, - -0.005367729177403406, - -0.0076811202957281135, - -0.010472751477757135, - -0.013620847837936333, - -0.01695188236841843, - -0.020408089451213772, - -0.024067219271925445, - -0.027818631908449312, - -0.031618529772388326, - -0.03538471486809803, - -0.03904325578171386, - -0.04276494079705346, - -0.046678401836961946, - -0.05077360472448696, - -0.05502182768631619, - -0.05940141767124796, - -0.06384401392664286, - -0.06848870103302884, - -0.07326265426291693, - -0.07799973558983392, - -0.08258144659746569, - -0.08688918992925154, - -0.0909059523742098, - -0.0947338391501076, - -0.09833508994438027, - -0.10162121416897467, - -0.10463965735689737, - -0.10735433238321328, - -0.10992763625557815, - -0.11247686577551155, - -0.11494651388462714, - -0.11725476768793873, - -0.11936657829635622, - -0.12120684384954761, - -0.12285392891194828, - -0.12429352590614243, - -0.12535539895902656, - -0.12600627797919586, - -0.12616186421565007, - -0.1258680748283833, - -0.1252583052632206, - -0.12437214461237629, - -0.12316230742023145, - -0.12168617417007899, - -0.11991453912122317, - -0.11797917723841168, - -0.11602068665841733, - -0.1139583051842346, - -0.11173829956592644, - -0.10926312564878765, - -0.1064736965140838, - -0.10343768001958492, - -0.10020959182559061, - -0.09665571312999645, - -0.09278844012649452, - -0.08856578275012798, - -0.08406839205018411, - -0.07951155403640459, - -0.07497147234136976, - -0.07045064870618511, - -0.06597817285978229, - -0.06155992073389257, - -0.05725386116718869, - -0.05321517146094083, - -0.04929831270461896, - -0.045402991194024696, - -0.0414510387913845, - -0.03741676053333283, - -0.033390777847849044, - -0.029470935528306458, - -0.02557040046952285, - -0.021691916825314583, - -0.017962029398679295, - -0.014457930654302044, - -0.011403415565543468, - -0.008815755387624727, - -0.006605379012447032, - -0.004734920472010339, - -0.0032469817996639318, - -0.0021007661713773294, - -0.0013454342681133435, - -0.0008406533571610666, - -0.0003948233909631619, - -5.244904484709087e-5, - 0.00013815040088045565, - 8.43682383163142e-5, - -0.00027444027783086675, - -0.000906947663404439, - -0.001760353124761506, - -0.0030380816332118447, - -0.004794560324673854, - -0.0070623106902425, - -0.009792994456567658, - -0.012799507004671747, - -0.016007042166076634, - -0.019460814142837773, - -0.023109914276729836, - -0.026843730206538158, - -0.030614734018916213, - -0.034259221806278654, - -0.03789109329264701, - -0.041646728801111456, - -0.04556259235293241, - -0.049628469796042525, - -0.05382866859276572, - -0.058105503505981766, - -0.06257320905637956, - -0.06728566938852462, - -0.0720639275742487, - -0.07681618472019285, - -0.0813731430562555, - -0.08568310187703031, - -0.08980697030050325, - -0.09374894057504662, - -0.0973808802212675, - -0.10071544431569775, - -0.10372048932711554, - -0.10648413226419434, - -0.1091925314108934, - -0.11181851122460003, - -0.11432623440751517, - -0.11666528186822742, - -0.1187829665276634, - -0.12071340867769559, - -0.12252326766882644, - -0.124036877203265, - -0.1251817404313312, - -0.12586925957201495, - -0.12607078331009244, - -0.12592035397189824, - -0.1254566313064785, - -0.12464642217182527, - -0.1235041114416203, - -0.12203763569236742, - -0.12030460291359255, - -0.11851535890880267, - -0.11663835230130155, - -0.11464186907932923, - -0.11245035339678, - -0.10997106698977863, - -0.10725293774187465, - -0.10436196745240367, - -0.10120294801239126, - -0.09770992047898061, - -0.09385588012758624, - -0.08961751810108395, - -0.0852175866904953, - -0.08074464779150131, - -0.07622533724426842, - -0.07168991274017625, - -0.06716532864288356, - -0.06269870479639983, - -0.058467790240855244, - -0.05444211124136884, - -0.050488706315206154, - -0.04655218264196471, - -0.04252590737563117, - -0.0384897286646938, - -0.0345257252315621, - -0.030586960558205582, - -0.026597165547943294, - -0.022655684776948806, - -0.018820244722589197, - -0.01530767442529818, - -0.012240566588199168, - -0.009537666318267433, - -0.007186804991884049, - -0.0052134657945304965, - -0.003633214842245245, - -0.0024734509257103247, - -0.0016857806457380477, - -0.0010268438987196676, - -0.00048476087150541025, - -6.531171394907019e-5, - 0.00016770598378696745, - 0.00012837141904993923, - -0.0001544903349976097, - -0.0006080811472435627, - -0.0013671596559354914, - -0.002575361826311213, - -0.004269050593693181, - -0.00650124912617385, - -0.00909139629391745, - -0.011953919207402524, - -0.015111150207755924, - -0.01855684086322045, - -0.022177022268364543, - -0.02590329127452857, - -0.029555717901015306, - -0.03313227321008517, - -0.03679153343117845, - -0.04055471694393443, - -0.04445921749254441, - -0.04847995231510051, - -0.052579310246031255, - -0.05682339367196509, - -0.06136079428039122, - -0.06607237239208719, - -0.07086835972264101, - -0.07559004112361435, - -0.08011563091225207, - -0.08450074220465909, - -0.08874322826440054, - -0.09273353297440173, - -0.09640890344974107, - -0.09974990823222979, - -0.10276052520541909, - -0.10565718663382455, - -0.10845484224502411, - -0.11113349379444692, - -0.11366860512869666, - -0.11600877715484961, - -0.11817800407078431, - -0.12026337691407776, - -0.12216557566646842, - -0.12375389689913051, - -0.12495573947453308, - -0.12565988488052696, - -0.1259901835310515, - -0.12599072422166416, - -0.12563047961964938, - -0.1248919841677468, - -0.12378405118347818, - -0.12233115619296539, - -0.12073276401666497, - -0.11904970665909992, - -0.11724118610945493, - -0.11529650082592814, - -0.11308943186194477, - -0.1106601209181833, - -0.10807073472873578, - -0.10528079649547202, - -0.10218172272718441, - -0.09873325525292707, - -0.09485161107951863, - -0.09069497449582847, - -0.08640026288048039, - -0.08197415965003056, - -0.07747108247002965, - -0.07289453423437574, - -0.06831579778003083, - -0.06389517376761586, - -0.059717626908965926, - -0.05565692006216931, - -0.05168244003940532, - -0.0476608815965094, - -0.04361077351765637, - -0.039631615775391635, - -0.035685318339404075, - -0.031682918470050773, - -0.027632745047570295, - -0.02359654102873562, - -0.019724211901139647, - -0.01623767510539141, - -0.013077084700876564, - -0.010251177792048526, - -0.007777856158335471, - -0.005702602025329786, - -0.004081654912496406, - -0.002915941513547885, - -0.00199490764144291, - -0.0012157901223409633, - -0.0005912862886001367, - -0.00010563399584425336, - 0.0001255393157696648, - 0.00013964665297556966, - 5.957712071617827e-6, - -0.000320081006472862, - -0.001013196414142225, - -0.0021421833997633394, - -0.0038160803399664824, - -0.005930953860082558, - -0.008355100868705626, - -0.011132620095569088, - -0.01425859375417612, - -0.017678430046853225, - -0.021286220251999666, - -0.024922473231210898, - -0.028462988125578077, - -0.03205388458663518, - -0.03571628477923729, - -0.03948665812611111, - -0.04335988683600126, - -0.04728207535056098, - -0.05131129467845686, - -0.05560231015092775, - -0.060153339388265156, - -0.06486669629768532, - -0.06964816620902603, - -0.0743026941681358, - -0.07887055267124975, - -0.08335739741004967, - -0.0876711945238925, - -0.09170155317205435, - -0.09539574849455543, - -0.09872012475461894, - -0.10183914549192577, - -0.10484680220799943, - -0.10770038541681051, - -0.11042441318132933, - -0.11295062506571471, - -0.11531615382636583, - -0.11761150567749519, - -0.11981515110619771, - -0.1217818956004674, - -0.12344007724303752, - -0.12464790266984015, - -0.12544978021065134, - -0.12593485788015896, - -0.12605215267123196, - -0.12578309731351062, - -0.1250893387748053, - -0.12399233431616415, - -0.1226434983847923, - -0.1211809403647398, - -0.11956743342107427, - -0.11783381090028103, - -0.11587742552376257, - -0.11369380756761993, - -0.1113754078856788, - -0.108900598223088, - -0.10618440115361479, - -0.10314101460764963, - -0.09967757717391657, - -0.09584201824084403, - -0.09181136030072733, - -0.08757975260848927, - -0.08320483866298263, - -0.07867843186151892, - -0.07404954355929852, - -0.06948996738894092, - -0.06514198983945185, - -0.06095344758287215, - -0.05687761088665062, - -0.05283163211862846, - -0.04874937535445945, - -0.044753566221821965, - -0.04080645578534554, - -0.03683320102284397, - -0.032771843653422957, - -0.028643507438798406, - -0.024544103613646135, - -0.020714574802701217, - -0.01717603468341191, - -0.013907410719349495, - -0.01096300595313578, - -0.008366748332025414, - -0.00623717101750757, - -0.004609255841012052, - -0.0033506462693351675, - -0.002287708977094319, - -0.0014233371183759898, - -0.0007034938138410721, - -0.00022019874042135228, - 3.5817468005730144e-5, - 0.0001713975212947888, - 0.0001768832200284027, - -6.889392727536976e-5, - -0.0006843422973365227, - -0.0017856256570963677, - -0.003386593180283253, - -0.005320907476809046, - -0.0076378890196150025, - -0.010348642271336809, - -0.013447078861774856, - -0.01684931787011363, - -0.020390820087613525, - -0.02389187419611582, - -0.027411473911316125, - -0.031008560994910075, - -0.034673910867686474, - -0.038444454248869844, - -0.04222203670807813, - -0.0460574369613888, - -0.05009178580208723, - -0.054412770802064456, - -0.058953698558545195, - -0.06366643296992802, - -0.0683621054111446, - -0.07301285590008032, - -0.0776665334416344, - -0.08222455786327028, - -0.08658943571693223, - -0.09063942722209706, - -0.09431555404436677, - -0.09770144359905096, - -0.10095235241464116, - -0.10401994446049292, - -0.10693682902378361, - -0.10965326154237433, - -0.11218214576109714, - -0.11464595946173044, - -0.11706342970089956, - -0.11933946295358501, - -0.12137478495286823, - -0.12304726763138879, - -0.12430493653834626, - -0.12526642550762368, - -0.12587138687414354, - -0.12609854890922856, - -0.12588627725853457, - -0.1252100214475324, - -0.12418759828236531, - -0.12298215093987228, - -0.12160910114501675, - -0.12007976134460102, - -0.11836018370350544, - -0.11639448733750234, - -0.11431292372350041, - -0.11210335840032004, - -0.10972145363283756, - -0.1070680560124093, - -0.10403095665408331, - -0.1005802435148532, - -0.09686914026356776, - -0.09292618202030387, - -0.08876467751043288, - -0.08440498720645849, - -0.07982423706072417, - -0.07520704076499149, - -0.07071377734961524, - -0.06639203229486822, - -0.06219176396611372, - -0.05807231350421648, - -0.05393485069194269, - -0.04988779626270897, - -0.04593815077496781, - -0.04198743602537618, - -0.037975538671257, - -0.03383977396546826, - -0.02964341265859005, - -0.02557141126783298, - -0.021742273974271316, - -0.018108986511232987, - -0.014746200164006955, - -0.011660862792029237, - -0.00899410923422873, - -0.006854261399707511, - -0.005164332323906695, - -0.0037654004474656074, - -0.0025999392287681233, - -0.001630101938923087, - -0.0008806878459622722, - -0.0004056531474577324, - -4.695094935308966e-5, - 0.00021546794066033825, - 0.0003253348987425197, - 0.00015458738403559442, - -0.0004226092770925529, - -0.0014866873068901925, - -0.0029176010817842787, - -0.00471821377186201, - -0.006949229405576808, - -0.009604731578544454, - -0.012691972031817015, - -0.016035603329030597, - -0.019444939018414716, - -0.02287412073808201, - -0.026399170506229017, - -0.029987098741796066, - -0.03367626902181299, - -0.037367612663063425, - -0.04104388959058351, - -0.04485584610675262, - -0.04891244031229204, - -0.05323211051651107, - -0.057771230717473955, - -0.06240655623753994, - -0.0670423791721688, - -0.0717620186094945, - -0.0764735430271021, - -0.08109330320939787, - -0.08548003210046337, - -0.08951094660367341, - -0.09321247064138258, - -0.09672521303553591, - -0.10005420820715684, - -0.10318903423710618, - -0.1061222850692569, - -0.10881364111117701, - -0.1114209460749505, - -0.11399730330826555, - -0.11650333694563438, - -0.11884253955360966, - -0.12090382619149931, - -0.12259126419515218, - -0.12399044991327282, - -0.1250810226995585, - -0.12580117586691314, - -0.12611036698129072, - -0.12591217255281853, - -0.12529730752397977, - -0.124408423722252, - -0.12331941387715248, - -0.122032276389598, - -0.12055188445860257, - -0.11880610252233392, - -0.11691978094677231, - -0.11494518706342319, - -0.1128369208485534, - -0.1105349538627009, - -0.10789545482980059, - -0.10486140592171915, - -0.10151015227562822, - -0.09791183118190026, - -0.0940448278044457, - -0.08994432842717041, - -0.08553551973941032, - -0.08095729411064799, - -0.07640182760709283, - -0.07196144610365778, - -0.06764665330655428, - -0.06341964231525313, - -0.05920800451099144, - -0.05506558599704013, - -0.0510786036153278, - -0.047132222295390776, - -0.043176262856051716, - -0.03908927965848404, - -0.03488323771221016, - -0.030693956035067076, - -0.026659181657536474, - -0.022763523367169886, - -0.019053512514506467, - -0.015559108098266782, - -0.012372176000549049, - -0.009698477658491831, - -0.007510594349489359, - -0.005707892811615796, - -0.004183061176802812, - -0.0029073576051062353, - -0.0018688863324129567, - -0.001145313446187523, - -0.000592150042470754, - -0.00011632174995538681, - 0.00025653524027688217, - 0.00045807783650112475, - 0.0003252980244249446, - -0.00023062027978465113, - -0.0011667520353811443, - -0.0024346171674686926, - -0.004140368934391004, - -0.006281906816525289, - -0.00892856432647851, - -0.011964409915722164, - -0.01518414818759398, - -0.018486808725459738, - -0.02189511109404685, - -0.0254071616289345, - -0.029020292419637765, - -0.03267022778679988, - -0.036240442344885014, - -0.03987857692587141, - -0.04368948638897835, - -0.04775912495672156, - -0.05207533361795416, - -0.05655671904551609, - -0.06109496332856221, - -0.06576034548086478, - -0.07053004296350948, - -0.07529662436070193, - -0.07995566349609598, - -0.0843104389130836, - -0.08834775821963135, - -0.0921458030544696, - -0.09575904573803096, - -0.09915413044374635, - -0.1023357785783209, - -0.10523097221674294, - -0.10797159210001228, - -0.1106843830761446, - -0.11335217697805815, - -0.11593149319899936, - -0.11829721193825365, - -0.12036082996108262, - -0.12214750668476991, - -0.12368915850432106, - -0.12488850454291353, - -0.1257177488057579, - -0.12604390860065612, - -0.12589240800931617, - -0.1253966330262159, - -0.12463682946665532, - -0.12365021060334422, - -0.1224328734317672, - -0.12093735877364252, - -0.11923406962632013, - -0.11746088437869627, - -0.11557835763391912, - -0.11357376272746893, - -0.11129539503116881, - -0.10865445620676753, - -0.10568877253026429, - -0.10245946227749136, - -0.09895135955506652, - -0.09516980111324991, - -0.09105199694891472, - -0.08662687242288429, - -0.08211429228861165, - -0.07761506173252905, - -0.07321769972643637, - -0.06889219398459338, - -0.06458834409111545, - -0.06033264377515836, - -0.056250610393929576, - -0.052277839525693925, - -0.048343234946927396, - -0.04433544340856156, - -0.04016458518421576, - -0.035953638745379636, - -0.031805783721288804, - -0.02775279575744693, - -0.023793185247857146, - -0.01997903824147503, - -0.01635595635175689, - -0.013159547603906818, - -0.010451404430389407, - -0.008173902456491113, - -0.006248071615002719, - -0.004598128810729581, - -0.0032280928937666875, - -0.0021987637859313264, - -0.001437893587410059, - -0.0007685184254452027, - -0.00019233656122726733, - 0.00029545544883616097, - 0.0005370596698693816, - 0.0004188997477722299, - -5.056554648417977e-5, - -0.0008221835089835643, - -0.0019795868732101207, - -0.003576513640621213, - -0.005686570003222845 - ], - "datatype": "Float64", - "type": "series" - }, - "deflection_x_solid_1": { - "n_values": 1001, - "time": [ - 0.0, - 0.01, - 0.02, - 0.03, - 0.04, - 0.05, - 0.06, - 0.07, - 0.08, - 0.09, - 0.1, - 0.11, - 0.12, - 0.13, - 0.14, - 0.15, - 0.16, - 0.17, - 0.18, - 0.19, - 0.2, - 0.21, - 0.22, - 0.23, - 0.24, - 0.25, - 0.26, - 0.27, - 0.28, - 0.29, - 0.3, - 0.31, - 0.32, - 0.33, - 0.34, - 0.35000000000000003, - 0.36, - 0.37, - 0.38, - 0.39, - 0.4, - 0.41000000000000003, - 0.42, - 0.43, - 0.44, - 0.45, - 0.46, - 0.47000000000000003, - 0.48, - 0.49, - 0.5, - 0.51, - 0.52, - 0.53, - 0.54, - 0.55, - 0.56, - 0.5700000000000001, - 0.58, - 0.59, - 0.6, - 0.61, - 0.62, - 0.63, - 0.64, - 0.65, - 0.66, - 0.67, - 0.68, - 0.6900000000000001, - 0.7000000000000001, - 0.71, - 0.72, - 0.73, - 0.74, - 0.75, - 0.76, - 0.77, - 0.78, - 0.79, - 0.8, - 0.81, - 0.8200000000000001, - 0.8300000000000001, - 0.84, - 0.85, - 0.86, - 0.87, - 0.88, - 0.89, - 0.9, - 0.91, - 0.92, - 0.93, - 0.9400000000000001, - 0.9500000000000001, - 0.96, - 0.97, - 0.98, - 0.99, - 1.0, - 1.01, - 1.02, - 1.03, - 1.04, - 1.05, - 1.06, - 1.07, - 1.08, - 1.09, - 1.1, - 1.11, - 1.12, - 1.1300000000000001, - 1.1400000000000001, - 1.1500000000000001, - 1.16, - 1.17, - 1.18, - 1.19, - 1.2, - 1.21, - 1.22, - 1.23, - 1.24, - 1.25, - 1.26, - 1.27, - 1.28, - 1.29, - 1.3, - 1.31, - 1.32, - 1.33, - 1.34, - 1.35, - 1.36, - 1.37, - 1.3800000000000001, - 1.3900000000000001, - 1.4000000000000001, - 1.41, - 1.42, - 1.43, - 1.44, - 1.45, - 1.46, - 1.47, - 1.48, - 1.49, - 1.5, - 1.51, - 1.52, - 1.53, - 1.54, - 1.55, - 1.56, - 1.57, - 1.58, - 1.59, - 1.6, - 1.61, - 1.62, - 1.6300000000000001, - 1.6400000000000001, - 1.6500000000000001, - 1.6600000000000001, - 1.67, - 1.68, - 1.69, - 1.7, - 1.71, - 1.72, - 1.73, - 1.74, - 1.75, - 1.76, - 1.77, - 1.78, - 1.79, - 1.8, - 1.81, - 1.82, - 1.83, - 1.84, - 1.85, - 1.86, - 1.87, - 1.8800000000000001, - 1.8900000000000001, - 1.9000000000000001, - 1.9100000000000001, - 1.92, - 1.93, - 1.94, - 1.95, - 1.96, - 1.97, - 1.98, - 1.99, - 2.0, - 2.0100000000000002, - 2.02, - 2.0300000000000002, - 2.04, - 2.05, - 2.06, - 2.07, - 2.08, - 2.09, - 2.1, - 2.11, - 2.12, - 2.13, - 2.14, - 2.15, - 2.16, - 2.17, - 2.18, - 2.19, - 2.2, - 2.21, - 2.22, - 2.23, - 2.24, - 2.25, - 2.2600000000000002, - 2.27, - 2.2800000000000002, - 2.29, - 2.3000000000000003, - 2.31, - 2.32, - 2.33, - 2.34, - 2.35, - 2.36, - 2.37, - 2.38, - 2.39, - 2.4, - 2.41, - 2.42, - 2.43, - 2.44, - 2.45, - 2.46, - 2.47, - 2.48, - 2.49, - 2.5, - 2.5100000000000002, - 2.52, - 2.5300000000000002, - 2.54, - 2.5500000000000003, - 2.56, - 2.57, - 2.58, - 2.59, - 2.6, - 2.61, - 2.62, - 2.63, - 2.64, - 2.65, - 2.66, - 2.67, - 2.68, - 2.69, - 2.7, - 2.71, - 2.72, - 2.73, - 2.74, - 2.75, - 2.7600000000000002, - 2.77, - 2.7800000000000002, - 2.79, - 2.8000000000000003, - 2.81, - 2.82, - 2.83, - 2.84, - 2.85, - 2.86, - 2.87, - 2.88, - 2.89, - 2.9, - 2.91, - 2.92, - 2.93, - 2.94, - 2.95, - 2.96, - 2.97, - 2.98, - 2.99, - 3.0, - 3.0100000000000002, - 3.02, - 3.0300000000000002, - 3.04, - 3.0500000000000003, - 3.06, - 3.0700000000000003, - 3.08, - 3.09, - 3.1, - 3.11, - 3.12, - 3.13, - 3.14, - 3.15, - 3.16, - 3.17, - 3.18, - 3.19, - 3.2, - 3.21, - 3.22, - 3.23, - 3.24, - 3.25, - 3.2600000000000002, - 3.27, - 3.2800000000000002, - 3.29, - 3.3000000000000003, - 3.31, - 3.3200000000000003, - 3.33, - 3.34, - 3.35, - 3.36, - 3.37, - 3.38, - 3.39, - 3.4, - 3.41, - 3.42, - 3.43, - 3.44, - 3.45, - 3.46, - 3.47, - 3.48, - 3.49, - 3.5, - 3.5100000000000002, - 3.52, - 3.5300000000000002, - 3.54, - 3.5500000000000003, - 3.56, - 3.5700000000000003, - 3.58, - 3.59, - 3.6, - 3.61, - 3.62, - 3.63, - 3.64, - 3.65, - 3.66, - 3.67, - 3.68, - 3.69, - 3.7, - 3.71, - 3.72, - 3.73, - 3.74, - 3.75, - 3.7600000000000002, - 3.77, - 3.7800000000000002, - 3.79, - 3.8000000000000003, - 3.81, - 3.8200000000000003, - 3.83, - 3.84, - 3.85, - 3.86, - 3.87, - 3.88, - 3.89, - 3.9, - 3.91, - 3.92, - 3.93, - 3.94, - 3.95, - 3.96, - 3.97, - 3.98, - 3.99, - 4.0, - 4.01, - 4.0200000000000005, - 4.03, - 4.04, - 4.05, - 4.0600000000000005, - 4.07, - 4.08, - 4.09, - 4.1, - 4.11, - 4.12, - 4.13, - 4.14, - 4.15, - 4.16, - 4.17, - 4.18, - 4.19, - 4.2, - 4.21, - 4.22, - 4.23, - 4.24, - 4.25, - 4.26, - 4.2700000000000005, - 4.28, - 4.29, - 4.3, - 4.3100000000000005, - 4.32, - 4.33, - 4.34, - 4.3500000000000005, - 4.36, - 4.37, - 4.38, - 4.39, - 4.4, - 4.41, - 4.42, - 4.43, - 4.44, - 4.45, - 4.46, - 4.47, - 4.48, - 4.49, - 4.5, - 4.51, - 4.5200000000000005, - 4.53, - 4.54, - 4.55, - 4.5600000000000005, - 4.57, - 4.58, - 4.59, - 4.6000000000000005, - 4.61, - 4.62, - 4.63, - 4.64, - 4.65, - 4.66, - 4.67, - 4.68, - 4.69, - 4.7, - 4.71, - 4.72, - 4.73, - 4.74, - 4.75, - 4.76, - 4.7700000000000005, - 4.78, - 4.79, - 4.8, - 4.8100000000000005, - 4.82, - 4.83, - 4.84, - 4.8500000000000005, - 4.86, - 4.87, - 4.88, - 4.89, - 4.9, - 4.91, - 4.92, - 4.93, - 4.94, - 4.95, - 4.96, - 4.97, - 4.98, - 4.99, - 5.0, - 5.01, - 5.0200000000000005, - 5.03, - 5.04, - 5.05, - 5.0600000000000005, - 5.07, - 5.08, - 5.09, - 5.1000000000000005, - 5.11, - 5.12, - 5.13, - 5.14, - 5.15, - 5.16, - 5.17, - 5.18, - 5.19, - 5.2, - 5.21, - 5.22, - 5.23, - 5.24, - 5.25, - 5.26, - 5.2700000000000005, - 5.28, - 5.29, - 5.3, - 5.3100000000000005, - 5.32, - 5.33, - 5.34, - 5.3500000000000005, - 5.36, - 5.37, - 5.38, - 5.39, - 5.4, - 5.41, - 5.42, - 5.43, - 5.44, - 5.45, - 5.46, - 5.47, - 5.48, - 5.49, - 5.5, - 5.51, - 5.5200000000000005, - 5.53, - 5.54, - 5.55, - 5.5600000000000005, - 5.57, - 5.58, - 5.59, - 5.6000000000000005, - 5.61, - 5.62, - 5.63, - 5.64, - 5.65, - 5.66, - 5.67, - 5.68, - 5.69, - 5.7, - 5.71, - 5.72, - 5.73, - 5.74, - 5.75, - 5.76, - 5.7700000000000005, - 5.78, - 5.79, - 5.8, - 5.8100000000000005, - 5.82, - 5.83, - 5.84, - 5.8500000000000005, - 5.86, - 5.87, - 5.88, - 5.89, - 5.9, - 5.91, - 5.92, - 5.93, - 5.94, - 5.95, - 5.96, - 5.97, - 5.98, - 5.99, - 6.0, - 6.01, - 6.0200000000000005, - 6.03, - 6.04, - 6.05, - 6.0600000000000005, - 6.07, - 6.08, - 6.09, - 6.1000000000000005, - 6.11, - 6.12, - 6.13, - 6.140000000000001, - 6.15, - 6.16, - 6.17, - 6.18, - 6.19, - 6.2, - 6.21, - 6.22, - 6.23, - 6.24, - 6.25, - 6.26, - 6.2700000000000005, - 6.28, - 6.29, - 6.3, - 6.3100000000000005, - 6.32, - 6.33, - 6.34, - 6.3500000000000005, - 6.36, - 6.37, - 6.38, - 6.390000000000001, - 6.4, - 6.41, - 6.42, - 6.43, - 6.44, - 6.45, - 6.46, - 6.47, - 6.48, - 6.49, - 6.5, - 6.51, - 6.5200000000000005, - 6.53, - 6.54, - 6.55, - 6.5600000000000005, - 6.57, - 6.58, - 6.59, - 6.6000000000000005, - 6.61, - 6.62, - 6.63, - 6.640000000000001, - 6.65, - 6.66, - 6.67, - 6.68, - 6.69, - 6.7, - 6.71, - 6.72, - 6.73, - 6.74, - 6.75, - 6.76, - 6.7700000000000005, - 6.78, - 6.79, - 6.8, - 6.8100000000000005, - 6.82, - 6.83, - 6.84, - 6.8500000000000005, - 6.86, - 6.87, - 6.88, - 6.890000000000001, - 6.9, - 6.91, - 6.92, - 6.93, - 6.94, - 6.95, - 6.96, - 6.97, - 6.98, - 6.99, - 7.0, - 7.01, - 7.0200000000000005, - 7.03, - 7.04, - 7.05, - 7.0600000000000005, - 7.07, - 7.08, - 7.09, - 7.1000000000000005, - 7.11, - 7.12, - 7.13, - 7.140000000000001, - 7.15, - 7.16, - 7.17, - 7.18, - 7.19, - 7.2, - 7.21, - 7.22, - 7.23, - 7.24, - 7.25, - 7.26, - 7.2700000000000005, - 7.28, - 7.29, - 7.3, - 7.3100000000000005, - 7.32, - 7.33, - 7.34, - 7.3500000000000005, - 7.36, - 7.37, - 7.38, - 7.390000000000001, - 7.4, - 7.41, - 7.42, - 7.43, - 7.44, - 7.45, - 7.46, - 7.47, - 7.48, - 7.49, - 7.5, - 7.51, - 7.5200000000000005, - 7.53, - 7.54, - 7.55, - 7.5600000000000005, - 7.57, - 7.58, - 7.59, - 7.6000000000000005, - 7.61, - 7.62, - 7.63, - 7.640000000000001, - 7.65, - 7.66, - 7.67, - 7.68, - 7.69, - 7.7, - 7.71, - 7.72, - 7.73, - 7.74, - 7.75, - 7.76, - 7.7700000000000005, - 7.78, - 7.79, - 7.8, - 7.8100000000000005, - 7.82, - 7.83, - 7.84, - 7.8500000000000005, - 7.86, - 7.87, - 7.88, - 7.890000000000001, - 7.9, - 7.91, - 7.92, - 7.930000000000001, - 7.94, - 7.95, - 7.96, - 7.97, - 7.98, - 7.99, - 8.0, - 8.01, - 8.02, - 8.03, - 8.040000000000001, - 8.05, - 8.06, - 8.07, - 8.08, - 8.09, - 8.1, - 8.11, - 8.120000000000001, - 8.13, - 8.14, - 8.15, - 8.16, - 8.17, - 8.18, - 8.19, - 8.2, - 8.21, - 8.22, - 8.23, - 8.24, - 8.25, - 8.26, - 8.27, - 8.28, - 8.290000000000001, - 8.3, - 8.31, - 8.32, - 8.33, - 8.34, - 8.35, - 8.36, - 8.370000000000001, - 8.38, - 8.39, - 8.4, - 8.41, - 8.42, - 8.43, - 8.44, - 8.45, - 8.46, - 8.47, - 8.48, - 8.49, - 8.5, - 8.51, - 8.52, - 8.53, - 8.540000000000001, - 8.55, - 8.56, - 8.57, - 8.58, - 8.59, - 8.6, - 8.61, - 8.620000000000001, - 8.63, - 8.64, - 8.65, - 8.66, - 8.67, - 8.68, - 8.69, - 8.700000000000001, - 8.71, - 8.72, - 8.73, - 8.74, - 8.75, - 8.76, - 8.77, - 8.78, - 8.790000000000001, - 8.8, - 8.81, - 8.82, - 8.83, - 8.84, - 8.85, - 8.86, - 8.870000000000001, - 8.88, - 8.89, - 8.9, - 8.91, - 8.92, - 8.93, - 8.94, - 8.950000000000001, - 8.96, - 8.97, - 8.98, - 8.99, - 9.0, - 9.01, - 9.02, - 9.03, - 9.040000000000001, - 9.05, - 9.06, - 9.07, - 9.08, - 9.09, - 9.1, - 9.11, - 9.120000000000001, - 9.13, - 9.14, - 9.15, - 9.16, - 9.17, - 9.18, - 9.19, - 9.200000000000001, - 9.21, - 9.22, - 9.23, - 9.24, - 9.25, - 9.26, - 9.27, - 9.28, - 9.290000000000001, - 9.3, - 9.31, - 9.32, - 9.33, - 9.34, - 9.35, - 9.36, - 9.370000000000001, - 9.38, - 9.39, - 9.4, - 9.41, - 9.42, - 9.43, - 9.44, - 9.450000000000001, - 9.46, - 9.47, - 9.48, - 9.49, - 9.5, - 9.51, - 9.52, - 9.53, - 9.540000000000001, - 9.55, - 9.56, - 9.57, - 9.58, - 9.59, - 9.6, - 9.61, - 9.620000000000001, - 9.63, - 9.64, - 9.65, - 9.66, - 9.67, - 9.68, - 9.69, - 9.700000000000001, - 9.71, - 9.72, - 9.73, - 9.74, - 9.75, - 9.76, - 9.77, - 9.78, - 9.790000000000001, - 9.8, - 9.81, - 9.82, - 9.83, - 9.84, - 9.85, - 9.86, - 9.870000000000001, - 9.88, - 9.89, - 9.9, - 9.91, - 9.92, - 9.93, - 9.94, - 9.950000000000001, - 9.96, - 9.97, - 9.98, - 9.99, - 10.0 - ], - "system_name": "solid", - "values": [ - 0.0, - -2.0271367917601424e-10, - -2.2188225062835798e-7, - -1.9333253416520257e-6, - -7.158419609076816e-6, - -1.69357722704655e-5, - -3.241212025567597e-5, - -5.6048854302437334e-5, - -9.380052822133278e-5, - -0.00016022112841745928, - -0.0002681812193927602, - -0.00042792491299142865, - -0.0006531180946282023, - -0.0009382040122553059, - -0.0012770992992665042, - -0.0016538109102616216, - -0.0020674016664624095, - -0.002521841338475994, - -0.003018749314565028, - -0.003562095354932515, - -0.004167714589798477, - -0.004853145399395076, - -0.005633895301923264, - -0.00653989488265555, - -0.007560847496733691, - -0.008692098060442799, - -0.00990816193125199, - -0.0111910678850769, - -0.012507686473186785, - -0.013827670156448146, - -0.015090196108000109, - -0.016261947247784125, - -0.017335480764738176, - -0.018319562320910754, - -0.019266003865558656, - -0.020173098346722262, - -0.0210547625793569, - -0.021915782886090862, - -0.02278197942135496, - -0.023644339486032062, - -0.024512926152419123, - -0.025328767811105324, - -0.026031121884562802, - -0.026569536011650297, - -0.026903285745363104, - -0.027040635213439024, - -0.026963487464479352, - -0.026667991059918794, - -0.026154786723780465, - -0.025479134840323936, - -0.02468526167869506, - -0.023862316141524065, - -0.02302101086183106, - -0.022169648630326444, - -0.021310671726659514, - -0.020435878112884276, - -0.01954604834582213, - -0.01862950002060726, - -0.017660272444411484, - -0.016591929014667217, - -0.015423829244147258, - -0.014155081441426465, - -0.0128491995357366, - -0.011531837752138674, - -0.010236249732431368, - -0.0089958178105784, - -0.007841425891937204, - -0.006794315280325092, - -0.005873564329838932, - -0.005073808574816263, - -0.004365319143920243, - -0.003738714085149253, - -0.003173289936579504, - -0.0026645467771742037, - -0.0021984576711087667, - -0.001769826183356249, - -0.0013742425697764737, - -0.0010201925204927909, - -0.0007151193802697464, - -0.00047668053405708344, - -0.00030492567841883256, - -0.00018473769184484956, - -0.00010874094528412481, - -6.466617133205066e-5, - -3.841057454495589e-5, - -1.9124537562920096e-5, - -6.9162270864286945e-6, - -3.3204886722426608e-6, - -1.3017575291041084e-6, - 1.4593350105562841e-6, - 4.420604035604292e-7, - -1.7259505061817393e-6, - -2.011123695355721e-7, - -1.2606292698613686e-7, - -6.938941811363009e-6, - -1.628282156912464e-5, - -2.7390501112944943e-5, - -4.6497661810196433e-5, - -8.180981254402031e-5, - -0.00013982157574010667, - -0.00023349376994574733, - -0.00038418355677433125, - -0.0005948376286947776, - -0.0008608422330573795, - -0.0011806345731104062, - -0.0015431517958688912, - -0.001945957756704808, - -0.0023843859534713463, - -0.002865960084914132, - -0.003391127074457878, - -0.003974568600916384, - -0.004635157201820783, - -0.005407128434450736, - -0.006289672737102625, - -0.007281662764013486, - -0.008387167150788244, - -0.009585270649665745, - -0.010856937848574721, - -0.012173855588618998, - -0.013495348498515913, - -0.014751489193865042, - -0.015925606796626524, - -0.017002275155108493, - -0.018021573775234334, - -0.018983941374852153, - -0.01989912449758935, - -0.02078540211434199, - -0.02165688167222607, - -0.02253401270888472, - -0.023432206574188597, - -0.02433375963986012, - -0.025161230571102644, - -0.02588903490519079, - -0.02645372797202311, - -0.026846034153256815, - -0.02703738313378612, - -0.027012686435072653, - -0.026748090676732117, - -0.026263804301976612, - -0.02561102743538929, - -0.024866320966878797, - -0.02407919872310016, - -0.02324903574092896, - -0.022413268303442535, - -0.021555959020624682, - -0.02069631055185861, - -0.0198301353260531, - -0.01894351423074986, - -0.01797764874905139, - -0.01691621962465739, - -0.015747020507459797, - -0.014494491472248572, - -0.013197455249743917, - -0.011874033023708264, - -0.0105686147186273, - -0.009301974260638446, - -0.008121858752427824, - -0.007058951866411978, - -0.006125977332072707, - -0.005295896801992217, - -0.0045665900083504685, - -0.003919036508635454, - -0.0033364005672307795, - -0.0028126269938896775, - -0.002335270842581172, - -0.0018917900663387721, - -0.0014753873862045075, - -0.0011013447594785397, - -0.000784332221428985, - -0.0005336341013230661, - -0.0003416113992397163, - -0.00021092634872910132, - -0.00012843045898014438, - -7.499349667422495e-5, - -4.150889197046537e-5, - -2.2373306191092457e-5, - -1.123777494410616e-5, - -2.8639829664500738e-6, - 7.810146110953653e-7, - -7.466434537306554e-7, - -1.0789202505301354e-6, - 7.831281584880223e-7, - 1.206574323786569e-7, - -2.85882180811603e-6, - -5.490651117545653e-6, - -1.238796989699864e-5, - -2.497820403624118e-5, - -4.1415758594565144e-5, - -6.860150860066305e-5, - -0.00011966070526336914, - -0.00020760678630615814, - -0.00034355621974285766, - -0.0005347095622986742, - -0.0007886231861478632, - -0.0010904982103139838, - -0.0014371891029239525, - -0.001827691340080928, - -0.0022556070026779063, - -0.0027170643548861118, - -0.0032196181722626283, - -0.0037848817115165856, - -0.004433245790505247, - -0.005184339776380609, - -0.006037936880693706, - -0.0070101302930127285, - -0.008085922522495403, - -0.009265158060986878, - -0.010531980075566938, - -0.011849085108223134, - -0.013153769933448411, - -0.014408187312274778, - -0.015584731708713828, - -0.01668127921111562, - -0.017723206647259127, - -0.018695956196562336, - -0.019620891703181487, - -0.02050465480482838, - -0.021389242452920787, - -0.022294115498263656, - -0.0232254233468987, - -0.024132370657881208, - -0.02498455187788373, - -0.025731438470942836, - -0.026334724436644752, - -0.026786931319945972, - -0.02703308114077857, - -0.02704540321298854, - -0.02680640960180708, - -0.026357433157139176, - -0.025746335440713197, - -0.0250499896187667, - -0.024281918545307035, - -0.023475937862150187, - -0.022639206171101267, - -0.021791903165559734, - -0.020960800858658035, - -0.020123084429139404, - -0.019245397398163833, - -0.01828745740382376, - -0.01723355434386936, - -0.016069779112057703, - -0.014840516196821418, - -0.013548127212967553, - -0.012222958376675475, - -0.01089357214587977, - -0.009607105668346827, - -0.00841264627939281, - -0.007335265142438097, - -0.006376256709457018, - -0.005525211079794812, - -0.004773636207221266, - -0.004099235289831249, - -0.0035058173282113136, - -0.0029710136444067725, - -0.0024770964182208033, - -0.0020118281442308428, - -0.0015803907352011648, - -0.0011905221142591293, - -0.0008586779744479967, - -0.0005903055597707985, - -0.0003856756896106206, - -0.00024170502387949044, - -0.00014517518032647336, - -8.646783567306526e-5, - -4.958277245059595e-5, - -2.601945609298495e-5, - -1.2337245949067821e-5, - -4.640112262144225e-6, - -6.041474642226596e-7, - 1.448367307754772e-7, - -6.228992532886224e-7, - -5.731404805753293e-7, - -6.788267470358988e-8, - -1.3244004868351311e-6, - -5.463111430681344e-6, - -1.1985496662536566e-5, - -2.075055117856106e-5, - -3.560009388037244e-5, - -6.019682450475461e-5, - -0.00010354780441590439, - -0.000181585245147331, - -0.00030450332555032045, - -0.0004825237315444486, - -0.0007173720676204032, - -0.0010037916353185516, - -0.0013408719304305317, - -0.0017161955565115905, - -0.0021282424261918065, - -0.002570448403065695, - -0.003055483228139144, - -0.003602946982935118, - -0.0042386252856498885, - -0.004964678089231234, - -0.005794889701276895, - -0.0067375704669189185, - -0.0077900012909217775, - -0.008958245503843443, - -0.010214007060608599, - -0.011518165935076041, - -0.012811066552481543, - -0.014062517816118614, - -0.015243409221809723, - -0.016370619735369685, - -0.0174207614387763, - -0.018401945716931267, - -0.019327842804981732, - -0.020219424672183683, - -0.021123736230458212, - -0.02205675049880934, - -0.023004507694473653, - -0.02392073969210562, - -0.024790573713322384, - -0.025559513683684754, - -0.026223082345416815, - -0.026721444389245008, - -0.02701243956801941, - -0.027055467886506313, - -0.02684918366688882, - -0.026439498779063986, - -0.025885721378528737, - -0.025225532820303376, - -0.02447616183028184, - -0.023683961382413854, - -0.022851457183774015, - -0.022033120105110604, - -0.021225111742280922, - -0.020410281180720358, - -0.019539695161515214, - -0.01858852110860748, - -0.017539286886794403, - -0.016404419522808134, - -0.015190291790805943, - -0.01389918515750399, - -0.012568066054708449, - -0.011217273165439579, - -0.00991828504399589, - -0.00871135520247257, - -0.0076183803597539845, - -0.0066322642051606095, - -0.00575836080087494, - -0.004979672747521424, - -0.004291207921662876, - -0.0036834560803499783, - -0.0031328737754713343, - -0.0026224045668263862, - -0.0021371864319498224, - -0.0016881087356334645, - -0.0012862168857261103, - -0.0009399246995868138, - -0.0006512931020670187, - -0.0004323273986518439, - -0.0002738729882162394, - -0.00016609675232048815, - -9.856332708713111e-5, - -5.803602618303927e-5, - -3.221784899387625e-5, - -1.4293464872083828e-5, - -5.318008064914004e-6, - -2.5572950325680743e-6, - -1.6787139051066546e-7, - 6.815411623395384e-7, - -1.051257172701714e-6, - -1.2300192111514008e-6, - -1.7327673884626194e-7, - -4.257428226572824e-6, - -1.1728546685241259e-5, - -1.9059213165750766e-5, - -3.0210308966549526e-5, - -5.232727844095564e-5, - -9.16000435527975e-5, - -0.0001571450731248092, - -0.00026695020553102466, - -0.00043358300038043307, - -0.0006510901931494617, - -0.000923561847998744, - -0.0012475359634698258, - -0.0016112223899179545, - -0.002003095720014725, - -0.0024251555207125963, - -0.00289741876067634, - -0.0034327541588334842, - -0.0040459042389596744, - -0.004747870593253045, - -0.005556894753192321, - -0.006467418739469488, - -0.007503213997074765, - -0.008658069274317504, - -0.009900093710437319, - -0.011181663299001998, - -0.012465103606800643, - -0.013715550901770068, - -0.014915323372351796, - -0.01605548883807395, - -0.01711276089359054, - -0.01810161341980826, - -0.01902192669527447, - -0.019934684797352165, - -0.020864448478975894, - -0.02181655777042235, - -0.02276521055652697, - -0.02369998304341442, - -0.024581317606039932, - -0.02539213503005522, - -0.026107214394735123, - -0.026648677419086497, - -0.026973879982823634, - -0.027041586120199912, - -0.02688307472593998, - -0.026526412695112744, - -0.026022372330127108, - -0.02538710480678591, - -0.024664425834275305, - -0.02387087318899095, - -0.023063597457223195, - -0.022278116842606888, - -0.021492055749738004, - -0.02068730817435288, - -0.019823564574656005, - -0.018882674905048136, - -0.01785003016302844, - -0.016744494302590507, - -0.015540385755890895, - -0.014254263276918144, - -0.01290155245058805, - -0.011545089977359091, - -0.010240894772552855, - -0.009018447049221556, - -0.007902278269615592, - -0.006895508334159861, - -0.005993661352535429, - -0.005189559902307295, - -0.004492296396917395, - -0.0038688568908158416, - -0.0032996039222286666, - -0.0027663542545068864, - -0.0022677312409948303, - -0.001804740679618888, - -0.0013867080691026823, - -0.0010228903771593023, - -0.0007204629519020345, - -0.00048117783975337725, - -0.0003052107984927721, - -0.00019078766183294738, - -0.00011566790631423185, - -6.64300620032976e-5, - -3.6746368786977346e-5, - -1.9905087852267744e-5, - -8.075373409244246e-6, - -6.81507972499773e-7, - -5.081492495673245e-7, - -1.933415451238485e-6, - 6.02493736567844e-8, - 1.2816742157584216e-6, - -2.080748675303834e-6, - -5.323571260484883e-6, - -8.412030896354228e-6, - -1.717419686336763e-5, - -2.9771838539527362e-5, - -4.606752400998504e-5, - -7.660185197971847e-5, - -0.00013618829692929602, - -0.0002363885088915163, - -0.00038391634459206125, - -0.0005886098332506529, - -0.0008525471132689311, - -0.0011595370507036518, - -0.0015054446436649216, - -0.0018800706286865587, - -0.002290173391028383, - -0.0027453967124063117, - -0.0032658654784061825, - -0.003859923440502455, - -0.004539569904200125, - -0.005315406375366094, - -0.006207384886928458, - -0.007230572141020075, - -0.008361343472441718, - -0.009582541084398932, - -0.010847239244079765, - -0.012121670912359273, - -0.013373670555691608, - -0.014594407663916231, - -0.015738735360805778, - -0.016801056219828525, - -0.01778421703975641, - -0.018720831264832205, - -0.01965743688341015, - -0.020602216475727186, - -0.02156455396282947, - -0.022520954847438268, - -0.023462917894327306, - -0.02436720039374446, - -0.02523374080404661, - -0.025981849009624358, - -0.026559542997370678, - -0.02691060098578385, - -0.027019031766375712, - -0.02691145331290573, - -0.02661351537777784, - -0.02615035940833277, - -0.025538874314515292, - -0.024826631379108233, - -0.024051630218320685, - -0.02328379299199762, - -0.022516266718279776, - -0.021752450396614664, - -0.020954618930013658, - -0.020096356505011126, - -0.019168691747258992, - -0.01817211087435583, - -0.017084549819150197, - -0.015887410678290192, - -0.01459704417112917, - -0.013236126071995924, - -0.011880308042650223, - -0.010565646007296925, - -0.00933301237691575, - -0.008192421170667374, - -0.007156638225959133, - -0.006228536571481369, - -0.005415204328714118, - -0.004698628766414248, - -0.004055510770169579, - -0.003469439290320675, - -0.0029167258360520143, - -0.002401518989528284, - -0.0019262257742402311, - -0.0014959107653896853, - -0.0011118626644449625, - -0.0007887219550172797, - -0.0005319543613174216, - -0.00034538766653779973, - -0.00021629131185241235, - -0.00013181613341045617, - -7.926069807551173e-5, - -4.4762313943735865e-5, - -2.2618848821487347e-5, - -9.637347435476062e-6, - -3.233266475222152e-6, - -8.370731712226132e-7, - -4.809631120039626e-7, - -1.2101692553612153e-7, - 9.598998396143088e-8, - -1.1144618936032025e-6, - -4.099980143112969e-6, - -9.357910853713403e-6, - -1.6620501669395438e-5, - -2.6476005171083283e-5, - -4.102553956480959e-5, - -6.595466042480513e-5, - -0.00011629763216608469, - -0.0002054075252333476, - -0.00034117445041564887, - -0.0005341576258137137, - -0.0007815567272684287, - -0.001076137009572431, - -0.0014039577440614903, - -0.0017613775504547458, - -0.0021592242695328, - -0.0026027782227609486, - -0.0031051959689482045, - -0.0036762543415166937, - -0.004332312560662799, - -0.005082958463942466, - -0.005959595185815625, - -0.0069585510465868805, - -0.008070307685966671, - -0.009265007566430117, - -0.010510873842003388, - -0.011781210278494048, - -0.013045604951065937, - -0.014269362071551828, - -0.015415296643130849, - -0.01647992712080032, - -0.017462345954112446, - -0.01842498443714935, - -0.019377942767543732, - -0.02033746580156931, - -0.021298240381148636, - -0.02226197259533763, - -0.023217248512991173, - -0.0241630874777235, - -0.02506391542537517, - -0.025844187075481917, - -0.026451273201109793, - -0.026825597399694534, - -0.026990839900806418, - -0.02694086034604304, - -0.026695873876702914, - -0.026259890545554054, - -0.025673332845547014, - -0.0249734055619924, - -0.02423707080837484, - -0.023498600999284303, - -0.022754392026089643, - -0.022002231305273068, - -0.02120474730336036, - -0.020364305769484725, - -0.01946276979652639, - -0.018495674212475832, - -0.017420361022207342, - -0.016231972320514654, - -0.014929392631735205, - -0.013576954840465005, - -0.012222287773512808, - -0.010900339113232738, - -0.009649543010415595, - -0.008482594568797797, - -0.007421177831398285, - -0.006473990981819111, - -0.005647236901326236, - -0.00491037930859356, - -0.004249815454725803, - -0.003638594085141611, - -0.0030720850775868835, - -0.002544759306513711, - -0.002055462474117642, - -0.0016074733550842657, - -0.0012055284046720849, - -0.0008606461928222231, - -0.0005870126687533284, - -0.0003880847411804056, - -0.0002462012108017664, - -0.00015153479525131797, - -9.16325562282938e-5, - -5.396334098306532e-5, - -2.7376249032540212e-5, - -1.089850148694449e-5, - -5.076051212637989e-6, - -2.50971142390366e-6, - 6.623586170095841e-7, - 8.727230675353859e-7, - -1.3477591652155674e-6, - -1.3740588342137094e-6, - -2.547908148797795e-6, - -9.57302018472772e-6, - -1.7694713769111914e-5, - -2.435900945241265e-5, - -3.4452388389560884e-5, - -5.7312564487765894e-5, - -0.0001002364679197898, - -0.00017610425119918283, - -0.00030251470795911173, - -0.0004844737681287681, - -0.0007151967413599469, - -0.0009928518692359778, - -0.0013048647441096795, - -0.0016514312433809075, - -0.002033340379989368, - -0.0024644730524245317, - -0.0029495695257598653, - -0.003496838326760454, - -0.004125579776840749, - -0.00486238899563135, - -0.0057195021790601985, - -0.006690611785730993, - -0.007778694730089686, - -0.008948308089880452, - -0.010181065733423034, - -0.011448088278837809, - -0.012721233962082745, - -0.013942210262064048, - -0.01508630210549522, - -0.01614526700571617, - -0.017151689213212418, - -0.01813246929440615, - -0.01909519367044321, - -0.020063354400748523, - -0.0210235065428378, - -0.021992875104636045, - -0.022974586466541658, - -0.02396276211509707, - -0.024883421853087895, - -0.02569163708990685, - -0.026317969348541415, - -0.026740878678486457, - -0.0269601391023383, - -0.02696871267889961, - -0.026767270323776182, - -0.026354000554969448, - -0.025784919812853635, - -0.025121047566122046, - -0.024427265647345597, - -0.023706995797129038, - -0.022986877225703806, - -0.0222355619798833, - -0.021449299873005978, - -0.02062997493672708, - -0.019765026625245208, - -0.018817125775425603, - -0.017750580930509574, - -0.0165612423217803, - -0.015266193653584115, - -0.0139247904558773, - -0.01256684126690949, - -0.011243029382395131, - -0.00996553690730656, - -0.008771353420780836, - -0.007690100699864644, - -0.006732848948696524, - -0.0058825953320096325, - -0.005126129568620685, - -0.004445159628823692, - -0.0038137178317589893, - -0.0032326916741253764, - -0.0026934752333478973, - -0.0021929786447351107, - -0.0017226325605462223, - -0.0012983271577952649, - -0.0009375175149411996, - -0.0006507294863121182, - -0.00043175180308413497, - -0.00027795850475470507, - -0.00017610773038495564, - -0.00010661120846899852, - -6.07003132209738e-5, - -3.288821656588503e-5, - -1.667809205041504e-5, - -5.721209023923368e-6, - -1.0319477620202022e-6, - -1.090085285315734e-6, - -6.361274553778884e-7, - 8.597978675140006e-7, - -8.448834752372569e-7, - -5.2028475649446015e-6, - -9.140498867188374e-6, - -1.5381414887993827e-5, - -2.37747464318927e-5, - -3.1936766459184085e-5, - -4.7365260288201316e-5, - -8.41805091828518e-5, - -0.00015450081468421084, - -0.00026842258708703604, - -0.0004335603399825416, - -0.0006536801407229231, - -0.0009145632130584391, - -0.0012099454744144977, - -0.0015446365802372353, - -0.0019175483050095643, - -0.0023325768651726864, - -0.002792981559641694, - -0.0033210359020623414, - -0.003932021547212172, - -0.004649950954934257, - -0.005479700132349663, - -0.006432230221947999, - -0.007487916720424592, - -0.008633883301243983, - -0.009859456346890949, - -0.011127862585565362, - -0.01239426685606454, - -0.013608302032611375, - -0.014751022113641876, - -0.01581602131753107, - -0.01684513989648495, - -0.017836788833280492, - -0.018814155840031488, - -0.019773304696615146, - -0.020737245416559413, - -0.02172643621746534, - -0.02274018521027532, - -0.023747518355456187, - -0.02469202223259548, - -0.025519762639316157, - -0.026170380087042366, - -0.02665353096050238, - -0.026929047427955544, - -0.026989923239066183, - -0.026812465458157186, - -0.02642848781056434, - -0.02588976432379797, - -0.025270029302488006, - -0.024607263308495053, - -0.023915775643619352, - -0.023200933881657226, - -0.02245077463856271, - -0.02169358984738312, - -0.020902098374701417, - -0.020063642159988848, - -0.019128790619293012, - -0.01807269414701068, - -0.016882423305518757, - -0.015606653525843062, - -0.014276350527409831, - -0.012922491875499875, - -0.011579654491787161, - -0.010277333198632888, - -0.009068244454804475, - -0.007968919627257931, - -0.0069938051686104785, - -0.00612482673802911, - -0.005348646818987501, - -0.004638188214466987, - -0.003994871471436567, - -0.0034038419675483933, - -0.002850755922802539, - -0.002329970418621763, - -0.0018411044175968838, - -0.001398748775441272, - -0.0010194377792339115, - -0.0007156240328031194, - -0.0004830332280491567, - -0.00031526346771210134, - -0.00019838615822109773, - -0.00012268478008925499, - -7.240532357694063e-5, - -3.90514649530882e-5, - -1.9337809210762114e-5, - -8.771001433760528e-6, - -2.7472675314665906e-6, - -1.6118279444476968e-7, - -4.198182945169826e-7, - -6.917489929758602e-7, - -9.276843705996463e-7, - -3.774549182322673e-6, - -9.775550242951958e-6, - -1.61453558785718e-5, - -2.0947473490628976e-5, - -2.8191678515310237e-5, - -4.205575656685001e-5, - -7.199103307281574e-5, - -0.00013277347549356389, - -0.0002365367831942966, - -0.0003897299124948628, - -0.0005924420108546768, - -0.0008373550001513075, - -0.0011238333374953835, - -0.0014449841581670175, - -0.0018048339068776342, - -0.0022013783800672315, - -0.002642997801195701, - -0.0031502363555201973, - -0.003745553486308617, - -0.0044430358134392445, - -0.0052487566460981405, - -0.006171449531360174, - -0.00719793597310292, - -0.008331858705367401, - -0.009544875416879983, - -0.010808185090858957, - -0.012063704287548715, - -0.013270492953211643, - -0.014408776586070926, - -0.01549657440150154, - -0.01653938174597608, - -0.01754060505833671, - -0.01851792695579435, - -0.019473009690926524, - -0.020451527898497857, - -0.021461379772591105, - -0.022502479619354088, - -0.02352280591769501, - -0.024484124032125465, - -0.02532461751613202, - -0.026028567930801827, - -0.02656304223652889, - -0.02689265897756904, - -0.026991859778203287, - -0.0268384671223012, - -0.02648751751258327, - -0.02599397460998515, - -0.02542098053059033, - -0.02478276207902863, - -0.02411083510467399, - -0.023394792374948292, - -0.02266923150011535, - -0.02193539608460021, - -0.02117765648396097, - -0.02035892211899798, - -0.01943099786987912, - -0.018379906709829197, - -0.017209605403771533, - -0.01595542571021502, - -0.01463168349342625, - -0.013279358021483723, - -0.011911708705546475, - -0.010594240803622201, - -0.009368646406222647, - -0.008258535344550566, - -0.007262434433776832, - -0.006370868925981821, - -0.005568552322799236, - -0.0048407464560649704, - -0.004184835453045377, - -0.0035793935874289806, - -0.003014293260426848, - -0.0024706636155703565, - -0.0019619194699446174, - -0.001503509046146878, - -0.0011097235569944575, - -0.0007858333411671636, - -0.000537005085722575, - -0.0003542900343983524, - -0.00022519873288029402, - -0.00013951192313704786, - -8.417324258019887e-5, - -4.807239559689869e-5, - -2.3498436665658762e-5, - -1.0464771143414708e-5, - -4.866655725577207e-6, - -1.3076851683169188e-6, - 3.2929780174884016e-7, - -8.791327960611106e-7, - -2.0408756921663773e-6, - -3.137344579018375e-6, - -8.73718942961954e-6, - -1.6265032911300104e-5, - -2.0685193557301584e-5, - -2.494433416683206e-5, - -3.69853974697687e-5, - -6.344855574313968e-5, - -0.00011386218608827603, - -0.0002055185151775274, - -0.0003480769254734506, - -0.0005351418936816454, - -0.0007657414429121934, - -0.0010408546325051393, - -0.00135269698196544, - -0.0016961016695373199, - -0.0020704205728399594, - -0.0024980225433019476, - -0.0029893195179617194, - -0.003565673393457036, - -0.004239393101357236, - -0.0050237155375813525, - -0.005912160351673967, - -0.006917020233832394, - -0.008037051375365256, - -0.00923995163884872, - -0.010488112454168197, - -0.011727227282984087, - -0.012930496147891102, - -0.014076579895202224, - -0.01518082514027369, - -0.016232512142997146, - -0.017243135302834278, - -0.01820672697790854, - -0.01917179311028444, - -0.02016986008311855, - -0.021201393855489026, - -0.022253963746051375, - -0.023286486766545655, - -0.024258626174975484, - -0.02512782322663565, - -0.025886458257348532, - -0.026470275279079636, - -0.02684705267204629, - -0.026965576137458036, - -0.02685081361475211, - -0.026543120783537988, - -0.02609983739925703, - -0.025563630374217605, - -0.024952750551779423, - -0.024283086919556607, - -0.023580438314769858, - -0.022887827754099643, - -0.022180521016829824, - -0.02144973926456828, - -0.020639291333105825, - -0.01972277027132724, - -0.0186825734854546, - -0.017541086380638615, - -0.016306710939862912, - -0.014993383483276612, - -0.013623444550963815, - -0.012242812133599568, - -0.010917928002130706, - -0.009676378166165622, - -0.008552423747178073, - -0.007535924994125698, - -0.006618877628756681, - -0.005788918875634097, - -0.005051363832135836, - -0.004382652187252867, - -0.0037627428558345555, - -0.0031758177055283277, - -0.0026149297627263146, - -0.002090306112047635, - -0.001613367558559009, - -0.0012036079975781822, - -0.0008639533762906937, - -0.0005944709118885227, - -0.00039268689883248387, - -0.00025528673311103756, - -0.00016122840151894247, - -9.670301710740237e-5, - -5.5600237301944855e-5, - -3.107394840740074e-5, - -1.439537409458902e-5, - -4.206337476886368e-6, - -2.398870778574924e-6, - -2.51804555323476e-6, - -8.532940470873385e-8, - 3.860170523228845e-7, - -4.560702417943929e-6, - -9.71978112956906e-6, - -1.3539011037011495e-5, - -1.9711252594700746e-5, - -2.6315622158101792e-5, - -3.3654403638616603e-5, - -5.2325873147074375e-5 - ], - "datatype": "Float64", - "type": "series" - } -} diff --git a/validation/validation_util.jl b/validation/validation_util.jl deleted file mode 100644 index 01db69635..000000000 --- a/validation/validation_util.jl +++ /dev/null @@ -1,66 +0,0 @@ -function linear_interpolation(x, y, interpolation_point) - if !(first(x) <= interpolation_point <= last(x)) - throw(ArgumentError("`interpolation_point` at $interpolation_point is outside the interpolation range")) - end - - i = searchsortedlast(x, interpolation_point) - # Handle right boundary - i == lastindex(x) && return last(y) - - # Linear interpolation - slope = (y[i + 1] - y[i]) / (x[i + 1] - x[i]) - return y[i] + slope * (interpolation_point - x[i]) -end - -function interpolated_mse(reference_time, reference_values, simulation_time, - simulation_values) - if last(simulation_time) > last(reference_time) - @warn "simulation time range is larger than reference time range. " * - "Only checking values within reference time range." - end - # Remove reference time points outside the simulation time - start = searchsortedfirst(reference_time, first(simulation_time)) - end_ = searchsortedlast(reference_time, last(simulation_time)) - common_time_range = reference_time[start:end_] - - # Interpolate simulation data at the common time points - interpolated_values = [linear_interpolation(simulation_time, simulation_values, t) - for t in common_time_range] - - filtered_values = reference_values[start:end_] - - # Calculate MSE only over the common time range - mse = sum((interpolated_values .- filtered_values) .^ 2) / length(common_time_range) - return mse -end - -function extract_number_from_filename(filename) - # This regex matches the last sequence of digits in the filename - m = match(r"(\d+)(?!.*\d)", filename) - if m !== nothing - return parse(Int, m.captures[1]) - end - return -1 -end - -function extract_resolution_from_filename(str) - str = match(r"\d+(?!.*\d)", str).match - - # Remove leading zeros and count them - leading_zeros = length(match(r"^0*", str).match) - str_non_zero = replace(str, r"^0*" => "") - - if isempty(str_non_zero) - return "0.0" - end - - # Adjust string to have a decimal point at the correct position - if leading_zeros > 0 - decimal_str = "0." * "0"^(leading_zeros - 1) * str_non_zero - else - decimal_str = str_non_zero - end - - # Convert integer strings to float strings - return string(parse(Float64, decimal_str)) -end