I am trying to solve an equation over the surface of a sphere, which is very similar to the Cahn-Hilliard problem on the surface of a sphere. I have created the mesh as described in the Cahn-Hilliard problem. But how to calculate the total probability over the surface as the data are not in order. Is there any direct way in Fipy which can calculate the total probability? Can anyone please help me to solve this issue?
Asked
Active
Viewed 298 times
0
-
Hi Debasis, welcome to SO!. Can you show us what you have created? – learner May 12 '20 at 15:17
1 Answers
1
Integration over the domain can be achieved with
var.cellVolumeAverage * mesh.celVolumes.sum()
or
(var * mesh.celVolumes).sum()

jeguyer
- 2,379
- 1
- 11
- 15
-
Total probability should be =1, but this method gives a very small number ~10^(-6). – Debasis Das May 12 '20 at 13:48
-
The term probability is a little confusing in conjunction with FiPy as FiPy is a PDE solver. If you are calculating a probability then you will likely have to normalize appropriately. @jeguyer is just telling you how to calculate the integration of a variable across the domain. Maybe you need to divide through by the surface area of the 3D manifold or something like that. – wd15 May 12 '20 at 16:50