I am trying to find collection efficiency at the wall in OpenFoam, but could not do it as I am getting error. I have written it as:

volScalarField U_x = U.component(vector::X);

volScalarField U_y = U.component(vector::Y);

volScalarField U_z = U.component(vector::Z);

label patchLabel = mesh.boundaryMesh().findPatchID("wall");

scalarField& pUx = U_x.boundaryField()[patchLabel];

scalarField normal_x=mesh.Sf().boundaryField()[patchLabel].component(0)/mesh.magSf();

scalarField& pUy = U_y.boundaryField()[patchLabel];

scalarField normal_y=mesh.Sf().boundaryField()[patchLabel].component(1)/mesh.magSf();

scalarField& pUz = U_z.boundaryField()[patchLabel];

scalarField normal_z=mesh.Sf().boundaryField()[patchLabel].component(2)/mesh.magSf();

scalarField CE = (pUx*normal_x + pUy*normal_y + pUz*normal_z)/(mag(U_Air) * mag(rho_Air));

scalarField betaCE

(

IOobject

(

"betaCE",

runTime.timeName(),

mesh,

IOobject::NO_READ,

IOobject::AUTO_WRITE

),

CE

);

Error:

createFields.H:138:5: error: no matching function for call to ‘Foam::Field::Field(Foam::IOobject, Foam::scalarField&)’

);

Can any one guide me to find dot product of velocity and normal at wall in openfoam. Thanks a lot.

More Bidesh Sengupta's questions See All
Similar questions and discussions