diff --git a/etc/caseDicts/annotated/blockMeshDict b/etc/caseDicts/annotated/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..c088a1fd168a98711120c5ce20d1173f80bcc460 --- /dev/null +++ b/etc/caseDicts/annotated/blockMeshDict @@ -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 +( +); + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/boxTurbDict b/etc/caseDicts/annotated/boxTurbDict new file mode 100644 index 0000000000000000000000000000000000000000..b42bfc0388b9021f23da2dae93ce39bc2fcee086 --- /dev/null +++ b/etc/caseDicts/annotated/boxTurbDict @@ -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; + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/createBoxTurbDict b/etc/caseDicts/annotated/createBoxTurbDict new file mode 100644 index 0000000000000000000000000000000000000000..35b426f065698815c96e300b12be29a98ea4413d --- /dev/null +++ b/etc/caseDicts/annotated/createBoxTurbDict @@ -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) +); + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/dsmcInitialiseDict b/etc/caseDicts/annotated/dsmcInitialiseDict new file mode 100644 index 0000000000000000000000000000000000000000..d37723266528be6c840d59a8cfa94e47f4a9f1a3 --- /dev/null +++ b/etc/caseDicts/annotated/dsmcInitialiseDict @@ -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); + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/extrudeMeshDict b/etc/caseDicts/annotated/extrudeMeshDict index a5d944d885ec6fb7a9f993df4f6aec702cac668f..81742b86ab4a946eb0145a41d45799d71d144e6e 100644 --- a/etc/caseDicts/annotated/extrudeMeshDict +++ b/etc/caseDicts/annotated/extrudeMeshDict @@ -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) diff --git a/etc/caseDicts/annotated/mdEquilibrationDict b/etc/caseDicts/annotated/mdEquilibrationDict new file mode 100644 index 0000000000000000000000000000000000000000..6c2a3a4fc8c92958390ad3e81414d694fabc26c8 --- /dev/null +++ b/etc/caseDicts/annotated/mdEquilibrationDict @@ -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; + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/mdInitialiseDict b/etc/caseDicts/annotated/mdInitialiseDict new file mode 100644 index 0000000000000000000000000000000000000000..f56f236ecfe1cebdf1ef3ab15d14941daba7ba50 --- /dev/null +++ b/etc/caseDicts/annotated/mdInitialiseDict @@ -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); +} + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/obstaclesDict b/etc/caseDicts/annotated/obstaclesDict new file mode 100644 index 0000000000000000000000000000000000000000..87c2ee10d9f3f3875b33cbb74e8b886d67751a09 --- /dev/null +++ b/etc/caseDicts/annotated/obstaclesDict @@ -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; } + ); +} + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/optimisationDict b/etc/caseDicts/annotated/optimisationDict new file mode 100644 index 0000000000000000000000000000000000000000..9887a5921bee194084b6a6a836b02d7444b8274c --- /dev/null +++ b/etc/caseDicts/annotated/optimisationDict @@ -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 + ); +} +*/ + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/potentialDict b/etc/caseDicts/annotated/potentialDict new file mode 100644 index 0000000000000000000000000000000000000000..71552faf68331c3ca9b5fab5a9d218a0daa2fe4a --- /dev/null +++ b/etc/caseDicts/annotated/potentialDict @@ -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); +} + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/probesDict b/etc/caseDicts/annotated/probesDict new file mode 100644 index 0000000000000000000000000000000000000000..81f8194456f6293d2f6f304aab97e8c2a04a97c3 --- /dev/null +++ b/etc/caseDicts/annotated/probesDict @@ -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) +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/etc/caseDicts/annotated/sampleDict b/etc/caseDicts/annotated/sampleDict new file mode 100644 index 0000000000000000000000000000000000000000..8695d9983a26e075b5caaa6010cd1fb4d1a0569e --- /dev/null +++ b/etc/caseDicts/annotated/sampleDict @@ -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; + } +); + + +// *********************************************************************** // diff --git a/etc/caseDicts/annotated/setExprBoundaryFieldsDict b/etc/caseDicts/annotated/setExprBoundaryFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..6412e4f64b29a30fd4887b49dc0b4e68119781e2 --- /dev/null +++ b/etc/caseDicts/annotated/setExprBoundaryFieldsDict @@ -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) #}; + } + ); +} + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/setExprFieldsDict b/etc/caseDicts/annotated/setExprFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..2e06d9a26e68afb3aa9611eb1ae267a712b10dd1 --- /dev/null +++ b/etc/caseDicts/annotated/setExprFieldsDict @@ -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) + #}; + } +); + + +// ************************************************************************* // diff --git a/etc/caseDicts/annotated/topoSetSourcesDict b/etc/caseDicts/annotated/topoSetSourcesDict index 8ba14c4bc9a5bb925ad7e8db64d1f30580b067d7..58bb81929da906a744762a0645df4af03a490f51 100644 --- a/etc/caseDicts/annotated/topoSetSourcesDict +++ b/etc/caseDicts/annotated/topoSetSourcesDict @@ -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 + } }