Reza,
Both options are possible, so let's go over the advantages / disadvantages:
1. This is the more general option, and if you're of the mind to contribute your code back to Cantera this is the path. It is also possible that Option 2 will be difficult or annoying to implement in practice, for example imagine you had some minor change in how the
the fixed temperature is interpolated in the routine
setFixedTemperature. You could, of course, write your own (largely identical) function, make minor changes and compile it separately / run, but your code might become out of date in future releases (e.g., what if the function signature changed?). A better way might be to move the current code to some
InterpolationObject, and have your code simply override that object. Note in this case that an scons build / install is necessary for your source code changes to migrate to the installed version of Cantera.
2. This is also possible, but as you note there are certainly some potential difficulties out there. Mainly, you are force to work within the bounds of what already exists in Cantera's source code. As I outlined in the last case, that can often be annoying (and sometimes, make the changes you need very difficult, inefficient or even impossible to work through).
What I would recommend is a combination of both approaches -- as you build your transport model, you will likely find places where your would be made life easier if only thing X was allowed, or more efficient if you could easily overload how some operation was calculated. So when you get there, build in your modifications, and finally when you've built your new transport model contributing it back to Cantera will be a much simpler process (if you are inclined to do so that is!)
Best,
Nick