CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Average over a sphere in uniform cartesian grid

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2014, 06:06
Default Average over a sphere in uniform cartesian grid
  #1
New Member
 
Kun Zhou
Join Date: Dec 2014
Posts: 2
Rep Power: 0
zkwzju is on a distinguished road
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
zkwzju is offline   Reply With Quote

Old   December 16, 2014, 14:46
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
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.
mprinkey is offline   Reply With Quote

Old   December 16, 2014, 21:09
Default
  #3
New Member
 
Kun Zhou
Join Date: Dec 2014
Posts: 2
Rep Power: 0
zkwzju is on a distinguished road
Thanks, Michael. I will follow the easier way as your suggestion. I didn't know Lebedev quadrature before, thanks for your info.
zkwzju is offline   Reply With Quote

Old   December 18, 2014, 15:55
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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.
sbaffini is offline   Reply With Quote

Reply

Tags
average, cartesian mesh, sphere


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
On grid independent solution for pulsatile flow David FLUENT 5 March 25, 2022 03:33
[swak4Foam] Air Conditioned room groovyBC Sebaj OpenFOAM Community Contributions 7 October 31, 2012 14:16
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 09:03
singularity? mihaipruna OpenFOAM Running, Solving & CFD 5 April 24, 2012 17:18
chtMultiRegionSimpleFoam javad814 OpenFOAM 1 September 26, 2011 13:30


All times are GMT -4. The time now is 09:57.