From 985a18df75976305fab28c94ee2e6da1156f2057 Mon Sep 17 00:00:00 2001 From: sergio Date: Tue, 19 Dec 2017 11:33:43 -0800 Subject: [PATCH] Adding overPotentialFoam and overRhoSimpleFoam and tutorials --- .../overPotentialFoam/Make/files | 3 + .../overPotentialFoam/Make/options | 12 + .../overPotentialFoam/createControls.H | 9 + .../overPotentialFoam/createFields.H | 146 ++++++++++ .../overPotentialFoam/potentialFoam.C | 260 ++++++++++++++++++ .../overRhoSimpleFoam/Make/files | 3 + .../overRhoSimpleFoam/Make/options | 27 ++ .../rhoSimpleFoam/overRhoSimpleFoam/UEqn.H | 23 ++ .../overRhoSimpleFoam/createFieldRefs.H | 1 + .../overRhoSimpleFoam/createFields.H | 91 ++++++ .../createUpdatedDynamicFvMesh.H | 22 ++ .../rhoSimpleFoam/overRhoSimpleFoam/pEqn.H | 123 +++++++++ .../overRhoSimpleFoam/rhoSimpleFoam.C | 92 +++++++ .../basic/overPotentialFoam/cylinder/Allclean | 11 + .../basic/overPotentialFoam/cylinder/Allrun | 8 + .../overPotentialFoam/cylinder/Allrun.pre | 8 + .../cylinder/cylinderAndBackground/0.orig/U | 57 ++++ .../0.orig/include/fixedInlet | 15 + .../0.orig/include/initialConditions | 13 + .../cylinder/cylinderAndBackground/0.orig/p | 54 ++++ .../0.orig/pointDisplacement | 42 +++ .../cylinderAndBackground/0.orig/zoneID | 36 +++ .../cylinder/cylinderAndBackground/Allclean | 12 + .../cylinder/cylinderAndBackground/Allrun | 10 + .../cylinder/cylinderAndBackground/Allrun.pre | 22 ++ .../constant/dynamicMeshDict | 33 +++ .../system/blockMeshDict | 83 ++++++ .../cylinderAndBackground/system/controlDict | 51 ++++ .../cylinderAndBackground/system/fvSchemes | 57 ++++ .../cylinderAndBackground/system/fvSolution | 54 ++++ .../system/setFieldsDict | 48 ++++ .../cylinderAndBackground/system/topoSetDict | 48 ++++ .../cylinder/cylinderMesh/Allrun.pre | 8 + .../constant/triSurface/cylinder.vtk | 221 +++++++++++++++ .../cylinder/cylinderMesh/system/controlDict | 50 ++++ .../cylinderMesh/system/createPatchDict | 84 ++++++ .../cylinderMesh/system/extrudeMeshDict | 136 +++++++++ .../cylinder/cylinderMesh/system/fvSchemes | 58 ++++ .../cylinder/cylinderMesh/system/fvSolution | 51 ++++ .../overRhoSimpleFoam/hotCylinder/Allclean | 10 + .../overRhoSimpleFoam/hotCylinder/Allrun | 8 + .../overRhoSimpleFoam/hotCylinder/Allrun.pre | 8 + .../cylinderAndBackground/0.orig/T | 53 ++++ .../cylinderAndBackground/0.orig/U | 54 ++++ .../cylinderAndBackground/0.orig/alphat | 40 +++ .../cylinderAndBackground/0.orig/epsilon | 54 ++++ .../0.orig/include/fixedInlet | 15 + .../0.orig/include/initialConditions | 16 ++ .../cylinderAndBackground/0.orig/k | 48 ++++ .../cylinderAndBackground/0.orig/nut | 38 +++ .../cylinderAndBackground/0.orig/p | 46 ++++ .../0.orig/pointDisplacement | 42 +++ .../cylinderAndBackground/0.orig/zoneID | 37 +++ .../cylinderAndBackground/Allclean | 12 + .../hotCylinder/cylinderAndBackground/Allrun | 10 + .../cylinderAndBackground/Allrun.pre | 22 ++ .../constant/dynamicMeshDict | 33 +++ .../constant/thermophysicalProperties | 48 ++++ .../constant/transportProperties | 39 +++ .../constant/turbulenceProperties | 30 ++ .../system/blockMeshDict | 83 ++++++ .../cylinderAndBackground/system/controlDict | 51 ++++ .../system/decomposeParDict | 30 ++ .../cylinderAndBackground/system/fvSchemes | 71 +++++ .../cylinderAndBackground/system/fvSolution | 80 ++++++ .../system/setFieldsDict | 48 ++++ .../cylinderAndBackground/system/topoSetDict | 48 ++++ .../hotCylinder/cylinderMesh/Allrun.pre | 8 + .../constant/triSurface/cylinder.vtk | 221 +++++++++++++++ .../cylinderMesh/system/controlDict | 50 ++++ .../cylinderMesh/system/createPatchDict | 84 ++++++ .../cylinderMesh/system/extrudeMeshDict | 109 ++++++++ .../hotCylinder/cylinderMesh/system/fvSchemes | 58 ++++ .../cylinderMesh/system/fvSolution | 51 ++++ 74 files changed, 3737 insertions(+) create mode 100644 applications/solvers/basic/potentialFoam/overPotentialFoam/Make/files create mode 100644 applications/solvers/basic/potentialFoam/overPotentialFoam/Make/options create mode 100644 applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H create mode 100644 applications/solvers/basic/potentialFoam/overPotentialFoam/createFields.H create mode 100644 applications/solvers/basic/potentialFoam/overPotentialFoam/potentialFoam.C create mode 100644 applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/Make/files create mode 100644 applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/Make/options create mode 100644 applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/UEqn.H create mode 100644 applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFieldRefs.H create mode 100644 applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H create mode 100644 applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createUpdatedDynamicFvMesh.H create mode 100644 applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/pEqn.H create mode 100644 applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/rhoSimpleFoam.C create mode 100755 tutorials/basic/overPotentialFoam/cylinder/Allclean create mode 100755 tutorials/basic/overPotentialFoam/cylinder/Allrun create mode 100755 tutorials/basic/overPotentialFoam/cylinder/Allrun.pre create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/U create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/include/fixedInlet create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/include/initialConditions create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/p create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/pointDisplacement create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/zoneID create mode 100755 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allclean create mode 100755 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun create mode 100755 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun.pre create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/constant/dynamicMeshDict create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/blockMeshDict create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/controlDict create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/fvSchemes create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/fvSolution create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/setFieldsDict create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/topoSetDict create mode 100755 tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/Allrun.pre create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/constant/triSurface/cylinder.vtk create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/controlDict create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/createPatchDict create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/extrudeMeshDict create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/fvSchemes create mode 100644 tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/fvSolution create mode 100755 tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allclean create mode 100755 tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun create mode 100755 tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun.pre create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/T create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/U create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/alphat create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/epsilon create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/include/fixedInlet create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/include/initialConditions create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/k create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/nut create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/p create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/pointDisplacement create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/zoneID create mode 100755 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allclean create mode 100755 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun create mode 100755 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun.pre create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/dynamicMeshDict create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/thermophysicalProperties create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/transportProperties create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/turbulenceProperties create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/blockMeshDict create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/controlDict create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/decomposeParDict create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/fvSchemes create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/fvSolution create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/setFieldsDict create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/topoSetDict create mode 100755 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/Allrun.pre create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/constant/triSurface/cylinder.vtk create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/controlDict create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/createPatchDict create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/extrudeMeshDict create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/fvSchemes create mode 100644 tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/fvSolution diff --git a/applications/solvers/basic/potentialFoam/overPotentialFoam/Make/files b/applications/solvers/basic/potentialFoam/overPotentialFoam/Make/files new file mode 100644 index 0000000000..511066afa5 --- /dev/null +++ b/applications/solvers/basic/potentialFoam/overPotentialFoam/Make/files @@ -0,0 +1,3 @@ +potentialFoam.C + +EXE = $(FOAM_APPBIN)/overPotentialFoam diff --git a/applications/solvers/basic/potentialFoam/overPotentialFoam/Make/options b/applications/solvers/basic/potentialFoam/overPotentialFoam/Make/options new file mode 100644 index 0000000000..155894029a --- /dev/null +++ b/applications/solvers/basic/potentialFoam/overPotentialFoam/Make/options @@ -0,0 +1,12 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/overset/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lsampling \ + -loverset diff --git a/applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H b/applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H new file mode 100644 index 0000000000..7015cae02e --- /dev/null +++ b/applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H @@ -0,0 +1,9 @@ +const dictionary& potentialFlow +( + mesh.solutionDict().subDict("potentialFlow") +); + +const int nNonOrthCorr +( + potentialFlow.lookupOrDefault("nNonOrthogonalCorrectors", 0) +); diff --git a/applications/solvers/basic/potentialFoam/overPotentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/overPotentialFoam/createFields.H new file mode 100644 index 0000000000..b7daa4fe47 --- /dev/null +++ b/applications/solvers/basic/potentialFoam/overPotentialFoam/createFields.H @@ -0,0 +1,146 @@ +Info<< "Reading velocity field U\n" << endl; +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +// Initialise the velocity internal field to zero +U = dimensionedVector("0", U.dimensions(), Zero); + +surfaceScalarField phi +( + IOobject + ( + "phi", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + fvc::flux(U) +); + +if (args.optionFound("initialiseUBCs")) +{ + U.correctBoundaryConditions(); + phi = fvc::flux(U); +} + + +// Construct a pressure field +// If it is available read it otherwise construct from the velocity BCs +// converting fixed-value BCs to zero-gradient and vice versa. +word pName("p"); + +// Update name of the pressure field from the command-line option +args.optionReadIfPresent("pName", pName); + +// Infer the pressure BCs from the velocity +wordList pBCTypes +( + U.boundaryField().size(), + fixedValueFvPatchScalarField::typeName +); + +forAll(U.boundaryField(), patchi) +{ + if (U.boundaryField()[patchi].fixesValue()) + { + pBCTypes[patchi] = zeroGradientFvPatchScalarField::typeName; + } +} + +// Note that registerObject is false for the pressure field. The pressure +// field in this solver doesn't have a physical value during the solution. +// It shouldn't be looked up and used by sub models or boundary conditions. +Info<< "Constructing pressure field " << pName << nl << endl; +volScalarField p +( + IOobject + ( + pName, + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(pName, sqr(dimVelocity), 0), + pBCTypes +); + +// Infer the velocity potential BCs from the pressure +wordList PhiBCTypes +( + p.boundaryField().size(), + zeroGradientFvPatchScalarField::typeName +); + +forAll(p.boundaryField(), patchi) +{ + if (p.boundaryField()[patchi].fixesValue()) + { + PhiBCTypes[patchi] = fixedValueFvPatchScalarField::typeName; + } +} + +Info<< "Constructing velocity potential field Phi\n" << endl; +volScalarField Phi +( + IOobject + ( + "Phi", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar("Phi", dimLength*dimVelocity, 0), + PhiBCTypes +); + +label PhiRefCell = 0; +scalar PhiRefValue = 0; +setRefCell +( + Phi, + potentialFlow.dict(), + PhiRefCell, + PhiRefValue +); +mesh.setFluxRequired(Phi.name()); + +#include "createMRF.H" + +// Add overset specific interpolations +{ + dictionary oversetDict; + oversetDict.add("Phi", true); + oversetDict.add("U", true); + + const_cast + ( + mesh.schemesDict() + ).add + ( + "oversetInterpolationRequired", + oversetDict, + true + ); +} + +// Mask field for zeroing out contributions on hole cells +#include "createCellMask.H" + +// Create bool field with interpolated cells +#include "createInterpolatedCells.H" diff --git a/applications/solvers/basic/potentialFoam/overPotentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/overPotentialFoam/potentialFoam.C new file mode 100644 index 0000000000..7d340fbc36 --- /dev/null +++ b/applications/solvers/basic/potentialFoam/overPotentialFoam/potentialFoam.C @@ -0,0 +1,260 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 OpenCFD Ltd + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + potentialFoam + +Group + grpBasicSolvers + +Description + Potential flow solver which solves for the velocity potential, to + calculate the flux-field, from which the velocity field is obtained by + reconstructing the flux. + + \heading Solver details + The potential flow solution is typically employed to generate initial fields + for full Navier-Stokes codes. The flow is evolved using the equation: + + \f[ + \laplacian \Phi = \div(\vec{U}) + \f] + + Where: + \vartable + \Phi | Velocity potential [m2/s] + \vec{U} | Velocity [m/s] + \endvartable + + The corresponding pressure field could be calculated from the divergence + of the Euler equation: + + \f[ + \laplacian p + \div(\div(\vec{U}\otimes\vec{U})) = 0 + \f] + + but this generates excessive pressure variation in regions of large + velocity gradient normal to the flow direction. A better option is to + calculate the pressure field corresponding to velocity variation along the + stream-lines: + + \f[ + \laplacian p + \div(\vec{F}\cdot\div(\vec{U}\otimes\vec{U})) = 0 + \f] + where the flow direction tensor \f$\vec{F}\f$ is obtained from + \f[ + \vec{F} = \hat{\vec{U}}\otimes\hat{\vec{U}} + \f] + + \heading Required fields + \plaintable + U | Velocity [m/s] + \endplaintable + + \heading Optional fields + \plaintable + p | Kinematic pressure [m2/s2] + Phi | Velocity potential [m2/s] + | Generated from p (if present) or U if not present + \endplaintable + + \heading Options + \plaintable + -writep | write the Euler pressure + -writePhi | Write the final velocity potential + -initialiseUBCs | Update the velocity boundaries before solving for Phi + \endplaintable + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "pisoControl.H" +#include "dynamicFvMesh.H" +#include "cellCellStencilObject.H" +#include "localMin.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + argList::addOption + ( + "pName", + "pName", + "Name of the pressure field" + ); + + argList::addBoolOption + ( + "initialiseUBCs", + "Initialise U boundary conditions" + ); + + argList::addBoolOption + ( + "writePhi", + "Write the final velocity potential field" + ); + + argList::addBoolOption + ( + "writep", + "Calculate and write the Euler pressure field" + ); + + argList::addBoolOption + ( + "withFunctionObjects", + "execute functionObjects" + ); + + #include "setRootCase.H" + #include "createTime.H" + #include "createNamedDynamicFvMesh.H" + + pisoControl potentialFlow(mesh, "potentialFlow"); + + #include "createFields.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< nl << "Calculating potential flow" << endl; + + mesh.update(); + + surfaceScalarField faceMask(localMin(mesh).interpolate(cellMask)); + + // Since solver contains no time loop it would never execute + // function objects so do it ourselves + runTime.functionObjects().start(); + + MRF.makeRelative(phi); + adjustPhi(phi, U, p); + + // Non-orthogonal velocity potential corrector loop + while (potentialFlow.correct()) + { + phi = fvc::flux(U); + + while (potentialFlow.correctNonOrthogonal()) + { + fvScalarMatrix PhiEqn + ( + fvm::laplacian(faceMask, Phi) + == + fvc::div(phi) + ); + + PhiEqn.setReference(PhiRefCell, PhiRefValue); + PhiEqn.solve(); + + if (potentialFlow.finalNonOrthogonalIter()) + { + phi -= PhiEqn.flux(); + } + } + + MRF.makeAbsolute(phi); + + Info<< "Continuity error = " + << mag(fvc::div(phi))().weightedAverage(mesh.V()).value() + << endl; + + U = fvc::reconstruct(phi); + U.correctBoundaryConditions(); + + Info<< "Interpolated velocity error = " + << (sqrt(sum(sqr(fvc::flux(U) - phi)))/sum(mesh.magSf())).value() + << endl; + } + + // Write U and phi + U.write(); + phi.write(); + + // Optionally write Phi + if (args.optionFound("writePhi")) + { + Phi.write(); + } + + // Calculate the pressure field from the Euler equation + if (args.optionFound("writep")) + { + Info<< nl << "Calculating approximate pressure field" << endl; + + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell + ( + p, + potentialFlow.dict(), + pRefCell, + pRefValue + ); + + // Calculate the flow-direction filter tensor + volScalarField magSqrU(magSqr(U)); + volSymmTensorField F(sqr(U)/(magSqrU + SMALL*average(magSqrU))); + + // Calculate the divergence of the flow-direction filtered div(U*U) + // Filtering with the flow-direction generates a more reasonable + // pressure distribution in regions of high velocity gradient in the + // direction of the flow + volScalarField divDivUU + ( + fvc::div + ( + F & fvc::div(phi, U), + "div(div(phi,U))" + ) + ); + + // Solve a Poisson equation for the approximate pressure + while (potentialFlow.correctNonOrthogonal()) + { + fvScalarMatrix pEqn + ( + fvm::laplacian(p) + divDivUU + ); + + pEqn.setReference(pRefCell, pRefValue); + pEqn.solve(); + } + + p.write(); + } + + runTime.functionObjects().end(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/Make/files b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/Make/files new file mode 100644 index 0000000000..0519e8b961 --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/Make/files @@ -0,0 +1,3 @@ +rhoSimpleFoam.C + +EXE = $(FOAM_APPBIN)/overRhoSimpleFoam diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/Make/options new file mode 100644 index 0000000000..e027221b0c --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/Make/options @@ -0,0 +1,27 @@ +EXE_INC = \ + -I.. \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/overset/lnInclude + +EXE_LIBS = \ + -lcompressibleTransportModels \ + -lfluidThermophysicalModels \ + -lspecie \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ + -lfiniteVolume \ + -lsampling \ + -lmeshTools \ + -lfvOptions \ + -loverset \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/UEqn.H new file mode 100644 index 0000000000..9d4afec58e --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/UEqn.H @@ -0,0 +1,23 @@ + // Solve the Momentum equation + MRF.correctBoundaryVelocity(U); + + tmp tUEqn + ( + fvm::div(phi, U) + + MRF.DDt(rho, U) + + turbulence->divDevRhoReff(U) + == + fvOptions(rho, U) + ); + fvVectorMatrix& UEqn = tUEqn.ref(); + + UEqn.relax(); + + fvOptions.constrain(UEqn); + + if (simple.momentumPredictor()) + { + solve(UEqn == -cellMask*fvc::grad(p)); + } + + fvOptions.correct(U); diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFieldRefs.H b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFieldRefs.H new file mode 100644 index 0000000000..502b3b4230 --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFieldRefs.H @@ -0,0 +1 @@ +const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H new file mode 100644 index 0000000000..2544f3e559 --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H @@ -0,0 +1,91 @@ +Info<< "Reading thermophysical properties\n" << endl; + +autoPtr pThermo +( + fluidThermo::New(mesh) +); +fluidThermo& thermo = pThermo(); +thermo.validate(args.executable(), "h", "e"); + +volScalarField& p = thermo.p(); + +volScalarField rho +( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + thermo.rho() +); + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +#include "compressibleCreatePhi.H" + +pressureControl pressureControl(p, rho, simple.dict()); + +mesh.setFluxRequired(p.name()); + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) +); + +dimensionedScalar initialMass = fvc::domainIntegrate(rho); + +#include "createMRF.H" + +//- Overset specific + +// Add solver-specific interpolations +{ + dictionary oversetDict; + oversetDict.add("U", true); + oversetDict.add("p", true); + oversetDict.add("HbyA", true); + oversetDict.add("grad(p)", true); + oversetDict.add("rho", true); + + const_cast + ( + mesh.schemesDict() + ).add + ( + "oversetInterpolationRequired", + oversetDict, + true + ); +} + +// Mask field for zeroing out contributions on hole cells +#include "createCellMask.H" + +#include "createInterpolatedCells.H" + +bool adjustFringe +( + simple.dict().lookupOrDefault("oversetAdjustPhi", false) +); diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createUpdatedDynamicFvMesh.H b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createUpdatedDynamicFvMesh.H new file mode 100644 index 0000000000..db58f90828 --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createUpdatedDynamicFvMesh.H @@ -0,0 +1,22 @@ + Info<< "Create dynamic mesh for time = " + << runTime.timeName() << nl << endl; + + autoPtr meshPtr + ( + dynamicFvMesh::New + ( + IOobject + ( + dynamicFvMesh::defaultRegion, + runTime.timeName(), + runTime, + IOobject::MUST_READ + ) + ) + ); + + dynamicFvMesh& mesh = meshPtr(); + + // Calculate initial mesh-to-mesh mapping. Note that this should be + // done under the hood, e.g. as a MeshObject + mesh.update(); diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/pEqn.H new file mode 100644 index 0000000000..b4e670bee7 --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/pEqn.H @@ -0,0 +1,123 @@ +{ + surfaceScalarField faceMask(localMin(mesh).interpolate(cellMask)); + + volScalarField rAU(1.0/UEqn.A()); + surfaceScalarField rhorAUf("rhorAUf", faceMask*fvc::interpolate(rho*rAU)); + volVectorField HbyA("HbyA", U); + HbyA = constrainHbyA(cellMask*rAU*UEqn.H(), U, p); + tUEqn.clear(); + + bool closedVolume = false; + + surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(rho)*fvc::flux(HbyA)); + MRF.makeRelative(fvc::interpolate(rho), phiHbyA); + + // Update the pressure BCs to ensure flux consistency + constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF); + + if (simple.transonic()) + { + surfaceScalarField phid + ( + "phid", + (fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA + ); + + phiHbyA -= fvc::interpolate(psi*p)*phiHbyA/fvc::interpolate(rho); + + while (simple.correctNonOrthogonal()) + { + fvScalarMatrix pEqn + ( + fvc::div(phiHbyA) + + fvm::div(phid, p) + - fvm::laplacian(rhorAUf, p) + == + fvOptions(psi, p, rho.name()) + ); + + // Relax the pressure equation to ensure diagonal-dominance + pEqn.relax(); + + pEqn.setReference + ( + pressureControl.refCell(), + pressureControl.refValue() + ); + + pEqn.solve(); + + if (simple.finalNonOrthogonalIter()) + { + phi = phiHbyA + pEqn.flux(); + } + } + } + else + { + closedVolume = adjustPhi(phiHbyA, U, p); + + if (adjustFringe) + { + oversetAdjustPhi(phiHbyA, U); + } + + while (simple.correctNonOrthogonal()) + { + fvScalarMatrix pEqn + ( + fvc::div(phiHbyA) + - fvm::laplacian(rhorAUf, p) + == + fvOptions(psi, p, rho.name()) + ); + + pEqn.setReference + ( + pressureControl.refCell(), + pressureControl.refValue() + ); + + pEqn.solve(); + + if (simple.finalNonOrthogonalIter()) + { + phi = phiHbyA + pEqn.flux(); + } + } + } + + #include "incompressible/continuityErrs.H" + + // Explicitly relax pressure for momentum corrector + p.relax(); + + volVectorField gradP(fvc::grad(p)); + + U = HbyA - rAU*cellMask*gradP; + U.correctBoundaryConditions(); + fvOptions.correct(U); + + + bool pLimited = pressureControl.limit(p); + + // For closed-volume cases adjust the pressure and density levels + // to obey overall mass continuity + if (closedVolume) + { + p += (initialMass - fvc::domainIntegrate(psi*p)) + /fvc::domainIntegrate(psi); + } + + if (pLimited || closedVolume) + { + p.correctBoundaryConditions(); + } + + rho = thermo.rho(); + + if (!simple.transonic()) + { + rho.relax(); + } +} diff --git a/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/rhoSimpleFoam.C new file mode 100644 index 0000000000..d2aced6375 --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/rhoSimpleFoam.C @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2017 OpenCFD Ltd + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + overRhoSimpleFoam + +Group + grpCompressibleSolvers + +Description + Overset steady-state solver for turbulent flow of compressible fluids. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "dynamicFvMesh.H" +#include "fluidThermo.H" +#include "turbulentFluidThermoModel.H" +#include "simpleControl.H" +#include "pressureControl.H" +#include "fvOptions.H" +#include "cellCellStencilObject.H" +#include "localMin.H" +#include "oversetAdjustPhi.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #define CREATE_MESH createUpdatedDynamicFvMesh.H + #include "postProcess.H" + + #include "setRootCase.H" + #include "createTime.H" + #include "createUpdatedDynamicFvMesh.H" + #include "createControl.H" + #include "createFields.H" + #include "createFieldRefs.H" + #include "createFvOptions.H" + #include "initContinuityErrs.H" + + turbulence->validate(); + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (simple.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + + // Pressure-velocity SIMPLE corrector + #include "UEqn.H" + #include "EEqn.H" + #include "pEqn.H" + + turbulence->correct(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/Allclean b/tutorials/basic/overPotentialFoam/cylinder/Allclean new file mode 100755 index 0000000000..02381632b7 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# Extrude mesh around cylinder +(cd cylinderAndBackground && ./Allclean) + +# Add background mesh +(cd cylinderMesh && foamCleanTutorials) + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/basic/overPotentialFoam/cylinder/Allrun b/tutorials/basic/overPotentialFoam/cylinder/Allrun new file mode 100755 index 0000000000..7604f9ad35 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/Allrun @@ -0,0 +1,8 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Extrude mesh around cylinder +(cd cylinderMesh && ./Allrun.pre) + +# Add background mesh +(cd cylinderAndBackground && ./Allrun) diff --git a/tutorials/basic/overPotentialFoam/cylinder/Allrun.pre b/tutorials/basic/overPotentialFoam/cylinder/Allrun.pre new file mode 100755 index 0000000000..788e947486 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/Allrun.pre @@ -0,0 +1,8 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Extrude mesh around cylinder +(cd cylinderMesh && ./Allrun.pre) + +# Add background mesh +(cd cylinderAndBackground && ./Allrun.pre) diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/U b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/U new file mode 100644 index 0000000000..1f740ae49d --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/U @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform $flowVelocity; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + overset + { + type overset; + } + + walls + { + type movingWallVelocity; + value uniform (0 0 0); + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue uniform (0 0 0); + value $internalField; + } + + topAndBottom + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/include/fixedInlet b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/include/fixedInlet new file mode 100644 index 0000000000..d69bf4f580 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/include/fixedInlet @@ -0,0 +1,15 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +inlet +{ + type fixedValue; + value $internalField; +} + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/include/initialConditions b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/include/initialConditions new file mode 100644 index 0000000000..68dc901ede --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/include/initialConditions @@ -0,0 +1,13 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +flowVelocity (1 0 0); +pressure 0; +#inputMode merge + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/p b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/p new file mode 100644 index 0000000000..e0d247b2fd --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/p @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform $pressure; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + overset + { + type overset; + } + + wall + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; //calculated; + value $internalField; + } + + ".*" + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/pointDisplacement b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/pointDisplacement new file mode 100644 index 0000000000..14d636e122 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/pointDisplacement @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class pointVectorField; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + overset + { + patchType overset; + type zeroGradient; + } + + walls + { + type uniformFixedValue; + uniformValue (0 0 0); + } + + ".*" + { + type uniformFixedValue; + uniformValue (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/zoneID b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/zoneID new file mode 100644 index 0000000000..1a0b8c3b47 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/0.orig/zoneID @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object zoneID; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + overset + { + type overset; + } + + ".*" + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allclean b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allclean new file mode 100755 index 0000000000..6be736ea3c --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allclean @@ -0,0 +1,12 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +rm -f constant/polyMesh/boundary +rm -f constant/polyMesh/zoneID +rm -f constant/cellInterpolationWeight + +rm -rf 0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun new file mode 100755 index 0000000000..50626eed68 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +./Allrun.pre + +# Run it for a bit +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun.pre b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun.pre new file mode 100755 index 0000000000..f4910d875d --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun.pre @@ -0,0 +1,22 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Create background mesh +runApplication blockMesh + +# Add the cylinder mesh +runApplication mergeMeshes . ../cylinderMesh -overwrite + +## Make it a bit smaller to keep it laminar +#runApplication transformPoints -scale '(0.001 0.001 0.001)' + +# Select cellSets for the different zones +runApplication topoSet + +restore0Dir + +# Use cellSets to write zoneID +runApplication setFields + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/constant/dynamicMeshDict b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/constant/dynamicMeshDict new file mode 100644 index 0000000000..9f766ac272 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/constant/dynamicMeshDict @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object dynamicMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +motionSolverLibs ( "libfvMotionSolvers.so" ); + +solver displacementLaplacian; + +displacementLaplacianCoeffs +{ + diffusivity uniform 1; +} + +dynamicFvMesh dynamicOversetFvMesh; + +dynamicOversetFvMeshCoeffs +{ +// layerRelax 0.3; +} + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/blockMeshDict b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/blockMeshDict new file mode 100644 index 0000000000..2f7bf0096c --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/blockMeshDict @@ -0,0 +1,83 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (-2 -0.05 -2.0) + ( 2 -0.05 -2.0) + ( 2 0.05 -2.0) + (-2 0.05 -2.0) + (-2 -0.05 2.0) + ( 2 -0.05 2.0) + ( 2 0.05 2.0) + (-2 0.05 2.0) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (80 1 60) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + topAndBottom + { + type patch; + faces + ( + (4 5 6 7) + (0 3 2 1) + ); + } + + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + + outlet + { + type patch; + faces + ( + (2 6 5 1) + ); + } + + frontAndBack + { + type empty; + faces + ( + (3 7 6 2) + (1 5 4 0) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/controlDict b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/controlDict new file mode 100644 index 0000000000..2e23f2c1d6 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/controlDict @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Make sure all preprocessing tools know about the 'overset' bc +libs ("liboverset.so"); + +application overPotentialFoam; + +startFrom startTime; + +startTime 0; + +stopAt nextWrite; + +endTime 2; + +deltaT 1; + +writeControl timeStep; + +writeInterval 2; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/fvSchemes b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/fvSchemes new file mode 100644 index 0000000000..736c25670c --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/fvSchemes @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default leastSquares; +} + +divSchemes +{ + default none; + div(phi,U) bounded Gauss linear; + div(div(phi,U)) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +oversetInterpolation +{ + method leastSquares;//inverseDistanc; +} + + + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/fvSolution b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/fvSolution new file mode 100644 index 0000000000..490952835a --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/fvSolution @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + cellDisplacement + { + solver PCG; + preconditioner DIC; + + tolerance 1e-06; + relTol 0; + maxIter 100; + } + + Phi + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0.01; + } + + p + { + $Phi; + } + +} + + +potentialFlow +{ + nNonOrthogonalCorrectors 3; + nCorrectors 3; +} + + + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/setFieldsDict b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/setFieldsDict new file mode 100644 index 0000000000..8efb92d610 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/setFieldsDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue zoneID 123 +); + +regions +( + // Set cell values + // (does zerogradient on boundaries) + cellToCell + { + set c0; + + fieldValues + ( + volScalarFieldValue zoneID 0 + ); + } + + cellToCell + { + set c1; + + fieldValues + ( + volScalarFieldValue zoneID 1 + ); + } + +); + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/topoSetDict b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/topoSetDict new file mode 100644 index 0000000000..81f172e41a --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/system/topoSetDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source regionToCell; + sourceInfo + { + insidePoints ((-1.999 0 -1.999)); + } + } + + { + name c1; + type cellSet; + action new; + source cellToCell; + sourceInfo + { + set c0; + } + } + + { + name c1; + type cellSet; + action invert; + } +); + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/Allrun.pre b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/Allrun.pre new file mode 100755 index 0000000000..ad0801bbb9 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/Allrun.pre @@ -0,0 +1,8 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Generate mesh from surface (in constant/triSurface) +runApplication extrudeMesh + +# Make front and back type empty +runApplication createPatch -overwrite diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/constant/triSurface/cylinder.vtk b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/constant/triSurface/cylinder.vtk new file mode 100644 index 0000000000..6a99fb9b6f --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/constant/triSurface/cylinder.vtk @@ -0,0 +1,221 @@ +# vtk DataFile Version 4.0 +vtk output +ASCII +DATASET POLYDATA +POINTS 150 float +0.5 0.05 0 0.5 -0.05 0 0.498246 0.05 -0.0418389 +0.498246 -0.05 -0.0418389 0.492998 0.05 -0.0833844 0.492998 -0.05 -0.0833844 +0.484292 0.05 -0.124345 0.484292 -0.05 -0.124345 0.472188 0.05 -0.164433 +0.472188 -0.05 -0.164433 0.456773 0.05 -0.203368 0.456773 -0.05 -0.203368 +0.438153 0.05 -0.240877 0.438153 -0.05 -0.240877 0.416461 0.05 -0.276696 +0.416461 -0.05 -0.276696 0.391847 0.05 -0.310574 0.391847 -0.05 -0.310574 +0.364484 0.05 -0.342274 0.364484 -0.05 -0.342274 0.334565 0.05 -0.371572 +0.334565 -0.05 -0.371572 0.3023 0.05 -0.398265 0.3023 -0.05 -0.398265 +0.267913 0.05 -0.422164 0.267913 -0.05 -0.422164 0.231648 0.05 -0.443102 +0.231648 -0.05 -0.443102 0.193758 0.05 -0.460932 0.193758 -0.05 -0.460932 +0.154509 0.05 -0.475528 0.154509 -0.05 -0.475528 0.114175 0.05 -0.486789 +0.114175 -0.05 -0.486789 0.0730415 0.05 -0.494636 0.0730415 -0.05 -0.494636 +0.0313953 0.05 -0.499013 0.0313953 -0.05 -0.499013 -0.0104712 0.05 -0.49989 +-0.0104712 -0.05 -0.49989 -0.0522642 0.05 -0.497261 -0.0522642 -0.05 -0.497261 +-0.0936907 0.05 -0.491144 -0.0936907 -0.05 -0.491144 -0.13446 0.05 -0.481581 +-0.13446 -0.05 -0.481581 -0.174286 0.05 -0.468641 -0.174286 -0.05 -0.468641 +-0.21289 0.05 -0.452414 -0.21289 -0.05 -0.452414 -0.25 0.05 -0.433013 +-0.25 -0.05 -0.433013 -0.285357 0.05 -0.410575 -0.285357 -0.05 -0.410575 +-0.318712 0.05 -0.385257 -0.318712 -0.05 -0.385257 -0.349832 0.05 -0.357236 +-0.349832 -0.05 -0.357236 -0.378498 0.05 -0.32671 -0.378498 -0.05 -0.32671 +-0.404509 0.05 -0.293893 -0.404509 -0.05 -0.293893 -0.427682 0.05 -0.259014 +-0.427682 -0.05 -0.259014 -0.447856 0.05 -0.222318 -0.447856 -0.05 -0.222318 +-0.464888 0.05 -0.184062 -0.464888 -0.05 -0.184062 -0.47866 0.05 -0.144516 +-0.47866 -0.05 -0.144516 -0.489074 0.05 -0.103956 -0.489074 -0.05 -0.103956 +-0.496057 0.05 -0.0626666 -0.496057 -0.05 -0.0626666 -0.499561 0.05 -0.0209378 +-0.499561 -0.05 -0.0209378 -0.499561 0.05 0.0209378 -0.499561 -0.05 0.0209378 +-0.496057 0.05 0.0626666 -0.496057 -0.05 0.0626666 -0.489074 0.05 0.103956 +-0.489074 -0.05 0.103956 -0.47866 0.05 0.144516 -0.47866 -0.05 0.144516 +-0.464888 0.05 0.184062 -0.464888 -0.05 0.184062 -0.447856 0.05 0.222318 +-0.447856 -0.05 0.222318 -0.427682 0.05 0.259014 -0.427682 -0.05 0.259014 +-0.404509 0.05 0.293893 -0.404509 -0.05 0.293893 -0.378498 0.05 0.32671 +-0.378498 -0.05 0.32671 -0.349832 0.05 0.357236 -0.349832 -0.05 0.357236 +-0.318712 0.05 0.385257 -0.318712 -0.05 0.385257 -0.285357 0.05 0.410575 +-0.285357 -0.05 0.410575 -0.25 0.05 0.433013 -0.25 -0.05 0.433013 +-0.21289 0.05 0.452414 -0.21289 -0.05 0.452414 -0.174286 0.05 0.468641 +-0.174286 -0.05 0.468641 -0.13446 0.05 0.481581 -0.13446 -0.05 0.481581 +-0.0936907 0.05 0.491144 -0.0936907 -0.05 0.491144 -0.0522642 0.05 0.497261 +-0.0522642 -0.05 0.497261 -0.0104712 0.05 0.49989 -0.0104712 -0.05 0.49989 +0.0313953 0.05 0.499013 0.0313953 -0.05 0.499013 0.0730415 0.05 0.494636 +0.0730415 -0.05 0.494636 0.114175 0.05 0.486789 0.114175 -0.05 0.486789 +0.154509 0.05 0.475528 0.154509 -0.05 0.475528 0.193758 0.05 0.460932 +0.193758 -0.05 0.460932 0.231648 0.05 0.443102 0.231648 -0.05 0.443102 +0.267913 0.05 0.422164 0.267913 -0.05 0.422164 0.3023 0.05 0.398265 +0.3023 -0.05 0.398265 0.334565 0.05 0.371572 0.334565 -0.05 0.371572 +0.364484 0.05 0.342274 0.364484 -0.05 0.342274 0.391847 0.05 0.310574 +0.391847 -0.05 0.310574 0.416461 0.05 0.276696 0.416461 -0.05 0.276696 +0.438153 0.05 0.240877 0.438153 -0.05 0.240877 0.456773 0.05 0.203368 +0.456773 -0.05 0.203368 0.472188 0.05 0.164433 0.472188 -0.05 0.164433 +0.484292 0.05 0.124345 0.484292 -0.05 0.124345 0.492998 0.05 0.0833844 +0.492998 -0.05 0.0833844 0.498246 0.05 0.0418389 0.498246 -0.05 0.0418389 + +POLYGONS 75 375 +4 0 1 3 2 +4 2 3 5 4 +4 4 5 7 6 +4 6 7 9 8 +4 8 9 11 10 +4 10 11 13 12 +4 12 13 15 14 +4 14 15 17 16 +4 16 17 19 18 +4 18 19 21 20 +4 20 21 23 22 +4 22 23 25 24 +4 24 25 27 26 +4 26 27 29 28 +4 28 29 31 30 +4 30 31 33 32 +4 32 33 35 34 +4 34 35 37 36 +4 36 37 39 38 +4 38 39 41 40 +4 40 41 43 42 +4 42 43 45 44 +4 44 45 47 46 +4 46 47 49 48 +4 48 49 51 50 +4 50 51 53 52 +4 52 53 55 54 +4 54 55 57 56 +4 56 57 59 58 +4 58 59 61 60 +4 60 61 63 62 +4 62 63 65 64 +4 64 65 67 66 +4 66 67 69 68 +4 68 69 71 70 +4 70 71 73 72 +4 72 73 75 74 +4 74 75 77 76 +4 76 77 79 78 +4 78 79 81 80 +4 80 81 83 82 +4 82 83 85 84 +4 84 85 87 86 +4 86 87 89 88 +4 88 89 91 90 +4 90 91 93 92 +4 92 93 95 94 +4 94 95 97 96 +4 96 97 99 98 +4 98 99 101 100 +4 100 101 103 102 +4 102 103 105 104 +4 104 105 107 106 +4 106 107 109 108 +4 108 109 111 110 +4 110 111 113 112 +4 112 113 115 114 +4 114 115 117 116 +4 116 117 119 118 +4 118 119 121 120 +4 120 121 123 122 +4 122 123 125 124 +4 124 125 127 126 +4 126 127 129 128 +4 128 129 131 130 +4 130 131 133 132 +4 132 133 135 134 +4 134 135 137 136 +4 136 137 139 138 +4 138 139 141 140 +4 140 141 143 142 +4 142 143 145 144 +4 144 145 147 146 +4 146 147 149 148 +4 148 149 1 0 + +POINT_DATA 150 +NORMALS Normals float +1 0 -0 1 0 -0 0.996493 0 -0.0836778 +0.996493 0 -0.0836778 0.985996 0 -0.166769 0.985996 0 -0.166769 +0.968583 0 -0.24869 0.968583 0 -0.24869 0.944376 0 -0.328867 +0.944376 0 -0.328867 0.913545 0 -0.406737 0.913545 0 -0.406737 +0.876307 0 -0.481754 0.876307 0 -0.481754 0.832921 0 -0.553392 +0.832921 0 -0.553392 0.783693 0 -0.621148 0.783693 0 -0.621148 +0.728969 0 -0.684547 0.728969 0 -0.684547 0.669131 0 -0.743145 +0.669131 0 -0.743145 0.604599 0 -0.79653 0.604599 0 -0.79653 +0.535827 0 -0.844328 0.535827 0 -0.844328 0.463296 0 -0.886204 +0.463296 0 -0.886204 0.387516 0 -0.921863 0.387516 0 -0.921863 +0.309017 0 -0.951057 0.309017 0 -0.951057 0.228351 0 -0.973579 +0.228351 0 -0.973579 0.146083 0 -0.989272 0.146083 0 -0.989272 +0.0627905 0 -0.998027 0.0627905 0 -0.998027 -0.0209424 0 -0.999781 +-0.0209424 0 -0.999781 -0.104528 0 -0.994522 -0.104528 0 -0.994522 +-0.187381 0 -0.982287 -0.187381 0 -0.982287 -0.26892 0 -0.963163 +-0.26892 0 -0.963163 -0.348572 0 -0.937282 -0.348572 0 -0.937282 +-0.425779 0 -0.904827 -0.425779 0 -0.904827 -0.5 0 -0.866025 +-0.5 0 -0.866025 -0.570714 0 -0.821149 -0.570714 0 -0.821149 +-0.637424 0 -0.770513 -0.637424 0 -0.770513 -0.699663 0 -0.714473 +-0.699663 0 -0.714473 -0.756995 0 -0.653421 -0.756995 0 -0.653421 +-0.809017 0 -0.587785 -0.809017 0 -0.587785 -0.855364 0 -0.518027 +-0.855364 0 -0.518027 -0.895712 0 -0.444635 -0.895712 0 -0.444635 +-0.929776 0 -0.368125 -0.929776 0 -0.368125 -0.957319 0 -0.289032 +-0.957319 0 -0.289032 -0.978148 0 -0.207912 -0.978148 0 -0.207912 +-0.992115 0 -0.125333 -0.992115 0 -0.125333 -0.999123 0 -0.0418757 +-0.999123 0 -0.0418757 -0.999123 0 0.0418757 -0.999123 0 0.0418757 +-0.992115 0 0.125333 -0.992115 0 0.125333 -0.978148 0 0.207912 +-0.978148 0 0.207912 -0.957319 0 0.289032 -0.957319 0 0.289032 +-0.929776 0 0.368125 -0.929776 0 0.368125 -0.895712 0 0.444635 +-0.895712 0 0.444635 -0.855364 0 0.518027 -0.855364 0 0.518027 +-0.809017 0 0.587785 -0.809017 0 0.587785 -0.756995 0 0.653421 +-0.756995 0 0.653421 -0.699663 0 0.714473 -0.699663 0 0.714473 +-0.637424 0 0.770513 -0.637424 0 0.770513 -0.570714 0 0.821149 +-0.570714 0 0.821149 -0.5 0 0.866025 -0.5 0 0.866025 +-0.425779 0 0.904827 -0.425779 0 0.904827 -0.348572 0 0.937282 +-0.348572 0 0.937282 -0.26892 0 0.963163 -0.26892 0 0.963163 +-0.187381 0 0.982287 -0.187381 0 0.982287 -0.104528 0 0.994522 +-0.104528 0 0.994522 -0.0209424 0 0.999781 -0.0209424 0 0.999781 +0.0627905 0 0.998027 0.0627905 0 0.998027 0.146083 0 0.989272 +0.146083 0 0.989272 0.228351 0 0.973579 0.228351 0 0.973579 +0.309017 0 0.951057 0.309017 0 0.951057 0.387516 0 0.921863 +0.387516 0 0.921863 0.463296 0 0.886204 0.463296 0 0.886204 +0.535827 0 0.844328 0.535827 0 0.844328 0.604599 0 0.79653 +0.604599 0 0.79653 0.669131 0 0.743145 0.669131 0 0.743145 +0.728969 0 0.684547 0.728969 0 0.684547 0.783693 0 0.621148 +0.783693 0 0.621148 0.832921 0 0.553392 0.832921 0 0.553392 +0.876307 0 0.481754 0.876307 0 0.481754 0.913545 0 0.406737 +0.913545 0 0.406737 0.944376 0 0.328867 0.944376 0 0.328867 +0.968583 0 0.24869 0.968583 0 0.24869 0.985996 0 0.166769 +0.985996 0 0.166769 0.996493 0 0.0836778 0.996493 0 0.0836778 + +TEXTURE_COORDINATES TCoords 2 float +1 0 1 1 0.973333 0 0.973333 1 0.946667 +0 0.946667 1 0.92 0 0.92 1 0.893333 0 +0.893333 1 0.866667 0 0.866667 1 0.84 0 0.84 +1 0.813333 0 0.813333 1 0.786667 0 0.786667 1 +0.76 0 0.76 1 0.733333 0 0.733333 1 0.706667 +0 0.706667 1 0.68 0 0.68 1 0.653333 0 +0.653333 1 0.626667 0 0.626667 1 0.6 0 0.6 +1 0.573333 0 0.573333 1 0.546667 0 0.546667 1 +0.52 0 0.52 1 0.493333 0 0.493333 1 0.466667 +0 0.466667 1 0.44 0 0.44 1 0.413333 0 +0.413333 1 0.386667 0 0.386667 1 0.36 0 0.36 +1 0.333333 0 0.333333 1 0.306667 0 0.306667 1 +0.28 0 0.28 1 0.253333 0 0.253333 1 0.226667 +0 0.226667 1 0.2 0 0.2 1 0.173333 0 +0.173333 1 0.146667 0 0.146667 1 0.12 0 0.12 +1 0.0933333 0 0.0933333 1 0.0666667 0 0.0666667 1 +0.04 0 0.04 1 0.0133333 0 0.0133333 1 0.0133333 +0 0.0133333 1 0.04 0 0.04 1 0.0666667 0 +0.0666667 1 0.0933333 0 0.0933333 1 0.12 0 0.12 +1 0.146667 0 0.146667 1 0.173333 0 0.173333 1 +0.2 0 0.2 1 0.226667 0 0.226667 1 0.253333 +0 0.253333 1 0.28 0 0.28 1 0.306667 0 +0.306667 1 0.333333 0 0.333333 1 0.36 0 0.36 +1 0.386667 0 0.386667 1 0.413333 0 0.413333 1 +0.44 0 0.44 1 0.466667 0 0.466667 1 0.493333 +0 0.493333 1 0.52 0 0.52 1 0.546667 0 +0.546667 1 0.573333 0 0.573333 1 0.6 0 0.6 +1 0.626667 0 0.626667 1 0.653333 0 0.653333 1 +0.68 0 0.68 1 0.706667 0 0.706667 1 0.733333 +0 0.733333 1 0.76 0 0.76 1 0.786667 0 +0.786667 1 0.813333 0 0.813333 1 0.84 0 0.84 +1 0.866667 0 0.866667 1 0.893333 0 0.893333 1 +0.92 0 0.92 1 0.946667 0 0.946667 1 0.973333 +0 0.973333 1 diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/controlDict b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/controlDict new file mode 100644 index 0000000000..52dc7243d3 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/controlDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application snappyHexMesh; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 100; + +deltaT 1; + +writeControl runTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +} + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/createPatchDict b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/createPatchDict new file mode 100644 index 0000000000..162e6f98a0 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/createPatchDict @@ -0,0 +1,84 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object createPatchDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +pointSync false; + +// Patches to create. +patches +( + { + // Name of new patch + name oversetPatch; + + // Dictionary to construct new patch from + patchInfo + { + type overset; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (otherSide); + + // If constructFrom = set : name of faceSet + set f0; + } + + { + // Name of new patch + name walls; + + // Dictionary to construct new patch from + patchInfo + { + type wall; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (originalPatch); + + // If constructFrom = set : name of faceSet + set f0; + } + + { + // Name of new patch + name frontAndBack; + + // Dictionary to construct new patch from + patchInfo + { + type empty; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (sides); + + // If constructFrom = set : name of faceSet + set f0; + } + +); + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/extrudeMeshDict b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/extrudeMeshDict new file mode 100644 index 0000000000..594cab7254 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/extrudeMeshDict @@ -0,0 +1,136 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object extrudeMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// What to extrude: +// patch : from patch of another case ('sourceCase') +// mesh : as above but with original case included +// surface : from externally read surface + +//constructFrom mesh; +//constructFrom patch; +constructFrom surface; + +// If construct from patch/mesh: +sourceCase "../cavity"; +sourcePatches (movingWall); + +// If construct from patch: patch to use for back (can be same as sourcePatch) +exposedPatchName movingWall; + +// If construct from surface: +surface "constant/triSurface/cylinder.vtk"; + +// Flip surface normals before usage. Valid only for extrude from surface or +// patch. +flipNormals false; + +//- Linear extrusion in point-normal direction +extrudeModel linearNormal; + +//- Single layer linear extrusion in point-normal direction +// with empty patches on front and back +//extrudeModel plane; + +//- Linear extrusion in specified direction +//extrudeModel linearDirection; + +//- Sector extrusion +//extrudeModel sector; + +//- Wedge extrusion of a single layer +// with wedge patches on front and back +//extrudeModel wedge; + +//- Extrudes into sphere around (0 0 0) +//extrudeModel linearRadial; + +//- Extrudes into sphere around (0 0 0) with specified radii +//extrudeModel radial; + +//- Extrudes into sphere with grading according to pressure (atmospherics) +//extrudeModel sigmaRadial; + +//- Extrudes by interpolating along path inbetween two (topologically identical) +// surfaces (e.g. one is an offsetted version of the other) +//extrudeModel offsetSurface; + +nLayers 10; + +expansionRatio 1.02; + +sectorCoeffs +{ + axisPt (0 0.1 -0.05); + axis (-1 0 0); + angle 360; // For nLayers=1 assume symmetry so angle/2 on each side +} + +linearNormalCoeffs +{ + thickness 0.7; +} + +planeCoeffs +{ +// thickness 0.1; + nLayers 4; +} + +linearDirectionCoeffs +{ + direction (0 1 0); + thickness 0.5; +} + +linearRadialCoeffs +{ + R 0.1; + // Optional inner radius + Rsurface 0.01; +} + +radialCoeffs +{ + // Radii specified through interpolation table + R table ((0 0.01)(3 0.03)(10 0.1)); +} + +sigmaRadialCoeffs +{ + RTbyg 1; + pRef 1; + pStrat 1; +} + +offsetSurfaceCoeffs +{ + // Surface that mesh has been meshed to + baseSurface "$FOAM_CASE/constant/triSurface/DTC-scaled-inflated.obj"; + + // Surface to fill in to + offsetSurface "$FOAM_CASE/constant/triSurface/DTC-scaled.obj"; +} + + +// Do front and back need to be merged? Usually only makes sense for 360 +// degree wedges. +mergeFaces false; + +// Merge small edges. Fraction of bounding box. +mergeTol 0; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/fvSchemes b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/fvSchemes new file mode 100644 index 0000000000..593e432ee1 --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss limitedLinearV 1; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div(phid,p) Gauss limitedLinear 1; + div(phi,K) Gauss limitedLinear 1; + div(phi,e) Gauss limitedLinear 1; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear limited corrected 0.5; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/fvSolution b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/fvSolution new file mode 100644 index 0000000000..a2c699b46c --- /dev/null +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/system/fvSolution @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-12; + relTol 0; + } + + rho + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0; + } + + "(U|e|k|epsilon|R)" + { + $p; + tolerance 1e-08; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 2; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allclean b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allclean new file mode 100755 index 0000000000..862ed262d8 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Extrude mesh around cylinder +(cd cylinderAndBackground && ./Allclean) + +# Add background mesh +(cd cylinderMesh && foamCleanTutorials) + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun new file mode 100755 index 0000000000..7604f9ad35 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun @@ -0,0 +1,8 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Extrude mesh around cylinder +(cd cylinderMesh && ./Allrun.pre) + +# Add background mesh +(cd cylinderAndBackground && ./Allrun) diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun.pre b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun.pre new file mode 100755 index 0000000000..788e947486 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun.pre @@ -0,0 +1,8 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Extrude mesh around cylinder +(cd cylinderMesh && ./Allrun.pre) + +# Add background mesh +(cd cylinderAndBackground && ./Allrun.pre) diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/T b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/T new file mode 100644 index 0000000000..3eb028daa8 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/T @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform $temperature; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + + wall + { + type fixedValue; + value uniform 450; + } + + inlet + { + type fixedValue; + value uniform $temperature; + } + + outlet + { + type inletOutlet; + value $internalField; + inletValue $internalField; + } + + ".*" + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/U b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/U new file mode 100644 index 0000000000..7637431aeb --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/U @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + walls + { + type movingWallVelocity; + value uniform (0 0 0); + } + + inlet + { + type fixedValue; + value uniform $flowVelocity; + } + + outlet + { + type inletOutlet; + inletValue uniform (0 0 0); + value $internalField; + } + + topAndBottom + { + type inletOutlet; + inletValue uniform (0 0 0); + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/alphat b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/alphat new file mode 100644 index 0000000000..a736d186b8 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/alphat @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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 +{ + #includeEtc "caseDicts/setConstraintTypes" + + walls + { + type compressible::alphatWallFunction; + Prt 0.85; + value uniform 0; + } + ".*" + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/epsilon b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/epsilon new file mode 100644 index 0000000000..7e21d56b09 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/epsilon @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform $turbulentEpsilon; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + walls + { + type epsilonWallFunction; + value $internalField; + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + topAndBottom + { + type inletOutlet; + inletValue $internalField + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/include/fixedInlet b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/include/fixedInlet new file mode 100644 index 0000000000..d69bf4f580 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/include/fixedInlet @@ -0,0 +1,15 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +inlet +{ + type fixedValue; + value $internalField; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/include/initialConditions b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/include/initialConditions new file mode 100644 index 0000000000..b5f0c307ea --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/include/initialConditions @@ -0,0 +1,16 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +flowVelocity (1 0 0); +pressure 1e5; +temperature 300; +turbulentEpsilon 10; +turbulentKE 1; +#inputMode merge + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/k b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/k new file mode 100644 index 0000000000..87d5c4476c --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/k @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [ 0 2 -2 0 0 0 0 ]; + +internalField uniform $turbulentKE; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type kqRWallFunction; + value uniform 0; + } + + inlet + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; // 5% turbulent intensity + value $internalField; + } + + "outlet|topAndBottom" + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/nut b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/nut new file mode 100644 index 0000000000..3c812227d1 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/nut @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -1 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + walls + { + type nutkWallFunction; + value uniform 0; + } + + ".*" + { + type calculated; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/p b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/p new file mode 100644 index 0000000000..15c58dbf83 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/p @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform $pressure; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + wall + { + type zeroGradient; + } + inlet + { + type zeroGradient; + } + outlet + { + type fixedValue; + value $internalField; + } + topAndBottom + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/pointDisplacement b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/pointDisplacement new file mode 100644 index 0000000000..14d636e122 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/pointDisplacement @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class pointVectorField; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + overset + { + patchType overset; + type zeroGradient; + } + + walls + { + type uniformFixedValue; + uniformValue (0 0 0); + } + + ".*" + { + type uniformFixedValue; + uniformValue (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/zoneID b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/zoneID new file mode 100644 index 0000000000..804d9005e9 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/0.orig/zoneID @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object zoneID; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + oversetPatch + { + type overset; + value uniform 0; + } + + ".*" + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allclean b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allclean new file mode 100755 index 0000000000..6be736ea3c --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allclean @@ -0,0 +1,12 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +rm -f constant/polyMesh/boundary +rm -f constant/polyMesh/zoneID +rm -f constant/cellInterpolationWeight + +rm -rf 0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun new file mode 100755 index 0000000000..50626eed68 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +./Allrun.pre + +# Run it for a bit +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun.pre b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun.pre new file mode 100755 index 0000000000..f4910d875d --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun.pre @@ -0,0 +1,22 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Create background mesh +runApplication blockMesh + +# Add the cylinder mesh +runApplication mergeMeshes . ../cylinderMesh -overwrite + +## Make it a bit smaller to keep it laminar +#runApplication transformPoints -scale '(0.001 0.001 0.001)' + +# Select cellSets for the different zones +runApplication topoSet + +restore0Dir + +# Use cellSets to write zoneID +runApplication setFields + +#------------------------------------------------------------------------------ diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/dynamicMeshDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/dynamicMeshDict new file mode 100644 index 0000000000..9f766ac272 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/dynamicMeshDict @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object dynamicMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +motionSolverLibs ( "libfvMotionSolvers.so" ); + +solver displacementLaplacian; + +displacementLaplacianCoeffs +{ + diffusivity uniform 1; +} + +dynamicFvMesh dynamicOversetFvMesh; + +dynamicOversetFvMeshCoeffs +{ +// layerRelax 0.3; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/thermophysicalProperties b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/thermophysicalProperties new file mode 100644 index 0000000000..18726036d6 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/thermophysicalProperties @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport sutherland; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + As 1.4792e-06; + Ts 116; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/transportProperties b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/transportProperties new file mode 100644 index 0000000000..84dc531c98 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/transportProperties @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +DT DT [ 0 2 -1 0 0 0 0 ] 1; //4e-05; + +transportModel Newtonian; + +nu nu [ 0 2 -1 0 0 0 0 ] 1e-03; + +CrossPowerLawCoeffs +{ + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + m m [ 0 0 1 0 0 0 0 ] 1; + n n [ 0 0 0 0 0 0 0 ] 1; +} + +BirdCarreauCoeffs +{ + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + k k [ 0 0 1 0 0 0 0 ] 0; + n n [ 0 0 0 0 0 0 0 ] 1; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/turbulenceProperties b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/turbulenceProperties new file mode 100644 index 0000000000..8fe9b5ed38 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/constant/turbulenceProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/blockMeshDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/blockMeshDict new file mode 100644 index 0000000000..117207998a --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/blockMeshDict @@ -0,0 +1,83 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (-2 -0.05 -2.0) + ( 4 -0.05 -2.0) + ( 4 0.05 -2.0) + (-2 0.05 -2.0) + (-2 -0.05 2.0) + ( 4 -0.05 2.0) + ( 4 0.05 2.0) + (-2 0.05 2.0) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (120 1 60) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + topAndBottom + { + type patch; + faces + ( + (4 5 6 7) + (0 3 2 1) + ); + } + + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + + outlet + { + type patch; + faces + ( + (2 6 5 1) + ); + } + + frontAndBack + { + type empty; + faces + ( + (3 7 6 2) + (1 5 4 0) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/controlDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/controlDict new file mode 100644 index 0000000000..963b0ff3c3 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/controlDict @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Make sure all preprocessing tools know about the 'overset' bc +libs ("liboverset.so"); + +application overRhoSimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1000; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 12; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/decomposeParDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/decomposeParDict new file mode 100644 index 0000000000..29610a20d8 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/decomposeParDict @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + + +method hierarchical; + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/fvSchemes b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/fvSchemes new file mode 100644 index 0000000000..3ee5f2fb88 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/fvSchemes @@ -0,0 +1,71 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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) bounded Gauss upwind; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; + + div(phi,h) bounded Gauss upwind; + div(phi,epsilon) bounded Gauss upwind; + div(phi,k) bounded Gauss upwind; + + div(phi,Ekp) bounded Gauss upwind; + + div(phi,K) bounded Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +oversetInterpolation +{ + method inverseDistance; +} + +oversetInterpolationRequired +{ + epsilon; + k; + nut; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/fvSolution b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/fvSolution new file mode 100644 index 0000000000..a3627d320f --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/fvSolution @@ -0,0 +1,80 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + cellDisplacement + { + solver PCG; + preconditioner DIC; + + tolerance 1e-06; + relTol 0; + maxIter 100; + } + + "(U|e|h|k|epsilon)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0.01; + } + + p + { + $U; + } + +} + +SIMPLE +{ + momentumPredictor true; + nNonOrthogonalCorrectors 1; + pMinFactor 0.1; + pMaxFactor 2; + + residualControl + { + p 1e-3; + U 1e-4; + e 1e-3; + + // possibly check turbulence fields + "(k|epsilon|omega)" 1e-3; + } +} + +relaxationFactors +{ + fields + { + p 0.7; + rho 1; + } + equations + { + U 0.3; + h 0.8; + k 0.4; + epsilon 0.4; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/setFieldsDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/setFieldsDict new file mode 100644 index 0000000000..8efb92d610 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/setFieldsDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue zoneID 123 +); + +regions +( + // Set cell values + // (does zerogradient on boundaries) + cellToCell + { + set c0; + + fieldValues + ( + volScalarFieldValue zoneID 0 + ); + } + + cellToCell + { + set c1; + + fieldValues + ( + volScalarFieldValue zoneID 1 + ); + } + +); + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/topoSetDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/topoSetDict new file mode 100644 index 0000000000..81f172e41a --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/system/topoSetDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source regionToCell; + sourceInfo + { + insidePoints ((-1.999 0 -1.999)); + } + } + + { + name c1; + type cellSet; + action new; + source cellToCell; + sourceInfo + { + set c0; + } + } + + { + name c1; + type cellSet; + action invert; + } +); + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/Allrun.pre b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/Allrun.pre new file mode 100755 index 0000000000..ad0801bbb9 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/Allrun.pre @@ -0,0 +1,8 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Generate mesh from surface (in constant/triSurface) +runApplication extrudeMesh + +# Make front and back type empty +runApplication createPatch -overwrite diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/constant/triSurface/cylinder.vtk b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/constant/triSurface/cylinder.vtk new file mode 100644 index 0000000000..6a99fb9b6f --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/constant/triSurface/cylinder.vtk @@ -0,0 +1,221 @@ +# vtk DataFile Version 4.0 +vtk output +ASCII +DATASET POLYDATA +POINTS 150 float +0.5 0.05 0 0.5 -0.05 0 0.498246 0.05 -0.0418389 +0.498246 -0.05 -0.0418389 0.492998 0.05 -0.0833844 0.492998 -0.05 -0.0833844 +0.484292 0.05 -0.124345 0.484292 -0.05 -0.124345 0.472188 0.05 -0.164433 +0.472188 -0.05 -0.164433 0.456773 0.05 -0.203368 0.456773 -0.05 -0.203368 +0.438153 0.05 -0.240877 0.438153 -0.05 -0.240877 0.416461 0.05 -0.276696 +0.416461 -0.05 -0.276696 0.391847 0.05 -0.310574 0.391847 -0.05 -0.310574 +0.364484 0.05 -0.342274 0.364484 -0.05 -0.342274 0.334565 0.05 -0.371572 +0.334565 -0.05 -0.371572 0.3023 0.05 -0.398265 0.3023 -0.05 -0.398265 +0.267913 0.05 -0.422164 0.267913 -0.05 -0.422164 0.231648 0.05 -0.443102 +0.231648 -0.05 -0.443102 0.193758 0.05 -0.460932 0.193758 -0.05 -0.460932 +0.154509 0.05 -0.475528 0.154509 -0.05 -0.475528 0.114175 0.05 -0.486789 +0.114175 -0.05 -0.486789 0.0730415 0.05 -0.494636 0.0730415 -0.05 -0.494636 +0.0313953 0.05 -0.499013 0.0313953 -0.05 -0.499013 -0.0104712 0.05 -0.49989 +-0.0104712 -0.05 -0.49989 -0.0522642 0.05 -0.497261 -0.0522642 -0.05 -0.497261 +-0.0936907 0.05 -0.491144 -0.0936907 -0.05 -0.491144 -0.13446 0.05 -0.481581 +-0.13446 -0.05 -0.481581 -0.174286 0.05 -0.468641 -0.174286 -0.05 -0.468641 +-0.21289 0.05 -0.452414 -0.21289 -0.05 -0.452414 -0.25 0.05 -0.433013 +-0.25 -0.05 -0.433013 -0.285357 0.05 -0.410575 -0.285357 -0.05 -0.410575 +-0.318712 0.05 -0.385257 -0.318712 -0.05 -0.385257 -0.349832 0.05 -0.357236 +-0.349832 -0.05 -0.357236 -0.378498 0.05 -0.32671 -0.378498 -0.05 -0.32671 +-0.404509 0.05 -0.293893 -0.404509 -0.05 -0.293893 -0.427682 0.05 -0.259014 +-0.427682 -0.05 -0.259014 -0.447856 0.05 -0.222318 -0.447856 -0.05 -0.222318 +-0.464888 0.05 -0.184062 -0.464888 -0.05 -0.184062 -0.47866 0.05 -0.144516 +-0.47866 -0.05 -0.144516 -0.489074 0.05 -0.103956 -0.489074 -0.05 -0.103956 +-0.496057 0.05 -0.0626666 -0.496057 -0.05 -0.0626666 -0.499561 0.05 -0.0209378 +-0.499561 -0.05 -0.0209378 -0.499561 0.05 0.0209378 -0.499561 -0.05 0.0209378 +-0.496057 0.05 0.0626666 -0.496057 -0.05 0.0626666 -0.489074 0.05 0.103956 +-0.489074 -0.05 0.103956 -0.47866 0.05 0.144516 -0.47866 -0.05 0.144516 +-0.464888 0.05 0.184062 -0.464888 -0.05 0.184062 -0.447856 0.05 0.222318 +-0.447856 -0.05 0.222318 -0.427682 0.05 0.259014 -0.427682 -0.05 0.259014 +-0.404509 0.05 0.293893 -0.404509 -0.05 0.293893 -0.378498 0.05 0.32671 +-0.378498 -0.05 0.32671 -0.349832 0.05 0.357236 -0.349832 -0.05 0.357236 +-0.318712 0.05 0.385257 -0.318712 -0.05 0.385257 -0.285357 0.05 0.410575 +-0.285357 -0.05 0.410575 -0.25 0.05 0.433013 -0.25 -0.05 0.433013 +-0.21289 0.05 0.452414 -0.21289 -0.05 0.452414 -0.174286 0.05 0.468641 +-0.174286 -0.05 0.468641 -0.13446 0.05 0.481581 -0.13446 -0.05 0.481581 +-0.0936907 0.05 0.491144 -0.0936907 -0.05 0.491144 -0.0522642 0.05 0.497261 +-0.0522642 -0.05 0.497261 -0.0104712 0.05 0.49989 -0.0104712 -0.05 0.49989 +0.0313953 0.05 0.499013 0.0313953 -0.05 0.499013 0.0730415 0.05 0.494636 +0.0730415 -0.05 0.494636 0.114175 0.05 0.486789 0.114175 -0.05 0.486789 +0.154509 0.05 0.475528 0.154509 -0.05 0.475528 0.193758 0.05 0.460932 +0.193758 -0.05 0.460932 0.231648 0.05 0.443102 0.231648 -0.05 0.443102 +0.267913 0.05 0.422164 0.267913 -0.05 0.422164 0.3023 0.05 0.398265 +0.3023 -0.05 0.398265 0.334565 0.05 0.371572 0.334565 -0.05 0.371572 +0.364484 0.05 0.342274 0.364484 -0.05 0.342274 0.391847 0.05 0.310574 +0.391847 -0.05 0.310574 0.416461 0.05 0.276696 0.416461 -0.05 0.276696 +0.438153 0.05 0.240877 0.438153 -0.05 0.240877 0.456773 0.05 0.203368 +0.456773 -0.05 0.203368 0.472188 0.05 0.164433 0.472188 -0.05 0.164433 +0.484292 0.05 0.124345 0.484292 -0.05 0.124345 0.492998 0.05 0.0833844 +0.492998 -0.05 0.0833844 0.498246 0.05 0.0418389 0.498246 -0.05 0.0418389 + +POLYGONS 75 375 +4 0 1 3 2 +4 2 3 5 4 +4 4 5 7 6 +4 6 7 9 8 +4 8 9 11 10 +4 10 11 13 12 +4 12 13 15 14 +4 14 15 17 16 +4 16 17 19 18 +4 18 19 21 20 +4 20 21 23 22 +4 22 23 25 24 +4 24 25 27 26 +4 26 27 29 28 +4 28 29 31 30 +4 30 31 33 32 +4 32 33 35 34 +4 34 35 37 36 +4 36 37 39 38 +4 38 39 41 40 +4 40 41 43 42 +4 42 43 45 44 +4 44 45 47 46 +4 46 47 49 48 +4 48 49 51 50 +4 50 51 53 52 +4 52 53 55 54 +4 54 55 57 56 +4 56 57 59 58 +4 58 59 61 60 +4 60 61 63 62 +4 62 63 65 64 +4 64 65 67 66 +4 66 67 69 68 +4 68 69 71 70 +4 70 71 73 72 +4 72 73 75 74 +4 74 75 77 76 +4 76 77 79 78 +4 78 79 81 80 +4 80 81 83 82 +4 82 83 85 84 +4 84 85 87 86 +4 86 87 89 88 +4 88 89 91 90 +4 90 91 93 92 +4 92 93 95 94 +4 94 95 97 96 +4 96 97 99 98 +4 98 99 101 100 +4 100 101 103 102 +4 102 103 105 104 +4 104 105 107 106 +4 106 107 109 108 +4 108 109 111 110 +4 110 111 113 112 +4 112 113 115 114 +4 114 115 117 116 +4 116 117 119 118 +4 118 119 121 120 +4 120 121 123 122 +4 122 123 125 124 +4 124 125 127 126 +4 126 127 129 128 +4 128 129 131 130 +4 130 131 133 132 +4 132 133 135 134 +4 134 135 137 136 +4 136 137 139 138 +4 138 139 141 140 +4 140 141 143 142 +4 142 143 145 144 +4 144 145 147 146 +4 146 147 149 148 +4 148 149 1 0 + +POINT_DATA 150 +NORMALS Normals float +1 0 -0 1 0 -0 0.996493 0 -0.0836778 +0.996493 0 -0.0836778 0.985996 0 -0.166769 0.985996 0 -0.166769 +0.968583 0 -0.24869 0.968583 0 -0.24869 0.944376 0 -0.328867 +0.944376 0 -0.328867 0.913545 0 -0.406737 0.913545 0 -0.406737 +0.876307 0 -0.481754 0.876307 0 -0.481754 0.832921 0 -0.553392 +0.832921 0 -0.553392 0.783693 0 -0.621148 0.783693 0 -0.621148 +0.728969 0 -0.684547 0.728969 0 -0.684547 0.669131 0 -0.743145 +0.669131 0 -0.743145 0.604599 0 -0.79653 0.604599 0 -0.79653 +0.535827 0 -0.844328 0.535827 0 -0.844328 0.463296 0 -0.886204 +0.463296 0 -0.886204 0.387516 0 -0.921863 0.387516 0 -0.921863 +0.309017 0 -0.951057 0.309017 0 -0.951057 0.228351 0 -0.973579 +0.228351 0 -0.973579 0.146083 0 -0.989272 0.146083 0 -0.989272 +0.0627905 0 -0.998027 0.0627905 0 -0.998027 -0.0209424 0 -0.999781 +-0.0209424 0 -0.999781 -0.104528 0 -0.994522 -0.104528 0 -0.994522 +-0.187381 0 -0.982287 -0.187381 0 -0.982287 -0.26892 0 -0.963163 +-0.26892 0 -0.963163 -0.348572 0 -0.937282 -0.348572 0 -0.937282 +-0.425779 0 -0.904827 -0.425779 0 -0.904827 -0.5 0 -0.866025 +-0.5 0 -0.866025 -0.570714 0 -0.821149 -0.570714 0 -0.821149 +-0.637424 0 -0.770513 -0.637424 0 -0.770513 -0.699663 0 -0.714473 +-0.699663 0 -0.714473 -0.756995 0 -0.653421 -0.756995 0 -0.653421 +-0.809017 0 -0.587785 -0.809017 0 -0.587785 -0.855364 0 -0.518027 +-0.855364 0 -0.518027 -0.895712 0 -0.444635 -0.895712 0 -0.444635 +-0.929776 0 -0.368125 -0.929776 0 -0.368125 -0.957319 0 -0.289032 +-0.957319 0 -0.289032 -0.978148 0 -0.207912 -0.978148 0 -0.207912 +-0.992115 0 -0.125333 -0.992115 0 -0.125333 -0.999123 0 -0.0418757 +-0.999123 0 -0.0418757 -0.999123 0 0.0418757 -0.999123 0 0.0418757 +-0.992115 0 0.125333 -0.992115 0 0.125333 -0.978148 0 0.207912 +-0.978148 0 0.207912 -0.957319 0 0.289032 -0.957319 0 0.289032 +-0.929776 0 0.368125 -0.929776 0 0.368125 -0.895712 0 0.444635 +-0.895712 0 0.444635 -0.855364 0 0.518027 -0.855364 0 0.518027 +-0.809017 0 0.587785 -0.809017 0 0.587785 -0.756995 0 0.653421 +-0.756995 0 0.653421 -0.699663 0 0.714473 -0.699663 0 0.714473 +-0.637424 0 0.770513 -0.637424 0 0.770513 -0.570714 0 0.821149 +-0.570714 0 0.821149 -0.5 0 0.866025 -0.5 0 0.866025 +-0.425779 0 0.904827 -0.425779 0 0.904827 -0.348572 0 0.937282 +-0.348572 0 0.937282 -0.26892 0 0.963163 -0.26892 0 0.963163 +-0.187381 0 0.982287 -0.187381 0 0.982287 -0.104528 0 0.994522 +-0.104528 0 0.994522 -0.0209424 0 0.999781 -0.0209424 0 0.999781 +0.0627905 0 0.998027 0.0627905 0 0.998027 0.146083 0 0.989272 +0.146083 0 0.989272 0.228351 0 0.973579 0.228351 0 0.973579 +0.309017 0 0.951057 0.309017 0 0.951057 0.387516 0 0.921863 +0.387516 0 0.921863 0.463296 0 0.886204 0.463296 0 0.886204 +0.535827 0 0.844328 0.535827 0 0.844328 0.604599 0 0.79653 +0.604599 0 0.79653 0.669131 0 0.743145 0.669131 0 0.743145 +0.728969 0 0.684547 0.728969 0 0.684547 0.783693 0 0.621148 +0.783693 0 0.621148 0.832921 0 0.553392 0.832921 0 0.553392 +0.876307 0 0.481754 0.876307 0 0.481754 0.913545 0 0.406737 +0.913545 0 0.406737 0.944376 0 0.328867 0.944376 0 0.328867 +0.968583 0 0.24869 0.968583 0 0.24869 0.985996 0 0.166769 +0.985996 0 0.166769 0.996493 0 0.0836778 0.996493 0 0.0836778 + +TEXTURE_COORDINATES TCoords 2 float +1 0 1 1 0.973333 0 0.973333 1 0.946667 +0 0.946667 1 0.92 0 0.92 1 0.893333 0 +0.893333 1 0.866667 0 0.866667 1 0.84 0 0.84 +1 0.813333 0 0.813333 1 0.786667 0 0.786667 1 +0.76 0 0.76 1 0.733333 0 0.733333 1 0.706667 +0 0.706667 1 0.68 0 0.68 1 0.653333 0 +0.653333 1 0.626667 0 0.626667 1 0.6 0 0.6 +1 0.573333 0 0.573333 1 0.546667 0 0.546667 1 +0.52 0 0.52 1 0.493333 0 0.493333 1 0.466667 +0 0.466667 1 0.44 0 0.44 1 0.413333 0 +0.413333 1 0.386667 0 0.386667 1 0.36 0 0.36 +1 0.333333 0 0.333333 1 0.306667 0 0.306667 1 +0.28 0 0.28 1 0.253333 0 0.253333 1 0.226667 +0 0.226667 1 0.2 0 0.2 1 0.173333 0 +0.173333 1 0.146667 0 0.146667 1 0.12 0 0.12 +1 0.0933333 0 0.0933333 1 0.0666667 0 0.0666667 1 +0.04 0 0.04 1 0.0133333 0 0.0133333 1 0.0133333 +0 0.0133333 1 0.04 0 0.04 1 0.0666667 0 +0.0666667 1 0.0933333 0 0.0933333 1 0.12 0 0.12 +1 0.146667 0 0.146667 1 0.173333 0 0.173333 1 +0.2 0 0.2 1 0.226667 0 0.226667 1 0.253333 +0 0.253333 1 0.28 0 0.28 1 0.306667 0 +0.306667 1 0.333333 0 0.333333 1 0.36 0 0.36 +1 0.386667 0 0.386667 1 0.413333 0 0.413333 1 +0.44 0 0.44 1 0.466667 0 0.466667 1 0.493333 +0 0.493333 1 0.52 0 0.52 1 0.546667 0 +0.546667 1 0.573333 0 0.573333 1 0.6 0 0.6 +1 0.626667 0 0.626667 1 0.653333 0 0.653333 1 +0.68 0 0.68 1 0.706667 0 0.706667 1 0.733333 +0 0.733333 1 0.76 0 0.76 1 0.786667 0 +0.786667 1 0.813333 0 0.813333 1 0.84 0 0.84 +1 0.866667 0 0.866667 1 0.893333 0 0.893333 1 +0.92 0 0.92 1 0.946667 0 0.946667 1 0.973333 +0 0.973333 1 diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/controlDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/controlDict new file mode 100644 index 0000000000..52dc7243d3 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/controlDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application snappyHexMesh; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 100; + +deltaT 1; + +writeControl runTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +} + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/createPatchDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/createPatchDict new file mode 100644 index 0000000000..162e6f98a0 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/createPatchDict @@ -0,0 +1,84 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object createPatchDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +pointSync false; + +// Patches to create. +patches +( + { + // Name of new patch + name oversetPatch; + + // Dictionary to construct new patch from + patchInfo + { + type overset; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (otherSide); + + // If constructFrom = set : name of faceSet + set f0; + } + + { + // Name of new patch + name walls; + + // Dictionary to construct new patch from + patchInfo + { + type wall; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (originalPatch); + + // If constructFrom = set : name of faceSet + set f0; + } + + { + // Name of new patch + name frontAndBack; + + // Dictionary to construct new patch from + patchInfo + { + type empty; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches (sides); + + // If constructFrom = set : name of faceSet + set f0; + } + +); + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/extrudeMeshDict b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/extrudeMeshDict new file mode 100644 index 0000000000..d6190ee7d8 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/extrudeMeshDict @@ -0,0 +1,109 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object extrudeMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// What to extrude: +// patch : from patch of another case ('sourceCase') +// mesh : as above but with original case included +// surface : from externally read surface + +//constructFrom mesh; +//constructFrom patch; +constructFrom surface; + +// If construct from patch/mesh: +sourceCase "../cavity"; +sourcePatches (movingWall); + +// If construct from patch: patch to use for back (can be same as sourcePatch) +exposedPatchName movingWall; + +// If construct from surface: +surface "constant/triSurface/cylinder.vtk"; + +// Flip surface normals before usage. Valid only for extrude from surface or +// patch. +flipNormals false; + +//- Linear extrusion in point-normal direction +extrudeModel linearNormal; + +nLayers 10; + +expansionRatio 1.02; + +sectorCoeffs +{ + axisPt (0 0.1 -0.05); + axis (-1 0 0); + angle 360; // For nLayers=1 assume symmetry so angle/2 on each side +} + +linearNormalCoeffs +{ + thickness 0.7; +} + +planeCoeffs +{ +// thickness 0.1; + nLayers 4; +} + +linearDirectionCoeffs +{ + direction (0 1 0); + thickness 0.5; +} + +linearRadialCoeffs +{ + R 0.1; + // Optional inner radius + Rsurface 0.01; +} + +radialCoeffs +{ + // Radii specified through interpolation table + R table ((0 0.01)(3 0.03)(10 0.1)); +} + +sigmaRadialCoeffs +{ + RTbyg 1; + pRef 1; + pStrat 1; +} + +offsetSurfaceCoeffs +{ + // Surface that mesh has been meshed to + baseSurface "$FOAM_CASE/constant/triSurface/DTC-scaled-inflated.obj"; + + // Surface to fill in to + offsetSurface "$FOAM_CASE/constant/triSurface/DTC-scaled.obj"; +} + + +// Do front and back need to be merged? Usually only makes sense for 360 +// degree wedges. +mergeFaces false; + +// Merge small edges. Fraction of bounding box. +mergeTol 0; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/fvSchemes b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/fvSchemes new file mode 100644 index 0000000000..593e432ee1 --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss limitedLinearV 1; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div(phid,p) Gauss limitedLinear 1; + div(phi,K) Gauss limitedLinear 1; + div(phi,e) Gauss limitedLinear 1; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear limited corrected 0.5; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/fvSolution b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/fvSolution new file mode 100644 index 0000000000..a2c699b46c --- /dev/null +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/system/fvSolution @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-12; + relTol 0; + } + + rho + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0; + } + + "(U|e|k|epsilon|R)" + { + $p; + tolerance 1e-08; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 2; +} + + +// ************************************************************************* //