diff --git a/src/sampling/include/buildPatch.H b/src/sampling/include/buildPatch.H deleted file mode 100644 index e355d794905e9934b93e7b68230e075f2233d7b2..0000000000000000000000000000000000000000 --- a/src/sampling/include/buildPatch.H +++ /dev/null @@ -1,82 +0,0 @@ - -IOdictionary planeToPatchDict -( - IOobject - ( - "planeToPatchDict", - runTime.system(), - runTime, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) -); - -Switch planeMapping -( - planeToPatchDict.lookup("mappingPlane") -); - -Info << "Constructing planePatch" << endl; -cuttingPlane cut(plane(planeToPatchDict), mesh); - -primitiveFacePatch planePatch -( - cut.faces(), - cut.points() -); - -Info << "Finding target patch" << endl; - -word toPatchName -( - planeToPatchDict.lookup("targetPatchName") -); - -const fvPatchList& patches = mesh.boundary(); -bool targetPatchNamePresent(false); -label targetPatchNumber = -1; - -forAll(patches, patchI) -{ - if (patches[patchI].name() == toPatchName) - { - targetPatchNamePresent = true; - targetPatchNumber = patchI; - } -} - -const labelList& cutCells(cut.cells()); - -if (!targetPatchNamePresent) -{ - targetPatchNumber = 1; - Serr<< "Target patch not present. " << endl; -} -else -{ - Serr<< "Target patch name: " << patches[targetPatchNumber].name() << endl; -} - -patchToPatchInterpolation interPatch -( - planePatch, - patches[targetPatchNumber].patch() -); - - -PrimitivePatchInterpolation -< - PrimitivePatch<face, List, const pointField&> -> planePatchInter -( - planePatch -); - - -PrimitivePatchInterpolation -< - PrimitivePatch<face, List, const pointField&> -> toPatchInter -( - patches[targetPatchNumber].patch() -); diff --git a/src/sampling/include/mapPatch.H b/src/sampling/include/mapPatch.H deleted file mode 100644 index 371317a0ab2a5747a95817610ee5110e48de3556..0000000000000000000000000000000000000000 --- a/src/sampling/include/mapPatch.H +++ /dev/null @@ -1,90 +0,0 @@ - if (planeMapping && targetPatchNamePresent && cut.cut()) - { - //Map variables U, phi & k - //Info<< typeInfo("isoLESmodel") << endl; - //Info<< "SGS model" << sgsModel.type() << endl; - - scalarField planek(cutCells.size()); - scalarField planeNuTilda(cutCells.size()); - vectorField planeU(cutCells.size()); - - forAll(cutCells, cCellsI) - { - if (sgsModel.type() == "SpalartAllmaras") - { - planeNuTilda[cCellsI] = sgsModel.nuTilda()()[cutCells[cCellsI]]; - } - else - { - planek[cCellsI] = sgsModel.k()()[cutCells[cCellsI]]; - } - planeU[cCellsI] = U[cutCells[cCellsI]]; - } - - if (sgsModel.type() == "SpalartAllmaras") - { - Info<< "Mapping NuTilda." << endl; - sgsModel.nuTilda()().boundaryField()[targetPatchNumber] == - interPatch.faceInterpolate(planeNuTilda)(); - } - else - { - Info<< "Mapping k." << endl; - sgsModel.k()().boundaryField()[targetPatchNumber] == - interPatch.faceInterpolate(planek)(); - } - - U.boundaryField()[targetPatchNumber] == - interPatch.faceInterpolate(planeU)(); - -/* sgsModel.k()().boundaryField()[targetPatchNumber] == - toPatchInter.pointToFaceInterpolate - ( - interPatch.pointInterpolate - ( - planePatchInter.faceToPointInterpolate - ( - planek - ) - ) - ); - - U.boundaryField()[targetPatchNumber] == - toPatchInter.pointToFaceInterpolate - ( - interPatch.pointInterpolate - ( - planePatchInter.faceToPointInterpolate - ( - planeU - ) - ) - ); - -*/ - - scalar Q = sum - ( - mesh.Sf().boundaryField()[targetPatchNumber] - & U.boundaryField()[targetPatchNumber] - ); - - scalar Qbar = sum - ( - mesh.Sf().boundaryField()[targetPatchNumber] & - Ubar.value() - ); - - U.boundaryField()[targetPatchNumber] == - U.boundaryField()[targetPatchNumber] * (Qbar/Q); - - Info<< "Mass flux correction factor: " << (Qbar/Q) << endl; - - phi.boundaryField()[targetPatchNumber] == - ( - mesh.Sf().boundaryField()[targetPatchNumber] & - U.boundaryField()[targetPatchNumber] - ); - } - -