Difference between revisions of "Extend-bazaar/Toolkits/Fluid-structure interaction"

From OpenFOAMWiki
(Post-processing: repaired link... not sure what the hell happened...)
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This template is only a suggestion aimed at saving your time. Please feel free to use any other format on the subpage for your contribution!
+
== Description ==
 +
Quoting from [http://www.cfd-online.com/Forums/openfoam-news-announcements-other/106881-solid-mechanics-solvers-added-openfoam-extend.html#post547754 here]:
 +
<blockquote>This toolkit supersedes the {{tt|icoFsiElasticNonLinULSolidFoam}} FSI solver within the [[contrib/solidMechanics|solidMechanics]] toolbox.
  
'''Click "Edit" to access and copy the page code.'''
+
This framework was presented at the OpenFOAM Workshop 2014 in Zagreb: [http://sourceforge.net/projects/openfoam-extend/files/OpenFOAM_Workshops/OFW9_2014_Zagreb/Abstracts/Zeljko_Tukovic_OFW09_EA_0103.pdf abstract] and [http://sourceforge.net/projects/openfoam-extend/files/OpenFOAM_Workshops/OFW9_2014_Zagreb/Presentations/Zeljko_Tukovic_OFW09_P_0103.pdf slides].
  
== Description ==
+
The major improvement with regard to FSI coupling is the implementation of the [http://www.sciencedirect.com/science/article/pii/S0045794909003022 IQN-ILS] algorithm.
This code implements...
+
  
 +
Also, the plugin approach used for the solid and fluid solvers should allow easier extension to other fluid/solid models e.g. multi-phase, compressible, plasticity, etc.
 +
</blockquote>
 +
<br>
 +
== Authors ==
 +
 +
This toolkit has been a continuous work from several authors, where some of the initial work comes from the [[Contrib/solidMechanics|solidMechanics]] toolbox, but the remaining work has been done in this FSI-toolkit.
 +
 +
The Fluid-Structure Interaction toolkit (later was renamed to "Fluid-Solid Interaction toolkit" with the release for foam-extend 4.0), has been the accumulative work of the following authors (from the slides mentioned in the [[#Description|Description]] section above):
 +
* Željko Tuković (main author of this Fluid-Structure Interaction toolkit)
 +
* Philip Cardiff
 +
* Aleksandar Karač
 +
* Hrvoje Jasak
 +
* Alojz Ivanković
 +
 +
For a more complete list of authors for all of the code, the following shell command within the folder {{tt|src}} can provide some more insight:
 +
<bash>find fluid* utilities solvers -name "*.[CH]" | xargs grep -C 3 "Author"</bash>
 +
 +
<br>
 
== Installation ==
 
== Installation ==
Download from HERE, use either
 
  
* embedded .tgz archive directly on page (only for small files)
+
{{versionInfo}}{{version3.0-ext}}{{version3.1-ext}}{{version3.2-ext}}{{version4.0-ext}}
* link to file-hoster
+
* link to repository, e.g. on sorceforge.org or github.org
+
  
 +
; First publicly available snapshot of the source code
 +
: Is available here on the wiki, which was designed to work with {{version3.0-ext}}{{version3.1-ext}}: [[Media:Fsi_31.tar.gz|Fsi_31.tar.gz]]
 +
: Git repository based on  this source code and further updated for foam-extend 3.1 and 3.2 is available here: https://github.com/wyldckat/FluidStructureInteraction
  
Then compile by running:
+
; Second publicly available snapshot of the source code
<bash>cd src/
+
: Is available here on the wiki, which was designed to work with {{version4.0-ext}}: [[Media:Fsi_40.tar.gz|Fsi_40.tar.gz]]
 +
: '''Note''': It's expected that this will be integrated into future versions of foam-extend.
 +
 
 +
 
 +
The instructions are a bit different, depending on the version of foam-extend:
 +
* [[#Install on foam-extend 3.0|Install on foam-extend 3.0]]
 +
* [[#Install on foam-extend 3.1|Install on foam-extend 3.1]]
 +
* [[#Install on foam-extend 3.2|Install on foam-extend 3.2]]
 +
* [[#Install on foam-extend 4.0|Install on foam-extend 4.0]]
 +
 
 +
<br>
 +
=== Install on foam-extend 3.0 ===
 +
To download and install, run the following commands:
 +
<bash>mkdir -p $WM_PROJECT_USER_DIR
 +
cd $WM_PROJECT_USER_DIR
 +
wget http://openfoamwiki.net/images/5/52/Fsi_31.tar.gz
 +
tar -xzf Fsi_31.tar.gz
 +
cd FluidStructureInteraction/src/
 
./Allwmake
 
./Allwmake
 
</bash>
 
</bash>
  
== Usage examples ==
+
<br>
To use this code, insert into controlDict:
+
=== Install on foam-extend 3.1===
 +
First we have to download and unpack the source code:
 +
<bash>mkdir -p $WM_PROJECT_USER_DIR
 +
cd $WM_PROJECT_USER_DIR
 +
wget http://openfoamwiki.net/images/5/52/Fsi_31.tar.gz
 +
tar -xzf Fsi_31.tar.gz</bash>
 +
 
 +
Now we need to do some repairs in the source code:
 +
<bash>cd FluidStructureInteraction/src/fluidStructureInteraction/stressModels/constitutiveModel
 +
 
 +
wget https://raw.githubusercontent.com/wyldckat/FluidStructureInteraction/fe31/src/fluidStructureInteraction/stressModels/constitutiveModel/constitutiveModel.C -O constitutiveModel.C
 +
wget https://raw.githubusercontent.com/wyldckat/FluidStructureInteraction/fe31/src/fluidStructureInteraction/stressModels/constitutiveModel/constitutiveModel.H -O constitutiveModel.H
 +
 
 +
cd ../../..
 +
</bash>
 +
 
 +
Finally, we can build the toolkit:
 +
<bash>./Allwmake
 +
</bash>
 +
 
 +
<br>
 +
=== Install on foam-extend 3.2===
 +
'''WARNING''': These instructions advise you to download and install an adapted and experimental source code. It has not been fully tested and it's probable that it won't work as intended.
 +
 
 +
The changes needed for foam-extend 3.2 are too many in order to reuse the file provided for foam-extend 3.0, therefore here are the instructions for getting from [[User:Wyldckat|wyldckat]]'s [https://github.com/wyldckat/FluidStructureInteraction repository at Github]:
 +
<ol>
 +
<li>Go into the assigned user folder:
 +
<bash>mkdir -p $WM_PROJECT_USER_DIR
 +
cd $WM_PROJECT_USER_DIR</bash>
 +
</li>
 +
<li>Now, depending on whether you're able to use {{tt|git}} or not:
 +
<ul {{NoIndentStyle}}>
 +
<li>For cloning from the git repository:
 +
<bash>git clone https://github.com/wyldckat/FluidStructureInteraction.git</bash>
 +
Then checkout the right branch:
 +
<bash>cd FluidStructureInteraction
 +
git checkout fe32</bash>
 +
</li>
 +
<li>For downloading the ZIP package:
 +
<bash>wget -O FluidStructureInteraction.fe32.zip https://github.com/wyldckat/FluidStructureInteraction/archive/fe32.zip</bash>
 +
Then unpack, rename the unpacked folder and go into the folder:
 +
<bash>unzip FluidStructureInteraction.fe32.zip
 +
mv FluidStructureInteraction-fe32 FluidStructureInteraction
 +
cd FluidStructureInteraction
 +
</bash>
 +
</li>
 +
</ul>
 +
</li>
 +
<li>Now build:
 +
<bash>cd src
 +
./Allwmake</bash>
 +
</li>
 +
</ol>
 +
 
 +
<br>
 +
=== Install on foam-extend-4.0 ===
 +
First we have to download and unpack the source code:
 +
<bash>mkdir -p $WM_PROJECT_USER_DIR
 +
cd $WM_PROJECT_USER_DIR
 +
wget https://openfoamwiki.net/images/d/d6/Fsi_40.tar.gz
 +
tar -xzf Fsi_40.tar.gz</bash>
 +
 
 +
Now we can build the toolkit:
 +
<bash>cd FluidSolidInteraction/src
 +
./Allwmake
 +
</bash>
 +
 
 +
Then, before we try running the tutorial cases, we need to fix a few dependencies:
 +
<bash>cd ..
 +
find run -name options | while read item
 +
do
 +
  sed -i -e 's=$(WM_PROJECT_DIR)/applications/solvers/FSI=$(WM_PROJECT_USER_DIR)/FluidSolidInteraction/src=' $item
 +
  sed -i -e 's=$(WM_THIRD_PARTY_DIR)/packages/eigen3=$(WM_PROJECT_USER_DIR)/FluidSolidInteraction/src/ThirdParty/eigen3=' $item
 +
done
 +
</bash>
 +
 
 +
<br>
 +
 
 +
== Tutorials ==
 +
The first version of the toolkit provides in the folder {{tt|run}} the following examples:
 +
* {{tt|fsiFoam}}
 +
** {{tt|3dTube}}
 +
** {{tt|beamInCrossFlow}}
 +
** {{tt|HronTurekFsi3}}
 +
* {{tt|stressFoam}}
 +
** {{tt|plateHole}}
 +
* {{tt|thermalStressFoam}}
 +
** {{tt|flange}}
 +
 
 +
=== '''fsiFoam''' tutorial cases ===
 +
 
 +
Each tutorial case available in the {{tt|fsiFoam}} folder is executed by running the following commands:
 +
<bash>sed -i s/tcsh/sh/g *Links
 +
./removeSerialLinks fluid solid
 +
./makeSerialLinks fluid solid
 +
cd fluid
 +
./Allclean
 +
./Allrun
 +
</bash>
 +
 
 +
=== '''stressFoam''' tutorial case ===
 +
 
 +
The tutorial case {{tt|plateHole}} is executed by going into the case folder:
 +
<bash>cd stressFoam/plateHole/plateHole/</bash>
 +
And running:
 +
<bash>./Allrun</bash>
 +
 
 +
=== '''thermalStressFoam''' tutorial case ===
 +
 
 +
The tutorial case {{tt|flange}} is executed by going into the case folder:
 +
<bash>cd thermalStressFoam/flange/</bash>
 +
And running:
 +
<bash>./Allrun</bash>
  
<cpp>functions
+
<br>
{
+
== Post-processing ==
....(insert the necessary options here)...
+
See wiki page [[HowTo_postProcMultiregion]] for more details on how to post-process multi-region cases.
}
+
</cpp>
+
  
== Documentation ==
+
<br>
This implementation is based on publication by [http://www.mathstat.uottawa.ca/~rsmith/Zombies.pdf Munz et al (2009)].
+
  
== History ==
+
== Reports where this toolkit has been used ==
1 Jun 2010: First upload
+
  
1 Oct 2011: Bug fix for negative inlet velocities
+
The following entries are in the page for  the [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/ 2014 MSc/PhD course in CFD with OpenSource software] at Chalmers University of Technology, which use this toolkit:
 +
* Presentation by Huadong Yao: [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/OFLecFSI-1.pdf Fluid-structure interaction]
 +
* [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/#_Student_reports/tutorials Student projects and reports]:
 +
** Erik Karlsson: A FSI tutorial on the axialTurbine tutorial case - [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/Erik%20Karlsson/slides_axialTurbineFsiTut.pdf Slides], [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/Erik%20Karlsson/Tutorial_axialTurbineFsiTut.pdf Report], [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/Erik%20Karlsson/axialTurbineFsiTut.tar.gz Files]
 +
** Thomas Vyzikas: The implementation of interFoam solver as a flow model of the fsiFoam solver for strong fluid-structure interaction - [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/ThomasVyzikas/slides_vyzikas.pdf Slides], [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/ThomasVyzikas/interFlowReport.pdf Report], [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/ThomasVyzikas/interFoam.avi Movie], [http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/ThomasVyzikas/velocity3.avi Movie]

Latest revision as of 10:42, 31 January 2017

1 Description

Quoting from here:

This toolkit supersedes the icoFsiElasticNonLinULSolidFoam FSI solver within the solidMechanics toolbox.

This framework was presented at the OpenFOAM Workshop 2014 in Zagreb: abstract and slides.

The major improvement with regard to FSI coupling is the implementation of the IQN-ILS algorithm.

Also, the plugin approach used for the solid and fluid solvers should allow easier extension to other fluid/solid models e.g. multi-phase, compressible, plasticity, etc.


2 Authors

This toolkit has been a continuous work from several authors, where some of the initial work comes from the solidMechanics toolbox, but the remaining work has been done in this FSI-toolkit.

The Fluid-Structure Interaction toolkit (later was renamed to "Fluid-Solid Interaction toolkit" with the release for foam-extend 4.0), has been the accumulative work of the following authors (from the slides mentioned in the Description section above):

  • Željko Tuković (main author of this Fluid-Structure Interaction toolkit)
  • Philip Cardiff
  • Aleksandar Karač
  • Hrvoje Jasak
  • Alojz Ivanković

For a more complete list of authors for all of the code, the following shell command within the folder src can provide some more insight:

find fluid* utilities solvers -name "*.[CH]" | xargs grep -C 3 "Author"


3 Installation

Valid versions: OF Version 30ext.png OF Version 31ext.png OF Version 32ext.png OF Version 40ext.png

First publicly available snapshot of the source code
Is available here on the wiki, which was designed to work with OF Version 30ext.png OF Version 31ext.png: Fsi_31.tar.gz
Git repository based on this source code and further updated for foam-extend 3.1 and 3.2 is available here: https://github.com/wyldckat/FluidStructureInteraction
Second publicly available snapshot of the source code
Is available here on the wiki, which was designed to work with OF Version 40ext.png: Fsi_40.tar.gz
Note: It's expected that this will be integrated into future versions of foam-extend.


The instructions are a bit different, depending on the version of foam-extend:


3.1 Install on foam-extend 3.0

To download and install, run the following commands:

mkdir -p $WM_PROJECT_USER_DIR
cd $WM_PROJECT_USER_DIR
wget http://openfoamwiki.net/images/5/52/Fsi_31.tar.gz
tar -xzf Fsi_31.tar.gz
cd FluidStructureInteraction/src/
./Allwmake


3.2 Install on foam-extend 3.1

First we have to download and unpack the source code:

mkdir -p $WM_PROJECT_USER_DIR
cd $WM_PROJECT_USER_DIR
wget http://openfoamwiki.net/images/5/52/Fsi_31.tar.gz
tar -xzf Fsi_31.tar.gz

Now we need to do some repairs in the source code:

cd FluidStructureInteraction/src/fluidStructureInteraction/stressModels/constitutiveModel
 
wget https://raw.githubusercontent.com/wyldckat/FluidStructureInteraction/fe31/src/fluidStructureInteraction/stressModels/constitutiveModel/constitutiveModel.C -O constitutiveModel.C
wget https://raw.githubusercontent.com/wyldckat/FluidStructureInteraction/fe31/src/fluidStructureInteraction/stressModels/constitutiveModel/constitutiveModel.H -O constitutiveModel.H
 
cd ../../..

Finally, we can build the toolkit:

./Allwmake


3.3 Install on foam-extend 3.2

WARNING: These instructions advise you to download and install an adapted and experimental source code. It has not been fully tested and it's probable that it won't work as intended.

The changes needed for foam-extend 3.2 are too many in order to reuse the file provided for foam-extend 3.0, therefore here are the instructions for getting from wyldckat's repository at Github:

  1. Go into the assigned user folder:
    mkdir -p $WM_PROJECT_USER_DIR
    cd $WM_PROJECT_USER_DIR
  2. Now, depending on whether you're able to use git or not:
    • For cloning from the git repository:
      git clone https://github.com/wyldckat/FluidStructureInteraction.git

      Then checkout the right branch:

      cd FluidStructureInteraction
      git checkout fe32
    • For downloading the ZIP package:
      wget -O FluidStructureInteraction.fe32.zip https://github.com/wyldckat/FluidStructureInteraction/archive/fe32.zip

      Then unpack, rename the unpacked folder and go into the folder:

      unzip FluidStructureInteraction.fe32.zip
      mv FluidStructureInteraction-fe32 FluidStructureInteraction
      cd FluidStructureInteraction
  3. Now build:
    cd src
    ./Allwmake


3.4 Install on foam-extend-4.0

First we have to download and unpack the source code:

mkdir -p $WM_PROJECT_USER_DIR
cd $WM_PROJECT_USER_DIR
wget https://openfoamwiki.net/images/d/d6/Fsi_40.tar.gz
tar -xzf Fsi_40.tar.gz

Now we can build the toolkit:

cd FluidSolidInteraction/src
./Allwmake

Then, before we try running the tutorial cases, we need to fix a few dependencies:

cd ..
find run -name options | while read item
do
  sed -i -e 's=$(WM_PROJECT_DIR)/applications/solvers/FSI=$(WM_PROJECT_USER_DIR)/FluidSolidInteraction/src=' $item
  sed -i -e 's=$(WM_THIRD_PARTY_DIR)/packages/eigen3=$(WM_PROJECT_USER_DIR)/FluidSolidInteraction/src/ThirdParty/eigen3=' $item
done


4 Tutorials

The first version of the toolkit provides in the folder run the following examples:

  • fsiFoam
    • 3dTube
    • beamInCrossFlow
    • HronTurekFsi3
  • stressFoam
    • plateHole
  • thermalStressFoam
    • flange

4.1 fsiFoam tutorial cases

Each tutorial case available in the fsiFoam folder is executed by running the following commands:

sed -i s/tcsh/sh/g *Links
./removeSerialLinks fluid solid
./makeSerialLinks fluid solid
cd fluid
./Allclean
./Allrun

4.2 stressFoam tutorial case

The tutorial case plateHole is executed by going into the case folder:

cd stressFoam/plateHole/plateHole/

And running:

./Allrun

4.3 thermalStressFoam tutorial case

The tutorial case flange is executed by going into the case folder:

cd thermalStressFoam/flange/

And running:

./Allrun


5 Post-processing

See wiki page HowTo_postProcMultiregion for more details on how to post-process multi-region cases.


6 Reports where this toolkit has been used

The following entries are in the page for the 2014 MSc/PhD course in CFD with OpenSource software at Chalmers University of Technology, which use this toolkit: