|
[Sponsors] |
September 24, 2008, 06:08 |
Hello,
I noticed that patch
|
#1 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
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 |
|
September 24, 2008, 06:31 |
Just a note on the above "fix"
|
#2 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
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 |
|
September 24, 2008, 06:41 |
Thanks for the bug report. To
|
#3 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
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 |
|
October 27, 2008, 12:14 |
Hi,
further, patchIntegrate
|
#4 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
Hi,
further, patchIntegrate and patchAverage are not presently parallelised: Solution: replacing sum with gSum in "integration" works nicely. n. |
|
October 27, 2008, 12:41 |
Good point, I will make this c
|
#5 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Good point, I will make this change
Thanks H |
|
October 27, 2008, 13:14 |
Henry,
you guys are doing a
|
#6 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
Henry,
you guys are doing a great job. Thank you all! n |
|
May 28, 2009, 13:06 |
|
#7 |
Member
David P. Schmidt
Join Date: Mar 2009
Posts: 72
Rep Power: 17 |
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 |
|
May 29, 2009, 03:56 |
|
#8 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
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. |
|
May 29, 2009, 05:36 |
|
#9 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
I have pushed some enhancements to patchIntegrate to 1.5.x.
Henry |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CoupledFvScalarMatrix in OF15 | fisher | OpenFOAM Running, Solving & CFD | 9 | May 27, 2020 10:40 |
Forces in OF15 | richard | OpenFOAM Running, Solving & CFD | 180 | July 9, 2018 11:54 |
Fan type BC in OF15 | hsieh | OpenFOAM Running, Solving & CFD | 31 | July 30, 2015 13:22 |
Is it a bug in Userbs Guide for OF15 | kai | OpenFOAM Bugs | 1 | October 2, 2008 09:07 |
Bug or a feature of OF15 | rafal | OpenFOAM Bugs | 5 | July 25, 2008 06:25 |