I am trying to simulate a solid particle moving around in a fluid.
I want to observe temperature profile near the spherical solid.
To do this, I want to use the compute temp/region command.
Is it possible to define a moving (spherical) region?
Currently what I tried was:
variable XCM equal “xcm(particle,x)”
variable YCM equal “xcm(particle,y)”
variable ZCM equal “xcm(particle,z)”
region RID sphere v_XCM v_YCM v_ZCM RADIUS units box
compute CID particle temp/region RID
But this doesn’t seem to do what I want.
ie The regions are not redefined every time step.
Is there any other way to do it?
(Such a feature incorporated would be very useful!)
Regions aren't dynamic (moving). I've thought about
how to do that for other uses, e.g. using a region as a boundary wall,
but nothing is implemented yet. You might look at fix indent. It
does allow a spherical indenter to be given a velocity.
I have found a way of doing “sampling over moving regions” (See mail thread below).
Thanks to Samy Merabia for his inputs.
By using fix recenter, one can make sure the particle remains at the center of the box,
and thus static shells can be used to sample the temperature profile around the particle.
I need a clarification about my understanding of this fix (recenter):
1> If one uses “fix recenter” (to particle center) with “shift all”,
for the problem of a particle diffusing in a fluid then it is equivalent to
the center of the simulation box moving with the particle?
2> Are the velocities modified in any way?
The reason I ask this is because:
If I calculate velocity of the center of mass of the particle based on its coordinates,
while I am recentering to the particle COM, then the calculated value would be zero.
However if the same is printed out using the variable command, the value would be
one in the “fixed” frame of reference.
Is my understanding of this fix right??
Comments would be highly appreciated.
Thanks in advance.
Look at the initial_integrate routine in fix_recenter.cpp and
you will see what the fix does. It just shifts coordinates
of atoms, not velocities.
Had a look. Thanks for your input.