Skip to content

Commit

Permalink
Test for Hele-Shaw solver
Browse files Browse the repository at this point in the history
AlexGubkin committed May 12, 2023
1 parent 966e000 commit 69c23f8
Showing 17 changed files with 611 additions and 169 deletions.
20 changes: 16 additions & 4 deletions tests/HeleShaw/channel2D/calculate.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
#Variables section
caseName=case1

scaleSize=$(echo "0.000001" | bc -l)
scaleSize=$(echo "0.001" | bc -l)

cd ${caseName}

@@ -14,14 +14,26 @@ cp -r\
0

#Preparation mesh
foamDictionary -entry decomposer -set scotch system/decomposeParDict
foamDictionary -entry numberOfSubdomains -set 6 system/decomposeParDict
runApplication -a\
foamDictionary -entry decomposer -set scotch system/decomposeParDict
runApplication -a\
foamDictionary -entry numberOfSubdomains -set 30 system/decomposeParDict

# foamDictionary -entry simpleCoeffs/n -set "(1 2 3)" system/decomposeParDict
runApplication blockMesh
runApplication decomposePar
runApplication decomposePar -copyZero
runParallel renumberMesh -overwrite
runParallel checkMesh -allGeometry -allTopology

runParallel -a\
foamDictionary constant/polyMesh/boundary -entry entry0/back/type -set empty
runParallel -a\
foamDictionary constant/polyMesh/boundary -entry entry0/front/type -set empty
runApplication -a\
foamDictionary constant/polyMesh/boundary -entry entry0/back/type -set empty
runApplication -a\
foamDictionary constant/polyMesh/boundary -entry entry0/front/type -set empty

#Calculation
runApplication setFields
runParallel -a setFields
23 changes: 17 additions & 6 deletions tests/HeleShaw/channel2D/src/0.orig/T
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 9
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
@@ -23,22 +23,33 @@ boundaryField
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"

empty1
back
{
type empty;
}
empty2
front
{
type empty;
}
open
left
{
// type fixedValue;
// value uniform 300;
type inletOutlet;
inletValue $internalField;
value $internalField;
}
bottom
{
type zeroGradient;
}
right
{
type zeroGradient;
}
top
{
type zeroGradient;
}
}


// ************************************************************************* //
27 changes: 21 additions & 6 deletions tests/HeleShaw/channel2D/src/0.orig/U
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 9
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
@@ -23,18 +23,18 @@ boundaryField
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"

empty1
back
{
type empty;
}
empty2
front
{
type empty;
}
open
left
{
// type zeroGradient;
type noSlip;
type fixedValue;
value uniform (0.01 0 0);
// type pressureInletOutletVelocity;
// phi phi;
// tangentialVelocity (0 0 0);
@@ -44,6 +44,21 @@ boundaryField
// rho rho;
// value uniform (0 0 0);
}
bottom
{
type noSlip;
}
right
{
type fixedValue;
value uniform (0.01 0 0);
// type zeroGradient;
}
top
{
type noSlip;
}
}


// ************************************************************************* //
65 changes: 58 additions & 7 deletions tests/HeleShaw/channel2D/src/0.orig/alpha.phase1
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 9
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
@@ -23,20 +23,71 @@ boundaryField
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"

empty1
back
{
type empty;
}
empty2
front
{
type empty;
}
open
left
{
type zeroGradient;
// type inletOutlet;
// value uniform 1;
// inletValue uniform 1;
}
bottom
{
// type dynamicAlphaContactAngle;
// uTheta 0.1;
// theta0 60;
// thetaA 15;
// thetaR 61;
// limit gradient;
// value uniform 0;

type constantAlphaContactAngle;
theta0 160.0;
limit gradient;
value uniform 0;

// type temperatureDependentAlphaContactAngle;
// T T;
// theta0 table
// (
// (300.0 90.0)
// (370.0 10.0)
// );
// limit gradient;
// value uniform 0;
}
right
{
type zeroGradient;
}
top
{
// type dynamicAlphaContactAngle;
// uTheta 0.1;
// theta0 60;
// thetaA 15;
// thetaR 61;
// limit gradient;
// value uniform 0;

type constantAlphaContactAngle;
theta0 160.0;
limit gradient;
value uniform 0;

// type temperatureDependentAlphaContactAngle;
// T T;
// theta0 table
// (
// (300.0 90.0)
// (370.0 10.0)
// );
// limit gradient;
// value uniform 0;
}
}

25 changes: 19 additions & 6 deletions tests/HeleShaw/channel2D/src/0.orig/p
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 9
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
@@ -23,20 +23,33 @@ boundaryField
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"

empty1
back
{
type empty;
}
empty2
front
{
type empty;
}
open
left
{
type fixedFluxPressure;
type zeroGradient;
// type totalPressure;
// p0 $internalField;
// p0 uniform 100100;
}
bottom
{
type fixedFluxPressure;
}
right
{
type zeroGradient;
}
top
{
type fixedFluxPressure;
}
}


// ************************************************************************* //
24 changes: 18 additions & 6 deletions tests/HeleShaw/channel2D/src/0.orig/p_rgh
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 9
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
@@ -23,19 +23,31 @@ boundaryField
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"

empty1
back
{
type empty;
}
empty2
front
{
type empty;
}
open
left
{
type fixedFluxPressure;
type zeroGradient;
// type totalPressure;
// p0 $internalField;
// p0 uniform 100100;
}
bottom
{
type fixedFluxPressure;
}
right
{
type zeroGradient;
}
top
{
type fixedFluxPressure;
}
}

20 changes: 16 additions & 4 deletions tests/HeleShaw/channel2D/src/0.orig/pc
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 9
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
@@ -23,15 +23,27 @@ boundaryField
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"

empty1
back
{
type empty;
}
empty2
front
{
type empty;
}
open
left
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
right
{
type zeroGradient;
}
top
{
type zeroGradient;
}
20 changes: 20 additions & 0 deletions tests/HeleShaw/channel2D/src/constant/HeleShawModel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "constant";
object HeleShawModel;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

b b [ 0 1 0 0 0 0 0 ] 1e-5;


// ************************************************************************* //
2 changes: 1 addition & 1 deletion tests/HeleShaw/channel2D/src/system/blockMeshDict
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ oy 0;
oz 0;

nz 1;
nx 1000;
nx 2000;
ny #calc "int($nx * $dy / $dx)";

box0nx $nx;
Loading

0 comments on commit 69c23f8

Please sign in to comment.