
[Sponsors] 
January 9, 2012, 12:06 
Problem with fvc::domainIntegrate

#1  
Member
Join Date: Aug 2011
Posts: 33
Rep Power: 8 
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(1e12))) << 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 

January 9, 2012, 13:40 

#2 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 735
Rep Power: 21 
Try
Code:
sum(mesh.V().field()) Code:
domainIntegrate(mesh.V().field()) 

January 9, 2012, 13:55 

#3  
Member
Join Date: Aug 2011
Posts: 33
Rep Power: 8 
Thank you for the hint.
I am not sure what exactly Quote:
Code:
pos(u(1e12)) 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 

January 9, 2012, 13:59 

#4 
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 735
Rep Power: 21 
Code:
mesh.V().field 

January 14, 2012, 07:21 

#5 
Member
Join Date: Aug 2011
Posts: 33
Rep Power: 8 
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... 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
UDF compiling problem  Wouter  Fluent UDF and Scheme Programming  6  June 6, 2012 04:43 
Gambit  meshing over airfoil wrapping (?) problem  JFDC  FLUENT  1  July 11, 2011 05:59 
natural convection problem for a CHT problem  SeHee  CFX  2  June 10, 2007 06:29 
Adiabatic and Rotating wall (Convection problem)  ParodDav  CFX  5  April 29, 2007 19:13 
Is this problem well posed?  Thomas P. Abraham  Main CFD Forum  5  September 8, 1999 14:52 