ENH: add missing/improve annotated dictionaries
New: - blockMeshDict - sampleDict - boxTurbDict - createBoxTurbDict - dsmcInitialiseDict - mdEquilibrationDict - mdInitialiseDict - obstaclesDict - optimisationDict - potentialDict - probesDict - sampleDict - setExprBoundaryFieldsDict - setExprFieldsDict Improved: - extrudeMeshDict - topoSetSourcesDict
This commit is contained in:
parent
5cbdb7a3d7
commit
d0d3670d01
96
etc/caseDicts/annotated/blockMeshDict
Normal file
96
etc/caseDicts/annotated/blockMeshDict
Normal file
@ -0,0 +1,96 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 1;
|
||||
|
||||
|
||||
x0 0;
|
||||
x1 #eval "$x0 + 1.0";
|
||||
y0 0;
|
||||
y1 1;
|
||||
z0 0;
|
||||
z1 1;
|
||||
|
||||
nx 2;
|
||||
ny 2;
|
||||
nz 1;
|
||||
|
||||
gr 40.0;
|
||||
grInv #eval "1/$gr";
|
||||
|
||||
vertices
|
||||
(
|
||||
($x0 $y0 $z0)
|
||||
($x1 $y0 $z0)
|
||||
($x1 $y1 $z0)
|
||||
($x0 $y1 $z0)
|
||||
($x0 $y0 $z1)
|
||||
($x1 $y0 $z1)
|
||||
($x1 $y1 $z1)
|
||||
($x0 $y1 $z1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) ($nx $ny $nz) simpleGrading (1 $grInv 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
upperWall
|
||||
{
|
||||
type symmetry;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
);
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
23
etc/caseDicts/annotated/boxTurbDict
Normal file
23
etc/caseDicts/annotated/boxTurbDict
Normal file
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object boxTurbDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Ea 10;
|
||||
|
||||
k0 5;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
52
etc/caseDicts/annotated/createBoxTurbDict
Normal file
52
etc/caseDicts/annotated/createBoxTurbDict
Normal file
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object createBoxTurbDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
N (64 64 64);
|
||||
|
||||
// Suggested box size of 9*2*pi [cm]
|
||||
L (0.56548667765 0.56548667765 0.56548667765);
|
||||
|
||||
nModes 5000;
|
||||
|
||||
// Energy as a function of wave number
|
||||
// Here using Comte-Bellot and Corrsin data at t.U_0/M = 42 (see Ref. table 3)
|
||||
Ek table
|
||||
(
|
||||
(15 0)
|
||||
(20 0.000129)
|
||||
(25 0.00023)
|
||||
(30 0.000322)
|
||||
(40 0.000435)
|
||||
(50 0.000457)
|
||||
(70 0.00038)
|
||||
(100 0.00027)
|
||||
(150 0.000168)
|
||||
(200 0.00012)
|
||||
(250 8.9e-05)
|
||||
(300 7.03e-05)
|
||||
(400 4.7e-05)
|
||||
(600 2.47e-05)
|
||||
(800 1.26e-05)
|
||||
(1000 7.42e-06)
|
||||
(1250 3.96e-06)
|
||||
(1500 2.33e-06)
|
||||
(1750 1.34e-06)
|
||||
(2000 8e-07)
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
29
etc/caseDicts/annotated/dsmcInitialiseDict
Normal file
29
etc/caseDicts/annotated/dsmcInitialiseDict
Normal file
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object dsmcInitialiseDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberDensities
|
||||
{
|
||||
N2 0.777e20;
|
||||
O2 0.223e20;
|
||||
};
|
||||
|
||||
temperature 300;
|
||||
|
||||
velocity (1325 -352 823);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -24,7 +24,7 @@ constructFrom patch;
|
||||
//constructFrom surface;
|
||||
|
||||
// If construct from patch/mesh:
|
||||
sourceCase "../cavity";
|
||||
sourceCase "$FOAM_CASE";
|
||||
sourcePatches (movingWall);
|
||||
|
||||
// If construct from patch: patch to use for back (can be same as sourcePatch)
|
||||
|
20
etc/caseDicts/annotated/mdEquilibrationDict
Normal file
20
etc/caseDicts/annotated/mdEquilibrationDict
Normal file
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object mdEquilibrationDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
targetTemperature 298;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
82
etc/caseDicts/annotated/mdInitialiseDict
Normal file
82
etc/caseDicts/annotated/mdInitialiseDict
Normal file
@ -0,0 +1,82 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object mdInitialiseDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Euler angles, expressed in degrees as phi, theta, psi, see
|
||||
// http://mathworld.wolfram.com/EulerAngles.html
|
||||
|
||||
sectionA
|
||||
{
|
||||
massDensity 1004;
|
||||
temperature 298;
|
||||
bulkVelocity (0.0 0.0 0.0);
|
||||
latticeIds
|
||||
(
|
||||
water
|
||||
);
|
||||
tetherSiteIds ();
|
||||
latticePositions
|
||||
(
|
||||
(0 0 0)
|
||||
);
|
||||
anchor (0 0 0);
|
||||
orientationAngles (0 0 0);
|
||||
latticeCellShape (1 1 1);
|
||||
}
|
||||
|
||||
sectionB
|
||||
{
|
||||
massDensity 1004;
|
||||
temperature 298;
|
||||
bulkVelocity (0.0 0.0 0.0);
|
||||
latticeIds
|
||||
(
|
||||
Ar
|
||||
);
|
||||
tetherSiteIds ();
|
||||
latticePositions
|
||||
(
|
||||
(0 0 0)
|
||||
);
|
||||
anchor (0 0 0);
|
||||
orientationAngles (0 0 0);
|
||||
latticeCellShape (1 1 1);
|
||||
}
|
||||
|
||||
sectionC
|
||||
{
|
||||
massDensity 1004;
|
||||
temperature 298;
|
||||
bulkVelocity (0.0 0.0 0.0);
|
||||
latticeIds
|
||||
(
|
||||
water1
|
||||
water2
|
||||
);
|
||||
tetherSiteIds ();
|
||||
latticePositions
|
||||
(
|
||||
(0 0 0)
|
||||
(0 0.5 0.5)
|
||||
(0.5 0 0.5)
|
||||
(0.5 0.5 0)
|
||||
);
|
||||
anchor (0 0 0);
|
||||
orientationAngles (0 0 0);
|
||||
latticeCellShape (1 1 1);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
39
etc/caseDicts/annotated/obstaclesDict
Normal file
39
etc/caseDicts/annotated/obstaclesDict
Normal file
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object obstaclesDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 1.0;
|
||||
|
||||
verbose 0;
|
||||
|
||||
#include "groups/group4"
|
||||
|
||||
_01
|
||||
{
|
||||
groupId 1;
|
||||
|
||||
zpipe { direction z; length 0.947; diameter 0.026; }
|
||||
|
||||
obstacles
|
||||
(
|
||||
box { point (0 0 0); size (0.05 0.05 2); }
|
||||
box { point (1 0 0); size (0.05 0.05 2); }
|
||||
box { point (2 0 0); size (0.05 0.05 2); }
|
||||
cyl { point (1.031 0.975 0.056); $zpipe; }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
393
etc/caseDicts/annotated/optimisationDict
Normal file
393
etc/caseDicts/annotated/optimisationDict
Normal file
@ -0,0 +1,393 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object optimisationDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
optimisationManager steadyOptimisation; // singleRun;
|
||||
|
||||
|
||||
primalSolvers
|
||||
{
|
||||
p1
|
||||
{
|
||||
active true;
|
||||
type incompressible;
|
||||
solver simple;
|
||||
|
||||
solutionControls
|
||||
{
|
||||
nIters 3000;
|
||||
residualControl
|
||||
{
|
||||
"p.*" 1.e-7;
|
||||
"U.*" 1.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
adjointManagers
|
||||
{
|
||||
am1
|
||||
{
|
||||
primalSolver p1;
|
||||
adjointSolvers
|
||||
{
|
||||
as1
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active true;
|
||||
type incompressible;
|
||||
solver adjointSimple;
|
||||
useSolverNameForFields true;
|
||||
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type incompressible;
|
||||
objectiveNames
|
||||
{
|
||||
losses
|
||||
{
|
||||
weight 1;
|
||||
type PtLosses;
|
||||
patches (Inlet Outlet);
|
||||
}
|
||||
}
|
||||
}
|
||||
// ATC treatment
|
||||
//--------------
|
||||
ATCModel
|
||||
{
|
||||
ATCModel standard;
|
||||
}
|
||||
// solution control
|
||||
//------------------
|
||||
solutionControls
|
||||
{
|
||||
nIters 3000;
|
||||
residualControl
|
||||
{
|
||||
"pa.*" 1.e-7;
|
||||
"Ua.*" 1.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
vol
|
||||
{
|
||||
// choose adjoint solver
|
||||
//----------------------
|
||||
active true;
|
||||
type incompressible;
|
||||
solver adjointSimple;
|
||||
useSolverNameForFields true;
|
||||
isConstraint true;
|
||||
// manage objectives
|
||||
//------------------
|
||||
objectives
|
||||
{
|
||||
type incompressible;
|
||||
|
||||
objectiveNames
|
||||
{
|
||||
vol
|
||||
{
|
||||
weight 1;
|
||||
type partialVolume;
|
||||
patches (lower upper);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ATC treatment
|
||||
//--------------
|
||||
ATCModel
|
||||
{
|
||||
ATCModel standard;
|
||||
}
|
||||
|
||||
// solution control
|
||||
//------------------
|
||||
solutionControls
|
||||
{
|
||||
nIters 3000;
|
||||
residualControl
|
||||
{
|
||||
"pa.*" 1.e-7;
|
||||
"Ua.*" 1.e-7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
optimisation
|
||||
{
|
||||
optimisationType
|
||||
{
|
||||
type shapeOptimisation;
|
||||
writeEachMesh true;
|
||||
}
|
||||
|
||||
sensitivities
|
||||
{
|
||||
type volumetricBSplinesFI;
|
||||
patches (lower upper);
|
||||
}
|
||||
|
||||
updateMethod
|
||||
{
|
||||
method SQP;
|
||||
SQP
|
||||
{
|
||||
etaHessian 0.8;
|
||||
nSteepestDescent 1;
|
||||
scaleFirstHessian true;
|
||||
}
|
||||
}
|
||||
|
||||
meshMovement
|
||||
{
|
||||
type volumetricBSplines;
|
||||
maxAllowedDisplacement 2.e-3;
|
||||
}
|
||||
|
||||
/*
|
||||
updateMethod
|
||||
{
|
||||
method BFGS;
|
||||
BFGS
|
||||
{
|
||||
etaHessian 0.8;
|
||||
nSteepestDescent 1;
|
||||
scaleFirstHessian true;
|
||||
activeDesignVariables
|
||||
(
|
||||
141 142 144 145 147 148
|
||||
);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
sensitivities
|
||||
{
|
||||
type multiple; // used to compute many kinds of sensitivities at the same time
|
||||
patches (lower upper);
|
||||
sensTypes
|
||||
{
|
||||
FIVolSplines
|
||||
{
|
||||
type volumetricBSplinesFI;
|
||||
patches (lower upper);
|
||||
includeDistance true;
|
||||
adjointEikonalSolver
|
||||
{
|
||||
iters 1000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
}
|
||||
ESIVolSplines
|
||||
{
|
||||
type volumetricBSplines;
|
||||
patches (lower upper);
|
||||
includeObjectiveContribution true; // one of this or the equivalent flag in
|
||||
// surfaceSensitivities has to be set to true
|
||||
// with this being the prefered one
|
||||
surfaceSensitivities
|
||||
{
|
||||
patches (lower upper);
|
||||
includeSurfaceArea true;
|
||||
includeMeshMovement true;
|
||||
includeDistance true;
|
||||
includeObjectiveContribution false;
|
||||
|
||||
// adjointEikonal and adjointMeshMovement solvers should be always nested
|
||||
// within the dictionary of the sensitivity type they correspond to.
|
||||
// For (E)SI based sensitivities, this means the surfaceSensitivities dict
|
||||
// Default values are provided, so the dictionaries can be skipped
|
||||
adjointEikonalSolver
|
||||
{
|
||||
iters 1000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
adjointMeshMovementSolver
|
||||
{
|
||||
iters 10000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
}
|
||||
}
|
||||
SIVolSplines
|
||||
{
|
||||
type volumetricBSplines;
|
||||
patches (lower upper);
|
||||
includeObjectiveContribution true; // same comment as above
|
||||
surfaceSensitivities
|
||||
{
|
||||
patches (lower upper);
|
||||
includeSurfaceArea true;
|
||||
includeMeshMovement false;
|
||||
includeDistance true;
|
||||
includeObjectiveContribution false;
|
||||
adjointEikonalSolver
|
||||
{
|
||||
iters 1000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
}
|
||||
}
|
||||
FIBezier
|
||||
{
|
||||
type BezierFI;
|
||||
includeDistance true;
|
||||
patches (lower upper);
|
||||
dxdbSolver
|
||||
{
|
||||
iters 1000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
adjointEikonalSolver
|
||||
{
|
||||
iters 1000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
}
|
||||
ESIBezier
|
||||
{
|
||||
type Bezier;
|
||||
includeObjectiveContribution true; // same comment as above
|
||||
surfaceSensitivities
|
||||
{
|
||||
patches (lower upper);
|
||||
includeSurfaceArea true;
|
||||
includeMeshMovement true;
|
||||
includeDistance true;
|
||||
includeObjectiveContribution false;
|
||||
adjointEikonalSolver
|
||||
{
|
||||
iters 1000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
adjointMeshMovementSolver
|
||||
{
|
||||
iters 10000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
}
|
||||
patches (lower upper);
|
||||
}
|
||||
SIBezier
|
||||
{
|
||||
type Bezier;
|
||||
includeObjectiveContribution true; // same comment as above
|
||||
surfaceSensitivities
|
||||
{
|
||||
patches (lower upper);
|
||||
includeSurfaceArea true;
|
||||
includeMeshMovement false;
|
||||
includeDistance true;
|
||||
includeObjectiveContribution false;
|
||||
adjointEikonalSolver
|
||||
{
|
||||
iters 1000;
|
||||
tolerance 1.e-6;
|
||||
}
|
||||
}
|
||||
patches (lower upper);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
sensitivities
|
||||
{
|
||||
type multiple; // used to compute many kinds of sensitivities at the same time
|
||||
patches (lower upper);
|
||||
sensTypes
|
||||
{
|
||||
FIVolSplines
|
||||
{
|
||||
type volumetricBSplinesFI;
|
||||
patches (lower upper);
|
||||
}
|
||||
ESIVolSplines
|
||||
{
|
||||
type volumetricBSplines;
|
||||
patches (lower upper);
|
||||
}
|
||||
SIVolSplines
|
||||
{
|
||||
type volumetricBSplines;
|
||||
patches (lower upper);
|
||||
surfaceSensitivities
|
||||
{
|
||||
includeMeshMovement false;
|
||||
}
|
||||
}
|
||||
FIBezier
|
||||
{
|
||||
type BezierFI;
|
||||
patches (lower upper);
|
||||
}
|
||||
ESIBezier
|
||||
{
|
||||
type Bezier;
|
||||
patches (lower upper);
|
||||
}
|
||||
SIBezier
|
||||
{
|
||||
type Bezier;
|
||||
patches (lower upper);
|
||||
surfaceSensitivities
|
||||
{
|
||||
includeMeshMovement false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Bezier
|
||||
{
|
||||
nBezier 24;
|
||||
confineXmovement
|
||||
(
|
||||
true false false false false false false false false false false true
|
||||
true false false false false false false false false false false true
|
||||
);
|
||||
confineYmovement
|
||||
(
|
||||
true false false false false false false false false false false true
|
||||
true false false false false false false false false false false true
|
||||
);
|
||||
confineZmovement
|
||||
(
|
||||
true true true true true true true true true true true true
|
||||
true true true true true true true true true true true true
|
||||
);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// ************************************************************************* //
|
118
etc/caseDicts/annotated/potentialDict
Normal file
118
etc/caseDicts/annotated/potentialDict
Normal file
@ -0,0 +1,118 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object potentialDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Subdictionaries specifying types of intermolecular potential.
|
||||
// Sub-sub dictionaries specify the potentials themselves.
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Removal order
|
||||
|
||||
// This is the order in which to remove overlapping pairs if more than one
|
||||
// type of molecule is present. The most valuable molecule type is at the
|
||||
// right hand end, the molecule that will be removed 1st is 1st on the list.
|
||||
// Not all types need to be present, a molecule that is not present is
|
||||
// automatically less valuable than any on the list. For molecules of the
|
||||
// same type there is no control over which is removed.
|
||||
|
||||
removalOrder ( water );
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Potential Energy Limit
|
||||
|
||||
// Maximum permissible pair energy allowed at startup. Used to remove
|
||||
// overlapping molecules created during preprocessing.
|
||||
|
||||
potentialEnergyLimit 1e-18;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Pair potentials
|
||||
|
||||
// If a pair are not present here it is assumed that they do not interact.
|
||||
|
||||
// Electrostatic pair interactions are not listed here - they are handled
|
||||
// separately.
|
||||
|
||||
// If there are r different type of molecules, and a pair force is required
|
||||
// between all combinations, then there are C = r(r+1)/2 combinations,
|
||||
// i.e. for r = {1,2,3,4}, C = {1,3,6,10} (sum of triangular numbers).
|
||||
|
||||
// Pair potentials are specified by the combination of their ids,
|
||||
// for MOLA and MOLB, "MOLA-MOLB" OR "MOLB-MOLA" is acceptable
|
||||
// (strictly OR, both or neither will throw an error)
|
||||
|
||||
pair
|
||||
{
|
||||
O-O
|
||||
{
|
||||
pairPotential lennardJones;
|
||||
rCut 1.0e-9;
|
||||
rMin 0.1e-9;
|
||||
dr 1e-13;
|
||||
lennardJonesCoeffs
|
||||
{
|
||||
sigma 3.154e-10;
|
||||
epsilon 1.07690722e-21;
|
||||
}
|
||||
energyScalingFunction noScaling;
|
||||
writeTables yes;
|
||||
}
|
||||
|
||||
electrostatic
|
||||
{
|
||||
pairPotential dampedCoulomb;
|
||||
rCut 1e-9;
|
||||
rMin 2e-11;
|
||||
dr 2e-12;
|
||||
dampedCoulombCoeffs
|
||||
{
|
||||
alpha 2e9;
|
||||
}
|
||||
energyScalingFunction shiftedForce;
|
||||
writeTables yes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Tethering Potentials
|
||||
|
||||
tether
|
||||
{
|
||||
O
|
||||
{
|
||||
tetherPotential restrainedHarmonicSpring;
|
||||
restrainedHarmonicSpringCoeffs
|
||||
{
|
||||
springConstant 0.277;
|
||||
rR 1.2e-9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// External Forces
|
||||
|
||||
// Bulk external forces (namely gravity) will be specified as forces rather
|
||||
// than potentials to allow their direction to be controlled.
|
||||
|
||||
external
|
||||
{
|
||||
gravity (0 0 0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
31
etc/caseDicts/annotated/probesDict
Normal file
31
etc/caseDicts/annotated/probesDict
Normal file
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location system;
|
||||
object probesDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Fields to be probed (runTime modifiable)
|
||||
fields
|
||||
(
|
||||
T H2O p kT
|
||||
);
|
||||
|
||||
// Locations to be probed (runTime modifiable)
|
||||
probeLocations
|
||||
(
|
||||
(0.005 0.0 0.0)
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
325
etc/caseDicts/annotated/sampleDict
Normal file
325
etc/caseDicts/annotated/sampleDict
Normal file
@ -0,0 +1,325 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object sampleDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Set output format : choice of
|
||||
// xmgr
|
||||
// jplot
|
||||
// gnuplot
|
||||
// raw
|
||||
// vtk
|
||||
// ensight
|
||||
// csv
|
||||
setFormat raw;
|
||||
|
||||
// Surface output format. Choice of
|
||||
// null : suppress output
|
||||
// ensight : Ensight Gold format, one field per case file
|
||||
// foamFile : separate points, faces and values file
|
||||
// dx : DX scalar or vector format
|
||||
// vtk : VTK ascii format
|
||||
// raw : x y z value format for use with e.g. gnuplot 'splot'.
|
||||
//
|
||||
// Note:
|
||||
// other formats such as obj, stl, etc can also be written (by proxy)
|
||||
// but without any values!
|
||||
surfaceFormat vtk;
|
||||
|
||||
// optionally define extra controls for the output formats
|
||||
formatOptions
|
||||
{
|
||||
ensight
|
||||
{
|
||||
format ascii;
|
||||
}
|
||||
}
|
||||
|
||||
// interpolationScheme. choice of
|
||||
// cell : use cell-centre value only; constant over cells
|
||||
// (default)
|
||||
// cellPoint : use cell-centre and vertex values
|
||||
// cellPointFace : use cell-centre, vertex and face values.
|
||||
// pointMVC : use point values only (Mean Value Coordinates)
|
||||
// cellPatchConstrained : like 'cell' but uses cell-centre except on
|
||||
// boundary faces where it uses the boundary value.
|
||||
// For use with e.g. patchCloudSet.
|
||||
// 1] vertex values determined from neighbouring cell-centre values
|
||||
// 2] face values determined using the current face interpolation scheme
|
||||
// for the field (linear, gamma, etc.)
|
||||
interpolationScheme cellPoint;
|
||||
|
||||
// Fields to sample.
|
||||
fields
|
||||
(
|
||||
p
|
||||
U
|
||||
);
|
||||
|
||||
// Set sampling definition: choice of
|
||||
// uniform evenly distributed points on line
|
||||
// face one point per face intersection
|
||||
// midPoint one point per cell, inbetween two face intersections
|
||||
// midPointAndFace combination of face and midPoint
|
||||
//
|
||||
// polyLine specified points, not nessecary on line, uses
|
||||
// tracking
|
||||
// cloud specified points, uses findCell
|
||||
// triSurfaceMeshPointSet points of triSurface
|
||||
//
|
||||
// axis: how to write point coordinate. Choice of
|
||||
// - x/y/z: x/y/z coordinate only
|
||||
// - xyz: three columns
|
||||
// (probably does not make sense for anything but raw)
|
||||
// - distance: distance from start of sampling line (if uses line) or
|
||||
// distance from first specified sampling point
|
||||
//
|
||||
// type specific:
|
||||
// uniform, face, midPoint, midPointAndFace : start and end coordinate
|
||||
// uniform: extra number of sampling points
|
||||
// polyLine, cloud: list of coordinates
|
||||
// patchCloud: list of coordinates and set of patches to look for nearest
|
||||
// patchSeed: random sampling on set of patches. Points slightly off
|
||||
// face centre.
|
||||
sets
|
||||
(
|
||||
lineX1
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
|
||||
//- cavity. Slightly perturbed so not to align with face or edge.
|
||||
start (0.0201 0.05101 0.00501);
|
||||
end (0.0601 0.05101 0.00501);
|
||||
nPoints 10;
|
||||
}
|
||||
|
||||
lineX2
|
||||
{
|
||||
type face;
|
||||
axis x;
|
||||
|
||||
//- cavity
|
||||
start (0.0001 0.0525 0.00501);
|
||||
end (0.0999 0.0525 0.00501);
|
||||
}
|
||||
|
||||
somePoints
|
||||
{
|
||||
type cloud;
|
||||
axis xyz;
|
||||
points ((0.049 0.049 0.00501)(0.051 0.049 0.00501));
|
||||
}
|
||||
|
||||
somePatchPoints
|
||||
{
|
||||
// Sample nearest points on selected patches. Looks only up to
|
||||
// maxDistance away. Any sampling point not found will get value
|
||||
// pTraits<Type>::max (usually VGREAT)
|
||||
// Use with interpolations:
|
||||
// - cell (cell value)
|
||||
// - cellPatchConstrained (boundary value)
|
||||
// - cellPoint (interpolated boundary value)
|
||||
type patchCloud;
|
||||
axis xyz;
|
||||
points ((0.049 0.099 0.005)(0.051 0.054 0.005));
|
||||
maxDistance 0.1; // maximum distance to search
|
||||
patches (".*Wall.*");
|
||||
}
|
||||
|
||||
patchSeed
|
||||
{
|
||||
type patchSeed;
|
||||
axis xyz;
|
||||
patches (".*Wall.*");
|
||||
// Number of points to seed. Divided amongst all processors according
|
||||
// to fraction of patches they hold.
|
||||
maxPoints 100;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
// Surface sampling definition
|
||||
//
|
||||
// 1] patches are not triangulated by default
|
||||
// 2] planes are always triangulated
|
||||
// 3] iso-surfaces are always triangulated
|
||||
surfaces
|
||||
(
|
||||
constantPlane
|
||||
{
|
||||
type plane; // always triangulated
|
||||
basePoint (0.0501 0.0501 0.005);
|
||||
normalVector (0.1 0.1 1);
|
||||
|
||||
//- Optional: restrict to a particular zone
|
||||
// zone zone1;
|
||||
|
||||
//- Optional: do not triangulate (only for surfaceFormats that support
|
||||
// polygons)
|
||||
//triangulate false;
|
||||
}
|
||||
|
||||
interpolatedPlane
|
||||
{
|
||||
type plane; // always triangulated
|
||||
|
||||
// Make plane relative to the coordinateSystem (Cartesian)
|
||||
coordinateSystem
|
||||
{
|
||||
origin (0.0501 0.0501 0.005);
|
||||
|
||||
// Add a coordinate rotation
|
||||
// (required, so here one that doesn't change anything)
|
||||
coordinateRotation
|
||||
{
|
||||
type axesRotation;
|
||||
e1 (1 0 0);
|
||||
e2 (0 1 0);
|
||||
}
|
||||
}
|
||||
basePoint (0 0 0);
|
||||
normalVector (0.1 0.1 1);
|
||||
interpolate true;
|
||||
}
|
||||
|
||||
walls_constant
|
||||
{
|
||||
type patch;
|
||||
patches ( ".*Wall.*" );
|
||||
// Optional: whether to leave as faces (=default) or triangulate
|
||||
// triangulate false;
|
||||
}
|
||||
|
||||
walls_interpolated
|
||||
{
|
||||
type patch;
|
||||
patches ( ".*Wall.*" );
|
||||
interpolate true;
|
||||
// Optional: whether to leave as faces (=default) or triangulate
|
||||
// triangulate false;
|
||||
}
|
||||
|
||||
nearWalls_interpolated
|
||||
{
|
||||
// Sample cell values off patch. Does not need to be the near-wall
|
||||
// cell, can be arbitrarily far away.
|
||||
type patchInternalField;
|
||||
patches ( ".*Wall.*" );
|
||||
interpolate true;
|
||||
|
||||
|
||||
// Optional: specify how to obtain sampling points from the patch
|
||||
// face centres (default is 'normal')
|
||||
//
|
||||
// //- Specify distance to offset in normal direction
|
||||
offsetMode normal;
|
||||
distance 0.1;
|
||||
//
|
||||
// //- Specify single uniform offset
|
||||
// offsetMode uniform;
|
||||
// offset (0 0 0.0001);
|
||||
//
|
||||
// //- Specify offset per patch face
|
||||
// offsetMode nonuniform;
|
||||
// offsets ((0 0 0.0001) (0 0 0.0002));
|
||||
|
||||
|
||||
// Optional: whether to leave as faces (=default) or triangulate
|
||||
// triangulate false;
|
||||
}
|
||||
|
||||
interpolatedIso
|
||||
{
|
||||
// Iso surface for interpolated values only
|
||||
type isoSurface; // always triangulated
|
||||
isoField rho;
|
||||
isoValue 0.5;
|
||||
interpolate true;
|
||||
|
||||
//zone ABC; // Optional: zone only
|
||||
//exposedPatchName fixedWalls; // Optional: zone only
|
||||
|
||||
// regularise false; // Optional: do not simplify
|
||||
// mergeTol 1e-10; // Optional: fraction of mesh bounding box
|
||||
// to merge points (default=1e-6)
|
||||
}
|
||||
constantIso
|
||||
{
|
||||
// Iso surface for constant values.
|
||||
// Triangles guaranteed not to cross cells.
|
||||
type isoSurfaceCell; // always triangulated
|
||||
isoField rho;
|
||||
isoValue 0.5;
|
||||
interpolate false;
|
||||
regularise false; // do not simplify
|
||||
// mergeTol 1e-10; // Optional: fraction of mesh bounding box
|
||||
// to merge points (default=1e-6)
|
||||
}
|
||||
|
||||
triangleCut
|
||||
{
|
||||
// Cutingplane using iso surface
|
||||
type cuttingPlane;
|
||||
planeType pointAndNormal;
|
||||
pointAndNormalDict
|
||||
{
|
||||
basePoint (0.4 0 0.4);
|
||||
normalVector (1 0.2 0.2);
|
||||
}
|
||||
interpolate true;
|
||||
|
||||
//zone ABC; // Optional: zone only
|
||||
//exposedPatchName fixedWalls; // Optional: zone only
|
||||
|
||||
// regularise false; // Optional: do not simplify
|
||||
// mergeTol 1e-10; // Optional: fraction of mesh bounding box
|
||||
// to merge points (default=1e-6)
|
||||
}
|
||||
|
||||
distance
|
||||
{
|
||||
// Isosurface from signed/unsigned distance to surface
|
||||
type distanceSurface;
|
||||
signed true;
|
||||
|
||||
// Definition of surface
|
||||
surfaceType triSurfaceMesh;
|
||||
surfaceName integrationPlane.stl;
|
||||
// Distance to surface
|
||||
distance 0.0;
|
||||
|
||||
//cell false;// optional: use isoSurface instead
|
||||
// of isoSurfaceCell
|
||||
interpolate false;
|
||||
regularise false; // Optional: do not simplify
|
||||
// mergeTol 1e-10; // Optional: fraction of mesh bounding box
|
||||
// to merge points (default=1e-6)
|
||||
}
|
||||
|
||||
triSurfaceSampling
|
||||
{
|
||||
// Sampling on triSurface
|
||||
type sampledTriSurfaceMesh;
|
||||
surface integrationPlane.stl;
|
||||
source boundaryFaces; // What to sample: cells (nearest cell)
|
||||
// insideCells (only triangles inside cell)
|
||||
// boundaryFaces (nearest boundary face)
|
||||
interpolate true;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// *********************************************************************** //
|
32
etc/caseDicts/annotated/setExprBoundaryFieldsDict
Normal file
32
etc/caseDicts/annotated/setExprBoundaryFieldsDict
Normal file
@ -0,0 +1,32 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object setExprBoundaryFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
pattern
|
||||
{
|
||||
field T;
|
||||
|
||||
expressions
|
||||
(
|
||||
{
|
||||
patch outlet2;
|
||||
target something;
|
||||
expression #{ (pos().x() < 1e-4 ? 60 : 120) #};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
52
etc/caseDicts/annotated/setExprFieldsDict
Normal file
52
etc/caseDicts/annotated/setExprFieldsDict
Normal file
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object setExprFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
expressions
|
||||
(
|
||||
T
|
||||
{
|
||||
field T;
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
constants
|
||||
{
|
||||
centre (0.21 0 0.01);
|
||||
}
|
||||
|
||||
variables
|
||||
(
|
||||
"radius = 0.1"
|
||||
);
|
||||
|
||||
condition
|
||||
#{
|
||||
// Within the radius
|
||||
(mag(pos() - $[(vector)constants.centre]) < radius)
|
||||
|
||||
// but only +ve y!
|
||||
&& pos((pos() - $[(vector)constants.centre]).y()) > 0
|
||||
#};
|
||||
|
||||
expression
|
||||
#{
|
||||
300
|
||||
+ 200 * (1 - mag(pos() - $[(vector)constants.centre]) / radius)
|
||||
#};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -241,6 +241,12 @@ cellSet_doc
|
||||
// name ".*Zone";
|
||||
// }
|
||||
}
|
||||
|
||||
//- Cells attached to the outside of the input cellSet
|
||||
{
|
||||
source haloToCell;
|
||||
steps 3; // Number of grow/shrink steps to use
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user