Hi
I have introduced a new contact model, the force was calculated as style F_n = Kn*(rij_thisstep-rij_0), rij_thisstep(double) means the element1.position-element2.position at the current time, and rij_0 means the value in the initial state which stored like double rij_0 = m_customvalue[0]. When I generated a packing without any external force(like gravity, particle body force) and internal force, just this new contact model. But with the passage of time, rij_thisstep-rij_0 accumulated from 1e-9 to 0.1. I am not sure if this caused by the claculation in C++. Are there any method to prevent this?
the code is as below, and the information in the debugging process, rij_0 and rij had a little difference as figure below.
if(timeStepData.time >= m_requestedBondTime && m_BondStatus[0] == 0.0 && nBondSeperation < 0.0){ m_BondStatusDelta[0] += 1.0; m_InitialVectorIDelta[0] += (element2.position - element1.position).getX(); //ni1_0_x m_InitialVectorIDelta[1] += (element2.position - element1.position).getY(); //ni1_0_y m_InitialVectorIDelta[2] += (element2.position - element1.position).getZ(); //ni1_0_z } if(m_BondStatus[0] == 1.0){ rij_0 = CSimple3DVector(m_InitialVectorI[0], m_InitialVectorI[1], m_InitialVectorI[2]); rij_thisstep = element2.position - element1.position; }

Thanks