I'm working on translating an old program for a gas-mixing furnace, and I have a logic problem that I believe I need help on the math with.
I have the specimen temperature ($T$), a variable called fugacity ($F$) and the gas ratio ($R$).
I need to iteratively calculate a new fugacity ($F'$) that brings the fugacity at a reference temperature ($T'$) to $\Delta$ (the program allows for anything smaller than 0.001 tolerance) with the gas ratio at the specimen temperature.
I've tried structuring this many ways, but the proper algorithm is escaping me. Currently, I'm trying to take the base $F$ and adding/subtracting a step (1), and seeing which of these possible $F$s produces a smaller $\Delta$.
I wish I new more syntax for to show this problem better. Thank you for any help you can offer.