||October 5, 2010 17:39
Computing wall shear stress with a momentum flux balance
Good day foamers!
I would like to compute the wall shear stress doing a momentum flux balance on individual cells touching a wall patch. I know there is the utility called "wallShearStress" but I want to make sure that both methods gives about the same values.
My idea was to loop over cells individual faces the momentum fluxes and add them up and eventually substract the pressure gradient. Here's what I tried to begin with:
surfaceVectorField momentumFlux = fvc::interpolate(U)*(fvc::interpolate(U) & mesh.Sf()); //fluxes at cell faces
const surfaceVectorField::GeometricBoundaryField& patchMomentumFlux = momentumFlux.boundaryField();
const labelList& faceCells = mesh.boundary()[patchi].faceCells(); //getting near wall cells
forAll(faceCells,celli) //looping over near wall cells
vector sumMomentumFluxCellI = vector::zero;
sumMomentumFluxCellI+=patchMomentumFlux[patchi].internalField()[celli][cellfacei]; //this doesnt work
Someone has any better ideas?