diff --git a/src/finiteArea/distributed/faMeshDistributor.C b/src/finiteArea/distributed/faMeshDistributor.C index 8094d290e5..aac018d208 100644 --- a/src/finiteArea/distributed/faMeshDistributor.C +++ b/src/finiteArea/distributed/faMeshDistributor.C @@ -118,52 +118,83 @@ Foam::faMeshDistributor::faMeshDistributor Pout<< "Create from nFaces:" << srcMesh.faceLabels().size() << " to:" << tgtMesh.faceLabels().size() << endl; - vectorField oldFaceCentres(srcMesh_.areaCentres()); - vectorField newFaceCentres(tgtMesh_.areaCentres()); - - // volume: cells, area: faces - distMap_.distributeCellData(oldFaceCentres); - vectorField diff(newFaceCentres - oldFaceCentres); - - Pout<< "diff faces: " << diff << endl; - - vectorField oldEdgeCentres - ( - faMeshTools::flattenEdgeField(srcMesh_.edgeCentres()) - ); - vectorField newEdgeCentres - ( - faMeshTools::flattenEdgeField(tgtMesh_.edgeCentres()) - ); - - Pout<< "distributed edges: " << oldEdgeCentres.size() << " from " - << srcMesh.nEdges() << " to " << tgtMesh.nEdges() << endl; - - // volume: faces, area: edges - distMap_.distributeFaceData(oldEdgeCentres); - - diff = (newEdgeCentres - oldEdgeCentres); - - Pout<< "diff edges: " << diff << endl; - - Info<< "Patch edge maps" << endl; - forAll(patchEdgeMaps_, patchi) + // Check face centres { - if (patchEdgeMaps_.set(patchi)) + vectorField oldFaceCentres(srcMesh_.areaCentres()); + vectorField newFaceCentres(tgtMesh_.areaCentres()); + + // volume: cells, area: faces + distMap_.distributeCellData(oldFaceCentres); + + vectorField diff(newFaceCentres - oldFaceCentres); + + if (!diff.empty() && !diff.uniform()) { - Pout<< "patch " << patchi << " : " - << patchEdgeMaps_[patchi].info() << endl; + forAll(oldFaceCentres, facei) + { + if (oldFaceCentres[facei] != newFaceCentres[facei]) + { + Pout<< "face: " << facei + << ' ' << oldFaceCentres[facei] + << " vs " << newFaceCentres[facei] + << endl; + } + } } } - Info<< nl << "Detailed patch maps" << endl; - - forAll(patchEdgeMaps_, patchi) + // Check edge centres { - if (patchEdgeMaps_.set(patchi)) + vectorField oldEdgeCentres + ( + faMeshTools::flattenEdgeField(srcMesh_.edgeCentres()) + ); + vectorField newEdgeCentres + ( + faMeshTools::flattenEdgeField(tgtMesh_.edgeCentres()) + ); + + Pout<< "distributed edges: " << oldEdgeCentres.size() << " from " + << srcMesh.nEdges() << " to " << tgtMesh.nEdges() << endl; + + // volume: faces, area: edges + distMap_.distributeFaceData(oldEdgeCentres); + + vectorField diff(newEdgeCentres - oldEdgeCentres); + + if (!diff.empty() && !diff.uniform()) { - Info<< "patch " << patchi << " : " - << patchEdgeMaps_[patchi] << endl; + forAll(oldEdgeCentres, edgei) + { + if (oldEdgeCentres[edgei] != newEdgeCentres[edgei]) + { + Pout<< "edge: " << edgei + << ' ' << oldEdgeCentres[edgei] + << " vs " << newEdgeCentres[edgei] + << endl; + } + } + } + + Info<< "Patch edge maps" << endl; + forAll(patchEdgeMaps_, patchi) + { + if (patchEdgeMaps_.set(patchi)) + { + Pout<< "patch " << patchi << " : " + << patchEdgeMaps_[patchi].info() << endl; + } + } + + Info<< nl << "Detailed patch maps" << endl; + + forAll(patchEdgeMaps_, patchi) + { + if (patchEdgeMaps_.set(patchi)) + { + Info<< "patch " << patchi << " : " + << patchEdgeMaps_[patchi] << endl; + } } } } diff --git a/src/finiteArea/faMesh/faMesh.C b/src/finiteArea/faMesh/faMesh.C index eeda85f1d5..5703a8ad3d 100644 --- a/src/finiteArea/faMesh/faMesh.C +++ b/src/finiteArea/faMesh/faMesh.C @@ -37,6 +37,7 @@ License #include "areaFields.H" #include "edgeFields.H" #include "faMeshLduAddressing.H" +#include "processorFaPatch.H" #include "wedgeFaPatch.H" #include "faPatchData.H" @@ -283,6 +284,13 @@ bool Foam::faMesh::init(const bool doInit) // Calculate the geometry for the patches (transformation tensors etc.) boundary_.calcGeometry(); + // Ensure area information is properly synchronised + if (Pstream::parRun()) + { + const_cast(areaCentres()).boundaryFieldRef() + .evaluateCoupled(); + } + return false; } diff --git a/src/finiteArea/faMesh/faMeshDemandDrivenData.C b/src/finiteArea/faMesh/faMeshDemandDrivenData.C index fe9016edee..e23ed0d592 100644 --- a/src/finiteArea/faMesh/faMeshDemandDrivenData.C +++ b/src/finiteArea/faMesh/faMeshDemandDrivenData.C @@ -31,12 +31,12 @@ License #include "areaFields.H" #include "edgeFields.H" #include "fac.H" -#include "processorFaPatch.H" -#include "wedgeFaPatch.H" #include "cartesianCS.H" #include "scalarMatrices.H" +#include "processorFaPatch.H" #include "processorFaPatchFields.H" #include "emptyFaPatchFields.H" +#include "wedgeFaPatch.H" #include "triPointRef.H" // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * // diff --git a/src/finiteArea/faMesh/faMeshTools/faMeshToolsTemplates.C b/src/finiteArea/faMesh/faMeshTools/faMeshToolsTemplates.C index 74d482a1d9..f57c72ccc8 100644 --- a/src/finiteArea/faMesh/faMeshTools/faMeshToolsTemplates.C +++ b/src/finiteArea/faMesh/faMeshTools/faMeshToolsTemplates.C @@ -42,35 +42,35 @@ Foam::tmp> Foam::faMeshTools::flattenEdgeField auto& result = tresult.ref(); // Internal field - result.slice(0, fld.size()) = fld; + result.slice(0, fld.size()) = fld.primitiveField(); - if (primitiveOrdering) + label start = fld.size(); + + // Boundary fields + forAll(fld.boundaryField(), patchi) { - // Boundary field in primitive patch order + const labelList& edgeLabels = mesh.boundary()[patchi].edgeLabels(); + const label len = edgeLabels.size(); + const auto& pfld = fld.boundaryField()[patchi]; - forAll(fld.boundaryField(), patchi) + // Only assign when field size matches underlying patch size + // ie, skip 'empty' patches etc + + if (len == pfld.size()) { - UIndirectList - ( - result, - mesh.boundary()[patchi].edgeLabels() - ) = fld.boundaryField()[patchi]; + if (primitiveOrdering) + { + // In primitive patch order + UIndirectList(result, edgeLabels) = pfld; + } + else + { + // In sub-list (slice) order + result.slice(start, len) = pfld; + } } - } - else - { - // Boundary field in sub-list (slice) order - label start = fld.size(); - - forAll(fld.boundaryField(), patchi) - { - const label len = mesh.boundary()[patchi].size(); - - result.slice(start, len) = fld.boundaryField()[patchi]; - - start += len; - } + start += len; } return tresult; diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/U b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/U new file mode 100644 index 0000000000..820885bc36 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/U @@ -0,0 +1,98 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Ux 0; +Uy 0; +Uz 0; +CON 100; + +Uinlet uniform ($Ux $Uy $Uz); + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + "(inlet|outlet)" + { + type fixedValue; + value $Uinlet; + } + + "(side|back)" + { + //type zeroGradient; + type fixedValue; + value $Uinlet; + } + + film + { + type velocityFilmShell; + active true; + U U; + pRef 1e5; + T0 313.15;; + deltaWet 5e-5; // dry vs wet + + thermo + { + H2O; + } + + turbulence laminar; + + laminarCoeffs + { + shearStress simple; + friction quadraticProfile; // + //n 0.03;// Manning number + Cf 0; //1e-18;//0.001;//0.9; + // Gas/liquid/surface friction for DarcyWeisbach 0.0 + // the friction is with the wall + } + + injectionModels (); + + forces (perturbedTemperatureDependentContactAngle); + + perturbedTemperatureDependentContactAngleCoeffs + { + Ccf 0.4; + theta constant 0; + distribution + { + type normal; + normalDistribution + { + minValue $CON; + maxValue $CON; + mu $CON; + sigma 100; + } + } + } + + region film; + liquidFilmModel kinematicThinFilm; + value uniform (0 0 0); + } + + #includeEtc "caseDicts/setConstraintTypes" +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/Uf_film b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/Uf_film new file mode 100644 index 0000000000..9623f879ea --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/Uf_film @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaVectorField; + location "0"; + object Uf_film; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Uin 0.309; +// To fix original position, no rotate, gravity is modified + +// alphaPlateFix 90; +// Uin_y #eval{ - $Uin*sin(degToRad($alphaPlateFix)) }; +// Uin_z #eval{ $Uin*cos(degToRad($alphaPlateFix)) }; + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value uniform (0 #eval{ -$Uin } 0); + } + + outlet + { + type zeroGradient; + } + + side + { + //type fixedValue; + //value $internalField; + type slip; + value $internalField; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/hf_film b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/hf_film new file mode 100644 index 0000000000..c370c2738d --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/hf_film @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + location "0"; + object h_film; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 1e-3; + } + + outlet + { + type zeroGradient; + } + + side + { + type inletOutlet; + inletValue $internalField; + value $internalField; + phi phi2s_film; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/p b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/p new file mode 100644 index 0000000000..1b87958828 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/0.orig/p @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / 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 +{ + inlet + { + type zeroGradient; + } + + "(outlet|side|back)" + { + type fixedValue; + value uniform 0; + } + + film + { + type zeroGradient; + } + + #includeEtc "caseDicts/setConstraintTypes" +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allclean b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allclean new file mode 100755 index 0000000000..fb1f384730 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allclean @@ -0,0 +1,8 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +cleanCase0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allrun-parallel b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allrun-parallel new file mode 100755 index 0000000000..0665508cae --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allrun-parallel @@ -0,0 +1,33 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +restore0Dir + +runApplication blockMesh + +decompDict="-decomposeParDict system/decomposeParDict.4" + +if false +then + # Simple preparation + + runApplication makeFaMesh + + runApplication decomposePar + +else + + # Additional steps (to exercise some functionality) + + runParallel $decompDict -s decompose redistributePar -decompose + + runParallel $decompDict makeFaMesh + + runParallel -s redistribute redistributePar -overwrite +fi + +runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/g b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/g new file mode 100644 index 0000000000..48bd420caa --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/g @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +alpha 5; +alphax 0; + +dimensions [0 1 -2 0 0 0 0]; + +value #eval +{ + -9.81 * vector + ( + sin(degToRad($alphax)), + sin(degToRad($alpha)), + cos(degToRad($alpha)) + ) +}; + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/transportProperties b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/transportProperties new file mode 100644 index 0000000000..df249b8030 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/transportProperties @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 1e-5; + +rhoInf 1.2; + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/turbulenceProperties new file mode 100644 index 0000000000..e7e8cff185 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/constant/turbulenceProperties @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/blockMeshDict b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/blockMeshDict new file mode 100644 index 0000000000..59f5bf9870 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/blockMeshDict @@ -0,0 +1,118 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +xside 0.05; +xcore 0.51; +ymax 1.22; +zmin -0.01; + +cellWidth 0.005; +//cellWidth 0.01; + +nx #eval{ round($xside / $cellWidth) }; +nxin #eval{ round($xcore / $cellWidth) }; +ny #eval{ round($ymax / $cellWidth) }; +nz 1; + +vertices +( + // side + (0 0 $zmin) + ($xside 0 $zmin) + ($xside $ymax $zmin) + (0 $ymax $zmin) + (0 0 0) + ($xside 0 0) + ($xside $ymax 0) + (0 $ymax 0) + + // central core + (#eval{$xcore + $xside} 0 $zmin) + (#eval{$xcore + $xside} $ymax $zmin) + (#eval{$xcore + $xside} 0 0) + (#eval{$xcore + $xside} $ymax 0) + + // side + (#eval{$xcore + 2*$xside} 0 $zmin) + (#eval{$xcore + 2*$xside} $ymax $zmin) + (#eval{$xcore + 2*$xside} 0 0) + (#eval{$xcore + 2*$xside} $ymax 0) +); + +blocks +( + hex (0 1 2 3 4 5 6 7 ) ($nx $ny $nz) grading (1 1 1) + hex (1 8 9 2 5 10 11 6 ) ($nxin $ny $nz) grading (1 1 1) + hex (8 12 13 9 10 14 15 11) ($nx $ny $nz) grading (1 1 1) +); + +boundary +( + inlet + { + type patch; + faces + ( + (2 9 11 6) + ); + } + outlet + { + type patch; + faces + ( + (0 1 5 4) + (1 8 10 5) + (8 12 14 10) + ); + } + side + { + type patch; + faces + ( + (0 3 7 4) + (12 14 15 13) + (3 2 6 7) + (9 13 15 11) + ); + } + back + { + type patch; + faces + ( + (4 5 6 7) + (5 10 11 6) + (10 14 15 11) + ); + } + film + { + type patch; + faces + ( + (0 1 2 3) + (1 8 9 2) + (8 12 13 9) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/controlDict b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/controlDict new file mode 100644 index 0000000000..59eccfd45d --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/controlDict @@ -0,0 +1,69 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//libs (regionFaModels); + +application pimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 0.0005; + +writeControl timeStep; + +writeInterval 400; + +purgeWrite 0; + +writeFormat binary; // ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +maxCo 1; + +maxDeltaT 0.1; + +functions +{ + #include "sampling" + + residuals + { + type solverInfo; + libs (utilityFunctionObjects); + fields (".*"); + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict new file mode 100644 index 0000000000..a7c9eb7c17 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 12; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.16 b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.16 new file mode 100644 index 0000000000..54306fe75b --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.16 @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 16; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.4 b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.4 new file mode 100644 index 0000000000..6f9ac03558 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.4 @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.8 b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.8 new file mode 100644 index 0000000000..1bb15e18ba --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/decomposeParDict.8 @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faMeshDefinition b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faMeshDefinition new file mode 100644 index 0000000000..15a6a4d934 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faMeshDefinition @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant/faMesh"; + object faMeshDefinition; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +polyMeshPatches ( film ); + +boundary +{ + inlet + { + type patch; + neighbourPolyPatch inlet; + } + + outlet + { + type patch; + neighbourPolyPatch outlet; + } + + side + { + type patch; + neighbourPolyPatch side; + } +} + + +// ************************************************************************** // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSchemes b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSchemes new file mode 100644 index 0000000000..59f1d14b80 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSchemes @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object faSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phif_film,hf_film) Gauss upwind;//Gamma 0.5; + div(phi2s_film,Uf_film) Gauss upwind; +} + +laplacianSchemes +{ + default none; + laplacian(hf_film) Gauss linear limited 0.33; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default limited 0.33; +} + +fluxRequired +{ + hf_film true; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSolution b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSolution new file mode 100644 index 0000000000..9246480c76 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/faSolution @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object faSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + Uf_film + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-08; + relTol 0.0; + } + + hf_film + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-08; + relTol 0.0; + } +} + +PIMPLE +{ + momentumPredictor true; + nOuterCorr 4; + nCorr 1; + nNonOrthCorr 0; + + nFilmCorr 1; +} + +relaxationFactors +{ + hf_Film 0.9; + Uf_Film 0.9; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/fvSchemes b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/fvSchemes new file mode 100644 index 0000000000..9cdcb9b788 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/fvSchemes @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / 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; + grad(p) Gauss linear; + grad(U) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linearUpwind grad(U); + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; + interpolate(HbyA) linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/fvSolution b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/fvSolution new file mode 100644 index 0000000000..ddcbde0128 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/fvSolution @@ -0,0 +1,87 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2206 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "pcorr.*" + { + solver GAMG; + smoother GaussSeidel; + cacheAgglomeration no; + + tolerance 0.02; + relTol 0; + } + + p + { + $pcorr; + tolerance 1e-06; + relTol 0.01; + } + + pFinal + { + $p; + tolerance 1e-06; + relTol 0; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-05; + relTol 0.01; + } + + UFinal + { + $U; + tolerance 1e-06; + relTol 0; + } + + cellMotionUx + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0; + } +} + +PIMPLE +{ + correctPhi no; + nOuterCorrectors 1; + nCorrectors 1; + nNonOrthogonalCorrectors 0; + + pRefCell 0; + pRefValue 0; +} + +relaxationFactors +{ + equations + { + "U.*" 1; + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/sampling b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/sampling new file mode 100644 index 0000000000..8705a7f3a7 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/laminar/filmPanel0/system/sampling @@ -0,0 +1,73 @@ +// -*- C++ -*- + +probes +{ + type probes; + libs (sampling); + + writeControl timeStep; + writeInterval 2; + probeLocations + ( + (0.305 0.02 -0.01) + (0.305 0.27 -0.01) + (0.305 0.52 -0.01) + (0.305 0.77 -0.01) + (0.305 1.02 -0.01) + (0.305 1.21 -0.01) + ); + fixedLocations false; + fields + ( + p U + ); +} + +patch +{ + enabled false; + type surfaces; + libs (sampling); + + surfaceFormat boundaryData; + writeControl adjustableRunTime; + writeInterval 0.1; + interpolationScheme cell; + + surfaceFormat vtk; + fields (U p hf_film ); // ( alpha.water p U k omega); + surfaces + { + film + { + type patch; + patches ("film.*"); + interpolate true; + } + } +} + + +area +{ + type areaWrite; + libs (utilityFunctionObjects); + + // Write at same frequency as fields + writeControl outputTime; + writeInterval 1; + + fields (U p hf_film ); + + surfaceFormat ensight; + formatOptions + { + ensight + { + format binary; + } + } +} + + +// ************************************************************************* //