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).