mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into particleInteractions
This commit is contained in:
@ -26,7 +26,7 @@ Application
|
||||
analyticalCylinder
|
||||
|
||||
Description
|
||||
Generates an analytical solution for potential flow around a cylinder.
|
||||
Generates an analytical solution for potential flow around a cylinder.
|
||||
Can be compared with the solution from the potentialFlow/cylinder example.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -47,19 +47,19 @@ int main(int argc, char *argv[])
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info << "\nEvaluating analytical solution" << endl;
|
||||
Info<< "\nEvaluating analytical solution" << endl;
|
||||
|
||||
volVectorField centres = UA.mesh().C();
|
||||
volScalarField magCentres = mag(centres);
|
||||
volScalarField theta = acos((centres & vector(1,0,0))/magCentres);
|
||||
|
||||
volVectorField cs2theta =
|
||||
cos(2*theta)*vector(1,0,0)
|
||||
cos(2*theta)*vector(1,0,0)
|
||||
+ sin(2*theta)*vector(0,1,0);
|
||||
|
||||
UA = uInfX*(dimensionedVector(vector(1,0,0))
|
||||
- pow((radius/magCentres),2)*cs2theta);
|
||||
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "end" << endl;
|
||||
|
||||
@ -106,7 +106,7 @@ int main(int argc, char *argv[])
|
||||
plot3dFile >> coord;
|
||||
|
||||
// if statement ignores the first layer in i and j
|
||||
if(i>0 && j>0)
|
||||
if (i>0 && j>0)
|
||||
{
|
||||
points[p++][comp] = coord;
|
||||
}
|
||||
@ -117,7 +117,7 @@ int main(int argc, char *argv[])
|
||||
// correct error in biconic meshes
|
||||
forAll(points, i)
|
||||
{
|
||||
if(points[i][1] < 1e-07)
|
||||
if (points[i][1] < 1e-07)
|
||||
{
|
||||
points[i][1] = 0.0;
|
||||
}
|
||||
@ -143,11 +143,11 @@ int main(int argc, char *argv[])
|
||||
pointsWedge[i+nPointsij] = cmptMultiply(vector(1.0, 1.0, -1.0), pointsWedge[i]);
|
||||
}
|
||||
|
||||
Info << "Writing points to: " << nl
|
||||
Info<< "Writing points to: " << nl
|
||||
<< " " << pointsFile << endl;
|
||||
pFile << pointsWedge;
|
||||
|
||||
Info << "End" << endl;
|
||||
Info<< "End" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
43
tutorials/compressible/rhoSimplecFoam/squareBend/0/T
Normal file
43
tutorials/compressible/rhoSimplecFoam/squareBend/0/T
Normal file
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 1000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
Default_Boundary_Region
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1000;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
//type zeroGradient;
|
||||
value uniform 1000;
|
||||
inletValue uniform 1000;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
43
tutorials/compressible/rhoSimplecFoam/squareBend/0/U
Normal file
43
tutorials/compressible/rhoSimplecFoam/squareBend/0/U
Normal file
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
Default_Boundary_Region
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type flowRateInletVelocity;
|
||||
flowRate 0.5; //0.75;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
value uniform (0 0 0);
|
||||
inletValue uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
43
tutorials/compressible/rhoSimplecFoam/squareBend/0/alphat
Normal file
43
tutorials/compressible/rhoSimplecFoam/squareBend/0/alphat
Normal file
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
Default_Boundary_Region
|
||||
{
|
||||
type alphatWallFunction;
|
||||
Prt 0.85;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
47
tutorials/compressible/rhoSimplecFoam/squareBend/0/epsilon
Normal file
47
tutorials/compressible/rhoSimplecFoam/squareBend/0/epsilon
Normal file
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 200;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
Default_Boundary_Region
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 200;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type compressible::turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.005;
|
||||
value uniform 200;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 200;
|
||||
value uniform 200;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
44
tutorials/compressible/rhoSimplecFoam/squareBend/0/k
Normal file
44
tutorials/compressible/rhoSimplecFoam/squareBend/0/k
Normal file
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
Default_Boundary_Region
|
||||
{
|
||||
type compressible::kqRWallFunction;
|
||||
value uniform 1;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.05;
|
||||
value uniform 1;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 1;
|
||||
value uniform 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
45
tutorials/compressible/rhoSimplecFoam/squareBend/0/mut
Normal file
45
tutorials/compressible/rhoSimplecFoam/squareBend/0/mut
Normal file
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object mut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
Default_Boundary_Region
|
||||
{
|
||||
type mutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
54
tutorials/compressible/rhoSimplecFoam/squareBend/0/p
Normal file
54
tutorials/compressible/rhoSimplecFoam/squareBend/0/p
Normal file
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 110000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
Default_Boundary_Region
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
//type zeroGradient;
|
||||
type mixed;
|
||||
refValue uniform 110000;
|
||||
refGradient uniform 0;
|
||||
valueFraction uniform 0.3;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 110000;
|
||||
|
||||
//type mixed;
|
||||
//refValue uniform 110000;
|
||||
//refGradient uniform 0;
|
||||
//valueFraction uniform 1;
|
||||
//type transonicOutletPressure;
|
||||
//U U;
|
||||
//phi phi;
|
||||
//gamma 1.4;
|
||||
//psi psi;
|
||||
//pInf uniform 110000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,115 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
// front-plane: z = +25mm
|
||||
// inlet region
|
||||
( -50 25 25) // pt 0
|
||||
( 0 25 25) // pt 1
|
||||
( -50 75 25) // pt 2
|
||||
( 0 75 25) // pt 3
|
||||
// outlet region
|
||||
( -500 -75 25) // pt 4
|
||||
( 0 -75 25) // pt 5
|
||||
( -500 -25 25) // pt 6
|
||||
( 0 -25 25) // pt 7
|
||||
// bend mid-points
|
||||
( 25 0 25) // pt 8
|
||||
( 75 0 25) // pt 9
|
||||
// back-plane: z = -25mm
|
||||
// inlet region
|
||||
( -50 25 -25) // pt 0 + 10
|
||||
( 0 25 -25) // pt 1 + 10
|
||||
( -50 75 -25) // pt 2 + 10
|
||||
( 0 75 -25) // pt 3 + 10
|
||||
// outlet region
|
||||
( -500 -75 -25) // pt 4 + 10
|
||||
( 0 -75 -25) // pt 5 + 10
|
||||
( -500 -25 -25) // pt 7 + 10
|
||||
( 0 -25 -25) // pt 8 + 10
|
||||
// bend mid-points
|
||||
( 25 0 -25) // pt 8 + 10
|
||||
( 75 0 -25) // pt 9 + 10
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 11 10 2 3 13 12) inlet ( 20 20 20) simpleGrading (1 1 1)
|
||||
hex (4 5 15 14 6 7 17 16) outlet (200 20 20) simpleGrading (1 1 1)
|
||||
|
||||
hex (1 8 18 11 3 9 19 13) bend1 ( 30 20 20) simpleGrading (1 1 1)
|
||||
hex (5 9 19 15 7 8 18 17) bend2 ( 30 20 20) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
// block 2
|
||||
arc 1 8 ( 17.678 17.678 25)
|
||||
arc 11 18 ( 17.678 17.678 -25)
|
||||
arc 3 9 ( 53.033 53.033 25)
|
||||
arc 13 19 ( 53.033 53.033 -25)
|
||||
// block 3
|
||||
arc 7 8 ( 17.678 -17.678 25)
|
||||
arc 17 18 ( 17.678 -17.678 -25)
|
||||
arc 5 9 ( 53.033 -53.033 25)
|
||||
arc 15 19 ( 53.033 -53.033 -25)
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
// is there no way of defining all my 'defaultFaces' to be 'wall'?
|
||||
wall Default_Boundary_Region
|
||||
(
|
||||
// block0
|
||||
( 0 1 3 2 )
|
||||
( 11 10 12 13 )
|
||||
( 0 10 11 1 )
|
||||
( 2 3 13 12 )
|
||||
// block1
|
||||
( 4 5 7 6 )
|
||||
( 15 14 16 17 )
|
||||
( 4 14 15 5 )
|
||||
( 6 7 17 16 )
|
||||
// block2
|
||||
( 1 8 9 3 )
|
||||
( 18 11 13 19 )
|
||||
( 3 9 19 13 )
|
||||
( 1 11 18 8 )
|
||||
// block3
|
||||
( 5 9 8 7 )
|
||||
( 19 15 17 18 )
|
||||
( 5 15 19 9 )
|
||||
( 7 8 18 17 )
|
||||
)
|
||||
patch inlet
|
||||
(
|
||||
(0 2 12 10)
|
||||
)
|
||||
|
||||
patch outlet
|
||||
(
|
||||
(4 6 16 14)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
3
|
||||
(
|
||||
Default_Boundary_Region
|
||||
{
|
||||
type wall;
|
||||
nFaces 22400;
|
||||
startFace 324400;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 400;
|
||||
startFace 346800;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 400;
|
||||
startFace 347200;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||
|
||||
mixture air 1 28.9 1007 0 1.4792e-06 116;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RASModel;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,51 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoSimplecFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 500;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 100;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
graphFormat raw;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,71 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) Gauss upwind; //limitedLinearV 1; //upwind;
|
||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||
div(phi,h) Gauss upwind; //limitedLinear 1; //upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
|
||||
div(phid,p) Gauss upwind;
|
||||
div(U,p) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default none;
|
||||
interpolate(rho) linear;
|
||||
div(U,p) upwind phi;
|
||||
interpolate((psi*U)) linear;
|
||||
interpolate(U) linear;
|
||||
UD upwind phid;
|
||||
interpolate(p) linear;
|
||||
interpolate(((rho|(A(U)-H(1)))-(rho|A(U)))) linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
pCorr;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,199 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p0
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 20;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
U0
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
U1
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
nSweeps 1;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 20;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
h0
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
nSweeps 1;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
h
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 20;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
k0
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
k1
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
nSweeps 1;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
k
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 20;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
epsilon0
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
epsilon1
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
nSweeps 1;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
epsilon
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 20;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pMin pMin [1 -1 -2 0 0 0 0] 10000;
|
||||
transonic yes;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
p 1;
|
||||
rho 1; //0.1;
|
||||
U 0.9;
|
||||
h 0.95;
|
||||
k 0.9;
|
||||
epsilon 0.9;
|
||||
}
|
||||
|
||||
relaxationFactors0
|
||||
{
|
||||
p 0.3;
|
||||
rho 0.1;
|
||||
U 0.7;
|
||||
h 0.7;
|
||||
k 0.7;
|
||||
epsilon 0.7;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -32,7 +32,8 @@ boundaryField
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -32,7 +32,8 @@ boundaryField
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,8 @@ boundaryField
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,8 @@ boundaryField
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -32,7 +32,8 @@ boundaryField
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,8 @@ boundaryField
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,8 @@ boundaryField
|
||||
|
||||
obstacle
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
periodic
|
||||
|
||||
@ -27,7 +27,8 @@ boundaryField
|
||||
|
||||
obstacle
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
periodic
|
||||
|
||||
@ -27,7 +27,8 @@ boundaryField
|
||||
|
||||
obstacle
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
periodic
|
||||
|
||||
@ -27,7 +27,8 @@ boundaryField
|
||||
|
||||
obstacle
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
periodic
|
||||
|
||||
@ -27,7 +27,8 @@ boundaryField
|
||||
|
||||
obstacle
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
periodic
|
||||
|
||||
@ -27,7 +27,8 @@ boundaryField
|
||||
|
||||
obstacle
|
||||
{
|
||||
type zeroGradient;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
periodic
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Info << "Reading field p\n" << endl;
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
@ -12,7 +12,7 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
Info << "Reading field U\n" << endl;
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Info << "Reading field p\n" << endl;
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
|
||||
@ -34,7 +34,7 @@ hierarchicalCoeffs
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
processorWeights ( 1 1 1 1 );
|
||||
//processorWeights ( 1 1 1 1 );
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
|
||||
@ -19,14 +19,23 @@ dynamicFvMesh dynamicRefineFvMesh;
|
||||
|
||||
dynamicRefineFvMeshCoeffs
|
||||
{
|
||||
// How often to refine
|
||||
refineInterval 1;
|
||||
// Field to be refinement on
|
||||
field alpha1;
|
||||
// Refine field inbetween lower..upper
|
||||
lowerRefineLevel 0.001;
|
||||
upperRefineLevel 0.999;
|
||||
// If value < unrefineLevel unrefine
|
||||
unrefineLevel 10;
|
||||
// Have slower than 2:1 refinement
|
||||
nBufferLayers 1;
|
||||
// Refine cells only up to maxRefinement levels
|
||||
maxRefinement 2;
|
||||
// Stop refinement if maxCells reached
|
||||
maxCells 200000;
|
||||
// Flux field and corresponding velocity field. Fluxes on changed
|
||||
// faces get recalculated by interpolating the velocity.
|
||||
correctFluxes
|
||||
(
|
||||
(
|
||||
@ -34,6 +43,7 @@ dynamicRefineFvMeshCoeffs
|
||||
U
|
||||
)
|
||||
);
|
||||
// Write the refinement level as a volScalarField
|
||||
dumpLevel true;
|
||||
}
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
|
||||
dataFile << timeValues << endl;
|
||||
}
|
||||
|
||||
Info << "End\n" << endl;
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
)*rUAf;
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user