I have a set of thermodynamic data that I need to globally fit to a single equation. I currently have the data in a two column data where every 16 points is a new "set" of data points. I have used my code to fit a single "set" of data but when I try to fit all of my data it doesn't work. My data is pressure on the x-axis and moles on the y-axis. In the full set of data the 4 temperatures are: 521 K (lowest line), 402 K, 320 K, and 274 K (highest line). Any help or direction to go would be great.
Picture 1: Single "set" of data fit code
Picture 2: tab delimited file of the data I plotted
Picture 3: My attempt at fitting the 4 "sets" of data to a single equation. You can see the four "sets" of data at the bottom that I would like to fit.