Hi, it's me again....
I have a process that predicts the mass yield and ultimate analysis (CHONS, wt.%) of the various phases of an algal hydrothermal liquefaction process. So far, everything is being modeled as non-conventional materials so that I can directly manipulate the ULTANAL/PROXANAL and biochemical proximate with calculator blocks.
The four products of reaction are: bio-crude, aqueous-organics, gas, char. Each of these individual "products" is a complex mixture of tens to hundreds of individual components... A modelling nightmare to completely resolve.
Following published methods, I wish to approximate the content of each phase with 10-20 conventional components in the Aspen library. This method enables in the individual products being represented as a mixture of conventional species in Aspen, and allow extra downstream process to be modeled.
My key parameter is the predicted CHONS (dry wt. %) of each product. Currently I use the non-linear regression solving function within Excel or LibreOffice Calc to resolve the mass-frac of each conventional component required to give the desired CHONS of the mixture, however I'd prefer to have this built directly into the Aspen model.
I could easily write a function in Python that does the regression and returns an array of mass-fractions, but I don't know how to call an external function within a Fortran calc. block (if this is possible?), or even if Aspen has a non-linear solver type function built right in?
Hope this makes sense!