Modeling and simulation of fish swimming with active muscles