Hello Everyone ,
I am currently working on implementing the kinetic reactions in Aspen plus for reactive distillation through user kinetic subroutine with Fortran Compiler 2017 and VS 14/2015 . After writing the code , compilation and linking the subroutine with ASPLINK procedure . During running the simulations in Aspen , I am encountering Severe error - Fortran divide by zero encountered. Severe error - Fortran invalid operations encountered . I am doubtful if this is due to error in linking of the subroutine or error due to parameters not passing from Aspen to Fortran (due to coding errors) .
Please can some one help me with this . Looking forward to hear from you.
Nobody here would be able to help with this given that we have no idea what your subroutine is doing. You will have to debug it - you can use the debugger or can add print statements to examine intermediate computations. Typically a zerodivide would result in a NaN - if you have compiled the Fortran code with the /fpe0 option, it might get a zerodivide on division by zero, But either way, division by zero is usually not intentional.
add print statements to examine intermediate computations
This is a common feature in developing new code -- the print statements are usually the fastest way
Trust me I do it a lot.