Hi Gani Thanks very much for your enquiry! As it happens I have a copy of REFPROP 7 here on my computer at the moment, which a colleague in my department had obtained. I had been looking at it and wondering to what extent it might have been useful within ASCEND, and also admiring the nice way that it includes a definitions of fluid properties in a special file that includes citations for all the source data.
Gani B. Ganapathi wrote: > Hi John: > > I have been exploring ASCEND for the past few days to see if it can > address some of my needs to integrate features of chemical process > modeling as well as fluid dynamics. It appears from first blush it > might be capable of doing just that. I have developed a 2-phase heat > rejection system consisting of evaporator (heat source), radiator > (sink), pump and accumulator using Python. I was able to integrate > Fortran code from NIST's Refprop database for thermodynamics of the > fluids I am interested in. In this manner, I was able to integrate the > rigorous thermodynamic models with the fluid dynamic models and > conduct trades for performance of the 2-phase vs single phase thermal > loops for lunar habitats. I'd be interested to hear some more about your two-phase modelling -- I have some other code for calculating steady-state two-phase flow pressure drops and heat transfer that might be of interest, depending on what you're trying to do. > Since the geometry was simple, I was able to get away with using > Python. I can see the problem will become more involved if I have > multiple branches, etc and I feel ASCEND will be more suitable in such > situations. Given than I have a few questions: > > 1. Can one include fortran code easily (via wrappers if needed) into > ASCEND to do the thermodynamics (or anything else for that matter). I > see you do have capabilities of including external libraries, but I > wasn't able to follow the documentation well enough to feel confident. Certainly it would not be a problem to incorporate REFPROP into ASCEND in terms of hooking up the Fortran routines with some C wrapper code to ASCEND. I can help you through that process, and we can write some clearer documentation as we go, if you like. The issue to think about when it comes to connecting external thermodynamics routines to ASCEND is that for the Newton solver inside ASCEND to work at its best, it needs to be able to access partial derivatives of the property correlations. Specifically, it is calculating a Jacobian matrix of the residual functions with respect to the variables in the system. This ASCEND can normally do, if you enter equations into ASCEND directly, because it has the necessary capability to perform automatic differentiation. But if you provide external functions, then ASCEND can only numerically approximate the derivatives (using finite difference formulae), and this can lead to some inaccuracy that reduces the ability of ASCEND to efficiently converge on a solution. In larger and more complex systems, this can be a serious concern. Hence there is the ability, in the external relation interface, for providing a way for the external function to also provide the values of its partial derivatives, so that ASCEND doesn't need to estimate these numerically. When it comes to connecting REFPROP to ASCEND, this is the part that I would suspect may require a little more work. Another issue is that ASCEND has the ability to 'work through' a system of equations starting with a fixed variable and proceeding to find the next variable which can be determined, etc, only resorting to numerical solutions when a block of simultaneous equations occurs. This 'blocking' approach can make use of equations that are in symbolic form, allowing 'direct solution' of many equations, but this also can not be done when equations are implemented in external code. I guess my main point is that the code hook-up is not the hard part; the hard part is ensuring the mathematics 'works', and your property evaluations allow ASCEND's solver to converge painlessly to the solution. > 2. How much commitment does the ASCEND community have to make advances > in development. Is there continuous on-going activity or is it done > when someone has some time. In the last two years, we have added Python bindings, several new solvers (IDA and DOPRI5, and IPOPT ongoing) and a whole new GUI. So although none of us is dedicated full time to the project, the project is nevertheless most definitely active. Even so, new contributors would be very welcome, and we are pursuing the possibility of attracting some final-year engineering students to contribute to projects to add new functionality. Between Art Westerberg, Ben Allan, Krishnan Chittur and myself, there is ample support resource available, and we all use it regularly in our work. With the wiki and mailing list we are trying to be as open as possible, so that users can help themselves if they can. Hope this helps, Cheers JP ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ascend-sim-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ascend-sim-users

