Dynamic simulation of an electrorheological fluid