Abstract:Two methods based on finite state machine (FSM), namely state model-driven and table-driven, were investigated in this study to solve the problems of poor maintainability and difficult secondary development in the implementation of nonlinear constitutive models using traditional programming methods. Through comparison, the results reveal that the table-driven method can efficiently describe nonlinear constitutive models. Then, the stress-strain hysteretic curve of the Davidenkov constitutive model was modified, from which two construction forms of the hysteretic curve were proposed: failure point and correction point type. The results reveal that the modified Davidenkov model can correct the shortcoming of the “n-fold method” model, in which the shear strain reversely reaches the upper limit shear strain and is unable to enter the failure state, so it is more reasonable to be used in simulating the dynamic stress-strain relationship of soil, especially using the failure point model to simulate the shear stiffness of soil under cyclic loading and unloading. Based on the programming method of FSMs and the table-driven method, the constitutive programs of the Davidenkov model and its modified models were compiled, thereby verifying the effectiveness and correctness of the proposed method.