VBA for Point of Intersection between 2 Curves

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:

  1. Find suitable polynomial expressions for the system and pump curves
  2. Write a Newton Raphson function that returns the flowrate at the duty point
  3. 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:

  1. 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)
  2. 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]
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top