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

Add 3D breaking dam case #473

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
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
rev: v0.39.0
rev: v0.30.0
hooks:
- id: markdownlint
files: "^(.*/)?README.md"
Expand Down
40 changes: 40 additions & 0 deletions breaking-dam-3d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Breaking dam with flexible pillar: 3D variant
permalink: tutorials-breaking-dam-3d.html
keywords: FSI, OpenFOAM, CalculiX, nearest-projection, IQN-ILS
summary: Tutorial for an FSI simulation of a three-dimensional water column striking a flexible wall, based on the two-dimensional case.
---

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

## Setup

The three-dimensional breaking dam case is a free surface problem, that is an extension of the two-dimensional problem. Two large columns of water comes into contact with a flexible wall at different times, causing the wall to bend and twist as the water flows over and around the wall. The solid domain is fixed only at the bottom and the sides are free to move in-plane. The test case was run for 0.75s with a time step of dt = 0.005s, for a total of 150 time steps.

![domain](images/domain.png)

![domain](images/properties.png)

## Available solvers

Fluid participant:

* OpenFOAM (interFoam). In case you are using a very old OpenFOAM version, you will 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://www.precice.org/adapter-openfoam-overview.html).

Solid participant:

* CalculiX. For more information, have a look at the [CalculiX adapter documentation](https://www.precice.org/adapter-calculix-overview.html).

## 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 resul files), as usual.

{% 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-3d/clean-tutorial.sh
50 changes: 50 additions & 0 deletions breaking-dam-3d/fluid-openfoam/0_orig/U
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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 zeroGradient;
//value uniform (0 0 0);
}
lowerWall
{
type noSlip;
}
front
{
type empty;
}
back
{
type empty;
}
}


// ************************************************************************* //
50 changes: 50 additions & 0 deletions breaking-dam-3d/fluid-openfoam/0_orig/alpha.water
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
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 inletOutlet;
inletValue uniform 0;
value uniform 0;
}
lowerWall
{
type zeroGradient;
}
front
{
type empty;
}
back
{
type empty;
}
}


// ************************************************************************* //
53 changes: 53 additions & 0 deletions breaking-dam-3d/fluid-openfoam/0_orig/p
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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;
}
}

// ************************************************************************* //
54 changes: 54 additions & 0 deletions breaking-dam-3d/fluid-openfoam/0_orig/p_rgh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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;
}
}

// ************************************************************************* //
52 changes: 52 additions & 0 deletions breaking-dam-3d/fluid-openfoam/0_orig/phi
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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;
}
}


// ************************************************************************* //
58 changes: 58 additions & 0 deletions breaking-dam-3d/fluid-openfoam/0_orig/pointDisplacement
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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-3d/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
rm -r 0

clean_openfoam .
Loading
Loading