Hello,
I am currently developing a specific physical model using the EDEM Custom API (C++).
I am utilizing the Body Force API (externalForce) and the Contact Force API (calculateForce). However, I am finding it challenging that the default API structure restricts data access to individual particles or specific contact pairs only.
My model involves a 6N * 6N global matrix (assuming 6 degrees of freedom per particle) multiplied by a 6N global velocity vector to calculate the forces for the entire system. To implement this, I need simultaneous access to the velocity information of all particles (Global Access) within a specific time step.
While I understand this could potentially be implemented indirectly through contact models, I would like to ask the following questions regarding computational efficiency and model clarity:
- Global Data Accessibility: Is there an interface within the API that allows direct reference to an array or pointer containing the velocities of all particles currently in the simulation?
- Calculation Workflow: Is it feasible to implement a workflow where I collect velocity data for all particles, perform the matrix multiplication, and then distribute the resulting forces back to each individual particle's force component?
I would greatly appreciate any guidance or recommended frameworks for achieving this.