We present an open-source Matlab framework, titled iFluid, for simulating the dynamics of integrable models using the theory of generalized hydrodynamics (GHD). The framework provides an intuitive interface, enabling users to define and solve problems in a few lines of code. Moreover, iFluid can be extended to encompass any integrable model, and the algorithms for solving the GHD equations can be fully customized. We demonstrate how to use iFluid by solving the dynamics of three distinct systems: (i) The quantum Newton's cradle of the Lieb-Liniger model, (ii) a gradual field release in the XXZ-chain, and (iii) a partitioning protocol in the relativistic sinh-Gordon model. 8 4.2 Charges and currents of XXZ model 13 4.3 Partitioning protocol in relativistic sinh-Gordon 15 5 Conclusion 17 A Thermodynamic Bethe ansatz of implemented models 18 A.1 Lieb-Liniger model 18 A.2 XXZ spin chain model 19 A.3 Relativistic sinh-Gordon model 19 B Numerical implementation of GHD equations 20 1 arXiv:2001.02547v1 [cond-mat.stat-mech] 8 Jan 2020 SciPost Physics Submission B.1 Tensor representation and index conventions 20 B.2 Discretized GHD equations 21 References 22