diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes index 61edc1623f..2809fc4f97 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes @@ -40,7 +40,7 @@ divSchemes laplacianSchemes { - default Gauss linear limited corrected 0.333; + default Gauss linear corrected; } interpolationSchemes @@ -50,7 +50,7 @@ interpolationSchemes snGradSchemes { - default limited corrected 0.333; + default corrected; } fluxRequired diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution index b0820c94a5..7ece4847b8 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution @@ -20,21 +20,21 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-7; + tolerance 1e-6; relTol 0.1; } rhoFinal { $rho; - tolerance 1e-7; + tolerance 1e-6; relTol 0; } p_rgh { solver GAMG; - tolerance 1e-7; + tolerance 1e-6; relTol 0.01; smoother GaussSeidel; @@ -43,12 +43,12 @@ solvers nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; + maxIter 100; } p_rghFinal { $p_rgh; - tolerance 1e-7; relTol 0; } @@ -56,14 +56,14 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-7; + tolerance 1e-6; relTol 0.1; } "(U|h|k|epsilon|R)Final" { $U; - tolerance 1e-7; + tolerance 1e-6; relTol 0; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict index 97f299f8a5..77bc57943a 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict @@ -39,7 +39,7 @@ writeInterval 10; purgeWrite 0; -writeFormat binary; +writeFormat ascii; writePrecision 8; @@ -51,7 +51,7 @@ timePrecision 6; runTimeModifiable yes; -maxCo 0.3; +maxCo 0.6; // Maximum diffusion number maxDi 10.0; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict index 3c883e6ee2..a95dd145d5 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict @@ -51,6 +51,18 @@ dictionaryReplacement kappaName none; value uniform 300; } + + heater_to_leftSolid + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappa solidThermo; + kappaName none; + thicknessLayers (1e-3); + kappaLayers (5e-4); + value uniform 300; + } + minY { type fixedValue; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvOptions b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvOptions new file mode 100644 index 0000000000..0d85b292af --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvOptions @@ -0,0 +1,73 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvOptions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +energySource +{ + type scalarCodedSource; + + active true; + selectionMode all; + + scalarCodedSourceCoeffs + { + fieldNames (h); + redirectType sourceTime; + + codeInclude + #{ + + #}; + + codeCorrect + #{ + //Pout<< "**codeCorrect**" << endl; + #}; + + codeAddSup + #{ + const Time& time = mesh().time(); + const scalarField& V = mesh_.V(); + scalarField& heSource = eqn.source(); + heSource -= 1e4*sqr(time.value())*V; // J/s/m3 + Pout << "heat Source :" << -gSum(heSource) << endl; + #}; + + codeSetValue + #{ + // Pout<< "**codeSetValue**" << endl; + #}; + + // Dummy entry. Make dependent on above to trigger recompilation + code + #{ + $codeCorrect + $codeAddSup + $codeSetValue + #}; + } + + sourceTimeCoeffs + { + // Dummy entry + } + } + + + + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSchemes index 998b93b283..d1227f9fad 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSchemes @@ -32,7 +32,7 @@ divSchemes laplacianSchemes { default none; - laplacian(alpha,h) Gauss linear limited corrected 0.333; + laplacian(alpha,h) Gauss linear corrected; } interpolationSchemes @@ -42,7 +42,7 @@ interpolationSchemes snGradSchemes { - default limited corrected 0.333; + default corrected; } fluxRequired diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution index ba8e80d5b9..ccb0d3183f 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution @@ -34,7 +34,7 @@ solvers PIMPLE { - nNonOrthogonalCorrectors 1; + nNonOrthogonalCorrectors 0; } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict index 987aeb8b43..1709662b51 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict @@ -47,6 +47,17 @@ dictionaryReplacement kappaName none; value uniform 300; } + + leftSolid_to_heater + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + Tnbr T; + kappa solidThermo; + kappaName none; + thicknessLayers (1e-3); + kappaLayers (5e-4); + value uniform 300; + } } } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSchemes index 8fc4915d8e..f4d504e5ee 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSchemes @@ -32,7 +32,7 @@ divSchemes laplacianSchemes { default none; - laplacian(alpha,h) Gauss linear limited corrected 0.333; + laplacian(alpha,h) Gauss linear corrected; } interpolationSchemes @@ -42,7 +42,7 @@ interpolationSchemes snGradSchemes { - default limited corrected 0.333; + default corrected; } fluxRequired diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution index ba8e80d5b9..ccb0d3183f 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution @@ -34,7 +34,7 @@ solvers PIMPLE { - nNonOrthogonalCorrectors 1; + nNonOrthogonalCorrectors 0; } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSchemes index d17c3fadce..88d5ad2763 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSchemes @@ -32,7 +32,7 @@ divSchemes laplacianSchemes { default none; - laplacian(alpha,h) Gauss linear limited corrected 0.333; + laplacian(alpha,h) Gauss linear corrected; } interpolationSchemes @@ -42,7 +42,7 @@ interpolationSchemes snGradSchemes { - default limited corrected 0.333; + default corrected; } fluxRequired diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution index ba8e80d5b9..ccb0d3183f 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution @@ -34,7 +34,7 @@ solvers PIMPLE { - nNonOrthogonalCorrectors 1; + nNonOrthogonalCorrectors 0; } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSchemes index 74d5623cb3..dca5ba3f8e 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSchemes @@ -40,7 +40,7 @@ divSchemes laplacianSchemes { - default Gauss linear limited corrected 0.333; + default Gauss linear corrected; } interpolationSchemes @@ -50,7 +50,7 @@ interpolationSchemes snGradSchemes { - default limited corrected 0.333; + default corrected; } fluxRequired diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution index 53fcb04628..c0d0794aac 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution @@ -20,21 +20,21 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-7; + tolerance 1e-6; relTol 0.1; } rhoFinal { $rho; - tolerance 1e-7; + tolerance 1e-6; relTol 0; } p_rgh { solver GAMG; - tolerance 1e-7; + tolerance 1e-6; relTol 0.01; smoother GaussSeidel; @@ -43,14 +43,13 @@ solvers nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - maxIter 100; } p_rghFinal { $p_rgh; - tolerance 1e-7; + tolerance 1e-6; relTol 0; } @@ -58,14 +57,13 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-7; + tolerance 1e-6; relTol 0.1; } "(U|h|k|epsilon|R)Final" { $U; - tolerance 1e-7; relTol 0; } }