Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Brownian forces evaluation problem

Please login with a confirmed email address before reporting spam

I am using the 4.3 version to calculate the Brownian forces on a 2D geometry. My model looks pretty much like the "Brownian Motion" model from the Comsol's Model Library. The solver converges and I can visualize the particles dynamics.
The problem is that I cannot numerically evaluate the Brownian forces values. For example, I tried using the Surface Average option from the Derived Values Menu, and I got the attached error message.
It happens the same when I am trying to calculate the values for the forces using the "Brownian Motion" model from the Model Library. I also saw that there is no specific option, after solving the problem, when trying to evaluate the Brownian Forces: I wasn't able to find a clear option for the Brownian forces as it can be found in the Results area for e.g. Drag Forces (more details in the attached image).
Is there any specific way to calculate the Brownian force that acts upon a particle or, more important, upon all the particles in the computational domain?


6 Replies Last Post 2012年9月24日 GMT-4 02:42
Daniel Smith COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月20日 GMT-4 18:03
Hi "Agent Cooper", the Brownian force depends on the variable "timestep" which is the timestep taken by the solver. The timestep is only known at specific instances of time which are not necessarily coincident with the times outputted by the solver. Its value is not stored, so there is no way of accessing it during results processing.

There is a workaround I can come up with. Since we solve the equation:

d/dt(m*v) = Fd + Fb

where Fd is the drag force and Fb is the Brownian force, you can re-arrange this to get:

Fb = d/dt(m*v) - Fd

So, plotting the expression:

d(fpt.mp*fpt.vx,t)-fpt.FDx

will give you the x-component of the Brownian force,

d(fpt.mp*fpt.vy,t)-fpt.FDy

will give you the y-component etc.
Hi "Agent Cooper", the Brownian force depends on the variable "timestep" which is the timestep taken by the solver. The timestep is only known at specific instances of time which are not necessarily coincident with the times outputted by the solver. Its value is not stored, so there is no way of accessing it during results processing. There is a workaround I can come up with. Since we solve the equation: d/dt(m*v) = Fd + Fb where Fd is the drag force and Fb is the Brownian force, you can re-arrange this to get: Fb = d/dt(m*v) - Fd So, plotting the expression: d(fpt.mp*fpt.vx,t)-fpt.FDx will give you the x-component of the Brownian force, d(fpt.mp*fpt.vy,t)-fpt.FDy will give you the y-component etc.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月21日 GMT-4 05:13
Dear Daniel,

I followed your suggestion of plotting the Brownian forces using the d(fpt.mp*fpt.vx,t)-fpt.FDx expression for the ox component and the d(fpt.mp*fpt.vy,t)-fpt.FDy expression for the oy component on the Cosmol's Library "Brownian Motion" model and I got the attached error message. I also used these expressions in my model and the error is still the same.

I tried to plot the components (fpt.FDx, fpt.mp and fpt.vx) separately and, again, I got the "Failed to evaluate variable" error message.

Could you please help me find out what am I doing wrong?
Dear Daniel, I followed your suggestion of plotting the Brownian forces using the d(fpt.mp*fpt.vx,t)-fpt.FDx expression for the ox component and the d(fpt.mp*fpt.vy,t)-fpt.FDy expression for the oy component on the Cosmol's Library "Brownian Motion" model and I got the attached error message. I also used these expressions in my model and the error is still the same. I tried to plot the components (fpt.FDx, fpt.mp and fpt.vx) separately and, again, I got the "Failed to evaluate variable" error message. Could you please help me find out what am I doing wrong?


Daniel Smith COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月21日 GMT-4 08:52
Hi, you can't make a surface plot of any of the particle variables since such variables do not exist on the physical geometry. The only way you can see forces on particles is via the Color Expression of a Particle Trajectories plot.
Hi, you can't make a surface plot of any of the particle variables since such variables do not exist on the physical geometry. The only way you can see forces on particles is via the Color Expression of a Particle Trajectories plot.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月21日 GMT-4 09:23
Daniel,

I just tried to visualize the forces on the particles via the Color Expression of a Particle Trajectories plot. It doesn't work. The velocity components (fpt.vx and fpt.vy) can be plotted when introduced in the Color Expression field. But the fpt.FDx, fpt.FDy and fpt.mp stil generate the same error message.

How can this be repaired?
Daniel, I just tried to visualize the forces on the particles via the Color Expression of a Particle Trajectories plot. It doesn't work. The velocity components (fpt.vx and fpt.vy) can be plotted when introduced in the Color Expression field. But the fpt.FDx, fpt.FDy and fpt.mp stil generate the same error message. How can this be repaired?

Daniel Smith COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月21日 GMT-4 10:05
Hi, does your model include the drag force? If your model only contains the Brownian force then you probably only need to plot:

d(fpt.mp*fpt.vx,t)

for the x-component of the Brownian force. If this doesn't fix the problem then attach your model to this thread.
Hi, does your model include the drag force? If your model only contains the Brownian force then you probably only need to plot: d(fpt.mp*fpt.vx,t) for the x-component of the Brownian force. If this doesn't fix the problem then attach your model to this thread.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月24日 GMT-4 02:42
Daniel,

The d(fpt.mp*fpt.vx,t) and d(fpt.mp*fpt.vy,t) expressions works fine for the Color Menu in Particle Trajectories mode in my model now.

When I used the previous expressions, I used them with the Brownian Motion model from the Comsol's Model Library, which contains the drag and the Brownian forces together. My model only contains the Brownian forces. In the Comsol's Brownian Motion model the first expressions didn't work. And when I tried to plot the Brownian and the drag forces using the Arrow Surface, I got the variable evaluation error message. That seemed awkward.

Is there any possible way to numerically evaluate the Brownian forces (like using the Surface Integration or the Surface Average menus)?

P.S. I couldn't attach the model file to this thread because of its size (approx. 20MB).
Daniel, The d(fpt.mp*fpt.vx,t) and d(fpt.mp*fpt.vy,t) expressions works fine for the Color Menu in Particle Trajectories mode in my model now. When I used the previous expressions, I used them with the Brownian Motion model from the Comsol's Model Library, which contains the drag and the Brownian forces together. My model only contains the Brownian forces. In the Comsol's Brownian Motion model the first expressions didn't work. And when I tried to plot the Brownian and the drag forces using the Arrow Surface, I got the variable evaluation error message. That seemed awkward. Is there any possible way to numerically evaluate the Brownian forces (like using the Surface Integration or the Surface Average menus)? P.S. I couldn't attach the model file to this thread because of its size (approx. 20MB).

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.