Hi everyone,
is there an analogous python wrapper to the CFDEM coupling as there is to only-liggghts?
What we are looking for exactly, is to add a force to each particle in a suspension which depends on the particle's position and size [Force = f(x,y,z,r)] every certain amount of steps. We have achieved this in liggghts-only using the python wrapper, and we would like to do this in CFDEM as well. We use a loop in python during which we read each particle position, search the force that should work on the particle (using a look-up array) and add it using a FIX command. LIGGGHTS then runs for i.e. 10 dem_steps, after which the new forces are calculated with the new positions.
Is it possible to carry out a similar command to
lmp.command("run 10")
but for CFDEM? Something like
cfdem.command("run 1")
So that a CFD-step is carried out during the loop too?
I guess worst case scenario, one could devise a series of run/restart commands in a loop in shell script...
Cheers!
-A
paul | Tue, 11/07/2017 - 07:31
How about just coding a
How about just coding a LIGGGHTS fix that does just that? It's not that difficult and the performance would probably be much better.
If you are really not into that, look into the more advanced aspects of LAMMPS/LIGGGHTS scripting - it's surprisingly powerful.
Greetings,
Paul
AndresMM | Tue, 11/07/2017 - 09:17
Hi Paul,
Hi Paul,
thank you for your answer.
Could you please expand a little?
- Do you mean coding a new fix in LIGGGHTS itself that runs a CFD solver?
- On the second point, what do you mean with the advanced aspects of LIGGGHTS scripting? Are there such advanced commands that one can inser in the LIGGGHTS script?
Would you have any examples or some documentation? We only have experience using "vanilla" LIGGGHTS/CFDEM and have only played with the Python wrapper but not LIGGGHTS code itself or with the 'advanced' scripting.
Regards,
Andrés