Skip to content

Turek & Hron FSI3 with CalculiX and OpenFOAM #304

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
16 changes: 16 additions & 0 deletions turek-hron-fsi3-calculix/allrun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
echo "START FLUID"

cd fluid-openfoam/
./run.sh -parallel > log-fluid &
cd ..

echo "START SOLID"

cd solid-calculix/
./run.sh > log-solid &
cd ..

wait


echo "FINISHED"
8 changes: 8 additions & 0 deletions turek-hron-fsi3-calculix/cleanAll.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

cd fluid-openfoam/
./clean.sh
cd ../solid-calculix/
./clean.sh
cd ..
rm -rf precice-run
59 changes: 59 additions & 0 deletions turek-hron-fsi3-calculix/fluid-openfoam/0.orig/U
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}

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

internalField uniform (0 0 0);

boundaryField
{

cylinder
{
type noSlip;
}

flap
{
type movingWallVelocity;
value uniform (0 0 0);
}

top
{
type noSlip;
}

bottom
{
type noSlip;
}

inlet
{

type groovyBC;
variables "yp=pts().y;minY=min(yp);maxY=max(yp);para=-1.5*(maxY-pos().y)*(pos().y-minY)/(0.25*pow(maxY-minY,2))*normal();";
valueExpression "2*para";
value uniform (2 0 0);
}

outlet
{
type zeroGradient;
}

front
{
type empty;
}
back
{
type empty;
}
}
54 changes: 54 additions & 0 deletions turek-hron-fsi3-calculix/fluid-openfoam/0.orig/p
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}

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

internalField uniform 0;

boundaryField
{
cylinder
{
type zeroGradient;
}

flap
{
type zeroGradient;
}

top
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}

inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 0;
}

front
{
type empty;
}
back
{
type empty;
}
}
56 changes: 56 additions & 0 deletions turek-hron-fsi3-calculix/fluid-openfoam/0.orig/pointDisplacement
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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);
}

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

cylinder
{
type fixedValue;
value $internalField;
}
flap
{
type fixedValue;
value $internalField;
}

top
{
type slip;
}

bottom
{
type slip;
}
front
{
type empty;
}
back
{
type empty;
}
}

60 changes: 60 additions & 0 deletions turek-hron-fsi3-calculix/fluid-openfoam/0.orig/vorticity
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object vorticity;
}

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

internalField uniform (0 0 0);

boundaryField
{
cylinder
{
type calculated;
value uniform (0 0 0);
}

flap
{
type calculated;
value uniform (0 0 0);
}

inlet
{
type calculated;
value uniform (0 0 0);
}

outlet
{
type calculated;
value uniform (0 0 0);
}

top
{
type calculated;
value uniform (0 0 0);
}

bottom
{
type calculated;
value uniform (0 0 0);
}

front
{
type empty;
}
back
{
type empty;
}
}
7 changes: 7 additions & 0 deletions turek-hron-fsi3-calculix/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 -f *.log
20 changes: 20 additions & 0 deletions turek-hron-fsi3-calculix/fluid-openfoam/constant/dynamicMeshDict
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

solver displacementLaplacian;

displacementLaplacianCoeffs {

diffusivity quadratic inverseDistance (flap);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location constant;
object transportProperties;
}

transportModel Newtonian;

rho rho [1 -3 0 0 0 0 0 ] 1000.0;
nu nu [0 2 -1 0 0 0 0 ] 0.001;
pRef pRef [1 -1 -2 0 0 0 0 ] 0.0;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location constant;
object turbulenceProperties;
}

simulationType laminar;
13 changes: 13 additions & 0 deletions turek-hron-fsi3-calculix/fluid-openfoam/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e -u

rm -rfv 0/
cp -r 0.orig/ 0/

blockMesh
checkMesh > Fluid_checkMesh.log
potentialFoam > Fluid_potentialFoam.log
touch fluid-openfoam.foam

../../tools/run-openfoam.sh "$@"
. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
Loading