CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Brownian motion force calculation issue in OpenFoam (https://www.cfd-online.com/Forums/openfoam-solving/254270-brownian-motion-force-calculation-issue-openfoam.html)

jenc24 January 30, 2024 16:16

Brownian motion force calculation issue in OpenFoam
 
The Brownian force (https://cpp.openfoam.org/v11/Brownia...8C_source.html) is said to be calculated as in Ahmadi et. al (https://doi.org/10.1080/02786829208959550), as
n_i (t) = G_i \sqrt{\frac{\pi S_0}{\Delta t}} \left[ \frac{m}{s^2} \right].

The force is then added to the list of forces acting on a particle (as an explicit contribution) as F =  n_i (t) m_p, where m_p is the mass of the particle. The sum of forces gives the net force, which is then integrated to obtain the new particle position.

The article states, that the Brownian motion force should be varying through the timestep, as shown here: https://bugs.openfoam.org/file_downl...=1616&type=bug,
whereas in case of current implementation, it is clearly constant for each timestep.

Moreover, tracking the time evolution of the RMS displacement of particles, given by
r_{RMS} = \sqrt{\frac{1}{N} \sum_i^N |\vec{r} - \vec{r_0}|^2},
gives a wrong result; r_{RMS} \propto t^2 time evolution is obtained, instead of r_{RMS} \propto \sqrt{t} as shown in theory (Ahmadi). This phenomena most likely stems from the fact that Brownian force is calculated and added to the sum of all forces just like any other force (drag, lift, ...), which is most likely incorrect.

A thought on this matter from anyone will be greatly appreciated.

Tobermory January 31, 2024 11:53

Quote:

The article states, that the Brownian motion force should be varying through the timestep, as shown here ... whereas in case of current implementation, it is clearly constant for each timestep.
I am not sure what you mean by this ... are you saying that you think that the force should change during the timestep, i.e. vary in value as time progresses from t_1 to t_2 = t_1 + \delta t? i.e. that the force calculation should be undertaken on a finer/smaller timestep value? Where does the article say this?

Or have I misunderstood something?

Quote:

This phenomena most likely stems from the fact that Brownian force is calculated and added to the sum of all forces just like any other force (drag, lift, ...), which is most likely incorrect.
This statement cannot be right - the first equation of the Li & Ahmadi paper writes the equation of motion of the particle, and expresses it as the sum of all the forces! How else could the force impact the particle?

jenc24 January 31, 2024 15:21

Thank you for your response.



I am writing my interpretation of the Brownian force explanation, as shown here: https://bugs.openfoam.org/file_downl...=1616&type=bug


The fact is, that the resulting RMS displacement from the simulation does not follow r_{RMS} \propto \sqrt{t} (as is Ahmadi), but rather r_{RMS} \propto t^2. I can not explain this behavior and would need additional clarification whether it is expected, or am I missing something?



Of course, a modeled particle force must be added to all other forces and then integrated, this was not in question. My guess was, that the Brownian motion should perhaps not be modeled as a force (equivalent to drag, lift, etc..), as this approach gives a result, different than that of the reference.

Tobermory February 1, 2024 09:41

Hmmm ... others have reported having issues as well - check out the following thread: https://www.cfd-online.com/Forums/op...-openfoam.html. Seems like you may have to play with the model a bit.

jenc24 February 2, 2024 10:28

1 Attachment(s)
I tested a simple case of 2D Brownian motion from a point source (Brownian force only, constant temperature), and the results of RMS displacement for two different timesteps are attached below.

The RMS displacement was calculated as r_{RMS} = \sqrt{\frac{1}{N} \sum_i^N |\vec{r} - \vec{r_0}|^2},
where \vec{r} is the position vector of the particle, \vec{r_0} the starting position and N = 1000 the number of particles.

Attachment 98399


The RMS displacement does not follow the theoretical curve (as in Ahmadi). Could the RMS displacement definition be wrong in my case, as the reference does not provide it?

olesen February 2, 2024 16:48

You could think about contacting the author of this issue:

https://develop.openfoam.com/Develop.../-/issues/2922


He seems to be working in that area. Probably easiest if you just add a comment onto that issue and ask if he has some thoughts on the subject.

Tobermory February 3, 2024 05:26

Great comment Mark - I didn't think of looking for a registered bug. From a quick skim of the link, one comment about your test case jenc24 is that it should really be 3D rather than 2D. But also read the part about the required changes to the coding. You'll also find an example test case for you to try. Good luck.

jenc24 February 5, 2024 10:17

1 Attachment(s)
Thank you for both of your comments.

Fortunately, I was able to find the origin of the problem.

The Brownian motion force behaves the same as in Ahmadi, only if drag is also considered:

Attachment 98415

From physics point of view, that makes sense, as the sum of both forces dictates the direction and the magnitude of particle displacement. In real two phase systems, drag will always have an effect.

It also makes me wonder - why is Brownian motion modeled as a force? Isn't the whole point of Brownian motion a random pertubation of particle position? Would the modelling of Brownian motion in the following way be wrong:
\vec{r}_{new} = \vec{r}_{old} + \vec{G} \sqrt{6 D_B \Delta t},
where \vec{G}, D_B are random displacement vector and Brownian diffusivity respectively.

Now I know, that Brownian motion is indeed a result of some force, but from a modelling point of view, the position-pertubation approach looks simpler. Furthermore, it eliminates the need for particle timestep fitting (particle relaxation time).

Let me know what anyone thinks.

Tobermory February 5, 2024 11:41

Well done for figuring it out. As for the suggestion to model the motion with a position perturbation - I guess the current method is more general and allows for other forces to be added in, if necessary. Plus it's probably also easier to allow for boundary effects.

Nothing to stop you coding up the position perturbation approach instead and giving it a go! ;) Let us know how you get on.


All times are GMT -4. The time now is 15:32.