Skip to content

Commit

Permalink
Merge pull request #73 from ManuelLerchner/67-sheet-4-task-3-simulati…
Browse files Browse the repository at this point in the history
…on-of-a-falling-drop-liquid

Simulation of a falling drop liquid
  • Loading branch information
ManuelLerchner authored Dec 10, 2023
2 parents 6efc415 + bc209ba commit cbc2406
Show file tree
Hide file tree
Showing 127 changed files with 7,801 additions and 2,715 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,9 @@ jobs:
cmake ..
make clangformat
- name: Quit if there are no changes
- name: Quit if there are no changes else exit with error
run: |
if [[ -z $(git status -s) ]]; then
echo "No changes to the formatting."
exit 0
fi
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "Apply clang-format"
- name: Push changes
if: steps.verify_diff.outputs.changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fi && exit 1
5 changes: 3 additions & 2 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,9 @@ EXCLUDE_SYMLINKS = NO
# against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/*

EXCLUDE_PATTERNS = *vtk-unstructured.* \
*simulation_schema.* \
EXCLUDE_PATTERNS = *vtu_file_schema.* \
*simulation_input_schema.* \
*checkpoint_schema.*

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down
2 changes: 1 addition & 1 deletion docs/InputFileFormats.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ An example file could look like this:

### .xml

The `.xml` file format can be used to specify all the input parameters for the simulation at once. Therefore it is preferred over the other file formats.
The `.xml` file format can be used to specify all the input parameters for the simulation at once. Therefore, it is preferred over the other file formats.

Its definition is based on the [simulation_schema.xsd](simulation_schema.xsd) file, which is used to validate the input file. The file contains a single root element `<configuration>` with the following child elements:

Expand Down
4 changes: 2 additions & 2 deletions docs/ParticleContainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Overview

Currently there exist two different particle container implementations:
Currently, there exist two different particle container implementations:

- DirectSumContainer: A naive implementation, which calculates the forces between all particles
- LinkedCellsContainer: A more efficient implementation, which uses the linked cells algorithm to calculate the forces between particles
Expand All @@ -26,7 +26,7 @@ The following graphs show the runtime of the two implementations for different n

It is interesting to note, that it can be seen quite clearly, that the runtime of the DirectSumContainer increases quadratically with the number of particles, while the runtime of the LinkedCellsContainer increases linearly.

Additionally the benchmark was about twice as fast on an Intel Core i5-12600 CPU than on an AMD Ryzen 5 3600 CPU.
Additionally, the benchmark was about twice as fast on an Intel Core i5-12600 CPU than on an AMD Ryzen 5 3600 CPU.

### AMD Ryzen 5 3600

Expand Down
96 changes: 0 additions & 96 deletions input/body_collision.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Cube 1
0.0 0.0 0.0 # lower left
40 8 1 # grid dimensions
1.1225 # grid spacing
1.1225 # grid spacing
1.0 # mass
0.0 0.0 0.0 # velocity
0.1 # initial temperature (using brownian motion)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- just a sanity check: body collision rewritten to xml -->
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="simulation_schema.xsd">
xsi:noNamespaceSchemaLocation="../simulation_schema.xsd">

<settings>
<fps>24</fps>
Expand All @@ -18,35 +18,25 @@
</domain_size>
<cutoff_radius>3.0</cutoff_radius>
<boundary_conditions>
<left>
<outflow />
</left>
<right>
<outflow />
</right>
<bottom>
<outflow />
</bottom>
<top>
<outflow />
</top>
<back>
<outflow />
</back>
<front>
<outflow />
</front>
<left>Outflow</left>
<right>Outflow</right>
<bottom>Outflow</bottom>
<top>Outflow</top>
<back>Outflow</back>
<front>Outflow</front>
</boundary_conditions>
</linkedcells_container>
</particle_container>
<force>LennardJones</force>
<thermostat>
<target_temperature>0</target_temperature>
<max_temperature_change>0</max_temperature_change>
<application_interval>10000000</application_interval>
</thermostat>
</settings>

<particles>

<particle_source>
<cuboid_spawner>
<lower_left_front_corner>
<x>20.0</x>
Expand Down Expand Up @@ -91,6 +81,6 @@
<type>1</type>
</cuboid_spawner>

</particles>
</particle_source>

</configuration>
58 changes: 58 additions & 0 deletions input/equilibration/multiple_recursive_levels.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../simulation_schema.xsd">

<settings>
<fps>24</fps>
<video_length>30</video_length>
<delta_t>0.005</delta_t>
<end_time>10.0</end_time>
<third_dimension>false</third_dimension>
<particle_container>
<linkedcells_container>
<domain_size>
<x>100</x>
<y>100</y>
<z>10</z>
</domain_size>
<cutoff_radius>3.0</cutoff_radius>
<boundary_conditions>
<left>Reflective</left>
<right>Reflective</right>
<bottom>Reflective</bottom>
<top>Reflective</top>
<back>Reflective</back>
<front>Reflective</front>
</boundary_conditions>
</linkedcells_container>
</particle_container>
<force>LennardJones</force>
<thermostat>
<target_temperature>0</target_temperature>
<max_temperature_change>0</max_temperature_change>
<application_interval>10000000</application_interval>
</thermostat>
</settings>

<particle_source>
<sub_simulation>
<name>
Top Left
</name>
<file_name>
./subsimulations/top_left.xml
</file_name>
</sub_simulation>

<sub_simulation>
<name>
Bottom Left
</name>
<file_name>
./subsimulations/bottom_left.xml
</file_name>
</sub_simulation>

</particle_source>

</configuration>
57 changes: 57 additions & 0 deletions input/equilibration/subsimulations/bottom_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../simulation_schema.xsd">

<settings>
<fps>24</fps>
<video_length>30</video_length>
<delta_t>0.005</delta_t>
<end_time>1.0</end_time>
<third_dimension>false</third_dimension>
<particle_container>
<linkedcells_container>
<domain_size>
<x>100</x>
<y>100</y>
<z>10</z>
</domain_size>
<cutoff_radius>3.0</cutoff_radius>
<boundary_conditions>
<left>Reflective</left>
<right>Reflective</right>
<bottom>Reflective</bottom>
<top>Reflective</top>
<back>Reflective</back>
<front>Reflective</front>
</boundary_conditions>
</linkedcells_container>
</particle_container>
<force>LennardJones</force>
<thermostat>
<target_temperature>0</target_temperature>
<max_temperature_change>0</max_temperature_change>
<application_interval>10000000</application_interval>
</thermostat>
</settings>

<particle_source>
<sphere_spawner>
<center>
<x>20.0</x>
<y>20.0</y>
<z>5</z>
</center>
<radius>5</radius>
<grid_spacing>1.1225</grid_spacing>
<temperature>0.1</temperature>
<mass>1.0</mass>
<velocity>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</velocity>
<type>0</type>
</sphere_spawner>
</particle_source>

</configuration>
Loading

0 comments on commit cbc2406

Please sign in to comment.