differently from other simulators Prode integrates directly with Excel or Matlab,
you have access to all the methods in the library and can modify almost everything by program,
this gives great flexibility and I really appreciate this feature,
in the specific if you look inside the Excel page, VBA code you'll find
this little piece of code
' Original VBA code (prints one line with specified phase fraction)
nrpt = PFLine(stream, 1, pf, pt(0), pp(0), 51)
' nrpt is the effective number of calculated points
ri = 15
For i = 0 To nrpt - 1
Cells(ri + i, ci) = pt(i)
Cells(ri + i, ci + 1) = pp(i)
Next i
here the code calls the method PFLine in the library for calculating the line with specified state and phase fraction
the remaining stuff is the code to write on Excel Cells
you can easily modify this code for including more than one line with specified state and phase fraction
' Modified VBA code (prints three lines with 0.25,0.5,0.75 liq. molar fractions)
pf = 0
For ii = 0 To 2
pf = pf + 0.25
nrpt = PFLine(stream, 1, pf, pt(0), pp(0), 51)
' nrpt is the effective number of calculated points
ri = 15
For i = 0 To nrpt - 1
Cells(ri + i, ci + 2 * ii) = pt(i)
Cells(ri + i, ci + 2 * ii + 1) = pp(i)
Next i
Next ii
I have added the first For (For ii = 0 To 2) to calculate three lines as you wish,
very simple.
Remember to define properly the settings (see the operating manual) ,
these are available under the Tab Models in Properties Editor,
for example you may decide to
-print vapor-liquid; vapor-liquid-liquid; vapor-liquid-solid diagrams
-print all calculated points or stop when crossing dew or bubble lines (default)
-validate points (default) or not etc.
remember that a phase diagram is complex to calculate and may take a lot of time to complete if you add many lines,
you may test different possibilities as for example print all calculated points to see how the phase diagram appears before to customize on your needs.
Edited by marchem, 08 January 2013 - 03:03 PM.