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 perpendicular-flap case solid-solids4foam and solid-openfoam #286

Merged
merged 34 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4660a57
Add perpendicular-flap/solid-solids4foam
philipcardiff Jul 31, 2022
121cbc1
Extend tools/cleaning-tools.sh to work with a solids4Foam case
philipcardiff Aug 2, 2022
3c6bc9e
Update perpendicular-flap/solid-solids4foam/constant/physicsProperties
Aug 2, 2022
64bb3e7
perpendicular-flap/solid-solids4foam: remove solidForces function object
philipcardiff Aug 2, 2022
ea7e278
Merge branch 'master' of github.com:solids4foam/precice-tutorials
philipcardiff Aug 2, 2022
bfc935c
perpendicular-flap/solid-solids4foam: remove commented options from s…
philipcardiff Aug 2, 2022
9ff832b
perpendicular-flap/solid-solids4foam: removed **** comment lines
philipcardiff Aug 2, 2022
c528831
Update perpendicular-flap/README.md
Aug 2, 2022
ac77e77
perpendicular-flap/solid-solids4foam: remove OpenFOAM header comments
philipcardiff Aug 2, 2022
be2981c
Merge branch 'master' of github.com:solids4foam/precice-tutorials
philipcardiff Aug 2, 2022
952d86f
perpendicular-flap/solid-solids4foam: remove unused comments from sol…
philipcardiff Aug 2, 2022
4dccace
tools/openfoam-remove-empty-dirs.sh: fix for displacement files (e.g.…
philipcardiff Aug 2, 2022
a85fb9a
perpendicular-flap/solid-solids4foam: update run.sh to be consistent …
philipcardiff Aug 2, 2022
1fa2df6
perpendicular-flap/solid-solids4foam: update foam file name in run.sh
philipcardiff Aug 2, 2022
1db82dc
Add perpendicular-flap/solid-openfoam which uses the default solidDis…
philipcardiff Aug 2, 2022
c9c05f6
perpendicular-flap: update README.md to include solidDisplacementFoam…
philipcardiff Aug 2, 2022
160616c
Update perpendicular-flap/README.md
Aug 3, 2022
d96dc0f
Update perpendicular-flap/solid-openfoam/run.sh
Aug 3, 2022
05aa853
Update perpendicular-flap/solid-openfoam/constant/mechanicalProperties
Aug 3, 2022
a6b8a09
perpendicular-flap/solid-openfoam: remove OpenFOAM build files
philipcardiff Aug 3, 2022
7b9504d
perpendicular-flap/solid-openfoam: update headers in solidDisplacemen…
philipcardiff Aug 3, 2022
07ae7a8
perpendicular-flap/solid-openfoam: add newline at end of solidDisplac…
philipcardiff Aug 3, 2022
bc18550
perpendicular-flap/solid-openfoam: update deprecated code in solidDis…
philipcardiff Aug 3, 2022
f9da0cc
perpendicular-flap/solid-openfoam: remove the dependency of solidDisp…
philipcardiff Aug 3, 2022
1d0d863
perpendicular-flap/solid-openfoam: remove references to foam extend i…
philipcardiff Aug 3, 2022
d81b82c
Update perpendicular-flap/solid-openfoam/system/fvSolution
Aug 3, 2022
fa18f62
Update perpendicular-flap/solid-openfoam/solidDisplacementFoamForce/s…
Aug 3, 2022
77e1e90
Update perpendicular-flap/solid-openfoam/system/fvSchemes
Aug 3, 2022
ece9c73
Update perpendicular-flap/solid-openfoam/system/fvSolution
Aug 4, 2022
c6f2b0b
perpendicular-flap/solid-solids4foam: run.sh remove check related to …
philipcardiff Aug 4, 2022
917d891
Merge branch 'master' of github.com:solids4foam/precice-tutorials
philipcardiff Aug 4, 2022
e8d4e38
Update perpendicular-flap/README.md
Aug 5, 2022
aebb703
Update perpendicular-flap/README.md
MakisH Aug 8, 2022
6729f63
Update perpendicular-flap/README.md
MakisH Aug 8, 2022
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: 2 additions & 0 deletions perpendicular-flap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Solid participant:

* DUNE. For more information, have a look at the [experimental DUNE adapter](https://github.com/precice/dune-adapter) and send us your feedback.

* solids4foam. Like for CalculuX, the geometrically linear solver is used by default. For more information, see the [solids4foam documentation](https://bitbucket.org/philip_cardiff/solids4foam-release/src/master/documentation/overview.md)
solids4foam marked this conversation as resolved.
Show resolved Hide resolved

## Running the Simulation

All listed solvers can be used in order to run the simulation. OpenFOAM can be executed in parallel using `run.sh -parallel`. The default setting uses 4 MPI ranks. Open two separate terminals and start the desired fluid and solid participant by calling the respective run script `run.sh` located in the participant directory. For example:
Expand Down
33 changes: 33 additions & 0 deletions perpendicular-flap/solid-solids4foam/0/D
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object D;
}

dimensions [0 1 0 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
interface
{
type solidForce;
forceField solidForce;
value uniform (0 0 0);
}
bottom
{
type fixedDisplacement;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}


32 changes: 32 additions & 0 deletions perpendicular-flap/solid-solids4foam/0/solidForce
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object solidForce;
}

dimensions [1 2 2 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
interface
{
type calculated;
value uniform (0 0 0);
}
bottom
{
type calculated;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}


6 changes: 6 additions & 0 deletions perpendicular-flap/solid-solids4foam/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -e -u

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

clean_openfoam .
10 changes: 10 additions & 0 deletions perpendicular-flap/solid-solids4foam/constant/dynamicMeshDict
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}

dynamicFvMesh staticFvMesh;

12 changes: 12 additions & 0 deletions perpendicular-flap/solid-solids4foam/constant/g
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}

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

21 changes: 21 additions & 0 deletions perpendicular-flap/solid-solids4foam/constant/mechanicalProperties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object mechanicalProperties;
}

planeStress no;

mechanical
(
rubber
{
type linearElastic;
rho rho [1 -3 0 0 0 0 0] 3000;
E E [1 -1 -2 0 0 0 0] 4e6;
nu nu [0 0 0 0 0 0 0] 0.3;
}
);

12 changes: 12 additions & 0 deletions perpendicular-flap/solid-solids4foam/constant/physicsProperties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object physicsProperties;
}

type solid;


25 changes: 25 additions & 0 deletions perpendicular-flap/solid-solids4foam/constant/solidProperties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object solidProperties;
}

solidModel linearGeometryTotalDisplacement;

linearGeometryTotalDisplacementCoeffs
{
// Maximum number of momentum correctors
nCorrectors 1000;

// Solution tolerance for displacement
solutionTolerance 1e-08;

// Alternative solution tolerance for displacement
alternativeTolerance 1e-08;

// Write frequency for the residuals
infoFrequency 100;
}

14 changes: 14 additions & 0 deletions perpendicular-flap/solid-solids4foam/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Currently, the case has only been checked with OpenFOAM-v2012
if [[ "${WM_PROJECT}" != "OpenFOAM" || "${WM_PROJECT_VERSION}" != "v2012" ]]
then
echo; echo "This case currently only runs in OpenFOAM-v2012"; echo
MakisH marked this conversation as resolved.
Show resolved Hide resolved
exit 0
fi
MakisH marked this conversation as resolved.
Show resolved Hide resolved

blockMesh
touch fluid-openfoam.foam

../../tools/run-openfoam.sh "$@"
. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
55 changes: 55 additions & 0 deletions perpendicular-flap/solid-solids4foam/system/blockMeshDict
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}

convertToMeters 0.01;

vertices
(
(-5 0 0)
(5 0 0)
(5 100 0)
(-5 100 0)

(-5 0 100)
(5 0 100)
(5 100 100)
(-5 100 100)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (6 15 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch interface
(
(4 7 3 0)
(7 6 2 3)
(1 2 6 5)
)
patch bottom
(
(0 1 5 4)
)
empty frontAndBack
(
(3 2 1 0)
(4 5 6 7)
)
);

mergePatchPairs
(
);

48 changes: 48 additions & 0 deletions perpendicular-flap/solid-solids4foam/system/controlDict
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}

application solids4Foam;
MakisH marked this conversation as resolved.
Show resolved Hide resolved

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 10;

deltaT 0.01;

writeControl adjustableRunTime;

writeInterval 0.1;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

functions
{
preCICE_Adapter
{
type preciceAdapterFunctionObject;
libs ("libpreciceAdapterFunctionObject.so");
}
}



10 changes: 10 additions & 0 deletions perpendicular-flap/solid-solids4foam/system/decomposeParDict
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
numberOfSubdomains 4;

method simple;

simpleCoeffs
{
n (1 4 1);
delta 0.001;
}

51 changes: 51 additions & 0 deletions perpendicular-flap/solid-solids4foam/system/fvSchemes
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}

d2dt2Schemes
{
default backward;
}

ddtSchemes
{
default backward;
}

gradSchemes
{
default extendedLeastSquares 0;
}

divSchemes
{
default Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(DD,D) Gauss linear corrected;
laplacian(DDD,DD) Gauss linear corrected;
}

snGradSchemes
{
default none;
snGrad(D) corrected;
snGrad(DD) corrected;
}

interpolationSchemes
{
default none;
interpolate(impK) linear;
interpolate(grad(D)) linear;
interpolate(grad(DD)) linear;
interpolate(sigma0) linear;
}

38 changes: 38 additions & 0 deletions perpendicular-flap/solid-solids4foam/system/fvSolution
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}

solvers
{
"D|DD"
{
solver PCG;
preconditioner FDIC;
tolerance 1e-09;
relTol 0.1;
}
}

relaxationFactors
{
// Under-relaxating the D equation by 0.99-0.9999 can improve convergence in
// some cases, in particular when there are solidContact boundaries
equations
{
//D 0.999;
}

// Under-relaxating the D field by 0.1-0.9 can improve convergence in some
// cases
fields
{
//D 0.9;
}
MakisH marked this conversation as resolved.
Show resolved Hide resolved
}


Loading