CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Brownian motion force calculation issue in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By jenc24
  • 1 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2024, 17:16
Post Brownian motion force calculation issue in OpenFoam
  #1
New Member
 
Join Date: Nov 2022
Location: Slovenia
Posts: 12
Rep Power: 4
jenc24 is on a distinguished road
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.
jenc24 is offline   Reply With Quote

Old   January 31, 2024, 12:53
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14
Tobermory will become famous soon enough
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?
Tobermory is offline   Reply With Quote

Old   January 31, 2024, 16:21
Default
  #3
New Member
 
Join Date: Nov 2022
Location: Slovenia
Posts: 12
Rep Power: 4
jenc24 is on a distinguished road
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.
jenc24 is offline   Reply With Quote

Old   February 1, 2024, 10:41
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14
Tobermory will become famous soon enough
Hmmm ... others have reported having issues as well - check out the following thread: Validating Brownian motion in OpenFOAM. Seems like you may have to play with the model a bit.
Tobermory is offline   Reply With Quote

Old   February 2, 2024, 11:28
Default
  #5
New Member
 
Join Date: Nov 2022
Location: Slovenia
Posts: 12
Rep Power: 4
jenc24 is on a distinguished road
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.

RMSdispacement.jpg


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?
jenc24 is offline   Reply With Quote

Old   February 2, 2024, 17:48
Default
  #6
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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.
olesen is offline   Reply With Quote

Old   February 3, 2024, 06:26
Default
  #7
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14
Tobermory will become famous soon enough
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.
Tobermory is offline   Reply With Quote

Old   February 5, 2024, 11:17
Default
  #8
New Member
 
Join Date: Nov 2022
Location: Slovenia
Posts: 12
Rep Power: 4
jenc24 is on a distinguished road
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:

brownianTest.jpg

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 likes this.
jenc24 is offline   Reply With Quote

Old   February 5, 2024, 12:41
Default
  #9
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 745
Rep Power: 14
Tobermory will become famous soon enough
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.
jenc24 likes this.
Tobermory is offline   Reply With Quote

Reply

Tags
brownian force, openfoam 11


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
OpenFOAM on AWS Ubuntu EC2 Instance mcc12 OpenFOAM Programming & Development 1 October 28, 2021 14:22
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 07:15
Force calculation in OpenFoam dmaz OpenFOAM Running, Solving & CFD 8 April 2, 2015 04:58
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55


All times are GMT -4. The time now is 13:37.