Hello everybody,

I'd like to include an external force in my lammps simulation. I know

the force at some points in space, given in an ascii file, and need to

interpolate it to the whole space.

Of course it would be very easy to use variables in the existing fix

addforce, but I cannot see a way to get the force from the ascii file to

variables fx fy fz within lammps?

So my idea so far is to write a new fix and use the fix addforce as a

general model for the new fix and the pppm part of kspace as a model for

the interpolation.

My question is how to best go about doing this, and if anybody has done

something similar before and would be willing to share the code? Thanks

in advance for any comments or suggestions!

Mierk

Hello everybody,

I'd like to include an external force in my lammps simulation. I know

the force at some points in space, given in an ascii file, and need to

interpolate it to the whole space.

Of course it would be very easy to use variables in the existing fix

addforce, but I cannot see a way to get the force from the ascii file to

variables fx fy fz within lammps?

indeed.

So my idea so far is to write a new fix and use the fix addforce as a

general model for the new fix and the pppm part of kspace as a model for

the interpolation.

i don't think that the pppm interpolation is that good example,

since it expects a regular grid and your explanation hints at

an unstructured grid. i would look on the web for a discussion

and examples on how to best work with this information.

there would not only be a linear interpolation, but also tensor

b-splines and other methods that first map irregular data

to a regular grid first.

My question is how to best go about doing this, and if anybody has done

something similar before and would be willing to share the code? Thanks

in advance for any comments or suggestions!

once you have a suitable (serial) scheme and implementation for the

interpolation, it should be straightforward. broadcast the necessary

information to all nodes and then each will loop over its local atoms

and apply the force computed from the interpolation.

cheers,

axel.