diff --git a/tutorials/basic/scalarTransportFoam/moving_source/0/T b/tutorials/basic/scalarTransportFoam/moving_source/0/T new file mode 100644 index 0000000000000000000000000000000000000000..1d4e75d0bf9e94043b5a896493917cdb92e84105 --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/0/T @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type uniformFixedValue; + + uniformValue + { + type constant; + value 0.0; + } + } + + outlet + { + type zeroGradient; + } + + upperWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/basic/scalarTransportFoam/moving_source/0/U b/tutorials/basic/scalarTransportFoam/moving_source/0/U new file mode 100644 index 0000000000000000000000000000000000000000..62ea7a1cbc07c38ed8e22dd597d0da62aee1ca61 --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/0/U @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0.1 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type zeroGradient; + } + upperWall + { + type noSlip; + } + lowerWall + { + type noSlip; + } +} + + +// ************************************************************************* // diff --git a/tutorials/basic/scalarTransportFoam/moving_source/README.txt b/tutorials/basic/scalarTransportFoam/moving_source/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..8ed6b6aa0cd7acb9114c7be77eed2d924f48174d --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/README.txt @@ -0,0 +1,4 @@ +- demo for using moving 'geometric' fvOption selection +- flow left to right +- scalar transport with zero (non-numerical) diffusion +- still too many invocations of selection update diff --git a/tutorials/basic/scalarTransportFoam/moving_source/constant/fvOptions b/tutorials/basic/scalarTransportFoam/moving_source/constant/fvOptions new file mode 100644 index 0000000000000000000000000000000000000000..03a3daaf84ca043c0ce894bbe9ac0f7caa7322c9 --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/constant/fvOptions @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvOptions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scalarSource1 +{ + type scalarSemiImplicitSource; + + volumeMode absolute; + + selectionMode geometric; + selection + { + cylinder + { + action use; + source cylinder; + + point1 (0.05 0.03 -1); // beg point on cylinder axis + point2 (0.05 0.03 1); // end point on cylinder axis + radius 0.003; + + solidBodyMotionFunction oscillatingLinearMotion; + oscillatingLinearMotionCoeffs + { + // coefficients + amplitude (0 0.02 0); + omega 0.628318530718; // rad/s + } + + /* + solidBodyMotionFunction tabulated6DoFMotion; + tabulated6DoFMotionCoeffs + { + // coefficients + timeDataFileName "<constant>/meshMotion.dat"; + CofG (0 0 0); + } + */ + } + } + + sources + { + T (1e-4 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/scalarTransportFoam/moving_source/constant/meshMotion.dat b/tutorials/basic/scalarTransportFoam/moving_source/constant/meshMotion.dat new file mode 100644 index 0000000000000000000000000000000000000000..696f47854f2c1f46543a44e856c8d329b636dc90 --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/constant/meshMotion.dat @@ -0,0 +1,18 @@ +4 +( + // Time Linear (xyz) Rotation (xyz) + (0 ((0 0 0) (0 0 0))) + (1 ((0 0.02 0) (0 0 0))) + (2 ((0 -0.02 0) (0 0 0))) + (3 ((0 0 0) (0 0 0))) + (4 ((0 -0.02 0) (0 0 0))) + (5 ((0 0.02 0) (0 0 0))) + (6 ((0 0 0) (0 0 0))) + (7 ((0 0.02 0) (0 0 0))) + (8 ((0 -0.02 0) (0 0 0))) + (9 ((0 0 0) (0 0 0))) + (10 ((0 -0.02 0) (0 0 0))) + (11 ((0 0.02 0) (0 0 0))) + (12 ((0 0 0) (0 0 0))) +) + diff --git a/tutorials/basic/scalarTransportFoam/moving_source/constant/transportProperties b/tutorials/basic/scalarTransportFoam/moving_source/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..f9b02fe4c45cb51f157cc0e63dd0258b1c918564 --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/constant/transportProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +DT 0; //0.01; + + +// ************************************************************************* // diff --git a/tutorials/basic/scalarTransportFoam/moving_source/system/blockMeshDict b/tutorials/basic/scalarTransportFoam/moving_source/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..002a46d69db06bd3e9606f1e168a653557830b5c --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/system/blockMeshDict @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 0.001; + +vertices +( + ( 0 0 0) + (100 0 0) + (100 60 0) + ( 0 60 0) + ( 0 0 1) + (100 0 1) + (100 60 1) + ( 0 60 1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (100 60 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (2 6 5 1) + ); + } + + upperWall + { + type wall; + faces + ( + (3 7 6 2) + ); + } + lowerWall + { + type wall; + faces + ( + (1 5 4 0) + ); + } + frontAndBack + { + type empty; + faces + ( + (0 3 2 1) + (4 5 6 7) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/basic/scalarTransportFoam/moving_source/system/controlDict b/tutorials/basic/scalarTransportFoam/moving_source/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..72395bd17308d5bc48eb1df43769756abda83067 --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/system/controlDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application scalarTransportFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 10; + +deltaT 0.01; + +writeControl timeStep; + +writeInterval 10; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/basic/scalarTransportFoam/moving_source/system/fvSchemes b/tutorials/basic/scalarTransportFoam/moving_source/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..80048e5cee10c496ee545802d24768e52dc2cd9a --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/system/fvSchemes @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; //CrankNicolson 0.9; //Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,T) Gauss linearUpwind grad(T); +} + +laplacianSchemes +{ + default none; + laplacian(DT,T) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/basic/scalarTransportFoam/moving_source/system/fvSolution b/tutorials/basic/scalarTransportFoam/moving_source/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..b258c9b1b6d0affdc94b24c1243ae553c0a16708 --- /dev/null +++ b/tutorials/basic/scalarTransportFoam/moving_source/system/fvSolution @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + T + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0; + norm default; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* //