kurayveth~
New Member
- Joined
- Apr 3, 2019
- Messages
- 1
Hi, i really need a help here asap by tomorrow. I would appreciate if someone could send me the VBA codes for this question i have as an assignment.
The criteria of the assignment is as below :
For this problem you will be provided with your own set of pump and system curves. You must therefore:
When putting together your code, you should keep the following points in mind:
The data is given as below
[TABLE="width: 210"]
<colgroup><col width="70" span="3" style="width:53pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 70"]Flowrate[/TD]
[TD="class: xl63, width: 70"]System head[/TD]
[TD="class: xl63, width: 70"]Pump head[/TD]
[/TR]
[TR]
[TD="class: xl65"]m3/hr[/TD]
[TD="class: xl65"]m[/TD]
[TD="class: xl65"]m[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]0[/TD]
[TD="class: xl66"]15.35[/TD]
[TD="class: xl66"]33.22[/TD]
[/TR]
[TR]
[TD="class: xl65"]10[/TD]
[TD="class: xl66"]15.26[/TD]
[TD="class: xl66"]33.10[/TD]
[/TR]
[TR]
[TD="class: xl65"]20[/TD]
[TD="class: xl66"]15.27[/TD]
[TD="class: xl66"]33.08[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]60[/TD]
[TD="class: xl66"]15.80[/TD]
[TD="class: xl66"]32.79[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]90[/TD]
[TD="class: xl66"]16.76[/TD]
[TD="class: xl66"]32.46[/TD]
[/TR]
[TR]
[TD="class: xl65"]100[/TD]
[TD="class: xl66"]17.22[/TD]
[TD="class: xl66"]32.34[/TD]
[/TR]
[TR]
[TD="class: xl65"]110[/TD]
[TD="class: xl66"]17.72[/TD]
[TD="class: xl66"]32.20[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]170[/TD]
[TD="class: xl66"]22.34[/TD]
[TD="class: xl66"]30.95[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]210[/TD]
[TD="class: xl66"]27.10[/TD]
[TD="class: xl66"]29.50[/TD]
[/TR]
[TR]
[TD="class: xl65"]220[/TD]
[TD="class: xl66"]28.51[/TD]
[TD="class: xl66"]29.08[/TD]
[/TR]
[TR]
[TD="class: xl65"]230[/TD]
[TD="class: xl66"]30.01[/TD]
[TD="class: xl66"]28.58[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
</tbody>[/TABLE]
The criteria of the assignment is as below :
For this problem you will be provided with your own set of pump and system curves. You must therefore:
- Find suitable polynomial expressions for the system and pump curves
- Write a Newton Raphson function that returns the flowrate at the duty point
- Write a function for the Newton Raphson to solve – this may include the first derivative as well.
When putting together your code, you should keep the following points in mind:
- You will need at least 3 separate functions; the Newton Raphson function itself and the two others that return values of f(x) and f’(x)
- That you have a single function call that takes the specified coefficients of the pump and system curve, along with any other values you see fit.
The data is given as below
[TABLE="width: 210"]
<colgroup><col width="70" span="3" style="width:53pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 70"]Flowrate[/TD]
[TD="class: xl63, width: 70"]System head[/TD]
[TD="class: xl63, width: 70"]Pump head[/TD]
[/TR]
[TR]
[TD="class: xl65"]m3/hr[/TD]
[TD="class: xl65"]m[/TD]
[TD="class: xl65"]m[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]0[/TD]
[TD="class: xl66"]15.35[/TD]
[TD="class: xl66"]33.22[/TD]
[/TR]
[TR]
[TD="class: xl65"]10[/TD]
[TD="class: xl66"]15.26[/TD]
[TD="class: xl66"]33.10[/TD]
[/TR]
[TR]
[TD="class: xl65"]20[/TD]
[TD="class: xl66"]15.27[/TD]
[TD="class: xl66"]33.08[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]60[/TD]
[TD="class: xl66"]15.80[/TD]
[TD="class: xl66"]32.79[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]90[/TD]
[TD="class: xl66"]16.76[/TD]
[TD="class: xl66"]32.46[/TD]
[/TR]
[TR]
[TD="class: xl65"]100[/TD]
[TD="class: xl66"]17.22[/TD]
[TD="class: xl66"]32.34[/TD]
[/TR]
[TR]
[TD="class: xl65"]110[/TD]
[TD="class: xl66"]17.72[/TD]
[TD="class: xl66"]32.20[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]170[/TD]
[TD="class: xl66"]22.34[/TD]
[TD="class: xl66"]30.95[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]210[/TD]
[TD="class: xl66"]27.10[/TD]
[TD="class: xl66"]29.50[/TD]
[/TR]
[TR]
[TD="class: xl65"]220[/TD]
[TD="class: xl66"]28.51[/TD]
[TD="class: xl66"]29.08[/TD]
[/TR]
[TR]
[TD="class: xl65"]230[/TD]
[TD="class: xl66"]30.01[/TD]
[TD="class: xl66"]28.58[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
</tbody>[/TABLE]