diff --git a/applications/solvers/heatTransfer/solidFoam/Make/options b/applications/solvers/heatTransfer/solidFoam/Make/options index f8e6b9af409dab0394de597cd707a5b8af8e6c2b..764ab34010b495f5f4cb4556c0e15fdd697b0219 100644 --- a/applications/solvers/heatTransfer/solidFoam/Make/options +++ b/applications/solvers/heatTransfer/solidFoam/Make/options @@ -2,6 +2,8 @@ EXE_INC = \ -DFULLDEBUG -g -O0 \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ @@ -13,6 +15,9 @@ EXE_LIBS = \ -lfvOptions \ -lmeshTools \ -lsampling \ + -ldynamicMesh \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -lcompressibleTransportModels \ -lfluidThermophysicalModels \ -lradiationModels \ diff --git a/applications/solvers/heatTransfer/solidFoam/hEqn.H b/applications/solvers/heatTransfer/solidFoam/hEqn.H index 587c1028b24a7304a098d40ef73fd11aef5b37c4..cef7cd77053b1b2bb367461e1f467a788476f780 100644 --- a/applications/solvers/heatTransfer/solidFoam/hEqn.H +++ b/applications/solvers/heatTransfer/solidFoam/hEqn.H @@ -11,6 +11,16 @@ fvOptions(rho, h) ); + if (mesh.changing()) + { + surfaceScalarField phihMesh + ( + fvc::interpolate(betav*rho*h)*mesh.phi() + ); + + hEqn -= fvc::div(phihMesh); + } + hEqn.relax(); fvOptions.constrain(hEqn); diff --git a/applications/solvers/heatTransfer/solidFoam/solidFoam.C b/applications/solvers/heatTransfer/solidFoam/solidFoam.C index 771eb1fe647cfa0a3643ad4bfd05af5219f4ee8b..eef9684c06d34121bf1e3cd3f82de41b917f2fef 100644 --- a/applications/solvers/heatTransfer/solidFoam/solidFoam.C +++ b/applications/solvers/heatTransfer/solidFoam/solidFoam.C @@ -35,6 +35,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "solidThermo.H" #include "radiationModel.H" #include "fvOptions.H" @@ -57,7 +58,7 @@ int main(int argc, char *argv[]) #include "addCheckCaseOptions.H" #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" + #include "createDynamicFvMesh.H" #include "createFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -92,13 +93,20 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - while (pimple.correctNonOrthogonal()) + while (pimple.loop()) { - #include "hEqn.H" + if (pimple.firstIter()) + { + mesh.update(); + } + + while (pimple.correct()) + { + #include "hEqn.H" + } } runTime.write(); - runTime.printExecutionTime(Info); } } diff --git a/tutorials/heatTransfer/solidFoam/movingCone/0/T b/tutorials/heatTransfer/solidFoam/movingCone/0/T new file mode 100644 index 0000000000000000000000000000000000000000..e4326a768ca2f75f4076552843ad40dcf4afd72a --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/0/T @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + movingWall + { + type zeroGradient; + } + + farFieldMoving + { + type zeroGradient; + } + + fixedWall + { + type zeroGradient; + } + + left + { + type fixedValue; + value uniform 600; + } + + farField + { + type zeroGradient; + } + + back + { + type wedge; + } + + front + { + type wedge; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/0/U b/tutorials/heatTransfer/solidFoam/movingCone/0/U new file mode 100644 index 0000000000000000000000000000000000000000..02e91f36f5f08040282982dfceceeed362914178 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/0/U @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + movingWall + { + type movingWallVelocity; + value $internalField; + } + + farFieldMoving + { + type noSlip; + } + + fixedWall + { + type noSlip; + } + + left + { + type pressureInletOutletVelocity; + value $internalField; + } + + farField + { + type noSlip; + } + + back + { + type wedge; + } + + front + { + type wedge; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/0/p b/tutorials/heatTransfer/solidFoam/movingCone/0/p new file mode 100644 index 0000000000000000000000000000000000000000..c55f7b0ce8d217f517ebef13b51533bc9e4bd885 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/0/p @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + movingWall + { + type zeroGradient; + } + + farFieldMoving + { + type zeroGradient; + } + + fixedWall + { + type zeroGradient; + } + + left + { + type totalPressure; + p0 $internalField; + } + + farField + { + type zeroGradient; + } + + back + { + type wedge; + } + + front + { + type wedge; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/0/pointMotionUx b/tutorials/heatTransfer/solidFoam/movingCone/0/pointMotionUx new file mode 100644 index 0000000000000000000000000000000000000000..65f94262a9238e3cee0bd8c1c352edff528fe756 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/0/pointMotionUx @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class pointScalarField; + object pointMotionUx; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + movingWall + { + type uniformFixedValue; + uniformValue constant 1; + } + farFieldMoving + { + type slip; + } + fixedWall + { + type uniformFixedValue; + uniformValue constant 0; + } + left + { + type uniformFixedValue; + uniformValue constant 0; + } + farField + { + type slip; + } + back + { + type wedge; + } + front + { + type wedge; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/constant/dynamicMeshDict b/tutorials/heatTransfer/solidFoam/movingCone/constant/dynamicMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..fa6594af406762bb3a0d68823afd2eb44e799376 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/constant/dynamicMeshDict @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object dynamicMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dynamicFvMesh dynamicMotionSolverFvMesh; + +motionSolverLibs (fvMotionSolvers); + +motionSolver velocityComponentLaplacian; + +component x; +diffusivity directional (1 200 0); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/constant/radiationProperties b/tutorials/heatTransfer/solidFoam/movingCone/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..f806a0b830d59689a4136db94539d4ef1e39f501 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/constant/radiationProperties @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel none; + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/constant/thermophysicalProperties b/tutorials/heatTransfer/solidFoam/movingCone/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..3422aa87a90c7320d53ca9f311c519f6e3a7dec0 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/constant/thermophysicalProperties @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heSolidThermo; + mixture pureMixture; + transport constIso; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 12; + } + + transport + { + kappa 80; + } + + thermodynamics + { + Hf 0; + Cp 450; + } + + equationOfState + { + rho 8000; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/system/blockMeshDict b/tutorials/heatTransfer/solidFoam/movingCone/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..13f50e8765aeead4db65522e70ba4db07f874612 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/system/blockMeshDict @@ -0,0 +1,144 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 0.001; + +mergeType points; // Wedge geometry - Merge points instead of topology + +vertices +( + (-7.5 0 0) + (-7 0 0) + (-3.5 0 0) + (0 0 0) + (-7.5 0.75 -0.032745707) + (-7 0.75 -0.032745707) + (-3.5 2 -0.087321886) + (0 2 -0.087321886) + (-7.5 2.5 -0.10915236) + (-7 2.5 -0.10915236) + (-3.5 2.5 -0.10915236) + (0 2.5 -0.10915236) + (-7.5 0.75 0.032745707) + (-7 0.75 0.032745707) + (-3.5 2 0.087321886) + (0 2 0.087321886) + (-7.5 2.5 0.10915236) + (-7 2.5 0.10915236) + (-3.5 2.5 0.10915236) + (0 2.5 0.10915236) +); + +blocks +( + hex (0 1 5 4 0 1 13 12) (15 15 1) simpleGrading (1 1 1) + hex (2 3 7 6 2 3 15 14) (20 20 1) simpleGrading (2 0.25 1) + hex (4 5 9 8 12 13 17 16) (15 15 1) simpleGrading (1 1 1) + hex (5 6 10 9 13 14 18 17) (50 15 1) simpleGrading (1 1 1) + hex (6 7 11 10 14 15 19 18) (20 15 1) simpleGrading (2 1 1) +); + +edges +( +); + +boundary +( + movingWall + { + type wall; + faces + ( + (1 5 13 1) + (5 6 14 13) + (2 2 14 6) + ); + } + farFieldMoving + { + type patch; + faces + ( + (9 17 18 10) + ); + } + fixedWall + { + type wall; + faces + ( + (3 7 15 3) + (7 11 19 15) + ); + } + axis + { + type empty; + faces + ( + (0 1 1 0) + (2 3 3 2) + ); + } + left + { + type patch; + faces + ( + (0 0 12 4) + (4 12 16 8) + ); + } + farField + { + type patch; + faces + ( + (8 16 17 9) + (10 18 19 11) + ); + } + back + { + type wedge; + faces + ( + (0 4 5 1) + (2 6 7 3) + (4 8 9 5) + (5 9 10 6) + (6 10 11 7) + ); + } + front + { + type wedge; + faces + ( + (0 1 13 12) + (2 3 15 14) + (12 13 17 16) + (13 14 18 17) + (14 15 19 18) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/system/controlDict b/tutorials/heatTransfer/solidFoam/movingCone/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..b86da47613202aa35f3f8e323f1694203c8677cb --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/system/controlDict @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application solidFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.003; + +deltaT 5e-06; + +writeControl timeStep; + +writeInterval 40; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep no; + +maxCo 0.2; + +functions +{ +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/system/cuttingPlane b/tutorials/heatTransfer/solidFoam/movingCone/system/cuttingPlane new file mode 100644 index 0000000000000000000000000000000000000000..990a23202fa883cbe35a7775df560395b01597d3 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/system/cuttingPlane @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +cuttingPlane +{ + type surfaces; + libs (sampling); + + writeControl writeTime; + + surfaceFormat vtk; + fields ( p U ); + + interpolationScheme cellPoint; + + surfaces + { + zNormal + { + type cuttingPlane; + planeType pointAndNormal; + pointAndNormalDict + { + point (0 0 0); + normal (0 0 1); + } + interpolate true; + } + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/system/fvSchemes b/tutorials/heatTransfer/solidFoam/movingCone/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..d3f676d0f99cf52fc5874824eeb65d70a4c5ebfe --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/system/fvSchemes @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: 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 linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; + + laplacian(diffusivity,cellMotionU) Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/system/fvSolution b/tutorials/heatTransfer/solidFoam/movingCone/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..fedc6d6610f0de26fb47883f43b0ad46cd7cca92 --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/system/fvSolution @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + + h + { + solver PCG; + preconditioner DIC; + tolerance 1e-05; + relTol 0.1; + } + + hFinal + { + $h; + tolerance 1e-05; + relTol 0; + } + + cellMotionUx + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0; + } +} + +PIMPLE +{ + correctPhi yes; + nOuterCorrectors 2; + nCorrectors 1; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + "h.*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/solidFoam/movingCone/system/vtkWrite b/tutorials/heatTransfer/solidFoam/movingCone/system/vtkWrite new file mode 100644 index 0000000000000000000000000000000000000000..2ed9f30296eb3050245105e1b1f62900215f5cfb --- /dev/null +++ b/tutorials/heatTransfer/solidFoam/movingCone/system/vtkWrite @@ -0,0 +1,17 @@ +// -*- C++ -*- +// Minimal example of using the vtkWrite function object. +vtkWrite +{ + type vtkWrite; + libs (utilityFunctionObjects); + writeControl writeTime; + + boundary false; + + // Fields to output (words or regex) + fields (U p "(k|epsilon|omega)"); + +} + + +// ************************************************************************* //