Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Integration on different expressions of the same surface giving different results
Posted 16 giu 2014, 18:21 GMT-4 Fluid & Heat, Computational Fluid Dynamics (CFD), Geometry, Results & Visualization 3 Replies
Please login with a confirmed email address before reporting spam
Hello,
I am hoping that someone can help me with a problem I am encountering in attempting to measure mass flux in my fluid dynamics simulation. I am getting very strange and different results when integrating on different data sets in my results.
I am trying to measure the mass flux on an arbitrary surface in the interior of my simulation box. I thought that an integral on a parameterized surface would be the best way to do this. I realize that I can redefine the geometry in order to create a new boundary, but I'd prefer to do this in post processing so that I can play around with using different surfaces without recalculating each time.
Integrating on a rectangular parameterized surface in the area of interest gave a result that is orders of magnitude to large. The boundary condition for my inlet is a mass flow rate of -1.07669e-9[kg/s] and integrating v*spf.rho on my surface gave -138.2 kg/s. (Note that I could not figure out how to access the normal to the parameterized surface, but since mine is perpendicular to the y-axis, I just used the y-component of the velocity)
In order to test that I was using the parameterized surface correctly, I decided to use my inlet as a test case, since there I know exactly what the flow should be and I have a surface there already which I can integrate over. Integrating over the inlet surface gives my boundary condition value for mass flux, but creating a parameterized surface in the exact same place gives 1076.3 kg/s, about 10^12 times too big. The factor of 10^12 seems like a units issue, since my geometry is defined in μm and I’m integrating over an area. How do I make this go away? The remaining small discrepancy in value is probably because I used u*spf.rho as my integrand despite the fact that the surface is not quite normal to the x-axis. Is there a way to get the variables for the normal to a parameterized surface? ps1nx, ps1ny, and ps1nz in analogy to a cut plane do not work.
I also tried using a cut plane defined across the inlet. I thought that this should give the same result as the plane only intersects the geometry on that boundary. I defined a general cut plane using 3 points on the inlet and then integrated with integrand (cpl4nx*u+cpl4ny*v+cpl4nz*w)*spf.rho but I got 9.28e-16 kg/s instead of the boundary value.
One more thing I tried was a cut plane in the interior with Booleans in the integrand to restrict the surface. Integration on an xz-plane through my geometry with integrand (cpl1nx*u+cpl1ny*v+cpl1nz*w)*spf.rho gives a value of 2.47e-16 kg/s, again way too low, and adding in Boolean restrictions so that the integrand is (59<x)*(-45<z)*(cpl1nx*u+cpl1ny*v+cpl1nz*w)*spf.rho*(x<84)*(z<5) gives a value of 0! It seems that the (59<x) is the one causing the 0 for some reason since (-45<z)*(cpl1nx*u+cpl1ny*v+cpl1nz*w)*spf.rho*(x<84)*(z<5) gives the same value as with no Booleans, but that just means that the Booleans aren’t working at all. I am now thoroughly confused and would appreciate any help on where these issues are coming from.
Thank you!
Geoffrey
I am hoping that someone can help me with a problem I am encountering in attempting to measure mass flux in my fluid dynamics simulation. I am getting very strange and different results when integrating on different data sets in my results.
I am trying to measure the mass flux on an arbitrary surface in the interior of my simulation box. I thought that an integral on a parameterized surface would be the best way to do this. I realize that I can redefine the geometry in order to create a new boundary, but I'd prefer to do this in post processing so that I can play around with using different surfaces without recalculating each time.
Integrating on a rectangular parameterized surface in the area of interest gave a result that is orders of magnitude to large. The boundary condition for my inlet is a mass flow rate of -1.07669e-9[kg/s] and integrating v*spf.rho on my surface gave -138.2 kg/s. (Note that I could not figure out how to access the normal to the parameterized surface, but since mine is perpendicular to the y-axis, I just used the y-component of the velocity)
In order to test that I was using the parameterized surface correctly, I decided to use my inlet as a test case, since there I know exactly what the flow should be and I have a surface there already which I can integrate over. Integrating over the inlet surface gives my boundary condition value for mass flux, but creating a parameterized surface in the exact same place gives 1076.3 kg/s, about 10^12 times too big. The factor of 10^12 seems like a units issue, since my geometry is defined in μm and I’m integrating over an area. How do I make this go away? The remaining small discrepancy in value is probably because I used u*spf.rho as my integrand despite the fact that the surface is not quite normal to the x-axis. Is there a way to get the variables for the normal to a parameterized surface? ps1nx, ps1ny, and ps1nz in analogy to a cut plane do not work.
I also tried using a cut plane defined across the inlet. I thought that this should give the same result as the plane only intersects the geometry on that boundary. I defined a general cut plane using 3 points on the inlet and then integrated with integrand (cpl4nx*u+cpl4ny*v+cpl4nz*w)*spf.rho but I got 9.28e-16 kg/s instead of the boundary value.
One more thing I tried was a cut plane in the interior with Booleans in the integrand to restrict the surface. Integration on an xz-plane through my geometry with integrand (cpl1nx*u+cpl1ny*v+cpl1nz*w)*spf.rho gives a value of 2.47e-16 kg/s, again way too low, and adding in Boolean restrictions so that the integrand is (59<x)*(-45<z)*(cpl1nx*u+cpl1ny*v+cpl1nz*w)*spf.rho*(x<84)*(z<5) gives a value of 0! It seems that the (59<x) is the one causing the 0 for some reason since (-45<z)*(cpl1nx*u+cpl1ny*v+cpl1nz*w)*spf.rho*(x<84)*(z<5) gives the same value as with no Booleans, but that just means that the Booleans aren’t working at all. I am now thoroughly confused and would appreciate any help on where these issues are coming from.
Thank you!
Geoffrey
3 Replies Last Post 27 giu 2014, 17:51 GMT-4