Difference between revisions of "Numerical Integration"

From NavykI
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Numerical Integration==
+
==Introduction and use==
  
 
Numerical integration helps finding the area under a curve using the curve equation.
 
Numerical integration helps finding the area under a curve using the curve equation.
Line 5: Line 5:
 
This is used in finding the area under the righting arm curve for CE or other classification rules.
 
This is used in finding the area under the righting arm curve for CE or other classification rules.
  
In Naval Architecture folder you can find an excel file which contains some subroutines for numerical integration. The file is called '''NumericalIntegrationOnly.xls.'''
+
==Spreadsheets==
 +
 
 +
In '''Naval Architecture''' folder you can find an excel file which contains some subroutines for numerical integration. The file is called '''NumericalIntegrationOnly.xls.'''
 +
 
 
*Input Data
 
*Input Data
**In this file you will have to input the '''curve equation''' obtained on an excel diagram, by adding a polynomial trend line. ''This is a tricky procedure becouse excel might give errors in the equation generation, so after obtaining the equation you should test it by giving values to "x" and making another diagram to see if it's close to the original curve.'' Excel will give you the following equation: ''y = 0.001x3 - 0.3193x2 + 24.412x - 12.412''. In the Enter Equation window you will have to input ''0.001*x^3 - 0.3193*x^2 + 24.412*x - 12.412'' ;
 
 
**Integration interval '''[a,b]''' ''(ie: if you have to find the area under the curve between 30° and 60° interval [a,b] will be [30,60])'';
 
**Integration interval '''[a,b]''' ''(ie: if you have to find the area under the curve between 30° and 60° interval [a,b] will be [30,60])'';
 
**Integration interval division '''m''' ''represents the number of intervals that will divide interval [a,b]''.
 
**Integration interval division '''m''' ''represents the number of intervals that will divide interval [a,b]''.
 +
 
*Output Data
 
*Output Data
**Method-> Shows you the method used fol solving the integral;
+
**'''Method'''-> Shows you the method used fol solving the integral;
**''I='' Is the calculated value for the integral of the function(the actual area we are interested in);
+
**'''I=''' Is the calculated value for the integral of the function(the actual area we are interested in);
**''Dx ='' Is the step division of the calculation interval.
+
**'''Dx =''' Is the step division of the calculation interval.
 +
 
 +
*Defining the equation
 +
**In this file you will have to input the '''curve equation''' obtained on an excel diagram, by adding a polynomial trend line. ''This is a tricky procedure becouse excel might give errors in the equation generation, so after obtaining the equation you should test it by giving values to "x" and making another diagram to see if it's close to the original curve.'' Excel will give you the following equation: ''y = 0.001x3 - 0.3193x2 + 24.412x - 12.412''. In the Enter Equation window you will have to input ''0.001*x^3 - 0.3193*x^2 + 24.412*x - 12.412'' ;
 +
 
 +
You can calculate with different methods to see the differences. You can also see the differences between different methods in the diagram.
  
You can calculate though different methods to see the differences. You can also see the differences between different methods in the diagram.
+
[[Category: Naval Architecture]]

Latest revision as of 12:28, 22 December 2009

Introduction and use[edit]

Numerical integration helps finding the area under a curve using the curve equation.

This is used in finding the area under the righting arm curve for CE or other classification rules.

Spreadsheets[edit]

In Naval Architecture folder you can find an excel file which contains some subroutines for numerical integration. The file is called NumericalIntegrationOnly.xls.

  • Input Data
    • Integration interval [a,b] (ie: if you have to find the area under the curve between 30° and 60° interval [a,b] will be [30,60]);
    • Integration interval division m represents the number of intervals that will divide interval [a,b].
  • Output Data
    • Method-> Shows you the method used fol solving the integral;
    • I= Is the calculated value for the integral of the function(the actual area we are interested in);
    • Dx = Is the step division of the calculation interval.
  • Defining the equation
    • In this file you will have to input the curve equation obtained on an excel diagram, by adding a polynomial trend line. This is a tricky procedure becouse excel might give errors in the equation generation, so after obtaining the equation you should test it by giving values to "x" and making another diagram to see if it's close to the original curve. Excel will give you the following equation: y = 0.001x3 - 0.3193x2 + 24.412x - 12.412. In the Enter Equation window you will have to input 0.001*x^3 - 0.3193*x^2 + 24.412*x - 12.412 ;
You can calculate with different methods to see the differences. You can also see the differences between different methods in the diagram.