brunette1216
11-19-2013, 06:06 PM
Hi, I am a Chemical Engineering Graduate student taking a class in programming. I was assigned a problem where a valve is closed quickly in a reservoir piping system during an emergency. I was asked to write a three step(rkck, rkqs, and odeint) program for the fifth order Runge Kutta method with adaptive step size which solves the governing differential equations (dydx(0) and dydx(1)).
I was given an algorithm handout for each of the subroutines required and followed them exactly, However, I keep running into issues when I run the macro at the end that incorporates three subroutines together.
The current issue is that yscal() in the program is zero. From the handout, yscal() is the vector of values against which the errors are scaled, but I am not sure what that means or how to make that work in VBA. I don't actually calculate yscal() and I feel like I should but I don't know how. I attached my excel file with the VBA coding and macros.
Can someone please help???
Thank you.
10852
I was given an algorithm handout for each of the subroutines required and followed them exactly, However, I keep running into issues when I run the macro at the end that incorporates three subroutines together.
The current issue is that yscal() in the program is zero. From the handout, yscal() is the vector of values against which the errors are scaled, but I am not sure what that means or how to make that work in VBA. I don't actually calculate yscal() and I feel like I should but I don't know how. I attached my excel file with the VBA coding and macros.
Can someone please help???
Thank you.
10852