Skip to content

wall heat flux calculation #636

Answered by yslan
amat000 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

You can follow the velRecycling plugin that compute the velocity flux:

$$\int_{inlet} \vec{v}\cdot\vec{n}$$

// rescale
getBCFluxKernel(mesh->Nelements,
bID,
nrs->fieldOffset,
o_wrk,
mesh->o_vmapM,
mesh->o_EToB,
mesh->o_sgeo,
o_area,
o_flux);
const int NfpTotal = mesh->Nelements * mesh->Nfaces * mesh->Nfp;
sumReductionKernel(NfpTotal, o_area, o_flux, o_tmp1, o_tmp2);
o_tmp1.copyTo(tmp1);
o_tmp2.copyTo(tmp2);
dfloat sbuf[2] = {0, 0};
for (int n = 0; n < Nblock; n++) {
sbuf[0] += tmp1[n];
sbuf[1] += tmp2[n];
}
MP…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by amat000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants