Skip to content

Generating uniformly sampling on a sphere for StochasticDispersionRAS

Functionality to add/problem to solve

The current implementation of the sampling to get a random direction for the turbulent velocity perturbation seems faulty. Indeed, the current sampling draws number for angle from [0, 2pi] and [0, pi] uniform distributions. Yet, on a sphere the Jacobian makes the angle correlated and the second angle should not be chosen independently from the first angle value. File: lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C

Target audience

(Who will benefit from the changes?) -> Users (What type of cases?) -> Lagrangian cases

Proposal

The current sampling method could be replaced by a corrected one such as: http://corysimon.github.io/articles/uniformdistn-on-sphere/

What does success look like, and how can we measure that?

By projecting the drawn vector on a plane. Currently, we should get a square. After the correction, we should get a disk.

Links / references

http://corysimon.github.io/articles/uniformdistn-on-sphere/

Funding

NA