Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds breaking dam test cases #279

Merged
merged 46 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
aaa80cd
Adds breaking dam 2D test case
KyleDavisSA Jun 29, 2022
5c385a8
Update flap.inp
KyleDavisSA Jun 29, 2022
b3d1968
Add README and additional files
KyleDavisSA Dec 8, 2022
ad2b774
Fix polymesh
KyleDavisSA Dec 8, 2022
f887edf
Update README
KyleDavisSA Dec 8, 2022
9cfc96f
Adds the breaking dam 3D test case
KyleDavisSA Dec 8, 2022
2797906
Revert "Adds the breaking dam 3D test case"
KyleDavisSA Dec 8, 2022
e88fd39
Revert "Revert "Adds the breaking dam 3D test case""
KyleDavisSA Dec 8, 2022
a0dbfd9
Fixes README
KyleDavisSA Dec 8, 2022
7e01ee0
Fixes README
KyleDavisSA Dec 8, 2022
e8ed4be
Update exchance variable names
KyleDavisSA Jan 31, 2023
51b3921
Update image names
KyleDavisSA Jan 31, 2023
bba19ff
Update breaking-dam-2d/fluid-openfoam/0/U
KyleDavisSA Feb 8, 2023
46d3dc5
Update breaking-dam-2d/fluid-openfoam/0/alpha.water
KyleDavisSA Feb 8, 2023
fcd7f50
Update breaking-dam-2d/README.md
KyleDavisSA Feb 8, 2023
2f1e2dd
Update breaking-dam-2d/README.md
KyleDavisSA Feb 8, 2023
5534300
Update breaking-dam-3d/fluid-openfoam/0_orig/U
KyleDavisSA Feb 8, 2023
d1d0752
Update breaking-dam-3d/README.md
KyleDavisSA Feb 8, 2023
9825f6e
Update breaking-dam-2d/fluid-openfoam/0_orig/alpha.water
KyleDavisSA Feb 8, 2023
21b53e8
Update 2D openfoam setup
KyleDavisSA Feb 8, 2023
30e9a09
Update 3D openFOAM setup
KyleDavisSA Feb 8, 2023
21f1dd2
Port 2D case to v3 (runs and breaks eventually)
uekerman Feb 29, 2024
bd99d62
Converted to perp flap setup and geom (span-wise z)
uekerman Feb 29, 2024
70b03db
Remove 3D case
uekerman Mar 4, 2024
c4434a0
Update image
uekerman Mar 4, 2024
933edfb
Tweak README
uekerman Mar 4, 2024
0f5eb33
Clean up preCICE config
uekerman Mar 4, 2024
f68b7fe
Clean up some more
uekerman Mar 4, 2024
9b97b92
Reduce image size
uekerman Mar 4, 2024
0bd918f
Cleanup comments in OpenFOAM files
MakisH Mar 10, 2024
39d9eac
Further comments cleanup
MakisH Mar 10, 2024
1b6512b
Update breaking-dam-2d/README.md
MakisH Mar 10, 2024
0c615e7
Merge branch 'develop' into breaking-dam-2d
MakisH Mar 10, 2024
f246b19
Replace alpha.water with original + modification step
MakisH Mar 10, 2024
391a8ca
Clarify origin of solid-calculix case
MakisH Mar 10, 2024
13729bd
Adjust gravity value
MakisH Mar 10, 2024
72b83de
Switch OpenFOAM to cellDisplacement (one mesh)
MakisH Mar 10, 2024
987a857
Remove alpha.water, specify in gitignore and clean.sh
MakisH Mar 10, 2024
a9cdff1
Set upperWall to zeroGradient
MakisH Mar 10, 2024
27d3fd7
Update breaking-dam-2d/precice-config.xml
uekerman Mar 11, 2024
067ec21
Format minor detail
uekerman Mar 11, 2024
e063c4f
Reduce water column height
uekerman Mar 11, 2024
ca819c8
Reduce time step size
uekerman Mar 11, 2024
5e68e54
Revert top boundary condition of alpha
uekerman Mar 11, 2024
336ccf9
Update image and tweak README
uekerman Mar 11, 2024
f068d8b
Reduce image size
uekerman Mar 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
MakisH marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
# Official repo for default hooks
- repo: https://github.com/precice/precice-pre-commit-hooks
rev: 'v3.1'
rev: 'v3.3'
hooks:
- id: format-precice-config
- repo: https://github.com/igorshubovych/markdownlint-cli
Expand Down
38 changes: 38 additions & 0 deletions breaking-dam-2d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Breaking dam with flexible pillar 2D
permalink: tutorials-breaking-dam-2d.html
keywords: FSI, OpenFOAM, CalculiX, IQN-ILS, two-phase flow, interFoam
summary: FSI simulation of a two-dimensional water column striking a flexible wall
---

{% note %}
Get the [case files of this tutorial](https://github.com/precice/tutorials/tree/master/breaking-dam-2d). Read how in the [tutorials introduction](https://precice.org/tutorials.html).
{% endnote %}

## Setup

The two-dimensional breaking dam case is a free surface problem. A large column of water comes into contact with a flexible wall, causing the wall to bend and the water to flow over the wall. A no-slip boundary condition is applied at the bottom, the left, and the right boundary, and a zero pressure condition at the top boundary. The image below shows the alpha value (0 is air, 1 is water) and velocity vectors at t=0.595.

![Breaking dam 2D physics at t=0.595](images/tutorials-breaking-dam-2d-physics.png)

## Available solvers

Fluid participant:

* OpenFOAM (interFoam). In case you are using a very old OpenFOAM version, you need to adjust the solver to `interDyMFoam` in the `Fluid/system/controlDict` file. For more information, have a look at the [OpenFOAM adapter documentation](https://precice.org/adapter-openfoam-overview.html).

Solid participant:

* CalculiX. For more information, have a look at the [CalculiX adapter documentation](https://precice.org/adapter-calculix-overview.html). This is a modified setup of the one used in the `perpendicular-flap` tutorial.

## Running the simulation

You can start the simulation by running the script `./run.sh` located in each participant directory. OpenFOAM can be executed in parallel using `run.sh -parallel`. The default setting uses 4 MPI ranks.

## Post-processing

You can visualize the results using ParaView or `cgx` (for native CalculiX results files) as usual. See some [visualization hints for CalculiX results](https://precice.org/tutorials.html#visualizing-calculix-results).

{% disclaimer %}
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks.
{% enddisclaimer %}
1 change: 1 addition & 0 deletions breaking-dam-2d/clean-tutorial.sh
1 change: 1 addition & 0 deletions breaking-dam-2d/fluid-openfoam/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0/alpha.water
47 changes: 47 additions & 0 deletions breaking-dam-2d/fluid-openfoam/0/U
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type noSlip;
}
outlet
{
type noSlip;
}
flap
{
type movingWallVelocity;
value uniform (0 0 0);
}
upperWall
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
lowerWall
{
type noSlip;
}
front
{
type empty;
}
back
{
type empty;
}
}

49 changes: 49 additions & 0 deletions breaking-dam-2d/fluid-openfoam/0/alpha.water_orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{

inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

flap
{
type zeroGradient;
}

upperWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

front
{
type empty;
}
back
{
type empty;
}
}
51 changes: 51 additions & 0 deletions breaking-dam-2d/fluid-openfoam/0/p
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

flap
{
type zeroGradient;
}

upperWall
{
type fixedValue;
value uniform 0;
}

lowerWall
{
type zeroGradient;
}

front
{
type empty;
}

back
{
type empty;
}
}

50 changes: 50 additions & 0 deletions breaking-dam-2d/fluid-openfoam/0/p_rgh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

flap
{
type zeroGradient;
}

upperWall
{
type fixedValue;
value uniform 0;
}

lowerWall
{
type zeroGradient;
}

front
{
type empty;
}

back
{
type empty;
}
}
48 changes: 48 additions & 0 deletions breaking-dam-2d/fluid-openfoam/0/phi
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "0";
object phi;
}

dimensions [0 3 -1 0 0 0 0];

internalField uniform 0;
boundaryField
{
inlet
{
type calculated;
value $internalField;
}
outlet
{
type calculated;
value $internalField;
}
flap
{
type calculated;
value uniform 0;
}
upperWall
{
type calculated;
value uniform 0;
}
lowerWall
{
type calculated;
value uniform 0;
}
front
{
type empty;
}
back
{
type empty;
}
}
55 changes: 55 additions & 0 deletions breaking-dam-2d/fluid-openfoam/0/pointDisplacement
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FoamFile
{
version 2.0;
format ascii;
class pointVectorField;
object pointDisplacement;
}

dimensions [0 1 0 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
//type fixedValue;
//value uniform (0 0 0);
type slip;
}

outlet
{
//type fixedValue;
//value uniform (0 0 0);
type slip;
}

flap
{
type fixedValue;
value $internalField;
}

upperWall
{
type fixedValue;
value uniform (0 0 0);
}

lowerWall
{
type slip;
}

front
{
type empty;
}

back
{
type empty;
}
}
7 changes: 7 additions & 0 deletions breaking-dam-2d/fluid-openfoam/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e -u

. ../../tools/cleaning-tools.sh

clean_openfoam .
rm -fv 0/alpha.water
18 changes: 18 additions & 0 deletions breaking-dam-2d/fluid-openfoam/constant/dynamicMeshDict
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

solver displacementLaplacian;

displacementLaplacianCoeffs {
diffusivity quadratic inverseDistance (flap);
}
11 changes: 11 additions & 0 deletions breaking-dam-2d/fluid-openfoam/constant/g
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}

dimensions [0 1 -2 0 0 0 0];
value (0 -9.81 0);
Loading
Loading