diff --git a/previews/PR514/.documenter-siteinfo.json b/previews/PR514/.documenter-siteinfo.json index ae2bfaddb..d89c7e817 100644 --- a/previews/PR514/.documenter-siteinfo.json +++ b/previews/PR514/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-20T12:56:37","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-20T15:15:30","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/previews/PR514/authors/index.html b/previews/PR514/authors/index.html index 0a2bb31e2..949cc8f3d 100644 --- a/previews/PR514/authors/index.html +++ b/previews/PR514/authors/index.html @@ -1,2 +1,2 @@ -Authors · TrixiParticles.jl

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 under License.

Principal Developers

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
+Authors · TrixiParticles.jl

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 under License.

Principal Developers

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/previews/PR514/callbacks/index.html b/previews/PR514/callbacks/index.html index 8a3116c31..5a0929809 100644 --- a/previews/PR514/callbacks/index.html +++ b/previews/PR514/callbacks/index.html @@ -1,11 +1,11 @@ -Callbacks · TrixiParticles.jl

Callbacks

TrixiParticles.DensityReinitializationCallbackType
DensityReinitializationCallback(; interval::Integer=0, dt=0.0)

Callback to reinitialize the density field when using ContinuityDensity [42].

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)
source
TrixiParticles.InfoCallbackMethod
InfoCallback()

Create and return a callback that prints a human-readable summary of the simulation setup at the beginning of a simulation and then resets the timer. When the returned callback is executed directly, the current timer values are shown.

source
TrixiParticles.PostprocessCallbackType
PostprocessCallback(; interval::Integer=0, dt=0.0, exclude_boundary=true, filename="values",
+Callbacks · TrixiParticles.jl

Callbacks

TrixiParticles.DensityReinitializationCallbackType
DensityReinitializationCallback(; interval::Integer=0, dt=0.0)

Callback to reinitialize the density field when using ContinuityDensity [42].

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)
source
TrixiParticles.InfoCallbackMethod
InfoCallback()

Create and return a callback that prints a human-readable summary of the simulation setup at the beginning of a simulation and then resets the timer. When the returned callback is executed directly, the current timer values are shown.

source
TrixiParticles.PostprocessCallbackType
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 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

# 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)
source
TrixiParticles.SolutionSavingCallbackType
SolutionSavingCallback(; interval::Integer=0, dt=0.0, save_times=Array{Float64, 1}([]),
+postprocess_callback = PostprocessCallback(dt=0.1, example_quantity=kinetic_energy)
source
TrixiParticles.SolutionSavingCallbackType
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,
@@ -16,6 +16,6 @@
 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)
source
TrixiParticles.SteadyStateReachedCallbackType
SteadyStateReachedCallback(; interval::Integer=0, dt=0.0,
-                           interval_size::Integer=10, abstol=1.0e-8, reltol=1.0e-6)

Terminates the integration when the change of kinetic energy between time steps falls below the threshold specified by abstol + reltol * ekin, where ekin is the total kinetic energy of the simulation.

Keywords

  • interval=0: Check steady state condition every interval time steps.
  • dt=0.0: Check steady state condition in regular intervals of dt in terms of integration time by adding additional tstops (note that this may change the solution).
  • interval_size: The interval in which the change of the kinetic energy is considered. interval_size is a (integer) multiple of interval or dt.
  • abstol: Absolute tolerance.
  • reltol: Relative tolerance.
source
TrixiParticles.StepsizeCallbackMethod
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

\[ \Delta t = \min(\Delta t_\eta, \Delta t_a, \Delta t_c),\]

where

\[ \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.

Experimental implementation

This is an experimental feature and may change in future releases.

References

[21], [14], [43], [44]

source
TrixiParticles.UpdateCallbackMethod
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).
source

Custom Quantities

The following pre-defined custom quantities can be used with the SolutionSavingCallback and PostprocessCallback.

+saving_callback = SolutionSavingCallback(dt=0.1, my_custom_quantity=kinetic_energy)
source
TrixiParticles.SteadyStateReachedCallbackType
SteadyStateReachedCallback(; interval::Integer=0, dt=0.0,
+                           interval_size::Integer=10, abstol=1.0e-8, reltol=1.0e-6)

Terminates the integration when the change of kinetic energy between time steps falls below the threshold specified by abstol + reltol * ekin, where ekin is the total kinetic energy of the simulation.

Keywords

  • interval=0: Check steady state condition every interval time steps.
  • dt=0.0: Check steady state condition in regular intervals of dt in terms of integration time by adding additional tstops (note that this may change the solution).
  • interval_size: The interval in which the change of the kinetic energy is considered. interval_size is a (integer) multiple of interval or dt.
  • abstol: Absolute tolerance.
  • reltol: Relative tolerance.
source
TrixiParticles.StepsizeCallbackMethod
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

\[ \Delta t = \min(\Delta t_\eta, \Delta t_a, \Delta t_c),\]

where

\[ \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.

Experimental implementation

This is an experimental feature and may change in future releases.

References

[21], [14], [43], [44]

source
TrixiParticles.UpdateCallbackMethod
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).
source

Custom Quantities

The following pre-defined custom quantities can be used with the SolutionSavingCallback and PostprocessCallback.

diff --git a/previews/PR514/code_of_conduct/index.html b/previews/PR514/code_of_conduct/index.html index 14022384a..ffcb01363 100644 --- a/previews/PR514/code_of_conduct/index.html +++ b/previews/PR514/code_of_conduct/index.html @@ -1,2 +1,2 @@ -Code of Conduct · TrixiParticles.jl

Code of Conduct

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, Sven Berger, or any other of the principal developers responsible for enforcement listed in Authors. 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/codeofconduct.html.

Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.

[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.

+Code of Conduct · TrixiParticles.jl

Code of Conduct

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, Sven Berger, or any other of the principal developers responsible for enforcement listed in Authors. 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/codeofconduct.html.

Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.

[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/previews/PR514/contributing/index.html b/previews/PR514/contributing/index.html index 21f5d9275..00810a6a4 100644 --- a/previews/PR514/contributing/index.html +++ b/previews/PR514/contributing/index.html @@ -35,4 +35,4 @@ 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. + this project or the open source license(s) involved. diff --git a/previews/PR514/development/index.html b/previews/PR514/development/index.html index d449dd7df..26b7e3e06 100644 --- a/previews/PR514/development/index.html +++ b/previews/PR514/development/index.html @@ -1,2 +1,2 @@ -Development · TrixiParticles.jl

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:

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.

With an instantiated docs environment, generate the docs with the following command (again from the TrixiParticles.jl root directory):

julia --project=docs --color=yes docs/make.jl

You can then open the generated files in docs/build with your webbrowser. Alternatively, run

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. 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, 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 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 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 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.
+Development · TrixiParticles.jl

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:

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.

With an instantiated docs environment, generate the docs with the following command (again from the TrixiParticles.jl root directory):

julia --project=docs --color=yes docs/make.jl

You can then open the generated files in docs/build with your webbrowser. Alternatively, run

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. 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, 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 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 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 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/previews/PR514/examples/index.html b/previews/PR514/examples/index.html index cf8ce8805..e33992f2a 100644 --- a/previews/PR514/examples/index.html +++ b/previews/PR514/examples/index.html @@ -1,2 +1,2 @@ -Examples · TrixiParticles.jl

Examples

Fluid

Accelerated Tank 2D (fluid/accelerated_tank_2d.jl)

Dam Break 2D (fluid/dam_break_2d.jl)

Dam Break 3D (fluid/dam_break_3d.jl)

Falling Water Column (fluid/falling_water_column_2d.jl)

Hydrostatic Water Column (fluid/hydrostatic_water_column_*.jl)

Moving Wall (fluid/moving_wall_2d.jl)

Oscillating Drop (fluid/oscillating_drop_2d.jl)

Periodic Channel (fluid/periodic_channel_2d.jl)

Fluid Structure Interaction

Dam Break with Elastic Plate (fsi/dam_break_plate_2d.jl)

Falling Sphere 2D (fsi/falling_sphere_2d.jl)

Falling Spheres 2D (fsi/falling_spheres_2d.jl)

Structure Mechanics

Oscillating Beam (solid/oscillating_beam_2d.jl)

+Examples · TrixiParticles.jl

Examples

Fluid

Accelerated Tank 2D (fluid/accelerated_tank_2d.jl)

Dam Break 2D (fluid/dam_break_2d.jl)

Dam Break 3D (fluid/dam_break_3d.jl)

Falling Water Column (fluid/falling_water_column_2d.jl)

Hydrostatic Water Column (fluid/hydrostatic_water_column_*.jl)

Moving Wall (fluid/moving_wall_2d.jl)

Oscillating Drop (fluid/oscillating_drop_2d.jl)

Periodic Channel (fluid/periodic_channel_2d.jl)

Fluid Structure Interaction

Dam Break with Elastic Plate (fsi/dam_break_plate_2d.jl)

Falling Sphere 2D (fsi/falling_sphere_2d.jl)

Falling Spheres 2D (fsi/falling_spheres_2d.jl)

Structure Mechanics

Oscillating Beam (solid/oscillating_beam_2d.jl)

diff --git a/previews/PR514/general/density_calculators/index.html b/previews/PR514/general/density_calculators/index.html index 5967c160e..5a21847f7 100644 --- a/previews/PR514/general/density_calculators/index.html +++ b/previews/PR514/general/density_calculators/index.html @@ -1,2 +1,2 @@ -Density Calculators · TrixiParticles.jl

Density Calculators

TrixiParticles.ContinuityDensityType
ContinuityDensity()

Density calculator to integrate the density from the continuity equation

\[\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$.

source
TrixiParticles.SummationDensityType
SummationDensity()

Density calculator to use the summation formula

\[\rho(r) = \sum_{b} m_b W(\Vert r - r_b \Vert, h),\]

for the density estimation, where $r_b$ denotes the coordinates and $m_b$ the mass of particle $b$.

source
+Density Calculators · TrixiParticles.jl

Density Calculators

TrixiParticles.ContinuityDensityType
ContinuityDensity()

Density calculator to integrate the density from the continuity equation

\[\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$.

source
TrixiParticles.SummationDensityType
SummationDensity()

Density calculator to use the summation formula

\[\rho(r) = \sum_{b} m_b W(\Vert r - r_b \Vert, h),\]

for the density estimation, where $r_b$ denotes the coordinates and $m_b$ the mass of particle $b$.

source
diff --git a/previews/PR514/general/initial_condition/index.html b/previews/PR514/general/initial_condition/index.html index a2cd20de3..b3b37911c 100644 --- a/previews/PR514/general/initial_condition/index.html +++ b/previews/PR514/general/initial_condition/index.html @@ -28,13 +28,13 @@ initial_condition = InitialCondition(; coordinates, velocity, mass, density) # With functions -initial_condition = InitialCondition(; coordinates, velocity=x -> 2x, mass=1.0, density=1000.0)source

Setups

TrixiParticles.ComplexShapeMethod
ComplexShape(geometry::Union{TriangleMesh, Polygon}; particle_spacing, density,
+initial_condition = InitialCondition(; coordinates, velocity=x -> 2x, mass=1.0, density=1000.0)
source

Setups

TrixiParticles.ComplexShapeMethod
ComplexShape(geometry::Union{TriangleMesh, Polygon}; particle_spacing, density,
              pressure=0.0, mass=nothing, velocity=zeros(ndims(geometry)),
              point_in_geometry_algorithm=WindingNumberJacobson(; geometry,
                                                                hierarchical_winding=false,
                                                                winding_number_factor=sqrt(eps())),
              grid_offset::Real=0.0, max_nparticles=10^7,
-             pad_initial_particle_grid=2particle_spacing)

Sample a complex geometry with particles. Returns an InitialCondition. Note that an initial particle grid is generated inside the bounding box of the geometry. A point_in_geometry_algorithm checks if particles are inside the geometry or not. For more information about the method see WindingNumberJacobson or WindingNumberHormann.

Arguments

Keywords

  • particle_spacing: Spacing between the particles.
  • density: Either a function mapping each particle's coordinates to its density, or a scalar for a constant density over all particles.
  • 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: Scalar to set the pressure of all particles to this value. This is only used by the EntropicallyDampedSPHSystem and will be overwritten when using an initial pressure function in the system.
  • point_in_geometry_algorithm: Algorithm for sampling the complex geometry with particles. It basically checks whether a particle is inside an object or not. For more information see WindingNumberJacobson or WindingNumberHormann
  • grid_offset: Offset of the initial particle grid of the bounding box of the geometry.
  • max_nparticles: Maximum number of particles in the initial particle grid. This is only used to avoid accidentally choosing a particle_spacing that is too small for the scale of the geometry.
  • pad_initial_particle_grid: Padding of the initial particle grid.
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.extrude_geometryMethod
extrude_geometry(geometry; particle_spacing, direction, n_extrude::Integer,
+             pad_initial_particle_grid=2particle_spacing)

Sample a complex geometry with particles. Returns an InitialCondition. Note that an initial particle grid is generated inside the bounding box of the geometry. A point_in_geometry_algorithm checks if particles are inside the geometry or not. For more information about the method see WindingNumberJacobson or WindingNumberHormann.

Arguments

Keywords

  • particle_spacing: Spacing between the particles.
  • density: Either a function mapping each particle's coordinates to its density, or a scalar for a constant density over all particles.
  • 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: Scalar to set the pressure of all particles to this value. This is only used by the EntropicallyDampedSPHSystem and will be overwritten when using an initial pressure function in the system.
  • point_in_geometry_algorithm: Algorithm for sampling the complex geometry with particles. It basically checks whether a particle is inside an object or not. For more information see WindingNumberJacobson or WindingNumberHormann
  • grid_offset: Offset of the initial particle grid of the bounding box of the geometry.
  • max_nparticles: Maximum number of particles in the initial particle grid. This is only used to avoid accidentally choosing a particle_spacing that is too small for the scale of the geometry.
  • pad_initial_particle_grid: Padding of the initial particle grid.
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.extrude_geometryMethod
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. Returns an InitialCondition.

Arguments

  • geometry: Either particle coordinates or an InitialCondition 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.
  • pressure: Scalar to set the pressure of all particles to this value. This is only used by the EntropicallyDampedSPHSystem and will be overwritten when using an initial pressure function in the system.
  • tlsph: With the TotalLagrangianSPHSystem, 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

# Extrude a line in 2D to a plane in 2D
 p1 = [0.0, 0.0]
@@ -59,7 +59,7 @@
 
 direction = [0.0, 0.0, 1.0]
 
-shape = extrude_geometry(shape; direction, particle_spacing=0.1, n_extrude=4, density=1000.0)
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.RectangularShapeMethod
RectangularShape(particle_spacing, n_particles_per_dimension, min_coordinates;
+shape = extrude_geometry(shape; direction, particle_spacing=0.1, n_extrude=4, density=1000.0)
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.RectangularShapeMethod
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,
@@ -73,7 +73,7 @@
                                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)
source
TrixiParticles.RectangularTankType
RectangularTank(particle_spacing, fluid_size, tank_size, fluid_density;
+rectangular = RectangularShape(particle_spacing, (5, 4, 7), (1.0, 2.0, 3.0), density=1000.0)
source
TrixiParticles.RectangularTankType
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,
@@ -95,7 +95,7 @@
 # 3D
 setup = RectangularTank(particle_spacing, (water_width, water_height, water_depth),
                         (container_width, container_height, container_depth), fluid_density,
-                        n_layers=2)

See also: reset_wall!.

source
TrixiParticles.reset_wall!Method
reset_wall!(rectangular_tank::RectangularTank, reset_faces, positions)

The selected walls of the tank will be placed at the new positions.

Arguments

  • reset_faces: Boolean tuple of 4 (in 2D) or 6 (in 3D) dimensions, similar to faces in RectangularTank.
  • positions: Tuple of new positions
Warning

There are overlapping particles when adjacent walls are moved inwards simultaneously.

source
TrixiParticles.RoundSphereType
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.
Usage

See SphereShape on how to use this.

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.

source
TrixiParticles.VoxelSphereType
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).

Usage

See SphereShape on how to use this.

source
TrixiParticles.SphereShapeMethod
SphereShape(particle_spacing, radius, center_position, density;
+                        n_layers=2)

See also: reset_wall!.

source
TrixiParticles.reset_wall!Method
reset_wall!(rectangular_tank::RectangularTank, reset_faces, positions)

The selected walls of the tank will be placed at the new positions.

Arguments

  • reset_faces: Boolean tuple of 4 (in 2D) or 6 (in 3D) dimensions, similar to faces in RectangularTank.
  • positions: Tuple of new positions
Warning

There are overlapping particles when adjacent walls are moved inwards simultaneously.

source
TrixiParticles.RoundSphereType
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.
Usage

See SphereShape on how to use this.

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.

source
TrixiParticles.VoxelSphereType
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).

Usage

See SphereShape on how to use this.

source
TrixiParticles.SphereShapeMethod
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, 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, 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 or RoundSphere (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, 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.

Examples

# Filled circle with radius 0.5, center in (0.2, 0.4) and a particle spacing of 0.1
@@ -123,4 +123,4 @@
 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())
source
+SphereShape(0.1, 0.5, (0.2, 0.4, 0.3), 1000.0, sphere_type=RoundSphere())source diff --git a/previews/PR514/general/interpolation/index.html b/previews/PR514/general/interpolation/index.html index 7c79d0f02..d5db2c620 100644 --- a/previews/PR514/general/interpolation/index.html +++ b/previews/PR514/general/interpolation/index.html @@ -2,17 +2,17 @@ Interpolation · TrixiParticles.jl

Interpolation

TrixiParticles.interpolate_lineMethod
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, interpolate_plane_2d, interpolate_plane_2d_vtk, interpolate_plane_3d.

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

# 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)
source
TrixiParticles.interpolate_plane_2dMethod
interpolate_plane_2d(min_corner, max_corner, resolution, semi, ref_system, sol;
+results = interpolate_line([1.0, 0.0], [1.0, 1.0], 5, semi, ref_system, sol)
source
TrixiParticles.interpolate_plane_2dMethod
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, interpolate_plane_3d, interpolate_line, interpolate_point.

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

# 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)
source
TrixiParticles.interpolate_plane_2d_vtkMethod
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, interpolate_plane_3d, interpolate_line, interpolate_point.

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

# 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)
source
TrixiParticles.interpolate_plane_3dMethod
interpolate_plane_3d(point1, point2, point3, resolution, semi, ref_system, sol;
+results = interpolate_plane_2d([0.0, 0.0], [1.0, 1.0], 0.2, semi, ref_system, sol)
source
TrixiParticles.interpolate_plane_3dMethod
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, interpolate_plane_2d_vtk, interpolate_line, interpolate_point.

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

# 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)
source
TrixiParticles.interpolate_pointMethod
interpolate_point(points_coords::Array{Array{Float64,1},1}, semi, ref_system, sol;
+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)
source
TrixiParticles.interpolate_pointMethod
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)
 
@@ -23,4 +23,4 @@
 
 # For multiple points
 points = [[1.0, 0.5], [1.0, 0.6], [1.0, 0.7]]
-results = interpolate_point(points, semi, ref_system, sol)
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.

source
+results = interpolate_point(points, semi, ref_system, sol)
Note

accurate as a real surface reconstruction.

source diff --git a/previews/PR514/general/neighborhood_search/index.html b/previews/PR514/general/neighborhood_search/index.html index 7a2b0edc5..aa82e3554 100644 --- a/previews/PR514/general/neighborhood_search/index.html +++ b/previews/PR514/general/neighborhood_search/index.html @@ -2,4 +2,4 @@ Neighborhood Search · TrixiParticles.jl

Neighborhood Search

The neighborhood search is the most essential component for performance. We provide several implementations in the package PointNeighbors.jl. See the docs of this package for an overview and a comparison of different implementations.

Usage

To run a simulation with a neighborhood search implementation, pass a template of the neighborhood search to the constructor of the Semidiscretization. A template is just an empty neighborhood search with search radius 0.0. See copy_neighborhood_search and the examples below for more details.

semi = Semidiscretization(system1, system2,
                           neighborhood_search=PrecomputedNeighborhoodSearch{2}())

The keyword argument periodic_box in the neighborhood search constructors can be used to define a periodic domain. See the PointNeighbors.jl docs for more details.

periodic_box = PeriodicBox(min_corner=[0.0, -0.25], max_corner=[1.0, 0.75])
 semi = Semidiscretization(system1, system2,
-                          neighborhood_search=GridNeighborhoodSearch{2}(; periodic_box))
+ neighborhood_search=GridNeighborhoodSearch{2}(; periodic_box)) diff --git a/previews/PR514/general/semidiscretization/index.html b/previews/PR514/general/semidiscretization/index.html index 212b7025d..35aac37c7 100644 --- a/previews/PR514/general/semidiscretization/index.html +++ b/previews/PR514/general/semidiscretization/index.html @@ -12,6 +12,6 @@ neighborhood_search=PrecomputedNeighborhoodSearch{2}()) semi = Semidiscretization(fluid_system, boundary_system, - neighborhood_search=nothing)source
TrixiParticles.SourceTermDampingType
SourceTermDamping(; damping_coefficient)

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$.

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.

Examples

source_terms = SourceTermDamping(; damping_coefficient=1e-4)
source
TrixiParticles.restart_with!Method
restart_with!(semi, sol)

Set the initial coordinates and velocities of all systems in semi to the final values in the solution sol. semidiscretize has to be called again afterwards, or another Semidiscretization can be created with the updated systems.

Arguments

  • semi: The semidiscretization
  • sol: The ODESolution returned by solve of OrdinaryDiffEq
source
TrixiParticles.semidiscretizeMethod
semidiscretize(semi, tspan; reset_threads=true)

Create an ODEProblem from the semidiscretization with the specified tspan.

Arguments

  • semi: A Semidiscretization 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.

Returns

A DynamicalODEProblem (see the OrdinaryDiffEq.jl docs) to be integrated with 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

semi = Semidiscretization(fluid_system, boundary_system)
+                          neighborhood_search=nothing)
source
TrixiParticles.SourceTermDampingType
SourceTermDamping(; damping_coefficient)

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$.

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.

Examples

source_terms = SourceTermDamping(; damping_coefficient=1e-4)
source
TrixiParticles.restart_with!Method
restart_with!(semi, sol)

Set the initial coordinates and velocities of all systems in semi to the final values in the solution sol. semidiscretize has to be called again afterwards, or another Semidiscretization can be created with the updated systems.

Arguments

  • semi: The semidiscretization
  • sol: The ODESolution returned by solve of OrdinaryDiffEq
source
TrixiParticles.semidiscretizeMethod
semidiscretize(semi, tspan; reset_threads=true)

Create an ODEProblem from the semidiscretization with the specified tspan.

Arguments

  • semi: A Semidiscretization 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.

Returns

A DynamicalODEProblem (see the OrdinaryDiffEq.jl docs) to be integrated with 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

semi = Semidiscretization(fluid_system, boundary_system)
 tspan = (0.0, 1.0)
-ode_problem = semidiscretize(semi, tspan)
source
+ode_problem = semidiscretize(semi, tspan)source diff --git a/previews/PR514/general/smoothing_kernels/index.html b/previews/PR514/general/smoothing_kernels/index.html index cc5e8dbc4..43dc94f63 100644 --- a/previews/PR514/general/smoothing_kernels/index.html +++ b/previews/PR514/general/smoothing_kernels/index.html @@ -1,33 +1,33 @@ -Smoothing Kernels · TrixiParticles.jl

Smoothing Kernels

The following smoothing kernels are currently available:

Smoothing KernelCompact SupportTyp. Smoothing LengthRecommended ApplicationStability
SchoenbergCubicSplineKernel$[0, 2h]$$1.1$ to $1.3$General + sharp waves++
SchoenbergQuarticSplineKernel$[0, 2.5h]$$1.1$ to $1.5$General+++
SchoenbergQuinticSplineKernel$[0, 3h]$$1.1$ to $1.5$General++++
GaussianKernel$[0, 3h]$$1.0$ to $1.5$Literature+++++
WendlandC2Kernel$[0, 1h]$$2.5$ to $4.0$General (recommended)++++
WendlandC4Kernel$[0, 1h]$$3.0$ to $4.5$General+++++
WendlandC6Kernel$[0, 1h]$$3.5$ to $5.0$General+++++
Poly6Kernel$[0, 1h]$$1.5$ to $2.5$Literature+
SpikyKernel$[0, 1h]$$1.5$ to $3.0$Sharp corners + waves+

We recommend to use the WendlandC2Kernel for most applications. If less smoothing is needed, try SchoenbergCubicSplineKernel, for more smoothing try WendlandC6Kernel.

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

\[W(\Vert r_a - r_b \Vert, h).\]

The gradient required in SPH,

\[ \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$.

TrixiParticles.GaussianKernelType
GaussianKernel{NDIMS}()

Gaussian kernel given by

\[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.

Note: This truncation makes this Kernel not conservative, which is beneficial in regards to stability but makes it less accurate.

source
TrixiParticles.Poly6KernelType
Poly6Kernel{NDIMS}()

Poly6 kernel, a commonly used kernel in SPH literature [3], especially in computer graphics contexts. It is defined as

\[W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} +Smoothing Kernels · TrixiParticles.jl

Smoothing Kernels

The following smoothing kernels are currently available:

Smoothing KernelCompact SupportTyp. Smoothing LengthRecommended ApplicationStability
SchoenbergCubicSplineKernel$[0, 2h]$$1.1$ to $1.3$General + sharp waves++
SchoenbergQuarticSplineKernel$[0, 2.5h]$$1.1$ to $1.5$General+++
SchoenbergQuinticSplineKernel$[0, 3h]$$1.1$ to $1.5$General++++
GaussianKernel$[0, 3h]$$1.0$ to $1.5$Literature+++++
WendlandC2Kernel$[0, 1h]$$2.5$ to $4.0$General (recommended)++++
WendlandC4Kernel$[0, 1h]$$3.0$ to $4.5$General+++++
WendlandC6Kernel$[0, 1h]$$3.5$ to $5.0$General+++++
Poly6Kernel$[0, 1h]$$1.5$ to $2.5$Literature+
SpikyKernel$[0, 1h]$$1.5$ to $3.0$Sharp corners + waves+

We recommend to use the WendlandC2Kernel for most applications. If less smoothing is needed, try SchoenbergCubicSplineKernel, for more smoothing try WendlandC6Kernel.

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

\[W(\Vert r_a - r_b \Vert, h).\]

The gradient required in SPH,

\[ \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$.

TrixiParticles.GaussianKernelType
GaussianKernel{NDIMS}()

Gaussian kernel given by

\[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.

Note: This truncation makes this Kernel not conservative, which is beneficial in regards to stability but makes it less accurate.

source
TrixiParticles.Poly6KernelType
Poly6Kernel{NDIMS}()

Poly6 kernel, a commonly used kernel in SPH literature [3], especially in computer graphics contexts. It is defined as

\[W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[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.

source
TrixiParticles.SchoenbergCubicSplineKernelType
SchoenbergCubicSplineKernel{NDIMS}()

Cubic spline kernel by Schoenberg (1946), given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} +\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.

source
TrixiParticles.SchoenbergCubicSplineKernelType
SchoenbergCubicSplineKernel{NDIMS}()

Cubic spline kernel by Schoenberg (1946), given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} \frac{1}{4} (2 - q)^3 - (1 - q)^3 & \text{if } 0 \leq q < 1, \\ \frac{1}{4} (2 - q)^3 & \text{if } 1 \leq q < 2, \\ 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.

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.

source
TrixiParticles.SchoenbergQuarticSplineKernelType
SchoenbergQuarticSplineKernel{NDIMS}()

Quartic spline kernel by Schoenberg (1946), given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} +\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.

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.

source
TrixiParticles.SchoenbergQuarticSplineKernelType
SchoenbergQuarticSplineKernel{NDIMS}()

Quartic spline kernel by Schoenberg (1946), given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} \left(5/2 - q \right)^4 - 5\left(3/2 - q \right)^4 + 10\left(1/2 - q \right)^4 & \text{if } 0 \leq q < \frac{1}{2}, \\ \left(5/2 - q \right)^4 - 5\left(3/2 - q \right)^4 & \text{if } \frac{1}{2} \leq q < \frac{3}{2}, \\ \left(5/2 - q \right)^4 & \text{if } \frac{3}{2} \leq q < \frac{5}{2}, \\ 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.

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.

source
TrixiParticles.SchoenbergQuinticSplineKernelType
SchoenbergQuinticSplineKernel{NDIMS}()

Quintic spline kernel by Schoenberg (1946), given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} +\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.

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.

source
TrixiParticles.SchoenbergQuinticSplineKernelType
SchoenbergQuinticSplineKernel{NDIMS}()

Quintic spline kernel by Schoenberg (1946), given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} (3 - q)^5 - 6(2 - q)^5 + 15(1 - q)^5 & \text{if } 0 \leq q < 1, \\ (3 - q)^5 - 6(2 - q)^5 & \text{if } 1 \leq q < 2, \\ (3 - q)^5 & \text{if } 2 \leq q < 3, \\ 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.

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.

source
TrixiParticles.SpikyKernelType
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 [3]. It is defined as:

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with:

\[w(q) = \sigma \begin{cases} +\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.

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.

source
TrixiParticles.SpikyKernelType
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 [3]. It is defined as:

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with:

\[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.

source
TrixiParticles.WendlandC2KernelType
WendlandC2Kernel{NDIMS}()

Wendland C2 kernel [7], a piecewise polynomial function designed to have compact support and to be twice continuously differentiable everywhere. Given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} +\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.

source
TrixiParticles.WendlandC2KernelType
WendlandC2Kernel{NDIMS}()

Wendland C2 kernel [7], a piecewise polynomial function designed to have compact support and to be twice continuously differentiable everywhere. Given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[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 (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.

source
TrixiParticles.WendlandC4KernelType
WendlandC4Kernel{NDIMS}()

Wendland C4 kernel [7], a piecewise polynomial function designed to have compact support and to be four times continuously differentiable everywhere. Given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[w(q) = \sigma \begin{cases} +\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 (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.

source
TrixiParticles.WendlandC4KernelType
WendlandC4Kernel{NDIMS}()

Wendland C4 kernel [7], a piecewise polynomial function designed to have compact support and to be four times continuously differentiable everywhere. Given by

\[ W(r, h) = \frac{1}{h^d} w(r/h)\]

with

\[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]$.

For a detailed discussion on Wendland functions and their applications in SPH, see Dehnen (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.0\delta, 4.5\delta]$, where $\delta$ is the typical particle spacing.

For general information and usage see Smoothing Kernels.

source
TrixiParticles.WendlandC6KernelType
WendlandC6Kernel{NDIMS}()

Wendland C6 kernel [7], a piecewise polynomial function designed to have compact support and to be six times continuously differentiable everywhere. Given by:

\[W(r, h) = \frac{1}{h^d} w(r/h)\]

with:

\[w(q) = \sigma \begin{cases} +\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]$.

For a detailed discussion on Wendland functions and their applications in SPH, see Dehnen (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.0\delta, 4.5\delta]$, where $\delta$ is the typical particle spacing.

For general information and usage see Smoothing Kernels.

source
TrixiParticles.WendlandC6KernelType
WendlandC6Kernel{NDIMS}()

Wendland C6 kernel [7], a piecewise polynomial function designed to have compact support and to be six times continuously differentiable everywhere. Given by:

\[W(r, h) = \frac{1}{h^d} w(r/h)\]

with:

\[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, Dehnen (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.

source
+\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, Dehnen (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.

source
diff --git a/previews/PR514/general/util/index.html b/previews/PR514/general/util/index.html index a2541a415..1763307b4 100644 --- a/previews/PR514/general/util/index.html +++ b/previews/PR514/general/util/index.html @@ -1,3 +1,3 @@ -Util · TrixiParticles.jl

Util

TrixiParticles.examples_dirMethod
examples_dir()

Return the directory where the example 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.

Copied from Trixi.jl.

Examples

readdir(examples_dir())
source
TrixiParticles.validation_dirMethod
validation_dir()

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.

Copied from Trixi.jl.

Examples

readdir(validation_dir())
source
TrixiParticles.@autoinfiltrateMacro
@autoinfiltrate
-@autoinfiltrate condition::Bool

Invoke the @infiltrate macro of the package Infiltrator.jl to create a breakpoint for ad-hoc interactive debugging in the REPL. If the optional argument condition is given, the breakpoint is only enabled if condition evaluates to true.

As opposed to using Infiltrator.@infiltrate directly, this macro does not require Infiltrator.jl to be added as a dependency to TrixiParticles.jl. As a bonus, the macro will also attempt to load the Infiltrator module if it has not yet been loaded manually.

Note: For this macro to work, the Infiltrator.jl package needs to be installed in your current Julia environment stack.

See also: Infiltrator.jl

Internal use only

Please note that this macro is intended for internal use only. It is not part of the public API of TrixiParticles.jl, and it thus can altered (or be removed) at any time without it being considered a breaking change.

source
+Util · TrixiParticles.jl

Util

TrixiParticles.examples_dirMethod
examples_dir()

Return the directory where the example 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.

Copied from Trixi.jl.

Examples

readdir(examples_dir())
source
TrixiParticles.validation_dirMethod
validation_dir()

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.

Copied from Trixi.jl.

Examples

readdir(validation_dir())
source
TrixiParticles.@autoinfiltrateMacro
@autoinfiltrate
+@autoinfiltrate condition::Bool

Invoke the @infiltrate macro of the package Infiltrator.jl to create a breakpoint for ad-hoc interactive debugging in the REPL. If the optional argument condition is given, the breakpoint is only enabled if condition evaluates to true.

As opposed to using Infiltrator.@infiltrate directly, this macro does not require Infiltrator.jl to be added as a dependency to TrixiParticles.jl. As a bonus, the macro will also attempt to load the Infiltrator module if it has not yet been loaded manually.

Note: For this macro to work, the Infiltrator.jl package needs to be installed in your current Julia environment stack.

See also: Infiltrator.jl

Internal use only

Please note that this macro is intended for internal use only. It is not part of the public API of TrixiParticles.jl, and it thus can altered (or be removed) at any time without it being considered a breaking change.

source
diff --git a/previews/PR514/getting_started/index.html b/previews/PR514/getting_started/index.html index 208d2cac9..3de41dd74 100644 --- a/previews/PR514/getting_started/index.html +++ b/previews/PR514/getting_started/index.html @@ -1,2 +1,2 @@ -Getting started · TrixiParticles.jl

Getting started

If you have not installed TrixiParticles.jl, please follow the instructions given here.

In the following sections, we will give a short introduction. For a more thorough discussion, take a look at our Tutorials.

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.

julia> using TrixiParticles

Then start the simulation by executing

julia> trixi_include(joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"))

The easiest way to quickly visualize the result is to use Plots.jl:

julia> using Plots; plot(sol)

This will open a new window with a 2D visualization of the final solution: plot_hydrostatic_water_column

For more information about visualization, see Visualization.

Running other Examples

You can find a list of our other predefined examples under Examples. Execute them as follows from the Julia REPL by replacing subfolder and example_name

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.

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.

Find an overview over the available tutorials under Tutorials.

+Getting started · TrixiParticles.jl

Getting started

If you have not installed TrixiParticles.jl, please follow the instructions given here.

In the following sections, we will give a short introduction. For a more thorough discussion, take a look at our Tutorials.

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.

julia> using TrixiParticles

Then start the simulation by executing

julia> trixi_include(joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl"))

The easiest way to quickly visualize the result is to use Plots.jl:

julia> using Plots; plot(sol)

This will open a new window with a 2D visualization of the final solution: plot_hydrostatic_water_column

For more information about visualization, see Visualization.

Running other Examples

You can find a list of our other predefined examples under Examples. Execute them as follows from the Julia REPL by replacing subfolder and example_name

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.

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.

Find an overview over the available tutorials under Tutorials.

diff --git a/previews/PR514/gpu/index.html b/previews/PR514/gpu/index.html index 9b86786e3..19c17b733 100644 --- a/previews/PR514/gpu/index.html +++ b/previews/PR514/gpu/index.html @@ -5,4 +5,4 @@ cell_list = TrixiParticles.PointNeighbors.FullGridCellList(; min_corner, max_corner)

We then need to pass this cell list to the neighborhood search and the neighborhood search to the Semidiscretization.

semi = Semidiscretization(fluid_system, boundary_system,
                           neighborhood_search=GridNeighborhoodSearch{2}(; cell_list))

At this point, we should run the simulation and make sure that it still works and that the bounding box is large enough. For some simulations where particles move outside the initial tank coordinates, for example when the tank is not closed or when the tank is moving, an appropriate bounding box has to be specified.

Then, we only need to specify the data type that is used for the simulation. On an Nvidia GPU, we specify:

using CUDA
 ode = semidiscretize(semi, tspan, data_type=CuArray)

On an AMD GPU, we use:

using AMDGPU
-ode = semidiscretize(semi, tspan, data_type=ROCArray)

Then, we can run the simulation as usual. All data is transferred to the GPU during initialization and all loops over particles and their neighbors will be executed on the GPU as kernels generated by KernelAbstractions.jl. Data is only copied to the CPU for saving VTK files via the SolutionSavingCallback.

+ode = semidiscretize(semi, tspan, data_type=ROCArray)

Then, we can run the simulation as usual. All data is transferred to the GPU during initialization and all loops over particles and their neighbors will be executed on the GPU as kernels generated by KernelAbstractions.jl. Data is only copied to the CPU for saving VTK files via the SolutionSavingCallback.

diff --git a/previews/PR514/index.html b/previews/PR514/index.html index 246b3d311..8dd6eccd7 100644 --- a/previews/PR514/index.html +++ b/previews/PR514/index.html @@ -16,4 +16,4 @@
Dam Break with Elastic Plate
-

Quickstart

  1. Installation
  2. Getting started

If you have any questions concerning TrixiParticles.jl you can join our community on Slack or open an issue with your question.

Start with development

To get started with development have a look at these pages:

  1. Installation
  2. Development
  3. Contributing
+

Quickstart

  1. Installation
  2. Getting started

If you have any questions concerning TrixiParticles.jl you can join our community on Slack or open an issue with your question.

Start with development

To get started with development have a look at these pages:

  1. Installation
  2. Development
  3. Contributing
diff --git a/previews/PR514/install/index.html b/previews/PR514/install/index.html index 9bdbc3a24..b47f5e8da 100644 --- a/previews/PR514/install/index.html +++ b/previews/PR514/install/index.html @@ -11,4 +11,4 @@ julia> Pkg.resolve() -julia> Pkg.instantiate() +julia> Pkg.instantiate() diff --git a/previews/PR514/license/index.html b/previews/PR514/license/index.html index 377899f9c..48330d9c2 100644 --- a/previews/PR514/license/index.html +++ b/previews/PR514/license/index.html @@ -1,2 +1,2 @@ -License · TrixiParticles.jl

License

MIT License

Copyright (c) 2023-present The TrixiParticles.jl Authors (see Authors)
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.

+License · TrixiParticles.jl

License

MIT License

Copyright (c) 2023-present The TrixiParticles.jl Authors (see Authors)
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/previews/PR514/news/index.html b/previews/PR514/news/index.html index 9622fb27c..97099e69c 100644 --- a/previews/PR514/news/index.html +++ b/previews/PR514/news/index.html @@ -1,2 +1,2 @@ -News · TrixiParticles.jl

Changelog

TrixiParticles.jl follows the interpretation of semantic versioning (semver) used in the Julia ecosystem. Notable changes will be documented in this file for human readability.

Version 0.2.3

Highlights

Transport Velocity Formulation (TVF) based on the work of Ramachandran et al. "Entropically damped artificial compressibility for SPH" (2019) was added.

Version 0.2.2

Highlights

Hotfix for threaded sampling of complex geometries.

Version 0.2.1

Highlights

Particle sampling of complex geometries from .stl and .asc files.

Version 0.2.0

Removed

Use of the internal neighborhood search has been removed and replaced with PointNeighbors.jl.

Development Cycle 0.1

Highlights

Discrete Element Method

A basic implementation of the discrete element method was added.

Surface Tension and Adhesion Model

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.

Support for Open Boundaries

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.

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).

+News · TrixiParticles.jl

Changelog

TrixiParticles.jl follows the interpretation of semantic versioning (semver) used in the Julia ecosystem. Notable changes will be documented in this file for human readability.

Version 0.2.3

Highlights

Transport Velocity Formulation (TVF) based on the work of Ramachandran et al. "Entropically damped artificial compressibility for SPH" (2019) was added.

Version 0.2.2

Highlights

Hotfix for threaded sampling of complex geometries.

Version 0.2.1

Highlights

Particle sampling of complex geometries from .stl and .asc files.

Version 0.2.0

Removed

Use of the internal neighborhood search has been removed and replaced with PointNeighbors.jl.

Development Cycle 0.1

Highlights

Discrete Element Method

A basic implementation of the discrete element method was added.

Surface Tension and Adhesion Model

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.

Support for Open Boundaries

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.

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/previews/PR514/overview/index.html b/previews/PR514/overview/index.html index eeae163c6..775b24f4d 100644 --- a/previews/PR514/overview/index.html +++ b/previews/PR514/overview/index.html @@ -1,2 +1,2 @@ -Overview · TrixiParticles.jl

Overview

The actual API reference is not listed on a single page, like in most Julia packages, but instead is split into multiple sections that follow a similar structure as the code files themselves. In these sections, API docs are combined with explanations of the theoretical background of these methods.

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

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.

+Overview · TrixiParticles.jl

Overview

The actual API reference is not listed on a single page, like in most Julia packages, but instead is split into multiple sections that follow a similar structure as the code files themselves. In these sections, API docs are combined with explanations of the theoretical background of these methods.

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

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/previews/PR514/preprocessing/preprocessing/index.html b/previews/PR514/preprocessing/preprocessing/index.html index f9558d661..b8218f519 100644 --- a/previews/PR514/preprocessing/preprocessing/index.html +++ b/previews/PR514/preprocessing/preprocessing/index.html @@ -48,5 +48,5 @@ correct evaluation intersecting

The evaluation then looks as follows.

correct evaluation intersecting 2 -
TrixiParticles.WindingNumberHormannType
WindingNumberHormann()

Algorithm for inside-outside segmentation of a complex geometry proposed by Hormann (2001). It is only supported for 2D geometries. WindingNumberHormann might handle edge cases a bit better, since the winding number is an integer value.

Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.WindingNumberJacobsonType
WindingNumberJacobson(; geometry=nothing, winding_number_factor=sqrt(eps()),
-                      hierarchical_winding=false)

Algorithm for inside-outside segmentation of a complex geometry proposed by [2].

Keywords

  • geometry: Complex geometry returned by load_geometry and is only required when using hierarchical_winding=true.
  • hierarchical_winding: If set to true, an optimized hierarchical approach will be used, which gives a significant speedup. For further information see Hierarchical Winding.
  • winding_number_factor: For leaky geometries, a factor of 0.4 will give a better inside-outside segmentation.
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.load_geometryMethod
load_geometry(filename; element_type=Float64)

Load file and return corresponding type for ComplexShape. Supported file formats are .stl and .asc.

Arguments

  • filename: Name of the file to be loaded.

Keywords

  • element_type: Element type (default is Float64)
source
+
TrixiParticles.WindingNumberHormannType
WindingNumberHormann()

Algorithm for inside-outside segmentation of a complex geometry proposed by Hormann (2001). It is only supported for 2D geometries. WindingNumberHormann might handle edge cases a bit better, since the winding number is an integer value.

Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.WindingNumberJacobsonType
WindingNumberJacobson(; geometry=nothing, winding_number_factor=sqrt(eps()),
+                      hierarchical_winding=false)

Algorithm for inside-outside segmentation of a complex geometry proposed by [2].

Keywords

  • geometry: Complex geometry returned by load_geometry and is only required when using hierarchical_winding=true.
  • hierarchical_winding: If set to true, an optimized hierarchical approach will be used, which gives a significant speedup. For further information see Hierarchical Winding.
  • winding_number_factor: For leaky geometries, a factor of 0.4 will give a better inside-outside segmentation.
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.load_geometryMethod
load_geometry(filename; element_type=Float64)

Load file and return corresponding type for ComplexShape. Supported file formats are .stl and .asc.

Arguments

  • filename: Name of the file to be loaded.

Keywords

  • element_type: Element type (default is Float64)
source
diff --git a/previews/PR514/reference-pointneighbors/index.html b/previews/PR514/reference-pointneighbors/index.html index 29cc199b3..2b8a2e8e4 100644 --- a/previews/PR514/reference-pointneighbors/index.html +++ b/previews/PR514/reference-pointneighbors/index.html @@ -16,4 +16,4 @@ # output GridNeighborhoodSearch{2, Float64, ...}(...)source
PointNeighbors.foreach_point_neighborMethod
foreach_point_neighbor(f, system_coords, neighbor_coords, neighborhood_search;
-                       points = axes(system_coords, 2), parallel = true)

Loop for each point in system_coords over all points in neighbor_coords whose distances to that point are smaller than the search radius and execute the function f(i, j, x, y, d), where

  • i is the column index of the point in system_coords,
  • j the column index of the neighbor in neighbor_coords,
  • x an SVector of the coordinates of the point (system_coords[:, i]),
  • y an SVector of the coordinates of the neighbor (neighbor_coords[:, j]),
  • d the distance between x and y.

The neighborhood_search must have been initialized or updated with system_coords as first coordinate array and neighbor_coords as second coordinate array.

Note that system_coords and neighbor_coords can be identical.

Arguments

  • f: The function explained above.
  • system_coords: A matrix where the i-th column contains the coordinates of point i.
  • neighbor_coords: A matrix where the j-th column contains the coordinates of point j.
  • neighborhood_search: A neighborhood search initialized or updated with system_coords as first coordinate array and neighbor_coords as second coordinate array.

Keywords

  • points: Loop over these point indices. By default all columns of system_coords.
  • parallel=true: Run the outer loop over points thread-parallel.

See also initialize!, update!.

source
PointNeighbors.initialize!Method
initialize!(search::AbstractNeighborhoodSearch, x, y)

Initialize a neighborhood search with the two coordinate arrays x and y.

In general, the purpose of a neighborhood search is to find for one point in x all points in y whose distances to that point are smaller than the search radius. x and y are expected to be matrices, where the i-th column contains the coordinates of point i. Note that x and y can be identical.

See also update!.

source
PointNeighbors.update!Method
update!(search::AbstractNeighborhoodSearch, x, y; points_moving = (true, true))

Update an already initialized neighborhood search with the two coordinate arrays x and y.

Like initialize!, but reusing the existing data structures of the already initialized neighborhood search. When the points only moved a small distance since the last update! or initialize!, this is significantly faster than initialize!.

Not all implementations support incremental updates. If incremental updates are not possible for an implementation, update! will fall back to a regular initialize!.

Some neighborhood searches might not need to update when only x changed since the last update! or initialize! and y did not change. Pass points_moving = (true, false) in this case to avoid unnecessary updates. The first flag in points_moving indicates if points in x are moving. The second flag indicates if points in y are moving.

Experimental Feature: Backend Specification

The keyword argument parallelization_backend allows users to specify the multithreading backend. This feature is currently considered experimental!

Possible parallelization backends are:

See also initialize!.

source
PointNeighbors.@threadedMacro
@threaded x for ... end

Run either a threaded CPU loop or launch a kernel on the GPU, depending on the type of x. 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 parallelization backend (see below) or an array from which the backend can be derived to determine if the loop must be run threaded on the CPU or launched as a kernel on the GPU. Passing KernelAbstractions.CPU() will run the GPU kernel on the CPU.

Possible parallelization backends are:

In particular, the underlying threading capabilities might be provided by other packages such as Polyester.jl.

Warning

This macro does not necessarily work for general for loops. For example, it does not necessarily support general iterables such as eachline(filename).

source
+ points = axes(system_coords, 2), parallel = true)

Loop for each point in system_coords over all points in neighbor_coords whose distances to that point are smaller than the search radius and execute the function f(i, j, x, y, d), where

The neighborhood_search must have been initialized or updated with system_coords as first coordinate array and neighbor_coords as second coordinate array.

Note that system_coords and neighbor_coords can be identical.

Arguments

Keywords

See also initialize!, update!.

source
PointNeighbors.initialize!Method
initialize!(search::AbstractNeighborhoodSearch, x, y)

Initialize a neighborhood search with the two coordinate arrays x and y.

In general, the purpose of a neighborhood search is to find for one point in x all points in y whose distances to that point are smaller than the search radius. x and y are expected to be matrices, where the i-th column contains the coordinates of point i. Note that x and y can be identical.

See also update!.

source
PointNeighbors.update!Method
update!(search::AbstractNeighborhoodSearch, x, y; points_moving = (true, true))

Update an already initialized neighborhood search with the two coordinate arrays x and y.

Like initialize!, but reusing the existing data structures of the already initialized neighborhood search. When the points only moved a small distance since the last update! or initialize!, this is significantly faster than initialize!.

Not all implementations support incremental updates. If incremental updates are not possible for an implementation, update! will fall back to a regular initialize!.

Some neighborhood searches might not need to update when only x changed since the last update! or initialize! and y did not change. Pass points_moving = (true, false) in this case to avoid unnecessary updates. The first flag in points_moving indicates if points in x are moving. The second flag indicates if points in y are moving.

Experimental Feature: Backend Specification

The keyword argument parallelization_backend allows users to specify the multithreading backend. This feature is currently considered experimental!

Possible parallelization backends are:

See also initialize!.

source
PointNeighbors.@threadedMacro
@threaded x for ... end

Run either a threaded CPU loop or launch a kernel on the GPU, depending on the type of x. 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 parallelization backend (see below) or an array from which the backend can be derived to determine if the loop must be run threaded on the CPU or launched as a kernel on the GPU. Passing KernelAbstractions.CPU() will run the GPU kernel on the CPU.

Possible parallelization backends are:

In particular, the underlying threading capabilities might be provided by other packages such as Polyester.jl.

Warning

This macro does not necessarily work for general for loops. For example, it does not necessarily support general iterables such as eachline(filename).

source
diff --git a/previews/PR514/reference-trixibase/index.html b/previews/PR514/reference-trixibase/index.html index 1ffca7e08..851fedea2 100644 --- a/previews/PR514/reference-trixibase/index.html +++ b/previews/PR514/reference-trixibase/index.html @@ -7,4 +7,4 @@ sol.t[end] end [ Info: You just called `trixi_include`. Julia may now compile the code, please be patient. -0.1source
TrixiBase.@trixi_timeitMacro
@trixi_timeit timer() "some label" expression

Basically the same as a special case of @timeit_debug from 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 Trixi.jl, that's not really an issue.

All @trixi_timeit timings can be disabled with disable_debug_timings. The timings should then be optimized away, allowing for truly zero-overhead.

See also disable_debug_timings, enable_debug_timings.

source
+0.1source
TrixiBase.@trixi_timeitMacro
@trixi_timeit timer() "some label" expression

Basically the same as a special case of @timeit_debug from 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 Trixi.jl, that's not really an issue.

All @trixi_timeit timings can be disabled with disable_debug_timings. The timings should then be optimized away, allowing for truly zero-overhead.

See also disable_debug_timings, enable_debug_timings.

source
diff --git a/previews/PR514/references/index.html b/previews/PR514/references/index.html index f1b52263e..64019988a 100644 --- a/previews/PR514/references/index.html +++ b/previews/PR514/references/index.html @@ -1,2 +1,2 @@ -References · TrixiParticles.jl
[1]
K. Hormann and A. Agathos. The point in polygon problem for arbitrary polygons. Computational Geometry 20, 131–144 (2001).
[2]
A. Jacobson, L. Kavan and O. Sorkine-Hornung. Robust inside-outside segmentation using generalized winding numbers. ACM Transactions on Graphics 32, 1–12 (2013).
[3]
M. Müller, D. Charypar and M. Gross. Particle-Based Fluid Simulation for Interactive Applications. In: Proceedings of the 2003 ACM SIGGRAPH/Eurographics Symposium on Computer Animation (Eurographics Association, 07 2003); pp. 154–159.
[4]
I. J. Schoenberg. Contributions to the problem of approximation of equidistant data by analytic functions. Part B. On the problem of osculatory interpolation. A second class of analytic approximation formulae. Quarterly of Applied Mathematics 4, 112–141 (1946).
[5]
D. J. Price. Smoothed particle hydrodynamics and magnetohydrodynamics. Journal of Computational Physics 231, 759–794 (2012).
[6]
J. Monaghan. Particle methods for hydrodynamics. Computer Physics Reports 3, 71–124 (1985).
[7]
H. Wendland. Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree. Advances in Computational Mathematics 4, 389–396 (1995).
[8]
W. Dehnen and H. Aly. Improving convergence in smoothed particle hydrodynamics simulations without pairing instability: SPH without pairing instability. Monthly Notices of the Royal Astronomical Society 425, 1068–1082 (2012).
[9]
N. Bićanić. Discrete Element Methods. In: Discrete Element Methods (Wiley, 2004).
[10]
P. A. Cundall and O. D. Strack. A discrete numerical model for granular assemblies. Géotechnique 29, 47–65 (1979).
[11]
A. Di Renzo and F. P. Di Maio. Comparison of contact-force models for the simulation of collisions in DEM-based granular flow codes. Chemical Engineering Science 59, 525–541 (2004).
[12]
J. Monaghan. Simulating Free Surface Flows with SPH. Journal of Computational Physics 110, 399–406 (1994).
[13]
R. H. Cole and R. Weller. Underwater Explosions. Physics Today 1, 35–35 (1948).
[14]
S. Adami, X. Hu and N. Adams. A generalized wall boundary condition for smoothed particle hydrodynamics. Journal of Computational Physics 231, 7057–7075 (2012).
[15]
J. P. Morris, P. J. Fox and Y. Zhu. Modeling Low Reynolds Number Incompressible Flows Using SPH. Journal of Computational Physics 136, 214–226 (1997).
[16]
J. J. Monaghan. Smoothed Particle Hydrodynamics. Annual Review of Astronomy and Astrophysics 30, 543–574 (1992).
[17]
[18]
J. J. Monaghan. Smoothed particle hydrodynamics. Reports on Progress in Physics 68, 1703–1759 (2005).
[19]
P. Ramachandran and K. Puri. Entropically damped artificial compressibility for SPH. Computers & Fluids 179, 579–594 (2019).
[20]
G. Fourtakas, J. M. Dominguez, R. Vacondio and B. D. Rogers. Local uniform stencil (LUST) boundary condition for arbitrary 3-D boundaries in parallel smoothed particle hydrodynamics (SPH) models. Computers & Fluids 190, 346–361 (2019).
[21]
M. Antuono, A. Colagrossi and S. Marrone. Numerical diffusive terms in weakly-compressible SPH schemes. Computer Physics Communications 183, 2570–2580 (2012).
[22]
M. Antuono, A. Colagrossi, S. Marrone and D. Molteni. Free-surface flows solved by means of SPH schemes with numerical diffusive terms. Computer Physics Communications 181, 532–549 (2010).
[23]
D. Molteni and A. Colagrossi. A simple procedure to improve the pressure evaluation in hydrodynamic context using the SPH. Computer Physics Communications 180, 861–872 (2009).
[24]
A. Ferrari, M. Dumbser, E. F. Toro and A. Armanini. A new 3D parallel SPH scheme for free surface flows. Computers & Fluids 38, 1203–1217 (2009).
[25]
N. Akinci, G. Akinci and M. Teschner. Versatile surface tension and adhesion for SPH fluids. ACM Transactions on Graphics 32, 1–8 (2013).
[26]
J. Bonet and T.-S. Lok. Variational and momentum preservation aspects of Smooth Particle Hydrodynamic formulations. Computer Methods in Applied Mechanics and Engineering 180, 97–115 (1999).
[27]
M. Basa, N. J. Quinlan and M. Lastiwka. Robustness and accuracy of SPH formulations for viscous flow. International Journal for Numerical Methods in Fluids 60, 1127–1148 (2008).
[28]
S. Li and W. K. Liu. Moving least-square reproducing kernel method Part II: Fourier analysis. Computer Methods in Applied Mechanics and Engineering 139, 159–193 (1996).
[29]
J. R. Clausen. Entropically damped form of artificial compressibility for explicit simulation of incompressible flow. Physical Review E 87, 013309 (2013).
[30]
S. Adami, X. Hu and N. Adams. A transport-velocity formulation for smoothed particle hydrodynamics. Journal of Computational Physics 241, 292–307 (2013).
[31]
J. O’Connor and B. D. Rogers. A fluid–structure interaction model for free-surface flows and flexible structures using smoothed particle hydrodynamics on a GPU. Journal of Fluids and Structures 104, 103312 (2021).
[32]
T. Belytschko, Y. Guo, W. K. Liu and S. P. Xiao. A unified stability analysis of meshless particle methods. International Journal for Numerical Methods in Engineering 48, 1359–1400 (2000).
[33]
G. C. Ganzenmüller. An hourglass control algorithm for Lagrangian Smooth Particle Hydrodynamics. Computer Methods in Applied Mechanics and Engineering 286, 87–106 (2015).
[34]
A. Valizadeh and J. J. Monaghan. A study of solid wall models for weakly compressible SPH. Journal of Computational Physics 300, 5–19 (2015).
[35]
N. Akinci, M. Ihmsen, G. Akinci, B. Solenthaler and M. Teschner. Versatile rigid-fluid coupling for incompressible SPH. ACM Transactions on Graphics 31, 1–8 (2012).
[36]
A. J. Crespo, M. Gomez-Gesteira and R. A. Dalrymple. Boundary Conditions Generated by Dynamic Particles in SPH Methods. Computers, Materials and Continua 5, 173–184 (2007).
[37]
S. Band, C. Gissler, A. Peer and M. Teschner. MLS pressure boundaries for divergence-free and viscous SPH fluids. Computers & Graphics 76, 37–46 (2018).
[38]
J. Monaghan and J. Kajtar. SPH particle boundary forces for arbitrary boundaries. Computer Physics Communications 180, 1811–1820 (2009).
[39]
M. B. Giles. Nonreflecting boundary conditions for Euler equation calculations. AIAA Journal 28, 2050–2058 (1990).
[40]
M. Lastiwka, M. Basa and N. J. Quinlan. Permeable and non‐reflecting boundary conditions in SPH. International Journal for Numerical Methods in Fluids 61, 709–724 (2008).
[41]
P. Negi, P. Ramachandran and A. Haftu. An improved non-reflecting outlet boundary condition for weakly-compressible SPH. Computer Methods in Applied Mechanics and Engineering 367, 113119 (2020).
[42]
A. Panizzo, G. Cuomo and R. A. Dalrymple. 3D-SPH SIMULATION OF LANDSLIDE GENERATED WAVES. In: Coastal Engineering 2006 (World Scientific Publishing Company, Apr 2007).
[43]
P. Sun, A. Colagrossi, S. Marrone and A. Zhang. Delta-SPH model: Simple procedures for a further improvement of the SPH scheme. Computer Methods in Applied Mechanics and Engineering 315, 25–49 (2017).
[44]
M. Antuono, S. Marrone, A. Colagrossi and B. Bouscasse. Energy balance in the Delta-SPH scheme. Computer Methods in Applied Mechanics and Engineering 289, 209–226 (2015).
+References · TrixiParticles.jl
[1]
K. Hormann and A. Agathos. The point in polygon problem for arbitrary polygons. Computational Geometry 20, 131–144 (2001).
[2]
A. Jacobson, L. Kavan and O. Sorkine-Hornung. Robust inside-outside segmentation using generalized winding numbers. ACM Transactions on Graphics 32, 1–12 (2013).
[3]
M. Müller, D. Charypar and M. Gross. Particle-Based Fluid Simulation for Interactive Applications. In: Proceedings of the 2003 ACM SIGGRAPH/Eurographics Symposium on Computer Animation (Eurographics Association, 07 2003); pp. 154–159.
[4]
I. J. Schoenberg. Contributions to the problem of approximation of equidistant data by analytic functions. Part B. On the problem of osculatory interpolation. A second class of analytic approximation formulae. Quarterly of Applied Mathematics 4, 112–141 (1946).
[5]
D. J. Price. Smoothed particle hydrodynamics and magnetohydrodynamics. Journal of Computational Physics 231, 759–794 (2012).
[6]
J. Monaghan. Particle methods for hydrodynamics. Computer Physics Reports 3, 71–124 (1985).
[7]
H. Wendland. Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree. Advances in Computational Mathematics 4, 389–396 (1995).
[8]
W. Dehnen and H. Aly. Improving convergence in smoothed particle hydrodynamics simulations without pairing instability: SPH without pairing instability. Monthly Notices of the Royal Astronomical Society 425, 1068–1082 (2012).
[9]
N. Bićanić. Discrete Element Methods. In: Discrete Element Methods (Wiley, 2004).
[10]
P. A. Cundall and O. D. Strack. A discrete numerical model for granular assemblies. Géotechnique 29, 47–65 (1979).
[11]
A. Di Renzo and F. P. Di Maio. Comparison of contact-force models for the simulation of collisions in DEM-based granular flow codes. Chemical Engineering Science 59, 525–541 (2004).
[12]
J. Monaghan. Simulating Free Surface Flows with SPH. Journal of Computational Physics 110, 399–406 (1994).
[13]
R. H. Cole and R. Weller. Underwater Explosions. Physics Today 1, 35–35 (1948).
[14]
S. Adami, X. Hu and N. Adams. A generalized wall boundary condition for smoothed particle hydrodynamics. Journal of Computational Physics 231, 7057–7075 (2012).
[15]
J. P. Morris, P. J. Fox and Y. Zhu. Modeling Low Reynolds Number Incompressible Flows Using SPH. Journal of Computational Physics 136, 214–226 (1997).
[16]
J. J. Monaghan. Smoothed Particle Hydrodynamics. Annual Review of Astronomy and Astrophysics 30, 543–574 (1992).
[17]
[18]
J. J. Monaghan. Smoothed particle hydrodynamics. Reports on Progress in Physics 68, 1703–1759 (2005).
[19]
P. Ramachandran and K. Puri. Entropically damped artificial compressibility for SPH. Computers & Fluids 179, 579–594 (2019).
[20]
G. Fourtakas, J. M. Dominguez, R. Vacondio and B. D. Rogers. Local uniform stencil (LUST) boundary condition for arbitrary 3-D boundaries in parallel smoothed particle hydrodynamics (SPH) models. Computers & Fluids 190, 346–361 (2019).
[21]
M. Antuono, A. Colagrossi and S. Marrone. Numerical diffusive terms in weakly-compressible SPH schemes. Computer Physics Communications 183, 2570–2580 (2012).
[22]
M. Antuono, A. Colagrossi, S. Marrone and D. Molteni. Free-surface flows solved by means of SPH schemes with numerical diffusive terms. Computer Physics Communications 181, 532–549 (2010).
[23]
D. Molteni and A. Colagrossi. A simple procedure to improve the pressure evaluation in hydrodynamic context using the SPH. Computer Physics Communications 180, 861–872 (2009).
[24]
A. Ferrari, M. Dumbser, E. F. Toro and A. Armanini. A new 3D parallel SPH scheme for free surface flows. Computers & Fluids 38, 1203–1217 (2009).
[25]
N. Akinci, G. Akinci and M. Teschner. Versatile surface tension and adhesion for SPH fluids. ACM Transactions on Graphics 32, 1–8 (2013).
[26]
J. Bonet and T.-S. Lok. Variational and momentum preservation aspects of Smooth Particle Hydrodynamic formulations. Computer Methods in Applied Mechanics and Engineering 180, 97–115 (1999).
[27]
M. Basa, N. J. Quinlan and M. Lastiwka. Robustness and accuracy of SPH formulations for viscous flow. International Journal for Numerical Methods in Fluids 60, 1127–1148 (2008).
[28]
S. Li and W. K. Liu. Moving least-square reproducing kernel method Part II: Fourier analysis. Computer Methods in Applied Mechanics and Engineering 139, 159–193 (1996).
[29]
J. R. Clausen. Entropically damped form of artificial compressibility for explicit simulation of incompressible flow. Physical Review E 87, 013309 (2013).
[30]
S. Adami, X. Hu and N. Adams. A transport-velocity formulation for smoothed particle hydrodynamics. Journal of Computational Physics 241, 292–307 (2013).
[31]
J. O’Connor and B. D. Rogers. A fluid–structure interaction model for free-surface flows and flexible structures using smoothed particle hydrodynamics on a GPU. Journal of Fluids and Structures 104, 103312 (2021).
[32]
T. Belytschko, Y. Guo, W. K. Liu and S. P. Xiao. A unified stability analysis of meshless particle methods. International Journal for Numerical Methods in Engineering 48, 1359–1400 (2000).
[33]
G. C. Ganzenmüller. An hourglass control algorithm for Lagrangian Smooth Particle Hydrodynamics. Computer Methods in Applied Mechanics and Engineering 286, 87–106 (2015).
[34]
A. Valizadeh and J. J. Monaghan. A study of solid wall models for weakly compressible SPH. Journal of Computational Physics 300, 5–19 (2015).
[35]
N. Akinci, M. Ihmsen, G. Akinci, B. Solenthaler and M. Teschner. Versatile rigid-fluid coupling for incompressible SPH. ACM Transactions on Graphics 31, 1–8 (2012).
[36]
A. J. Crespo, M. Gomez-Gesteira and R. A. Dalrymple. Boundary Conditions Generated by Dynamic Particles in SPH Methods. Computers, Materials and Continua 5, 173–184 (2007).
[37]
S. Band, C. Gissler, A. Peer and M. Teschner. MLS pressure boundaries for divergence-free and viscous SPH fluids. Computers & Graphics 76, 37–46 (2018).
[38]
J. Monaghan and J. Kajtar. SPH particle boundary forces for arbitrary boundaries. Computer Physics Communications 180, 1811–1820 (2009).
[39]
M. B. Giles. Nonreflecting boundary conditions for Euler equation calculations. AIAA Journal 28, 2050–2058 (1990).
[40]
M. Lastiwka, M. Basa and N. J. Quinlan. Permeable and non‐reflecting boundary conditions in SPH. International Journal for Numerical Methods in Fluids 61, 709–724 (2008).
[41]
P. Negi, P. Ramachandran and A. Haftu. An improved non-reflecting outlet boundary condition for weakly-compressible SPH. Computer Methods in Applied Mechanics and Engineering 367, 113119 (2020).
[42]
A. Panizzo, G. Cuomo and R. A. Dalrymple. 3D-SPH SIMULATION OF LANDSLIDE GENERATED WAVES. In: Coastal Engineering 2006 (World Scientific Publishing Company, Apr 2007).
[43]
P. Sun, A. Colagrossi, S. Marrone and A. Zhang. Delta-SPH model: Simple procedures for a further improvement of the SPH scheme. Computer Methods in Applied Mechanics and Engineering 315, 25–49 (2017).
[44]
M. Antuono, S. Marrone, A. Colagrossi and B. Bouscasse. Energy balance in the Delta-SPH scheme. Computer Methods in Applied Mechanics and Engineering 289, 209–226 (2015).
diff --git a/previews/PR514/systems/boundary/index.html b/previews/PR514/systems/boundary/index.html index 1ed08cd4d..1962748c9 100644 --- a/previews/PR514/systems/boundary/index.html +++ b/previews/PR514/systems/boundary/index.html @@ -1,8 +1,8 @@ -Boundary · TrixiParticles.jl

Boundary System

TrixiParticles.BoundarySPHSystemType
BoundarySPHSystem(initial_condition, boundary_model; movement=nothing, adhesion_coefficient=0.0)

System for boundaries modeled by boundary particles. The interaction between fluid and boundary particles is specified by the boundary model.

Arguments

Keyword Arguments

  • movement: For moving boundaries, a BoundaryMovement 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.
source
TrixiParticles.BoundaryDEMSystemType
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.

Experimental Implementation

This is an experimental feature and may change in a future releases.

source
TrixiParticles.BoundaryMovementType
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.

In the example below, movement describes particles moving in a circle as long as the time is lower than 1.5.

Examples

movement_function(t) = SVector(cos(2pi*t), sin(2pi*t))
+Boundary · TrixiParticles.jl

Boundary System

TrixiParticles.BoundarySPHSystemType
BoundarySPHSystem(initial_condition, boundary_model; movement=nothing, adhesion_coefficient=0.0)

System for boundaries modeled by boundary particles. The interaction between fluid and boundary particles is specified by the boundary model.

Arguments

Keyword Arguments

  • movement: For moving boundaries, a BoundaryMovement 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.
source
TrixiParticles.BoundaryDEMSystemType
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.

Experimental Implementation

This is an experimental feature and may change in a future releases.

source
TrixiParticles.BoundaryMovementType
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.

In the example below, movement describes particles moving in a circle as long as the time is lower than 1.5.

Examples

movement_function(t) = SVector(cos(2pi*t), sin(2pi*t))
 is_moving(t) = t < 1.5
 
-movement = BoundaryMovement(movement_function, is_moving)
source

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, 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 (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

\[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$.

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, 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 (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

\[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$.

TrixiParticles.BoundaryModelDummyParticlesType
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).
  • correction: Correction method of the adjacent fluid system (see Corrections).
  • viscosity: Slip (default) or no-slip condition. See description below for further information.

Examples

# Free-slip condition
@@ -12,19 +12,19 @@
 # No-slip condition
 boundary_model = BoundaryModelDummyParticles(densities, masses, AdamiPressureExtrapolation(),
                                              smoothing_kernel, smoothing_length,
-                                             viscosity=ViscosityAdami(nu=1e-6))
source

Hydrodynamic density of dummy particles

We provide six options to compute the boundary density and pressure, determined by the density_calculator:

  1. (Recommended) With AdamiPressureExtrapolation, 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. (Only relevant for FSI) With BernoulliPressureExtrapolation, the pressure is extrapolated from the pressure similar to the AdamiPressureExtrapolation, but a relative velocity-dependent pressure part is calculated between moving solids and fluids, which increases the boundary pressure in areas prone to penetrations.
  3. With SummationDensity, the density is calculated by summation over the neighboring particles, and the pressure is computed from the density with the state equation.
  4. With ContinuityDensity, 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.
  5. With PressureZeroing, 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.
  6. With PressureMirroring, 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 for more details.

1. AdamiPressureExtrapolation

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

\[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$.

TrixiParticles.AdamiPressureExtrapolationType
AdamiPressureExtrapolation(; pressure_offset=0.0)

density_calculator for BoundaryModelDummyParticles.

Keywords

  • pressure_offset=0.0: Sometimes it is necessary to artificially increase the boundary pressure to prevent penetration, which is possible by increasing this value.
source

2. BernoulliPressureExtrapolation

Identical to the pressure $p_b$ calculated via AdamiPressureExtrapolation, but it adds the dynamic pressure component of the Bernoulli equation:

\[p_b = \frac{\sum_f (p_f + \frac{1}{2} \, \rho_{\text{neighbor}} \left( \frac{ (\mathbf{v}_f - \mathbf{v}_{\text{body}}) \cdot (\mathbf{x}_f - \mathbf{x}_{\text{neighbor}}) }{ \left\| \mathbf{x}_f - \mathbf{x}_{\text{neighbor}} \right\| } \right)^2 \times \text{factor} +\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 $\mathbf{v}_f$ is the velocity of the fluid and $\mathbf{v}_{\text{body}}$ is the velocity of the body. This adjustment provides a higher boundary pressure for solid bodies moving with a relative velocity to the fluid to prevent penetration. This modification is original and not derived from any literature source.

TrixiParticles.BernoulliPressureExtrapolationType
BernoulliPressureExtrapolation(; pressure_offset=0.0, factor=1.0)

density_calculator for BoundaryModelDummyParticles.

Keywords

  • pressure_offset=0.0: Sometimes it is necessary to artificially increase the boundary pressure to prevent penetration, which is possible by increasing this value.
  • factor=1.0 : Setting factor allows to just increase the strength of the dynamic pressure part.
source

5. PressureZeroing

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).

TrixiParticles.PressureZeroingType
PressureZeroing()

density_calculator for BoundaryModelDummyParticles.

Note

This boundary model produces significantly worse results than all other models and is only included for research purposes.

source

6. PressureMirroring

Instead of calculating density and pressure for each boundary particle, we modify the momentum equation,

\[\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

\[\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).

TrixiParticles.PressureMirroringType
PressureMirroring()

density_calculator for BoundaryModelDummyParticles.

Note

This boundary model requires high viscosity for stability with WCSPH. It also produces significantly worse results than AdamiPressureExtrapolation 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.

source

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

\[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 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 for BoundaryModelDummyParticles has not been verified yet.

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

\[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

\[\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) + viscosity=ViscosityAdami(nu=1e-6))

source

Hydrodynamic density of dummy particles

We provide six options to compute the boundary density and pressure, determined by the density_calculator:

  1. (Recommended) With AdamiPressureExtrapolation, 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. (Only relevant for FSI) With BernoulliPressureExtrapolation, the pressure is extrapolated from the pressure similar to the AdamiPressureExtrapolation, but a relative velocity-dependent pressure part is calculated between moving solids and fluids, which increases the boundary pressure in areas prone to penetrations.
  3. With SummationDensity, the density is calculated by summation over the neighboring particles, and the pressure is computed from the density with the state equation.
  4. With ContinuityDensity, 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.
  5. With PressureZeroing, 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.
  6. With PressureMirroring, 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 for more details.

1. AdamiPressureExtrapolation

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

\[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$.

TrixiParticles.AdamiPressureExtrapolationType
AdamiPressureExtrapolation(; pressure_offset=0.0)

density_calculator for BoundaryModelDummyParticles.

Keywords

  • pressure_offset=0.0: Sometimes it is necessary to artificially increase the boundary pressure to prevent penetration, which is possible by increasing this value.
source

2. BernoulliPressureExtrapolation

Identical to the pressure $p_b$ calculated via AdamiPressureExtrapolation, but it adds the dynamic pressure component of the Bernoulli equation:

\[p_b = \frac{\sum_f (p_f + \frac{1}{2} \, \rho_{\text{neighbor}} \left( \frac{ (\mathbf{v}_f - \mathbf{v}_{\text{body}}) \cdot (\mathbf{x}_f - \mathbf{x}_{\text{neighbor}}) }{ \left\| \mathbf{x}_f - \mathbf{x}_{\text{neighbor}} \right\| } \right)^2 \times \text{factor} +\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 $\mathbf{v}_f$ is the velocity of the fluid and $\mathbf{v}_{\text{body}}$ is the velocity of the body. This adjustment provides a higher boundary pressure for solid bodies moving with a relative velocity to the fluid to prevent penetration. This modification is original and not derived from any literature source.

TrixiParticles.BernoulliPressureExtrapolationType
BernoulliPressureExtrapolation(; pressure_offset=0.0, factor=1.0)

density_calculator for BoundaryModelDummyParticles.

Keywords

  • pressure_offset=0.0: Sometimes it is necessary to artificially increase the boundary pressure to prevent penetration, which is possible by increasing this value.
  • factor=1.0 : Setting factor allows to just increase the strength of the dynamic pressure part.
source

5. PressureZeroing

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).

TrixiParticles.PressureZeroingType
PressureZeroing()

density_calculator for BoundaryModelDummyParticles.

Note

This boundary model produces significantly worse results than all other models and is only included for research purposes.

source

6. PressureMirroring

Instead of calculating density and pressure for each boundary particle, we modify the momentum equation,

\[\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

\[\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).

TrixiParticles.PressureMirroringType
PressureMirroring()

density_calculator for BoundaryModelDummyParticles.

Note

This boundary model requires high viscosity for stability with WCSPH. It also produces significantly worse results than AdamiPressureExtrapolation 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.

source

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

\[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 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 for BoundaryModelDummyParticles has not been verified yet.

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

\[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

\[\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

\[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 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.

TrixiParticles.BoundaryModelMonaghanKajtarType
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.
source

Open Boundaries

TrixiParticles.OpenBoundarySPHSystemType
OpenBoundarySPHSystem(boundary_zone::Union{InFlow, OutFlow};
+                            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.
source

Open Boundaries

TrixiParticles.OpenBoundarySPHSystemType
OpenBoundarySPHSystem(boundary_zone::Union{InFlow, OutFlow};
                       fluid_system::FluidSystem, buffer_size::Integer,
                       boundary_model,
                       reference_velocity=nothing,
                       reference_pressure=nothing,
-                      reference_density=nothing)

Open boundary system for in- and outflow particles.

Arguments

  • boundary_zone: Use InFlow for an inflow and OutFlow for an outflow boundary.

Keywords

  • fluid_system: The corresponding fluid system
  • boundary_model: Boundary model (see Open Boundary Models)
  • 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.
  • 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.
  • 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.
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.InFlowType
InFlow(; plane, flow_direction, density, particle_spacing,
+                      reference_density=nothing)

Open boundary system for in- and outflow particles.

Arguments

  • boundary_zone: Use InFlow for an inflow and OutFlow for an outflow boundary.

Keywords

  • fluid_system: The corresponding fluid system
  • boundary_model: Boundary model (see Open Boundary Models)
  • 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.
  • 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.
  • 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.
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.InFlowType
InFlow(; plane, flow_direction, density, particle_spacing,
        initial_condition=nothing, extrude_geometry=nothing,
        open_boundary_layers::Integer)

Inflow boundary zone for OpenBoundarySPHSystem.

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

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).
  • density: Particle density (see InitialCondition).
  • 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

# 2D
 plane_points = ([0.0, 0.0], [0.0, 1.0])
@@ -44,7 +44,7 @@
 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)
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.OutFlowType
OutFlow(; plane, flow_direction, density, particle_spacing,
+                extrude_geometry=circle, open_boundary_layers=4)
Experimental Implementation

This is an experimental feature and may change in any future releases.

source
TrixiParticles.OutFlowType
OutFlow(; plane, flow_direction, density, particle_spacing,
         initial_condition=nothing, extrude_geometry=nothing,
         open_boundary_layers::Integer)

Outflow boundary zone for OpenBoundarySPHSystem.

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

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).
  • density: Particle density (see InitialCondition).
  • 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

# 2D
 plane_points = ([0.0, 0.0], [0.0, 1.0])
@@ -64,4 +64,4 @@
 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)
Experimental Implementation

This is an experimental feature and may change in any future releases.

source

Open Boundary Models

Method of characteristics

TrixiParticles.BoundaryModelLastiwkaType
BoundaryModelLastiwka()

Boundary model for OpenBoundarySPHSystem. This model uses 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.

source

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:

\[J_1 = -c_s^2 (\rho - \rho_{\text{ref}}) + (p - p_{\text{ref}})\]

\[J_2 = \rho c_s (v - v_{\text{ref}}) + (p - p_{\text{ref}})\]

\[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

\[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

\[ \rho - \rho_{\text{ref}} = \frac{1}{c_s^2} \left( -J_1 + \frac{1}{2} J_2 + \frac{1}{2} J_3 \right),\]

\[u - u_{\text{ref}}= \frac{1}{2\rho c_s} \left( J_2 - J_3 \right),\]

\[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.

+ extrude_geometry=circle, open_boundary_layers=4)
Experimental Implementation

This is an experimental feature and may change in any future releases.

source

Open Boundary Models

Method of characteristics

TrixiParticles.BoundaryModelLastiwkaType
BoundaryModelLastiwka()

Boundary model for OpenBoundarySPHSystem. This model uses 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.

source

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:

Giles (1990) derived those variables based on a linearized set of governing equations:

\[J_1 = -c_s^2 (\rho - \rho_{\text{ref}}) + (p - p_{\text{ref}})\]

\[J_2 = \rho c_s (v - v_{\text{ref}}) + (p - p_{\text{ref}})\]

\[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:

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

\[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

\[ \rho - \rho_{\text{ref}} = \frac{1}{c_s^2} \left( -J_1 + \frac{1}{2} J_2 + \frac{1}{2} J_3 \right),\]

\[u - u_{\text{ref}}= \frac{1}{2\rho c_s} \left( J_2 - J_3 \right),\]

\[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.

diff --git a/previews/PR514/systems/dem/index.html b/previews/PR514/systems/dem/index.html index 9e53dc6e8..3e12a31a1 100644 --- a/previews/PR514/systems/dem/index.html +++ b/previews/PR514/systems/dem/index.html @@ -1,3 +1,3 @@ Discrete Element Method (Solid) · TrixiParticles.jl

Discrete Element Method

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.

TrixiParticles.DEMSystemType
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.
Experimental Implementation

This is an experimental feature and may change in a future releases.

References

[9], [10], [11]

source
+ 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

Keywords

Experimental Implementation

This is an experimental feature and may change in a future releases.

References

[9], [10], [11]

source diff --git a/previews/PR514/systems/entropically_damped_sph/index.html b/previews/PR514/systems/entropically_damped_sph/index.html index cc1b0e8ad..5be2718e4 100644 --- a/previews/PR514/systems/entropically_damped_sph/index.html +++ b/previews/PR514/systems/entropically_damped_sph/index.html @@ -7,4 +7,4 @@ transport_velocity=nothing, 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, which uses an equation of state, this scheme uses a pressure evolution equation to calculate the pressure. See Entropically Damped Artificial Compressibility for SPH for more details on the method.

Arguments

Keyword Arguments

source

Transport Velocity Formulation (TVF)

Standard SPH suffers from problems like tensile instability or the creation of void regions in the flow. To address these problems, Adami (2013) modified the advection velocity and added an extra term to the momentum equation. The authors introduced the so-called Transport Velocity Formulation (TVF) for WCSPH. Ramachandran (2019) applied the TVF also for the EDAC scheme.

The transport velocity $\tilde{v}_a$ of particle $a$ is used to evolve the position of the particle $r_a$ from one time step to the next by

\[\frac{\mathrm{d} r_a}{\mathrm{d}t} = \tilde{v}_a\]

and is obtained at every time-step $\Delta t$ from

\[\tilde{v}_a (t + \Delta t) = v_a (t) + \Delta t \left(\frac{\tilde{\mathrm{d}} v_a}{\mathrm{d}t} - \frac{1}{\rho_a} \nabla p_{\text{background}} \right),\]

where $\rho_a$ is the density of particle $a$ and $p_{\text{background}}$ is a constant background pressure field. The tilde in the second term of the right hand side indicates that the material derivative has an advection part.

The discretized form of the last term is

\[ -\frac{1}{\rho_a} \nabla p_{\text{background}} \approx -\frac{p_{\text{background}}}{m_a} \sum_b \left(V_a^2 + V_b^2 \right) \nabla_a W_{ab},\]

where $V_a$, $V_b$ denote the volume of particles $a$ and $b$ respectively. Note that although in the continuous case $\nabla p_{\text{background}} = 0$, the discretization is not 0th-order consistent for non-uniform particle distribution, which means that there is a non-vanishing contribution only when particles are disordered. That also means that $p_{\text{background}}$ occurs as prefactor to correct the trajectory of a particle resulting in uniform pressure distributions. Suggested is a background pressure which is in the order of the reference pressure but can be chosen arbitrarily large when the time-step criterion is adjusted.

The inviscid momentum equation with an additional convection term for a particle moving with $\tilde{v}$ is

\[\frac{\tilde{\mathrm{d}} \left( \rho v \right)}{\mathrm{d}t} = -\nabla p + \nabla \cdot \bm{A},\]

where the tensor $\bm{A} = \rho v\left(\tilde{v}-v\right)^T$ is a consequence of the modified advection velocity and can be interpreted as the convection of momentum with the relative velocity $\tilde{v}-v$.

The discretized form of the momentum equation for a particle $a$ reads as

\[\frac{\tilde{\mathrm{d}} v_a}{\mathrm{d}t} = \frac{1}{m_a} \sum_b \left(V_a^2 + V_b^2 \right) \left[ -\tilde{p}_{ab} \nabla_a W_{ab} + \frac{1}{2} \left(\bm{A}_a + \bm{A}_b \right) \cdot \nabla_a W_{ab} \right].\]

Here, $\tilde{p}_{ab}$ is the density-weighted pressure

\[\tilde{p}_{ab} = \frac{\rho_b p_a + \rho_a p_b}{\rho_a + \rho_b},\]

with the density $\rho_a$, $\rho_b$ and the pressure $p_a$, $p_b$ of particles $a$ and $b$ respectively. $\bm{A}_a$ and $\bm{A}_b$ are the convection tensors for particle $a$ and $b$ respectively and are given, e.g. for particle $a$, as $\bm{A}_a = \rho v_a\left(\tilde{v}_a-v_a\right)^T$.

TrixiParticles.TransportVelocityAdamiType
TransportVelocityAdami(background_pressure::Real)

Transport Velocity Formulation (TVF) to suppress pairing and tensile instability. See TVF for more details of the method.

Arguments

  • background_pressure: Background pressure. Suggested is a background pressure which is on the order of the reference pressure.
Note

There is no need for an artificial viscosity to suppress tensile instability when using TransportVelocityAdami. Thus, it is highly recommended to use ViscosityAdami as viscosity model, since ArtificialViscosityMonaghan leads to bad results.

source
+ source_terms=nothing)

System for particles of a fluid. As opposed to the weakly compressible SPH scheme, which uses an equation of state, this scheme uses a pressure evolution equation to calculate the pressure. See Entropically Damped Artificial Compressibility for SPH for more details on the method.

Arguments

Keyword Arguments

source

Transport Velocity Formulation (TVF)

Standard SPH suffers from problems like tensile instability or the creation of void regions in the flow. To address these problems, Adami (2013) modified the advection velocity and added an extra term to the momentum equation. The authors introduced the so-called Transport Velocity Formulation (TVF) for WCSPH. Ramachandran (2019) applied the TVF also for the EDAC scheme.

The transport velocity $\tilde{v}_a$ of particle $a$ is used to evolve the position of the particle $r_a$ from one time step to the next by

\[\frac{\mathrm{d} r_a}{\mathrm{d}t} = \tilde{v}_a\]

and is obtained at every time-step $\Delta t$ from

\[\tilde{v}_a (t + \Delta t) = v_a (t) + \Delta t \left(\frac{\tilde{\mathrm{d}} v_a}{\mathrm{d}t} - \frac{1}{\rho_a} \nabla p_{\text{background}} \right),\]

where $\rho_a$ is the density of particle $a$ and $p_{\text{background}}$ is a constant background pressure field. The tilde in the second term of the right hand side indicates that the material derivative has an advection part.

The discretized form of the last term is

\[ -\frac{1}{\rho_a} \nabla p_{\text{background}} \approx -\frac{p_{\text{background}}}{m_a} \sum_b \left(V_a^2 + V_b^2 \right) \nabla_a W_{ab},\]

where $V_a$, $V_b$ denote the volume of particles $a$ and $b$ respectively. Note that although in the continuous case $\nabla p_{\text{background}} = 0$, the discretization is not 0th-order consistent for non-uniform particle distribution, which means that there is a non-vanishing contribution only when particles are disordered. That also means that $p_{\text{background}}$ occurs as prefactor to correct the trajectory of a particle resulting in uniform pressure distributions. Suggested is a background pressure which is in the order of the reference pressure but can be chosen arbitrarily large when the time-step criterion is adjusted.

The inviscid momentum equation with an additional convection term for a particle moving with $\tilde{v}$ is

\[\frac{\tilde{\mathrm{d}} \left( \rho v \right)}{\mathrm{d}t} = -\nabla p + \nabla \cdot \bm{A},\]

where the tensor $\bm{A} = \rho v\left(\tilde{v}-v\right)^T$ is a consequence of the modified advection velocity and can be interpreted as the convection of momentum with the relative velocity $\tilde{v}-v$.

The discretized form of the momentum equation for a particle $a$ reads as

\[\frac{\tilde{\mathrm{d}} v_a}{\mathrm{d}t} = \frac{1}{m_a} \sum_b \left(V_a^2 + V_b^2 \right) \left[ -\tilde{p}_{ab} \nabla_a W_{ab} + \frac{1}{2} \left(\bm{A}_a + \bm{A}_b \right) \cdot \nabla_a W_{ab} \right].\]

Here, $\tilde{p}_{ab}$ is the density-weighted pressure

\[\tilde{p}_{ab} = \frac{\rho_b p_a + \rho_a p_b}{\rho_a + \rho_b},\]

with the density $\rho_a$, $\rho_b$ and the pressure $p_a$, $p_b$ of particles $a$ and $b$ respectively. $\bm{A}_a$ and $\bm{A}_b$ are the convection tensors for particle $a$ and $b$ respectively and are given, e.g. for particle $a$, as $\bm{A}_a = \rho v_a\left(\tilde{v}_a-v_a\right)^T$.

TrixiParticles.TransportVelocityAdamiType
TransportVelocityAdami(background_pressure::Real)

Transport Velocity Formulation (TVF) to suppress pairing and tensile instability. See TVF for more details of the method.

Arguments

  • background_pressure: Background pressure. Suggested is a background pressure which is on the order of the reference pressure.
Note

There is no need for an artificial viscosity to suppress tensile instability when using TransportVelocityAdami. Thus, it is highly recommended to use ViscosityAdami as viscosity model, since ArtificialViscosityMonaghan leads to bad results.

source
diff --git a/previews/PR514/systems/total_lagrangian_sph/index.html b/previews/PR514/systems/total_lagrangian_sph/index.html index f3416e997..91aea964a 100644 --- a/previews/PR514/systems/total_lagrangian_sph/index.html +++ b/previews/PR514/systems/total_lagrangian_sph/index.html @@ -7,5 +7,5 @@ young_modulus, poisson_ratio; n_fixed_particles=0, boundary_model=nothing, acceleration=ntuple(_ -> 0.0, NDIMS), - penalty_force=nothing, source_terms=nothing)

System for particles of an elastic structure.

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). See Total Lagrangian SPH for more details on the method.

Arguments

Keyword Arguments

Note

The fixed particles must be the last particles in the InitialCondition. To do so, e.g. use the union function:

solid = union(beam, fixed_particles)

where beam and fixed_particles are of type InitialCondition.

source

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

\[\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

\[ \delta_{ab}^a = \frac{\bm{\epsilon}_{ab}^a \cdot \bm{x_{ab}}}{|\bm{x}_{ab}|},\]

where the error vector is defined as

\[ \bm{\epsilon}_{ab}^a = \bm{F}_a \bm{X}_{ab} - \bm{x}_{ab}.\]

TrixiParticles.PenaltyForceGanzenmuellerType
PenaltyForceGanzenmueller(; alpha=0.1)

Penalty force to ensure regular particle positions under large deformations.

Keywords

  • alpha: Coefficient to control the amplitude of hourglass correction.
source
+ penalty_force=nothing, source_terms=nothing)

System for particles of an elastic structure.

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). See Total Lagrangian SPH for more details on the method.

Arguments

Keyword Arguments

Note

The fixed particles must be the last particles in the InitialCondition. To do so, e.g. use the union function:

solid = union(beam, fixed_particles)

where beam and fixed_particles are of type InitialCondition.

source

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

\[\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

\[ \delta_{ab}^a = \frac{\bm{\epsilon}_{ab}^a \cdot \bm{x_{ab}}}{|\bm{x}_{ab}|},\]

where the error vector is defined as

\[ \bm{\epsilon}_{ab}^a = \bm{F}_a \bm{X}_{ab} - \bm{x}_{ab}.\]

TrixiParticles.PenaltyForceGanzenmuellerType
PenaltyForceGanzenmueller(; alpha=0.1)

Penalty force to ensure regular particle positions under large deformations.

Keywords

  • alpha: Coefficient to control the amplitude of hourglass correction.
source
diff --git a/previews/PR514/systems/weakly_compressible_sph/index.html b/previews/PR514/systems/weakly_compressible_sph/index.html index afed5f571..968a0ffad 100644 --- a/previews/PR514/systems/weakly_compressible_sph/index.html +++ b/previews/PR514/systems/weakly_compressible_sph/index.html @@ -5,12 +5,12 @@ 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 for more details on the method.

Arguments

Keyword Arguments

source

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. The equation in the following formulation was introduced by Cole (1948) (pp. 39 and 43). The pressure $p$ is calculated as

\[ 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.

\[ 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 (see Morris, 1997).

When using SummationDensity (or DensityReinitializationCallback) 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.

TrixiParticles.StateEquationColeType
StateEquationCole(; sound_speed, reference_density, exponent,
-                  background_pressure=0.0, clip_negative_pressure=false)

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.
source

Viscosity

TODO: Explain viscosity.

TrixiParticles.ArtificialViscosityMonaghanType
ArtificialViscosityMonaghan(; alpha, beta=0.0, epsilon=0.01)

Artificial viscosity by Monaghan ([16], [17]), given by

\[\Pi_{ab} = + 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 for more details on the method.

Arguments

Keyword Arguments

  • viscosity: Viscosity model for this system (default: no viscosity). See ArtificialViscosityMonaghan or ViscosityAdami.
  • density_diffusion: Density diffusion terms for this system. See DensityDiffusion.
  • acceleration: Acceleration vector for the system. (default: zero vector)
  • buffer_size: Number of buffer particles. This is needed when simulating with OpenBoundarySPHSystem.
  • correction: Correction method used for this system. (default: no correction, see Corrections)
  • source_terms: Additional source terms for this system. Has to be either nothing (by default), or a function of (coords, velocity, density, pressure, t) (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. Note that these source terms will not be used in the calculation of the boundary pressure when using a boundary with BoundaryModelDummyParticles and AdamiPressureExtrapolation. 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)
source

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. The equation in the following formulation was introduced by Cole (1948) (pp. 39 and 43). The pressure $p$ is calculated as

\[ 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.

\[ 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 (see Morris, 1997).

When using SummationDensity (or DensityReinitializationCallback) 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.

TrixiParticles.StateEquationColeType
StateEquationCole(; sound_speed, reference_density, exponent,
+                  background_pressure=0.0, clip_negative_pressure=false)

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.
source

Viscosity

TODO: Explain viscosity.

TrixiParticles.ArtificialViscosityMonaghanType
ArtificialViscosityMonaghan(; alpha, beta=0.0, epsilon=0.01)

Artificial viscosity by Monaghan ([16], [17]), given by

\[\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

\[\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 (2005) defined an equivalent effective physical kinematic viscosity $\nu$ by

\[ \nu = \frac{\alpha h c }{2d + 4},\]

where $d$ is the dimension.

Keywords

  • alpha: A value of 0.02 is usually used for most simulations. For a relation with the kinematic viscosity, see description above.
  • beta=0.0: A value of 0.0 works well for most fluid simulations and 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.0 and alpha=1.0.
  • epsilon=0.01: Parameter to prevent singularities.
source
TrixiParticles.ViscosityAdamiType
ViscosityAdami(; nu, epsilon=0.01)

Viscosity by Adami (2012). The viscous interaction is calculated with the shear force for incompressible flows given by

\[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 (2019)). The inter-particle-averaged shear stress is

\[ \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
source
TrixiParticles.ViscosityMorrisType
ViscosityMorris(; nu, epsilon=0.01)

Viscosity by Morris (1997) also used by Fourtakas (2019).

To the force $f_{ab}$ between two particles $a$ and $b$ due to pressure gradients, an additional force term $\tilde{f}_{ab}$ is added with

\[\tilde{f}_{ab} = m_a m_b \frac{(\mu_a + \mu_b) r_{ab} \cdot \nabla W_{ab}}{\rho_a \rho_b (\Vert r_{ab} \Vert^2 + \epsilon h^2)} v_{ab},\]

where $\mu_a = \rho_a \nu$ and $\mu_b = \rho_b \nu$ denote the dynamic viscosity of particle $a$ and $b$ respectively, and $\nu$ is the kinematic viscosity.

Keywords

  • nu: Kinematic viscosity
  • epsilon=0.01: Parameter to prevent singularities
source

Density Diffusion

Density diffusion can be used with ContinuityDensity 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) by an additional term

\[\frac{\mathrm{d}\rho_a}{\mathrm{d}t} = \sum_{b} m_b v_{ab} \cdot \nabla_{r_a} W(\Vert r_{ab} \Vert, h) +\end{cases}\]

with

\[\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 (2005) defined an equivalent effective physical kinematic viscosity $\nu$ by

\[ \nu = \frac{\alpha h c }{2d + 4},\]

where $d$ is the dimension.

Keywords

source
TrixiParticles.ViscosityAdamiType
ViscosityAdami(; nu, epsilon=0.01)

Viscosity by Adami (2012). The viscous interaction is calculated with the shear force for incompressible flows given by

\[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 (2019)). The inter-particle-averaged shear stress is

\[ \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
source
TrixiParticles.ViscosityMorrisType
ViscosityMorris(; nu, epsilon=0.01)

Viscosity by Morris (1997) also used by Fourtakas (2019).

To the force $f_{ab}$ between two particles $a$ and $b$ due to pressure gradients, an additional force term $\tilde{f}_{ab}$ is added with

\[\tilde{f}_{ab} = m_a m_b \frac{(\mu_a + \mu_b) r_{ab} \cdot \nabla W_{ab}}{\rho_a \rho_b (\Vert r_{ab} \Vert^2 + \epsilon h^2)} v_{ab},\]

where $\mu_a = \rho_a \nu$ and $\mu_b = \rho_b \nu$ denote the dynamic viscosity of particle $a$ and $b$ respectively, and $\nu$ is the kinematic viscosity.

Keywords

  • nu: Kinematic viscosity
  • epsilon=0.01: Parameter to prevent singularities
source

Density Diffusion

Density diffusion can be used with ContinuityDensity 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) by an additional term

\[\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 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, this results in reduced runtime.

density_diffusion_2d
Dam break in 2D with different density diffusion terms
@@ -20,9 +20,9 @@

The simpler terms DensityDiffusionMolteniColagrossi and DensityDiffusionFerrari 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$):

density_diffusion_tank
Tank in rest under gravity in 3D with different density diffusion terms
-

DensityDiffusionAntuono adds a correction term to solve this problem, but this term is very expensive and adds about 40–50% of computational cost.

API

TrixiParticles.DensityDiffusionType
DensityDiffusion

An abstract supertype of all density diffusion formulations.

Currently, the following formulations are available:

FormulationSuitable for Steady-State SimulationsLow Computational Cost
DensityDiffusionMolteniColagrossi
DensityDiffusionFerrari
DensityDiffusionAntuono

See Density Diffusion for a comparison and more details.

source
TrixiParticles.DensityDiffusionAntuonoType
DensityDiffusionAntuono(initial_condition; delta)

The commonly used density diffusion terms by Antuono (2010), also referred to as δ-SPH. The density diffusion term by Molteni (2009) is extended by a second term, which is nicely written down by Antuono (2012).

The term $\psi_{ab}$ in the continuity equation in DensityDiffusion is defined by

\[\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

\[\nabla\rho^L_a = -\sum_b (\rho_a - \rho_b) V_b L_a \nabla_{r_a} W(\Vert r_{ab} \Vert, h)\]

with

\[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 for an overview and comparison of implemented density diffusion terms.

source
TrixiParticles.DensityDiffusionFerrariType
DensityDiffusionFerrari()

A density diffusion term by Ferrari (2009).

The term $\psi_{ab}$ in the continuity equation in DensityDiffusion is defined by

\[\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 for an overview and comparison of implemented density diffusion terms.

source
TrixiParticles.DensityDiffusionMolteniColagrossiType
DensityDiffusionMolteniColagrossi(; delta)

The commonly used density diffusion term by Molteni (2009).

The term $\psi_{ab}$ in the continuity equation in DensityDiffusion is defined by

\[\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 for an overview and comparison of implemented density diffusion terms.

source

Corrections

TrixiParticles.AkinciFreeSurfaceCorrectionType
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

\[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.
source
TrixiParticles.BlendedGradientCorrectionType
BlendedGradientCorrection()

Calculate a blended gradient to reduce the stability issues of the GradientCorrection as explained by Bonet (1999).

This calculates the following,

\[\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.
source
TrixiParticles.GradientCorrectionType
GradientCorrection()

Compute the corrected gradient of particle interactions based on their relative positions (see Bonet, 1999).

Mathematical Details

Given the standard SPH representation, the gradient of a field $A$ at particle $a$ is given by

\[\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$:

\[\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

\[\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

\[\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 or WendlandC6Kernel.
  • Set dt_max =< 1e-3 for stability.
source
TrixiParticles.KernelCorrectionType
KernelCorrection()

Kernel correction, as explained by Bonet (1999), 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. (2008).

The kernel correction coefficient is determined by

\[c(x) = \sum_{b=1} V_b W_b(x)\]

The gradient of corrected kernel is determined by

\[\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 and ContinuityDensity, which leads to an improvement, especially at free surfaces.

Note
  • This only works when the boundary model uses SummationDensity (yet).
  • It is also referred to as "0th order correction".
  • In 2D, we can expect an increase of about 10–15% in computation time.
source
TrixiParticles.MixedKernelGradientCorrectionType
MixedKernelGradientCorrection()

Combines GradientCorrection and KernelCorrection, which results in a 1st-order-accurate SPH method (see Bonet, 1999).

Notes:

  • Stability issues, especially when particles separate into small clusters.
  • Doubles the computational effort.
source
TrixiParticles.ShepardKernelCorrectionType
ShepardKernelCorrection()

Kernel correction, as explained by Bonet (1999), uses Shepard interpolation to obtain a 0-th order accurate result, which was first proposed by Li et al. (1996).

The kernel correction coefficient is determined by

\[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 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.
source

Surface Tension

Akinci-based intra-particle force surface tension and wall adhesion model

The work by Akinci proposes three forces:

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:

The cohesion force, $F_{\text{cohesion}}$, for a pair of particles is given by:

\[F_{\text{cohesion}} = -\sigma m_b C(r) \frac{r}{\Vert r \Vert},\]

where:

The cohesion kernel $C$ is defined as

\[C(r)=\frac{32}{\pi h_c^9} +

DensityDiffusionAntuono adds a correction term to solve this problem, but this term is very expensive and adds about 40–50% of computational cost.

API

TrixiParticles.DensityDiffusionType
DensityDiffusion

An abstract supertype of all density diffusion formulations.

Currently, the following formulations are available:

FormulationSuitable for Steady-State SimulationsLow Computational Cost
DensityDiffusionMolteniColagrossi
DensityDiffusionFerrari
DensityDiffusionAntuono

See Density Diffusion for a comparison and more details.

source
TrixiParticles.DensityDiffusionAntuonoType
DensityDiffusionAntuono(initial_condition; delta)

The commonly used density diffusion terms by Antuono (2010), also referred to as δ-SPH. The density diffusion term by Molteni (2009) is extended by a second term, which is nicely written down by Antuono (2012).

The term $\psi_{ab}$ in the continuity equation in DensityDiffusion is defined by

\[\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

\[\nabla\rho^L_a = -\sum_b (\rho_a - \rho_b) V_b L_a \nabla_{r_a} W(\Vert r_{ab} \Vert, h)\]

with

\[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 for an overview and comparison of implemented density diffusion terms.

source
TrixiParticles.DensityDiffusionFerrariType
DensityDiffusionFerrari()

A density diffusion term by Ferrari (2009).

The term $\psi_{ab}$ in the continuity equation in DensityDiffusion is defined by

\[\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 for an overview and comparison of implemented density diffusion terms.

source
TrixiParticles.DensityDiffusionMolteniColagrossiType
DensityDiffusionMolteniColagrossi(; delta)

The commonly used density diffusion term by Molteni (2009).

The term $\psi_{ab}$ in the continuity equation in DensityDiffusion is defined by

\[\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 for an overview and comparison of implemented density diffusion terms.

source

Corrections

TrixiParticles.AkinciFreeSurfaceCorrectionType
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

\[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.
source
TrixiParticles.BlendedGradientCorrectionType
BlendedGradientCorrection()

Calculate a blended gradient to reduce the stability issues of the GradientCorrection as explained by Bonet (1999).

This calculates the following,

\[\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.
source
TrixiParticles.GradientCorrectionType
GradientCorrection()

Compute the corrected gradient of particle interactions based on their relative positions (see Bonet, 1999).

Mathematical Details

Given the standard SPH representation, the gradient of a field $A$ at particle $a$ is given by

\[\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$:

\[\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

\[\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

\[\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 or WendlandC6Kernel.
  • Set dt_max =< 1e-3 for stability.
source
TrixiParticles.KernelCorrectionType
KernelCorrection()

Kernel correction, as explained by Bonet (1999), 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. (2008).

The kernel correction coefficient is determined by

\[c(x) = \sum_{b=1} V_b W_b(x)\]

The gradient of corrected kernel is determined by

\[\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 and ContinuityDensity, which leads to an improvement, especially at free surfaces.

Note
  • This only works when the boundary model uses SummationDensity (yet).
  • It is also referred to as "0th order correction".
  • In 2D, we can expect an increase of about 10–15% in computation time.
source
TrixiParticles.MixedKernelGradientCorrectionType
MixedKernelGradientCorrection()

Combines GradientCorrection and KernelCorrection, which results in a 1st-order-accurate SPH method (see Bonet, 1999).

Notes:

  • Stability issues, especially when particles separate into small clusters.
  • Doubles the computational effort.
source
TrixiParticles.ShepardKernelCorrectionType
ShepardKernelCorrection()

Kernel correction, as explained by Bonet (1999), uses Shepard interpolation to obtain a 0-th order accurate result, which was first proposed by Li et al. (1996).

The kernel correction coefficient is determined by

\[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 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.
source

Surface Tension

Akinci-based intra-particle force surface tension and wall adhesion model

The work by Akinci proposes three forces:

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:

The cohesion force, $F_{\text{cohesion}}$, for a pair of particles is given by:

\[F_{\text{cohesion}} = -\sigma m_b C(r) \frac{r}{\Vert r \Vert},\]

where:

The cohesion kernel $C$ is defined as

\[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 \\ @@ -31,4 +31,4 @@ \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}\]

TrixiParticles.CohesionForceAkinciType
CohesionForceAkinci(surface_tension_coefficient=1.0)

This model only implements the cohesion force of the [25] 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.
source
TrixiParticles.SurfaceTensionAkinciType
SurfaceTensionAkinci(surface_tension_coefficient=1.0)

Implements a model for surface tension and adhesion effects drawing upon the principles outlined by [25]. 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.
source
+\end{cases}\]

TrixiParticles.CohesionForceAkinciType
CohesionForceAkinci(surface_tension_coefficient=1.0)

This model only implements the cohesion force of the [25] 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.
source
TrixiParticles.SurfaceTensionAkinciType
SurfaceTensionAkinci(surface_tension_coefficient=1.0)

Implements a model for surface tension and adhesion effects drawing upon the principles outlined by [25]. 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.
source
diff --git a/previews/PR514/time_integration/index.html b/previews/PR514/time_integration/index.html index 409b4fa80..875fac065 100644 --- a/previews/PR514/time_integration/index.html +++ b/previews/PR514/time_integration/index.html @@ -1,2 +1,2 @@ -Time Integration · TrixiParticles.jl
+Time Integration · TrixiParticles.jl
diff --git a/previews/PR514/tutorial/index.html b/previews/PR514/tutorial/index.html index e11e3452b..d6c9ab7b9 100644 --- a/previews/PR514/tutorial/index.html +++ b/previews/PR514/tutorial/index.html @@ -1,2 +1,2 @@ -Tutorial · TrixiParticles.jl
+Tutorial · TrixiParticles.jl
diff --git a/previews/PR514/tutorials/out/boundary_1_0.vtu b/previews/PR514/tutorials/out/boundary_1_0.vtu index 53dc9bac6..16fe82671 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_0.vtu and b/previews/PR514/tutorials/out/boundary_1_0.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_1.vtu b/previews/PR514/tutorials/out/boundary_1_1.vtu index 9c22300d2..300f96f6e 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_1.vtu and b/previews/PR514/tutorials/out/boundary_1_1.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_10.vtu b/previews/PR514/tutorials/out/boundary_1_10.vtu index 0129bd2f7..860adec39 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_10.vtu and b/previews/PR514/tutorials/out/boundary_1_10.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_11.vtu b/previews/PR514/tutorials/out/boundary_1_11.vtu index f1da3602a..eda2760fe 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_11.vtu and b/previews/PR514/tutorials/out/boundary_1_11.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_12.vtu b/previews/PR514/tutorials/out/boundary_1_12.vtu index 4b8b16497..a0a79604a 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_12.vtu and b/previews/PR514/tutorials/out/boundary_1_12.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_13.vtu b/previews/PR514/tutorials/out/boundary_1_13.vtu index e88d99049..d336ba1d2 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_13.vtu and b/previews/PR514/tutorials/out/boundary_1_13.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_14.vtu b/previews/PR514/tutorials/out/boundary_1_14.vtu index f8f0311c9..7e4ebf9bf 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_14.vtu and b/previews/PR514/tutorials/out/boundary_1_14.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_15.vtu b/previews/PR514/tutorials/out/boundary_1_15.vtu index 6ea793fdd..f07a28d78 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_15.vtu and b/previews/PR514/tutorials/out/boundary_1_15.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_16.vtu b/previews/PR514/tutorials/out/boundary_1_16.vtu index 3f829a87c..72d18ccd3 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_16.vtu and b/previews/PR514/tutorials/out/boundary_1_16.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_17.vtu b/previews/PR514/tutorials/out/boundary_1_17.vtu index 5adcd8f80..3c071095e 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_17.vtu and b/previews/PR514/tutorials/out/boundary_1_17.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_18.vtu b/previews/PR514/tutorials/out/boundary_1_18.vtu index 68428ffad..dd3805a47 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_18.vtu and b/previews/PR514/tutorials/out/boundary_1_18.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_19.vtu b/previews/PR514/tutorials/out/boundary_1_19.vtu index 5b51e9673..0844dc7fe 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_19.vtu and b/previews/PR514/tutorials/out/boundary_1_19.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_2.vtu b/previews/PR514/tutorials/out/boundary_1_2.vtu index 35705abfc..2ea7b0c0c 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_2.vtu and b/previews/PR514/tutorials/out/boundary_1_2.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_20.vtu b/previews/PR514/tutorials/out/boundary_1_20.vtu index 02a6dbe19..9a5dc8a70 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_20.vtu and b/previews/PR514/tutorials/out/boundary_1_20.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_21.vtu b/previews/PR514/tutorials/out/boundary_1_21.vtu index 263fdc5f7..cf7c2fb2b 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_21.vtu and b/previews/PR514/tutorials/out/boundary_1_21.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_22.vtu b/previews/PR514/tutorials/out/boundary_1_22.vtu index 56eb54bf5..af512b34e 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_22.vtu and b/previews/PR514/tutorials/out/boundary_1_22.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_23.vtu b/previews/PR514/tutorials/out/boundary_1_23.vtu index 0bef8a2c6..f16ddc11e 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_23.vtu and b/previews/PR514/tutorials/out/boundary_1_23.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_24.vtu b/previews/PR514/tutorials/out/boundary_1_24.vtu index b18c7a493..daa97ab93 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_24.vtu and b/previews/PR514/tutorials/out/boundary_1_24.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_25.vtu b/previews/PR514/tutorials/out/boundary_1_25.vtu index ce9cc6fb2..c2f8f4e0c 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_25.vtu and b/previews/PR514/tutorials/out/boundary_1_25.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_26.vtu b/previews/PR514/tutorials/out/boundary_1_26.vtu index 9dec000ef..a98b641e9 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_26.vtu and b/previews/PR514/tutorials/out/boundary_1_26.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_27.vtu b/previews/PR514/tutorials/out/boundary_1_27.vtu index c10f20d27..04aa6d442 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_27.vtu and b/previews/PR514/tutorials/out/boundary_1_27.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_28.vtu b/previews/PR514/tutorials/out/boundary_1_28.vtu index 7e975ab56..5b1e2da93 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_28.vtu and b/previews/PR514/tutorials/out/boundary_1_28.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_29.vtu b/previews/PR514/tutorials/out/boundary_1_29.vtu index dac08d209..3c7f545b0 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_29.vtu and b/previews/PR514/tutorials/out/boundary_1_29.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_3.vtu b/previews/PR514/tutorials/out/boundary_1_3.vtu index d42fb04f0..8c34dd06b 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_3.vtu and b/previews/PR514/tutorials/out/boundary_1_3.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_30.vtu b/previews/PR514/tutorials/out/boundary_1_30.vtu index 1a99ee4b1..1f0a40b83 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_30.vtu and b/previews/PR514/tutorials/out/boundary_1_30.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_31.vtu b/previews/PR514/tutorials/out/boundary_1_31.vtu index 8bde1c544..dfdc30338 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_31.vtu and b/previews/PR514/tutorials/out/boundary_1_31.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_32.vtu b/previews/PR514/tutorials/out/boundary_1_32.vtu index 791d016b7..9e00be2b6 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_32.vtu and b/previews/PR514/tutorials/out/boundary_1_32.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_33.vtu b/previews/PR514/tutorials/out/boundary_1_33.vtu index 94917ef29..85526eae1 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_33.vtu and b/previews/PR514/tutorials/out/boundary_1_33.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_34.vtu b/previews/PR514/tutorials/out/boundary_1_34.vtu index 46e13ce0a..661e01072 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_34.vtu and b/previews/PR514/tutorials/out/boundary_1_34.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_35.vtu b/previews/PR514/tutorials/out/boundary_1_35.vtu index f18a5eff8..0f924dc69 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_35.vtu and b/previews/PR514/tutorials/out/boundary_1_35.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_36.vtu b/previews/PR514/tutorials/out/boundary_1_36.vtu index f3e2a2eb7..49901d2ac 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_36.vtu and b/previews/PR514/tutorials/out/boundary_1_36.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_37.vtu b/previews/PR514/tutorials/out/boundary_1_37.vtu index bebac4117..9817c2ff8 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_37.vtu and b/previews/PR514/tutorials/out/boundary_1_37.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_38.vtu b/previews/PR514/tutorials/out/boundary_1_38.vtu index 729bbcd28..50fbd6003 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_38.vtu and b/previews/PR514/tutorials/out/boundary_1_38.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_39.vtu b/previews/PR514/tutorials/out/boundary_1_39.vtu index 40b7d46cb..2e5264788 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_39.vtu and b/previews/PR514/tutorials/out/boundary_1_39.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_4.vtu b/previews/PR514/tutorials/out/boundary_1_4.vtu index bd61b7444..c105ac6df 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_4.vtu and b/previews/PR514/tutorials/out/boundary_1_4.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_40.vtu b/previews/PR514/tutorials/out/boundary_1_40.vtu index 33add68dc..946ac2021 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_40.vtu and b/previews/PR514/tutorials/out/boundary_1_40.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_41.vtu b/previews/PR514/tutorials/out/boundary_1_41.vtu index d92e567b0..458e2437b 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_41.vtu and b/previews/PR514/tutorials/out/boundary_1_41.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_42.vtu b/previews/PR514/tutorials/out/boundary_1_42.vtu index 224b681c0..4f465050a 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_42.vtu and b/previews/PR514/tutorials/out/boundary_1_42.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_43.vtu b/previews/PR514/tutorials/out/boundary_1_43.vtu index 7550c41e9..4da1732c3 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_43.vtu and b/previews/PR514/tutorials/out/boundary_1_43.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_44.vtu b/previews/PR514/tutorials/out/boundary_1_44.vtu index 7ebc835f4..420e5ef79 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_44.vtu and b/previews/PR514/tutorials/out/boundary_1_44.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_45.vtu b/previews/PR514/tutorials/out/boundary_1_45.vtu index d209460c4..01931ff48 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_45.vtu and b/previews/PR514/tutorials/out/boundary_1_45.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_46.vtu b/previews/PR514/tutorials/out/boundary_1_46.vtu index 8c2da27a3..8e4197790 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_46.vtu and b/previews/PR514/tutorials/out/boundary_1_46.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_47.vtu b/previews/PR514/tutorials/out/boundary_1_47.vtu index 203923f90..7dee0be40 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_47.vtu and b/previews/PR514/tutorials/out/boundary_1_47.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_48.vtu b/previews/PR514/tutorials/out/boundary_1_48.vtu index 7a0fcd718..5c13a5d61 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_48.vtu and b/previews/PR514/tutorials/out/boundary_1_48.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_49.vtu b/previews/PR514/tutorials/out/boundary_1_49.vtu index 48b358c64..0234ee793 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_49.vtu and b/previews/PR514/tutorials/out/boundary_1_49.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_5.vtu b/previews/PR514/tutorials/out/boundary_1_5.vtu index a4b9be1c8..a326fe2f7 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_5.vtu and b/previews/PR514/tutorials/out/boundary_1_5.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_50.vtu b/previews/PR514/tutorials/out/boundary_1_50.vtu index 125961ea7..d8049d873 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_50.vtu and b/previews/PR514/tutorials/out/boundary_1_50.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_6.vtu b/previews/PR514/tutorials/out/boundary_1_6.vtu index fab42e5f9..f2ac73916 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_6.vtu and b/previews/PR514/tutorials/out/boundary_1_6.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_7.vtu b/previews/PR514/tutorials/out/boundary_1_7.vtu index f7e1affa9..a1c726352 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_7.vtu and b/previews/PR514/tutorials/out/boundary_1_7.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_8.vtu b/previews/PR514/tutorials/out/boundary_1_8.vtu index fd3f68e65..6f3eac840 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_8.vtu and b/previews/PR514/tutorials/out/boundary_1_8.vtu differ diff --git a/previews/PR514/tutorials/out/boundary_1_9.vtu b/previews/PR514/tutorials/out/boundary_1_9.vtu index 710042da8..f1a71f182 100644 Binary files a/previews/PR514/tutorials/out/boundary_1_9.vtu and b/previews/PR514/tutorials/out/boundary_1_9.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_0.vtu b/previews/PR514/tutorials/out/fluid_1_0.vtu index d062a2d35..7b0e4b764 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_0.vtu and b/previews/PR514/tutorials/out/fluid_1_0.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_1.vtu b/previews/PR514/tutorials/out/fluid_1_1.vtu index c6a75dc97..9b3aad2bd 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_1.vtu and b/previews/PR514/tutorials/out/fluid_1_1.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_10.vtu b/previews/PR514/tutorials/out/fluid_1_10.vtu index 3159e9303..ae373672a 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_10.vtu and b/previews/PR514/tutorials/out/fluid_1_10.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_11.vtu b/previews/PR514/tutorials/out/fluid_1_11.vtu index 0a20dfc06..d94bb679f 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_11.vtu and b/previews/PR514/tutorials/out/fluid_1_11.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_12.vtu b/previews/PR514/tutorials/out/fluid_1_12.vtu index 603ac7bf4..14440dc84 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_12.vtu and b/previews/PR514/tutorials/out/fluid_1_12.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_13.vtu b/previews/PR514/tutorials/out/fluid_1_13.vtu index 8e19f706e..31d6bd546 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_13.vtu and b/previews/PR514/tutorials/out/fluid_1_13.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_14.vtu b/previews/PR514/tutorials/out/fluid_1_14.vtu index 11c0bd104..f697c389a 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_14.vtu and b/previews/PR514/tutorials/out/fluid_1_14.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_15.vtu b/previews/PR514/tutorials/out/fluid_1_15.vtu index b847da25f..28c80bc3b 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_15.vtu and b/previews/PR514/tutorials/out/fluid_1_15.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_16.vtu b/previews/PR514/tutorials/out/fluid_1_16.vtu index 3de714d4c..110b320d1 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_16.vtu and b/previews/PR514/tutorials/out/fluid_1_16.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_17.vtu b/previews/PR514/tutorials/out/fluid_1_17.vtu index a02d7bc5c..81ed18b74 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_17.vtu and b/previews/PR514/tutorials/out/fluid_1_17.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_18.vtu b/previews/PR514/tutorials/out/fluid_1_18.vtu index 21f13caff..0a3094a3e 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_18.vtu and b/previews/PR514/tutorials/out/fluid_1_18.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_19.vtu b/previews/PR514/tutorials/out/fluid_1_19.vtu index 0d153c986..e7fb4fddc 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_19.vtu and b/previews/PR514/tutorials/out/fluid_1_19.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_2.vtu b/previews/PR514/tutorials/out/fluid_1_2.vtu index f54862a2d..9759623f8 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_2.vtu and b/previews/PR514/tutorials/out/fluid_1_2.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_20.vtu b/previews/PR514/tutorials/out/fluid_1_20.vtu index 3ecf6bc77..312ca5630 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_20.vtu and b/previews/PR514/tutorials/out/fluid_1_20.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_21.vtu b/previews/PR514/tutorials/out/fluid_1_21.vtu index 25c0d6816..d6ee58125 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_21.vtu and b/previews/PR514/tutorials/out/fluid_1_21.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_22.vtu b/previews/PR514/tutorials/out/fluid_1_22.vtu index f90151dc4..7e39fb902 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_22.vtu and b/previews/PR514/tutorials/out/fluid_1_22.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_23.vtu b/previews/PR514/tutorials/out/fluid_1_23.vtu index c8c8a5313..ebdf0d5bc 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_23.vtu and b/previews/PR514/tutorials/out/fluid_1_23.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_24.vtu b/previews/PR514/tutorials/out/fluid_1_24.vtu index 490b8dc91..a2502b088 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_24.vtu and b/previews/PR514/tutorials/out/fluid_1_24.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_25.vtu b/previews/PR514/tutorials/out/fluid_1_25.vtu index 807e04664..883a20472 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_25.vtu and b/previews/PR514/tutorials/out/fluid_1_25.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_26.vtu b/previews/PR514/tutorials/out/fluid_1_26.vtu index 9eb5f4596..472390ef6 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_26.vtu and b/previews/PR514/tutorials/out/fluid_1_26.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_27.vtu b/previews/PR514/tutorials/out/fluid_1_27.vtu index 2b4964d12..5e1b51253 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_27.vtu and b/previews/PR514/tutorials/out/fluid_1_27.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_28.vtu b/previews/PR514/tutorials/out/fluid_1_28.vtu index 5078abace..989be7b34 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_28.vtu and b/previews/PR514/tutorials/out/fluid_1_28.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_29.vtu b/previews/PR514/tutorials/out/fluid_1_29.vtu index a66cfadc2..cafed4ac3 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_29.vtu and b/previews/PR514/tutorials/out/fluid_1_29.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_3.vtu b/previews/PR514/tutorials/out/fluid_1_3.vtu index 277449d22..2a1270db7 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_3.vtu and b/previews/PR514/tutorials/out/fluid_1_3.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_30.vtu b/previews/PR514/tutorials/out/fluid_1_30.vtu index b93e3cb76..a5a34a933 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_30.vtu and b/previews/PR514/tutorials/out/fluid_1_30.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_31.vtu b/previews/PR514/tutorials/out/fluid_1_31.vtu index 912b7b73a..f7e015fb9 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_31.vtu and b/previews/PR514/tutorials/out/fluid_1_31.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_32.vtu b/previews/PR514/tutorials/out/fluid_1_32.vtu index 520f7c039..7096e1ef7 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_32.vtu and b/previews/PR514/tutorials/out/fluid_1_32.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_33.vtu b/previews/PR514/tutorials/out/fluid_1_33.vtu index 63d321a43..ebe9f870e 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_33.vtu and b/previews/PR514/tutorials/out/fluid_1_33.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_34.vtu b/previews/PR514/tutorials/out/fluid_1_34.vtu index 0a311a157..568147a66 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_34.vtu and b/previews/PR514/tutorials/out/fluid_1_34.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_35.vtu b/previews/PR514/tutorials/out/fluid_1_35.vtu index 353473b56..820ba4d6f 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_35.vtu and b/previews/PR514/tutorials/out/fluid_1_35.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_36.vtu b/previews/PR514/tutorials/out/fluid_1_36.vtu index f68da34ed..d75ed51c4 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_36.vtu and b/previews/PR514/tutorials/out/fluid_1_36.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_37.vtu b/previews/PR514/tutorials/out/fluid_1_37.vtu index 18e24255c..57153b42d 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_37.vtu and b/previews/PR514/tutorials/out/fluid_1_37.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_38.vtu b/previews/PR514/tutorials/out/fluid_1_38.vtu index eb8911fd0..046e0c154 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_38.vtu and b/previews/PR514/tutorials/out/fluid_1_38.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_39.vtu b/previews/PR514/tutorials/out/fluid_1_39.vtu index 94f543aec..73d2e6de4 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_39.vtu and b/previews/PR514/tutorials/out/fluid_1_39.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_4.vtu b/previews/PR514/tutorials/out/fluid_1_4.vtu index 7065bc52f..27f97ae99 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_4.vtu and b/previews/PR514/tutorials/out/fluid_1_4.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_40.vtu b/previews/PR514/tutorials/out/fluid_1_40.vtu index 50d9b32ef..b01a4ad02 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_40.vtu and b/previews/PR514/tutorials/out/fluid_1_40.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_41.vtu b/previews/PR514/tutorials/out/fluid_1_41.vtu index 34cd05adc..5e325499e 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_41.vtu and b/previews/PR514/tutorials/out/fluid_1_41.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_42.vtu b/previews/PR514/tutorials/out/fluid_1_42.vtu index 43c968e42..2680e0cec 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_42.vtu and b/previews/PR514/tutorials/out/fluid_1_42.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_43.vtu b/previews/PR514/tutorials/out/fluid_1_43.vtu index c07ff8e6e..9311367f0 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_43.vtu and b/previews/PR514/tutorials/out/fluid_1_43.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_44.vtu b/previews/PR514/tutorials/out/fluid_1_44.vtu index 7b7565b3f..e7985bc6f 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_44.vtu and b/previews/PR514/tutorials/out/fluid_1_44.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_45.vtu b/previews/PR514/tutorials/out/fluid_1_45.vtu index c54ff3561..fb2312c07 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_45.vtu and b/previews/PR514/tutorials/out/fluid_1_45.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_46.vtu b/previews/PR514/tutorials/out/fluid_1_46.vtu index e4035fbe2..a6f0c50f2 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_46.vtu and b/previews/PR514/tutorials/out/fluid_1_46.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_47.vtu b/previews/PR514/tutorials/out/fluid_1_47.vtu index d28975ba0..e0833159f 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_47.vtu and b/previews/PR514/tutorials/out/fluid_1_47.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_48.vtu b/previews/PR514/tutorials/out/fluid_1_48.vtu index b8c6744b7..bb5017b21 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_48.vtu and b/previews/PR514/tutorials/out/fluid_1_48.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_49.vtu b/previews/PR514/tutorials/out/fluid_1_49.vtu index c0e2d7333..49ff390ec 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_49.vtu and b/previews/PR514/tutorials/out/fluid_1_49.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_5.vtu b/previews/PR514/tutorials/out/fluid_1_5.vtu index 1ac1c5192..b71eba108 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_5.vtu and b/previews/PR514/tutorials/out/fluid_1_5.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_50.vtu b/previews/PR514/tutorials/out/fluid_1_50.vtu index 3f0a54f80..4c86db2dc 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_50.vtu and b/previews/PR514/tutorials/out/fluid_1_50.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_6.vtu b/previews/PR514/tutorials/out/fluid_1_6.vtu index cebeb0ae4..04b6f3214 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_6.vtu and b/previews/PR514/tutorials/out/fluid_1_6.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_7.vtu b/previews/PR514/tutorials/out/fluid_1_7.vtu index 7cba00a20..6bd093e77 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_7.vtu and b/previews/PR514/tutorials/out/fluid_1_7.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_8.vtu b/previews/PR514/tutorials/out/fluid_1_8.vtu index 5f54de6f4..a04c870d4 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_8.vtu and b/previews/PR514/tutorials/out/fluid_1_8.vtu differ diff --git a/previews/PR514/tutorials/out/fluid_1_9.vtu b/previews/PR514/tutorials/out/fluid_1_9.vtu index 4253c9d5d..51532741c 100644 Binary files a/previews/PR514/tutorials/out/fluid_1_9.vtu and b/previews/PR514/tutorials/out/fluid_1_9.vtu differ diff --git a/previews/PR514/tutorials/tut_beam/index.html b/previews/PR514/tutorials/tut_beam/index.html index e160965e2..8c8deb917 100644 --- a/previews/PR514/tutorials/tut_beam/index.html +++ b/previews/PR514/tutorials/tut_beam/index.html @@ -84,4 +84,4 @@ # Use a Runge-Kutta method with automatic (error based) time step size control sol = solve(ode, RDPK3SpFSAL49(), save_everystep=false, callback=callbacks); - + diff --git a/previews/PR514/tutorials/tut_dam_break/index.html b/previews/PR514/tutorials/tut_dam_break/index.html index 7859d7887..4e161c351 100644 --- a/previews/PR514/tutorials/tut_dam_break/index.html +++ b/previews/PR514/tutorials/tut_dam_break/index.html @@ -111,4 +111,4 @@ dt=1.0, # This is overwritten by the stepsize callback save_everystep=false, callback=callbacks); - + diff --git a/previews/PR514/tutorials/tut_falling/index.html b/previews/PR514/tutorials/tut_falling/index.html index b8e7f1e59..5057e3d1d 100644 --- a/previews/PR514/tutorials/tut_falling/index.html +++ b/previews/PR514/tutorials/tut_falling/index.html @@ -129,4 +129,4 @@ reltol=1e-3, # Default reltol is 1e-3 save_everystep=false, callback=callbacks); - + diff --git a/previews/PR514/tutorials/tut_setup/index.html b/previews/PR514/tutorials/tut_setup/index.html index 8b03e1bb1..9e7ef7d40 100644 --- a/previews/PR514/tutorials/tut_setup/index.html +++ b/previews/PR514/tutorials/tut_setup/index.html @@ -95,13 +95,13 @@ │ #threads: ……………………………………………………… 1 │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘ -#timesteps: 50 │ Δt: 2.5053e-03 │ sim. time: 1.2546e-01 (12.546%) │ run time: 2.8088e+00 s -#timesteps: 100 │ Δt: 3.8392e-03 │ sim. time: 2.8384e-01 (28.384%) │ run time: 3.2049e+00 s -#timesteps: 150 │ Δt: 1.5738e-03 │ sim. time: 4.0157e-01 (40.157%) │ run time: 3.5667e+00 s -#timesteps: 200 │ Δt: 4.4805e-04 │ sim. time: 5.2067e-01 (52.067%) │ run time: 3.9337e+00 s -#timesteps: 250 │ Δt: 6.3596e-04 │ sim. time: 6.4000e-01 (64.000%) │ run time: 4.2896e+00 s -#timesteps: 300 │ Δt: 3.0892e-03 │ sim. time: 7.7483e-01 (77.483%) │ run time: 4.6723e+00 s -#timesteps: 350 │ Δt: 3.0438e-03 │ sim. time: 8.9218e-01 (89.218%) │ run time: 5.0503e+00 s +#timesteps: 50 │ Δt: 2.5053e-03 │ sim. time: 1.2546e-01 (12.546%) │ run time: 2.9070e+00 s +#timesteps: 100 │ Δt: 3.8392e-03 │ sim. time: 2.8384e-01 (28.384%) │ run time: 3.3189e+00 s +#timesteps: 150 │ Δt: 1.5738e-03 │ sim. time: 4.0157e-01 (40.157%) │ run time: 3.6847e+00 s +#timesteps: 200 │ Δt: 4.4805e-04 │ sim. time: 5.2067e-01 (52.067%) │ run time: 4.0556e+00 s +#timesteps: 250 │ Δt: 6.3596e-04 │ sim. time: 6.4000e-01 (64.000%) │ run time: 4.4617e+00 s +#timesteps: 300 │ Δt: 3.0892e-03 │ sim. time: 7.7483e-01 (77.483%) │ run time: 4.8454e+00 s +#timesteps: 350 │ Δt: 3.0438e-03 │ sim. time: 8.9218e-01 (89.218%) │ run time: 5.6003e+00 s ──────────────────────────────────────────────────────────────────────────────────────────────────── Trixi simulation finished. Final time: 1.0 Time steps: 394 (accepted), 400 (total) ──────────────────────────────────────────────────────────────────────────────────────────────────── @@ -109,43 +109,43 @@ ──────────────────────────────────────────────────────────────────────────────── TrixiParticles.jl Time Allocations ─────────────────────── ──────────────────────── - Tot / % measured: 5.38s / 58.8% 250MiB / 58.2% + Tot / % measured: 5.94s / 61.0% 250MiB / 58.2% Section ncalls time %tot avg alloc %tot avg ──────────────────────────────────────────────────────────────────────────────── -kick! 2.00k 2.45s 77.6% 1.22ms 17.2MiB 11.8% 8.81KiB - system interaction 2.00k 2.02s 63.9% 1.01ms 1.88MiB 1.3% 985B - fluid1-fluid1 2.00k 1.68s 53.1% 838μs 0.00B 0.0% 0.00B - fluid1-boundary2 2.00k 333ms 10.5% 166μs 0.00B 0.0% 0.00B - ~system intera... 2.00k 6.70ms 0.2% 3.34μs 1.88MiB 1.3% 985B - boundary2-boun... 2.00k 58.6μs 0.0% 29.3ns 0.00B 0.0% 0.00B - boundary2-fluid1 2.00k 58.6μs 0.0% 29.3ns 0.00B 0.0% 0.00B - update systems a... 2.00k 431ms 13.6% 215μs 15.3MiB 10.5% 7.84KiB - compute bounda... 2.00k 282ms 8.9% 141μs 0.00B 0.0% 0.00B - update nhs 2.00k 93.1ms 2.9% 46.5μs 15.3MiB 10.5% 7.84KiB - inverse state ... 2.00k 28.4ms 0.9% 14.2μs 0.00B 0.0% 0.00B - ~update system... 2.00k 27.1ms 0.9% 13.5μs 1.55KiB 0.0% 0.79B - update density... 2.00k 58.5μs 0.0% 29.2ns 0.00B 0.0% 0.00B - source terms 2.00k 1.76ms 0.1% 876ns 0.00B 0.0% 0.00B - reset ∂v/∂t 2.00k 872μs 0.0% 435ns 0.00B 0.0% 0.00B - ~kick!~ 2.00k 786μs 0.0% 392ns 1.55KiB 0.0% 0.79B -save solution 50 704ms 22.3% 14.1ms 128MiB 88.2% 2.57MiB - write to vtk 100 493ms 15.6% 4.93ms 116MiB 79.6% 1.16MiB - ~save solution~ 50 201ms 6.3% 4.01ms 12.1MiB 8.3% 247KiB - update systems 50 10.4ms 0.3% 208μs 384KiB 0.3% 7.68KiB - compute bounda... 50 6.94ms 0.2% 139μs 0.00B 0.0% 0.00B - update nhs 50 2.09ms 0.1% 41.8μs 382KiB 0.3% 7.64KiB - inverse state ... 50 702μs 0.0% 14.0μs 0.00B 0.0% 0.00B - ~update systems~ 50 683μs 0.0% 13.7μs 1.55KiB 0.0% 31.7B - update density... 50 1.52μs 0.0% 30.5ns 0.00B 0.0% 0.00B -drift! 2.00k 3.85ms 0.1% 1.92μs 976B 0.0% 0.49B - velocity 2.00k 2.62ms 0.1% 1.31μs 0.00B 0.0% 0.00B - reset ∂u/∂t 2.00k 799μs 0.0% 399ns 0.00B 0.0% 0.00B - ~drift!~ 2.00k 432μs 0.0% 215ns 976B 0.0% 0.49B -compute boundary p... 1 136μs 0.0% 136μs 0.00B 0.0% 0.00B -update nhs 1 130μs 0.0% 130μs 7.38KiB 0.0% 7.38KiB -inverse state equa... 1 14.8μs 0.0% 14.8μs 0.00B 0.0% 0.00B -update density dif... 1 30.0ns 0.0% 30.0ns 0.00B 0.0% 0.00B +kick! 2.00k 2.47s 68.4% 1.24ms 17.2MiB 11.8% 8.81KiB + system interaction 2.00k 2.03s 56.1% 1.01ms 1.88MiB 1.3% 985B + fluid1-fluid1 2.00k 1.69s 46.7% 845μs 0.00B 0.0% 0.00B + fluid1-boundary2 2.00k 331ms 9.1% 165μs 0.00B 0.0% 0.00B + ~system intera... 2.00k 6.87ms 0.2% 3.43μs 1.88MiB 1.3% 985B + boundary2-fluid1 2.00k 66.3μs 0.0% 33.1ns 0.00B 0.0% 0.00B + boundary2-boun... 2.00k 60.4μs 0.0% 30.1ns 0.00B 0.0% 0.00B + update systems a... 2.00k 441ms 12.2% 220μs 15.3MiB 10.5% 7.84KiB + compute bounda... 2.00k 286ms 7.9% 143μs 0.00B 0.0% 0.00B + update nhs 2.00k 99.4ms 2.7% 49.6μs 15.3MiB 10.5% 7.84KiB + inverse state ... 2.00k 28.4ms 0.8% 14.2μs 0.00B 0.0% 0.00B + ~update system... 2.00k 27.8ms 0.8% 13.9μs 1.55KiB 0.0% 0.79B + update density... 2.00k 58.4μs 0.0% 29.2ns 0.00B 0.0% 0.00B + source terms 2.00k 1.79ms 0.0% 891ns 0.00B 0.0% 0.00B + ~kick!~ 2.00k 844μs 0.0% 421ns 1.55KiB 0.0% 0.79B + reset ∂v/∂t 2.00k 779μs 0.0% 389ns 0.00B 0.0% 0.00B +save solution 50 1.14s 31.5% 22.8ms 128MiB 88.2% 2.57MiB + write to vtk 100 908ms 25.1% 9.08ms 116MiB 79.6% 1.16MiB + ~save solution~ 50 222ms 6.1% 4.44ms 12.1MiB 8.3% 247KiB + update systems 50 10.8ms 0.3% 217μs 384KiB 0.3% 7.68KiB + compute bounda... 50 7.14ms 0.2% 143μs 0.00B 0.0% 0.00B + update nhs 50 2.23ms 0.1% 44.6μs 382KiB 0.3% 7.64KiB + ~update systems~ 50 751μs 0.0% 15.0μs 1.55KiB 0.0% 31.7B + inverse state ... 50 711μs 0.0% 14.2μs 0.00B 0.0% 0.00B + update density... 50 3.70μs 0.0% 73.9ns 0.00B 0.0% 0.00B +drift! 2.00k 3.53ms 0.1% 1.76μs 976B 0.0% 0.49B + velocity 2.00k 2.30ms 0.1% 1.15μs 0.00B 0.0% 0.00B + reset ∂u/∂t 2.00k 805μs 0.0% 402ns 0.00B 0.0% 0.00B + ~drift!~ 2.00k 419μs 0.0% 209ns 976B 0.0% 0.49B +compute boundary p... 1 173μs 0.0% 173μs 0.00B 0.0% 0.00B +update nhs 1 144μs 0.0% 144μs 7.38KiB 0.0% 7.38KiB +inverse state equa... 1 15.4μs 0.0% 15.4μs 0.00B 0.0% 0.00B +update density dif... 1 40.0ns 0.0% 40.0ns 0.00B 0.0% 0.00B ────────────────────────────────────────────────────────────────────────────────

See Visualization for how to visualize the final solution. For the simplest visualization, we can use Plots.jl:

using Plots
 plot(sol)

plot

Replacing components with custom implementations

If we would like to use an implementation of a component that is not available in TrixiParticles.jl, we can implement it ourselves within the simulation file, without ever cloning the TrixiParticles.jl repository. A good starting point is to check out the available implementations in TrixiParticles.jl, then copy the relevant functions to the simulation file and modify them as needed.

Custom smoothing kernel

To implement a custom smoothing kernel, we define a struct extending TrixiParticles.SmoothingKernel. This abstract struct has a type parameter for the number of dimensions, which we set to 2 in this case.

struct MyGaussianKernel <: TrixiParticles.SmoothingKernel{2} end

This kernel is going to be an implementation of the Gaussian kernel with a cutoff for compact support, which reads

\[W(r, h) = \begin{cases} @@ -248,78 +248,78 @@ │ #threads: ……………………………………………………… 1 │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘ -#timesteps: 50 │ Δt: 6.1910e-06 │ sim. time: 5.9170e-02 (5.917%) │ run time: 2.5569e+00 s -#timesteps: 100 │ Δt: 1.4707e-03 │ sim. time: 7.2515e-02 (7.252%) │ run time: 2.6250e+00 s -#timesteps: 150 │ Δt: 4.0904e-09 │ sim. time: 9.9948e-02 (9.995%) │ run time: 2.7156e+00 s -#timesteps: 200 │ Δt: 2.3603e-04 │ sim. time: 1.2341e-01 (12.341%) │ run time: 2.7825e+00 s -#timesteps: 250 │ Δt: 8.2561e-10 │ sim. time: 1.5356e-01 (15.356%) │ run time: 2.8701e+00 s -#timesteps: 300 │ Δt: 4.3083e-04 │ sim. time: 1.6893e-01 (16.893%) │ run time: 2.9376e+00 s -#timesteps: 350 │ Δt: 6.0293e-05 │ sim. time: 1.9254e-01 (19.254%) │ run time: 3.0157e+00 s -#timesteps: 400 │ Δt: 9.7599e-05 │ sim. time: 2.1603e-01 (21.603%) │ run time: 3.0879e+00 s -#timesteps: 450 │ Δt: 6.9181e-04 │ sim. time: 2.4069e-01 (24.069%) │ run time: 3.1931e+00 s -#timesteps: 500 │ Δt: 1.7270e-04 │ sim. time: 2.6780e-01 (26.780%) │ run time: 3.2576e+00 s -#timesteps: 550 │ Δt: 5.9986e-05 │ sim. time: 2.7738e-01 (27.738%) │ run time: 3.3213e+00 s -#timesteps: 600 │ Δt: 1.8625e-10 │ sim. time: 2.8051e-01 (28.051%) │ run time: 3.4255e+00 s -#timesteps: 650 │ Δt: 4.1411e-04 │ sim. time: 2.8914e-01 (28.914%) │ run time: 3.4748e+00 s -#timesteps: 700 │ Δt: 2.7909e-04 │ sim. time: 3.0439e-01 (30.439%) │ run time: 3.5314e+00 s -#timesteps: 750 │ Δt: 4.8999e-04 │ sim. time: 3.2484e-01 (32.484%) │ run time: 3.5844e+00 s -#timesteps: 800 │ Δt: 3.2316e-04 │ sim. time: 3.4093e-01 (34.093%) │ run time: 3.6405e+00 s -#timesteps: 850 │ Δt: 3.6381e-04 │ sim. time: 3.5488e-01 (35.488%) │ run time: 3.6908e+00 s -#timesteps: 900 │ Δt: 1.3935e-04 │ sim. time: 3.6928e-01 (36.928%) │ run time: 3.7484e+00 s -#timesteps: 950 │ Δt: 2.9122e-04 │ sim. time: 3.8265e-01 (38.265%) │ run time: 3.8116e+00 s -#timesteps: 1000 │ Δt: 3.9265e-04 │ sim. time: 4.0287e-01 (40.287%) │ run time: 3.8595e+00 s -#timesteps: 1050 │ Δt: 3.0121e-04 │ sim. time: 4.1765e-01 (41.765%) │ run time: 3.9264e+00 s -#timesteps: 1100 │ Δt: 3.6827e-04 │ sim. time: 4.3071e-01 (43.071%) │ run time: 3.9835e+00 s -#timesteps: 1150 │ Δt: 5.0946e-04 │ sim. time: 4.4505e-01 (44.505%) │ run time: 4.0402e+00 s -#timesteps: 1200 │ Δt: 2.8520e-04 │ sim. time: 4.6113e-01 (46.113%) │ run time: 4.0944e+00 s -#timesteps: 1250 │ Δt: 3.5300e-04 │ sim. time: 4.7955e-01 (47.955%) │ run time: 4.1428e+00 s -#timesteps: 1300 │ Δt: 3.5639e-04 │ sim. time: 4.9061e-01 (49.061%) │ run time: 4.2046e+00 s -#timesteps: 1350 │ Δt: 3.1861e-04 │ sim. time: 5.0449e-01 (50.449%) │ run time: 4.2576e+00 s -#timesteps: 1400 │ Δt: 3.4023e-04 │ sim. time: 5.1706e-01 (51.706%) │ run time: 4.3115e+00 s -#timesteps: 1450 │ Δt: 3.5477e-04 │ sim. time: 5.3042e-01 (53.042%) │ run time: 4.3732e+00 s -#timesteps: 1500 │ Δt: 3.5992e-04 │ sim. time: 5.4408e-01 (54.408%) │ run time: 4.4295e+00 s -#timesteps: 1550 │ Δt: 3.5594e-04 │ sim. time: 5.5812e-01 (55.812%) │ run time: 4.4839e+00 s -#timesteps: 1600 │ Δt: 1.4553e-04 │ sim. time: 5.7286e-01 (57.286%) │ run time: 4.5461e+00 s -#timesteps: 1650 │ Δt: 3.2888e-04 │ sim. time: 5.8380e-01 (58.380%) │ run time: 4.6042e+00 s -#timesteps: 1700 │ Δt: 2.9151e-04 │ sim. time: 5.9640e-01 (59.640%) │ run time: 4.6530e+00 s -#timesteps: 1750 │ Δt: 7.8861e-05 │ sim. time: 6.0694e-01 (60.694%) │ run time: 4.7156e+00 s -#timesteps: 1800 │ Δt: 2.4776e-04 │ sim. time: 6.1820e-01 (61.820%) │ run time: 4.7694e+00 s -#timesteps: 1850 │ Δt: 2.3715e-04 │ sim. time: 6.2783e-01 (62.783%) │ run time: 4.8303e+00 s -#timesteps: 1900 │ Δt: 1.9097e-04 │ sim. time: 6.4041e-01 (64.041%) │ run time: 4.8852e+00 s -#timesteps: 1950 │ Δt: 2.2910e-04 │ sim. time: 6.4947e-01 (64.947%) │ run time: 4.9470e+00 s -#timesteps: 2000 │ Δt: 3.0552e-04 │ sim. time: 6.5919e-01 (65.919%) │ run time: 5.0013e+00 s -#timesteps: 2050 │ Δt: 2.3880e-04 │ sim. time: 6.7015e-01 (67.015%) │ run time: 5.0612e+00 s -#timesteps: 2100 │ Δt: 1.0975e-04 │ sim. time: 6.7924e-01 (67.924%) │ run time: 5.1237e+00 s -#timesteps: 2150 │ Δt: 1.8457e-04 │ sim. time: 6.8890e-01 (68.890%) │ run time: 5.1831e+00 s -#timesteps: 2200 │ Δt: 2.1626e-04 │ sim. time: 6.9965e-01 (69.965%) │ run time: 5.2382e+00 s -#timesteps: 2250 │ Δt: 2.1010e-04 │ sim. time: 7.0758e-01 (70.758%) │ run time: 5.3019e+00 s -#timesteps: 2300 │ Δt: 2.6005e-04 │ sim. time: 7.1723e-01 (71.723%) │ run time: 5.3558e+00 s -#timesteps: 2350 │ Δt: 1.7561e-04 │ sim. time: 7.2655e-01 (72.655%) │ run time: 5.4173e+00 s -#timesteps: 2400 │ Δt: 1.9188e-04 │ sim. time: 7.3465e-01 (73.465%) │ run time: 5.4755e+00 s -#timesteps: 2450 │ Δt: 1.8705e-04 │ sim. time: 7.4595e-01 (74.595%) │ run time: 5.5326e+00 s -#timesteps: 2500 │ Δt: 1.5304e-04 │ sim. time: 7.5819e-01 (75.819%) │ run time: 5.5869e+00 s -#timesteps: 2550 │ Δt: 2.3839e-04 │ sim. time: 7.6917e-01 (76.917%) │ run time: 5.6475e+00 s -#timesteps: 2600 │ Δt: 1.4023e-05 │ sim. time: 7.8001e-01 (78.001%) │ run time: 5.7045e+00 s -#timesteps: 2650 │ Δt: 1.7156e-04 │ sim. time: 7.8759e-01 (78.759%) │ run time: 5.7635e+00 s -#timesteps: 2700 │ Δt: 1.6517e-04 │ sim. time: 7.9737e-01 (79.737%) │ run time: 5.8222e+00 s -#timesteps: 2750 │ Δt: 2.0952e-04 │ sim. time: 8.0875e-01 (80.875%) │ run time: 5.8788e+00 s -#timesteps: 2800 │ Δt: 1.8624e-04 │ sim. time: 8.1723e-01 (81.723%) │ run time: 5.9401e+00 s -#timesteps: 2850 │ Δt: 2.2248e-04 │ sim. time: 8.2787e-01 (82.787%) │ run time: 6.0009e+00 s -#timesteps: 2900 │ Δt: 1.3659e-04 │ sim. time: 8.3563e-01 (83.563%) │ run time: 6.0650e+00 s -#timesteps: 2950 │ Δt: 2.4461e-04 │ sim. time: 8.4472e-01 (84.472%) │ run time: 6.1238e+00 s -#timesteps: 3000 │ Δt: 3.0482e-04 │ sim. time: 8.5723e-01 (85.723%) │ run time: 6.1749e+00 s -#timesteps: 3050 │ Δt: 2.5103e-04 │ sim. time: 8.6980e-01 (86.980%) │ run time: 6.2329e+00 s -#timesteps: 3100 │ Δt: 2.4685e-04 │ sim. time: 8.8217e-01 (88.217%) │ run time: 6.2885e+00 s -#timesteps: 3150 │ Δt: 3.1694e-04 │ sim. time: 8.9459e-01 (89.459%) │ run time: 6.3398e+00 s -#timesteps: 3200 │ Δt: 2.9580e-04 │ sim. time: 9.0587e-01 (90.587%) │ run time: 6.3948e+00 s -#timesteps: 3250 │ Δt: 2.4739e-04 │ sim. time: 9.1647e-01 (91.647%) │ run time: 6.4505e+00 s -#timesteps: 3300 │ Δt: 2.7100e-04 │ sim. time: 9.2760e-01 (92.760%) │ run time: 6.5135e+00 s -#timesteps: 3350 │ Δt: 3.2485e-04 │ sim. time: 9.3869e-01 (93.869%) │ run time: 6.5702e+00 s -#timesteps: 3400 │ Δt: 3.3051e-04 │ sim. time: 9.5006e-01 (95.006%) │ run time: 6.6340e+00 s -#timesteps: 3450 │ Δt: 2.2418e-04 │ sim. time: 9.6292e-01 (96.292%) │ run time: 6.6937e+00 s -#timesteps: 3500 │ Δt: 3.7471e-04 │ sim. time: 9.7439e-01 (97.439%) │ run time: 6.7494e+00 s -#timesteps: 3550 │ Δt: 2.5104e-04 │ sim. time: 9.8649e-01 (98.649%) │ run time: 6.8129e+00 s -#timesteps: 3600 │ Δt: 2.1778e-04 │ sim. time: 9.9921e-01 (99.921%) │ run time: 6.8690e+00 s +#timesteps: 50 │ Δt: 6.1910e-06 │ sim. time: 5.9170e-02 (5.917%) │ run time: 2.7479e+00 s +#timesteps: 100 │ Δt: 1.4707e-03 │ sim. time: 7.2515e-02 (7.252%) │ run time: 2.8464e+00 s +#timesteps: 150 │ Δt: 4.0904e-09 │ sim. time: 9.9948e-02 (9.995%) │ run time: 2.9388e+00 s +#timesteps: 200 │ Δt: 2.3603e-04 │ sim. time: 1.2341e-01 (12.341%) │ run time: 3.0079e+00 s +#timesteps: 250 │ Δt: 8.2561e-10 │ sim. time: 1.5356e-01 (15.356%) │ run time: 3.0917e+00 s +#timesteps: 300 │ Δt: 4.3083e-04 │ sim. time: 1.6893e-01 (16.893%) │ run time: 3.1577e+00 s +#timesteps: 350 │ Δt: 6.0293e-05 │ sim. time: 1.9254e-01 (19.254%) │ run time: 3.2337e+00 s +#timesteps: 400 │ Δt: 9.7599e-05 │ sim. time: 2.1603e-01 (21.603%) │ run time: 3.3138e+00 s +#timesteps: 450 │ Δt: 6.9181e-04 │ sim. time: 2.4069e-01 (24.069%) │ run time: 3.3863e+00 s +#timesteps: 500 │ Δt: 1.7270e-04 │ sim. time: 2.6780e-01 (26.780%) │ run time: 3.4511e+00 s +#timesteps: 550 │ Δt: 5.9986e-05 │ sim. time: 2.7738e-01 (27.738%) │ run time: 3.5166e+00 s +#timesteps: 600 │ Δt: 1.8625e-10 │ sim. time: 2.8051e-01 (28.051%) │ run time: 3.6218e+00 s +#timesteps: 650 │ Δt: 4.1411e-04 │ sim. time: 2.8914e-01 (28.914%) │ run time: 3.6711e+00 s +#timesteps: 700 │ Δt: 2.7909e-04 │ sim. time: 3.0439e-01 (30.439%) │ run time: 3.7319e+00 s +#timesteps: 750 │ Δt: 4.8999e-04 │ sim. time: 3.2484e-01 (32.484%) │ run time: 3.7836e+00 s +#timesteps: 800 │ Δt: 3.2316e-04 │ sim. time: 3.4093e-01 (34.093%) │ run time: 3.8393e+00 s +#timesteps: 850 │ Δt: 3.6381e-04 │ sim. time: 3.5488e-01 (35.488%) │ run time: 3.8895e+00 s +#timesteps: 900 │ Δt: 1.3935e-04 │ sim. time: 3.6928e-01 (36.928%) │ run time: 3.9469e+00 s +#timesteps: 950 │ Δt: 2.9122e-04 │ sim. time: 3.8265e-01 (38.265%) │ run time: 4.0130e+00 s +#timesteps: 1000 │ Δt: 3.9265e-04 │ sim. time: 4.0287e-01 (40.287%) │ run time: 4.0610e+00 s +#timesteps: 1050 │ Δt: 3.0121e-04 │ sim. time: 4.1765e-01 (41.765%) │ run time: 4.1147e+00 s +#timesteps: 1100 │ Δt: 3.6827e-04 │ sim. time: 4.3071e-01 (43.071%) │ run time: 4.1739e+00 s +#timesteps: 1150 │ Δt: 5.0946e-04 │ sim. time: 4.4505e-01 (44.505%) │ run time: 4.2312e+00 s +#timesteps: 1200 │ Δt: 2.8520e-04 │ sim. time: 4.6113e-01 (46.113%) │ run time: 4.2896e+00 s +#timesteps: 1250 │ Δt: 3.5300e-04 │ sim. time: 4.7955e-01 (47.955%) │ run time: 4.3396e+00 s +#timesteps: 1300 │ Δt: 3.5639e-04 │ sim. time: 4.9061e-01 (49.061%) │ run time: 4.4016e+00 s +#timesteps: 1350 │ Δt: 3.1861e-04 │ sim. time: 5.0449e-01 (50.449%) │ run time: 4.4585e+00 s +#timesteps: 1400 │ Δt: 3.4023e-04 │ sim. time: 5.1706e-01 (51.706%) │ run time: 4.5128e+00 s +#timesteps: 1450 │ Δt: 3.5477e-04 │ sim. time: 5.3042e-01 (53.042%) │ run time: 4.5749e+00 s +#timesteps: 1500 │ Δt: 3.5992e-04 │ sim. time: 5.4408e-01 (54.408%) │ run time: 4.6314e+00 s +#timesteps: 1550 │ Δt: 3.5594e-04 │ sim. time: 5.5812e-01 (55.812%) │ run time: 4.6892e+00 s +#timesteps: 1600 │ Δt: 1.4553e-04 │ sim. time: 5.7286e-01 (57.286%) │ run time: 4.7469e+00 s +#timesteps: 1650 │ Δt: 3.2888e-04 │ sim. time: 5.8380e-01 (58.380%) │ run time: 4.8039e+00 s +#timesteps: 1700 │ Δt: 2.9151e-04 │ sim. time: 5.9640e-01 (59.640%) │ run time: 4.8532e+00 s +#timesteps: 1750 │ Δt: 7.8861e-05 │ sim. time: 6.0694e-01 (60.694%) │ run time: 4.9185e+00 s +#timesteps: 1800 │ Δt: 2.4776e-04 │ sim. time: 6.1820e-01 (61.820%) │ run time: 4.9715e+00 s +#timesteps: 1850 │ Δt: 2.3715e-04 │ sim. time: 6.2783e-01 (62.783%) │ run time: 5.0328e+00 s +#timesteps: 1900 │ Δt: 1.9097e-04 │ sim. time: 6.4041e-01 (64.041%) │ run time: 5.0876e+00 s +#timesteps: 1950 │ Δt: 2.2910e-04 │ sim. time: 6.4947e-01 (64.947%) │ run time: 5.1490e+00 s +#timesteps: 2000 │ Δt: 3.0552e-04 │ sim. time: 6.5919e-01 (65.919%) │ run time: 5.2060e+00 s +#timesteps: 2050 │ Δt: 2.3880e-04 │ sim. time: 6.7015e-01 (67.015%) │ run time: 5.2658e+00 s +#timesteps: 2100 │ Δt: 1.0975e-04 │ sim. time: 6.7924e-01 (67.924%) │ run time: 5.3233e+00 s +#timesteps: 2150 │ Δt: 1.8457e-04 │ sim. time: 6.8890e-01 (68.890%) │ run time: 5.3821e+00 s +#timesteps: 2200 │ Δt: 2.1626e-04 │ sim. time: 6.9965e-01 (69.965%) │ run time: 5.4367e+00 s +#timesteps: 2250 │ Δt: 2.1010e-04 │ sim. time: 7.0758e-01 (70.758%) │ run time: 5.5026e+00 s +#timesteps: 2300 │ Δt: 2.6005e-04 │ sim. time: 7.1723e-01 (71.723%) │ run time: 5.5563e+00 s +#timesteps: 2350 │ Δt: 1.7561e-04 │ sim. time: 7.2655e-01 (72.655%) │ run time: 5.6174e+00 s +#timesteps: 2400 │ Δt: 1.9188e-04 │ sim. time: 7.3465e-01 (73.465%) │ run time: 5.6821e+00 s +#timesteps: 2450 │ Δt: 1.8705e-04 │ sim. time: 7.4595e-01 (74.595%) │ run time: 5.7408e+00 s +#timesteps: 2500 │ Δt: 1.5304e-04 │ sim. time: 7.5819e-01 (75.819%) │ run time: 5.7930e+00 s +#timesteps: 2550 │ Δt: 2.3839e-04 │ sim. time: 7.6917e-01 (76.917%) │ run time: 5.8496e+00 s +#timesteps: 2600 │ Δt: 1.4023e-05 │ sim. time: 7.8001e-01 (78.001%) │ run time: 5.9064e+00 s +#timesteps: 2650 │ Δt: 1.7156e-04 │ sim. time: 7.8759e-01 (78.759%) │ run time: 5.9650e+00 s +#timesteps: 2700 │ Δt: 1.6517e-04 │ sim. time: 7.9737e-01 (79.737%) │ run time: 6.0264e+00 s +#timesteps: 2750 │ Δt: 2.0952e-04 │ sim. time: 8.0875e-01 (80.875%) │ run time: 6.0832e+00 s +#timesteps: 2800 │ Δt: 1.8624e-04 │ sim. time: 8.1723e-01 (81.723%) │ run time: 6.1448e+00 s +#timesteps: 2850 │ Δt: 2.2248e-04 │ sim. time: 8.2787e-01 (82.787%) │ run time: 6.2032e+00 s +#timesteps: 2900 │ Δt: 1.3659e-04 │ sim. time: 8.3563e-01 (83.563%) │ run time: 6.2696e+00 s +#timesteps: 2950 │ Δt: 2.4461e-04 │ sim. time: 8.4472e-01 (84.472%) │ run time: 6.3283e+00 s +#timesteps: 3000 │ Δt: 3.0482e-04 │ sim. time: 8.5723e-01 (85.723%) │ run time: 6.3787e+00 s +#timesteps: 3050 │ Δt: 2.5103e-04 │ sim. time: 8.6980e-01 (86.980%) │ run time: 6.4368e+00 s +#timesteps: 3100 │ Δt: 2.4685e-04 │ sim. time: 8.8217e-01 (88.217%) │ run time: 6.4928e+00 s +#timesteps: 3150 │ Δt: 3.1694e-04 │ sim. time: 8.9459e-01 (89.459%) │ run time: 6.5448e+00 s +#timesteps: 3200 │ Δt: 2.9580e-04 │ sim. time: 9.0587e-01 (90.587%) │ run time: 6.5995e+00 s +#timesteps: 3250 │ Δt: 2.4739e-04 │ sim. time: 9.1647e-01 (91.647%) │ run time: 6.6548e+00 s +#timesteps: 3300 │ Δt: 2.7100e-04 │ sim. time: 9.2760e-01 (92.760%) │ run time: 6.7187e+00 s +#timesteps: 3350 │ Δt: 3.2485e-04 │ sim. time: 9.3869e-01 (93.869%) │ run time: 6.7724e+00 s +#timesteps: 3400 │ Δt: 3.3051e-04 │ sim. time: 9.5006e-01 (95.006%) │ run time: 6.8351e+00 s +#timesteps: 3450 │ Δt: 2.2418e-04 │ sim. time: 9.6292e-01 (96.292%) │ run time: 6.8943e+00 s +#timesteps: 3500 │ Δt: 3.7471e-04 │ sim. time: 9.7439e-01 (97.439%) │ run time: 6.9515e+00 s +#timesteps: 3550 │ Δt: 2.5104e-04 │ sim. time: 9.8649e-01 (98.649%) │ run time: 7.0119e+00 s +#timesteps: 3600 │ Δt: 2.1778e-04 │ sim. time: 9.9921e-01 (99.921%) │ run time: 7.0679e+00 s ──────────────────────────────────────────────────────────────────────────────────────────────────── Trixi simulation finished. Final time: 1.0 Time steps: 3603 (accepted), 4623 (total) ──────────────────────────────────────────────────────────────────────────────────────────────────── @@ -327,41 +327,41 @@ ──────────────────────────────────────────────────────────────────────────────── TrixiParticles.jl Time Allocations ─────────────────────── ──────────────────────── - Tot / % measured: 6.87s / 66.6% 480MiB / 76.3% + Tot / % measured: 7.07s / 65.2% 480MiB / 76.3% Section ncalls time %tot avg alloc %tot avg ──────────────────────────────────────────────────────────────────────────────── -kick! 23.1k 4.03s 88.1% 174μs 267MiB 73.0% 11.8KiB - system interaction 23.1k 2.54s 55.4% 110μs 21.7MiB 5.9% 984B - fluid1-fluid1 23.1k 1.60s 35.0% 69.2μs 0.00B 0.0% 0.00B - fluid1-boundary2 23.1k 869ms 19.0% 37.6μs 0.00B 0.0% 0.00B - ~system intera... 23.1k 65.6ms 1.4% 2.84μs 21.7MiB 5.9% 984B - boundary2-fluid1 23.1k 702μs 0.0% 30.4ns 0.00B 0.0% 0.00B - boundary2-boun... 23.1k 688μs 0.0% 29.8ns 0.00B 0.0% 0.00B - update systems a... 23.1k 1.48s 32.3% 63.9μs 245MiB 67.0% 10.9KiB - compute bounda... 23.1k 717ms 15.7% 31.0μs 0.00B 0.0% 0.00B - update nhs 23.1k 599ms 13.1% 25.9μs 245MiB 67.0% 10.9KiB - ~update system... 23.1k 101ms 2.2% 4.35μs 1.55KiB 0.0% 0.07B - inverse state ... 23.1k 60.0ms 1.3% 2.60μs 0.00B 0.0% 0.00B - update density... 23.1k 673μs 0.0% 29.1ns 0.00B 0.0% 0.00B - source terms 23.1k 10.1ms 0.2% 435ns 0.00B 0.0% 0.00B - ~kick!~ 23.1k 7.72ms 0.2% 334ns 1.55KiB 0.0% 0.07B - reset ∂v/∂t 23.1k 3.17ms 0.1% 137ns 0.00B 0.0% 0.00B -save solution 50 525ms 11.5% 10.5ms 99.1MiB 27.0% 1.98MiB - write to vtk 100 285ms 6.2% 2.85ms 86.4MiB 23.6% 885KiB - ~save solution~ 50 237ms 5.2% 4.74ms 12.1MiB 3.3% 248KiB +kick! 23.1k 3.99s 86.5% 172μs 267MiB 73.0% 11.8KiB + system interaction 23.1k 2.52s 54.7% 109μs 21.7MiB 5.9% 984B + fluid1-fluid1 23.1k 1.58s 34.2% 68.2μs 0.00B 0.0% 0.00B + fluid1-boundary2 23.1k 878ms 19.0% 38.0μs 0.00B 0.0% 0.00B + ~system intera... 23.1k 68.0ms 1.5% 2.94μs 21.7MiB 5.9% 984B + boundary2-fluid1 23.1k 717μs 0.0% 31.0ns 0.00B 0.0% 0.00B + boundary2-boun... 23.1k 673μs 0.0% 29.1ns 0.00B 0.0% 0.00B + update systems a... 23.1k 1.44s 31.3% 62.5μs 245MiB 67.0% 10.9KiB + compute bounda... 23.1k 727ms 15.8% 31.4μs 0.00B 0.0% 0.00B + update nhs 23.1k 554ms 12.0% 24.0μs 245MiB 67.0% 10.9KiB + ~update system... 23.1k 102ms 2.2% 4.39μs 1.55KiB 0.0% 0.07B + inverse state ... 23.1k 60.8ms 1.3% 2.63μs 0.00B 0.0% 0.00B + update density... 23.1k 683μs 0.0% 29.5ns 0.00B 0.0% 0.00B + source terms 23.1k 9.05ms 0.2% 391ns 0.00B 0.0% 0.00B + ~kick!~ 23.1k 7.46ms 0.2% 323ns 1.55KiB 0.0% 0.07B + reset ∂v/∂t 23.1k 2.96ms 0.1% 128ns 0.00B 0.0% 0.00B +save solution 50 607ms 13.2% 12.1ms 99.1MiB 27.0% 1.98MiB + write to vtk 100 346ms 7.5% 3.46ms 86.4MiB 23.6% 885KiB + ~save solution~ 50 258ms 5.6% 5.15ms 12.1MiB 3.3% 248KiB update systems 50 3.13ms 0.1% 62.7μs 544KiB 0.1% 10.9KiB - compute bounda... 50 1.55ms 0.0% 30.9μs 0.00B 0.0% 0.00B - update nhs 50 1.22ms 0.0% 24.5μs 542KiB 0.1% 10.8KiB - ~update systems~ 50 231μs 0.0% 4.62μs 1.55KiB 0.0% 31.7B - inverse state ... 50 131μs 0.0% 2.62μs 0.00B 0.0% 0.00B - update density... 50 1.49μs 0.0% 29.8ns 0.00B 0.0% 0.00B -drift! 23.1k 17.6ms 0.4% 762ns 976B 0.0% 0.04B - velocity 23.1k 10.4ms 0.2% 449ns 0.00B 0.0% 0.00B - ~drift!~ 23.1k 4.12ms 0.1% 178ns 976B 0.0% 0.04B - reset ∂u/∂t 23.1k 3.13ms 0.1% 135ns 0.00B 0.0% 0.00B -update nhs 1 80.3μs 0.0% 80.3μs 11.4KiB 0.0% 11.4KiB -compute boundary p... 1 63.2μs 0.0% 63.2μs 0.00B 0.0% 0.00B -inverse state equa... 1 2.85μs 0.0% 2.85μs 0.00B 0.0% 0.00B -update density dif... 1 40.0ns 0.0% 40.0ns 0.00B 0.0% 0.00B -────────────────────────────────────────────────────────────────────────────────

+ compute bounda... 50 1.58ms 0.0% 31.5μs 0.00B 0.0% 0.00B + update nhs 50 1.18ms 0.0% 23.5μs 542KiB 0.1% 10.8KiB + ~update systems~ 50 245μs 0.0% 4.90μs 1.55KiB 0.0% 31.7B + inverse state ... 50 131μs 0.0% 2.61μs 0.00B 0.0% 0.00B + update density... 50 5.49μs 0.0% 110ns 0.00B 0.0% 0.00B +drift! 23.1k 17.4ms 0.4% 754ns 976B 0.0% 0.04B + velocity 23.1k 10.7ms 0.2% 462ns 0.00B 0.0% 0.00B + ~drift!~ 23.1k 4.10ms 0.1% 177ns 976B 0.0% 0.04B + reset ∂u/∂t 23.1k 2.66ms 0.1% 115ns 0.00B 0.0% 0.00B +update nhs 1 76.6μs 0.0% 76.6μs 11.4KiB 0.0% 11.4KiB +compute boundary p... 1 62.8μs 0.0% 62.8μs 0.00B 0.0% 0.00B +inverse state equa... 1 3.06μs 0.0% 3.06μs 0.00B 0.0% 0.00B +update density dif... 1 30.0ns 0.0% 30.0ns 0.00B 0.0% 0.00B +──────────────────────────────────────────────────────────────────────────────── diff --git a/previews/PR514/tutorials_template/out/boundary_1_0.vtu b/previews/PR514/tutorials_template/out/boundary_1_0.vtu index 53dc9bac6..16fe82671 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_0.vtu and b/previews/PR514/tutorials_template/out/boundary_1_0.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_1.vtu b/previews/PR514/tutorials_template/out/boundary_1_1.vtu index 9c22300d2..300f96f6e 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_1.vtu and b/previews/PR514/tutorials_template/out/boundary_1_1.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_10.vtu b/previews/PR514/tutorials_template/out/boundary_1_10.vtu index 0129bd2f7..860adec39 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_10.vtu and b/previews/PR514/tutorials_template/out/boundary_1_10.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_11.vtu b/previews/PR514/tutorials_template/out/boundary_1_11.vtu index f1da3602a..eda2760fe 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_11.vtu and b/previews/PR514/tutorials_template/out/boundary_1_11.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_12.vtu b/previews/PR514/tutorials_template/out/boundary_1_12.vtu index 4b8b16497..a0a79604a 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_12.vtu and b/previews/PR514/tutorials_template/out/boundary_1_12.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_13.vtu b/previews/PR514/tutorials_template/out/boundary_1_13.vtu index e88d99049..d336ba1d2 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_13.vtu and b/previews/PR514/tutorials_template/out/boundary_1_13.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_14.vtu b/previews/PR514/tutorials_template/out/boundary_1_14.vtu index f8f0311c9..7e4ebf9bf 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_14.vtu and b/previews/PR514/tutorials_template/out/boundary_1_14.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_15.vtu b/previews/PR514/tutorials_template/out/boundary_1_15.vtu index 6ea793fdd..f07a28d78 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_15.vtu and b/previews/PR514/tutorials_template/out/boundary_1_15.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_16.vtu b/previews/PR514/tutorials_template/out/boundary_1_16.vtu index 3f829a87c..72d18ccd3 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_16.vtu and b/previews/PR514/tutorials_template/out/boundary_1_16.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_17.vtu b/previews/PR514/tutorials_template/out/boundary_1_17.vtu index 5adcd8f80..3c071095e 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_17.vtu and b/previews/PR514/tutorials_template/out/boundary_1_17.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_18.vtu b/previews/PR514/tutorials_template/out/boundary_1_18.vtu index 68428ffad..dd3805a47 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_18.vtu and b/previews/PR514/tutorials_template/out/boundary_1_18.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_19.vtu b/previews/PR514/tutorials_template/out/boundary_1_19.vtu index 5b51e9673..0844dc7fe 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_19.vtu and b/previews/PR514/tutorials_template/out/boundary_1_19.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_2.vtu b/previews/PR514/tutorials_template/out/boundary_1_2.vtu index 35705abfc..2ea7b0c0c 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_2.vtu and b/previews/PR514/tutorials_template/out/boundary_1_2.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_20.vtu b/previews/PR514/tutorials_template/out/boundary_1_20.vtu index 02a6dbe19..9a5dc8a70 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_20.vtu and b/previews/PR514/tutorials_template/out/boundary_1_20.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_21.vtu b/previews/PR514/tutorials_template/out/boundary_1_21.vtu index 263fdc5f7..cf7c2fb2b 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_21.vtu and b/previews/PR514/tutorials_template/out/boundary_1_21.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_22.vtu b/previews/PR514/tutorials_template/out/boundary_1_22.vtu index 56eb54bf5..af512b34e 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_22.vtu and b/previews/PR514/tutorials_template/out/boundary_1_22.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_23.vtu b/previews/PR514/tutorials_template/out/boundary_1_23.vtu index 0bef8a2c6..f16ddc11e 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_23.vtu and b/previews/PR514/tutorials_template/out/boundary_1_23.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_24.vtu b/previews/PR514/tutorials_template/out/boundary_1_24.vtu index b18c7a493..daa97ab93 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_24.vtu and b/previews/PR514/tutorials_template/out/boundary_1_24.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_25.vtu b/previews/PR514/tutorials_template/out/boundary_1_25.vtu index ce9cc6fb2..c2f8f4e0c 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_25.vtu and b/previews/PR514/tutorials_template/out/boundary_1_25.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_26.vtu b/previews/PR514/tutorials_template/out/boundary_1_26.vtu index 9dec000ef..a98b641e9 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_26.vtu and b/previews/PR514/tutorials_template/out/boundary_1_26.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_27.vtu b/previews/PR514/tutorials_template/out/boundary_1_27.vtu index c10f20d27..04aa6d442 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_27.vtu and b/previews/PR514/tutorials_template/out/boundary_1_27.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_28.vtu b/previews/PR514/tutorials_template/out/boundary_1_28.vtu index 7e975ab56..5b1e2da93 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_28.vtu and b/previews/PR514/tutorials_template/out/boundary_1_28.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_29.vtu b/previews/PR514/tutorials_template/out/boundary_1_29.vtu index dac08d209..3c7f545b0 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_29.vtu and b/previews/PR514/tutorials_template/out/boundary_1_29.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_3.vtu b/previews/PR514/tutorials_template/out/boundary_1_3.vtu index d42fb04f0..8c34dd06b 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_3.vtu and b/previews/PR514/tutorials_template/out/boundary_1_3.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_30.vtu b/previews/PR514/tutorials_template/out/boundary_1_30.vtu index 1a99ee4b1..1f0a40b83 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_30.vtu and b/previews/PR514/tutorials_template/out/boundary_1_30.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_31.vtu b/previews/PR514/tutorials_template/out/boundary_1_31.vtu index 8bde1c544..dfdc30338 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_31.vtu and b/previews/PR514/tutorials_template/out/boundary_1_31.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_32.vtu b/previews/PR514/tutorials_template/out/boundary_1_32.vtu index 791d016b7..9e00be2b6 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_32.vtu and b/previews/PR514/tutorials_template/out/boundary_1_32.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_33.vtu b/previews/PR514/tutorials_template/out/boundary_1_33.vtu index 94917ef29..85526eae1 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_33.vtu and b/previews/PR514/tutorials_template/out/boundary_1_33.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_34.vtu b/previews/PR514/tutorials_template/out/boundary_1_34.vtu index 46e13ce0a..661e01072 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_34.vtu and b/previews/PR514/tutorials_template/out/boundary_1_34.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_35.vtu b/previews/PR514/tutorials_template/out/boundary_1_35.vtu index f18a5eff8..0f924dc69 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_35.vtu and b/previews/PR514/tutorials_template/out/boundary_1_35.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_36.vtu b/previews/PR514/tutorials_template/out/boundary_1_36.vtu index f3e2a2eb7..49901d2ac 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_36.vtu and b/previews/PR514/tutorials_template/out/boundary_1_36.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_37.vtu b/previews/PR514/tutorials_template/out/boundary_1_37.vtu index bebac4117..9817c2ff8 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_37.vtu and b/previews/PR514/tutorials_template/out/boundary_1_37.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_38.vtu b/previews/PR514/tutorials_template/out/boundary_1_38.vtu index 729bbcd28..50fbd6003 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_38.vtu and b/previews/PR514/tutorials_template/out/boundary_1_38.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_39.vtu b/previews/PR514/tutorials_template/out/boundary_1_39.vtu index 40b7d46cb..2e5264788 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_39.vtu and b/previews/PR514/tutorials_template/out/boundary_1_39.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_4.vtu b/previews/PR514/tutorials_template/out/boundary_1_4.vtu index bd61b7444..c105ac6df 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_4.vtu and b/previews/PR514/tutorials_template/out/boundary_1_4.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_40.vtu b/previews/PR514/tutorials_template/out/boundary_1_40.vtu index 33add68dc..946ac2021 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_40.vtu and b/previews/PR514/tutorials_template/out/boundary_1_40.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_41.vtu b/previews/PR514/tutorials_template/out/boundary_1_41.vtu index d92e567b0..458e2437b 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_41.vtu and b/previews/PR514/tutorials_template/out/boundary_1_41.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_42.vtu b/previews/PR514/tutorials_template/out/boundary_1_42.vtu index 224b681c0..4f465050a 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_42.vtu and b/previews/PR514/tutorials_template/out/boundary_1_42.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_43.vtu b/previews/PR514/tutorials_template/out/boundary_1_43.vtu index 7550c41e9..4da1732c3 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_43.vtu and b/previews/PR514/tutorials_template/out/boundary_1_43.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_44.vtu b/previews/PR514/tutorials_template/out/boundary_1_44.vtu index 7ebc835f4..420e5ef79 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_44.vtu and b/previews/PR514/tutorials_template/out/boundary_1_44.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_45.vtu b/previews/PR514/tutorials_template/out/boundary_1_45.vtu index d209460c4..01931ff48 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_45.vtu and b/previews/PR514/tutorials_template/out/boundary_1_45.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_46.vtu b/previews/PR514/tutorials_template/out/boundary_1_46.vtu index 8c2da27a3..8e4197790 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_46.vtu and b/previews/PR514/tutorials_template/out/boundary_1_46.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_47.vtu b/previews/PR514/tutorials_template/out/boundary_1_47.vtu index 203923f90..7dee0be40 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_47.vtu and b/previews/PR514/tutorials_template/out/boundary_1_47.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_48.vtu b/previews/PR514/tutorials_template/out/boundary_1_48.vtu index 7a0fcd718..5c13a5d61 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_48.vtu and b/previews/PR514/tutorials_template/out/boundary_1_48.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_49.vtu b/previews/PR514/tutorials_template/out/boundary_1_49.vtu index 48b358c64..0234ee793 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_49.vtu and b/previews/PR514/tutorials_template/out/boundary_1_49.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_5.vtu b/previews/PR514/tutorials_template/out/boundary_1_5.vtu index a4b9be1c8..a326fe2f7 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_5.vtu and b/previews/PR514/tutorials_template/out/boundary_1_5.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_50.vtu b/previews/PR514/tutorials_template/out/boundary_1_50.vtu index 125961ea7..d8049d873 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_50.vtu and b/previews/PR514/tutorials_template/out/boundary_1_50.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_6.vtu b/previews/PR514/tutorials_template/out/boundary_1_6.vtu index fab42e5f9..f2ac73916 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_6.vtu and b/previews/PR514/tutorials_template/out/boundary_1_6.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_7.vtu b/previews/PR514/tutorials_template/out/boundary_1_7.vtu index f7e1affa9..a1c726352 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_7.vtu and b/previews/PR514/tutorials_template/out/boundary_1_7.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_8.vtu b/previews/PR514/tutorials_template/out/boundary_1_8.vtu index fd3f68e65..6f3eac840 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_8.vtu and b/previews/PR514/tutorials_template/out/boundary_1_8.vtu differ diff --git a/previews/PR514/tutorials_template/out/boundary_1_9.vtu b/previews/PR514/tutorials_template/out/boundary_1_9.vtu index 710042da8..f1a71f182 100644 Binary files a/previews/PR514/tutorials_template/out/boundary_1_9.vtu and b/previews/PR514/tutorials_template/out/boundary_1_9.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_0.vtu b/previews/PR514/tutorials_template/out/fluid_1_0.vtu index d062a2d35..7b0e4b764 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_0.vtu and b/previews/PR514/tutorials_template/out/fluid_1_0.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_1.vtu b/previews/PR514/tutorials_template/out/fluid_1_1.vtu index c6a75dc97..9b3aad2bd 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_1.vtu and b/previews/PR514/tutorials_template/out/fluid_1_1.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_10.vtu b/previews/PR514/tutorials_template/out/fluid_1_10.vtu index 3159e9303..ae373672a 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_10.vtu and b/previews/PR514/tutorials_template/out/fluid_1_10.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_11.vtu b/previews/PR514/tutorials_template/out/fluid_1_11.vtu index 0a20dfc06..d94bb679f 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_11.vtu and b/previews/PR514/tutorials_template/out/fluid_1_11.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_12.vtu b/previews/PR514/tutorials_template/out/fluid_1_12.vtu index 603ac7bf4..14440dc84 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_12.vtu and b/previews/PR514/tutorials_template/out/fluid_1_12.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_13.vtu b/previews/PR514/tutorials_template/out/fluid_1_13.vtu index 8e19f706e..31d6bd546 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_13.vtu and b/previews/PR514/tutorials_template/out/fluid_1_13.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_14.vtu b/previews/PR514/tutorials_template/out/fluid_1_14.vtu index 11c0bd104..f697c389a 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_14.vtu and b/previews/PR514/tutorials_template/out/fluid_1_14.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_15.vtu b/previews/PR514/tutorials_template/out/fluid_1_15.vtu index b847da25f..28c80bc3b 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_15.vtu and b/previews/PR514/tutorials_template/out/fluid_1_15.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_16.vtu b/previews/PR514/tutorials_template/out/fluid_1_16.vtu index 3de714d4c..110b320d1 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_16.vtu and b/previews/PR514/tutorials_template/out/fluid_1_16.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_17.vtu b/previews/PR514/tutorials_template/out/fluid_1_17.vtu index a02d7bc5c..81ed18b74 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_17.vtu and b/previews/PR514/tutorials_template/out/fluid_1_17.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_18.vtu b/previews/PR514/tutorials_template/out/fluid_1_18.vtu index 21f13caff..0a3094a3e 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_18.vtu and b/previews/PR514/tutorials_template/out/fluid_1_18.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_19.vtu b/previews/PR514/tutorials_template/out/fluid_1_19.vtu index 0d153c986..e7fb4fddc 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_19.vtu and b/previews/PR514/tutorials_template/out/fluid_1_19.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_2.vtu b/previews/PR514/tutorials_template/out/fluid_1_2.vtu index f54862a2d..9759623f8 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_2.vtu and b/previews/PR514/tutorials_template/out/fluid_1_2.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_20.vtu b/previews/PR514/tutorials_template/out/fluid_1_20.vtu index 3ecf6bc77..312ca5630 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_20.vtu and b/previews/PR514/tutorials_template/out/fluid_1_20.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_21.vtu b/previews/PR514/tutorials_template/out/fluid_1_21.vtu index 25c0d6816..d6ee58125 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_21.vtu and b/previews/PR514/tutorials_template/out/fluid_1_21.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_22.vtu b/previews/PR514/tutorials_template/out/fluid_1_22.vtu index f90151dc4..7e39fb902 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_22.vtu and b/previews/PR514/tutorials_template/out/fluid_1_22.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_23.vtu b/previews/PR514/tutorials_template/out/fluid_1_23.vtu index c8c8a5313..ebdf0d5bc 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_23.vtu and b/previews/PR514/tutorials_template/out/fluid_1_23.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_24.vtu b/previews/PR514/tutorials_template/out/fluid_1_24.vtu index 490b8dc91..a2502b088 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_24.vtu and b/previews/PR514/tutorials_template/out/fluid_1_24.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_25.vtu b/previews/PR514/tutorials_template/out/fluid_1_25.vtu index 807e04664..883a20472 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_25.vtu and b/previews/PR514/tutorials_template/out/fluid_1_25.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_26.vtu b/previews/PR514/tutorials_template/out/fluid_1_26.vtu index 9eb5f4596..472390ef6 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_26.vtu and b/previews/PR514/tutorials_template/out/fluid_1_26.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_27.vtu b/previews/PR514/tutorials_template/out/fluid_1_27.vtu index 2b4964d12..5e1b51253 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_27.vtu and b/previews/PR514/tutorials_template/out/fluid_1_27.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_28.vtu b/previews/PR514/tutorials_template/out/fluid_1_28.vtu index 5078abace..989be7b34 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_28.vtu and b/previews/PR514/tutorials_template/out/fluid_1_28.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_29.vtu b/previews/PR514/tutorials_template/out/fluid_1_29.vtu index a66cfadc2..cafed4ac3 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_29.vtu and b/previews/PR514/tutorials_template/out/fluid_1_29.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_3.vtu b/previews/PR514/tutorials_template/out/fluid_1_3.vtu index 277449d22..2a1270db7 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_3.vtu and b/previews/PR514/tutorials_template/out/fluid_1_3.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_30.vtu b/previews/PR514/tutorials_template/out/fluid_1_30.vtu index b93e3cb76..a5a34a933 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_30.vtu and b/previews/PR514/tutorials_template/out/fluid_1_30.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_31.vtu b/previews/PR514/tutorials_template/out/fluid_1_31.vtu index 912b7b73a..f7e015fb9 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_31.vtu and b/previews/PR514/tutorials_template/out/fluid_1_31.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_32.vtu b/previews/PR514/tutorials_template/out/fluid_1_32.vtu index 520f7c039..7096e1ef7 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_32.vtu and b/previews/PR514/tutorials_template/out/fluid_1_32.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_33.vtu b/previews/PR514/tutorials_template/out/fluid_1_33.vtu index 63d321a43..ebe9f870e 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_33.vtu and b/previews/PR514/tutorials_template/out/fluid_1_33.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_34.vtu b/previews/PR514/tutorials_template/out/fluid_1_34.vtu index 0a311a157..568147a66 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_34.vtu and b/previews/PR514/tutorials_template/out/fluid_1_34.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_35.vtu b/previews/PR514/tutorials_template/out/fluid_1_35.vtu index 353473b56..820ba4d6f 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_35.vtu and b/previews/PR514/tutorials_template/out/fluid_1_35.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_36.vtu b/previews/PR514/tutorials_template/out/fluid_1_36.vtu index f68da34ed..d75ed51c4 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_36.vtu and b/previews/PR514/tutorials_template/out/fluid_1_36.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_37.vtu b/previews/PR514/tutorials_template/out/fluid_1_37.vtu index 18e24255c..57153b42d 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_37.vtu and b/previews/PR514/tutorials_template/out/fluid_1_37.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_38.vtu b/previews/PR514/tutorials_template/out/fluid_1_38.vtu index eb8911fd0..046e0c154 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_38.vtu and b/previews/PR514/tutorials_template/out/fluid_1_38.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_39.vtu b/previews/PR514/tutorials_template/out/fluid_1_39.vtu index 94f543aec..73d2e6de4 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_39.vtu and b/previews/PR514/tutorials_template/out/fluid_1_39.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_4.vtu b/previews/PR514/tutorials_template/out/fluid_1_4.vtu index 7065bc52f..27f97ae99 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_4.vtu and b/previews/PR514/tutorials_template/out/fluid_1_4.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_40.vtu b/previews/PR514/tutorials_template/out/fluid_1_40.vtu index 50d9b32ef..b01a4ad02 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_40.vtu and b/previews/PR514/tutorials_template/out/fluid_1_40.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_41.vtu b/previews/PR514/tutorials_template/out/fluid_1_41.vtu index 34cd05adc..5e325499e 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_41.vtu and b/previews/PR514/tutorials_template/out/fluid_1_41.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_42.vtu b/previews/PR514/tutorials_template/out/fluid_1_42.vtu index 43c968e42..2680e0cec 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_42.vtu and b/previews/PR514/tutorials_template/out/fluid_1_42.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_43.vtu b/previews/PR514/tutorials_template/out/fluid_1_43.vtu index c07ff8e6e..9311367f0 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_43.vtu and b/previews/PR514/tutorials_template/out/fluid_1_43.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_44.vtu b/previews/PR514/tutorials_template/out/fluid_1_44.vtu index 7b7565b3f..e7985bc6f 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_44.vtu and b/previews/PR514/tutorials_template/out/fluid_1_44.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_45.vtu b/previews/PR514/tutorials_template/out/fluid_1_45.vtu index c54ff3561..fb2312c07 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_45.vtu and b/previews/PR514/tutorials_template/out/fluid_1_45.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_46.vtu b/previews/PR514/tutorials_template/out/fluid_1_46.vtu index e4035fbe2..a6f0c50f2 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_46.vtu and b/previews/PR514/tutorials_template/out/fluid_1_46.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_47.vtu b/previews/PR514/tutorials_template/out/fluid_1_47.vtu index d28975ba0..e0833159f 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_47.vtu and b/previews/PR514/tutorials_template/out/fluid_1_47.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_48.vtu b/previews/PR514/tutorials_template/out/fluid_1_48.vtu index b8c6744b7..bb5017b21 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_48.vtu and b/previews/PR514/tutorials_template/out/fluid_1_48.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_49.vtu b/previews/PR514/tutorials_template/out/fluid_1_49.vtu index c0e2d7333..49ff390ec 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_49.vtu and b/previews/PR514/tutorials_template/out/fluid_1_49.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_5.vtu b/previews/PR514/tutorials_template/out/fluid_1_5.vtu index 1ac1c5192..b71eba108 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_5.vtu and b/previews/PR514/tutorials_template/out/fluid_1_5.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_50.vtu b/previews/PR514/tutorials_template/out/fluid_1_50.vtu index 3f0a54f80..4c86db2dc 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_50.vtu and b/previews/PR514/tutorials_template/out/fluid_1_50.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_6.vtu b/previews/PR514/tutorials_template/out/fluid_1_6.vtu index cebeb0ae4..04b6f3214 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_6.vtu and b/previews/PR514/tutorials_template/out/fluid_1_6.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_7.vtu b/previews/PR514/tutorials_template/out/fluid_1_7.vtu index 7cba00a20..6bd093e77 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_7.vtu and b/previews/PR514/tutorials_template/out/fluid_1_7.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_8.vtu b/previews/PR514/tutorials_template/out/fluid_1_8.vtu index 5f54de6f4..a04c870d4 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_8.vtu and b/previews/PR514/tutorials_template/out/fluid_1_8.vtu differ diff --git a/previews/PR514/tutorials_template/out/fluid_1_9.vtu b/previews/PR514/tutorials_template/out/fluid_1_9.vtu index 4253c9d5d..51532741c 100644 Binary files a/previews/PR514/tutorials_template/out/fluid_1_9.vtu and b/previews/PR514/tutorials_template/out/fluid_1_9.vtu differ diff --git a/previews/PR514/tutorials_template/tut_beam/index.html b/previews/PR514/tutorials_template/tut_beam/index.html index e356f509c..578c80fbd 100644 --- a/previews/PR514/tutorials_template/tut_beam/index.html +++ b/previews/PR514/tutorials_template/tut_beam/index.html @@ -1,3 +1,3 @@ Example file · TrixiParticles.jl

Example file

!!include:examples/solid/oscillating_beam_2d.jl!!
-
+ diff --git a/previews/PR514/tutorials_template/tut_dam_break/index.html b/previews/PR514/tutorials_template/tut_dam_break/index.html index 5fcfb677b..9b936c14b 100644 --- a/previews/PR514/tutorials_template/tut_dam_break/index.html +++ b/previews/PR514/tutorials_template/tut_dam_break/index.html @@ -1,3 +1,3 @@ Example file · TrixiParticles.jl
+ diff --git a/previews/PR514/tutorials_template/tut_falling/index.html b/previews/PR514/tutorials_template/tut_falling/index.html index 17e38e519..af5950ede 100644 --- a/previews/PR514/tutorials_template/tut_falling/index.html +++ b/previews/PR514/tutorials_template/tut_falling/index.html @@ -1,3 +1,3 @@ Example file · TrixiParticles.jl

Example file

!!include:examples/fsi/falling_spheres_2d.jl!!
-
+ diff --git a/previews/PR514/tutorials_template/tut_setup/index.html b/previews/PR514/tutorials_template/tut_setup/index.html index 2f9f0ea89..7320c136f 100644 --- a/previews/PR514/tutorials_template/tut_setup/index.html +++ b/previews/PR514/tutorials_template/tut_setup/index.html @@ -95,13 +95,13 @@ │ #threads: ……………………………………………………… 1 │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘ -#timesteps: 50 │ Δt: 2.5053e-03 │ sim. time: 1.2546e-01 (12.546%) │ run time: 3.5354e-01 s -#timesteps: 100 │ Δt: 3.8392e-03 │ sim. time: 2.8384e-01 (28.384%) │ run time: 7.6326e-01 s -#timesteps: 150 │ Δt: 1.5738e-03 │ sim. time: 4.0157e-01 (40.157%) │ run time: 1.1268e+00 s -#timesteps: 200 │ Δt: 4.4805e-04 │ sim. time: 5.2067e-01 (52.067%) │ run time: 1.4835e+00 s -#timesteps: 250 │ Δt: 6.3596e-04 │ sim. time: 6.4000e-01 (64.000%) │ run time: 1.8431e+00 s -#timesteps: 300 │ Δt: 3.0892e-03 │ sim. time: 7.7483e-01 (77.483%) │ run time: 2.2238e+00 s -#timesteps: 350 │ Δt: 3.0438e-03 │ sim. time: 8.9218e-01 (89.218%) │ run time: 2.6021e+00 s +#timesteps: 50 │ Δt: 2.5053e-03 │ sim. time: 1.2546e-01 (12.546%) │ run time: 3.5839e-01 s +#timesteps: 100 │ Δt: 3.8392e-03 │ sim. time: 2.8384e-01 (28.384%) │ run time: 7.6456e-01 s +#timesteps: 150 │ Δt: 1.5738e-03 │ sim. time: 4.0157e-01 (40.157%) │ run time: 1.1302e+00 s +#timesteps: 200 │ Δt: 4.4805e-04 │ sim. time: 5.2067e-01 (52.067%) │ run time: 1.4874e+00 s +#timesteps: 250 │ Δt: 6.3596e-04 │ sim. time: 6.4000e-01 (64.000%) │ run time: 1.8473e+00 s +#timesteps: 300 │ Δt: 3.0892e-03 │ sim. time: 7.7483e-01 (77.483%) │ run time: 2.2291e+00 s +#timesteps: 350 │ Δt: 3.0438e-03 │ sim. time: 8.9218e-01 (89.218%) │ run time: 2.6146e+00 s ──────────────────────────────────────────────────────────────────────────────────────────────────── Trixi simulation finished. Final time: 1.0 Time steps: 394 (accepted), 400 (total) ──────────────────────────────────────────────────────────────────────────────────────────────────── @@ -109,43 +109,43 @@ ──────────────────────────────────────────────────────────────────────────────── TrixiParticles.jl Time Allocations ─────────────────────── ──────────────────────── - Tot / % measured: 2.93s / 98.4% 141MiB / 98.5% + Tot / % measured: 2.97s / 98.4% 141MiB / 98.5% Section ncalls time %tot avg alloc %tot avg ──────────────────────────────────────────────────────────────────────────────── -kick! 2.00k 2.47s 85.6% 1.23ms 17.2MiB 12.4% 8.81KiB - system interaction 2.00k 2.03s 70.4% 1.01ms 1.88MiB 1.4% 985B - fluid1-fluid1 2.00k 1.69s 58.5% 842μs 0.00B 0.0% 0.00B - fluid1-boundary2 2.00k 336ms 11.6% 168μs 0.00B 0.0% 0.00B - ~system intera... 2.00k 6.69ms 0.2% 3.34μs 1.88MiB 1.4% 985B - boundary2-fluid1 2.00k 60.1μs 0.0% 30.0ns 0.00B 0.0% 0.00B - boundary2-boun... 2.00k 58.9μs 0.0% 29.4ns 0.00B 0.0% 0.00B - update systems a... 2.00k 437ms 15.1% 218μs 15.3MiB 11.1% 7.85KiB - compute bounda... 2.00k 284ms 9.9% 142μs 0.00B 0.0% 0.00B - update nhs 2.00k 96.8ms 3.4% 48.3μs 15.3MiB 11.1% 7.84KiB - inverse state ... 2.00k 28.3ms 1.0% 14.1μs 0.00B 0.0% 0.00B - ~update system... 2.00k 27.5ms 1.0% 13.7μs 1.55KiB 0.0% 0.79B - update density... 2.00k 58.6μs 0.0% 29.2ns 0.00B 0.0% 0.00B - source terms 2.00k 1.76ms 0.1% 877ns 0.00B 0.0% 0.00B - reset ∂v/∂t 2.00k 897μs 0.0% 448ns 0.00B 0.0% 0.00B - ~kick!~ 2.00k 796μs 0.0% 397ns 1.55KiB 0.0% 0.79B -save solution 50 412ms 14.3% 8.23ms 122MiB 87.6% 2.43MiB - write to vtk 100 380ms 13.2% 3.80ms 116MiB 83.3% 1.16MiB - ~save solution~ 50 20.9ms 0.7% 418μs 5.52MiB 4.0% 113KiB - update systems 50 10.4ms 0.4% 208μs 384KiB 0.3% 7.68KiB - compute bounda... 50 6.96ms 0.2% 139μs 0.00B 0.0% 0.00B - update nhs 50 2.04ms 0.1% 40.8μs 382KiB 0.3% 7.64KiB - inverse state ... 50 701μs 0.0% 14.0μs 0.00B 0.0% 0.00B - ~update systems~ 50 683μs 0.0% 13.7μs 1.55KiB 0.0% 31.7B - update density... 50 1.53μs 0.0% 30.7ns 0.00B 0.0% 0.00B -drift! 2.00k 3.29ms 0.1% 1.64μs 976B 0.0% 0.49B - velocity 2.00k 2.09ms 0.1% 1.05μs 0.00B 0.0% 0.00B - reset ∂u/∂t 2.00k 803μs 0.0% 401ns 0.00B 0.0% 0.00B - ~drift!~ 2.00k 396μs 0.0% 198ns 976B 0.0% 0.49B -compute boundary p... 1 156μs 0.0% 156μs 0.00B 0.0% 0.00B -update nhs 1 83.6μs 0.0% 83.6μs 7.38KiB 0.0% 7.38KiB -inverse state equa... 1 15.1μs 0.0% 15.1μs 0.00B 0.0% 0.00B -update density dif... 1 40.0ns 0.0% 40.0ns 0.00B 0.0% 0.00B +kick! 2.00k 2.48s 85.0% 1.24ms 17.2MiB 12.4% 8.81KiB + system interaction 2.00k 2.04s 69.8% 1.02ms 1.88MiB 1.4% 985B + fluid1-fluid1 2.00k 1.70s 58.1% 848μs 0.00B 0.0% 0.00B + fluid1-boundary2 2.00k 334ms 11.4% 167μs 0.00B 0.0% 0.00B + ~system intera... 2.00k 6.83ms 0.2% 3.41μs 1.88MiB 1.4% 985B + boundary2-boun... 2.00k 60.8μs 0.0% 30.4ns 0.00B 0.0% 0.00B + boundary2-fluid1 2.00k 59.1μs 0.0% 29.5ns 0.00B 0.0% 0.00B + update systems a... 2.00k 440ms 15.1% 220μs 15.3MiB 11.1% 7.84KiB + compute bounda... 2.00k 286ms 9.8% 143μs 0.00B 0.0% 0.00B + update nhs 2.00k 97.4ms 3.3% 48.6μs 15.3MiB 11.1% 7.84KiB + inverse state ... 2.00k 28.5ms 1.0% 14.2μs 0.00B 0.0% 0.00B + ~update system... 2.00k 27.7ms 1.0% 13.9μs 1.55KiB 0.0% 0.79B + update density... 2.00k 58.4μs 0.0% 29.2ns 0.00B 0.0% 0.00B + source terms 2.00k 1.74ms 0.1% 869ns 0.00B 0.0% 0.00B + ~kick!~ 2.00k 866μs 0.0% 432ns 1.55KiB 0.0% 0.79B + reset ∂v/∂t 2.00k 809μs 0.0% 404ns 0.00B 0.0% 0.00B +save solution 50 434ms 14.9% 8.68ms 122MiB 87.6% 2.43MiB + write to vtk 100 394ms 13.5% 3.94ms 116MiB 83.3% 1.16MiB + ~save solution~ 50 29.8ms 1.0% 595μs 5.52MiB 4.0% 113KiB + update systems 50 10.5ms 0.4% 210μs 384KiB 0.3% 7.68KiB + compute bounda... 50 7.05ms 0.2% 141μs 0.00B 0.0% 0.00B + update nhs 50 2.06ms 0.1% 41.2μs 382KiB 0.3% 7.64KiB + inverse state ... 50 706μs 0.0% 14.1μs 0.00B 0.0% 0.00B + ~update systems~ 50 704μs 0.0% 14.1μs 1.55KiB 0.0% 31.7B + update density... 50 1.45μs 0.0% 29.1ns 0.00B 0.0% 0.00B +drift! 2.00k 3.59ms 0.1% 1.79μs 976B 0.0% 0.49B + velocity 2.00k 2.34ms 0.1% 1.17μs 0.00B 0.0% 0.00B + reset ∂u/∂t 2.00k 812μs 0.0% 405ns 0.00B 0.0% 0.00B + ~drift!~ 2.00k 436μs 0.0% 218ns 976B 0.0% 0.49B +compute boundary p... 1 149μs 0.0% 149μs 0.00B 0.0% 0.00B +update nhs 1 145μs 0.0% 145μs 7.38KiB 0.0% 7.38KiB +inverse state equa... 1 14.5μs 0.0% 14.5μs 0.00B 0.0% 0.00B +update density dif... 1 30.0ns 0.0% 30.0ns 0.00B 0.0% 0.00B ────────────────────────────────────────────────────────────────────────────────

See Visualization for how to visualize the final solution. For the simplest visualization, we can use Plots.jl:

using Plots
 plot(sol)

plot

Replacing components with custom implementations

If we would like to use an implementation of a component that is not available in TrixiParticles.jl, we can implement it ourselves within the simulation file, without ever cloning the TrixiParticles.jl repository. A good starting point is to check out the available implementations in TrixiParticles.jl, then copy the relevant functions to the simulation file and modify them as needed.

Custom smoothing kernel

To implement a custom smoothing kernel, we define a struct extending TrixiParticles.SmoothingKernel. This abstract struct has a type parameter for the number of dimensions, which we set to 2 in this case.

struct MyGaussianKernel <: TrixiParticles.SmoothingKernel{2} end

This kernel is going to be an implementation of the Gaussian kernel with a cutoff for compact support, which reads

\[W(r, h) = \begin{cases} @@ -248,78 +248,78 @@ │ #threads: ……………………………………………………… 1 │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘ -#timesteps: 50 │ Δt: 6.1910e-06 │ sim. time: 5.9170e-02 (5.917%) │ run time: 2.6142e+00 s -#timesteps: 100 │ Δt: 1.4707e-03 │ sim. time: 7.2515e-02 (7.252%) │ run time: 2.6823e+00 s -#timesteps: 150 │ Δt: 4.0904e-09 │ sim. time: 9.9948e-02 (9.995%) │ run time: 2.7730e+00 s -#timesteps: 200 │ Δt: 2.3603e-04 │ sim. time: 1.2341e-01 (12.341%) │ run time: 2.8403e+00 s -#timesteps: 250 │ Δt: 8.2561e-10 │ sim. time: 1.5356e-01 (15.356%) │ run time: 2.9233e+00 s -#timesteps: 300 │ Δt: 4.3083e-04 │ sim. time: 1.6893e-01 (16.893%) │ run time: 2.9990e+00 s -#timesteps: 350 │ Δt: 6.0293e-05 │ sim. time: 1.9254e-01 (19.254%) │ run time: 3.0744e+00 s -#timesteps: 400 │ Δt: 9.7599e-05 │ sim. time: 2.1603e-01 (21.603%) │ run time: 3.1436e+00 s -#timesteps: 450 │ Δt: 6.9181e-04 │ sim. time: 2.4069e-01 (24.069%) │ run time: 3.2154e+00 s -#timesteps: 500 │ Δt: 1.7270e-04 │ sim. time: 2.6780e-01 (26.780%) │ run time: 3.2791e+00 s -#timesteps: 550 │ Δt: 5.9986e-05 │ sim. time: 2.7738e-01 (27.738%) │ run time: 3.3430e+00 s -#timesteps: 600 │ Δt: 1.8625e-10 │ sim. time: 2.8051e-01 (28.051%) │ run time: 3.4493e+00 s -#timesteps: 650 │ Δt: 4.1411e-04 │ sim. time: 2.8914e-01 (28.914%) │ run time: 3.4978e+00 s -#timesteps: 700 │ Δt: 2.7909e-04 │ sim. time: 3.0439e-01 (30.439%) │ run time: 3.5549e+00 s -#timesteps: 750 │ Δt: 4.8999e-04 │ sim. time: 3.2484e-01 (32.484%) │ run time: 3.6064e+00 s -#timesteps: 800 │ Δt: 3.2316e-04 │ sim. time: 3.4093e-01 (34.093%) │ run time: 3.6617e+00 s -#timesteps: 850 │ Δt: 3.6381e-04 │ sim. time: 3.5488e-01 (35.488%) │ run time: 3.7151e+00 s -#timesteps: 900 │ Δt: 1.3935e-04 │ sim. time: 3.6928e-01 (36.928%) │ run time: 3.7728e+00 s -#timesteps: 950 │ Δt: 2.9122e-04 │ sim. time: 3.8265e-01 (38.265%) │ run time: 3.8355e+00 s -#timesteps: 1000 │ Δt: 3.9265e-04 │ sim. time: 4.0287e-01 (40.287%) │ run time: 3.8831e+00 s -#timesteps: 1050 │ Δt: 3.0121e-04 │ sim. time: 4.1765e-01 (41.765%) │ run time: 3.9396e+00 s -#timesteps: 1100 │ Δt: 3.6827e-04 │ sim. time: 4.3071e-01 (43.071%) │ run time: 3.9963e+00 s -#timesteps: 1150 │ Δt: 5.0946e-04 │ sim. time: 4.4505e-01 (44.505%) │ run time: 4.0537e+00 s -#timesteps: 1200 │ Δt: 2.8520e-04 │ sim. time: 4.6113e-01 (46.113%) │ run time: 4.1074e+00 s -#timesteps: 1250 │ Δt: 3.5300e-04 │ sim. time: 4.7955e-01 (47.955%) │ run time: 4.1579e+00 s -#timesteps: 1300 │ Δt: 3.5639e-04 │ sim. time: 4.9061e-01 (49.061%) │ run time: 4.2206e+00 s -#timesteps: 1350 │ Δt: 3.1861e-04 │ sim. time: 5.0449e-01 (50.449%) │ run time: 4.2738e+00 s -#timesteps: 1400 │ Δt: 3.4023e-04 │ sim. time: 5.1706e-01 (51.706%) │ run time: 4.3268e+00 s -#timesteps: 1450 │ Δt: 3.5477e-04 │ sim. time: 5.3042e-01 (53.042%) │ run time: 4.3910e+00 s -#timesteps: 1500 │ Δt: 3.5992e-04 │ sim. time: 5.4408e-01 (54.408%) │ run time: 4.4472e+00 s -#timesteps: 1550 │ Δt: 3.5594e-04 │ sim. time: 5.5812e-01 (55.812%) │ run time: 4.5023e+00 s -#timesteps: 1600 │ Δt: 1.4553e-04 │ sim. time: 5.7286e-01 (57.286%) │ run time: 4.5599e+00 s -#timesteps: 1650 │ Δt: 3.2888e-04 │ sim. time: 5.8380e-01 (58.380%) │ run time: 4.6173e+00 s -#timesteps: 1700 │ Δt: 2.9151e-04 │ sim. time: 5.9640e-01 (59.640%) │ run time: 4.6658e+00 s -#timesteps: 1750 │ Δt: 7.8861e-05 │ sim. time: 6.0694e-01 (60.694%) │ run time: 4.7270e+00 s -#timesteps: 1800 │ Δt: 2.4776e-04 │ sim. time: 6.1820e-01 (61.820%) │ run time: 4.7802e+00 s -#timesteps: 1850 │ Δt: 2.3715e-04 │ sim. time: 6.2783e-01 (62.783%) │ run time: 4.8403e+00 s -#timesteps: 1900 │ Δt: 1.9097e-04 │ sim. time: 6.4041e-01 (64.041%) │ run time: 4.8965e+00 s -#timesteps: 1950 │ Δt: 2.2910e-04 │ sim. time: 6.4947e-01 (64.947%) │ run time: 4.9568e+00 s -#timesteps: 2000 │ Δt: 3.0552e-04 │ sim. time: 6.5919e-01 (65.919%) │ run time: 5.0104e+00 s -#timesteps: 2050 │ Δt: 2.3880e-04 │ sim. time: 6.7015e-01 (67.015%) │ run time: 5.0693e+00 s -#timesteps: 2100 │ Δt: 1.0975e-04 │ sim. time: 6.7924e-01 (67.924%) │ run time: 5.1289e+00 s -#timesteps: 2150 │ Δt: 1.8457e-04 │ sim. time: 6.8890e-01 (68.890%) │ run time: 5.1878e+00 s -#timesteps: 2200 │ Δt: 2.1626e-04 │ sim. time: 6.9965e-01 (69.965%) │ run time: 5.2434e+00 s -#timesteps: 2250 │ Δt: 2.1010e-04 │ sim. time: 7.0758e-01 (70.758%) │ run time: 5.3070e+00 s -#timesteps: 2300 │ Δt: 2.6005e-04 │ sim. time: 7.1723e-01 (71.723%) │ run time: 5.3602e+00 s -#timesteps: 2350 │ Δt: 1.7561e-04 │ sim. time: 7.2655e-01 (72.655%) │ run time: 5.4234e+00 s -#timesteps: 2400 │ Δt: 1.9188e-04 │ sim. time: 7.3465e-01 (73.465%) │ run time: 5.4817e+00 s -#timesteps: 2450 │ Δt: 1.8705e-04 │ sim. time: 7.4595e-01 (74.595%) │ run time: 5.5383e+00 s -#timesteps: 2500 │ Δt: 1.5304e-04 │ sim. time: 7.5819e-01 (75.819%) │ run time: 5.5906e+00 s -#timesteps: 2550 │ Δt: 2.3839e-04 │ sim. time: 7.6917e-01 (76.917%) │ run time: 5.6475e+00 s -#timesteps: 2600 │ Δt: 1.4023e-05 │ sim. time: 7.8001e-01 (78.001%) │ run time: 5.7063e+00 s -#timesteps: 2650 │ Δt: 1.7156e-04 │ sim. time: 7.8759e-01 (78.759%) │ run time: 5.7652e+00 s -#timesteps: 2700 │ Δt: 1.6517e-04 │ sim. time: 7.9737e-01 (79.737%) │ run time: 5.8231e+00 s -#timesteps: 2750 │ Δt: 2.0952e-04 │ sim. time: 8.0875e-01 (80.875%) │ run time: 5.8792e+00 s -#timesteps: 2800 │ Δt: 1.8624e-04 │ sim. time: 8.1723e-01 (81.723%) │ run time: 5.9401e+00 s -#timesteps: 2850 │ Δt: 2.2248e-04 │ sim. time: 8.2787e-01 (82.787%) │ run time: 6.0002e+00 s -#timesteps: 2900 │ Δt: 1.3659e-04 │ sim. time: 8.3563e-01 (83.563%) │ run time: 6.0639e+00 s -#timesteps: 2950 │ Δt: 2.4461e-04 │ sim. time: 8.4472e-01 (84.472%) │ run time: 6.1222e+00 s -#timesteps: 3000 │ Δt: 3.0482e-04 │ sim. time: 8.5723e-01 (85.723%) │ run time: 6.1730e+00 s -#timesteps: 3050 │ Δt: 2.5103e-04 │ sim. time: 8.6980e-01 (86.980%) │ run time: 6.2339e+00 s -#timesteps: 3100 │ Δt: 2.4685e-04 │ sim. time: 8.8217e-01 (88.217%) │ run time: 6.2900e+00 s -#timesteps: 3150 │ Δt: 3.1694e-04 │ sim. time: 8.9459e-01 (89.459%) │ run time: 6.3423e+00 s -#timesteps: 3200 │ Δt: 2.9580e-04 │ sim. time: 9.0587e-01 (90.587%) │ run time: 6.3977e+00 s -#timesteps: 3250 │ Δt: 2.4739e-04 │ sim. time: 9.1647e-01 (91.647%) │ run time: 6.4532e+00 s -#timesteps: 3300 │ Δt: 2.7100e-04 │ sim. time: 9.2760e-01 (92.760%) │ run time: 6.5183e+00 s -#timesteps: 3350 │ Δt: 3.2485e-04 │ sim. time: 9.3869e-01 (93.869%) │ run time: 6.5730e+00 s -#timesteps: 3400 │ Δt: 3.3051e-04 │ sim. time: 9.5006e-01 (95.006%) │ run time: 6.6358e+00 s -#timesteps: 3450 │ Δt: 2.2418e-04 │ sim. time: 9.6292e-01 (96.292%) │ run time: 6.6956e+00 s -#timesteps: 3500 │ Δt: 3.7471e-04 │ sim. time: 9.7439e-01 (97.439%) │ run time: 6.7538e+00 s -#timesteps: 3550 │ Δt: 2.5104e-04 │ sim. time: 9.8649e-01 (98.649%) │ run time: 6.8148e+00 s -#timesteps: 3600 │ Δt: 2.1778e-04 │ sim. time: 9.9921e-01 (99.921%) │ run time: 6.8710e+00 s +#timesteps: 50 │ Δt: 6.1910e-06 │ sim. time: 5.9170e-02 (5.917%) │ run time: 2.6970e+00 s +#timesteps: 100 │ Δt: 1.4707e-03 │ sim. time: 7.2515e-02 (7.252%) │ run time: 2.7672e+00 s +#timesteps: 150 │ Δt: 4.0904e-09 │ sim. time: 9.9948e-02 (9.995%) │ run time: 2.8594e+00 s +#timesteps: 200 │ Δt: 2.3603e-04 │ sim. time: 1.2341e-01 (12.341%) │ run time: 2.9272e+00 s +#timesteps: 250 │ Δt: 8.2561e-10 │ sim. time: 1.5356e-01 (15.356%) │ run time: 3.0106e+00 s +#timesteps: 300 │ Δt: 4.3083e-04 │ sim. time: 1.6893e-01 (16.893%) │ run time: 3.0866e+00 s +#timesteps: 350 │ Δt: 6.0293e-05 │ sim. time: 1.9254e-01 (19.254%) │ run time: 3.1618e+00 s +#timesteps: 400 │ Δt: 9.7599e-05 │ sim. time: 2.1603e-01 (21.603%) │ run time: 3.2310e+00 s +#timesteps: 450 │ Δt: 6.9181e-04 │ sim. time: 2.4069e-01 (24.069%) │ run time: 3.3015e+00 s +#timesteps: 500 │ Δt: 1.7270e-04 │ sim. time: 2.6780e-01 (26.780%) │ run time: 3.3655e+00 s +#timesteps: 550 │ Δt: 5.9986e-05 │ sim. time: 2.7738e-01 (27.738%) │ run time: 3.4294e+00 s +#timesteps: 600 │ Δt: 1.8625e-10 │ sim. time: 2.8051e-01 (28.051%) │ run time: 3.5393e+00 s +#timesteps: 650 │ Δt: 4.1411e-04 │ sim. time: 2.8914e-01 (28.914%) │ run time: 3.5990e+00 s +#timesteps: 700 │ Δt: 2.7909e-04 │ sim. time: 3.0439e-01 (30.439%) │ run time: 3.6574e+00 s +#timesteps: 750 │ Δt: 4.8999e-04 │ sim. time: 3.2484e-01 (32.484%) │ run time: 3.7096e+00 s +#timesteps: 800 │ Δt: 3.2316e-04 │ sim. time: 3.4093e-01 (34.093%) │ run time: 3.7651e+00 s +#timesteps: 850 │ Δt: 3.6381e-04 │ sim. time: 3.5488e-01 (35.488%) │ run time: 3.8189e+00 s +#timesteps: 900 │ Δt: 1.3935e-04 │ sim. time: 3.6928e-01 (36.928%) │ run time: 3.8772e+00 s +#timesteps: 950 │ Δt: 2.9122e-04 │ sim. time: 3.8265e-01 (38.265%) │ run time: 3.9410e+00 s +#timesteps: 1000 │ Δt: 3.9265e-04 │ sim. time: 4.0287e-01 (40.287%) │ run time: 3.9893e+00 s +#timesteps: 1050 │ Δt: 3.0121e-04 │ sim. time: 4.1765e-01 (41.765%) │ run time: 4.0425e+00 s +#timesteps: 1100 │ Δt: 3.6827e-04 │ sim. time: 4.3071e-01 (43.071%) │ run time: 4.1034e+00 s +#timesteps: 1150 │ Δt: 5.0946e-04 │ sim. time: 4.4505e-01 (44.505%) │ run time: 4.1612e+00 s +#timesteps: 1200 │ Δt: 2.8520e-04 │ sim. time: 4.6113e-01 (46.113%) │ run time: 4.2156e+00 s +#timesteps: 1250 │ Δt: 3.5300e-04 │ sim. time: 4.7955e-01 (47.955%) │ run time: 4.2645e+00 s +#timesteps: 1300 │ Δt: 3.5639e-04 │ sim. time: 4.9061e-01 (49.061%) │ run time: 4.3300e+00 s +#timesteps: 1350 │ Δt: 3.1861e-04 │ sim. time: 5.0449e-01 (50.449%) │ run time: 4.3834e+00 s +#timesteps: 1400 │ Δt: 3.4023e-04 │ sim. time: 5.1706e-01 (51.706%) │ run time: 4.4362e+00 s +#timesteps: 1450 │ Δt: 3.5477e-04 │ sim. time: 5.3042e-01 (53.042%) │ run time: 4.4979e+00 s +#timesteps: 1500 │ Δt: 3.5992e-04 │ sim. time: 5.4408e-01 (54.408%) │ run time: 4.5574e+00 s +#timesteps: 1550 │ Δt: 3.5594e-04 │ sim. time: 5.5812e-01 (55.812%) │ run time: 4.6121e+00 s +#timesteps: 1600 │ Δt: 1.4553e-04 │ sim. time: 5.7286e-01 (57.286%) │ run time: 4.6698e+00 s +#timesteps: 1650 │ Δt: 3.2888e-04 │ sim. time: 5.8380e-01 (58.380%) │ run time: 4.7257e+00 s +#timesteps: 1700 │ Δt: 2.9151e-04 │ sim. time: 5.9640e-01 (59.640%) │ run time: 4.7775e+00 s +#timesteps: 1750 │ Δt: 7.8861e-05 │ sim. time: 6.0694e-01 (60.694%) │ run time: 4.8394e+00 s +#timesteps: 1800 │ Δt: 2.4776e-04 │ sim. time: 6.1820e-01 (61.820%) │ run time: 4.8918e+00 s +#timesteps: 1850 │ Δt: 2.3715e-04 │ sim. time: 6.2783e-01 (62.783%) │ run time: 4.9524e+00 s +#timesteps: 1900 │ Δt: 1.9097e-04 │ sim. time: 6.4041e-01 (64.041%) │ run time: 5.0093e+00 s +#timesteps: 1950 │ Δt: 2.2910e-04 │ sim. time: 6.4947e-01 (64.947%) │ run time: 5.0702e+00 s +#timesteps: 2000 │ Δt: 3.0552e-04 │ sim. time: 6.5919e-01 (65.919%) │ run time: 5.1240e+00 s +#timesteps: 2050 │ Δt: 2.3880e-04 │ sim. time: 6.7015e-01 (67.015%) │ run time: 5.1831e+00 s +#timesteps: 2100 │ Δt: 1.0975e-04 │ sim. time: 6.7924e-01 (67.924%) │ run time: 5.2404e+00 s +#timesteps: 2150 │ Δt: 1.8457e-04 │ sim. time: 6.8890e-01 (68.890%) │ run time: 5.3022e+00 s +#timesteps: 2200 │ Δt: 2.1626e-04 │ sim. time: 6.9965e-01 (69.965%) │ run time: 5.3570e+00 s +#timesteps: 2250 │ Δt: 2.1010e-04 │ sim. time: 7.0758e-01 (70.758%) │ run time: 5.4206e+00 s +#timesteps: 2300 │ Δt: 2.6005e-04 │ sim. time: 7.1723e-01 (71.723%) │ run time: 5.4734e+00 s +#timesteps: 2350 │ Δt: 1.7561e-04 │ sim. time: 7.2655e-01 (72.655%) │ run time: 5.5347e+00 s +#timesteps: 2400 │ Δt: 1.9188e-04 │ sim. time: 7.3465e-01 (73.465%) │ run time: 5.5956e+00 s +#timesteps: 2450 │ Δt: 1.8705e-04 │ sim. time: 7.4595e-01 (74.595%) │ run time: 5.6529e+00 s +#timesteps: 2500 │ Δt: 1.5304e-04 │ sim. time: 7.5819e-01 (75.819%) │ run time: 5.7050e+00 s +#timesteps: 2550 │ Δt: 2.3839e-04 │ sim. time: 7.6917e-01 (76.917%) │ run time: 5.7618e+00 s +#timesteps: 2600 │ Δt: 1.4023e-05 │ sim. time: 7.8001e-01 (78.001%) │ run time: 5.8187e+00 s +#timesteps: 2650 │ Δt: 1.7156e-04 │ sim. time: 7.8759e-01 (78.759%) │ run time: 5.8801e+00 s +#timesteps: 2700 │ Δt: 1.6517e-04 │ sim. time: 7.9737e-01 (79.737%) │ run time: 5.9379e+00 s +#timesteps: 2750 │ Δt: 2.0952e-04 │ sim. time: 8.0875e-01 (80.875%) │ run time: 5.9943e+00 s +#timesteps: 2800 │ Δt: 1.8624e-04 │ sim. time: 8.1723e-01 (81.723%) │ run time: 6.0553e+00 s +#timesteps: 2850 │ Δt: 2.2248e-04 │ sim. time: 8.2787e-01 (82.787%) │ run time: 6.1157e+00 s +#timesteps: 2900 │ Δt: 1.3659e-04 │ sim. time: 8.3563e-01 (83.563%) │ run time: 6.1793e+00 s +#timesteps: 2950 │ Δt: 2.4461e-04 │ sim. time: 8.4472e-01 (84.472%) │ run time: 6.2381e+00 s +#timesteps: 3000 │ Δt: 3.0482e-04 │ sim. time: 8.5723e-01 (85.723%) │ run time: 6.2883e+00 s +#timesteps: 3050 │ Δt: 2.5103e-04 │ sim. time: 8.6980e-01 (86.980%) │ run time: 6.3464e+00 s +#timesteps: 3100 │ Δt: 2.4685e-04 │ sim. time: 8.8217e-01 (88.217%) │ run time: 6.4031e+00 s +#timesteps: 3150 │ Δt: 3.1694e-04 │ sim. time: 8.9459e-01 (89.459%) │ run time: 6.4547e+00 s +#timesteps: 3200 │ Δt: 2.9580e-04 │ sim. time: 9.0587e-01 (90.587%) │ run time: 6.5091e+00 s +#timesteps: 3250 │ Δt: 2.4739e-04 │ sim. time: 9.1647e-01 (91.647%) │ run time: 6.5640e+00 s +#timesteps: 3300 │ Δt: 2.7100e-04 │ sim. time: 9.2760e-01 (92.760%) │ run time: 6.6304e+00 s +#timesteps: 3350 │ Δt: 3.2485e-04 │ sim. time: 9.3869e-01 (93.869%) │ run time: 6.6854e+00 s +#timesteps: 3400 │ Δt: 3.3051e-04 │ sim. time: 9.5006e-01 (95.006%) │ run time: 6.7480e+00 s +#timesteps: 3450 │ Δt: 2.2418e-04 │ sim. time: 9.6292e-01 (96.292%) │ run time: 6.8073e+00 s +#timesteps: 3500 │ Δt: 3.7471e-04 │ sim. time: 9.7439e-01 (97.439%) │ run time: 6.8656e+00 s +#timesteps: 3550 │ Δt: 2.5104e-04 │ sim. time: 9.8649e-01 (98.649%) │ run time: 6.9269e+00 s +#timesteps: 3600 │ Δt: 2.1778e-04 │ sim. time: 9.9921e-01 (99.921%) │ run time: 6.9827e+00 s ──────────────────────────────────────────────────────────────────────────────────────────────────── Trixi simulation finished. Final time: 1.0 Time steps: 3603 (accepted), 4623 (total) ──────────────────────────────────────────────────────────────────────────────────────────────────── @@ -327,41 +327,41 @@ ──────────────────────────────────────────────────────────────────────────────── TrixiParticles.jl Time Allocations ─────────────────────── ──────────────────────── - Tot / % measured: 6.87s / 65.8% 480MiB / 76.4% + Tot / % measured: 6.99s / 65.1% 480MiB / 76.4% Section ncalls time %tot avg alloc %tot avg ──────────────────────────────────────────────────────────────────────────────── -kick! 23.1k 3.99s 88.1% 172μs 267MiB 72.9% 11.8KiB - system interaction 23.1k 2.51s 55.5% 109μs 21.7MiB 5.9% 984B - fluid1-fluid1 23.1k 1.58s 34.9% 68.4μs 0.00B 0.0% 0.00B - fluid1-boundary2 23.1k 868ms 19.2% 37.5μs 0.00B 0.0% 0.00B - ~system intera... 23.1k 61.7ms 1.4% 2.67μs 21.7MiB 5.9% 984B - boundary2-boun... 23.1k 688μs 0.0% 29.8ns 0.00B 0.0% 0.00B - boundary2-fluid1 23.1k 687μs 0.0% 29.7ns 0.00B 0.0% 0.00B - update systems a... 23.1k 1.45s 32.1% 62.9μs 245MiB 67.0% 10.9KiB - compute bounda... 23.1k 734ms 16.2% 31.8μs 0.00B 0.0% 0.00B - update nhs 23.1k 558ms 12.3% 24.1μs 245MiB 67.0% 10.9KiB - ~update system... 23.1k 100ms 2.2% 4.33μs 1.55KiB 0.0% 0.07B - inverse state ... 23.1k 60.5ms 1.3% 2.62μs 0.00B 0.0% 0.00B - update density... 23.1k 672μs 0.0% 29.1ns 0.00B 0.0% 0.00B - source terms 23.1k 9.89ms 0.2% 428ns 0.00B 0.0% 0.00B - ~kick!~ 23.1k 7.34ms 0.2% 317ns 1.55KiB 0.0% 0.07B - reset ∂v/∂t 23.1k 3.23ms 0.1% 140ns 0.00B 0.0% 0.00B -save solution 50 520ms 11.5% 10.4ms 99.1MiB 27.0% 1.98MiB - write to vtk 100 273ms 6.0% 2.73ms 86.4MiB 23.6% 885KiB - ~save solution~ 50 244ms 5.4% 4.88ms 12.1MiB 3.3% 249KiB - update systems 50 3.14ms 0.1% 62.8μs 544KiB 0.1% 10.9KiB +kick! 23.1k 4.00s 87.9% 173μs 267MiB 72.9% 11.8KiB + system interaction 23.1k 2.50s 55.0% 108μs 21.7MiB 5.9% 984B + fluid1-fluid1 23.1k 1.58s 34.7% 68.4μs 0.00B 0.0% 0.00B + fluid1-boundary2 23.1k 858ms 18.9% 37.1μs 0.00B 0.0% 0.00B + ~system intera... 23.1k 64.1ms 1.4% 2.77μs 21.7MiB 5.9% 984B + boundary2-fluid1 23.1k 701μs 0.0% 30.3ns 0.00B 0.0% 0.00B + boundary2-boun... 23.1k 690μs 0.0% 29.8ns 0.00B 0.0% 0.00B + update systems a... 23.1k 1.47s 32.4% 63.7μs 245MiB 67.0% 10.9KiB + compute bounda... 23.1k 728ms 16.0% 31.5μs 0.00B 0.0% 0.00B + update nhs 23.1k 583ms 12.8% 25.2μs 245MiB 67.0% 10.9KiB + ~update system... 23.1k 101ms 2.2% 4.38μs 1.55KiB 0.0% 0.07B + inverse state ... 23.1k 59.5ms 1.3% 2.57μs 0.00B 0.0% 0.00B + update density... 23.1k 680μs 0.0% 29.4ns 0.00B 0.0% 0.00B + source terms 23.1k 10.0ms 0.2% 435ns 0.00B 0.0% 0.00B + ~kick!~ 23.1k 8.13ms 0.2% 352ns 1.55KiB 0.0% 0.07B + reset ∂v/∂t 23.1k 3.10ms 0.1% 134ns 0.00B 0.0% 0.00B +save solution 50 535ms 11.8% 10.7ms 99.1MiB 27.0% 1.98MiB + write to vtk 100 289ms 6.3% 2.89ms 86.4MiB 23.6% 885KiB + ~save solution~ 50 243ms 5.3% 4.86ms 12.1MiB 3.3% 249KiB + update systems 50 3.17ms 0.1% 63.3μs 544KiB 0.1% 10.9KiB compute bounda... 50 1.60ms 0.0% 31.9μs 0.00B 0.0% 0.00B - update nhs 50 1.17ms 0.0% 23.5μs 542KiB 0.1% 10.8KiB - ~update systems~ 50 237μs 0.0% 4.74μs 1.55KiB 0.0% 31.7B - inverse state ... 50 130μs 0.0% 2.60μs 0.00B 0.0% 0.00B - update density... 50 1.94μs 0.0% 38.7ns 0.00B 0.0% 0.00B -drift! 23.1k 18.3ms 0.4% 794ns 976B 0.0% 0.04B - velocity 23.1k 11.4ms 0.3% 492ns 0.00B 0.0% 0.00B - ~drift!~ 23.1k 4.07ms 0.1% 176ns 976B 0.0% 0.04B - reset ∂u/∂t 23.1k 2.90ms 0.1% 125ns 0.00B 0.0% 0.00B -update nhs 1 69.6μs 0.0% 69.6μs 11.4KiB 0.0% 11.4KiB -compute boundary p... 1 51.4μs 0.0% 51.4μs 0.00B 0.0% 0.00B -inverse state equa... 1 2.73μs 0.0% 2.73μs 0.00B 0.0% 0.00B + update nhs 50 1.19ms 0.0% 23.9μs 542KiB 0.1% 10.8KiB + ~update systems~ 50 248μs 0.0% 4.96μs 1.55KiB 0.0% 31.7B + inverse state ... 50 125μs 0.0% 2.51μs 0.00B 0.0% 0.00B + update density... 50 2.68μs 0.0% 53.5ns 0.00B 0.0% 0.00B +drift! 23.1k 17.6ms 0.4% 762ns 976B 0.0% 0.04B + velocity 23.1k 10.6ms 0.2% 457ns 0.00B 0.0% 0.00B + ~drift!~ 23.1k 4.18ms 0.1% 181ns 976B 0.0% 0.04B + reset ∂u/∂t 23.1k 2.87ms 0.1% 124ns 0.00B 0.0% 0.00B +update nhs 1 76.4μs 0.0% 76.4μs 11.4KiB 0.0% 11.4KiB +compute boundary p... 1 63.2μs 0.0% 63.2μs 0.00B 0.0% 0.00B +inverse state equa... 1 3.24μs 0.0% 3.24μs 0.00B 0.0% 0.00B update density dif... 1 30.0ns 0.0% 30.0ns 0.00B 0.0% 0.00B -────────────────────────────────────────────────────────────────────────────────

+──────────────────────────────────────────────────────────────────────────────── diff --git a/previews/PR514/visualization/index.html b/previews/PR514/visualization/index.html index ddaaafb58..fb3751e1a 100644 --- a/previews/PR514/visualization/index.html +++ b/previews/PR514/visualization/index.html @@ -3,6 +3,6 @@ write_meta_data=true, max_coordinates=Inf, custom_quantities...)

Convert Trixi simulation data to VTK format.

Arguments

Keywords

Example

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)
source
TrixiParticles.trixi2vtkMethod
trixi2vtk(coordinates; output_directory="out", prefix="", filename="coordinates",
-          custom_quantities...)

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.
  • custom_quantities...: Additional custom quantities to include in the VTK output.

Returns

  • file::AbstractString: Path to the generated VTK file.
source
TrixiParticles.trixi2vtkMethod
trixi2vtk(initial_condition::InitialCondition; output_directory="out",
-          prefix="", filename="initial_condition", custom_quantities...)

Convert InitialCondition data to VTK format.

Arguments

Keywords

  • output_directory="out": Output directory path.
  • prefix="": Prefix for the output file.
  • filename="coordinates": Name of the output file.
  • custom_quantities...: Additional custom quantities to include in the VTK output.

Returns

  • file::AbstractString: Path to the generated VTK file.
source
+trixi2vtk(sol.u[end], semi, 0.0, iter=1, my_custom_quantity=kinetic_energy)source
TrixiParticles.trixi2vtkMethod
trixi2vtk(coordinates; output_directory="out", prefix="", filename="coordinates",
+          custom_quantities...)

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.
  • custom_quantities...: Additional custom quantities to include in the VTK output.

Returns

  • file::AbstractString: Path to the generated VTK file.
source
TrixiParticles.trixi2vtkMethod
trixi2vtk(initial_condition::InitialCondition; output_directory="out",
+          prefix="", filename="initial_condition", custom_quantities...)

Convert InitialCondition data to VTK format.

Arguments

Keywords

  • output_directory="out": Output directory path.
  • prefix="": Prefix for the output file.
  • filename="coordinates": Name of the output file.
  • custom_quantities...: Additional custom quantities to include in the VTK output.

Returns

  • file::AbstractString: Path to the generated VTK file.
source