Skip to content

Commit c9a01ca

Browse files
committed
Add new testcase
1 parent 360e871 commit c9a01ca

14 files changed

Lines changed: 355225 additions & 0 deletions

File tree

tutorials/solidFoam/stent/0/lmN

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Version: 6
6+
\\/ M anipulation |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class pointVectorField;
13+
location "0";
14+
object lmN;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
dimensions [1 -2 -1 0 0 0 0];
19+
20+
internalField uniform (0 0 0);
21+
22+
boundaryField
23+
{
24+
symmetricY
25+
{
26+
type zeroGradient;
27+
}
28+
29+
free
30+
{
31+
type zeroGradient;
32+
}
33+
34+
symmetricX
35+
{
36+
type zeroGradient;
37+
}
38+
39+
symmetricZ
40+
{
41+
type zeroGradient;
42+
}
43+
}
44+
45+
// ************************************************************************* //
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Version: 6
6+
\\/ M anipulation |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class volVectorField;
13+
location "0";
14+
object lm_b;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
#include "../constant/runParameters"
19+
20+
dimensions [1 -2 -1 0 0 0 0];
21+
22+
internalField uniform (0 0 0);
23+
24+
boundaryField
25+
{
26+
free
27+
{
28+
type tractionLinearMomentum;
29+
tractionValue (0 0 0);
30+
value uniform (0 0 0);
31+
}
32+
33+
symmetricX
34+
{
35+
type symmetricLinearMomentum;
36+
tractionValue (0 0 0);
37+
value uniform (0 0 0);
38+
}
39+
40+
symmetricY
41+
{
42+
type symmetricLinearMomentum;
43+
traction (0 0 $traction);
44+
value uniform (0 0 0);
45+
}
46+
47+
symmetricZ
48+
{
49+
type symmetricLinearMomentum;
50+
tractionValue (0 0 0);
51+
value uniform (0 0 0);
52+
}
53+
}
54+
55+
// ************************************************************************* //
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Version: 6
6+
\\/ M anipulation |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class volVectorField;
13+
location "0";
14+
object t_b;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
#include "../constant/runParameters"
19+
20+
dimensions [1 -1 -2 0 0 0 0];
21+
22+
internalField uniform (0 0 0);
23+
24+
boundaryField
25+
{
26+
free
27+
{
28+
type fixedValue;
29+
value uniform (0 0 0);
30+
}
31+
32+
symmetricX
33+
{
34+
type symmetricTraction;
35+
value uniform (0 0 0);
36+
}
37+
38+
symmetricY
39+
{
40+
type symmetricTraction;
41+
traction (0 0 $traction);
42+
value uniform (0 0 0);
43+
}
44+
45+
symmetricZ
46+
{
47+
type symmetricTraction;
48+
value uniform (0 0 0);
49+
}
50+
}
51+
52+
// ************************************************************************* //

tutorials/solidFoam/stent/clean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
cd ${0%/*} || exit 1 # Run from this directory
3+
4+
# Source tutorial clean functions
5+
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
6+
cleanCase;
7+
rm 0/p 0/uN;
8+
9+
echo Case Cleaned!
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Version: 6
6+
\\/ M anipulation |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
location "constant";
14+
object mechanicalProperties;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
solidModel neoHookean;
19+
20+
rho rho [1 -3 0 0 0 0 0] 1100;
21+
E E [1 -1 -2 0 0 0 0] 17e6;
22+
nu nu [0 0 0 0 0 0 0] 0.45;
23+
24+
// ************************************************************************* //
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Version: 6
6+
\\/ M anipulation |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
location "constant";
14+
object runParameters;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
meshFile stent_6912.msh;
19+
traction -100000;
20+
21+
// ************************************************************************* //

tutorials/solidFoam/stent/run

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
cd ${0%/*} || exit 1 # Run from this directory
3+
4+
# OpenFOAM functions
5+
. $WM_PROJECT_DIR/bin/tools/RunFunctions
6+
solver=`getApplication`
7+
8+
# Get number of processors
9+
nProc=$(foamDictionary -entry numberOfSubdomains -value $nProc system/decomposeParDict)
10+
11+
# Generate mesh
12+
meshFile=$(foamDictionary -entry meshFile -value $meshFile constant/runParameters)
13+
fluentMeshToFoam $meshFile
14+
15+
# Run solver
16+
if [ $nProc -eq 1 ]; then
17+
$solver > log.$solver &
18+
tail -f log.$solver
19+
20+
elif [ $nProc -gt 1 ]; then
21+
runApplication decomposePar
22+
runParallel $solver &
23+
fi

0 commit comments

Comments
 (0)