1 // Search for wall patches faces and store normals
6 vector wallNormal(vector::zero);
8 const fvPatchList& patches = mesh.boundary();
10 forAll(patches, patchi)
12 const fvPatch& currPatch = patches[patchi];
14 if (isA<wallFvPatch>(currPatch))
16 const vectorField nf(currPatch.nf());
24 wallNormal = -nf[facei];
28 else if (nWallFaces == 2)
30 const vector wallNormal2 = -nf[facei];
32 //- Check that wall faces are parallel
35 mag(wallNormal & wallNormal2) > 1.01
36 || mag(wallNormal & wallNormal2) < 0.99
39 FatalErrorIn(args.executable())
40 << "wall faces are not parallel for patches "
41 << patches[patchId].name() << " and "
42 << currPatch.name() << nl
48 FatalErrorIn(args.executable()) << "number of wall faces > 2"
49 << nl << exit(FatalError);
57 FatalErrorIn(args.executable()) << "No wall patches identified"
62 Info<< "Generating wall data for patch: " << patches[patchId].name()
66 // store local id of near-walll cell to process
67 label cellId = patches[patchId].faceCells()[faceId];
69 // create position array for graph generation
73 & (mesh.C().internalField() - mesh.C().boundaryField()[patchId][faceId])
76 Info<< " Height to first cell centre y0 = " << y[cellId] << endl;