Go to the documentation of this file.00001 if(planeMapping && targetPatchNamePresent && cut.cut())
00002 {
00003
00004
00005
00006
00007 scalarField planek(cutCells.size());
00008 scalarField planeNuTilda(cutCells.size());
00009 vectorField planeU(cutCells.size());
00010
00011 forAll(cutCells, cCellsI)
00012 {
00013 if(sgsModel.type() == "SpalartAllmaras")
00014 {
00015 planeNuTilda[cCellsI] = sgsModel.nuTilda()()[cutCells[cCellsI]];
00016 }
00017 else
00018 {
00019 planek[cCellsI] = sgsModel.k()()[cutCells[cCellsI]];
00020 }
00021 planeU[cCellsI] = U[cutCells[cCellsI]];
00022 }
00023
00024 if(sgsModel.type() == "SpalartAllmaras")
00025 {
00026 Info << "Mapping NuTilda." << endl;
00027 sgsModel.nuTilda()().boundaryField()[targetPatchNumber] ==
00028 interPatch.faceInterpolate(planeNuTilda)();
00029 }
00030 else
00031 {
00032 Info << "Mapping k." << endl;
00033 sgsModel.k()().boundaryField()[targetPatchNumber] ==
00034 interPatch.faceInterpolate(planek)();
00035 }
00036
00037 U.boundaryField()[targetPatchNumber] ==
00038 interPatch.faceInterpolate(planeU)();
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 scalar Q = sum
00067 (
00068 mesh.Sf().boundaryField()[targetPatchNumber]
00069 & U.boundaryField()[targetPatchNumber]
00070 );
00071
00072 scalar Qbar = sum
00073 (
00074 mesh.Sf().boundaryField()[targetPatchNumber] &
00075 Ubar.value()
00076 );
00077
00078 U.boundaryField()[targetPatchNumber] ==
00079 U.boundaryField()[targetPatchNumber] * (Qbar/Q);
00080
00081 Info << "Mass flux correction factor: " << (Qbar/Q) << endl;
00082
00083 phi.boundaryField()[targetPatchNumber] ==
00084 (
00085 mesh.Sf().boundaryField()[targetPatchNumber] &
00086 U.boundaryField()[targetPatchNumber]
00087 );
00088 }
00089
00090
00091
00092