|
[Sponsors] |
Average over a sphere in uniform cartesian grid |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 16, 2014, 07:06 |
Average over a sphere in uniform cartesian grid
|
#1 |
New Member
Kun Zhou
Join Date: Dec 2014
Posts: 2
Rep Power: 0 |
Hi,
Anyone has good idea how to calculate the average value of a scalar on a sphere (all points on a sphere surface) , the scalar field is discretized with a uniform Cartesian grid. I have Googled all day long, but didn't get any good idea. 3D interpolation to get quadrature points on the sphere, and then integration is my last plan. Obviously, it is not convenient and expensive. I have huge data and large number of average to calculate. Does anyone has a good idea to use only the index of the grid with sort of weight to get the final average value? Thanks. Kun |
|
December 16, 2014, 15:46 |
|
#2 |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
Intersection of a sphere with Cartesian grid lines will lead to many points onto which you can do 1D interpolation to the surface of the sphere. Those intersection points on the sphere can be assembled into a triangular tessellation of the sphere surface. With scalar values at each vertex of the triangular tessellation, you can integrate over each triangle and add them all up. This is very similar to how cut-cell Cartesian meshes are built. It is messy.
3D interpolation to spherical quadrature points will likely be easier to code because you won't have the tessellation book keeping to do, but may not be as accurate unless your scalar field is very smooth or you use many quadrature points. I'd make a general formulation for Lebedev quadrature and 3D interpolation for the sample, and then systematically increase the quadrature samples until the result converges. Good luck. |
|
December 16, 2014, 22:09 |
|
#3 |
New Member
Kun Zhou
Join Date: Dec 2014
Posts: 2
Rep Power: 0 |
Thanks, Michael. I will follow the easier way as your suggestion. I didn't know Lebedev quadrature before, thanks for your info.
|
|
December 18, 2014, 16:55 |
|
#4 |
Senior Member
|
I'm just guessing, but you could maybe assume your data to be a sum of sines and cosines in x, y and z (the result of a 3D FFT), make a coordinate substitution from cartesian to polar (center on the sphere center, of course) and try to figure out what the exact integral of a Fourier series over a sphere is. Then you simply apply the formulas to the result of your FFT.
In general, pick-up an interpolation kernel, choose your stencil, apply it to those stencils cut by the sphere, integrate manually, apply the result to the interpolation coefficients. The stencils should be non overlapping. Second approach: use paraview. Edit: ok, this was not so clever. There is no reason to say more than Lebedev. I didn't know it neither. |
|
Tags |
average, cartesian mesh, sphere |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
On grid independent solution for pulsatile flow | David | FLUENT | 5 | March 25, 2022 04:33 |
[swak4Foam] Air Conditioned room groovyBC | Sebaj | OpenFOAM Community Contributions | 7 | October 31, 2012 15:16 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 10:03 |
singularity? | mihaipruna | OpenFOAM Running, Solving & CFD | 5 | April 24, 2012 18:18 |
chtMultiRegionSimpleFoam | javad814 | OpenFOAM | 1 | September 26, 2011 14:30 |