Hello fellow developers, I’m currently working on a particle simulation. In this simulation system, I want one particle to remain completely stationary, but still be able to undergo heterogeneous reactions normally. What code should I add, or how should I debug it, to achieve this effect?
Hi,
I did this in the past by writing a user defined function (usr1.f). I just forced the velocity (des_vel_new) of the particle to be zero and the position des_pos_new to be fixed. This might not be the most efficient way, but it works and the reactions should undergo normally.
Cheers,
Eduardo
Dear edcanop, could you provide me with the code? I’m not quite sure how to write this code.
Hello,
I am sorry, but I have very limited time at the moment. I would say you could just follow this steps:
- Create a phase for the non-moving particles.
- In the usr1.f, loop over all the particles (NP) and check their phase: PIJK(NP,5).
- If PIJK(NP,5) = your phase then hold them by doing DES_VEL_NEW(NP,:)=0.0d0.
- I am not sure a DES_POS_NEW(NP,
= DES_POS_OLD(NP,
is needed, but you can give it a try.
Please follow these steps and let me know if it works. If not, please attach a case, it is faster for me to check on something already done.
Cheers,
Eduardo
generate_particles_mod.f (116.5 KB)
I am assuming this is with DEM.If you use a particle_input.csv file as initial condition, you can set the particles in a given solids phase as stationary by selecting “Rigid motion”, and specifying a zero velocity:
If you initialize the particles in an IC region, this doesn’t work. It will be fixed in the next release, but you can use the attached file with the 25.3 release (copy in your project directory and rebuild the solver).
You’re welcome. I will try according to your guidance.
You’re welcome. I will try according to your guidance.
