XOPs and Silicon Macs

Hello:

I want to use a rather complicated C code as an XOP.  I am running Mac OS 15.3 (Sequoia) on an M4 chip.  IGOR seems to run great while using Rosetta.  I have the XOP Toolkit 8. 

Do the instructions for how to create an XOP still work on this version of the Mac OS?  I started converting the C to an IGOR procedure but ran into problems due to how the code was structured (statement numbers!).

The C code does not interface with any IGOR or GUI components, simply number crunching to return a value.

Thanks,

   Joe Kelly

If you follow the instructions for an Intel Mac then the macOS's Rosetta will also translate that binary at runtime.

I'm curious how a number-crunching C routine couldn't be converted to and IGOR procedure, though.

Would you be willing to share the code here?

Thanks Jim!

The C code was brute force converted from Fortran 77.  All of the files are attached in an archive.  I had converted a bit of it, see the .ipf file.  But gave up when looking at routine DFIND1 in solvpk.c.  The problem was the usage of statement numbers to branch inside of a complicated iteration loop.  Of course, I could break this up etc but if an XOP would work that would be a great time saver.

I did have this as an XOP before but that was created in 2012.

Thanks again,

  Joe

Archive.zip (47.03 KB) WaterSteam.ipf (44.64 KB)

Are you looking for equation of state for H2O? I wrote Igor code for IAPWS95 (Wagner and Pruß) for PVT relations and fugacity, if that helps.

In reply to by tony

tony wrote:

Are you looking for equation of state for H2O? I wrote Igor code for IAPWS95 (Wagner and Pruß) for PVT relations and fugacity, if that helps.

Hi Tony.  Yes, that is what I am doing.  I’ll see about getting this back into an XOP today.  If I have trouble, I’ll ask for your help.  I had this working back in the mid-2010s.  I asked the question (thanks Jim P) because I didn’t want to waste time if an XOP would no longer work with my new Mac.

 

OK, I will attach an ipf that may be helpful. It contains code for a primitive and probably buggy UI. The code contains a collection of EOS for H2O and for mixed fluids. My applications for this are are all for high pressure, so some aspects of the code may seem a little esoteric, but maybe you can extract from this what you need. The function IAPWS95Volume() solves the EOS used in your c code. I just checked with an online NIST calculator and the results seem to match, but you should verify for yourself whether it works if you choose to use it.

EOScalculations.ipf (118.52 KB)

Thanks Tony.  I appreciate the help.  Yesterday, I was able to get an XOP working.  Turned out to be pretty easy.  Just had to carefully read the manual. There were a few differences from when I had originally written this back in 2012 using Igor 4.  One critical step is to clone an existing XOP from the Igor XOP toolkit.  Otherwise, getting all the Xcode settings correct is a chore. 
 

Your code for mixed fluid may come in very handy in the future. 
 

thanks again,

   Joe