Problem with fvc::domainIntegrate
2 Attachment(s)
Dear Foamers,
I have encountered a problem with the domainIntegrate function. I actually don't understand why OpenFOAM gets this result and would be happy about suggestions. Ok, here is the Problem: I have created 2 geometries with blockMesh. One is a simple square as a reference and the other one is the same square with a hole cut out and a bump merged into it. (see attached files) Clearly the domain with the bump should have a larger volume, but the result due to domainIntegrate is exactly the same. I am using domainIntegrate that way: Code:
Info<< "wavesize= " << scale_spaceunit*fvc::domainIntegrate(pos(u-(1e-12))) << endl; The result is for both geometries Quote:
Am I misunderstanding the purpose of domainIntegrate? Is volumeIntegrate working better for my purpose? Are there any other functions? Oh btw. I am using OpenFOAM 2.0.0 I appreciate your time seb |
Try
Code:
sum(mesh.V().field()) Code:
domainIntegrate(mesh.V().field()) |
Thank you for the hint.
I am not sure what exactly Quote:
Code:
pos(u-(1e-12)) Also, if both meshes have the same number of cells, the volumes should still be different since I am looking for Volume and not number of cells... What I am looking for is something like this pseude code: If u>0: calculate volume of cell sum(volumes of all cells where u>0) greets, seb |
Code:
mesh.V().field |
Thanks for the hints,
I have realised the problem is actually not in the integration or the volume as such, but seems to be a more general problem. I guess I will just open a new thread, as the topic doesn't really fit anymore... |
All times are GMT -4. The time now is 16:02. |