Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
131 Views

Aspen User Kinetic Subroutine with Intel fortran compiler - Fortran divide by zero error

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.

With Regards,

Lakshmanan

 

 

0 Kudos
2 Replies
Highlighted
Black Belt Retired Employee
131 Views

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.

0 Kudos
Highlighted
New Contributor II
131 Views

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. 

0 Kudos