Hello,
I noticed that patch
Hello,
I noticed that patchIntegrate delivers the same area magnitude vector for any patch. To calculate the area vector of the patch actually under consideration, change line 78 of patchIntegrate.C to read: Info<< " Patch area = " << sumCmptMag(mesh.boundaryMesh()[patchi].faceAreas()) << endl; which (at least for my testcase) delivers correct values. Best regards, -Thomas |
Just a note on the above "fix"
Just a note on the above "fix":
for patches which have "positive" and "negative" faceAreas, the outcome of this calculation is wrong. If, for example, the frontal area of a wing is calculated, the result will be two times as large as the correct one because the wing surface is closed; not only the visible part is taken into account, but also the "invisible" part lying downstream of the point of largest profile thickness. Anyone knows how to calculate the "visible" part generally? Best regards, -Thomas |
Thanks for the bug report. To
Thanks for the bug report. To be consistent with the usage the patch area should be output as
Info<< " Patch area = " << sum(mesh.Sf().boundaryField()[patchi]) << endl; I will push this fix into our git repository. H |
Hi,
further, patchIntegrate
Hi,
further, patchIntegrate and patchAverage are not presently parallelised: Solution: replacing sum with gSum in "integration" works nicely. n. |
Good point, I will make this c
Good point, I will make this change
Thanks H |
Henry,
you guys are doing a
Henry,
you guys are doing a great job. Thank you all! n |
Henry,
The gsum(mesh.Sf().boundaryField()[patchi]) adds up the surface normal vectors over the patch. May I suggest changing this to be magSf instead? The sum of the vectors is not really an area. What if you were integrating a quantity over a closed surface!? Regards, David |
David,
> The gsum(mesh.Sf().boundaryField()[patchi]) adds up the surface normal vectors > over the patch. Correct > May I suggest changing this to be magSf instead? We could do this additionally. > The sum of the vectors is not really an area. It is an area, it is the directed area. > What if you were integrating a quantity over a closed surface!? That is true, it may not be what you want in this case but in many cases it is what you want. Henry. |
I have pushed some enhancements to patchIntegrate to 1.5.x.
Henry |
All times are GMT -4. The time now is 11:10. |